Initial commit

This commit is contained in:
GrapeshotGames 2018-12-22 10:02:57 -05:00
parent 1aecbe009b
commit a172b4ab3b
469 changed files with 119758 additions and 0 deletions

View file

@ -0,0 +1,64 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{8A276721-FE14-4414-8C0A-1B3ECC282195}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>AtlasGridDataLibrary</RootNamespace>
<AssemblyName>AtlasGridDataLibrary</AssemblyName>
<TargetFrameworkVersion>v4.5.1</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<TargetFrameworkProfile />
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="Newtonsoft.Json, Version=11.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
<HintPath>..\packages\Newtonsoft.Json.11.0.2\lib\net45\Newtonsoft.Json.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Data" />
<Reference Include="System.Net.Http" />
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="DeploymentOverrideAttribute.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="ServerGrid.cs" />
<Compile Include="ServerGrid_ServerOnly.cs" />
</ItemGroup>
<ItemGroup>
<None Include="packages.config" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
</Target>
<Target Name="AfterBuild">
</Target>
-->
</Project>

View file

@ -0,0 +1,42 @@
using Newtonsoft.Json;
using Newtonsoft.Json.Serialization;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using System.Text;
using System.Threading.Tasks;
namespace AtlasGridDataLibrary
{
public class DeploymentAttribute : Attribute
{
}
public class DeploymentOverrideAttribute : DeploymentAttribute
{
}
public class DeploymentConstAttribute : DeploymentAttribute
{
}
public class DeploymentOverrideShouldSerializeContractResolver : DefaultContractResolver
{
//public new static readonly ShouldSerializeContractResolver Instance = new ShouldSerializeContractResolver();
protected override JsonProperty CreateProperty(MemberInfo member, MemberSerialization memberSerialization)
{
JsonProperty property = base.CreateProperty(member, memberSerialization);
bool bShouldSersialize = member.GetCustomAttributes().OfType<DeploymentAttribute>().Any();
property.ShouldSerialize =
instance =>
{
return bShouldSersialize;
};
return property;
}
}
}

View file

@ -0,0 +1,36 @@
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("AtlasGridDataLibrary")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("AtlasGridDataLibrary")]
[assembly: AssemblyCopyright("Copyright © 2018")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
// Setting ComVisible to false makes the types in this assembly not visible
// to COM components. If you need to access a type in this assembly from
// COM, set the ComVisible attribute to true on that type.
[assembly: ComVisible(false)]
// The following GUID is for the ID of the typelib if this project is exposed to COM
[assembly: Guid("8a276721-fe14-4414-8c0a-1b3ecc282195")]
// Version information for an assembly consists of the following four values:
//
// Major Version
// Minor Version
// Build Number
// Revision
//
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]

View file

@ -0,0 +1,381 @@
using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace AtlasGridDataLibrary
{
public static class AtlasDataGridLoader
{
private static string GetBaseDir()
{
return Path.GetDirectoryName(System.Reflection.Assembly.GetEntryAssembly().Location) + "//";//GetExecutingAssembly().Location) + "//";
}
public static AtlasGridData Load()
{
return LoadAbsolutePath(GetBaseDir() + "ServerGrid.json");
}
public static AtlasGridData Load(string RelativePath)
{
return LoadAbsolutePath(GetBaseDir() + RelativePath);
}
public static AtlasGridData LoadAbsolutePath(string Path)
{
AtlasGridData LoadedConfig = new AtlasGridData(); //Default Object or null?
string JsonString = File.ReadAllText(Path);
LoadedConfig = JsonConvert.DeserializeObject<AtlasGridData>(JsonString);
return LoadedConfig;
}
public static void Save(AtlasGridData config)
{
SaveAbsolutePath(config, GetBaseDir() + "ServerGrid.json");
}
public static void Save(AtlasGridData config, string RelativePath)
{
SaveAbsolutePath(config, GetBaseDir() + RelativePath);
}
public static void SaveAbsolutePath(AtlasGridData config, string Path)
{
string JsonData = JsonConvert.SerializeObject(config, Formatting.Indented, new JsonSerializerSettings
{
NullValueHandling = NullValueHandling.Ignore
});
File.WriteAllText(Path, JsonData);
}
}
public class AtlasGridData
{
[DeploymentOverrideAttribute]
public string BaseServerArgs = "";
public float gridSize;
[DeploymentOverrideAttribute]
public string MetaWorldURL = "";
[DeploymentOverrideAttribute]
public string WorldFriendlyName = "";
[DeploymentOverrideAttribute]
public string WorldAtlasId = "";
[DeploymentOverrideAttribute]
public string AuthListURL = "";
[DeploymentOverrideAttribute]
public string WorldAtlasPassword = "";
[DeploymentOverrideAttribute]
public string ModIDs = "";
[DeploymentOverrideAttribute]
public string MapImageURL = "";
public int totalGridsX = 0;
public int totalGridsY = 0;
public bool bUseUTCTime = false;
public float columnUTCOffset = 0.0f;
public string Day0 = "";
public float globalTransitionMinZ = 0.0f;
public string AdditionalCmdLineParams;
public Dictionary<string, string> OverrideShooterGameModeDefaultGameIni = new Dictionary<string, string>();
public string LocalS3URL = null;
public string LocalS3AccessKeyId = "";
public string LocalS3SecretKey = "";
public string LocalS3BucketName = "";
public string LocalS3Region = "";
public string globalGameplaySetup = "";
[JsonProperty(DefaultValueHandling = DefaultValueHandling.Populate)]
public TribeLogConfigInfo TribeLogConfig = new TribeLogConfigInfo();
[JsonProperty(DefaultValueHandling = DefaultValueHandling.Populate)]
public SharedLogConfigInfo SharedLogConfig = new SharedLogConfigInfo();
[JsonProperty(DefaultValueHandling = DefaultValueHandling.Populate)]
public BackupConfigInfo TravelDataConfig = new BackupConfigInfo();
public List<DatabaseConnectionInfo> DatabaseConnections = new List<DatabaseConnectionInfo>();
[DefaultValue(0.01f)]
[JsonProperty(DefaultValueHandling = DefaultValueHandling.Populate, NullValueHandling = NullValueHandling.Include)]
public float coordsScaling = 0.01f;
[DefaultValue(true)]
[JsonProperty(DefaultValueHandling = DefaultValueHandling.Populate, NullValueHandling = NullValueHandling.Include)]
public bool showServerInfo = true;
[DefaultValue(true)]
[JsonProperty(DefaultValueHandling = DefaultValueHandling.Populate, NullValueHandling = NullValueHandling.Include)]
public bool showDiscoZoneInfo = true;
[DefaultValue(true)]
[JsonProperty(DefaultValueHandling = DefaultValueHandling.Populate, NullValueHandling = NullValueHandling.Include)]
public bool showShipPathsInfo = true;
[DefaultValue(true)]
[JsonProperty(DefaultValueHandling = DefaultValueHandling.Populate, NullValueHandling = NullValueHandling.Include)]
public bool showIslandNames = true;
[DefaultValue(false)]
[JsonProperty(DefaultValueHandling = DefaultValueHandling.Populate, NullValueHandling = NullValueHandling.Include)]
public bool exportPngs = false;
[DefaultValue(true)]
[JsonProperty(DefaultValueHandling = DefaultValueHandling.IgnoreAndPopulate)]
public bool showLines = true;
[DefaultValue(false)]
[JsonProperty(DefaultValueHandling = DefaultValueHandling.IgnoreAndPopulate)]
public bool alphaBackground = false;
[DefaultValue(false)]
[JsonProperty(DefaultValueHandling = DefaultValueHandling.IgnoreAndPopulate)]
public bool showBackground = false;
[DefaultValue(false)]
[JsonProperty(DefaultValueHandling = DefaultValueHandling.IgnoreAndPopulate)]
public bool showForeground = false;
public string backgroundImgPath = null;
public string foregroundImgPath = null;
[DefaultValue("Resources/discoZoneBox.png")]
public string discoZonesImagePath = null;
[DeploymentConstAttribute]
public List<ServerData> servers = new List<ServerData>();
// public List<ServerSerializationObject> originalServers = new List<ServerSerializationObject>();
public List<SpawnerInfoData> spawnerOverrideTemplates = new List<SpawnerInfoData>();
[DefaultValue(0)]
[JsonProperty(DefaultValueHandling = DefaultValueHandling.Populate)]
public int idGenerator;
[DefaultValue(0)]
[JsonProperty(DefaultValueHandling = DefaultValueHandling.Populate)]
public int regionsIdGenerator;
[DefaultValue(0)]
[JsonProperty(DefaultValueHandling = DefaultValueHandling.Populate)]
public int shipPathsIdGenerator;
public List<ShipPathData> shipPaths = new List<ShipPathData>();
public DateTime lastImageOverride;
public List<ServerTemplateData> serverTemplates = new List<ServerTemplateData>();
}
// ==== SERVER INFO ===========================================
public class ServerData
{
[DeploymentConstAttribute]
public int gridX = 0;
[DeploymentConstAttribute]
public int gridY = 0;
[DeploymentOverrideAttribute]
public string MachineIdTag = "";
[DeploymentOverrideAttribute]
public string ip = "127.0.0.1";
[DeploymentOverrideAttribute]
public string name = "Unnamed Server";
[DeploymentOverrideAttribute]
public int port = 50000;
[DeploymentOverrideAttribute]
public int gamePort = 6666;
[DefaultValue(27000)]
[DeploymentOverrideAttribute]
[JsonProperty(DefaultValueHandling = DefaultValueHandling.Populate)]
public int seamlessDataPort = 27000;
public bool isHomeServer = false;
public string AdditionalCmdLineParams = "";
public Dictionary<string, string> OverrideShooterGameModeDefaultGameIni = new Dictionary<string, string>();
public int floorZDist = 0;
public int utcOffset = 0;
public int transitionMinZ = 0;
public string GlobalBiomeSeamlessServerGridPreOffsetValues = "";
public string GlobalBiomeSeamlessServerGridPreOffsetValuesOceanWater = "";
public string OceanDinoDepthEntriesOverride = "";
[DefaultValue("")]
[JsonProperty(DefaultValueHandling = DefaultValueHandling.Ignore)]
public string OceanEpicSpawnEntriesOverrideValues = "";
public string oceanFloatsamCratesOverride = "";
public string treasureMapLootTablesOverride = "";
public string oceanEpicSpawnEntriesOverrideTemplateName = "";
public string NPCShipSpawnEntriesOverrideTemplateName = "";
public string regionOverrides = "";
public float waterColorR = 0;
public float waterColorG = 0;
public float waterColorB = 0;
public int skyStyleIndex = 0;
[DefaultValue("")]
[JsonProperty(DefaultValueHandling = DefaultValueHandling.Ignore)]
public string ServerCustomDatas1 = "";
[DefaultValue("")]
[JsonProperty(DefaultValueHandling = DefaultValueHandling.Ignore)]
public string ServerCustomDatas2 = "";
[DefaultValue("")]
[JsonProperty(DefaultValueHandling = DefaultValueHandling.Ignore)]
public string ClientCustomDatas1 = "";
[DefaultValue("")]
[JsonProperty(DefaultValueHandling = DefaultValueHandling.Ignore)]
public string ClientCustomDatas2 = "";
public List<SublevelSerializationObject> sublevels = new List<SublevelSerializationObject>();
public DateTime lastModified;
public DateTime lastImageOverride;
public bool islandLocked = false;
public bool discoLocked = false;
public bool pathsLocked = false;
public List<string> extraSublevels = new List<string>();
public List<string> totalExtraSublevels = new List<string>();
//[DefaultValue(null)]
//[JsonProperty(DefaultValueHandling = DefaultValueHandling.Ignore, NullValueHandling = NullValueHandling.Ignore)]
public List<IslandInstanceData> islandInstances = new List<IslandInstanceData>();
public List<DiscoveryZoneData> discoZones = new List<DiscoveryZoneData>();
public List<SpawnRegionData> spawnRegions = new List<SpawnRegionData>();
[DefaultValue("")]
[JsonProperty(DefaultValueHandling = DefaultValueHandling.Ignore)]
public string serverTemplateName = "";
public string GetGridLocationHumanReadable()
{
const string letters = "ABCDEFGHIJKLMNOPQRSTUVWXYZ";
var Column = "";
if (gridX >= letters.Length)
Column += letters[gridX / letters.Length - 1];
Column += letters[gridX % letters.Length];
return Column + (gridY + 1);
}
}
public class ServerTemplateData : ServerData
{
public float templateColorR = 0;
public float templateColorG = 0;
public float templateColorB = 0;
}
public class SublevelSerializationObject
{
public string name = "";
public float additionalTranslationX = 0;
public float additionalTranslationY = 0;
public float additionalTranslationZ = 0;
public float additionalRotationPitch = 0;
public float additionalRotationYaw = 0;
public float additionalRotationRoll = 0;
public int id = 0;
public int landscapeMaterialOverride = -1;
}
public abstract class MoveableObjectData
{
public float worldX, worldY;
public float rotation;
}
public class IslandInstanceData : MoveableObjectData
{
public string name;
public int id;
public Dictionary<string, string> spawnerOverrides = new Dictionary<string, string>();
public float minTreasureQuality = -1;
public float maxTreasureQuality = -1;
public bool useNpcVolumesForTreasures = false;
public bool useLevelBoundsForTreasures = true;
public bool prioritizeVolumesForTreasures = false;
public string islandTreasureBottleSupplyCrateOverrides = "";
[DefaultValue(-1)]
[JsonProperty(DefaultValueHandling = DefaultValueHandling.Ignore)]
public int spawnPointRegionOverride = -1;
[DefaultValue(1.0f)]
[JsonProperty(DefaultValueHandling = DefaultValueHandling.Ignore)]
public float finalNPCLevelMultiplier = 1.0f;
[DefaultValue(0)]
[JsonProperty(DefaultValueHandling = DefaultValueHandling.Ignore)]
public int finalNPCLevelOffset = 0;
[DefaultValue(1.0f)]
[JsonProperty(DefaultValueHandling = DefaultValueHandling.Ignore)]
public float instanceTreasureQualityMultiplier = 1.0f;
[DefaultValue(0.0f)]
[JsonProperty(DefaultValueHandling = DefaultValueHandling.Ignore)]
public float instanceTreasureQualityAddition = 0.0f;
[DefaultValue("")]
[JsonProperty(DefaultValueHandling = DefaultValueHandling.Ignore)]
public string IslandInstanceCustomDatas1 = "";
[DefaultValue("")]
[JsonProperty(DefaultValueHandling = DefaultValueHandling.Ignore)]
public string IslandInstanceCustomDatas2 = "";
[DefaultValue("")]
[JsonProperty(DefaultValueHandling = DefaultValueHandling.Ignore)]
public string IslandInstanceClientCustomDatas1 = "";
[DefaultValue("")]
[JsonProperty(DefaultValueHandling = DefaultValueHandling.Ignore)]
public string IslandInstanceClientCustomDatas2 = "";
}
public class DiscoveryZoneData : MoveableObjectData
{
public string name;
[NonSerialized]
public float startWorldX;
[NonSerialized]
public float startWorldY;
public float sizeX, sizeY, sizeZ;
public int id;
public float xp;
public bool bIsManuallyPlaced = false;
[DefaultValue("")]
[JsonProperty(DefaultValueHandling = DefaultValueHandling.Ignore)]
public string ManualVolumeName = "";
public int explorerNoteIndex;
public bool allowSea;
}
public class SpawnRegionData
{
public string name { get; set; }
[NonSerialized]
public int X;
[NonSerialized]
public int Y;
}
// ==== MISC INFO ===========================================
public class SpawnerInfoData
{
public string Name { get; set; }
public string NPCSpawnEntries { get; set; }
public string NPCSpawnLimits { get; set; }
public float MaxDesiredNumEnemiesMultiplier { get; set; }
}
public class ShipPathData
{
public List<BezierNodeData> Nodes = new List<BezierNodeData>();
public int PathId;
public bool isLooping = false;
public string PathName = "";
public string AutoSpawnShipClass = "";
public int AutoSpawnEveryUTCInterval = 0;
[DefaultValue(true)]
[JsonProperty(DefaultValueHandling = DefaultValueHandling.Populate, NullValueHandling = NullValueHandling.Include)]
public bool autoSpawn = true;
}
public class BezierNodeData : MoveableObjectData
{
[JsonIgnore]
public ShipPathData shipPath;
public float controlPointsDistance;
}
}

View file

@ -0,0 +1,127 @@
using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace AtlasGridDataLibrary
{
public class ServerGrid_ServerOnlyData
{
public string LocalS3URL = "";
public string LocalS3AccessKeyId = "";
public string LocalS3SecretKey = "";
public string LocalS3BucketName = "";
public string LocalS3Region = "";
public TribeLogConfigInfo TribeLogConfig = new TribeLogConfigInfo();
public SharedLogConfigInfo SharedLogConfig = new SharedLogConfigInfo();
public BackupConfigInfo TravelDataConfig = new BackupConfigInfo();
public List<DatabaseConnectionInfo> DatabaseConnections = new List<DatabaseConnectionInfo>();
public static AtlasGridData LoadAbsolutePath(string Path)
{
AtlasGridData LoadedConfig = new AtlasGridData();
string JsonString = File.ReadAllText(Path);
LoadedConfig = JsonConvert.DeserializeObject<AtlasGridData>(JsonString);
return LoadedConfig;
}
//public static void SaveAbsolutePath(AtlasGridData config, string Path)
//{
// string JsonData = JsonConvert.SerializeObject(config, Formatting.Indented, new JsonSerializerSettings
// {
// NullValueHandling = NullValueHandling.Ignore
// });
// File.WriteAllText(Path, JsonData);
//}
}
public class SharedLogConfigData
{
[DefaultValue(60)]
public int FetchRateSec = 60;
[DefaultValue(900)]
public int SnapshotCleanupSec = 900;
[DefaultValue(1800)]
public int SnapshotRateSec = 1800;
[DefaultValue(48)]
public int SnapshotExpirationHours = 48;
}
public class BackupConfigInfo
{
[DefaultValue("off")]
public string BackupMode = "off";
[DefaultValue(10)]
public int MaxFileHistory = 10; // shared log and tribe log
[DefaultValue("")]
public string HttpBackupURL = "";
[DefaultValue("")]
public string HttpAPIKey = "";
[DefaultValue("")]
public string S3KeyPrefix = "";
public void CopyFrom(BackupConfigInfo In)
{
BackupMode = In.BackupMode;
MaxFileHistory = In.MaxFileHistory;
HttpBackupURL = In.HttpBackupURL;
HttpAPIKey = In.HttpAPIKey;
S3KeyPrefix = In.S3KeyPrefix;
}
}
public class TribeLogConfigInfo : BackupConfigInfo
{
[DefaultValue(1000)]
public int MaxRedisEntries = 1000;
public void CopyFrom(TribeLogConfigInfo In)
{
base.CopyFrom(In);
MaxRedisEntries = In.MaxRedisEntries;
}
}
public class SharedLogConfigInfo : BackupConfigInfo
{
[DefaultValue(60)]
public int FetchRateSec = 60;
[DefaultValue(900)]
public int SnapshotCleanupSec = 900;
[DefaultValue(1800)]
public int SnapshotRateSec = 1800;
[DefaultValue(48)]
public int SnapshotExpirationHours = 48;
public void CopyFrom(SharedLogConfigInfo In)
{
base.CopyFrom(In);
FetchRateSec = In.FetchRateSec;
SnapshotCleanupSec = In.SnapshotCleanupSec;
SnapshotRateSec = In.SnapshotRateSec;
SnapshotExpirationHours = In.SnapshotExpirationHours;
}
}
public class DatabaseConnectionInfo
{
public string Name = ""; //public string Name { get; set; }
public string URL = ""; //public string URL { get; set; }
public int Port = 0; //public int Port { get; set; }
public string Password = ""; //public string Password { get; set; }
}
}

View file

@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="Newtonsoft.Json" version="11.0.2" targetFramework="net451" />
</packages>

28
Src/ServerGridEditor.sln Normal file
View file

@ -0,0 +1,28 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 14
VisualStudioVersion = 14.0.25420.1
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ServerGridEditor", "ServerGridEditor\ServerGridEditor.csproj", "{9B3C74B8-57C2-4CF5-8BAD-C5C0D9123532}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AtlasGridDataLibrary", "AtlasGridDataLibrary\AtlasGridDataLibrary.csproj", "{8A276721-FE14-4414-8C0A-1B3ECC282195}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|x64 = Debug|x64
Release|x64 = Release|x64
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{9B3C74B8-57C2-4CF5-8BAD-C5C0D9123532}.Debug|x64.ActiveCfg = Debug|x64
{9B3C74B8-57C2-4CF5-8BAD-C5C0D9123532}.Debug|x64.Build.0 = Debug|x64
{9B3C74B8-57C2-4CF5-8BAD-C5C0D9123532}.Release|x64.ActiveCfg = Release|x64
{9B3C74B8-57C2-4CF5-8BAD-C5C0D9123532}.Release|x64.Build.0 = Release|x64
{8A276721-FE14-4414-8C0A-1B3ECC282195}.Debug|x64.ActiveCfg = Debug|Any CPU
{8A276721-FE14-4414-8C0A-1B3ECC282195}.Debug|x64.Build.0 = Debug|Any CPU
{8A276721-FE14-4414-8C0A-1B3ECC282195}.Release|x64.ActiveCfg = Release|Any CPU
{8A276721-FE14-4414-8C0A-1B3ECC282195}.Release|x64.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
EndGlobal

View file

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5.1"/>
</startup>
</configuration>

View file

@ -0,0 +1,54 @@
using System;
using System.Collections.Generic;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using AtlasGridDataLibrary;
namespace ServerGridEditor
{
public static class DiscoveryZoneInstanceEx
{
public static DiscoveryZoneData SetFrom(this DiscoveryZoneData Data, string name, float worldX, float worldY, float sizeX, float sizeY, float rotation, int id)
{
Data.name = name;
Data.worldX = worldX;
Data.worldY = worldY;
Data.rotation = rotation;
Data.id = id;
Data.sizeX = sizeX;
Data.sizeY = sizeY;
Data.xp = 0.0f;
Data.startWorldX = worldX;
Data.startWorldY = worldY;
Data.sizeZ = 40000.0f;
Data.explorerNoteIndex = 0;
Data.allowSea = false;
return Data;
}
public static Rectangle GetRect(this DiscoveryZoneData Data, Project currentProject)
{
if (currentProject == null)
return new Rectangle();
float relativeX = Data.sizeX * currentProject.coordsScaling;
float relativeY = Data.sizeY * currentProject.coordsScaling;
return new Rectangle((int)Math.Round(Data.worldX * currentProject.coordsScaling - relativeX / 2f), (int)Math.Round(Data.worldY * currentProject.coordsScaling - relativeY / 2f), (int)Math.Round(relativeX), (int)Math.Round(relativeY));
}
public static bool ContainsPoint(this DiscoveryZoneData Data, Point p, MainForm mainForm)
{
Rectangle Rect = Data.GetRect(mainForm.currentProject);
PointF rotatedP = StaticHelpers.RotatePointAround(p, new PointF(Rect.Left + Rect.Width / 2.0f, Rect.Top + Rect.Height / 2.0f), -Data.rotation);
p.X = (int)rotatedP.X;
p.Y = (int)rotatedP.Y;
return Rect.Contains(p);
}
}
}

View file

@ -0,0 +1,83 @@
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace ServerGridEditor
{
public class GlobalSettings
{
#region Singleton Access
private static GlobalSettings _Instance;
public static GlobalSettings Instance
{
get
{
if (_Instance == null)
{
_Instance = new GlobalSettings();
}
return _Instance;
}
}
#endregion
public string BaseDir
{
get
{
return Path.GetDirectoryName(System.Reflection.Assembly.GetEntryAssembly().Location) + "\\";//GetExecutingAssembly().Location) + "//";
}
}
public string ProjectsDir
{
get
{
return BaseDir + "Projects\\";
}
}
public string ExportDir
{
get
{
return BaseDir + "Export\\";
}
}
public string BaseRepositoryDir
{
get
{
return BaseDir + "..\\..\\";
}
}
public string GameDir
{
get
{
return BaseRepositoryDir + "Projects\\ShooterGame\\";
}
}
public string GameMapsDir
{
get
{
return GameDir + "Content\\Maps\\";
}
}
public string GameSeamlessMapsDir
{
get
{
return GameDir + "Content\\Maps\\SeamlessTest\\";
}
}
}
}

View file

@ -0,0 +1,192 @@
using System;
using System.Collections.Generic;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.IO;
using System.Windows.Forms;
using System.ComponentModel;
using Newtonsoft.Json;
using AtlasGridDataLibrary;
namespace ServerGridEditor
{
public class Island
{
public string name;
public float x, y;
public string imagePath;
[DefaultValue(-1)]
[JsonProperty(DefaultValueHandling = DefaultValueHandling.Populate)]
public int landscapeMaterialOverride;
public List<string> sublevelNames;
public Dictionary<string, string> spawnerOverrides = new Dictionary<string, string>();
public List<string> extraSublevels;
[DefaultValue(-1.0f)]
[JsonProperty(DefaultValueHandling = DefaultValueHandling.Populate)]
public float minTreasureQuality;
[DefaultValue(-1.0f)]
[JsonProperty(DefaultValueHandling = DefaultValueHandling.Populate)]
public float maxTreasureQuality;
[DefaultValue(false)]
[JsonProperty(DefaultValueHandling = DefaultValueHandling.Populate)]
public bool useNpcVolumesForTreasures = false;
[DefaultValue(true)]
[JsonProperty(DefaultValueHandling = DefaultValueHandling.Populate)]
public bool useLevelBoundsForTreasures = true;
[DefaultValue(false)]
[JsonProperty(DefaultValueHandling = DefaultValueHandling.Populate)]
public bool prioritizeVolumesForTreasures = false;
[DefaultValue("")]
[JsonProperty(DefaultValueHandling = DefaultValueHandling.Populate)]
public string islandTreasureBottleSupplyCrateOverrides = "";
Image cachedImg = null;
Image cachedOptimizedImg = null;
public Image GetImage(bool optimized = false)
{
if (cachedImg == null)
{
if (File.Exists(imagePath))
cachedImg = Image.FromFile(imagePath);
else
{
MessageBox.Show("Could not find image (Setting to blank image):" + imagePath, "Missing Image Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
Bitmap bmp = new Bitmap(78, 78);
cachedImg = Image.FromHbitmap(bmp.GetHbitmap());
}
}
if(optimized)
{
if (cachedOptimizedImg == null)
{
if (File.Exists(imagePath))
{
cachedOptimizedImg = Image.FromFile(imagePath);
Bitmap bmp = new Bitmap(cachedOptimizedImg, cachedOptimizedImg.Width / 16, cachedOptimizedImg.Height / 16);
cachedOptimizedImg = (Image)bmp;
}
}
if (cachedOptimizedImg != null)
return cachedOptimizedImg;
}
return cachedImg;
}
public void InvalidateImage()
{
if (cachedImg != null)
cachedImg.Dispose();
cachedImg = null;
if (cachedOptimizedImg != null)
cachedOptimizedImg.Dispose();
cachedOptimizedImg = null;
}
public Island(string name, float x, float y, string imagePath, int landscapeMaterialOverride
, List<string> sublevelNames, Dictionary<string, string> spawnerOverrides, float minTreasureQuality, float maxTreasureQuality, bool useNpcVolumesForTreasures,
bool useLevelBoundsForTreasures, bool prioritizeVolumesForTreasures, string IslandTreasureBottleSupplyCrateOverrides, List<string> extraSublevels)
{
this.name = name;
this.x = x;
this.y = y;
this.imagePath = imagePath;
this.landscapeMaterialOverride = landscapeMaterialOverride;
this.sublevelNames = sublevelNames;
this.spawnerOverrides = spawnerOverrides;
this.minTreasureQuality = minTreasureQuality;
this.maxTreasureQuality = maxTreasureQuality;
this.useNpcVolumesForTreasures = useNpcVolumesForTreasures;
this.useLevelBoundsForTreasures = useLevelBoundsForTreasures;
this.prioritizeVolumesForTreasures = prioritizeVolumesForTreasures;
this.islandTreasureBottleSupplyCrateOverrides = IslandTreasureBottleSupplyCrateOverrides;
this.extraSublevels = extraSublevels;
}
}
public static class IslandInstanceEx
{
public static IslandInstanceData SetFrom(this IslandInstanceData Data, string name, float worldX, float worldY, float rotation, int id)
{
Data.name = name;
Data.worldX = worldX;
Data.worldY = worldY;
Data.rotation = rotation;
Data.id = id;
Data.spawnerOverrides = new Dictionary<string, string>();
Data.minTreasureQuality = Data.maxTreasureQuality = -1;
Data.spawnPointRegionOverride = -1;
Data.finalNPCLevelMultiplier = 1.0f;
Data.instanceTreasureQualityMultiplier = 1.0f;
Data.instanceTreasureQualityAddition = 0.0f;
Data.finalNPCLevelOffset = 0;
Data.IslandInstanceCustomDatas1 = "";
Data.IslandInstanceCustomDatas2 = "";
Data.IslandInstanceClientCustomDatas1 = "";
Data.IslandInstanceClientCustomDatas2 = "";
return Data;
}
public static Island GetReferencedIsland(this IslandInstanceData Data, IDictionary<string, Island> islands)
{
if (!islands.ContainsKey(Data.name))
return null;
return islands[Data.name];
}
public static Rectangle GetRect(this IslandInstanceData Data, Project currentProject, IDictionary<string, Island> islands)
{
if (currentProject == null)
return new Rectangle();
Island referencedIsland = Data.GetReferencedIsland(islands);
float relativeX = referencedIsland.x * currentProject.coordsScaling;
float relativeY = referencedIsland.y * currentProject.coordsScaling;
return new Rectangle((int)Math.Round(Data.worldX * currentProject.coordsScaling - relativeX / 2f), (int)Math.Round(Data.worldY * currentProject.coordsScaling - relativeY / 2f), (int)Math.Round(relativeX), (int)Math.Round(relativeY));
}
public static bool ContainsPoint(this IslandInstanceData Data, Point p, MainForm mainForm)
{
Rectangle Rect = Data.GetRect(mainForm.currentProject, mainForm.islands);
PointF rotatedP = StaticHelpers.RotatePointAround(p, new PointF(Rect.Left + Rect.Width / 2.0f, Rect.Top + Rect.Height / 2.0f), -Data.rotation);
p.X = (int)rotatedP.X;
p.Y = (int)rotatedP.Y;
return Rect.Contains(p);
}
//Removes overrides with the same value as template
public static void SyncOverridesWithTemplates(this IslandInstanceData Data, MainForm mainForm)
{
Island referencedIsland = Data.GetReferencedIsland(mainForm.islands);
if (referencedIsland.spawnerOverrides == null)
return;
List<string> keysToRemove = new List<string>();
foreach (KeyValuePair<string, string> templateSpawnerOverride in referencedIsland.spawnerOverrides)
{
if (Data.spawnerOverrides.ContainsKey(templateSpawnerOverride.Key) && Data.spawnerOverrides[templateSpawnerOverride.Key] == templateSpawnerOverride.Value)
{
keysToRemove.Add(templateSpawnerOverride.Key);
}
}
foreach (string keyToRemove in keysToRemove)
{
Data.spawnerOverrides.Remove(keyToRemove);
}
}
}
}

View file

@ -0,0 +1,119 @@
using AtlasGridDataLibrary;
using System;
using System.Collections.Generic;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace ServerGridEditor
{
public static class MoveableObjectEx
{
public static Server GetCurrentServer(this MoveableObjectData Data, MainForm mainForm)
{
return mainForm.GetServerAtPoint(mainForm.UnrealToMapPoint(new PointF(Data.worldX, Data.worldY)));
}
public static void SetWorldLocation(this MoveableObjectData Data, MainForm mainForm, PointF NewLoc, bool preventDirtying = false)
{
Project currentProject = mainForm.currentProject;
float OriginalX = Data.worldX;
float OriginalY = Data.worldY;
Data.worldX = NewLoc.X;
Data.worldY = NewLoc.Y;
//Clamp to map
float maxWorldX = currentProject.numOfCellsX * currentProject.cellSize;
float maxWorldY = currentProject.numOfCellsY * currentProject.cellSize;
RectangleF Bounds = Data.GetBoundingBox(mainForm);
Bounds.X /= currentProject.coordsScaling;
Bounds.Y /= currentProject.coordsScaling;
Bounds.Width /= currentProject.coordsScaling;
Bounds.Height /= currentProject.coordsScaling;
RectangleF MapArea = new RectangleF(0, 0, maxWorldX, maxWorldY);
RectangleF AreaInMap = RectangleF.Intersect(Bounds, MapArea);
PointF BoundsCenter = new PointF(Bounds.X + Bounds.Width / 2f, Bounds.Y + Bounds.Height / 2f);
PointF MapCenter = new PointF(MapArea.X + MapArea.Width / 2f, MapArea.Y + MapArea.Height / 2f);
if ((int)AreaInMap.Width < (int)Bounds.Width)
{
float clippedWidth = Bounds.Width - AreaInMap.Width;
if (BoundsCenter.X < MapCenter.X)
Data.worldX += clippedWidth; // Clipped from the left
else
Data.worldX -= clippedWidth;
}
if ((int)AreaInMap.Height < (int)Bounds.Height)
{
float clippedHeight = Bounds.Height - AreaInMap.Height;
if (BoundsCenter.Y < MapCenter.Y)
Data.worldY += clippedHeight; // Clipped from the Right
else
Data.worldY -= clippedHeight;
}
//Clamp center as well to avoid overshooting from the bounds clamping
Data.worldX = Math.Max(0, Math.Min(maxWorldX, Data.worldX));
Data.worldY = Math.Max(0, Math.Min(maxWorldY, Data.worldY));
if (!preventDirtying && (Math.Abs(Data.worldX - OriginalX) > 0.01f || Math.Abs(Data.worldY - OriginalY) > 0.01f))
Data.SetDirty(mainForm);
}
public static PointF GetMapLocation(this MoveableObjectData Data, MainForm mainForm)
{
return mainForm.UnrealToMapPoint(new PointF(Data.worldX, Data.worldY));
}
public static void SetDirty(this MoveableObjectData Data, MainForm mainForm)
{
Data.GetCurrentServer(mainForm).SetDirty();
}
public static Rectangle GetRect(this MoveableObjectData Data, MainForm mainForm)
{
if (Data is BezierNodeData)
return ((BezierNodeData)Data).GetRect(mainForm.currentProject);
else if (Data is DiscoveryZoneData)
return ((DiscoveryZoneData)Data).GetRect(mainForm.currentProject);
else if (Data is IslandInstanceData)
return ((IslandInstanceData)Data).GetRect(mainForm.currentProject, mainForm.islands);
return new Rectangle();
}
public static Rectangle GetBoundingBox(this MoveableObjectData Data, MainForm mainForm)
{
Rectangle Rect = Data.GetRect(mainForm/*.currentProject*/);
//Collect corner points
Point TopLeft = Rect.Location;
Point TopRight = new Point(Rect.Location.X + Rect.Width, Rect.Location.Y);
Point BottomLeft = new Point(Rect.Location.X, Rect.Location.Y + Rect.Height);
Point BottomRight = new Point(Rect.Location.X + Rect.Width, Rect.Location.Y + Rect.Height);
//Rotate corner points
PointF Center = new PointF(Rect.Location.X + Rect.Width / 2f, Rect.Location.Y + Rect.Height / 2f);
TopLeft = Point.Round(StaticHelpers.RotatePointAround(TopLeft, Center, Data.rotation));
TopRight = Point.Round(StaticHelpers.RotatePointAround(TopRight, Center, Data.rotation));
BottomLeft = Point.Round(StaticHelpers.RotatePointAround(BottomLeft, Center, Data.rotation));
BottomRight = Point.Round(StaticHelpers.RotatePointAround(BottomRight, Center, Data.rotation));
int minX = Math.Min(TopLeft.X, Math.Min(TopRight.X, Math.Min(BottomLeft.X, BottomRight.X)));
int maxX = Math.Max(TopLeft.X, Math.Max(TopRight.X, Math.Max(BottomLeft.X, BottomRight.X)));
int minY = Math.Min(TopLeft.Y, Math.Min(TopRight.Y, Math.Min(BottomLeft.Y, BottomRight.Y)));
int maxY = Math.Max(TopLeft.Y, Math.Max(TopRight.Y, Math.Max(BottomLeft.Y, BottomRight.Y)));
return new Rectangle(minX, minY, maxX - minX, maxY - minY);
}
}
}

View file

@ -0,0 +1,22 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace ServerGridEditor
{
static class Program
{
/// <summary>
/// The main entry point for the application.
/// </summary>
[STAThread]
static void Main()
{
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
Application.Run(new MainForm());
}
}
}

View file

@ -0,0 +1,718 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Newtonsoft.Json;
using System.Drawing;
using System.Windows.Forms;
using System.ComponentModel;
using System.IO;
using AtlasGridDataLibrary;
namespace ServerGridEditor
{
class ConfigKeyValueEntry
{
public ConfigKeyValueEntry(string InKey, string InValue)
{
Key = InKey;
Value = InValue;
}
public string Key { get; set; }
public string Value { get; set; }
}
public static class ServerSerializationObjectEx
{
public static ServerData SetFrom(this ServerData Data, Server server, float gridSize, int gridX, int gridY, string MachineIdTag, string ip, int port,
int gamePort, int seamlessDataPort, List<SublevelSerializationObject> sublevels, List<IslandInstanceData> islandInstances, List<DiscoveryZoneData> discoZones, List<SpawnRegionData> spawnRegions,
bool isHomeServer, string AdditionalCmdLineParams, Dictionary<string, string> OverrideShooterGameModeDefaultGameIni, string name, int floorZDist, int transitionMinZ, int utcOffset, string OceanDinoDepthEntriesOverride,
string OceanFloatsamCratesOverride, string TreasureMapLootTablesOverride, DateTime lastModified, DateTime lastImageOverride, string GlobalBiomeSeamlessServerGridPreOffsetValues, string GlobalBiomeSeamlessServerGridPreOffsetValuesOceanWater,
bool islandLocked, bool discoLocked, bool pathsLocked, List<string> extraSublevels, string oceanEpicSpawnEntriesOverrideTemplateName, string NPCShipSpawnEntriesOverrideTemplateName, string regionOverrides,
float waterColorR, float waterColorG, float waterColorB, int skyStyleIndex, string ServerCustomDatas1, string ServerCustomDatas2, string ClientCustomDatas1, string ClientCustomDatas2, string serverTemplateName, string OceanEpicSpawnEntriesOverrideValues)
{
Data.gridX = gridX;
Data.gridY = gridY;
Data.MachineIdTag = MachineIdTag;
Data.ip = ip;
Data.port = port;
Data.gamePort = gamePort;
Data.seamlessDataPort = seamlessDataPort;
Data.sublevels = sublevels;
Data.islandInstances = islandInstances == null ? new List<IslandInstanceData>() : islandInstances;
Data.isHomeServer = isHomeServer;
Data.AdditionalCmdLineParams = AdditionalCmdLineParams;
Data.OverrideShooterGameModeDefaultGameIni = OverrideShooterGameModeDefaultGameIni;
Data.floorZDist = floorZDist;
Data.transitionMinZ = transitionMinZ;
Data.utcOffset = utcOffset;
Data.OceanDinoDepthEntriesOverride = OceanDinoDepthEntriesOverride;
Data.OceanEpicSpawnEntriesOverrideValues = OceanEpicSpawnEntriesOverrideValues;
Data.oceanEpicSpawnEntriesOverrideTemplateName = oceanEpicSpawnEntriesOverrideTemplateName;
Data.NPCShipSpawnEntriesOverrideTemplateName = NPCShipSpawnEntriesOverrideTemplateName;
Data.regionOverrides = regionOverrides;
Data.waterColorR = waterColorR;
Data.waterColorG = waterColorG;
Data.waterColorB = waterColorB;
Data.skyStyleIndex = skyStyleIndex;
Data.ServerCustomDatas1 = ServerCustomDatas1;
Data.ServerCustomDatas2 = ServerCustomDatas2;
Data.ClientCustomDatas1 = ClientCustomDatas1;
Data.ClientCustomDatas2 = ClientCustomDatas2;
Data.oceanFloatsamCratesOverride = OceanFloatsamCratesOverride;
Data.treasureMapLootTablesOverride = TreasureMapLootTablesOverride;
Data.lastModified = lastModified;
Data.lastImageOverride = lastImageOverride;
Data.GlobalBiomeSeamlessServerGridPreOffsetValues = GlobalBiomeSeamlessServerGridPreOffsetValues;
Data.GlobalBiomeSeamlessServerGridPreOffsetValuesOceanWater = GlobalBiomeSeamlessServerGridPreOffsetValuesOceanWater;
if (name != null)
Data.name = name;
Data.discoZones = discoZones == null ? new List<DiscoveryZoneData>() : discoZones;
Data.islandLocked = islandLocked;
Data.discoLocked = discoLocked;
Data.pathsLocked = pathsLocked;
Data.spawnRegions = spawnRegions == null ? new List<SpawnRegionData>() : spawnRegions;
Data.extraSublevels = extraSublevels;
Data.serverTemplateName = serverTemplateName;
return Data;
}
public static ServerData SetFrom(this ServerData Data, Server server, float gridSize, int gridX, int gridY, string MachineIdTag, string ip, int port,
int gamePort, int seamlessDataPort, List<IslandInstanceData> islandInstances, List<DiscoveryZoneData> discoZones, List<SpawnRegionData> spawnRegions, MainForm mainForm,
bool isHomeServer, string AdditionalCmdLineParams, Dictionary<string, string> OverrideShooterGameModeDefaultGameIni, string name, int floorZDist, int transitionMinZ, int utcOffset, string OceanDinoDepthEntriesOverride,
string OceanFloatsamCratesOverride, string TreasureMapLootTablesOverride, DateTime lastModified, DateTime lastImageOverride, string GlobalBiomeSeamlessServerGridPreOffsetValues, string GlobalBiomeSeamlessServerGridPreOffsetValuesOceanWater,
bool islandLocked, bool discoLocked, bool pathsLocked, List<string> extraSublevels, string oceanEpicSpawnEntriesOverrideTemplateName, string NPCShipSpawnEntriesOverrideTemplateName, string regionOverrides,
float waterColorR, float waterColorG, float waterColorB, int skyStyleIndex, string ServerCustomDatas1, string ServerCustomDatas2, string ClientCustomDatas1, string ClientCustomDatas2, string serverTemplateName, string OceanEpicSpawnEntriesOverrideValues)
{
Data.gridX = gridX;
Data.gridY = gridY;
Data.MachineIdTag = MachineIdTag;
Data.ip = ip;
Data.port = port;
Data.gamePort = gamePort;
Data.seamlessDataPort = seamlessDataPort;
Data.islandInstances = islandInstances;
Data.discoZones = discoZones;
Data.spawnRegions = spawnRegions;
Data.isHomeServer = isHomeServer;
Data.AdditionalCmdLineParams = AdditionalCmdLineParams;
Data.OverrideShooterGameModeDefaultGameIni = OverrideShooterGameModeDefaultGameIni;
Data.name = name;
Data.floorZDist = floorZDist;
Data.transitionMinZ = transitionMinZ;
Data.utcOffset = utcOffset;
Data.OceanDinoDepthEntriesOverride = OceanDinoDepthEntriesOverride;
Data.OceanEpicSpawnEntriesOverrideValues = OceanEpicSpawnEntriesOverrideValues;
Data.oceanEpicSpawnEntriesOverrideTemplateName = oceanEpicSpawnEntriesOverrideTemplateName;
Data.NPCShipSpawnEntriesOverrideTemplateName = NPCShipSpawnEntriesOverrideTemplateName;
Data.regionOverrides = regionOverrides;
Data.waterColorR = waterColorR;
Data.waterColorG = waterColorG;
Data.waterColorB = waterColorB;
Data.skyStyleIndex = skyStyleIndex;
Data.ServerCustomDatas1 = ServerCustomDatas1;
Data.ServerCustomDatas2 = ServerCustomDatas2;
Data.ClientCustomDatas1 = ClientCustomDatas1;
Data.ClientCustomDatas2 = ClientCustomDatas2;
Data.oceanFloatsamCratesOverride = OceanFloatsamCratesOverride;
Data.treasureMapLootTablesOverride = TreasureMapLootTablesOverride;
Data.lastModified = lastModified;
Data.lastImageOverride = lastImageOverride;
Data.GlobalBiomeSeamlessServerGridPreOffsetValues = GlobalBiomeSeamlessServerGridPreOffsetValues;
Data.GlobalBiomeSeamlessServerGridPreOffsetValuesOceanWater = GlobalBiomeSeamlessServerGridPreOffsetValuesOceanWater;
Data.islandLocked = islandLocked;
Data.discoLocked = discoLocked;
Data.pathsLocked = pathsLocked;
Data.extraSublevels = extraSublevels;
Data.serverTemplateName = serverTemplateName;
Data.totalExtraSublevels = new List<string>();
foreach (IslandInstanceData instance in islandInstances)
{
PointF relativePoint = server.WorldToRelativePoint(gridSize, new PointF(instance.worldX, instance.worldY));
Island referencedIsland = instance.GetReferencedIsland(mainForm.islands);
if (referencedIsland != null)
{
foreach (string sublevelName in referencedIsland.sublevelNames)
Data.sublevels.Add(new SublevelSerializationObject() { name = sublevelName, id = instance.id, additionalTranslationX = relativePoint.X, additionalTranslationY = relativePoint.Y, additionalRotationYaw = instance.rotation, landscapeMaterialOverride = referencedIsland.landscapeMaterialOverride });
instance.minTreasureQuality = referencedIsland.minTreasureQuality;
instance.maxTreasureQuality = referencedIsland.maxTreasureQuality;
instance.useNpcVolumesForTreasures = referencedIsland.useNpcVolumesForTreasures;
instance.islandTreasureBottleSupplyCrateOverrides = referencedIsland.islandTreasureBottleSupplyCrateOverrides;
//instance.spawnPointRegionOverride = referencedIsland.spawnPointRegionOverride;
instance.useLevelBoundsForTreasures = referencedIsland.useLevelBoundsForTreasures;
instance.prioritizeVolumesForTreasures = referencedIsland.prioritizeVolumesForTreasures;
}
instance.SyncOverridesWithTemplates(mainForm);
//Add the template spawner overrides if not already existing in the island
if (referencedIsland.spawnerOverrides != null)
foreach (KeyValuePair<string, string> spawnerOverride in referencedIsland.spawnerOverrides)
{
if (!instance.spawnerOverrides.ContainsKey(spawnerOverride.Key))
{
instance.spawnerOverrides.Add(spawnerOverride.Key, spawnerOverride.Value);
}
}
if (referencedIsland.extraSublevels != null)
foreach (string extraSublevel in referencedIsland.extraSublevels)
if (!Data.totalExtraSublevels.Contains(extraSublevel) && !string.IsNullOrWhiteSpace(extraSublevel))
Data.totalExtraSublevels.Add(extraSublevel);
}
if (extraSublevels != null)
foreach (string extraSublevel in extraSublevels)
if (!Data.totalExtraSublevels.Contains(extraSublevel) && !string.IsNullOrWhiteSpace(extraSublevel))
Data.totalExtraSublevels.Add(extraSublevel);
return Data;
}
}
public static class ServerGrid_ServerOnlyDataEx
{
public static ServerGrid_ServerOnlyData SetFromProject(this ServerGrid_ServerOnlyData Data, Project InProject)
{
Data.LocalS3URL = InProject.LocalS3URL;
Data.LocalS3AccessKeyId = InProject.LocalS3AccessKeyId;
Data.LocalS3SecretKey = InProject.LocalS3SecretKey;
Data.LocalS3BucketName = InProject.LocalS3BucketName;
Data.LocalS3Region = InProject.LocalS3Region;
Data.TribeLogConfig = InProject.TribeLogConfig;
Data.SharedLogConfig = InProject.SharedLogConfig;
Data.TravelDataConfig = InProject.TravelDataConfig;
Data.DatabaseConnections = InProject.DatabaseConnections;
return Data;
}
}
public static class ProjectSerializationObjectEx
{
public static AtlasGridData SetFromData(this AtlasGridData Data, float gridSize, List<Server> serverList, List<IslandInstanceData> islandInstances, List<DiscoveryZoneData> discoZones, List<SpawnRegionData> spawnRegions,
string WorldAtlasId, string WorldFriendlyName, string MetaWorldURL, float coordsScaling, bool showServerInfo, bool showLines, bool alphaBackground, bool showBackground, string backgroundImgPath,
MainForm mainForm, int idGenerator, int regionsIdGenerator, List<SpawnerInfoData> spawnerOverrideTemplates, bool bUseUTCTime, string Day0, float globalTransitionMinZ, string AdditionalCmdLineParams,
Dictionary<string, string> OverrideShooterGameModeDefaultGameIni, DateTime lastImageOverride, bool showDiscoZoneInfo, string discoZonesImagePath, List<ShipPathData> shipPaths, int shipPathsIdGenerator,
bool showShipPathsInfo, string modIDs, bool showIslandNames, bool exportPngs, bool showForeground, string foregroundImgPath, string globalGameplaySetup,
List<ServerTemplateData> serverTemplates, bool bIsFinalExport, string MapImageURL,string AuthListURL,
string WorldAtlasPassword, float columnUTCOffset)
{
Data.gridSize = gridSize;
foreach (Server server in serverList)
{
List<IslandInstanceData> serverIslands = new List<IslandInstanceData>();
foreach (IslandInstanceData instance in islandInstances)
{
if (server.IsWorldPointInServer(new System.Drawing.PointF(instance.worldX, instance.worldY), gridSize))
serverIslands.Add(instance);
}
List<DiscoveryZoneData> serverDiscos = new List<DiscoveryZoneData>();
foreach (DiscoveryZoneData instance in discoZones)
{
if (server.IsWorldPointInServer(new System.Drawing.PointF(instance.worldX, instance.worldY), gridSize))
serverDiscos.Add(instance);
}
List<SpawnRegionData> serverSpawnRegions = new List<SpawnRegionData>();
foreach (SpawnRegionData region in spawnRegions)
{
if (server.gridX == region.X && server.gridY == region.Y)
serverSpawnRegions.Add(region);
}
if(!bIsFinalExport)
{
Data.servers.Add(new ServerData().SetFrom(server, gridSize, server.gridX, server.gridY, server.MachineIdTag, server.ip, server.port,
server.gamePort, server.seamlessDataPort, serverIslands, serverDiscos, serverSpawnRegions, mainForm, server.isHomeServer, server.AdditionalCmdLineParams, server.OverrideShooterGameModeDefaultGameIni, server.name, server.floorZDist,
server.transitionMinZ, server.utcOffset, server.OceanDinoDepthEntriesOverride, server.oceanFloatsamCratesOverride,
server.treasureMapLootTablesOverride, server.lastModifiedUTC, server.lastImageOverrideUTC, server.GlobalBiomeSeamlessServerGridPreOffsetValues, server.GlobalBiomeSeamlessServerGridPreOffsetValuesOceanWater,
server.islandLocked, server.discoLocked, server.pathsLocked, server.extraSublevels, server.oceanEpicSpawnEntriesOverrideTemplateName, server.NPCShipSpawnEntriesOverrideTemplateName, server.regionOverrides,
server.waterColorR, server.waterColorG, server.waterColorB, server.skyStyleIndex, server.ServerCustomDatas1, server.ServerCustomDatas2, server.ClientCustomDatas1, server.ClientCustomDatas2, server.serverTemplateName, server.OceanEpicSpawnEntriesOverrideValues));
}
else
{
//Sublevels need to be overridden here to be processed in the constructor
List<string> overridenExtraSublevels = server.extraSublevels;
if (!string.IsNullOrEmpty(server.serverTemplateName))
{
ServerTemplateData serverTemplate = mainForm.currentProject.GetServerTemplateByName(server.serverTemplateName);
if (serverTemplate != null && server.extraSublevels.Count == 0)
overridenExtraSublevels = serverTemplate.extraSublevels;
}
//ServerSerializationObject exportServerObj = new ServerSerializationObject(server, gridSize, server.gridX, server.gridY, server.MachineIdTag, server.ip, server.port,
ServerData exportServerObj = new ServerData().SetFrom(server, gridSize, server.gridX, server.gridY, server.MachineIdTag, server.ip, server.port,
server.gamePort, server.seamlessDataPort, serverIslands, serverDiscos, serverSpawnRegions, mainForm, server.isHomeServer, server.AdditionalCmdLineParams, server.OverrideShooterGameModeDefaultGameIni, server.name, server.floorZDist,
server.transitionMinZ, server.utcOffset, server.OceanDinoDepthEntriesOverride, server.oceanFloatsamCratesOverride,
server.treasureMapLootTablesOverride, server.lastModifiedUTC, server.lastImageOverrideUTC, server.GlobalBiomeSeamlessServerGridPreOffsetValues, server.GlobalBiomeSeamlessServerGridPreOffsetValuesOceanWater,
server.islandLocked, server.discoLocked, server.pathsLocked, overridenExtraSublevels, server.oceanEpicSpawnEntriesOverrideTemplateName, server.NPCShipSpawnEntriesOverrideTemplateName, server.regionOverrides,
server.waterColorR, server.waterColorG, server.waterColorB, server.skyStyleIndex, server.ServerCustomDatas1, server.ServerCustomDatas2, server.ClientCustomDatas1, server.ClientCustomDatas2, server.serverTemplateName, server.OceanEpicSpawnEntriesOverrideValues);
//Apply template
if(!string.IsNullOrEmpty(server.serverTemplateName))
{
ServerTemplateData serverTemplate = mainForm.currentProject.GetServerTemplateByName(server.serverTemplateName);
if(serverTemplate != null)
{
//Overrides
exportServerObj.floorZDist = server.floorZDist != 0 ? server.floorZDist : serverTemplate.floorZDist;
exportServerObj.transitionMinZ = server.transitionMinZ != 0 ? server.transitionMinZ : serverTemplate.transitionMinZ;
exportServerObj.oceanEpicSpawnEntriesOverrideTemplateName = !string.IsNullOrEmpty(server.oceanEpicSpawnEntriesOverrideTemplateName) ? server.oceanEpicSpawnEntriesOverrideTemplateName : serverTemplate.oceanEpicSpawnEntriesOverrideTemplateName;
exportServerObj.NPCShipSpawnEntriesOverrideTemplateName = !string.IsNullOrEmpty(server.NPCShipSpawnEntriesOverrideTemplateName) ? server.NPCShipSpawnEntriesOverrideTemplateName : serverTemplate.NPCShipSpawnEntriesOverrideTemplateName;
exportServerObj.waterColorR = server.waterColorR != 0 ? server.waterColorR : serverTemplate.waterColorR;
exportServerObj.waterColorG = server.waterColorG != 0 ? server.waterColorG : serverTemplate.waterColorG;
exportServerObj.waterColorB = server.waterColorB != 0 ? server.waterColorB : serverTemplate.waterColorB;
exportServerObj.skyStyleIndex = server.skyStyleIndex != 0 ? server.skyStyleIndex : serverTemplate.skyStyleIndex;
exportServerObj.GlobalBiomeSeamlessServerGridPreOffsetValues = !string.IsNullOrEmpty(server.GlobalBiomeSeamlessServerGridPreOffsetValues) ? server.GlobalBiomeSeamlessServerGridPreOffsetValues : serverTemplate.GlobalBiomeSeamlessServerGridPreOffsetValues;
exportServerObj.GlobalBiomeSeamlessServerGridPreOffsetValuesOceanWater = !string.IsNullOrEmpty(server.GlobalBiomeSeamlessServerGridPreOffsetValuesOceanWater) ? server.GlobalBiomeSeamlessServerGridPreOffsetValuesOceanWater : serverTemplate.GlobalBiomeSeamlessServerGridPreOffsetValuesOceanWater;
exportServerObj.OceanDinoDepthEntriesOverride = !string.IsNullOrEmpty(server.OceanDinoDepthEntriesOverride) ? server.OceanDinoDepthEntriesOverride : serverTemplate.OceanDinoDepthEntriesOverride;
exportServerObj.OceanEpicSpawnEntriesOverrideValues = !string.IsNullOrEmpty(server.OceanEpicSpawnEntriesOverrideValues) ? server.OceanEpicSpawnEntriesOverrideValues : serverTemplate.OceanEpicSpawnEntriesOverrideValues;
exportServerObj.oceanFloatsamCratesOverride = !string.IsNullOrEmpty(server.oceanFloatsamCratesOverride) ? server.oceanFloatsamCratesOverride : serverTemplate.oceanFloatsamCratesOverride;
exportServerObj.treasureMapLootTablesOverride = !string.IsNullOrEmpty(server.treasureMapLootTablesOverride) ? server.treasureMapLootTablesOverride : serverTemplate.treasureMapLootTablesOverride;
exportServerObj.regionOverrides = !string.IsNullOrEmpty(server.regionOverrides) ? server.regionOverrides : serverTemplate.regionOverrides;
//Appends
exportServerObj.AdditionalCmdLineParams = exportServerObj.AdditionalCmdLineParams + serverTemplate.AdditionalCmdLineParams;
foreach (KeyValuePair<string, string> kvp in serverTemplate.OverrideShooterGameModeDefaultGameIni)
if (!exportServerObj.OverrideShooterGameModeDefaultGameIni.ContainsKey(kvp.Key))
exportServerObj.OverrideShooterGameModeDefaultGameIni.Add(kvp.Key, kvp.Value);
//Splice these together cleanly:
if (!string.IsNullOrWhiteSpace(exportServerObj.ServerCustomDatas1))
exportServerObj.ServerCustomDatas1 = exportServerObj.ServerCustomDatas1.TrimEnd(',');
if (!string.IsNullOrWhiteSpace(exportServerObj.ServerCustomDatas2))
exportServerObj.ServerCustomDatas2 = exportServerObj.ServerCustomDatas2.TrimEnd(',');
if (!string.IsNullOrWhiteSpace(exportServerObj.ClientCustomDatas1))
exportServerObj.ClientCustomDatas1 = exportServerObj.ClientCustomDatas1.TrimEnd(',');
if (!string.IsNullOrWhiteSpace(exportServerObj.ClientCustomDatas2))
exportServerObj.ClientCustomDatas2 = exportServerObj.ClientCustomDatas2.TrimEnd(',');
if (!string.IsNullOrWhiteSpace(serverTemplate.ServerCustomDatas1))
exportServerObj.ServerCustomDatas1 = exportServerObj.ServerCustomDatas1 + "," + serverTemplate.ServerCustomDatas1.TrimStart(',');
if (!string.IsNullOrWhiteSpace(serverTemplate.ServerCustomDatas2))
exportServerObj.ServerCustomDatas2 = exportServerObj.ServerCustomDatas2 + "," + serverTemplate.ServerCustomDatas2.TrimStart(',');
if (!string.IsNullOrWhiteSpace(serverTemplate.ClientCustomDatas1))
exportServerObj.ClientCustomDatas1 = exportServerObj.ClientCustomDatas1 + "," + serverTemplate.ClientCustomDatas1.TrimStart(',');
if (!string.IsNullOrWhiteSpace(serverTemplate.ClientCustomDatas2))
exportServerObj.ClientCustomDatas2 = exportServerObj.ClientCustomDatas2 + "," + serverTemplate.ClientCustomDatas2.TrimStart(',');
}
}
Data.servers.Add(exportServerObj);
}
}
Data.MetaWorldURL = MetaWorldURL;
Data.WorldFriendlyName = WorldFriendlyName;
Data.WorldAtlasId = WorldAtlasId;
Data.coordsScaling = coordsScaling;
Data.showServerInfo = showServerInfo;
Data.showDiscoZoneInfo = showDiscoZoneInfo;
Data.showShipPathsInfo = showShipPathsInfo;
Data.showLines = showLines;
Data.alphaBackground = alphaBackground;
Data.showBackground = showBackground;
Data.showForeground = showForeground;
Data.backgroundImgPath = backgroundImgPath;
Data.foregroundImgPath = foregroundImgPath;
Data.idGenerator = idGenerator;
Data.regionsIdGenerator = regionsIdGenerator;
Data.spawnerOverrideTemplates = spawnerOverrideTemplates;
Data.bUseUTCTime = bUseUTCTime;
Data.columnUTCOffset = columnUTCOffset;
Data.globalTransitionMinZ = globalTransitionMinZ;
Data.AdditionalCmdLineParams = AdditionalCmdLineParams;
Data.OverrideShooterGameModeDefaultGameIni = OverrideShooterGameModeDefaultGameIni;
Data.Day0 = Day0;
Data.discoZonesImagePath = discoZonesImagePath;
Data.lastImageOverride = lastImageOverride;
Data.ModIDs = modIDs;
Data.MapImageURL = MapImageURL;
Data.AuthListURL = AuthListURL;
if(shipPaths != null)
Data.shipPaths = shipPaths;
Data.shipPathsIdGenerator = shipPathsIdGenerator;
Data.showIslandNames = showIslandNames;
Data.exportPngs = exportPngs;
Data.globalGameplaySetup = globalGameplaySetup;
if (serverTemplates == null)
serverTemplates = new List<ServerTemplateData>();
Data.serverTemplates = serverTemplates.ToList();
Data.WorldAtlasPassword = WorldAtlasPassword;
return Data;
}
}
public class Project
{
public bool successfullyLoaded;
public List<IslandInstanceData> islandInstances = new List<IslandInstanceData>();
public List<Server> servers = new List<Server>();
public List<DiscoveryZoneData> discoZones = new List<DiscoveryZoneData>();
public List<SpawnRegionData> spawnRegions = new List<SpawnRegionData>();
public List<ServerTemplateData> serverTemplates = new List<ServerTemplateData>();
public int numOfCellsX = 5;
public int numOfCellsY = 4;
public float cellSize = 200000;
public float columnUTCOffset = 0.0f;
public string Day0 = "";
public bool bUseUTCTime = false;
public float globalTransitionMinZ = 0.0f;
public string AdditionalCmdLineParams;
public Dictionary<string, string> OverrideShooterGameModeDefaultGameIni = new Dictionary<string, string>();
public string MetaWorldURL = "";
public string WorldFriendlyName = "AtlasWorld";
public string WorldAtlasId = "";
public string AuthListURL = "";
public string WorldAtlasPassword = "";
public string ModIDs = "";
public string MapImageURL = "";
public string BaseServerArgs = "";
public string LocalS3URL = "";
public string LocalS3AccessKeyId = "";
public string LocalS3SecretKey = "";
public string LocalS3BucketName = "";
public string LocalS3Region = "";
public string globalGameplaySetup = "";
public TribeLogConfigInfo TribeLogConfig = new TribeLogConfigInfo();
public SharedLogConfigInfo SharedLogConfig = new SharedLogConfigInfo();
public BackupConfigInfo TravelDataConfig = new BackupConfigInfo();
public List<DatabaseConnectionInfo> DatabaseConnections = new List<DatabaseConnectionInfo>();
public float coordsScaling = 0.01f;
public bool showServerInfo = true;
public bool showDiscoZoneInfo = true;
public bool showShipPathsInfo = true;
public bool showIslandNames = true;
public bool exportPngs = false;
public bool disableImageExporting = false;
public bool showLines = true;
public bool alphaBackground = false;
public bool showBackground = false;
public bool showForeground = false;
public string backgroundImgPath = null;
public string foregroundImgPath = null;
public int idGenerator = 0;
public int regionsIdGenerator = 0;
public int shipPathsIdGenerator = 0;
public DateTime LastImageOverrideUTC;
public List<ShipPathData> shipPaths = new List<ShipPathData>();
public int GenerateNewId() { return ++idGenerator; }
public int GenerateNewSpawnRegionId() { return ++regionsIdGenerator; }
public int GenerateUniqueDiscoZoneId()
{
++idGenerator;
for (int i = 0; i < discoZones.Count; i++)
{
if (discoZones[i].id == idGenerator)
{
++idGenerator;
i = 0;
break;
}
}
return idGenerator;
}
public int GenerateNewShipPathId() { return ++shipPathsIdGenerator; }
public string discoZonesImagePath = "Resources/discoZoneBox.png";
public Image DiscoveryZoneImage = null;
public Project(float cellSize, int numOfCellsX, int numOfCellsY)
{
this.cellSize = cellSize;
this.numOfCellsX = numOfCellsX;
this.numOfCellsY = numOfCellsY;
for (int i = 0; i < numOfCellsX; i++)
{
for (int j = 0; j < numOfCellsY; j++)
{
servers.Add(new Server(i, j));
servers[servers.Count - 1].seamlessDataPort += (i + j * numOfCellsX);
}
}
}
public Project(string json, MainForm mainForm)
{
successfullyLoaded = false;
Deserialize(json, mainForm);
}
public string Serialize(MainForm mainForm, bool bIsFinalExport = false)
{
List<string> referencedIslandNames = new List<string>();
foreach (IslandInstanceData instance in islandInstances)
{
Island referenceIsland = instance.GetReferencedIsland(mainForm.islands);
if (referenceIsland == null)
continue;
if (referenceIsland.sublevelNames == null || referenceIsland.sublevelNames.Count == 0)
{
string emptyIslandName = referenceIsland.name;
if (!referencedIslandNames.Contains(emptyIslandName))
referencedIslandNames.Add(emptyIslandName);
}
}
foreach (string islandName in referencedIslandNames)
MessageBox.Show(string.Format("The island \"{0}\" has no defined sublevels and will not appear ingame", islandName), "Warning", MessageBoxButtons.OK, MessageBoxIcon.Warning);
AtlasGridData ProjectObj = new AtlasGridData().SetFromData(cellSize, servers, islandInstances, discoZones, spawnRegions, WorldAtlasId, WorldFriendlyName, MetaWorldURL,
coordsScaling, showServerInfo, showLines, alphaBackground, showBackground, backgroundImgPath, mainForm, idGenerator, regionsIdGenerator, mainForm.spawners.spawnersInfo, bUseUTCTime,
Day0, globalTransitionMinZ, AdditionalCmdLineParams, OverrideShooterGameModeDefaultGameIni, LastImageOverrideUTC, showDiscoZoneInfo, discoZonesImagePath, shipPaths,
shipPathsIdGenerator, showShipPathsInfo, ModIDs, showIslandNames, exportPngs, showForeground, foregroundImgPath, globalGameplaySetup, serverTemplates, bIsFinalExport, MapImageURL, AuthListURL,
WorldAtlasPassword, columnUTCOffset);
ProjectObj.BaseServerArgs = BaseServerArgs;
ProjectObj.totalGridsX = numOfCellsX;
ProjectObj.totalGridsY = numOfCellsY;
if (!bIsFinalExport)
{
ProjectObj.LocalS3URL = LocalS3URL;
ProjectObj.LocalS3AccessKeyId = LocalS3AccessKeyId;
ProjectObj.LocalS3SecretKey = LocalS3SecretKey;
ProjectObj.LocalS3BucketName = LocalS3BucketName;
ProjectObj.LocalS3Region = LocalS3Region;
ProjectObj.TribeLogConfig = TribeLogConfig;
ProjectObj.SharedLogConfig = SharedLogConfig;
ProjectObj.TravelDataConfig = TravelDataConfig;
ProjectObj.DatabaseConnections = DatabaseConnections;
}
else
{
ProjectObj.LocalS3URL = null;
ProjectObj.LocalS3AccessKeyId = null;
ProjectObj.LocalS3SecretKey = null;
ProjectObj.LocalS3BucketName = null;
ProjectObj.LocalS3Region = null;
ProjectObj.TribeLogConfig = null;
ProjectObj.SharedLogConfig = null;
ProjectObj.TravelDataConfig = null;
ProjectObj.DatabaseConnections = null;
ProjectObj.serverTemplates.Clear();
}
return JsonConvert.SerializeObject(ProjectObj, Formatting.Indented, new JsonSerializerSettings()
{
NullValueHandling = NullValueHandling.Ignore
});
}
public void Deserialize(string json, MainForm mainForm)
{
try
{
AtlasGridData deserializedProject = JsonConvert.DeserializeObject<AtlasGridData>(json, new JsonSerializerSettings
{
DefaultValueHandling = DefaultValueHandling.Populate,
NullValueHandling = NullValueHandling.Ignore
});
if (deserializedProject.TribeLogConfig == null)
deserializedProject.TribeLogConfig = new TribeLogConfigInfo();
if (deserializedProject.SharedLogConfig == null)
deserializedProject.SharedLogConfig = new SharedLogConfigInfo();
if (deserializedProject.TravelDataConfig == null)
deserializedProject.TravelDataConfig = new BackupConfigInfo();
this.cellSize = deserializedProject.gridSize;
idGenerator = deserializedProject.idGenerator;
regionsIdGenerator = deserializedProject.regionsIdGenerator;
int maxX = 0, maxY = 0;
List<ServerData> targetServerList = /*deserializedProject.originalServers != null ? deserializedProject.originalServers : */deserializedProject.servers;
foreach (ServerData deserializedServer in targetServerList)
{
if (deserializedServer.gridX > maxX)
maxX = deserializedServer.gridX;
if (deserializedServer.gridY > maxY)
maxY = deserializedServer.gridY;
Server s = new Server(deserializedServer.gridX, deserializedServer.gridY);
s.MachineIdTag = deserializedServer.MachineIdTag;
s.ip = deserializedServer.ip;
s.port = deserializedServer.port;
s.gamePort = deserializedServer.gamePort;
s.seamlessDataPort = deserializedServer.seamlessDataPort;
s.isHomeServer = deserializedServer.isHomeServer;
s.AdditionalCmdLineParams = deserializedServer.AdditionalCmdLineParams;
s.OverrideShooterGameModeDefaultGameIni = deserializedServer.OverrideShooterGameModeDefaultGameIni;
s.name = deserializedServer.name;
s.floorZDist = deserializedServer.floorZDist;
s.transitionMinZ = deserializedServer.transitionMinZ;
s.utcOffset = deserializedServer.utcOffset;
s.GlobalBiomeSeamlessServerGridPreOffsetValues = deserializedServer.GlobalBiomeSeamlessServerGridPreOffsetValues;
s.GlobalBiomeSeamlessServerGridPreOffsetValuesOceanWater = deserializedServer.GlobalBiomeSeamlessServerGridPreOffsetValuesOceanWater;
s.OceanDinoDepthEntriesOverride = deserializedServer.OceanDinoDepthEntriesOverride;
s.OceanEpicSpawnEntriesOverrideValues = deserializedServer.OceanEpicSpawnEntriesOverrideValues;
s.oceanEpicSpawnEntriesOverrideTemplateName = deserializedServer.oceanEpicSpawnEntriesOverrideTemplateName;
s.NPCShipSpawnEntriesOverrideTemplateName = deserializedServer.NPCShipSpawnEntriesOverrideTemplateName;
s.regionOverrides = deserializedServer.regionOverrides;
s.waterColorR = deserializedServer.waterColorR;
s.waterColorG = deserializedServer.waterColorG;
s.waterColorB = deserializedServer.waterColorB;
s.skyStyleIndex = deserializedServer.skyStyleIndex;
s.ServerCustomDatas1 = deserializedServer.ServerCustomDatas1;
s.ServerCustomDatas2 = deserializedServer.ServerCustomDatas2;
s.ClientCustomDatas1 = deserializedServer.ClientCustomDatas1;
s.ClientCustomDatas2 = deserializedServer.ClientCustomDatas2;
s.oceanFloatsamCratesOverride = deserializedServer.oceanFloatsamCratesOverride;
s.treasureMapLootTablesOverride = deserializedServer.treasureMapLootTablesOverride;
s.lastModifiedUTC = deserializedServer.lastModified;
s.lastImageOverrideUTC = deserializedServer.lastImageOverride;
s.serverTemplateName = deserializedServer.serverTemplateName;
if (s.serverTemplateName == null)
s.serverTemplateName = "";
if (s.floorZDist <= 0)
s.floorZDist = 0;
s.islandLocked = deserializedServer.islandLocked;
s.discoLocked = deserializedServer.discoLocked;
s.pathsLocked = deserializedServer.pathsLocked;
s.extraSublevels = deserializedServer.extraSublevels;
servers.Add(s);
foreach (IslandInstanceData deserializedIslandInstance in deserializedServer.islandInstances)
{
if (!mainForm.islands.ContainsKey(deserializedIslandInstance.name))
continue;
//PointF worldPoint = s.RelativeToWorldPoint(cellSize, new PointF(deserializedIsland.additionalTranslationX, deserializedIsland.additionalTranslationY));
//islandInstances.Add(new IslandInstance(deserializedIsland.name, worldPoint.X, worldPoint.Y, deserializedIsland.additionalRotationYaw));
bool bRepeatedId = false;
foreach (IslandInstanceData prevIslands in islandInstances)
if (prevIslands.id == deserializedIslandInstance.id)
{
bRepeatedId = true;
break;
}
if (deserializedIslandInstance.id == 0 || bRepeatedId)
deserializedIslandInstance.id = GenerateNewId();
deserializedIslandInstance.SyncOverridesWithTemplates(mainForm);
deserializedIslandInstance.maxTreasureQuality = deserializedIslandInstance.minTreasureQuality = -1;
deserializedIslandInstance.useNpcVolumesForTreasures = false;
deserializedIslandInstance.islandTreasureBottleSupplyCrateOverrides = "";
//deserializedIslandInstance.spawnPointRegionOverride = -1;
islandInstances.Add(deserializedIslandInstance);
}
foreach (DiscoveryZoneData deserializedDiscoZone in deserializedServer.discoZones)
{
bool bRepeatedId = false;
foreach (DiscoveryZoneData prevDiscoZones in discoZones)
if (prevDiscoZones.id == deserializedDiscoZone.id)
{
bRepeatedId = true;
break;
}
if (deserializedDiscoZone.id == 0 || bRepeatedId)
deserializedDiscoZone.id = GenerateUniqueDiscoZoneId();
discoZones.Add(deserializedDiscoZone);
}
foreach (SpawnRegionData spawnRegion in deserializedServer.spawnRegions)
{
spawnRegion.X = deserializedServer.gridX; spawnRegion.Y = deserializedServer.gridY;
spawnRegions.Add(spawnRegion);
}
}
numOfCellsX = maxX + 1;
numOfCellsY = maxY + 1;
WorldFriendlyName = deserializedProject.WorldFriendlyName;
WorldAtlasId = deserializedProject.WorldAtlasId;
AuthListURL = deserializedProject.AuthListURL;
MetaWorldURL = deserializedProject.MetaWorldURL;
coordsScaling = deserializedProject.coordsScaling;
showServerInfo = deserializedProject.showServerInfo;
showDiscoZoneInfo = deserializedProject.showDiscoZoneInfo;
showIslandNames = deserializedProject.showIslandNames;
exportPngs = deserializedProject.exportPngs;
showShipPathsInfo = deserializedProject.showShipPathsInfo;
showLines = deserializedProject.showLines;
alphaBackground = deserializedProject.alphaBackground;
showBackground = deserializedProject.showBackground;
showForeground = deserializedProject.showForeground;
backgroundImgPath = deserializedProject.backgroundImgPath;
foregroundImgPath = deserializedProject.foregroundImgPath;
discoZonesImagePath = deserializedProject.discoZonesImagePath;
ModIDs = deserializedProject.ModIDs;
MapImageURL = deserializedProject.MapImageURL;
BaseServerArgs = deserializedProject.BaseServerArgs;
LocalS3URL = deserializedProject.LocalS3URL;
LocalS3AccessKeyId = deserializedProject.LocalS3AccessKeyId;
LocalS3SecretKey = deserializedProject.LocalS3SecretKey;
LocalS3BucketName = deserializedProject.LocalS3BucketName;
LocalS3Region = deserializedProject.LocalS3Region;
globalGameplaySetup = deserializedProject.globalGameplaySetup;
TribeLogConfig = deserializedProject.TribeLogConfig;
TravelDataConfig = deserializedProject.TravelDataConfig;
SharedLogConfig = deserializedProject.SharedLogConfig;
DatabaseConnections = deserializedProject.DatabaseConnections;
bUseUTCTime = deserializedProject.bUseUTCTime;
columnUTCOffset = deserializedProject.columnUTCOffset;
globalTransitionMinZ = deserializedProject.globalTransitionMinZ;
AdditionalCmdLineParams = deserializedProject.AdditionalCmdLineParams;
OverrideShooterGameModeDefaultGameIni = deserializedProject.OverrideShooterGameModeDefaultGameIni;
Day0 = deserializedProject.Day0;
LastImageOverrideUTC = deserializedProject.lastImageOverride;
WorldAtlasPassword = deserializedProject.WorldAtlasPassword;
if (deserializedProject.shipPaths != null)
{
shipPaths = deserializedProject.shipPaths;
foreach (ShipPathData shipPath in shipPaths)
{
foreach (BezierNodeData bezierNode in shipPath.Nodes)
bezierNode.shipPath = shipPath;
}
}
shipPathsIdGenerator = deserializedProject.shipPathsIdGenerator;
serverTemplates = deserializedProject.serverTemplates;
if (serverTemplates == null)
serverTemplates = new List<ServerTemplateData>();
successfullyLoaded = true;
}
catch (Exception e)
{
MessageBox.Show("Failed to parse project json, Message: " + e.Message, "Error");
}
}
public ServerTemplateData GetServerTemplateByName(string templateName)
{
foreach (ServerTemplateData template in serverTemplates)
if (template.name == templateName)
return template;
return null;
}
}
}

View file

@ -0,0 +1,153 @@
using AtlasGridDataLibrary;
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Drawing;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace ServerGridEditor
{
public class Server
{
public string name = "";
public string MachineIdTag = "";
public string ip = "";
public int port;
public int gamePort;
public int seamlessDataPort = 27000;
public int gridX;
public int gridY;
public bool isHomeServer;
public string AdditionalCmdLineParams;
public Dictionary<string, string> OverrideShooterGameModeDefaultGameIni = new Dictionary<string, string>();
public int floorZDist;
public int transitionMinZ;
public int utcOffset;
public string GlobalBiomeSeamlessServerGridPreOffsetValues = "";
public string GlobalBiomeSeamlessServerGridPreOffsetValuesOceanWater = "";
public string OceanDinoDepthEntriesOverride = "";
public string OceanEpicSpawnEntriesOverrideValues = "";
public string oceanFloatsamCratesOverride = "";
public string treasureMapLootTablesOverride = "";
public string oceanEpicSpawnEntriesOverrideTemplateName = "";
public string NPCShipSpawnEntriesOverrideTemplateName = "";
public string regionOverrides = "";
public float waterColorR;
public float waterColorG;
public float waterColorB;
public int skyStyleIndex;
public string ServerCustomDatas1 = "";
public string ServerCustomDatas2 = "";
public string ClientCustomDatas1 = "";
public string ClientCustomDatas2 = "";
public DateTime lastModifiedUTC;
public DateTime lastImageOverrideUTC;
public bool islandLocked = false;
public bool discoLocked = false;
public bool pathsLocked = false;
public List<string> extraSublevels;
public string serverTemplateName = "";
public Server() { }
public Server(int gridX, int gridY)
{
this.gridX = gridX;
this.gridY = gridY;
}
public bool IsWorldPointInServer(PointF point, float gridSize)
{
return GetWorldRect(gridSize).Contains(point);
}
public RectangleF GetWorldRect(float gridSize)
{
return new RectangleF(new PointF(gridX * gridSize, gridY * gridSize), new SizeF(gridSize, gridSize));
}
/// <summary>
/// Transforms a world point to a local server point relative to its center
/// </summary>
public PointF WorldToRelativePoint(float gridSize, PointF worldPoint)
{
PointF ServerWorldCenter = new PointF(gridX * gridSize + gridSize / 2, gridY * gridSize + gridSize / 2);
return new PointF(worldPoint.X - ServerWorldCenter.X, worldPoint.Y - ServerWorldCenter.Y);
}
/// <summary>
/// Transforms a relative point to a meta world point
/// </summary>
public PointF RelativeToWorldPoint(float gridSize, PointF relativePoint)
{
PointF ServerWorldCenter = new PointF(gridX * gridSize + gridSize / 2, gridY * gridSize + gridSize / 2);
return new PointF(relativePoint.X + ServerWorldCenter.X, relativePoint.Y + ServerWorldCenter.Y);
}
public void LaunchPreview(out ProcessStartInfo serverStartInfo, out ProcessStartInfo clientStartInfo, bool runClient = true, bool clearSaveData = false, bool skipCloud = true, int serverNum = 1)
{
using (Process startRedisBatch = new Process())
{
startRedisBatch.StartInfo = new ProcessStartInfo() {
FileName = Path.GetFullPath(MainForm.rootDir + "/AtlasTools/RedisDatabase/redis-server_start.bat"),
WorkingDirectory = Path.GetFullPath(MainForm.rootDir + "/AtlasTools/RedisDatabase"),
UseShellExecute = true,
CreateNoWindow = true,
};
startRedisBatch.Start();
}
string serverArgs = string.Format(skipCloud ? MainForm.serverArgs : MainForm.serverArgsWithAws, gridX, gridY, serverNum);
if (clearSaveData)
serverArgs += MainForm.clearSaveDataArg;
serverArgs += " -SeamlessLocalHost";
serverStartInfo = new ProcessStartInfo(Path.GetFullPath(MainForm.engineExe), serverArgs);
clientStartInfo = runClient ? new ProcessStartInfo(Path.GetFullPath(MainForm.engineExe), string.Format(MainForm.clientArgs, "127.0.0.1", gamePort) + " -SeamlessLocalHost") : null;
if (runClient)
{
clientStartInfo.UseShellExecute = true;
clientStartInfo.CreateNoWindow = true;
clientStartInfo.WorkingDirectory = MainForm.rootDir;
using (Process clientProcess = new Process())
{
clientProcess.StartInfo = clientStartInfo;
clientProcess.Start();
}
}
serverStartInfo.UseShellExecute = true;
serverStartInfo.CreateNoWindow = true;
serverStartInfo.WorkingDirectory = MainForm.rootDir;
using (Process serverProcess = new Process())
{
serverProcess.StartInfo = serverStartInfo;
serverProcess.Start();
}
}
public void SetDirty()
{
lastModifiedUTC = DateTime.UtcNow;
}
}
public static class ServerTemplateDataEx
{
public static Color GetTemplateColor(this ServerTemplateData Data)
{
return Color.FromArgb((int)(255 * Data.templateColorR), (int)(255 * Data.templateColorG), (int)(255 * Data.templateColorB));
}
}
}

View file

@ -0,0 +1,123 @@
using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using AtlasGridDataLibrary;
namespace ServerGridEditor
{
public static class BezierNodeEx
{
public static Rectangle GetRect(this BezierNodeData Data, Project currentProject)
{
if (currentProject == null)
return new Rectangle();
float relativeX = GetBezierNodeSize(currentProject) * currentProject.coordsScaling;
float relativeY = relativeX;
return new Rectangle((int)Math.Round(Data.worldX * currentProject.coordsScaling - relativeX / 2f), (int)Math.Round(Data.worldY * currentProject.coordsScaling - relativeY / 2f), (int)Math.Round(relativeX), (int)Math.Round(relativeY));
}
public static bool ContainsPoint(this BezierNodeData Data, Point p, MainForm mainForm)
{
Rectangle Rect = Data.GetRect(mainForm.currentProject);
PointF rotatedP = StaticHelpers.RotatePointAround(p, new PointF(Rect.Left + Rect.Width / 2.0f, Rect.Top + Rect.Height / 2.0f), -Data.rotation);
p.X = (int)rotatedP.X;
p.Y = (int)rotatedP.Y;
return Rect.Contains(p);
}
public static float GetBezierNodeSize(Project currentProject)
{
return currentProject.cellSize * MainForm.bezierNodeRatio;
}
public static BezierNodeData GetNextNode(this BezierNodeData Data)
{
int idx = Data.shipPath.Nodes.IndexOf(Data) + 1;
if (idx == Data.shipPath.Nodes.Count)
return Data.shipPath.Nodes[0];
if (idx < 0 || idx > Data.shipPath.Nodes.Count)
return null;
return Data.shipPath.Nodes[idx];
}
public static BezierNodeData GetPrevNode(this BezierNodeData Data)
{
int idx = Data.shipPath.Nodes.IndexOf(Data) - 1;
if (idx == -1)
return Data.shipPath.Nodes[Data.shipPath.Nodes.Count - 1];
if (idx < 0 || idx >= Data.shipPath.Nodes.Count)
return null;
return Data.shipPath.Nodes[idx];
}
public static PointF GetNextControlPoint(this BezierNodeData Data)
{
PointF controlPoint = new PointF(Data.worldX + Data.controlPointsDistance, Data.worldY);
return StaticHelpers.RotatePointAround(controlPoint, new PointF(Data.worldX, Data.worldY), Data.rotation);
}
public static PointF GetPrevControlPoint(this BezierNodeData Data)
{
PointF controlPoint = new PointF(Data.worldX - Data.controlPointsDistance, Data.worldY);
return StaticHelpers.RotatePointAround(controlPoint, new PointF(Data.worldX, Data.worldY), Data.rotation);
}
}
public static class ShipPathEx
{
public static ShipPathData SetFrom(this ShipPathData Data, MainForm mainForm, float worldX, float worldY)
{
float nodeSize = BezierNodeEx.GetBezierNodeSize(mainForm.currentProject);
Data.Nodes.Add(new BezierNodeData() { worldX = worldX - nodeSize * 2, worldY = worldY + nodeSize, rotation = 0, shipPath = Data, controlPointsDistance = BezierNodeEx.GetBezierNodeSize(mainForm.currentProject) });
Data.Nodes.Add(new BezierNodeData() { worldX = worldX, worldY = worldY, rotation = 0, shipPath = Data, controlPointsDistance = BezierNodeEx.GetBezierNodeSize(mainForm.currentProject) });
Data.Nodes.Add(new BezierNodeData() { worldX = worldX + nodeSize * 2, worldY = worldY + nodeSize, rotation = 0, shipPath = Data, controlPointsDistance = BezierNodeEx.GetBezierNodeSize(mainForm.currentProject) });
Data.PathId = mainForm.currentProject.GenerateNewShipPathId();
return Data;
}
public static bool DeleteNode(this ShipPathData Data, BezierNodeData nodeToDelete)
{
if (Data.Nodes.Count <= 2)
return false;
int idx = Data.Nodes.IndexOf(nodeToDelete);
if(idx >= 0)
Data.Nodes.RemoveAt(idx);
return true;
}
public static BezierNodeData AddNode(this ShipPathData Data, BezierNodeData afterNode)
{
int idx = Data.Nodes.IndexOf(afterNode);
if (idx >= 0)
{
BezierNodeData nextNode = afterNode.GetNextNode();
float midX = (afterNode.worldX + nextNode.worldX) / 2;
float midY = (afterNode.worldY + nextNode.worldY) / 2;
BezierNodeData newNode = new BezierNodeData() { worldX = midX, worldY = midY, rotation = 0, shipPath = Data/*, mainForm.currentProject*/ };
Data.Nodes.Insert(idx + 1, newNode);
}
return null;
}
}
}

View file

@ -0,0 +1,164 @@
using System;
using System.Collections.Generic;
using System.Drawing;
using System.Drawing.Drawing2D;
using System.Drawing.Imaging;
using System.IO;
using System.Threading.Tasks;
namespace ServerGridEditor.Code
{
/// <summary>
/// A SlippyMap is a tiled web map, such as OpenStreetMap.
/// </summary>
/// <remarks>
/// For each zoom level, there exists a set of identically sized images
/// (256x256 px by default) which make up the map. In the browser, a User
/// can zoom and pan around the map. The JavaScript framework, Leaflet, is
/// used to handle the streaming of tiles that represent a particular
/// location (X, Y) for the current zoom level.
///
/// This class is used to generate such sets of tiles.
/// </remarks>
static class SlippyMap
{
public static readonly int minimumZoomLevel = 0,
maximumZoomLevel = 6;
public static readonly string extension = ".png";
public static readonly int tileSize = 256;
// largestSize needs to be a power of 2 and create a Bitmap that is
// smaller than 2GB (GDI+ limit). 2^14 fits both the constraints.
// @see https://stackoverflow.com/a/29176435
public static readonly float largestSize = (float)Math.Pow(2, 14);
public static void ExportSlippyMap(this MainForm mainForm, IDictionary<string, Island> islands, bool showLines,
bool showServerInfo, bool showDiscoZoneInfo, Image tile,
TextureBrush tileBrush, Color backgroundColor, string outdir, Action<string> update)
{
Project project = mainForm.currentProject;
if (project == null)
throw new ArgumentNullException("project");
float prevCoordsScaling = project.coordsScaling;
int numCells = project.numOfCellsX > project.numOfCellsY ? project.numOfCellsX : project.numOfCellsY;
project.coordsScaling = largestSize / (project.cellSize * numCells);
try
{
float cellSize = project.cellSize * project.coordsScaling;
float maxX = project.numOfCellsX * cellSize;
float maxY = project.numOfCellsY * cellSize;
var mapSize = (int)Math.Ceiling(Math.Max(maxX, maxY));
using (var map = new Bitmap(mapSize, mapSize))
{
Graphics g = Graphics.FromImage(map);
MainForm.DrawMap(
mainForm, islands, g,
showLines: showLines, showServerInfo: showServerInfo, showDiscoZoneInfo : showDiscoZoneInfo,
culling: null, alphaBackground: backgroundColor,
tile: tile, tileBrush: tileBrush, tileScale: 0,
translateH: 0, translateV: 0, forExport:true);
// map.Save(Path.Combine(outdir, "export.png"), ImageFormat.Png);
for (int zoomLevel = minimumZoomLevel; zoomLevel <= maximumZoomLevel; zoomLevel++)
{
update?.Invoke(string.Format("Generating tiles for zoom level {0}", zoomLevel));
Task.Run(() => GenerateTiles(map, outdir, zoomLevel)).Wait();
}
}
}
finally
{
project.coordsScaling = prevCoordsScaling;
}
}
static void GenerateTiles(Bitmap map, string outdir, int zoomLevel)
{
string z = zoomLevel.ToString();
int numTiles = PowerRoundingDown(2, zoomLevel);
int resize = tileSize * numTiles;
if (resize > Math.Max(map.Width, map.Height))
return;
// Create all paths {outdir}\{z}\{x}
for (int x = 0; x < numTiles; x++)
Directory.CreateDirectory(Path.Combine(outdir, z, x.ToString()));
using (var img = ResizeImage(map, resize, resize))
for (int x = 0; x < numTiles; x++)
for (int y = 0; y < numTiles; y++)
{
var geom =
new Rectangle(x * tileSize, y * tileSize, tileSize, tileSize);
string filename =
Path.Combine(outdir, z, x.ToString(), y.ToString() + extension);
using (var tile = CropImage(img, geom))
tile.Save(filename);
}
}
static int PowerRoundingDown(int b, int exponent)
{
return (int)Math.Floor(Math.Pow(b, exponent));
}
/// <summary>
/// Resize the image to the specified width and height.
/// </summary>
/// <param name="image">The image to resize.</param>
/// <param name="width">The width to resize to.</param>
/// <param name="height">The height to resize to.</param>
/// <returns>The resized image.</returns>
/// <see cref="https://stackoverflow.com/a/24199315"/>
public static Bitmap ResizeImage(Image image, int width, int height)
{
var destRect = new Rectangle(0, 0, width, height);
var destImage = new Bitmap(width, height);
destImage.SetResolution(image.HorizontalResolution, image.VerticalResolution);
using (var graphics = Graphics.FromImage(destImage))
{
graphics.CompositingMode = CompositingMode.SourceCopy;
graphics.CompositingQuality = CompositingQuality.HighQuality;
graphics.InterpolationMode = InterpolationMode.HighQualityBicubic;
graphics.SmoothingMode = SmoothingMode.HighQuality;
graphics.PixelOffsetMode = PixelOffsetMode.HighQuality;
using (var wrapMode = new ImageAttributes())
{
wrapMode.SetWrapMode(WrapMode.TileFlipXY);
graphics.DrawImage(image, destRect, 0, 0, image.Width, image.Height, GraphicsUnit.Pixel, wrapMode);
}
}
return destImage;
}
public static Bitmap CropImage(Image src, Rectangle area)
{
var dst = new Bitmap(area.Width, area.Height);
using (Graphics g = Graphics.FromImage(dst))
g.DrawImage(
src,
new Rectangle(0, 0, dst.Width, dst.Height),
area,
GraphicsUnit.Pixel
);
return dst;
}
}
}

View file

@ -0,0 +1,22 @@
using System;
using System.Collections.Generic;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace ServerGridEditor
{
public class SpawnRegion
{
public string name;
[NonSerialized]
public Point serverIdx;
public SpawnRegion(string name, Point serverIdx)
{
this.name = name;
this.serverIdx = serverIdx;
}
}
}

View file

@ -0,0 +1,45 @@
using AtlasGridDataLibrary;
using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace ServerGridEditor
{
public class Spawners
{
public List<SpawnerInfoData> spawnersInfo = new List<SpawnerInfoData>();
public void ClearSpawners()
{
spawnersInfo.Clear();
}
public SpawnerInfoData GetSpawnerInfoByName(string Name)
{
return spawnersInfo.Find((SpawnerInfoData s) => { return s.Name == Name; });
}
public bool AddSpawnerInfo(SpawnerInfoData spawnerInfoToAdd)
{
if (GetSpawnerInfoByName(spawnerInfoToAdd.Name) != null)
return false;
spawnersInfo.Add(spawnerInfoToAdd);
return true;
}
public string Serialize()
{
return JsonConvert.SerializeObject(this, Formatting.Indented);
}
public void SaveToFile(string fileName)
{
File.WriteAllText(fileName, Serialize());
}
}
}

View file

@ -0,0 +1,84 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using System.Drawing;
using System.IO;
namespace ServerGridEditor
{
static class StaticHelpers
{
public static object BitmapCacheOption { get; private set; }
public static void ForceNumericKeypress(object sender, KeyPressEventArgs e, bool allowDecimal = true)
{
if (!char.IsControl(e.KeyChar) && !char.IsDigit(e.KeyChar) && (!allowDecimal || e.KeyChar != '.'))
{
e.Handled = true;
}
// only allow one decimal point
if ((e.KeyChar == '.') && ((sender as TextBox).Text.IndexOf('.') > -1))
{
e.Handled = true;
}
}
public static float GetAngleOfPoint(Point center, Point p)
{
float xDiff = p.X - center.X;
float yDiff = p.Y - center.Y;
return (float)(Math.Atan2(yDiff, xDiff) * 180f / Math.PI);
}
public static float DegreeToRadian(float angle)
{
return (float)Math.PI * angle / 180.0f;
}
public static float RadianToDegree(float angle)
{
return angle * (180.0f / (float)Math.PI);
}
public static PointF RotatePointAround(PointF p, PointF axis, float angle)
{
float s = (float)Math.Sin(DegreeToRadian(angle));
float c = (float)Math.Cos(DegreeToRadian(angle));
// translate point back to origin:
p.X -= axis.X;
p.Y -= axis.Y;
// rotate point
float xnew = p.X * c - p.Y * s;
float ynew = p.X * s + p.Y * c;
// translate point back:
p.X = xnew + axis.X;
p.Y = ynew + axis.Y;
return p;
}
public static string NormalizePath(string path)
{
return Path.GetFullPath(path)
.TrimEnd(Path.DirectorySeparatorChar, Path.AltDirectorySeparatorChar)
.ToUpperInvariant();
}
public static float GetDistance(PointF p1, PointF p2)
{
return GetDistance(p1.X, p1.Y, p2.X, p2.Y);
}
public static float GetDistance(float x1, float y1, float x2, float y2)
{
return (float)Math.Sqrt(Math.Pow((x2 - x1), 2) + Math.Pow((y2 - y1), 2));
}
}
}

View file

@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<Weavers>
<Costura IncludeDebugSymbols="False" />
</Weavers>

View file

@ -0,0 +1,451 @@
namespace ServerGridEditor
{
partial class CreateIslndForm
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.islandNameTxtBox = new System.Windows.Forms.TextBox();
this.label1 = new System.Windows.Forms.Label();
this.label2 = new System.Windows.Forms.Label();
this.sizeXTxtBox = new System.Windows.Forms.TextBox();
this.sizeYTxtBox = new System.Windows.Forms.TextBox();
this.label3 = new System.Windows.Forms.Label();
this.label4 = new System.Windows.Forms.Label();
this.openFileDialog = new System.Windows.Forms.OpenFileDialog();
this.pictureBox1 = new System.Windows.Forms.PictureBox();
this.chooseImgBtn = new System.Windows.Forms.Button();
this.createBtn = new System.Windows.Forms.Button();
this.cancelBtn = new System.Windows.Forms.Button();
this.label5 = new System.Windows.Forms.Label();
this.sublevelsList = new System.Windows.Forms.ListBox();
this.addSublevels = new System.Windows.Forms.Button();
this.landscapeMaterialOverrideTxtBox = new System.Windows.Forms.TextBox();
this.label6 = new System.Windows.Forms.Label();
this.label7 = new System.Windows.Forms.Label();
this.spawnerOverridesGrid = new System.Windows.Forms.DataGridView();
this.SpawnerName = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.SpawnerTemplate = new System.Windows.Forms.DataGridViewComboBoxColumn();
this.label8 = new System.Windows.Forms.Label();
this.label9 = new System.Windows.Forms.Label();
this.minTreasureQualityTxtBox = new System.Windows.Forms.TextBox();
this.maxTreasureQualityTxtBox = new System.Windows.Forms.TextBox();
this.useNpcVolumesForTreasuresChkBox = new System.Windows.Forms.CheckBox();
this.useLevelBoundsForTreasuresChkBox = new System.Windows.Forms.CheckBox();
this.prioritizeVolumesForTreasuresChkBox = new System.Windows.Forms.CheckBox();
this.label10 = new System.Windows.Forms.Label();
this.IslandTreasureBottleSupplyCrateOverridesTxtBox = new System.Windows.Forms.TextBox();
this.extraSublevelsTxtBox = new System.Windows.Forms.TextBox();
this.label11 = new System.Windows.Forms.Label();
this.label12 = new System.Windows.Forms.Label();
this.instancesListBox = new System.Windows.Forms.ListBox();
((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.spawnerOverridesGrid)).BeginInit();
this.SuspendLayout();
//
// islandNameTxtBox
//
this.islandNameTxtBox.Location = new System.Drawing.Point(105, 40);
this.islandNameTxtBox.Name = "islandNameTxtBox";
this.islandNameTxtBox.Size = new System.Drawing.Size(144, 20);
this.islandNameTxtBox.TabIndex = 0;
//
// label1
//
this.label1.AutoSize = true;
this.label1.Location = new System.Drawing.Point(24, 43);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(66, 13);
this.label1.TabIndex = 1;
this.label1.Text = "Island Name";
//
// label2
//
this.label2.AutoSize = true;
this.label2.Location = new System.Drawing.Point(63, 70);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(27, 13);
this.label2.TabIndex = 3;
this.label2.Text = "Size";
//
// sizeXTxtBox
//
this.sizeXTxtBox.Location = new System.Drawing.Point(105, 67);
this.sizeXTxtBox.Name = "sizeXTxtBox";
this.sizeXTxtBox.Size = new System.Drawing.Size(55, 20);
this.sizeXTxtBox.TabIndex = 2;
this.sizeXTxtBox.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.sizeXTxtBox_KeyPress);
//
// sizeYTxtBox
//
this.sizeYTxtBox.Location = new System.Drawing.Point(194, 67);
this.sizeYTxtBox.Name = "sizeYTxtBox";
this.sizeYTxtBox.Size = new System.Drawing.Size(55, 20);
this.sizeYTxtBox.TabIndex = 4;
this.sizeYTxtBox.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.sizeYTxtBox_KeyPress);
//
// label3
//
this.label3.AutoSize = true;
this.label3.Location = new System.Drawing.Point(120, 90);
this.label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(14, 13);
this.label3.TabIndex = 5;
this.label3.Text = "X";
//
// label4
//
this.label4.AutoSize = true;
this.label4.Location = new System.Drawing.Point(209, 90);
this.label4.Name = "label4";
this.label4.Size = new System.Drawing.Size(14, 13);
this.label4.TabIndex = 6;
this.label4.Text = "Y";
//
// pictureBox1
//
this.pictureBox1.BackColor = System.Drawing.SystemColors.ControlLightLight;
this.pictureBox1.Location = new System.Drawing.Point(191, 136);
this.pictureBox1.Name = "pictureBox1";
this.pictureBox1.Size = new System.Drawing.Size(60, 50);
this.pictureBox1.TabIndex = 7;
this.pictureBox1.TabStop = false;
//
// chooseImgBtn
//
this.chooseImgBtn.Location = new System.Drawing.Point(57, 150);
this.chooseImgBtn.Name = "chooseImgBtn";
this.chooseImgBtn.Size = new System.Drawing.Size(104, 23);
this.chooseImgBtn.TabIndex = 8;
this.chooseImgBtn.Text = "Choose Image";
this.chooseImgBtn.UseVisualStyleBackColor = true;
this.chooseImgBtn.Click += new System.EventHandler(this.chooseImgBtn_Click);
//
// createBtn
//
this.createBtn.Location = new System.Drawing.Point(298, 565);
this.createBtn.Name = "createBtn";
this.createBtn.Size = new System.Drawing.Size(111, 32);
this.createBtn.TabIndex = 9;
this.createBtn.Text = "Create";
this.createBtn.UseVisualStyleBackColor = true;
this.createBtn.Click += new System.EventHandler(this.createBtn_Click);
//
// cancelBtn
//
this.cancelBtn.Location = new System.Drawing.Point(415, 565);
this.cancelBtn.Name = "cancelBtn";
this.cancelBtn.Size = new System.Drawing.Size(118, 32);
this.cancelBtn.TabIndex = 10;
this.cancelBtn.Text = "Cancel";
this.cancelBtn.UseVisualStyleBackColor = true;
this.cancelBtn.Click += new System.EventHandler(this.cancelBtn_Click);
//
// label5
//
this.label5.AutoSize = true;
this.label5.Font = new System.Drawing.Font("Microsoft Sans Serif", 6.75F, System.Drawing.FontStyle.Italic, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.label5.Location = new System.Drawing.Point(24, 83);
this.label5.Name = "label5";
this.label5.Size = new System.Drawing.Size(66, 12);
this.label5.TabIndex = 11;
this.label5.Text = "In Unreal Units";
this.label5.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
//
// sublevelsList
//
this.sublevelsList.FormattingEnabled = true;
this.sublevelsList.Location = new System.Drawing.Point(26, 193);
this.sublevelsList.Name = "sublevelsList";
this.sublevelsList.SelectionMode = System.Windows.Forms.SelectionMode.MultiExtended;
this.sublevelsList.Size = new System.Drawing.Size(226, 95);
this.sublevelsList.TabIndex = 12;
this.sublevelsList.KeyDown += new System.Windows.Forms.KeyEventHandler(this.sublevelsList_KeyDown);
//
// addSublevels
//
this.addSublevels.Location = new System.Drawing.Point(96, 295);
this.addSublevels.Name = "addSublevels";
this.addSublevels.Size = new System.Drawing.Size(90, 24);
this.addSublevels.TabIndex = 13;
this.addSublevels.Text = "Add Sublevels";
this.addSublevels.UseVisualStyleBackColor = true;
this.addSublevels.Click += new System.EventHandler(this.addSublevels_Click);
//
// landscapeMaterialOverrideTxtBox
//
this.landscapeMaterialOverrideTxtBox.Location = new System.Drawing.Point(197, 110);
this.landscapeMaterialOverrideTxtBox.Name = "landscapeMaterialOverrideTxtBox";
this.landscapeMaterialOverrideTxtBox.Size = new System.Drawing.Size(55, 20);
this.landscapeMaterialOverrideTxtBox.TabIndex = 14;
//
// label6
//
this.label6.AutoSize = true;
this.label6.Location = new System.Drawing.Point(21, 114);
this.label6.Name = "label6";
this.label6.Size = new System.Drawing.Size(172, 13);
this.label6.TabIndex = 15;
this.label6.Text = "Landscape Material Override Index";
//
// label7
//
this.label7.AccessibleRole = System.Windows.Forms.AccessibleRole.None;
this.label7.AutoSize = true;
this.label7.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.label7.Location = new System.Drawing.Point(266, 38);
this.label7.Name = "label7";
this.label7.Size = new System.Drawing.Size(143, 20);
this.label7.TabIndex = 17;
this.label7.Text = "Spawner Overrides";
//
// spawnerOverridesGrid
//
this.spawnerOverridesGrid.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
this.spawnerOverridesGrid.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
this.SpawnerName,
this.SpawnerTemplate});
this.spawnerOverridesGrid.Location = new System.Drawing.Point(270, 61);
this.spawnerOverridesGrid.Name = "spawnerOverridesGrid";
this.spawnerOverridesGrid.Size = new System.Drawing.Size(323, 281);
this.spawnerOverridesGrid.TabIndex = 16;
//
// SpawnerName
//
this.SpawnerName.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill;
this.SpawnerName.HeaderText = "Spawner Name";
this.SpawnerName.Name = "SpawnerName";
//
// SpawnerTemplate
//
this.SpawnerTemplate.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill;
this.SpawnerTemplate.HeaderText = "Spawner Template";
this.SpawnerTemplate.Name = "SpawnerTemplate";
//
// label8
//
this.label8.AutoSize = true;
this.label8.Location = new System.Drawing.Point(26, 339);
this.label8.Name = "label8";
this.label8.Size = new System.Drawing.Size(128, 13);
this.label8.TabIndex = 18;
this.label8.Text = "Minimum Treasure Quality";
//
// label9
//
this.label9.AutoSize = true;
this.label9.Location = new System.Drawing.Point(26, 362);
this.label9.Name = "label9";
this.label9.Size = new System.Drawing.Size(125, 13);
this.label9.TabIndex = 19;
this.label9.Text = "MaximumTreasureQuality";
//
// minTreasureQualityTxtBox
//
this.minTreasureQualityTxtBox.Location = new System.Drawing.Point(168, 336);
this.minTreasureQualityTxtBox.Name = "minTreasureQualityTxtBox";
this.minTreasureQualityTxtBox.Size = new System.Drawing.Size(55, 20);
this.minTreasureQualityTxtBox.TabIndex = 20;
this.minTreasureQualityTxtBox.Text = "-1";
//
// maxTreasureQualityTxtBox
//
this.maxTreasureQualityTxtBox.Location = new System.Drawing.Point(168, 359);
this.maxTreasureQualityTxtBox.Name = "maxTreasureQualityTxtBox";
this.maxTreasureQualityTxtBox.Size = new System.Drawing.Size(55, 20);
this.maxTreasureQualityTxtBox.TabIndex = 21;
this.maxTreasureQualityTxtBox.Text = "-1";
//
// useNpcVolumesForTreasuresChkBox
//
this.useNpcVolumesForTreasuresChkBox.AutoSize = true;
this.useNpcVolumesForTreasuresChkBox.Location = new System.Drawing.Point(24, 391);
this.useNpcVolumesForTreasuresChkBox.Name = "useNpcVolumesForTreasuresChkBox";
this.useNpcVolumesForTreasuresChkBox.Size = new System.Drawing.Size(174, 17);
this.useNpcVolumesForTreasuresChkBox.TabIndex = 23;
this.useNpcVolumesForTreasuresChkBox.Text = "Use NPC Volumes for treasures";
this.useNpcVolumesForTreasuresChkBox.UseVisualStyleBackColor = true;
//
// useLevelBoundsForTreasuresChkBox
//
this.useLevelBoundsForTreasuresChkBox.AutoSize = true;
this.useLevelBoundsForTreasuresChkBox.Checked = true;
this.useLevelBoundsForTreasuresChkBox.CheckState = System.Windows.Forms.CheckState.Checked;
this.useLevelBoundsForTreasuresChkBox.Location = new System.Drawing.Point(24, 453);
this.useLevelBoundsForTreasuresChkBox.Name = "useLevelBoundsForTreasuresChkBox";
this.useLevelBoundsForTreasuresChkBox.Size = new System.Drawing.Size(169, 17);
this.useLevelBoundsForTreasuresChkBox.TabIndex = 24;
this.useLevelBoundsForTreasuresChkBox.Text = "Use level bounds for treasures";
this.useLevelBoundsForTreasuresChkBox.UseVisualStyleBackColor = true;
//
// prioritizeVolumesForTreasuresChkBox
//
this.prioritizeVolumesForTreasuresChkBox.AutoSize = true;
this.prioritizeVolumesForTreasuresChkBox.Location = new System.Drawing.Point(24, 417);
this.prioritizeVolumesForTreasuresChkBox.Name = "prioritizeVolumesForTreasuresChkBox";
this.prioritizeVolumesForTreasuresChkBox.Size = new System.Drawing.Size(194, 30);
this.prioritizeVolumesForTreasuresChkBox.TabIndex = 25;
this.prioritizeVolumesForTreasuresChkBox.Text = "Prioritize volumes over level bounds\r\nfor treasures";
this.prioritizeVolumesForTreasuresChkBox.UseVisualStyleBackColor = true;
//
// label10
//
this.label10.AutoSize = true;
this.label10.Location = new System.Drawing.Point(258, 354);
this.label10.Name = "label10";
this.label10.Size = new System.Drawing.Size(206, 13);
this.label10.TabIndex = 27;
this.label10.Text = "IslandTreasureBottleSupplyCrateOverrides";
//
// IslandTreasureBottleSupplyCrateOverridesTxtBox
//
this.IslandTreasureBottleSupplyCrateOverridesTxtBox.Location = new System.Drawing.Point(261, 370);
this.IslandTreasureBottleSupplyCrateOverridesTxtBox.Multiline = true;
this.IslandTreasureBottleSupplyCrateOverridesTxtBox.Name = "IslandTreasureBottleSupplyCrateOverridesTxtBox";
this.IslandTreasureBottleSupplyCrateOverridesTxtBox.Size = new System.Drawing.Size(332, 70);
this.IslandTreasureBottleSupplyCrateOverridesTxtBox.TabIndex = 35;
//
// extraSublevelsTxtBox
//
this.extraSublevelsTxtBox.Location = new System.Drawing.Point(261, 468);
this.extraSublevelsTxtBox.Multiline = true;
this.extraSublevelsTxtBox.Name = "extraSublevelsTxtBox";
this.extraSublevelsTxtBox.Size = new System.Drawing.Size(332, 75);
this.extraSublevelsTxtBox.TabIndex = 36;
//
// label11
//
this.label11.AutoSize = true;
this.label11.Location = new System.Drawing.Point(258, 452);
this.label11.Name = "label11";
this.label11.Size = new System.Drawing.Size(77, 13);
this.label11.TabIndex = 37;
this.label11.Text = "ExtraSublevels";
//
// label12
//
this.label12.AutoSize = true;
this.label12.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.label12.Location = new System.Drawing.Point(21, 485);
this.label12.Name = "label12";
this.label12.Size = new System.Drawing.Size(154, 13);
this.label12.TabIndex = 38;
this.label12.Text = "Island instances locations";
//
// instancesListBox
//
this.instancesListBox.FormattingEnabled = true;
this.instancesListBox.Location = new System.Drawing.Point(24, 502);
this.instancesListBox.Name = "instancesListBox";
this.instancesListBox.Size = new System.Drawing.Size(194, 95);
this.instancesListBox.TabIndex = 39;
//
// CreateIslndForm
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(609, 619);
this.Controls.Add(this.instancesListBox);
this.Controls.Add(this.label12);
this.Controls.Add(this.label11);
this.Controls.Add(this.extraSublevelsTxtBox);
this.Controls.Add(this.IslandTreasureBottleSupplyCrateOverridesTxtBox);
this.Controls.Add(this.label10);
this.Controls.Add(this.prioritizeVolumesForTreasuresChkBox);
this.Controls.Add(this.useLevelBoundsForTreasuresChkBox);
this.Controls.Add(this.useNpcVolumesForTreasuresChkBox);
this.Controls.Add(this.maxTreasureQualityTxtBox);
this.Controls.Add(this.minTreasureQualityTxtBox);
this.Controls.Add(this.label9);
this.Controls.Add(this.label8);
this.Controls.Add(this.label7);
this.Controls.Add(this.spawnerOverridesGrid);
this.Controls.Add(this.label6);
this.Controls.Add(this.landscapeMaterialOverrideTxtBox);
this.Controls.Add(this.addSublevels);
this.Controls.Add(this.sublevelsList);
this.Controls.Add(this.label5);
this.Controls.Add(this.cancelBtn);
this.Controls.Add(this.createBtn);
this.Controls.Add(this.chooseImgBtn);
this.Controls.Add(this.pictureBox1);
this.Controls.Add(this.label4);
this.Controls.Add(this.label3);
this.Controls.Add(this.sizeYTxtBox);
this.Controls.Add(this.label2);
this.Controls.Add(this.sizeXTxtBox);
this.Controls.Add(this.label1);
this.Controls.Add(this.islandNameTxtBox);
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
this.Name = "CreateIslndForm";
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
this.Text = "Create Island";
this.Load += new System.EventHandler(this.Form2_Load);
((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.spawnerOverridesGrid)).EndInit();
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
private System.Windows.Forms.TextBox islandNameTxtBox;
private System.Windows.Forms.Label label1;
private System.Windows.Forms.Label label2;
private System.Windows.Forms.TextBox sizeXTxtBox;
private System.Windows.Forms.TextBox sizeYTxtBox;
private System.Windows.Forms.Label label3;
private System.Windows.Forms.Label label4;
private System.Windows.Forms.OpenFileDialog openFileDialog;
private System.Windows.Forms.PictureBox pictureBox1;
private System.Windows.Forms.Button chooseImgBtn;
private System.Windows.Forms.Button createBtn;
private System.Windows.Forms.Button cancelBtn;
private System.Windows.Forms.Label label5;
private System.Windows.Forms.ListBox sublevelsList;
private System.Windows.Forms.Button addSublevels;
private System.Windows.Forms.TextBox landscapeMaterialOverrideTxtBox;
private System.Windows.Forms.Label label6;
private System.Windows.Forms.Label label7;
private System.Windows.Forms.DataGridView spawnerOverridesGrid;
private System.Windows.Forms.DataGridViewTextBoxColumn SpawnerName;
private System.Windows.Forms.DataGridViewComboBoxColumn SpawnerTemplate;
private System.Windows.Forms.Label label8;
private System.Windows.Forms.Label label9;
private System.Windows.Forms.TextBox minTreasureQualityTxtBox;
private System.Windows.Forms.TextBox maxTreasureQualityTxtBox;
private System.Windows.Forms.CheckBox useNpcVolumesForTreasuresChkBox;
private System.Windows.Forms.CheckBox useLevelBoundsForTreasuresChkBox;
private System.Windows.Forms.CheckBox prioritizeVolumesForTreasuresChkBox;
private System.Windows.Forms.Label label10;
private System.Windows.Forms.TextBox IslandTreasureBottleSupplyCrateOverridesTxtBox;
private System.Windows.Forms.TextBox extraSublevelsTxtBox;
private System.Windows.Forms.Label label11;
private System.Windows.Forms.Label label12;
private System.Windows.Forms.ListBox instancesListBox;
}
}

View file

@ -0,0 +1,336 @@
using AtlasGridDataLibrary;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace ServerGridEditor
{
public partial class CreateIslndForm : Form
{
public MainForm mainForm;
public Island editedIsland;
public bool bIslandNameChanged = false;
public CreateIslndForm()
{
InitializeComponent();
pictureBox1.SizeMode = PictureBoxSizeMode.Zoom;
}
private void Form2_Load(object sender, EventArgs e)
{
foreach (SpawnerInfoData spawnerInfo in mainForm.spawners.spawnersInfo)
SpawnerTemplate.Items.Add((string)spawnerInfo.Name);
if (editedIsland != null)
{
bIslandNameChanged = false;
islandNameTxtBox.Text = editedIsland.name;
pictureBox1.ImageLocation = editedIsland.imagePath;
sizeXTxtBox.Text = editedIsland.x + "";
sizeYTxtBox.Text = editedIsland.y + "";
landscapeMaterialOverrideTxtBox.Text = editedIsland.landscapeMaterialOverride + "";
if (editedIsland.sublevelNames != null)
sublevelsList.Items.AddRange(editedIsland.sublevelNames.ToArray());
this.Text = "Edit Island";
createBtn.Text = "Edit";
if (editedIsland.spawnerOverrides != null)
foreach (KeyValuePair<string, string> overrides in editedIsland.spawnerOverrides)
{
int index = spawnerOverridesGrid.Rows.Add();
spawnerOverridesGrid.Rows[index].Cells[SpawnerName.Name].Value = overrides.Key;
if (SpawnerTemplate.Items.Contains(overrides.Value))
spawnerOverridesGrid.Rows[index].Cells[SpawnerTemplate.Name].Value = overrides.Value;
}
minTreasureQualityTxtBox.Text = editedIsland.minTreasureQuality + "";
maxTreasureQualityTxtBox.Text = editedIsland.maxTreasureQuality + "";
useNpcVolumesForTreasuresChkBox.Checked = editedIsland.useNpcVolumesForTreasures;
useLevelBoundsForTreasuresChkBox.Checked = editedIsland.useLevelBoundsForTreasures;
prioritizeVolumesForTreasuresChkBox.Checked = editedIsland.prioritizeVolumesForTreasures;
IslandTreasureBottleSupplyCrateOverridesTxtBox.Text = editedIsland.islandTreasureBottleSupplyCrateOverrides;
if (editedIsland.extraSublevels != null)
extraSublevelsTxtBox.Lines = editedIsland.extraSublevels.ToArray();
foreach (IslandInstanceData islandInstance in mainForm.currentProject.islandInstances)
if(islandInstance.name == editedIsland.name)
{
Server s = islandInstance.GetCurrentServer(mainForm);
if (s != null)
instancesListBox.Items.Add(string.Format("({0}, {1})", s.gridX, s.gridY));
}
}
}
private void chooseImgBtn_Click(object sender, EventArgs e)
{
openFileDialog.Filter = "png files (*.png)|*.png";
openFileDialog.Multiselect = false;
if (openFileDialog.ShowDialog() == DialogResult.OK)
{
string fileName = openFileDialog.FileName;
pictureBox1.ImageLocation = fileName;
}
}
private void sizeXTxtBox_KeyPress(object sender, KeyPressEventArgs e)
{
StaticHelpers.ForceNumericKeypress(sender, e);
}
private void sizeYTxtBox_KeyPress(object sender, KeyPressEventArgs e)
{
StaticHelpers.ForceNumericKeypress(sender, e);
}
private void cancelBtn_Click(object sender, EventArgs e)
{
DialogResult = DialogResult.Cancel;
Close();
}
private void createBtn_Click(object sender, EventArgs e)
{
if (string.IsNullOrEmpty(islandNameTxtBox.Text))
{
MessageBox.Show("Invalid island name", "Alert", MessageBoxButtons.OK, MessageBoxIcon.Error);
return;
}
float x, y;
if (!float.TryParse(sizeXTxtBox.Text, out x) || !float.TryParse(sizeYTxtBox.Text, out y))
{
MessageBox.Show("Invalid island dimensions", "Alert", MessageBoxButtons.OK, MessageBoxIcon.Error);
return;
}
if (string.IsNullOrEmpty(pictureBox1.ImageLocation))
{
MessageBox.Show("Invalid image", "Alert", MessageBoxButtons.OK, MessageBoxIcon.Error);
return;
}
int landscapeMaterialOverride = -1;
if (!int.TryParse(landscapeMaterialOverrideTxtBox.Text, out landscapeMaterialOverride))
{
MessageBox.Show("Invalid landscape material override index", "Alert", MessageBoxButtons.OK, MessageBoxIcon.Error);
return;
}
//Make sure there are no duplicate names
HashSet<string> names = new HashSet<string>();
foreach (DataGridViewRow row in spawnerOverridesGrid.Rows)
{
if (row.Index == spawnerOverridesGrid.Rows.Count - 1) continue; //Last row is the new row
string name = (string)row.Cells[SpawnerName.Name].Value;
if (names.Contains(name))
{
//Duplicate name
MessageBox.Show("Duplicate spawner override names found\nOverride names must be unique", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
return;
}
names.Add(name);
}
foreach (DataGridViewRow row in spawnerOverridesGrid.Rows)
{
if (row.Index == spawnerOverridesGrid.Rows.Count - 1) continue; //Last row is the new row
string val = (string)row.Cells[SpawnerTemplate.Name].Value;
if (string.IsNullOrEmpty(val))
{
//invalid template
MessageBox.Show(string.Format("Template not selected for {0}", (string)row.Cells[SpawnerName.Name].Value), "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
return;
}
}
float minTreasureQuality = -1;
float maxTreasureQuality = -1;
float.TryParse(minTreasureQualityTxtBox.Text, out minTreasureQuality);
float.TryParse(maxTreasureQualityTxtBox.Text, out maxTreasureQuality);
if (editedIsland != null)
{
if (islandNameTxtBox.Text != editedIsland.name) //name changed
{
if (mainForm.islands.ContainsKey(islandNameTxtBox.Text))
{
MessageBox.Show("An island with the same name already exist.", "Error", MessageBoxButtons.OK);
return;
}
if (MessageBox.Show("Renaming islands will result in renaming all placed islands in the opened project.\nNote: The editor will not be able to load projects that contained the old name.\nSave?", "Warning", MessageBoxButtons.OKCancel, MessageBoxIcon.Warning) == DialogResult.Cancel)
return;
//rename all the instances in the current project
if (mainForm.currentProject != null)
{
foreach (IslandInstanceData instance in mainForm.currentProject.islandInstances)
{
if (instance.name == editedIsland.name)
instance.name = islandNameTxtBox.Text;
}
}
mainForm.islands.Remove(editedIsland.name);
if (islandNameTxtBox.Text != editedIsland.name)
{
bIslandNameChanged = true;
}
editedIsland.name = islandNameTxtBox.Text;
mainForm.islands.Add(editedIsland.name, editedIsland);
//rename image
string newImgPath = MainForm.imgsDir + "/" + editedIsland.name + "_img" + (mainForm.currentProject.exportPngs ? ".png" : ".jpg");
editedIsland.InvalidateImage();
File.Move(editedIsland.imagePath, newImgPath);
if (pictureBox1.ImageLocation == editedIsland.imagePath)
pictureBox1.ImageLocation = newImgPath;
editedIsland.imagePath = newImgPath;
}
editedIsland.x = x;
editedIsland.y = y;
if (pictureBox1.ImageLocation != editedIsland.imagePath) //picture changed
{
editedIsland.InvalidateImage();
File.Copy(pictureBox1.ImageLocation, editedIsland.imagePath, true);
}
editedIsland.landscapeMaterialOverride = landscapeMaterialOverride;
editedIsland.sublevelNames = new List<string>(sublevelsList.Items.Cast<string>());
editedIsland.spawnerOverrides = new Dictionary<string, string>();
foreach (DataGridViewRow row in spawnerOverridesGrid.Rows)
{
if (row.Index == spawnerOverridesGrid.Rows.Count - 1) continue; //Last row is the new row
string name = (string)row.Cells[SpawnerName.Name].Value;
string template = (string)row.Cells[SpawnerTemplate.Name].Value;
editedIsland.spawnerOverrides.Add(name, template);
}
editedIsland.minTreasureQuality = minTreasureQuality;
editedIsland.maxTreasureQuality = maxTreasureQuality;
editedIsland.useNpcVolumesForTreasures = useNpcVolumesForTreasuresChkBox.Checked;
editedIsland.useLevelBoundsForTreasures = useLevelBoundsForTreasuresChkBox.Checked;
editedIsland.prioritizeVolumesForTreasures = prioritizeVolumesForTreasuresChkBox.Checked;
editedIsland.islandTreasureBottleSupplyCrateOverrides = IslandTreasureBottleSupplyCrateOverridesTxtBox.Text;
List<string> NewEntries = new List<string>(extraSublevelsTxtBox.Lines);
NewEntries.RemoveAll(item => { return string.IsNullOrWhiteSpace(item); });
editedIsland.extraSublevels = NewEntries;
mainForm.SaveIslands();
DialogResult = DialogResult.OK;
Close();
}
else
{
string Name = islandNameTxtBox.Text;
if (mainForm.islands.ContainsKey(Name))
{
MessageBox.Show("Duplicate island name", "Alert", MessageBoxButtons.OK, MessageBoxIcon.Error);
return;
}
string ImgLocation = pictureBox1.ImageLocation;
List<string> sublevelNames = new List<string>(sublevelsList.Items.Cast<string>());
Dictionary<string, string> spawnerOverrides = new Dictionary<string, string>();
foreach (DataGridViewRow row in spawnerOverridesGrid.Rows)
{
if (row.Index == spawnerOverridesGrid.Rows.Count - 1) continue; //Last row is the new row
string name = (string)row.Cells[SpawnerName.Name].Value;
string template = (string)row.Cells[SpawnerTemplate.Name].Value;
spawnerOverrides.Add(name, template);
}
//Copy the image to our local imgs directory
string newImgPath = MainForm.imgsDir + "/" + Name + "_img" + (mainForm.currentProject.exportPngs ? ".png" : ".jpg");
File.Copy(ImgLocation, newImgPath, true);
mainForm.islands.Add(Name, new Island(Name, x, y, newImgPath, landscapeMaterialOverride, sublevelNames, spawnerOverrides,
minTreasureQuality, maxTreasureQuality, useNpcVolumesForTreasuresChkBox.Checked, useLevelBoundsForTreasuresChkBox.Checked,
prioritizeVolumesForTreasuresChkBox.Checked, IslandTreasureBottleSupplyCrateOverridesTxtBox.Text, new List<string>(extraSublevelsTxtBox.Lines)));
mainForm.RefreshIslandList();
mainForm.SaveIslands();
DialogResult = DialogResult.OK;
Close();
}
}
private void addSublevels_Click(object sender, EventArgs e)
{
openFileDialog.InitialDirectory = Path.GetFullPath(GlobalSettings.Instance.GameSeamlessMapsDir);//mainForm.editorConfig.LastMapsFolder;
//if (string.IsNullOrEmpty(openFileDialog.InitialDirectory) || !Directory.Exists(openFileDialog.InitialDirectory))
//{
// //revert back to the maps folder defined
// openFileDialog.InitialDirectory = Path.GetFullPath(MainForm.gameMapsRelativePath);
//}
openFileDialog.Multiselect = true;
openFileDialog.Filter = "umap files (*.umap)|*.umap";
if (openFileDialog.ShowDialog() == DialogResult.OK)
{
//mainForm.editorConfig.LastMapsFolder = Path.GetDirectoryName(openFileDialog.FileName);
mainForm.SaveConfig();
foreach (string fileName in openFileDialog.FileNames)
{
string nameWithoutExt = Path.GetFileNameWithoutExtension(fileName);
if (!sublevelsList.Items.Contains(nameWithoutExt))
sublevelsList.Items.Add(nameWithoutExt);
}
}
}
private void sublevelsList_KeyDown(object sender, KeyEventArgs e)
{
if (e.KeyCode == Keys.Delete)
{
List<string> selectedItems = new List<string>(sublevelsList.SelectedItems.Cast<string>());
foreach (string item in selectedItems)
sublevelsList.Items.Remove(item);
}
}
}
}

View file

@ -0,0 +1,138 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<metadata name="openFileDialog.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value>
</metadata>
<metadata name="SpawnerName.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="SpawnerTemplate.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="SpawnerName.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="SpawnerTemplate.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="$this.TrayHeight" type="System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>45</value>
</metadata>
</root>

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,462 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using AtlasGridDataLibrary;
namespace ServerGridEditor
{
public partial class CreateProjectForm : Form
{
public MainForm mainForm;
public Project editedProject = null;
private TribeLogConfigInfo TribeLogConfig;
private BackupConfigInfo TravelDataConfig;
private SharedLogConfigInfo SharedLogConfig;
public CreateProjectForm()
{
InitializeComponent();
}
private void CreateProjectForm_Load(object sender, EventArgs e)
{
TribeLogConfig = new TribeLogConfigInfo();
TravelDataConfig = new BackupConfigInfo();
SharedLogConfig = new SharedLogConfigInfo();
//Load edit data
if (editedProject != null)
{
if (editedProject.TribeLogConfig != null)
TribeLogConfig.CopyFrom(editedProject.TribeLogConfig);
if (editedProject.TravelDataConfig != null)
TravelDataConfig.CopyFrom(editedProject.TravelDataConfig);
if (editedProject.SharedLogConfig != null)
SharedLogConfig.CopyFrom(editedProject.SharedLogConfig);
worldFriendlyNameTxtBox.Text = editedProject.WorldFriendlyName;
worldAtlasPasswordTxtBox.Text = editedProject.WorldAtlasPassword;
worldAtlasIdTxtBox.Text = editedProject.WorldAtlasId;
mapImageURLTxtBox.Text = editedProject.MapImageURL;
metaWorldURLTxtBox.Text = editedProject.MetaWorldURL;
authListURLTxtBox.Text = editedProject.AuthListURL;
baseServerArgsTxtBox.Text = editedProject.BaseServerArgs;
if (worldAtlasIdTxtBox.Text.Length == 0)
{
Random rand = new Random();
worldAtlasIdTxtBox.Text = rand.Next().ToString();
}
gridSizeTxtBox.Text = "" + editedProject.cellSize;
columnUTCOffsetTxtBox.Text = "" + editedProject.columnUTCOffset.ToString("0.0#######");
sizeXTxtBox.Text = "" + editedProject.numOfCellsX;
sizeYTxtBox.Text = "" + editedProject.numOfCellsY;
modIdTxtBox.Text = editedProject.ModIDs;
S3localURLTxtBx.Text = editedProject.LocalS3URL;
S3localAccesKeyIdTxtBx.Text = editedProject.LocalS3AccessKeyId;
S3localSecretKeyTxtBx.Text = editedProject.LocalS3SecretKey;
S3localBucketNameTxtBx.Text = editedProject.LocalS3BucketName;
S3localRegionTxtBx.Text = editedProject.LocalS3Region;
globalGameplaySetupTxtBox.Text = editedProject.globalGameplaySetup;
useUTCTimeCheckbox.Checked = editedProject.bUseUTCTime;
globalTransitionZTxtBox.Text = editedProject.globalTransitionMinZ.ToString();
additionalCmdLineParamsTxtBox.Text = editedProject.AdditionalCmdLineParams;
BindingList<ConfigKeyValueEntry> pairs = new BindingList<ConfigKeyValueEntry>();
pairs.AddingNew += (s, a) =>
{
a.NewObject = new ConfigKeyValueEntry("", "");
};
if (editedProject.OverrideShooterGameModeDefaultGameIni != null)
foreach (KeyValuePair<string, string> DicPair in editedProject.OverrideShooterGameModeDefaultGameIni)
pairs.Add(new ConfigKeyValueEntry(DicPair.Key, DicPair.Value));
overrideShooterGameModeDefaultGameIniDataGridView.DataSource = pairs;
DateTime Day0;
if (DateTime.TryParse(editedProject.Day0, out Day0))
day0DateTimePicker.Value = Day0;
else
day0DateTimePicker.Value = DateTime.UtcNow;
if (editedProject.DatabaseConnections != null)
{
if (editedProject.DatabaseConnections.Count > 0)
{
DBEntry1_NameTxtBx.Text = editedProject.DatabaseConnections[0].Name;
DBEntry1_URLTxtBx.Text = editedProject.DatabaseConnections[0].URL;
DBEntry1_PortTxtBx.Text = editedProject.DatabaseConnections[0].Port.ToString();
DBEntry1_PasswordTxtBx.Text = editedProject.DatabaseConnections[0].Password;
}
if (editedProject.DatabaseConnections.Count > 1)
{
DBEntry2_NameTxtBx.Text = editedProject.DatabaseConnections[1].Name;
DBEntry2_URLTxtBx.Text = editedProject.DatabaseConnections[1].URL;
DBEntry2_PortTxtBx.Text = editedProject.DatabaseConnections[1].Port.ToString();
DBEntry2_PasswordTxtBx.Text = editedProject.DatabaseConnections[1].Password;
}
if (editedProject.DatabaseConnections.Count > 2)
{
DBEntry3_NameTxtBx.Text = editedProject.DatabaseConnections[2].Name;
DBEntry3_URLTxtBx.Text = editedProject.DatabaseConnections[2].URL;
DBEntry3_PortTxtBx.Text = editedProject.DatabaseConnections[2].Port.ToString();
DBEntry3_PasswordTxtBx.Text = editedProject.DatabaseConnections[2].Password;
}
if (editedProject.DatabaseConnections.Count > 3)
{
DBEntry4_NameTxtBx.Text = editedProject.DatabaseConnections[3].Name;
DBEntry4_URLTxtBx.Text = editedProject.DatabaseConnections[3].URL;
DBEntry4_PortTxtBx.Text = editedProject.DatabaseConnections[3].Port.ToString();
DBEntry4_PasswordTxtBx.Text = editedProject.DatabaseConnections[3].Password;
}
if (editedProject.DatabaseConnections.Count > 4)
{
DBEntry5_NameTxtBx.Text = editedProject.DatabaseConnections[4].Name;
DBEntry5_URLTxtBx.Text = editedProject.DatabaseConnections[4].URL;
DBEntry5_PortTxtBx.Text = editedProject.DatabaseConnections[4].Port.ToString();
DBEntry5_PasswordTxtBx.Text = editedProject.DatabaseConnections[4].Password;
}
}
this.Text = "Edit project";
createBtn.Text = "Edit";
}
else
{
Random rand = new Random();
worldAtlasIdTxtBox.Text = rand.Next().ToString();
}
}
private void cancelBtn_Click(object sender, EventArgs e)
{
Close();
}
private struct InstanceScaling
{
public Server ParentServer;
public PointF DistanceToCenter;
}
private void createBtn_Click(object sender, EventArgs e)
{
if (string.IsNullOrWhiteSpace(worldFriendlyNameTxtBox.Text))
{
MessageBox.Show("You must input a world friendly name", "Alert", MessageBoxButtons.OK, MessageBoxIcon.Error);
return;
}
float size;
int x, y;
if (!float.TryParse(gridSizeTxtBox.Text, out size))
{
MessageBox.Show("Invalid grid size", "Alert", MessageBoxButtons.OK, MessageBoxIcon.Error);
return;
}
float columnUTCOffset;
if (!float.TryParse(columnUTCOffsetTxtBox.Text, out columnUTCOffset))
{
MessageBox.Show("Invalid columnUTCOffset", "Alert", MessageBoxButtons.OK, MessageBoxIcon.Error);
return;
}
if (!int.TryParse(sizeXTxtBox.Text, out x) || !int.TryParse(sizeYTxtBox.Text, out y))
{
MessageBox.Show("Invalid cell dimensions", "Alert", MessageBoxButtons.OK, MessageBoxIcon.Error);
return;
}
if (editedProject != null)
{
editedProject.WorldFriendlyName = worldFriendlyNameTxtBox.Text;
editedProject.WorldAtlasId = worldAtlasIdTxtBox.Text;
editedProject.WorldAtlasPassword = worldAtlasPasswordTxtBox.Text;
if (mapImageURLTxtBox.Text != "")
editedProject.MapImageURL = mapImageURLTxtBox.Text;
editedProject.MetaWorldURL = metaWorldURLTxtBox.Text;
editedProject.AuthListURL = authListURLTxtBox.Text;
editedProject.MetaWorldURL = editedProject.MetaWorldURL.Trim();
editedProject.BaseServerArgs = baseServerArgsTxtBox.Text;
editedProject.BaseServerArgs = editedProject.BaseServerArgs.Trim();
editedProject.LocalS3URL = S3localURLTxtBx.Text;
editedProject.LocalS3AccessKeyId = S3localAccesKeyIdTxtBx.Text;
editedProject.LocalS3SecretKey = S3localSecretKeyTxtBx.Text;
editedProject.LocalS3BucketName = S3localBucketNameTxtBx.Text;
editedProject.LocalS3Region = S3localRegionTxtBx.Text;
editedProject.globalGameplaySetup = globalGameplaySetupTxtBox.Text;
editedProject.bUseUTCTime = useUTCTimeCheckbox.Checked;
editedProject.columnUTCOffset = columnUTCOffset;
editedProject.Day0 = day0DateTimePicker.Value.ToString("yyyy-MM-dd HH:mm:ss");
editedProject.ModIDs = modIdTxtBox.Text;
float transitionMinZ;
if (!float.TryParse(globalTransitionZTxtBox.Text, out transitionMinZ))
{
MessageBox.Show("Invalid number for global transition minimum Z", "Alert", MessageBoxButtons.OK, MessageBoxIcon.Error);
return;
}
editedProject.globalTransitionMinZ = transitionMinZ;
editedProject.AdditionalCmdLineParams = additionalCmdLineParamsTxtBox.Text;
if (editedProject.OverrideShooterGameModeDefaultGameIni != null)
editedProject.OverrideShooterGameModeDefaultGameIni.Clear();
else
editedProject.OverrideShooterGameModeDefaultGameIni = new Dictionary<string, string>();
foreach (DataGridViewRow row in overrideShooterGameModeDefaultGameIniDataGridView.Rows)
if (row.Cells[0].Value != null)
editedProject.OverrideShooterGameModeDefaultGameIni.Add(row.Cells[0].Value.ToString(), row.Cells[1].Value != null ? row.Cells[1].Value.ToString() : "");
if (editedProject.DatabaseConnections == null)
editedProject.DatabaseConnections = new List<DatabaseConnectionInfo>();
editedProject.DatabaseConnections.Clear();
if (!string.IsNullOrWhiteSpace(DBEntry1_NameTxtBx.Text) && !string.IsNullOrWhiteSpace(DBEntry1_URLTxtBx.Text))
{
int Port = 0;
int.TryParse(DBEntry1_PortTxtBx.Text, out Port);
editedProject.DatabaseConnections.Add(new DatabaseConnectionInfo() { Name = DBEntry1_NameTxtBx.Text, URL = DBEntry1_URLTxtBx.Text, Port = Port, Password = DBEntry1_PasswordTxtBx.Text });
}
if (!string.IsNullOrWhiteSpace(DBEntry2_NameTxtBx.Text) && !string.IsNullOrWhiteSpace(DBEntry2_URLTxtBx.Text))
{
int Port = 0;
int.TryParse(DBEntry2_PortTxtBx.Text, out Port);
editedProject.DatabaseConnections.Add(new DatabaseConnectionInfo() { Name = DBEntry2_NameTxtBx.Text, URL = DBEntry2_URLTxtBx.Text, Port = Port, Password = DBEntry2_PasswordTxtBx.Text });
}
if (!string.IsNullOrWhiteSpace(DBEntry3_NameTxtBx.Text) && !string.IsNullOrWhiteSpace(DBEntry3_URLTxtBx.Text))
{
int Port = 0;
int.TryParse(DBEntry3_PortTxtBx.Text, out Port);
editedProject.DatabaseConnections.Add(new DatabaseConnectionInfo() { Name = DBEntry3_NameTxtBx.Text, URL = DBEntry3_URLTxtBx.Text, Port = Port, Password = DBEntry3_PasswordTxtBx.Text });
}
if (!string.IsNullOrWhiteSpace(DBEntry4_NameTxtBx.Text) && !string.IsNullOrWhiteSpace(DBEntry4_URLTxtBx.Text))
{
int Port = 0;
int.TryParse(DBEntry4_PortTxtBx.Text, out Port);
editedProject.DatabaseConnections.Add(new DatabaseConnectionInfo() { Name = DBEntry4_NameTxtBx.Text, URL = DBEntry4_URLTxtBx.Text, Port = Port, Password = DBEntry4_PasswordTxtBx.Text });
}
if (!string.IsNullOrWhiteSpace(DBEntry5_NameTxtBx.Text) && !string.IsNullOrWhiteSpace(DBEntry5_URLTxtBx.Text))
{
int Port = 0;
int.TryParse(DBEntry5_PortTxtBx.Text, out Port);
editedProject.DatabaseConnections.Add(new DatabaseConnectionInfo() { Name = DBEntry5_NameTxtBx.Text, URL = DBEntry5_URLTxtBx.Text, Port = Port, Password = DBEntry5_PasswordTxtBx.Text });
}
if (size > 0)
{
Dictionary<IslandInstanceData, InstanceScaling> scalingDict = new Dictionary<IslandInstanceData, InstanceScaling>();
foreach (IslandInstanceData instance in editedProject.islandInstances)
{
InstanceScaling instanceScaling = new InstanceScaling();
PointF worldLoc = new PointF(instance.worldX, instance.worldY);
instanceScaling.ParentServer = instance.GetCurrentServer(mainForm);
PointF serverCenter = new PointF(instanceScaling.ParentServer.GetWorldRect(editedProject.cellSize).Left + editedProject.cellSize / 2,
instanceScaling.ParentServer.GetWorldRect(editedProject.cellSize).Top + editedProject.cellSize / 2);
instanceScaling.DistanceToCenter = new PointF(worldLoc.X - serverCenter.X, worldLoc.Y - serverCenter.Y);
scalingDict.Add(instance, instanceScaling);
}
Dictionary<DiscoveryZoneData, InstanceScaling> discoScalingDict = new Dictionary<DiscoveryZoneData, InstanceScaling>();
foreach (DiscoveryZoneData instance in editedProject.discoZones)
{
InstanceScaling instanceScaling = new InstanceScaling();
PointF worldLoc = new PointF(instance.worldX, instance.worldY);
instanceScaling.ParentServer = instance.GetCurrentServer(mainForm);
PointF serverCenter = new PointF(instanceScaling.ParentServer.GetWorldRect(editedProject.cellSize).Left + editedProject.cellSize / 2,
instanceScaling.ParentServer.GetWorldRect(editedProject.cellSize).Top + editedProject.cellSize / 2);
instanceScaling.DistanceToCenter = new PointF(worldLoc.X - serverCenter.X, worldLoc.Y - serverCenter.Y);
discoScalingDict.Add(instance, instanceScaling);
}
editedProject.cellSize = size;
foreach (IslandInstanceData instance in editedProject.islandInstances)
{
InstanceScaling instanceScaling = scalingDict[instance];
PointF newLoc = new PointF(instanceScaling.ParentServer.GetWorldRect(editedProject.cellSize).Left + editedProject.cellSize / 2,
instanceScaling.ParentServer.GetWorldRect(editedProject.cellSize).Top + editedProject.cellSize / 2);
newLoc.X += instanceScaling.DistanceToCenter.X;
newLoc.Y += instanceScaling.DistanceToCenter.Y;
instance.SetWorldLocation(mainForm, newLoc);
}
foreach (DiscoveryZoneData instance in editedProject.discoZones)
{
InstanceScaling instanceScaling = discoScalingDict[instance];
PointF newLoc = new PointF(instanceScaling.ParentServer.GetWorldRect(editedProject.cellSize).Left + editedProject.cellSize / 2,
instanceScaling.ParentServer.GetWorldRect(editedProject.cellSize).Top + editedProject.cellSize / 2);
newLoc.X += instanceScaling.DistanceToCenter.X;
newLoc.Y += instanceScaling.DistanceToCenter.Y;
instance.SetWorldLocation(mainForm, newLoc);
}
}
//add missing servers
if (x > editedProject.numOfCellsX)
{
for (int i = editedProject.numOfCellsX; i < x; i++)
for (int j = 0; j < editedProject.numOfCellsY; j++)
editedProject.servers.Add(new Server(i, j));
}
editedProject.numOfCellsX = x;
if (y > editedProject.numOfCellsY)
{
for (int i = editedProject.numOfCellsY; i < y; i++)
for (int j = 0; j < editedProject.numOfCellsX; j++)
editedProject.servers.Add(new Server(j, i));
}
editedProject.numOfCellsY = y;
//remove removed server objects
for (int i = 0; i < editedProject.servers.Count; i++)
{
if (editedProject.servers[i].gridX >= x || editedProject.servers[i].gridY >= y)
{
editedProject.servers.RemoveAt(i);
i--;
}
}
////Fix server seamlessdataPorts
//for (int i = 0; i < editedProject.servers.Count; i++)
//{
// editedProject.servers[i].seamlessDataPort = 27000 + (editedProject.servers[i].gridX + editedProject.servers[i].gridY * editedProject.numOfCellsX);
//}
if (editedProject.TribeLogConfig == null)
editedProject.TribeLogConfig = new TribeLogConfigInfo();
editedProject.TribeLogConfig.CopyFrom(TribeLogConfig);
if (editedProject.TravelDataConfig == null)
editedProject.TravelDataConfig = new BackupConfigInfo();
editedProject.TravelDataConfig.CopyFrom(TravelDataConfig);
if (editedProject.SharedLogConfig == null)
editedProject.SharedLogConfig = new SharedLogConfigInfo();
editedProject.SharedLogConfig.CopyFrom(SharedLogConfig);
}
else
{
mainForm.CreateProject(size, x, y, worldFriendlyNameTxtBox.Text.Trim(), worldAtlasIdTxtBox.Text.Trim(), worldAtlasPasswordTxtBox.Text.Trim());
//Just edit values vs passing everything down
mainForm.currentProject.LocalS3URL = S3localURLTxtBx.Text;
mainForm.currentProject.LocalS3AccessKeyId = S3localAccesKeyIdTxtBx.Text;
mainForm.currentProject.LocalS3SecretKey = S3localSecretKeyTxtBx.Text;
mainForm.currentProject.LocalS3BucketName = S3localBucketNameTxtBx.Text;
mainForm.currentProject.LocalS3Region = S3localRegionTxtBx.Text;
mainForm.currentProject.globalGameplaySetup = globalGameplaySetupTxtBox.Text;
if (mainForm.currentProject.DatabaseConnections == null)
mainForm.currentProject.DatabaseConnections = new List<DatabaseConnectionInfo>();
mainForm.currentProject.DatabaseConnections.Clear();
if (!string.IsNullOrWhiteSpace(DBEntry1_NameTxtBx.Text) && !string.IsNullOrWhiteSpace(DBEntry1_URLTxtBx.Text))
{
int Port = 0;
int.TryParse(DBEntry1_PortTxtBx.Text, out Port);
mainForm.currentProject.DatabaseConnections.Add(new DatabaseConnectionInfo() { Name = DBEntry1_NameTxtBx.Text, URL = DBEntry1_URLTxtBx.Text, Port = Port, Password = DBEntry1_PasswordTxtBx.Text });
}
if (!string.IsNullOrWhiteSpace(DBEntry2_NameTxtBx.Text) && !string.IsNullOrWhiteSpace(DBEntry2_URLTxtBx.Text))
{
int Port = 0;
int.TryParse(DBEntry2_PortTxtBx.Text, out Port);
mainForm.currentProject.DatabaseConnections.Add(new DatabaseConnectionInfo() { Name = DBEntry2_NameTxtBx.Text, URL = DBEntry2_URLTxtBx.Text, Port = Port, Password = DBEntry2_PasswordTxtBx.Text });
}
if (!string.IsNullOrWhiteSpace(DBEntry3_NameTxtBx.Text) && !string.IsNullOrWhiteSpace(DBEntry3_URLTxtBx.Text))
{
int Port = 0;
int.TryParse(DBEntry3_PortTxtBx.Text, out Port);
mainForm.currentProject.DatabaseConnections.Add(new DatabaseConnectionInfo() { Name = DBEntry3_NameTxtBx.Text, URL = DBEntry3_URLTxtBx.Text, Port = Port, Password = DBEntry3_PasswordTxtBx.Text });
}
if (!string.IsNullOrWhiteSpace(DBEntry4_NameTxtBx.Text) && !string.IsNullOrWhiteSpace(DBEntry4_URLTxtBx.Text))
{
int Port = 0;
int.TryParse(DBEntry4_PortTxtBx.Text, out Port);
mainForm.currentProject.DatabaseConnections.Add(new DatabaseConnectionInfo() { Name = DBEntry4_NameTxtBx.Text, URL = DBEntry4_URLTxtBx.Text, Port = Port, Password = DBEntry4_PasswordTxtBx.Text });
}
if (!string.IsNullOrWhiteSpace(DBEntry5_NameTxtBx.Text) && !string.IsNullOrWhiteSpace(DBEntry5_URLTxtBx.Text))
{
int Port = 0;
int.TryParse(DBEntry5_PortTxtBx.Text, out Port);
mainForm.currentProject.DatabaseConnections.Add(new DatabaseConnectionInfo() { Name = DBEntry5_NameTxtBx.Text, URL = DBEntry5_URLTxtBx.Text, Port = Port, Password = DBEntry5_PasswordTxtBx.Text });
}
mainForm.currentProject.TribeLogConfig.CopyFrom(TribeLogConfig);
mainForm.currentProject.TravelDataConfig.CopyFrom(TravelDataConfig);
mainForm.currentProject.SharedLogConfig.CopyFrom(SharedLogConfig);
}
Close();
}
private void sizeXTxtBox_KeyPress(object sender, KeyPressEventArgs e)
{
StaticHelpers.ForceNumericKeypress(sender, e, false);
}
private void sizeYTxtBox_KeyPress(object sender, KeyPressEventArgs e)
{
StaticHelpers.ForceNumericKeypress(sender, e, false);
}
private void gridSizeTxtBox_KeyPress(object sender, KeyPressEventArgs e)
{
StaticHelpers.ForceNumericKeypress(sender, e);
}
private void tribeLogCfgBtn_Click(object sender, EventArgs e)
{
var ConfigForm = new TribeLogConfigForm();
ConfigForm.config = TribeLogConfig;
ConfigForm.ShowDialog();
}
private void travelConfigBtn_Click(object sender, EventArgs e)
{
var ConfigForm = new TravelDataConfigForm();
ConfigForm.config = TravelDataConfig;
ConfigForm.ShowDialog();
}
private void sharedLogBtn_Click(object sender, EventArgs e)
{
var ConfigForm = new SharedLogConfigForm();
ConfigForm.config = SharedLogConfig;
ConfigForm.ShowDialog();
}
}
}

View file

@ -0,0 +1,120 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>

View file

@ -0,0 +1,170 @@
namespace ServerGridEditor.Forms
{
partial class EditAllLocksForm
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.label1 = new System.Windows.Forms.Label();
this.label2 = new System.Windows.Forms.Label();
this.label3 = new System.Windows.Forms.Label();
this.lockIslndsBtn = new System.Windows.Forms.Button();
this.unlockIslndsBtn = new System.Windows.Forms.Button();
this.unlockDiscoBtn = new System.Windows.Forms.Button();
this.lockDiscoBtn = new System.Windows.Forms.Button();
this.unlockPaths = new System.Windows.Forms.Button();
this.lockPaths = new System.Windows.Forms.Button();
this.SuspendLayout();
//
// label1
//
this.label1.AutoSize = true;
this.label1.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F);
this.label1.ForeColor = System.Drawing.Color.Green;
this.label1.Location = new System.Drawing.Point(22, 30);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(60, 20);
this.label1.TabIndex = 4;
this.label1.Text = "Islands";
//
// label2
//
this.label2.AutoSize = true;
this.label2.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F);
this.label2.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(128)))), ((int)(((byte)(0)))));
this.label2.Location = new System.Drawing.Point(22, 62);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(98, 20);
this.label2.TabIndex = 5;
this.label2.Text = "Disco Zones";
//
// label3
//
this.label3.AutoSize = true;
this.label3.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F);
this.label3.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(192)))));
this.label3.Location = new System.Drawing.Point(22, 93);
this.label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(86, 20);
this.label3.TabIndex = 6;
this.label3.Text = "Ship Paths";
//
// lockIslndsBtn
//
this.lockIslndsBtn.Location = new System.Drawing.Point(139, 30);
this.lockIslndsBtn.Name = "lockIslndsBtn";
this.lockIslndsBtn.Size = new System.Drawing.Size(75, 23);
this.lockIslndsBtn.TabIndex = 7;
this.lockIslndsBtn.Text = "LockAll";
this.lockIslndsBtn.UseVisualStyleBackColor = true;
this.lockIslndsBtn.Click += new System.EventHandler(this.lockIslndsBtn_Click);
//
// unlockIslndsBtn
//
this.unlockIslndsBtn.Location = new System.Drawing.Point(230, 30);
this.unlockIslndsBtn.Name = "unlockIslndsBtn";
this.unlockIslndsBtn.Size = new System.Drawing.Size(75, 23);
this.unlockIslndsBtn.TabIndex = 8;
this.unlockIslndsBtn.Text = "UnlockAll";
this.unlockIslndsBtn.UseVisualStyleBackColor = true;
this.unlockIslndsBtn.Click += new System.EventHandler(this.unlockIslndsBtn_Click);
//
// unlockDiscoBtn
//
this.unlockDiscoBtn.Location = new System.Drawing.Point(230, 61);
this.unlockDiscoBtn.Name = "unlockDiscoBtn";
this.unlockDiscoBtn.Size = new System.Drawing.Size(75, 23);
this.unlockDiscoBtn.TabIndex = 10;
this.unlockDiscoBtn.Text = "UnlockAll";
this.unlockDiscoBtn.UseVisualStyleBackColor = true;
this.unlockDiscoBtn.Click += new System.EventHandler(this.unlockDiscoBtn_Click);
//
// lockDiscoBtn
//
this.lockDiscoBtn.Location = new System.Drawing.Point(139, 61);
this.lockDiscoBtn.Name = "lockDiscoBtn";
this.lockDiscoBtn.Size = new System.Drawing.Size(75, 23);
this.lockDiscoBtn.TabIndex = 9;
this.lockDiscoBtn.Text = "LockAll";
this.lockDiscoBtn.UseVisualStyleBackColor = true;
this.lockDiscoBtn.Click += new System.EventHandler(this.lockDiscoBtn_Click);
//
// unlockPaths
//
this.unlockPaths.Location = new System.Drawing.Point(230, 93);
this.unlockPaths.Name = "unlockPaths";
this.unlockPaths.Size = new System.Drawing.Size(75, 23);
this.unlockPaths.TabIndex = 12;
this.unlockPaths.Text = "UnlockAll";
this.unlockPaths.UseVisualStyleBackColor = true;
this.unlockPaths.Click += new System.EventHandler(this.unlockPaths_Click);
//
// lockPaths
//
this.lockPaths.Location = new System.Drawing.Point(139, 93);
this.lockPaths.Name = "lockPaths";
this.lockPaths.Size = new System.Drawing.Size(75, 23);
this.lockPaths.TabIndex = 11;
this.lockPaths.Text = "LockAll";
this.lockPaths.UseVisualStyleBackColor = true;
this.lockPaths.Click += new System.EventHandler(this.lockPaths_Click);
//
// EditAllLocksForm
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(317, 148);
this.Controls.Add(this.unlockPaths);
this.Controls.Add(this.lockPaths);
this.Controls.Add(this.unlockDiscoBtn);
this.Controls.Add(this.lockDiscoBtn);
this.Controls.Add(this.unlockIslndsBtn);
this.Controls.Add(this.lockIslndsBtn);
this.Controls.Add(this.label3);
this.Controls.Add(this.label2);
this.Controls.Add(this.label1);
this.Name = "EditAllLocksForm";
this.ShowIcon = false;
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
this.Text = "Locks";
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
private System.Windows.Forms.Label label1;
private System.Windows.Forms.Label label2;
private System.Windows.Forms.Label label3;
private System.Windows.Forms.Button lockIslndsBtn;
private System.Windows.Forms.Button unlockIslndsBtn;
private System.Windows.Forms.Button unlockDiscoBtn;
private System.Windows.Forms.Button lockDiscoBtn;
private System.Windows.Forms.Button unlockPaths;
private System.Windows.Forms.Button lockPaths;
}
}

View file

@ -0,0 +1,71 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace ServerGridEditor.Forms
{
public partial class EditAllLocksForm : Form
{
MainForm mainForm;
public EditAllLocksForm(MainForm mainForm)
{
this.mainForm = mainForm;
InitializeComponent();
}
private void lockIslndsBtn_Click(object sender, EventArgs e)
{
foreach (Server server in mainForm.currentProject.servers)
server.islandLocked = true;
mainForm.InvalidateMapPanel();
}
private void unlockIslndsBtn_Click(object sender, EventArgs e)
{
foreach (Server server in mainForm.currentProject.servers)
server.islandLocked = false;
mainForm.InvalidateMapPanel();
}
private void lockDiscoBtn_Click(object sender, EventArgs e)
{
foreach (Server server in mainForm.currentProject.servers)
server.discoLocked = true;
mainForm.InvalidateMapPanel();
}
private void unlockDiscoBtn_Click(object sender, EventArgs e)
{
foreach (Server server in mainForm.currentProject.servers)
server.discoLocked = false;
mainForm.InvalidateMapPanel();
}
private void lockPaths_Click(object sender, EventArgs e)
{
foreach (Server server in mainForm.currentProject.servers)
server.pathsLocked = true;
mainForm.InvalidateMapPanel();
}
private void unlockPaths_Click(object sender, EventArgs e)
{
foreach (Server server in mainForm.currentProject.servers)
server.pathsLocked = false;
mainForm.InvalidateMapPanel();
}
}
}

View file

@ -0,0 +1,120 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>

View file

@ -0,0 +1,246 @@
namespace ServerGridEditor.Forms
{
partial class EditDiscoZonesForm
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle3 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle4 = new System.Windows.Forms.DataGridViewCellStyle();
this.cancelBtn = new System.Windows.Forms.Button();
this.saveBtn = new System.Windows.Forms.Button();
this.discoZonesGrid = new System.Windows.Forms.DataGridView();
this.IsManual = new System.Windows.Forms.DataGridViewCheckBoxColumn();
this.zoneManualName = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.zoneName = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.zoneId = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.zoneParent = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.zoneSizeX = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.zoneSizeY = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.zoneSizeZ = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.zoneRotation = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.zoneXP = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.LocX = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.LocY = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.ExplorerNoteIndex = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.allowSea = new System.Windows.Forms.DataGridViewCheckBoxColumn();
((System.ComponentModel.ISupportInitialize)(this.discoZonesGrid)).BeginInit();
this.SuspendLayout();
//
// cancelBtn
//
this.cancelBtn.Anchor = System.Windows.Forms.AnchorStyles.Bottom;
this.cancelBtn.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F);
this.cancelBtn.Location = new System.Drawing.Point(512, 489);
this.cancelBtn.Name = "cancelBtn";
this.cancelBtn.Size = new System.Drawing.Size(130, 35);
this.cancelBtn.TabIndex = 4;
this.cancelBtn.Text = "Cancel";
this.cancelBtn.UseVisualStyleBackColor = true;
this.cancelBtn.Click += new System.EventHandler(this.cancelBtn_Click);
//
// saveBtn
//
this.saveBtn.Anchor = System.Windows.Forms.AnchorStyles.Bottom;
this.saveBtn.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.saveBtn.Location = new System.Drawing.Point(376, 489);
this.saveBtn.Name = "saveBtn";
this.saveBtn.Size = new System.Drawing.Size(130, 35);
this.saveBtn.TabIndex = 3;
this.saveBtn.Text = "Save";
this.saveBtn.UseVisualStyleBackColor = true;
this.saveBtn.Click += new System.EventHandler(this.saveBtn_Click);
//
// discoZonesGrid
//
this.discoZonesGrid.AllowUserToOrderColumns = true;
this.discoZonesGrid.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.discoZonesGrid.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
this.discoZonesGrid.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
this.IsManual,
this.zoneManualName,
this.zoneName,
this.zoneId,
this.zoneParent,
this.zoneSizeX,
this.zoneSizeY,
this.zoneSizeZ,
this.zoneRotation,
this.zoneXP,
this.LocX,
this.LocY,
this.ExplorerNoteIndex,
this.allowSea});
this.discoZonesGrid.Location = new System.Drawing.Point(12, 12);
this.discoZonesGrid.Name = "discoZonesGrid";
this.discoZonesGrid.Size = new System.Drawing.Size(1006, 471);
this.discoZonesGrid.TabIndex = 5;
//
// IsManual
//
this.IsManual.HeaderText = "isManual";
this.IsManual.Name = "IsManual";
this.IsManual.Width = 30;
//
// zoneManualName
//
this.zoneManualName.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.DisplayedCells;
this.zoneManualName.HeaderText = "ManualName";
this.zoneManualName.MinimumWidth = 250;
this.zoneManualName.Name = "zoneManualName";
this.zoneManualName.Width = 250;
//
// zoneName
//
this.zoneName.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.DisplayedCells;
this.zoneName.HeaderText = "Name";
this.zoneName.MinimumWidth = 180;
this.zoneName.Name = "zoneName";
this.zoneName.Width = 180;
//
// zoneId
//
this.zoneId.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.AllCells;
dataGridViewCellStyle3.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
this.zoneId.DefaultCellStyle = dataGridViewCellStyle3;
this.zoneId.HeaderText = "Id";
this.zoneId.Name = "zoneId";
this.zoneId.Width = 41;
//
// zoneParent
//
this.zoneParent.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.DisplayedCells;
this.zoneParent.HeaderText = "Parent";
this.zoneParent.Name = "zoneParent";
this.zoneParent.Width = 63;
//
// zoneSizeX
//
this.zoneSizeX.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.DisplayedCells;
dataGridViewCellStyle4.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
this.zoneSizeX.DefaultCellStyle = dataGridViewCellStyle4;
this.zoneSizeX.HeaderText = "SizeX";
this.zoneSizeX.MaxInputLength = 2147483647;
this.zoneSizeX.Name = "zoneSizeX";
this.zoneSizeX.Width = 59;
//
// zoneSizeY
//
this.zoneSizeY.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.DisplayedCells;
this.zoneSizeY.HeaderText = "SizeY";
this.zoneSizeY.Name = "zoneSizeY";
this.zoneSizeY.Width = 59;
//
// zoneSizeZ
//
this.zoneSizeZ.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.DisplayedCells;
this.zoneSizeZ.HeaderText = "SizeZ";
this.zoneSizeZ.Name = "zoneSizeZ";
this.zoneSizeZ.Width = 59;
//
// zoneRotation
//
this.zoneRotation.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.DisplayedCells;
this.zoneRotation.HeaderText = "Rotation";
this.zoneRotation.Name = "zoneRotation";
this.zoneRotation.Width = 72;
//
// zoneXP
//
this.zoneXP.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.DisplayedCells;
this.zoneXP.HeaderText = "XP";
this.zoneXP.Name = "zoneXP";
this.zoneXP.Width = 46;
//
// LocX
//
this.LocX.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.DisplayedCells;
this.LocX.HeaderText = "LocX";
this.LocX.Name = "LocX";
this.LocX.Visible = false;
this.LocX.Width = 57;
//
// LocY
//
this.LocY.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.DisplayedCells;
this.LocY.HeaderText = "LocY";
this.LocY.Name = "LocY";
this.LocY.Visible = false;
this.LocY.Width = 57;
//
// ExplorerNoteIndex
//
this.ExplorerNoteIndex.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.DisplayedCellsExceptHeader;
this.ExplorerNoteIndex.HeaderText = "ExplorerNoteIndex";
this.ExplorerNoteIndex.MinimumWidth = 35;
this.ExplorerNoteIndex.Name = "ExplorerNoteIndex";
this.ExplorerNoteIndex.Width = 35;
//
// allowSea
//
this.allowSea.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.DisplayedCells;
this.allowSea.HeaderText = "allowSea";
this.allowSea.Name = "allowSea";
this.allowSea.Width = 56;
//
// EditDiscoZonesForm
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(1030, 536);
this.Controls.Add(this.discoZonesGrid);
this.Controls.Add(this.cancelBtn);
this.Controls.Add(this.saveBtn);
this.Name = "EditDiscoZonesForm";
this.Text = "EditDiscoZonesForm";
((System.ComponentModel.ISupportInitialize)(this.discoZonesGrid)).EndInit();
this.ResumeLayout(false);
}
#endregion
private System.Windows.Forms.Button cancelBtn;
private System.Windows.Forms.Button saveBtn;
private System.Windows.Forms.DataGridView discoZonesGrid;
private System.Windows.Forms.DataGridViewCheckBoxColumn IsManual;
private System.Windows.Forms.DataGridViewTextBoxColumn zoneManualName;
private System.Windows.Forms.DataGridViewTextBoxColumn zoneName;
private System.Windows.Forms.DataGridViewTextBoxColumn zoneId;
private System.Windows.Forms.DataGridViewTextBoxColumn zoneParent;
private System.Windows.Forms.DataGridViewTextBoxColumn zoneSizeX;
private System.Windows.Forms.DataGridViewTextBoxColumn zoneSizeY;
private System.Windows.Forms.DataGridViewTextBoxColumn zoneSizeZ;
private System.Windows.Forms.DataGridViewTextBoxColumn zoneRotation;
private System.Windows.Forms.DataGridViewTextBoxColumn zoneXP;
private System.Windows.Forms.DataGridViewTextBoxColumn LocX;
private System.Windows.Forms.DataGridViewTextBoxColumn LocY;
private System.Windows.Forms.DataGridViewTextBoxColumn ExplorerNoteIndex;
private System.Windows.Forms.DataGridViewCheckBoxColumn allowSea;
}
}

View file

@ -0,0 +1,170 @@
using AtlasGridDataLibrary;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace ServerGridEditor.Forms
{
public partial class EditDiscoZonesForm : Form
{
MainForm mainForm;
public EditDiscoZonesForm(MainForm mainForm, Server SpecificServer = null)
{
this.mainForm = mainForm;
InitializeComponent();
foreach (DiscoveryZoneData discoZone in mainForm.currentProject.discoZones)
{
int index = discoZonesGrid.Rows.Add();
discoZonesGrid.Rows[index].Cells[zoneName.Name].Value = discoZone.name;
discoZonesGrid.Rows[index].Cells[zoneId.Name].Value = discoZone.id;
discoZonesGrid.Rows[index].Cells[zoneSizeX.Name].Value = discoZone.sizeX;
discoZonesGrid.Rows[index].Cells[zoneSizeY.Name].Value = discoZone.sizeY;
discoZonesGrid.Rows[index].Cells[zoneSizeZ.Name].Value = discoZone.sizeZ;
discoZonesGrid.Rows[index].Cells[zoneXP.Name].Value = discoZone.xp;
discoZonesGrid.Rows[index].Cells[LocX.Name].Value = discoZone.worldX;
discoZonesGrid.Rows[index].Cells[LocY.Name].Value = discoZone.worldY;
discoZonesGrid.Rows[index].Cells[zoneRotation.Name].Value = discoZone.rotation;
discoZonesGrid.Rows[index].Cells[IsManual.Name].Value = discoZone.bIsManuallyPlaced;
discoZonesGrid.Rows[index].Cells[ExplorerNoteIndex.Name].Value = discoZone.explorerNoteIndex;
discoZonesGrid.Rows[index].Cells[allowSea.Name].Value = discoZone.allowSea;
discoZonesGrid.Rows[index].Cells[zoneManualName.Name].Value = discoZone.ManualVolumeName;
foreach (Server serv in mainForm.currentProject.servers)
if (serv != null && serv.IsWorldPointInServer(new System.Drawing.PointF(discoZone.worldX, discoZone.worldY), mainForm.currentProject.cellSize))
{
discoZonesGrid.Rows[index].Cells[zoneParent.Name].Value = serv.gridX + "," + serv.gridY;
break;
}
if (SpecificServer != null && !SpecificServer.IsWorldPointInServer(new System.Drawing.PointF(discoZone.worldX, discoZone.worldY), mainForm.currentProject.cellSize))
discoZonesGrid.Rows[index].Visible = false;
}
}
private void saveBtn_Click(object sender, EventArgs e)
{
//Make sure there are no duplicate ids
HashSet<int> ids = new HashSet<int>();
foreach (DataGridViewRow row in discoZonesGrid.Rows)
{
if (row.Index == discoZonesGrid.Rows.Count - 1) continue; //Last row is the new row
int id = -1;
if(row.Cells[zoneId.Name].Value == null || !int.TryParse(row.Cells[zoneId.Name].Value.ToString(), out id))
{
MessageBox.Show("You must assign a unique numeric only id to each row", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
return;
}
if (ids.Contains(id))
{
MessageBox.Show("Duplicate ids " + id + " found\nZone ids must be unique across the atlas", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
return;
}
ids.Add(id);
}
mainForm.currentProject.discoZones.Clear();
foreach (DataGridViewRow row in discoZonesGrid.Rows)
{
if (row.Index == discoZonesGrid.Rows.Count - 1) continue; //Last row is the new row
string name = row.Cells[zoneName.Name].Value != null ? row.Cells[zoneName.Name].Value.ToString() : "";
int id = -1;
int.TryParse(row.Cells[zoneId.Name].Value.ToString(), out id);
float worldX = 0.0f;
if (row.Cells[LocX.Name].Value != null)
float.TryParse(row.Cells[LocX.Name].Value.ToString(), out worldX);
float worldY = 0.0f;
if (row.Cells[LocY.Name].Value != null)
float.TryParse(row.Cells[LocY.Name].Value.ToString(), out worldY);
float sizeX = 0.0f;
if (row.Cells[zoneSizeX.Name].Value != null)
float.TryParse(row.Cells[zoneSizeX.Name].Value.ToString(), out sizeX);
float sizeY = 0.0f;
if (row.Cells[zoneSizeY.Name].Value != null)
float.TryParse(row.Cells[zoneSizeY.Name].Value.ToString(), out sizeY);
float sizeZ = 0.0f;
if (row.Cells[zoneSizeZ.Name].Value != null)
float.TryParse(row.Cells[zoneSizeZ.Name].Value.ToString(), out sizeZ);
float rotation = 0.0f;
if (row.Cells[zoneRotation.Name].Value != null)
float.TryParse(row.Cells[zoneRotation.Name].Value.ToString(), out rotation);
float xp = 0.0f;
if (row.Cells[zoneXP.Name].Value != null)
float.TryParse(row.Cells[zoneXP.Name].Value.ToString(), out xp);
string manualZoneName = row.Cells[zoneManualName.Name].Value != null? row.Cells[zoneManualName.Name].Value.ToString() : "";
bool bAllowSea = row.Cells[allowSea.Name].Value != null ? (bool)row.Cells[allowSea.Name].Value : false;
bool bIsManual = row.Cells[IsManual.Name].Value != null? (bool)row.Cells[IsManual.Name].Value : false;
if (manualZoneName.Length == 0 && bIsManual)
{
MessageBox.Show("Empty manual zone name at index: " + row.Index.ToString(), "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
return;
}
if (bIsManual) //Put the zone in the correct server's center
{
int serverX = -1, serverY = -1;
string parent = row.Cells[zoneParent.Name].Value != null? row.Cells[zoneParent.Name].Value.ToString() : "";
string[] splits = parent.Split(',');
if(splits.Length == 2)
{
serverX = int.Parse(splits[0]);
serverY = int.Parse(splits[1]);
}
Server parentServer = mainForm.GetServerByIndex(new Point(serverX, serverY));
if (parentServer == null)
{
MessageBox.Show("Can't find parent server for manual discovery zone: " + manualZoneName, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
return;
}
else
{
worldX = parentServer.GetWorldRect(mainForm.currentProject.cellSize).X + parentServer.GetWorldRect(mainForm.currentProject.cellSize).Width / 2;
worldY = parentServer.GetWorldRect(mainForm.currentProject.cellSize).Y + parentServer.GetWorldRect(mainForm.currentProject.cellSize).Height / 2;
}
}
int explorerNoteIndex = -1;
if (row.Cells[zoneRotation.Name].Value != null)
int.TryParse(row.Cells[ExplorerNoteIndex.Name].Value.ToString(), out explorerNoteIndex);
DiscoveryZoneData discoZone = new DiscoveryZoneData().SetFrom(name, worldX, worldY, sizeX, sizeY, rotation, id);
discoZone.xp = xp;
discoZone.sizeZ = sizeZ;
discoZone.bIsManuallyPlaced = bIsManual;
discoZone.allowSea = bAllowSea;
discoZone.ManualVolumeName = manualZoneName;
discoZone.explorerNoteIndex = explorerNoteIndex;
mainForm.currentProject.discoZones.Add(discoZone);
}
mainForm.Invalidate();
Close();
}
private void cancelBtn_Click(object sender, EventArgs e)
{
Close();
}
}
}

View file

@ -0,0 +1,162 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<metadata name="IsManual.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="zoneManualName.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="zoneName.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="zoneId.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="zoneParent.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="zoneSizeX.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="zoneSizeY.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="zoneSizeZ.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="zoneRotation.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="zoneXP.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="LocX.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="LocY.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="ExplorerNoteIndex.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="allowSea.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
</root>

View file

@ -0,0 +1,245 @@
namespace ServerGridEditor.Forms
{
partial class EditDiscoveryZoneInstance
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.cancelBtn = new System.Windows.Forms.Button();
this.saveBtn = new System.Windows.Forms.Button();
this.zoneNameTxt = new System.Windows.Forms.TextBox();
this.label1 = new System.Windows.Forms.Label();
this.label2 = new System.Windows.Forms.Label();
this.zoneIdTxt = new System.Windows.Forms.TextBox();
this.label3 = new System.Windows.Forms.Label();
this.zoneSizeXTxt = new System.Windows.Forms.TextBox();
this.label4 = new System.Windows.Forms.Label();
this.zoneSizeYTxt = new System.Windows.Forms.TextBox();
this.zoneXPTxt = new System.Windows.Forms.TextBox();
this.label5 = new System.Windows.Forms.Label();
this.zoneSizeZTxt = new System.Windows.Forms.TextBox();
this.label6 = new System.Windows.Forms.Label();
this.explorerNoteIndexTxt = new System.Windows.Forms.TextBox();
this.label7 = new System.Windows.Forms.Label();
this.allowSeaCheckbox = new System.Windows.Forms.CheckBox();
this.SuspendLayout();
//
// cancelBtn
//
this.cancelBtn.Location = new System.Drawing.Point(119, 238);
this.cancelBtn.Name = "cancelBtn";
this.cancelBtn.Size = new System.Drawing.Size(92, 32);
this.cancelBtn.TabIndex = 5;
this.cancelBtn.Text = "Cancel";
this.cancelBtn.UseVisualStyleBackColor = true;
this.cancelBtn.Click += new System.EventHandler(this.cancelBtn_Click);
//
// saveBtn
//
this.saveBtn.Location = new System.Drawing.Point(12, 238);
this.saveBtn.Name = "saveBtn";
this.saveBtn.Size = new System.Drawing.Size(92, 32);
this.saveBtn.TabIndex = 4;
this.saveBtn.Text = "Save";
this.saveBtn.UseVisualStyleBackColor = true;
this.saveBtn.Click += new System.EventHandler(this.saveBtn_Click);
//
// zoneNameTxt
//
this.zoneNameTxt.Location = new System.Drawing.Point(119, 25);
this.zoneNameTxt.Name = "zoneNameTxt";
this.zoneNameTxt.Size = new System.Drawing.Size(92, 20);
this.zoneNameTxt.TabIndex = 7;
//
// label1
//
this.label1.AutoSize = true;
this.label1.Location = new System.Drawing.Point(24, 28);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(63, 13);
this.label1.TabIndex = 8;
this.label1.Text = "Zone Name";
//
// label2
//
this.label2.AutoSize = true;
this.label2.Location = new System.Drawing.Point(24, 80);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(60, 13);
this.label2.TabIndex = 10;
this.label2.Text = "Zone sizeX";
//
// zoneIdTxt
//
this.zoneIdTxt.Location = new System.Drawing.Point(119, 51);
this.zoneIdTxt.Name = "zoneIdTxt";
this.zoneIdTxt.Size = new System.Drawing.Size(92, 20);
this.zoneIdTxt.TabIndex = 9;
this.zoneIdTxt.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.zoneIdTxt_KeyPress);
//
// label3
//
this.label3.AutoSize = true;
this.label3.Location = new System.Drawing.Point(24, 106);
this.label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(63, 13);
this.label3.TabIndex = 12;
this.label3.Text = "Zone size Y";
//
// zoneSizeXTxt
//
this.zoneSizeXTxt.Location = new System.Drawing.Point(119, 77);
this.zoneSizeXTxt.Name = "zoneSizeXTxt";
this.zoneSizeXTxt.Size = new System.Drawing.Size(92, 20);
this.zoneSizeXTxt.TabIndex = 11;
//
// label4
//
this.label4.AutoSize = true;
this.label4.Location = new System.Drawing.Point(24, 54);
this.label4.Name = "label4";
this.label4.Size = new System.Drawing.Size(44, 13);
this.label4.TabIndex = 14;
this.label4.Text = "Zone Id";
//
// zoneSizeYTxt
//
this.zoneSizeYTxt.Location = new System.Drawing.Point(119, 103);
this.zoneSizeYTxt.Name = "zoneSizeYTxt";
this.zoneSizeYTxt.Size = new System.Drawing.Size(92, 20);
this.zoneSizeYTxt.TabIndex = 13;
//
// zoneXPTxt
//
this.zoneXPTxt.Location = new System.Drawing.Point(119, 155);
this.zoneXPTxt.Name = "zoneXPTxt";
this.zoneXPTxt.Size = new System.Drawing.Size(92, 20);
this.zoneXPTxt.TabIndex = 16;
this.zoneXPTxt.TextChanged += new System.EventHandler(this.zoneXPTxt_TextChanged);
this.zoneXPTxt.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.zoneXPTxt_KeyPress);
//
// label5
//
this.label5.AutoSize = true;
this.label5.Location = new System.Drawing.Point(24, 158);
this.label5.Name = "label5";
this.label5.Size = new System.Drawing.Size(49, 13);
this.label5.TabIndex = 15;
this.label5.Text = "Zone XP";
//
// zoneSizeZTxt
//
this.zoneSizeZTxt.Location = new System.Drawing.Point(119, 129);
this.zoneSizeZTxt.Name = "zoneSizeZTxt";
this.zoneSizeZTxt.Size = new System.Drawing.Size(92, 20);
this.zoneSizeZTxt.TabIndex = 18;
//
// label6
//
this.label6.AutoSize = true;
this.label6.Location = new System.Drawing.Point(24, 132);
this.label6.Name = "label6";
this.label6.Size = new System.Drawing.Size(63, 13);
this.label6.TabIndex = 17;
this.label6.Text = "Zone size Z";
//
// explorerNoteIndexTxt
//
this.explorerNoteIndexTxt.Location = new System.Drawing.Point(119, 181);
this.explorerNoteIndexTxt.Name = "explorerNoteIndexTxt";
this.explorerNoteIndexTxt.Size = new System.Drawing.Size(92, 20);
this.explorerNoteIndexTxt.TabIndex = 20;
//
// label7
//
this.label7.AutoSize = true;
this.label7.Location = new System.Drawing.Point(24, 184);
this.label7.Name = "label7";
this.label7.Size = new System.Drawing.Size(94, 13);
this.label7.TabIndex = 19;
this.label7.Text = "ExplorerNoteIndex";
//
// allowSeaCheckbox
//
this.allowSeaCheckbox.AutoSize = true;
this.allowSeaCheckbox.Location = new System.Drawing.Point(59, 207);
this.allowSeaCheckbox.Name = "allowSeaCheckbox";
this.allowSeaCheckbox.RightToLeft = System.Windows.Forms.RightToLeft.Yes;
this.allowSeaCheckbox.Size = new System.Drawing.Size(73, 17);
this.allowSeaCheckbox.TabIndex = 21;
this.allowSeaCheckbox.Text = "Allow Sea";
this.allowSeaCheckbox.UseVisualStyleBackColor = true;
//
// EditDiscoveryZoneInstance
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(224, 279);
this.Controls.Add(this.allowSeaCheckbox);
this.Controls.Add(this.explorerNoteIndexTxt);
this.Controls.Add(this.label7);
this.Controls.Add(this.zoneSizeZTxt);
this.Controls.Add(this.label6);
this.Controls.Add(this.zoneXPTxt);
this.Controls.Add(this.label5);
this.Controls.Add(this.label4);
this.Controls.Add(this.zoneSizeYTxt);
this.Controls.Add(this.label3);
this.Controls.Add(this.zoneSizeXTxt);
this.Controls.Add(this.label2);
this.Controls.Add(this.zoneIdTxt);
this.Controls.Add(this.label1);
this.Controls.Add(this.zoneNameTxt);
this.Controls.Add(this.cancelBtn);
this.Controls.Add(this.saveBtn);
this.Name = "EditDiscoveryZoneInstance";
this.Text = "EditDiscoveryZoneInstance";
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
private System.Windows.Forms.Button cancelBtn;
private System.Windows.Forms.Button saveBtn;
private System.Windows.Forms.TextBox zoneNameTxt;
private System.Windows.Forms.Label label1;
private System.Windows.Forms.Label label2;
private System.Windows.Forms.TextBox zoneIdTxt;
private System.Windows.Forms.Label label3;
private System.Windows.Forms.TextBox zoneSizeXTxt;
private System.Windows.Forms.Label label4;
private System.Windows.Forms.TextBox zoneSizeYTxt;
private System.Windows.Forms.TextBox zoneXPTxt;
private System.Windows.Forms.Label label5;
private System.Windows.Forms.TextBox zoneSizeZTxt;
private System.Windows.Forms.Label label6;
private System.Windows.Forms.TextBox explorerNoteIndexTxt;
private System.Windows.Forms.Label label7;
private System.Windows.Forms.CheckBox allowSeaCheckbox;
}
}

View file

@ -0,0 +1,68 @@
using AtlasGridDataLibrary;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace ServerGridEditor.Forms
{
public partial class EditDiscoveryZoneInstance : Form
{
DiscoveryZoneData targetInstance;
MainForm mainForm;
public EditDiscoveryZoneInstance(MainForm mainForm, DiscoveryZoneData targetInstance)
{
InitializeComponent();
this.mainForm = mainForm;
this.targetInstance = targetInstance;
this.zoneIdTxt.Text = targetInstance.id + "";
this.zoneNameTxt.Text = targetInstance.name;
this.zoneSizeXTxt.Text = targetInstance.sizeX + "";
this.zoneSizeYTxt.Text = targetInstance.sizeY + "";
this.zoneSizeZTxt.Text = targetInstance.sizeZ + "";
this.zoneXPTxt.Text = targetInstance.xp + "";
this.explorerNoteIndexTxt.Text = targetInstance.explorerNoteIndex + "";
this.allowSeaCheckbox.Checked = targetInstance.allowSea;
}
private void saveBtn_Click(object sender, EventArgs e)
{
int.TryParse(zoneIdTxt.Text, out targetInstance.id);
float.TryParse(zoneSizeYTxt.Text, out targetInstance.sizeY);
float.TryParse(zoneSizeXTxt.Text, out targetInstance.sizeX);
float.TryParse(zoneSizeZTxt.Text, out targetInstance.sizeZ);
targetInstance.name = zoneNameTxt.Text;
float.TryParse(zoneXPTxt.Text, out targetInstance.xp);
int.TryParse(explorerNoteIndexTxt.Text, out targetInstance.explorerNoteIndex);
targetInstance.allowSea = allowSeaCheckbox.Checked;
mainForm.InvalidateMapPanel();
Close();
}
private void cancelBtn_Click(object sender, EventArgs e)
{
Close();
}
private void zoneIdTxt_KeyPress(object sender, KeyPressEventArgs e)
{
StaticHelpers.ForceNumericKeypress(sender, e, false);
}
private void zoneXPTxt_KeyPress(object sender, KeyPressEventArgs e)
{
StaticHelpers.ForceNumericKeypress(sender, e, false);
}
private void zoneXPTxt_TextChanged(object sender, EventArgs e)
{
}
}
}

View file

@ -0,0 +1,120 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>

View file

@ -0,0 +1,323 @@
namespace ServerGridEditor.Forms
{
partial class EditIslandInstance
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.spawnerOverridesGrid = new System.Windows.Forms.DataGridView();
this.SpawnerName = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.SpawnerTemplate = new System.Windows.Forms.DataGridViewComboBoxColumn();
this.label1 = new System.Windows.Forms.Label();
this.saveBtn = new System.Windows.Forms.Button();
this.cancelBtn = new System.Windows.Forms.Button();
this.label2 = new System.Windows.Forms.Label();
this.spawnPointRegionOverrideTxtBox = new System.Windows.Forms.TextBox();
this.label3 = new System.Windows.Forms.Label();
this.IslandInstanceCustomDatas1TxtBox = new System.Windows.Forms.TextBox();
this.label4 = new System.Windows.Forms.Label();
this.IslandInstanceCustomDatas2TxtBox = new System.Windows.Forms.TextBox();
this.label5 = new System.Windows.Forms.Label();
this.IslandInstanceClientCustomDatas1TxtBox = new System.Windows.Forms.TextBox();
this.label6 = new System.Windows.Forms.Label();
this.IslandInstanceClientCustomDatas2TxtBox = new System.Windows.Forms.TextBox();
this.label7 = new System.Windows.Forms.Label();
this.finalNPCLevelMultiplierTxtBox = new System.Windows.Forms.TextBox();
this.label8 = new System.Windows.Forms.Label();
this.finalNPCLevelOffsetTxtBox = new System.Windows.Forms.TextBox();
this.label9 = new System.Windows.Forms.Label();
this.instanceTreasureQualityMultiplierTxtBox = new System.Windows.Forms.TextBox();
this.label10 = new System.Windows.Forms.Label();
this.instanceTreasureQualityAdditionTxtBox = new System.Windows.Forms.TextBox();
((System.ComponentModel.ISupportInitialize)(this.spawnerOverridesGrid)).BeginInit();
this.SuspendLayout();
//
// spawnerOverridesGrid
//
this.spawnerOverridesGrid.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
this.spawnerOverridesGrid.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
this.SpawnerName,
this.SpawnerTemplate});
this.spawnerOverridesGrid.Location = new System.Drawing.Point(17, 358);
this.spawnerOverridesGrid.Name = "spawnerOverridesGrid";
this.spawnerOverridesGrid.Size = new System.Drawing.Size(323, 238);
this.spawnerOverridesGrid.TabIndex = 0;
//
// SpawnerName
//
this.SpawnerName.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill;
this.SpawnerName.HeaderText = "Spawner Name";
this.SpawnerName.Name = "SpawnerName";
//
// SpawnerTemplate
//
this.SpawnerTemplate.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill;
this.SpawnerTemplate.HeaderText = "Spawner Template";
this.SpawnerTemplate.Name = "SpawnerTemplate";
//
// label1
//
this.label1.AccessibleRole = System.Windows.Forms.AccessibleRole.None;
this.label1.AutoSize = true;
this.label1.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.label1.Location = new System.Drawing.Point(17, 335);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(143, 20);
this.label1.TabIndex = 1;
this.label1.Text = "Spawner Overrides";
//
// saveBtn
//
this.saveBtn.Location = new System.Drawing.Point(79, 612);
this.saveBtn.Name = "saveBtn";
this.saveBtn.Size = new System.Drawing.Size(92, 32);
this.saveBtn.TabIndex = 2;
this.saveBtn.Text = "Save";
this.saveBtn.UseVisualStyleBackColor = true;
this.saveBtn.Click += new System.EventHandler(this.saveBtn_Click);
//
// cancelBtn
//
this.cancelBtn.Location = new System.Drawing.Point(192, 612);
this.cancelBtn.Name = "cancelBtn";
this.cancelBtn.Size = new System.Drawing.Size(92, 32);
this.cancelBtn.TabIndex = 3;
this.cancelBtn.Text = "Cancel";
this.cancelBtn.UseVisualStyleBackColor = true;
this.cancelBtn.Click += new System.EventHandler(this.cancelBtn_Click);
//
// label2
//
this.label2.AutoSize = true;
this.label2.Location = new System.Drawing.Point(93, 25);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(139, 13);
this.label2.TabIndex = 5;
this.label2.Text = "spawnPointRegionOverride:";
//
// spawnPointRegionOverrideTxtBox
//
this.spawnPointRegionOverrideTxtBox.Location = new System.Drawing.Point(240, 22);
this.spawnPointRegionOverrideTxtBox.Name = "spawnPointRegionOverrideTxtBox";
this.spawnPointRegionOverrideTxtBox.Size = new System.Drawing.Size(55, 20);
this.spawnPointRegionOverrideTxtBox.TabIndex = 4;
//
// label3
//
this.label3.AutoSize = true;
this.label3.Location = new System.Drawing.Point(12, 168);
this.label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(148, 13);
this.label3.TabIndex = 7;
this.label3.Text = "IslandInstanceCustomDatas1:";
//
// IslandInstanceCustomDatas1TxtBox
//
this.IslandInstanceCustomDatas1TxtBox.Location = new System.Drawing.Point(15, 184);
this.IslandInstanceCustomDatas1TxtBox.Name = "IslandInstanceCustomDatas1TxtBox";
this.IslandInstanceCustomDatas1TxtBox.Size = new System.Drawing.Size(325, 20);
this.IslandInstanceCustomDatas1TxtBox.TabIndex = 6;
//
// label4
//
this.label4.AutoSize = true;
this.label4.Location = new System.Drawing.Point(12, 205);
this.label4.Name = "label4";
this.label4.Size = new System.Drawing.Size(148, 13);
this.label4.TabIndex = 9;
this.label4.Text = "IslandInstanceCustomDatas2:";
//
// IslandInstanceCustomDatas2TxtBox
//
this.IslandInstanceCustomDatas2TxtBox.Location = new System.Drawing.Point(15, 221);
this.IslandInstanceCustomDatas2TxtBox.Name = "IslandInstanceCustomDatas2TxtBox";
this.IslandInstanceCustomDatas2TxtBox.Size = new System.Drawing.Size(325, 20);
this.IslandInstanceCustomDatas2TxtBox.TabIndex = 8;
//
// label5
//
this.label5.AutoSize = true;
this.label5.Location = new System.Drawing.Point(12, 254);
this.label5.Name = "label5";
this.label5.Size = new System.Drawing.Size(174, 13);
this.label5.TabIndex = 11;
this.label5.Text = "IslandInstanceClientCustomDatas1:";
//
// IslandInstanceClientCustomDatas1TxtBox
//
this.IslandInstanceClientCustomDatas1TxtBox.Location = new System.Drawing.Point(15, 270);
this.IslandInstanceClientCustomDatas1TxtBox.Name = "IslandInstanceClientCustomDatas1TxtBox";
this.IslandInstanceClientCustomDatas1TxtBox.Size = new System.Drawing.Size(325, 20);
this.IslandInstanceClientCustomDatas1TxtBox.TabIndex = 10;
//
// label6
//
this.label6.AutoSize = true;
this.label6.Location = new System.Drawing.Point(12, 292);
this.label6.Name = "label6";
this.label6.Size = new System.Drawing.Size(174, 13);
this.label6.TabIndex = 13;
this.label6.Text = "IslandInstanceClientCustomDatas2:";
//
// IslandInstanceClientCustomDatas2TxtBox
//
this.IslandInstanceClientCustomDatas2TxtBox.Location = new System.Drawing.Point(15, 308);
this.IslandInstanceClientCustomDatas2TxtBox.Name = "IslandInstanceClientCustomDatas2TxtBox";
this.IslandInstanceClientCustomDatas2TxtBox.Size = new System.Drawing.Size(325, 20);
this.IslandInstanceClientCustomDatas2TxtBox.TabIndex = 12;
//
// label7
//
this.label7.AutoSize = true;
this.label7.Location = new System.Drawing.Point(114, 51);
this.label7.Name = "label7";
this.label7.Size = new System.Drawing.Size(118, 13);
this.label7.TabIndex = 15;
this.label7.Text = "finalNPCLevelMultiplier:";
//
// finalNPCLevelMultiplierTxtBox
//
this.finalNPCLevelMultiplierTxtBox.Location = new System.Drawing.Point(240, 48);
this.finalNPCLevelMultiplierTxtBox.Name = "finalNPCLevelMultiplierTxtBox";
this.finalNPCLevelMultiplierTxtBox.Size = new System.Drawing.Size(55, 20);
this.finalNPCLevelMultiplierTxtBox.TabIndex = 14;
//
// label8
//
this.label8.AutoSize = true;
this.label8.Location = new System.Drawing.Point(127, 77);
this.label8.Name = "label8";
this.label8.Size = new System.Drawing.Size(105, 13);
this.label8.TabIndex = 17;
this.label8.Text = "finalNPCLevelOffset:";
//
// finalNPCLevelOffsetTxtBox
//
this.finalNPCLevelOffsetTxtBox.Location = new System.Drawing.Point(240, 74);
this.finalNPCLevelOffsetTxtBox.Name = "finalNPCLevelOffsetTxtBox";
this.finalNPCLevelOffsetTxtBox.Size = new System.Drawing.Size(55, 20);
this.finalNPCLevelOffsetTxtBox.TabIndex = 16;
//
// label9
//
this.label9.AutoSize = true;
this.label9.Location = new System.Drawing.Point(67, 103);
this.label9.Name = "label9";
this.label9.Size = new System.Drawing.Size(165, 13);
this.label9.TabIndex = 19;
this.label9.Text = "instanceTreasureQualityMultiplier:";
//
// instanceTreasureQualityMultiplierTxtBox
//
this.instanceTreasureQualityMultiplierTxtBox.Location = new System.Drawing.Point(240, 100);
this.instanceTreasureQualityMultiplierTxtBox.Name = "instanceTreasureQualityMultiplierTxtBox";
this.instanceTreasureQualityMultiplierTxtBox.Size = new System.Drawing.Size(55, 20);
this.instanceTreasureQualityMultiplierTxtBox.TabIndex = 18;
//
// label10
//
this.label10.AutoSize = true;
this.label10.Location = new System.Drawing.Point(70, 129);
this.label10.Name = "label10";
this.label10.Size = new System.Drawing.Size(162, 13);
this.label10.TabIndex = 21;
this.label10.Text = "instanceTreasureQualityAddition:";
//
// instanceTreasureQualityAdditionTxtBox
//
this.instanceTreasureQualityAdditionTxtBox.Location = new System.Drawing.Point(240, 126);
this.instanceTreasureQualityAdditionTxtBox.Name = "instanceTreasureQualityAdditionTxtBox";
this.instanceTreasureQualityAdditionTxtBox.Size = new System.Drawing.Size(55, 20);
this.instanceTreasureQualityAdditionTxtBox.TabIndex = 20;
//
// EditIslandInstance
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(347, 660);
this.Controls.Add(this.label10);
this.Controls.Add(this.instanceTreasureQualityAdditionTxtBox);
this.Controls.Add(this.label9);
this.Controls.Add(this.instanceTreasureQualityMultiplierTxtBox);
this.Controls.Add(this.label8);
this.Controls.Add(this.finalNPCLevelOffsetTxtBox);
this.Controls.Add(this.label7);
this.Controls.Add(this.finalNPCLevelMultiplierTxtBox);
this.Controls.Add(this.label6);
this.Controls.Add(this.IslandInstanceClientCustomDatas2TxtBox);
this.Controls.Add(this.label5);
this.Controls.Add(this.IslandInstanceClientCustomDatas1TxtBox);
this.Controls.Add(this.label4);
this.Controls.Add(this.IslandInstanceCustomDatas2TxtBox);
this.Controls.Add(this.label3);
this.Controls.Add(this.IslandInstanceCustomDatas1TxtBox);
this.Controls.Add(this.label2);
this.Controls.Add(this.spawnPointRegionOverrideTxtBox);
this.Controls.Add(this.cancelBtn);
this.Controls.Add(this.saveBtn);
this.Controls.Add(this.label1);
this.Controls.Add(this.spawnerOverridesGrid);
this.MaximizeBox = false;
this.MinimizeBox = false;
this.Name = "EditIslandInstance";
this.ShowIcon = false;
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
this.Text = "Edit Island Instance";
this.TopMost = true;
((System.ComponentModel.ISupportInitialize)(this.spawnerOverridesGrid)).EndInit();
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
private System.Windows.Forms.DataGridView spawnerOverridesGrid;
private System.Windows.Forms.DataGridViewTextBoxColumn SpawnerName;
private System.Windows.Forms.DataGridViewComboBoxColumn SpawnerTemplate;
private System.Windows.Forms.Label label1;
private System.Windows.Forms.Button saveBtn;
private System.Windows.Forms.Button cancelBtn;
private System.Windows.Forms.Label label2;
private System.Windows.Forms.TextBox spawnPointRegionOverrideTxtBox;
private System.Windows.Forms.Label label3;
private System.Windows.Forms.TextBox IslandInstanceCustomDatas1TxtBox;
private System.Windows.Forms.Label label4;
private System.Windows.Forms.TextBox IslandInstanceCustomDatas2TxtBox;
private System.Windows.Forms.Label label5;
private System.Windows.Forms.TextBox IslandInstanceClientCustomDatas1TxtBox;
private System.Windows.Forms.Label label6;
private System.Windows.Forms.TextBox IslandInstanceClientCustomDatas2TxtBox;
private System.Windows.Forms.Label label7;
private System.Windows.Forms.TextBox finalNPCLevelMultiplierTxtBox;
private System.Windows.Forms.Label label8;
private System.Windows.Forms.TextBox finalNPCLevelOffsetTxtBox;
private System.Windows.Forms.Label label9;
private System.Windows.Forms.TextBox instanceTreasureQualityMultiplierTxtBox;
private System.Windows.Forms.Label label10;
private System.Windows.Forms.TextBox instanceTreasureQualityAdditionTxtBox;
}
}

View file

@ -0,0 +1,151 @@
using AtlasGridDataLibrary;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace ServerGridEditor.Forms
{
public partial class EditIslandInstance : Form
{
IslandInstanceData targetInstance;
MainForm mainForm;
public EditIslandInstance(MainForm mainForm, IslandInstanceData targetInstance)
{
this.mainForm = mainForm;
this.targetInstance = targetInstance;
InitializeComponent();
targetInstance.SyncOverridesWithTemplates(mainForm);
foreach (SpawnerInfoData spawnerInfo in mainForm.spawners.spawnersInfo)
SpawnerTemplate.Items.Add((string)spawnerInfo.Name);
spawnPointRegionOverrideTxtBox.Text = targetInstance.spawnPointRegionOverride.ToString();
finalNPCLevelMultiplierTxtBox.Text = (targetInstance.finalNPCLevelMultiplier == 1.0f) ? "1.0" :targetInstance.finalNPCLevelMultiplier.ToString();
finalNPCLevelOffsetTxtBox.Text = targetInstance.finalNPCLevelOffset.ToString();
instanceTreasureQualityMultiplierTxtBox.Text = (targetInstance.instanceTreasureQualityMultiplier == 1.0f) ? "1.0" : targetInstance.instanceTreasureQualityMultiplier.ToString();
instanceTreasureQualityAdditionTxtBox.Text = (targetInstance.instanceTreasureQualityAddition == 0.0f) ? "0.0" : targetInstance.instanceTreasureQualityAddition.ToString();
IslandInstanceCustomDatas1TxtBox.Text = targetInstance.IslandInstanceCustomDatas1;
IslandInstanceCustomDatas2TxtBox.Text = targetInstance.IslandInstanceCustomDatas2;
IslandInstanceClientCustomDatas1TxtBox.Text = targetInstance.IslandInstanceClientCustomDatas1;
IslandInstanceClientCustomDatas2TxtBox.Text = targetInstance.IslandInstanceClientCustomDatas2;
if (targetInstance.spawnerOverrides != null)
{
foreach (KeyValuePair<string, string> overrides in targetInstance.spawnerOverrides)
{
int index = spawnerOverridesGrid.Rows.Add();
spawnerOverridesGrid.Rows[index].Cells[SpawnerName.Name].Value = overrides.Key;
if (SpawnerTemplate.Items.Contains(overrides.Value))
spawnerOverridesGrid.Rows[index].Cells[SpawnerTemplate.Name].Value = overrides.Value;
}
}
}
private void saveBtn_Click(object sender, EventArgs e)
{
int NewspawnPointRegionOverride = -1;
if (!int.TryParse(spawnPointRegionOverrideTxtBox.Text, out NewspawnPointRegionOverride))
{
MessageBox.Show("Invalid number for spawnPointRegionOverride", "Alert", MessageBoxButtons.OK, MessageBoxIcon.Error);
this.DialogResult = DialogResult.Cancel;
return;
}
float NewfinalNPCLevelMultiplier = 1.0f;
if (!float.TryParse(finalNPCLevelMultiplierTxtBox.Text, out NewfinalNPCLevelMultiplier))
{
MessageBox.Show("Invalid number for finalNPCLevelMultiplier", "Alert", MessageBoxButtons.OK, MessageBoxIcon.Error);
this.DialogResult = DialogResult.Cancel;
return;
}
int NewfinalNPCLevelOffset = 0;
if (!int.TryParse(finalNPCLevelOffsetTxtBox.Text, out NewfinalNPCLevelOffset))
{
MessageBox.Show("Invalid number for finalNPCLevelOffset", "Alert", MessageBoxButtons.OK, MessageBoxIcon.Error);
this.DialogResult = DialogResult.Cancel;
return;
}
float NewinstanceTreasureQualityMultiplier = 1.0f;
if (!float.TryParse(instanceTreasureQualityMultiplierTxtBox.Text, out NewinstanceTreasureQualityMultiplier))
{
MessageBox.Show("Invalid number for instanceTreasureQualityMultiplier", "Alert", MessageBoxButtons.OK, MessageBoxIcon.Error);
this.DialogResult = DialogResult.Cancel;
return;
}
float NewinstanceTreasureQualityAddition = 1.0f;
if (!float.TryParse(instanceTreasureQualityAdditionTxtBox.Text, out NewinstanceTreasureQualityAddition))
{
MessageBox.Show("Invalid number for instanceTreasureQualityAddition", "Alert", MessageBoxButtons.OK, MessageBoxIcon.Error);
this.DialogResult = DialogResult.Cancel;
return;
}
//Make sure there are no duplicate names
HashSet<string> names = new HashSet<string>();
foreach (DataGridViewRow row in spawnerOverridesGrid.Rows)
{
if (row.Index == spawnerOverridesGrid.Rows.Count - 1) continue; //Last row is the new row
string name = (string)row.Cells[SpawnerName.Name].Value;
if (names.Contains(name))
{
//Duplicate name
MessageBox.Show("Duplicate names found\nOverride names must be unique", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
return;
}
names.Add(name);
}
foreach (DataGridViewRow row in spawnerOverridesGrid.Rows)
{
if (row.Index == spawnerOverridesGrid.Rows.Count - 1) continue; //Last row is the new row
string val = (string)row.Cells[SpawnerTemplate.Name].Value;
if (string.IsNullOrEmpty(val))
{
//invalid template
MessageBox.Show(string.Format("Template not selected for {0}", (string)row.Cells[SpawnerName.Name].Value), "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
return;
}
}
targetInstance.spawnPointRegionOverride = NewspawnPointRegionOverride;
targetInstance.finalNPCLevelMultiplier = NewfinalNPCLevelMultiplier;
targetInstance.finalNPCLevelOffset = NewfinalNPCLevelOffset;
targetInstance.instanceTreasureQualityMultiplier = NewinstanceTreasureQualityMultiplier;
targetInstance.instanceTreasureQualityAddition = NewinstanceTreasureQualityAddition;
targetInstance.IslandInstanceCustomDatas1 = IslandInstanceCustomDatas1TxtBox.Text;
targetInstance.IslandInstanceCustomDatas2 = IslandInstanceCustomDatas2TxtBox.Text;
targetInstance.IslandInstanceClientCustomDatas1 = IslandInstanceClientCustomDatas1TxtBox.Text;
targetInstance.IslandInstanceClientCustomDatas2 = IslandInstanceClientCustomDatas2TxtBox.Text;
targetInstance.spawnerOverrides = new Dictionary<string, string>();
foreach (DataGridViewRow row in spawnerOverridesGrid.Rows)
{
if (row.Index == spawnerOverridesGrid.Rows.Count - 1) continue; //Last row is the new row
string name = (string)row.Cells[SpawnerName.Name].Value;
string template = (string)row.Cells[SpawnerTemplate.Name].Value;
targetInstance.spawnerOverrides.Add(name, template);
}
Close();
}
private void cancelBtn_Click(object sender, EventArgs e)
{
Close();
}
}
}

View file

@ -0,0 +1,126 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<metadata name="SpawnerName.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="SpawnerTemplate.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
</root>

View file

@ -0,0 +1,820 @@
namespace ServerGridEditor
{
partial class EditServerForm
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.label1 = new System.Windows.Forms.Label();
this.label2 = new System.Windows.Forms.Label();
this.portTxtBox = new System.Windows.Forms.TextBox();
this.gamePortTxtBox = new System.Windows.Forms.TextBox();
this.saveBtn = new System.Windows.Forms.Button();
this.ipTxtBox = new System.Windows.Forms.TextBox();
this.cancelBtn = new System.Windows.Forms.Button();
this.label5 = new System.Windows.Forms.Label();
this.homeServerCheckbox = new System.Windows.Forms.CheckBox();
this.runTestsBtn = new System.Windows.Forms.Button();
this.nameTxtBox = new System.Windows.Forms.TextBox();
this.label3 = new System.Windows.Forms.Label();
this.label4 = new System.Windows.Forms.Label();
this.FloorZDist = new System.Windows.Forms.TextBox();
this.OceanDinoDepthEntriesOverrideLbl = new System.Windows.Forms.Label();
this.OceanDinoDepthEntriesOverrideTxtBox = new System.Windows.Forms.TextBox();
this.label6 = new System.Windows.Forms.Label();
this.OceanFloatsamCratesOverrideTxtBox = new System.Windows.Forms.TextBox();
this.label9 = new System.Windows.Forms.Label();
this.label8 = new System.Windows.Forms.Label();
this.transitionMinZTxtBox = new System.Windows.Forms.TextBox();
this.label7 = new System.Windows.Forms.Label();
this.label10 = new System.Windows.Forms.Label();
this.utcOffsetTxtBox = new System.Windows.Forms.TextBox();
this.label11 = new System.Windows.Forms.Label();
this.TreasureMapLootTablesOverrideTxtBox = new System.Windows.Forms.TextBox();
this.label12 = new System.Windows.Forms.Label();
this.seamlessDataPortTxt = new System.Windows.Forms.TextBox();
this.label13 = new System.Windows.Forms.Label();
this.GlobalBiomeSeamlessServerGridPreOffsetValuesTxtBox = new System.Windows.Forms.TextBox();
this.label14 = new System.Windows.Forms.Label();
this.GlobalBiomeSeamlessServerGridPreOffsetValuesOceanWaterTxtBox = new System.Windows.Forms.TextBox();
this.editSpawnRegions = new System.Windows.Forms.Button();
this.additionalCmdLineParamsTxtBox = new System.Windows.Forms.TextBox();
this.label15 = new System.Windows.Forms.Label();
this.label29 = new System.Windows.Forms.Label();
this.overrideShooterGameModeDefaultGameIniDataGridView = new System.Windows.Forms.DataGridView();
this.label16 = new System.Windows.Forms.Label();
this.extraSublevelTxtBox = new System.Windows.Forms.TextBox();
this.oceanEpicSpawnEntriesOverrideTemplateNameTxtBox = new System.Windows.Forms.TextBox();
this.label17 = new System.Windows.Forms.Label();
this.NPCShipSpawnEntriesOverrideTemplateNameTxtBox = new System.Windows.Forms.TextBox();
this.label18 = new System.Windows.Forms.Label();
this.regionOverridesTxtBox = new System.Windows.Forms.TextBox();
this.label19 = new System.Windows.Forms.Label();
this.coordsLbl = new System.Windows.Forms.Label();
this.label20 = new System.Windows.Forms.Label();
this.skyStyleIndexTxtBox = new System.Windows.Forms.TextBox();
this.label21 = new System.Windows.Forms.Label();
this.waterColorRTxtBox = new System.Windows.Forms.TextBox();
this.waterColorGTxtBox = new System.Windows.Forms.TextBox();
this.waterColorBTxtBox = new System.Windows.Forms.TextBox();
this.label22 = new System.Windows.Forms.Label();
this.label23 = new System.Windows.Forms.Label();
this.label24 = new System.Windows.Forms.Label();
this.ServerCustomDatas1TxtBox = new System.Windows.Forms.TextBox();
this.label25 = new System.Windows.Forms.Label();
this.ServerCustomDatas2TxtBox = new System.Windows.Forms.TextBox();
this.label26 = new System.Windows.Forms.Label();
this.ClientCustomDatas2TxtBox = new System.Windows.Forms.TextBox();
this.label27 = new System.Windows.Forms.Label();
this.ClientCustomDatas1TxtBox = new System.Windows.Forms.TextBox();
this.label28 = new System.Windows.Forms.Label();
this.label30 = new System.Windows.Forms.Label();
this.templateComboBox = new System.Windows.Forms.ComboBox();
this.OceanEpicSpawnEntriesOverrideValuesTxtBox = new System.Windows.Forms.TextBox();
this.label31 = new System.Windows.Forms.Label();
((System.ComponentModel.ISupportInitialize)(this.overrideShooterGameModeDefaultGameIniDataGridView)).BeginInit();
this.SuspendLayout();
//
// label1
//
this.label1.AutoSize = true;
this.label1.Location = new System.Drawing.Point(7, 40);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(20, 13);
this.label1.TabIndex = 1;
this.label1.Text = "IP:";
//
// label2
//
this.label2.AutoSize = true;
this.label2.Location = new System.Drawing.Point(6, 70);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(29, 13);
this.label2.TabIndex = 3;
this.label2.Text = "Port:";
//
// portTxtBox
//
this.portTxtBox.Location = new System.Drawing.Point(46, 67);
this.portTxtBox.Name = "portTxtBox";
this.portTxtBox.Size = new System.Drawing.Size(55, 20);
this.portTxtBox.TabIndex = 2;
this.portTxtBox.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.portTxtBox_KeyPress);
//
// gamePortTxtBox
//
this.gamePortTxtBox.Location = new System.Drawing.Point(189, 70);
this.gamePortTxtBox.Name = "gamePortTxtBox";
this.gamePortTxtBox.Size = new System.Drawing.Size(55, 20);
this.gamePortTxtBox.TabIndex = 4;
this.gamePortTxtBox.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.gamePortTxtBox_KeyPress);
//
// saveBtn
//
this.saveBtn.Location = new System.Drawing.Point(7, 679);
this.saveBtn.Name = "saveBtn";
this.saveBtn.Size = new System.Drawing.Size(94, 32);
this.saveBtn.TabIndex = 9;
this.saveBtn.Text = "Save";
this.saveBtn.UseVisualStyleBackColor = true;
this.saveBtn.Click += new System.EventHandler(this.createBtn_Click);
//
// ipTxtBox
//
this.ipTxtBox.Location = new System.Drawing.Point(46, 38);
this.ipTxtBox.Name = "ipTxtBox";
this.ipTxtBox.Size = new System.Drawing.Size(133, 20);
this.ipTxtBox.TabIndex = 13;
//
// cancelBtn
//
this.cancelBtn.Location = new System.Drawing.Point(107, 679);
this.cancelBtn.Name = "cancelBtn";
this.cancelBtn.Size = new System.Drawing.Size(96, 32);
this.cancelBtn.TabIndex = 10;
this.cancelBtn.Text = "Cancel";
this.cancelBtn.UseVisualStyleBackColor = true;
this.cancelBtn.Click += new System.EventHandler(this.cancelBtn_Click);
//
// label5
//
this.label5.AutoSize = true;
this.label5.Location = new System.Drawing.Point(119, 72);
this.label5.Name = "label5";
this.label5.Size = new System.Drawing.Size(60, 13);
this.label5.TabIndex = 12;
this.label5.Text = "Game Port:";
//
// homeServerCheckbox
//
this.homeServerCheckbox.AutoSize = true;
this.homeServerCheckbox.Location = new System.Drawing.Point(19, 650);
this.homeServerCheckbox.Name = "homeServerCheckbox";
this.homeServerCheckbox.RightToLeft = System.Windows.Forms.RightToLeft.Yes;
this.homeServerCheckbox.Size = new System.Drawing.Size(88, 17);
this.homeServerCheckbox.TabIndex = 14;
this.homeServerCheckbox.Text = "Home Server";
this.homeServerCheckbox.UseVisualStyleBackColor = true;
//
// runTestsBtn
//
this.runTestsBtn.Location = new System.Drawing.Point(243, 679);
this.runTestsBtn.Name = "runTestsBtn";
this.runTestsBtn.Size = new System.Drawing.Size(96, 32);
this.runTestsBtn.TabIndex = 15;
this.runTestsBtn.Text = "Launch Preview";
this.runTestsBtn.UseVisualStyleBackColor = true;
this.runTestsBtn.Click += new System.EventHandler(this.runTestsBtn_Click);
//
// nameTxtBox
//
this.nameTxtBox.Location = new System.Drawing.Point(46, 12);
this.nameTxtBox.Name = "nameTxtBox";
this.nameTxtBox.Size = new System.Drawing.Size(133, 20);
this.nameTxtBox.TabIndex = 17;
//
// label3
//
this.label3.AutoSize = true;
this.label3.Location = new System.Drawing.Point(5, 15);
this.label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(38, 13);
this.label3.TabIndex = 16;
this.label3.Text = "Name:";
//
// label4
//
this.label4.AutoSize = true;
this.label4.Location = new System.Drawing.Point(9, 115);
this.label4.Name = "label4";
this.label4.Size = new System.Drawing.Size(150, 13);
this.label4.TabIndex = 19;
this.label4.Text = "OceanFloorZDistFromSurface:";
//
// FloorZDist
//
this.FloorZDist.Location = new System.Drawing.Point(164, 112);
this.FloorZDist.Name = "FloorZDist";
this.FloorZDist.Size = new System.Drawing.Size(55, 20);
this.FloorZDist.TabIndex = 18;
//
// OceanDinoDepthEntriesOverrideLbl
//
this.OceanDinoDepthEntriesOverrideLbl.AutoSize = true;
this.OceanDinoDepthEntriesOverrideLbl.Location = new System.Drawing.Point(364, 141);
this.OceanDinoDepthEntriesOverrideLbl.Name = "OceanDinoDepthEntriesOverrideLbl";
this.OceanDinoDepthEntriesOverrideLbl.Size = new System.Drawing.Size(165, 13);
this.OceanDinoDepthEntriesOverrideLbl.TabIndex = 21;
this.OceanDinoDepthEntriesOverrideLbl.Text = "OceanDinoDepthEntriesOverride:";
//
// OceanDinoDepthEntriesOverrideTxtBox
//
this.OceanDinoDepthEntriesOverrideTxtBox.Location = new System.Drawing.Point(371, 157);
this.OceanDinoDepthEntriesOverrideTxtBox.Multiline = true;
this.OceanDinoDepthEntriesOverrideTxtBox.Name = "OceanDinoDepthEntriesOverrideTxtBox";
this.OceanDinoDepthEntriesOverrideTxtBox.Size = new System.Drawing.Size(285, 83);
this.OceanDinoDepthEntriesOverrideTxtBox.TabIndex = 20;
//
// label6
//
this.label6.AutoSize = true;
this.label6.Location = new System.Drawing.Point(364, 255);
this.label6.Name = "label6";
this.label6.Size = new System.Drawing.Size(154, 13);
this.label6.TabIndex = 23;
this.label6.Text = "OceanFloatsamCratesOverride:";
//
// OceanFloatsamCratesOverrideTxtBox
//
this.OceanFloatsamCratesOverrideTxtBox.Location = new System.Drawing.Point(367, 272);
this.OceanFloatsamCratesOverrideTxtBox.Multiline = true;
this.OceanFloatsamCratesOverrideTxtBox.Name = "OceanFloatsamCratesOverrideTxtBox";
this.OceanFloatsamCratesOverrideTxtBox.Size = new System.Drawing.Size(289, 90);
this.OceanFloatsamCratesOverrideTxtBox.TabIndex = 22;
//
// label9
//
this.label9.AutoSize = true;
this.label9.Location = new System.Drawing.Point(186, 174);
this.label9.Name = "label9";
this.label9.Size = new System.Drawing.Size(63, 13);
this.label9.TabIndex = 33;
this.label9.Text = "(ex: -12000)";
//
// label8
//
this.label8.AutoSize = true;
this.label8.Location = new System.Drawing.Point(8, 174);
this.label8.Name = "label8";
this.label8.Size = new System.Drawing.Size(83, 13);
this.label8.TabIndex = 32;
this.label8.Text = "Transition MinZ:";
//
// transitionMinZTxtBox
//
this.transitionMinZTxtBox.Location = new System.Drawing.Point(93, 170);
this.transitionMinZTxtBox.Name = "transitionMinZTxtBox";
this.transitionMinZTxtBox.Size = new System.Drawing.Size(86, 20);
this.transitionMinZTxtBox.TabIndex = 31;
//
// label7
//
this.label7.AutoSize = true;
this.label7.Location = new System.Drawing.Point(164, 143);
this.label7.Name = "label7";
this.label7.Size = new System.Drawing.Size(60, 13);
this.label7.TabIndex = 30;
this.label7.Text = "(in minutes)";
//
// label10
//
this.label10.AutoSize = true;
this.label10.Location = new System.Drawing.Point(8, 143);
this.label10.Name = "label10";
this.label10.Size = new System.Drawing.Size(63, 13);
this.label10.TabIndex = 29;
this.label10.Text = "UTC Offset:";
//
// utcOffsetTxtBox
//
this.utcOffsetTxtBox.Location = new System.Drawing.Point(72, 140);
this.utcOffsetTxtBox.Name = "utcOffsetTxtBox";
this.utcOffsetTxtBox.Size = new System.Drawing.Size(86, 20);
this.utcOffsetTxtBox.TabIndex = 28;
//
// label11
//
this.label11.AutoSize = true;
this.label11.Location = new System.Drawing.Point(364, 364);
this.label11.Name = "label11";
this.label11.Size = new System.Drawing.Size(166, 13);
this.label11.TabIndex = 35;
this.label11.Text = "TreasureMapLootTablesOverride:";
//
// TreasureMapLootTablesOverrideTxtBox
//
this.TreasureMapLootTablesOverrideTxtBox.Location = new System.Drawing.Point(367, 381);
this.TreasureMapLootTablesOverrideTxtBox.Multiline = true;
this.TreasureMapLootTablesOverrideTxtBox.Name = "TreasureMapLootTablesOverrideTxtBox";
this.TreasureMapLootTablesOverrideTxtBox.Size = new System.Drawing.Size(289, 90);
this.TreasureMapLootTablesOverrideTxtBox.TabIndex = 34;
//
// label12
//
this.label12.AutoSize = true;
this.label12.Location = new System.Drawing.Point(7, 94);
this.label12.Name = "label12";
this.label12.Size = new System.Drawing.Size(94, 13);
this.label12.TabIndex = 37;
this.label12.Text = "SeamlessDataPort";
//
// seamlessDataPortTxt
//
this.seamlessDataPortTxt.Location = new System.Drawing.Point(109, 92);
this.seamlessDataPortTxt.Name = "seamlessDataPortTxt";
this.seamlessDataPortTxt.Size = new System.Drawing.Size(55, 20);
this.seamlessDataPortTxt.TabIndex = 36;
this.seamlessDataPortTxt.TextChanged += new System.EventHandler(this.textBox1_TextChanged);
//
// label13
//
this.label13.AutoSize = true;
this.label13.Location = new System.Drawing.Point(364, 13);
this.label13.Name = "label13";
this.label13.Size = new System.Drawing.Size(240, 13);
this.label13.TabIndex = 39;
this.label13.Text = "GlobalBiomeSeamlessServerGridPreOffsetValues:";
//
// GlobalBiomeSeamlessServerGridPreOffsetValuesTxtBox
//
this.GlobalBiomeSeamlessServerGridPreOffsetValuesTxtBox.Location = new System.Drawing.Point(371, 29);
this.GlobalBiomeSeamlessServerGridPreOffsetValuesTxtBox.Multiline = true;
this.GlobalBiomeSeamlessServerGridPreOffsetValuesTxtBox.Name = "GlobalBiomeSeamlessServerGridPreOffsetValuesTxtBox";
this.GlobalBiomeSeamlessServerGridPreOffsetValuesTxtBox.Size = new System.Drawing.Size(285, 41);
this.GlobalBiomeSeamlessServerGridPreOffsetValuesTxtBox.TabIndex = 38;
//
// label14
//
this.label14.AutoSize = true;
this.label14.Location = new System.Drawing.Point(362, 76);
this.label14.Name = "label14";
this.label14.Size = new System.Drawing.Size(301, 13);
this.label14.TabIndex = 41;
this.label14.Text = "GlobalBiomeSeamlessServerGridPreOffsetValuesOceanWater:";
//
// GlobalBiomeSeamlessServerGridPreOffsetValuesOceanWaterTxtBox
//
this.GlobalBiomeSeamlessServerGridPreOffsetValuesOceanWaterTxtBox.Location = new System.Drawing.Point(369, 92);
this.GlobalBiomeSeamlessServerGridPreOffsetValuesOceanWaterTxtBox.Multiline = true;
this.GlobalBiomeSeamlessServerGridPreOffsetValuesOceanWaterTxtBox.Name = "GlobalBiomeSeamlessServerGridPreOffsetValuesOceanWaterTxtBox";
this.GlobalBiomeSeamlessServerGridPreOffsetValuesOceanWaterTxtBox.Size = new System.Drawing.Size(287, 41);
this.GlobalBiomeSeamlessServerGridPreOffsetValuesOceanWaterTxtBox.TabIndex = 40;
//
// editSpawnRegions
//
this.editSpawnRegions.Location = new System.Drawing.Point(225, 641);
this.editSpawnRegions.Name = "editSpawnRegions";
this.editSpawnRegions.Size = new System.Drawing.Size(114, 32);
this.editSpawnRegions.TabIndex = 42;
this.editSpawnRegions.Text = "Spawn Regions";
this.editSpawnRegions.UseVisualStyleBackColor = true;
this.editSpawnRegions.Click += new System.EventHandler(this.editSpawnRegions_Click);
//
// additionalCmdLineParamsTxtBox
//
this.additionalCmdLineParamsTxtBox.Location = new System.Drawing.Point(16, 218);
this.additionalCmdLineParamsTxtBox.Name = "additionalCmdLineParamsTxtBox";
this.additionalCmdLineParamsTxtBox.Size = new System.Drawing.Size(281, 20);
this.additionalCmdLineParamsTxtBox.TabIndex = 44;
//
// label15
//
this.label15.AutoSize = true;
this.label15.Location = new System.Drawing.Point(13, 199);
this.label15.Name = "label15";
this.label15.Size = new System.Drawing.Size(182, 13);
this.label15.TabIndex = 43;
this.label15.Text = "Additional CommandLine Parameters:";
//
// label29
//
this.label29.AutoSize = true;
this.label29.Location = new System.Drawing.Point(13, 249);
this.label29.Name = "label29";
this.label29.Size = new System.Drawing.Size(255, 13);
this.label29.TabIndex = 68;
this.label29.Text = "Override ShooterGameMode DefaultGame.ini Values";
//
// overrideShooterGameModeDefaultGameIniDataGridView
//
this.overrideShooterGameModeDefaultGameIniDataGridView.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
this.overrideShooterGameModeDefaultGameIniDataGridView.Location = new System.Drawing.Point(18, 270);
this.overrideShooterGameModeDefaultGameIniDataGridView.Name = "overrideShooterGameModeDefaultGameIniDataGridView";
this.overrideShooterGameModeDefaultGameIniDataGridView.Size = new System.Drawing.Size(249, 110);
this.overrideShooterGameModeDefaultGameIniDataGridView.TabIndex = 67;
//
// label16
//
this.label16.AutoSize = true;
this.label16.Location = new System.Drawing.Point(364, 479);
this.label16.Name = "label16";
this.label16.Size = new System.Drawing.Size(77, 13);
this.label16.TabIndex = 69;
this.label16.Text = "ExtraSublevels";
//
// extraSublevelTxtBox
//
this.extraSublevelTxtBox.Location = new System.Drawing.Point(367, 498);
this.extraSublevelTxtBox.Multiline = true;
this.extraSublevelTxtBox.Name = "extraSublevelTxtBox";
this.extraSublevelTxtBox.Size = new System.Drawing.Size(289, 53);
this.extraSublevelTxtBox.TabIndex = 70;
//
// oceanEpicSpawnEntriesOverrideTemplateNameTxtBox
//
this.oceanEpicSpawnEntriesOverrideTemplateNameTxtBox.Location = new System.Drawing.Point(19, 402);
this.oceanEpicSpawnEntriesOverrideTemplateNameTxtBox.Name = "oceanEpicSpawnEntriesOverrideTemplateNameTxtBox";
this.oceanEpicSpawnEntriesOverrideTemplateNameTxtBox.Size = new System.Drawing.Size(281, 20);
this.oceanEpicSpawnEntriesOverrideTemplateNameTxtBox.TabIndex = 72;
//
// label17
//
this.label17.AutoSize = true;
this.label17.Location = new System.Drawing.Point(16, 383);
this.label17.Name = "label17";
this.label17.Size = new System.Drawing.Size(240, 13);
this.label17.TabIndex = 71;
this.label17.Text = "OceanEpicSpawnEntriesOverrideTemplateName:";
//
// NPCShipSpawnEntriesOverrideTemplateNameTxtBox
//
this.NPCShipSpawnEntriesOverrideTemplateNameTxtBox.Location = new System.Drawing.Point(19, 452);
this.NPCShipSpawnEntriesOverrideTemplateNameTxtBox.Name = "NPCShipSpawnEntriesOverrideTemplateNameTxtBox";
this.NPCShipSpawnEntriesOverrideTemplateNameTxtBox.Size = new System.Drawing.Size(281, 20);
this.NPCShipSpawnEntriesOverrideTemplateNameTxtBox.TabIndex = 74;
//
// label18
//
this.label18.AutoSize = true;
this.label18.Location = new System.Drawing.Point(16, 433);
this.label18.Name = "label18";
this.label18.Size = new System.Drawing.Size(230, 13);
this.label18.TabIndex = 73;
this.label18.Text = "NPCShipSpawnEntriesOverrideTemplateName:";
//
// regionOverridesTxtBox
//
this.regionOverridesTxtBox.Location = new System.Drawing.Point(369, 580);
this.regionOverridesTxtBox.Multiline = true;
this.regionOverridesTxtBox.Name = "regionOverridesTxtBox";
this.regionOverridesTxtBox.Size = new System.Drawing.Size(289, 86);
this.regionOverridesTxtBox.TabIndex = 76;
//
// label19
//
this.label19.AutoSize = true;
this.label19.Location = new System.Drawing.Point(366, 564);
this.label19.Name = "label19";
this.label19.Size = new System.Drawing.Size(86, 13);
this.label19.TabIndex = 75;
this.label19.Text = "RegionOverrides";
//
// coordsLbl
//
this.coordsLbl.AutoSize = true;
this.coordsLbl.Location = new System.Drawing.Point(189, 42);
this.coordsLbl.Name = "coordsLbl";
this.coordsLbl.Size = new System.Drawing.Size(64, 13);
this.coordsLbl.TabIndex = 77;
this.coordsLbl.Text = "Coords (0,0)";
//
// label20
//
this.label20.AutoSize = true;
this.label20.Location = new System.Drawing.Point(221, 486);
this.label20.Name = "label20";
this.label20.Size = new System.Drawing.Size(75, 13);
this.label20.TabIndex = 79;
this.label20.Text = "skyStyleIndex:";
//
// skyStyleIndexTxtBox
//
this.skyStyleIndexTxtBox.Location = new System.Drawing.Point(299, 483);
this.skyStyleIndexTxtBox.Name = "skyStyleIndexTxtBox";
this.skyStyleIndexTxtBox.Size = new System.Drawing.Size(55, 20);
this.skyStyleIndexTxtBox.TabIndex = 78;
//
// label21
//
this.label21.AutoSize = true;
this.label21.Location = new System.Drawing.Point(7, 486);
this.label21.Name = "label21";
this.label21.Size = new System.Drawing.Size(60, 13);
this.label21.TabIndex = 80;
this.label21.Text = "waterColor:";
//
// waterColorRTxtBox
//
this.waterColorRTxtBox.Location = new System.Drawing.Point(71, 480);
this.waterColorRTxtBox.Name = "waterColorRTxtBox";
this.waterColorRTxtBox.Size = new System.Drawing.Size(42, 20);
this.waterColorRTxtBox.TabIndex = 81;
//
// waterColorGTxtBox
//
this.waterColorGTxtBox.Location = new System.Drawing.Point(119, 480);
this.waterColorGTxtBox.Name = "waterColorGTxtBox";
this.waterColorGTxtBox.Size = new System.Drawing.Size(42, 20);
this.waterColorGTxtBox.TabIndex = 82;
//
// waterColorBTxtBox
//
this.waterColorBTxtBox.Location = new System.Drawing.Point(167, 480);
this.waterColorBTxtBox.Name = "waterColorBTxtBox";
this.waterColorBTxtBox.Size = new System.Drawing.Size(42, 20);
this.waterColorBTxtBox.TabIndex = 83;
//
// label22
//
this.label22.AutoSize = true;
this.label22.Location = new System.Drawing.Point(83, 502);
this.label22.Name = "label22";
this.label22.Size = new System.Drawing.Size(15, 13);
this.label22.TabIndex = 84;
this.label22.Text = "R";
//
// label23
//
this.label23.AutoSize = true;
this.label23.Location = new System.Drawing.Point(132, 502);
this.label23.Name = "label23";
this.label23.Size = new System.Drawing.Size(15, 13);
this.label23.TabIndex = 85;
this.label23.Text = "G";
//
// label24
//
this.label24.AutoSize = true;
this.label24.Location = new System.Drawing.Point(180, 501);
this.label24.Name = "label24";
this.label24.Size = new System.Drawing.Size(14, 13);
this.label24.TabIndex = 86;
this.label24.Text = "B";
//
// ServerCustomDatas1TxtBox
//
this.ServerCustomDatas1TxtBox.Location = new System.Drawing.Point(122, 531);
this.ServerCustomDatas1TxtBox.Name = "ServerCustomDatas1TxtBox";
this.ServerCustomDatas1TxtBox.Size = new System.Drawing.Size(230, 20);
this.ServerCustomDatas1TxtBox.TabIndex = 88;
//
// label25
//
this.label25.AutoSize = true;
this.label25.Location = new System.Drawing.Point(13, 534);
this.label25.Name = "label25";
this.label25.Size = new System.Drawing.Size(110, 13);
this.label25.TabIndex = 87;
this.label25.Text = "ServerCustomDatas1:";
//
// ServerCustomDatas2TxtBox
//
this.ServerCustomDatas2TxtBox.Location = new System.Drawing.Point(122, 554);
this.ServerCustomDatas2TxtBox.Name = "ServerCustomDatas2TxtBox";
this.ServerCustomDatas2TxtBox.Size = new System.Drawing.Size(230, 20);
this.ServerCustomDatas2TxtBox.TabIndex = 90;
//
// label26
//
this.label26.AutoSize = true;
this.label26.Location = new System.Drawing.Point(13, 557);
this.label26.Name = "label26";
this.label26.Size = new System.Drawing.Size(110, 13);
this.label26.TabIndex = 89;
this.label26.Text = "ServerCustomDatas2:";
//
// ClientCustomDatas2TxtBox
//
this.ClientCustomDatas2TxtBox.Location = new System.Drawing.Point(122, 603);
this.ClientCustomDatas2TxtBox.Name = "ClientCustomDatas2TxtBox";
this.ClientCustomDatas2TxtBox.Size = new System.Drawing.Size(230, 20);
this.ClientCustomDatas2TxtBox.TabIndex = 94;
//
// label27
//
this.label27.AutoSize = true;
this.label27.Location = new System.Drawing.Point(13, 606);
this.label27.Name = "label27";
this.label27.Size = new System.Drawing.Size(105, 13);
this.label27.TabIndex = 93;
this.label27.Text = "ClientCustomDatas2:";
//
// ClientCustomDatas1TxtBox
//
this.ClientCustomDatas1TxtBox.Location = new System.Drawing.Point(122, 580);
this.ClientCustomDatas1TxtBox.Name = "ClientCustomDatas1TxtBox";
this.ClientCustomDatas1TxtBox.Size = new System.Drawing.Size(230, 20);
this.ClientCustomDatas1TxtBox.TabIndex = 92;
//
// label28
//
this.label28.AutoSize = true;
this.label28.Location = new System.Drawing.Point(13, 583);
this.label28.Name = "label28";
this.label28.Size = new System.Drawing.Size(105, 13);
this.label28.TabIndex = 91;
this.label28.Text = "ClientCustomDatas1:";
//
// label30
//
this.label30.AutoSize = true;
this.label30.Location = new System.Drawing.Point(189, 15);
this.label30.Name = "label30";
this.label30.Size = new System.Drawing.Size(54, 13);
this.label30.TabIndex = 95;
this.label30.Text = "Template:";
//
// templateComboBox
//
this.templateComboBox.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed;
this.templateComboBox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.templateComboBox.FormattingEnabled = true;
this.templateComboBox.Location = new System.Drawing.Point(243, 12);
this.templateComboBox.Name = "templateComboBox";
this.templateComboBox.Size = new System.Drawing.Size(96, 21);
this.templateComboBox.TabIndex = 96;
this.templateComboBox.DrawItem += new System.Windows.Forms.DrawItemEventHandler(this.templateComboBox_DrawItem);
//
// OceanEpicSpawnEntriesOverrideValuesTxtBox
//
this.OceanEpicSpawnEntriesOverrideValuesTxtBox.Location = new System.Drawing.Point(369, 695);
this.OceanEpicSpawnEntriesOverrideValuesTxtBox.Multiline = true;
this.OceanEpicSpawnEntriesOverrideValuesTxtBox.Name = "OceanEpicSpawnEntriesOverrideValuesTxtBox";
this.OceanEpicSpawnEntriesOverrideValuesTxtBox.Size = new System.Drawing.Size(289, 53);
this.OceanEpicSpawnEntriesOverrideValuesTxtBox.TabIndex = 98;
//
// label31
//
this.label31.AutoSize = true;
this.label31.Location = new System.Drawing.Point(366, 676);
this.label31.Name = "label31";
this.label31.Size = new System.Drawing.Size(197, 13);
this.label31.TabIndex = 97;
this.label31.Text = "OceanEpicSpawnEntriesOverrideValues";
//
// EditServerForm
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(667, 762);
this.Controls.Add(this.OceanEpicSpawnEntriesOverrideValuesTxtBox);
this.Controls.Add(this.label31);
this.Controls.Add(this.templateComboBox);
this.Controls.Add(this.label30);
this.Controls.Add(this.ClientCustomDatas2TxtBox);
this.Controls.Add(this.label27);
this.Controls.Add(this.ClientCustomDatas1TxtBox);
this.Controls.Add(this.label28);
this.Controls.Add(this.ServerCustomDatas2TxtBox);
this.Controls.Add(this.label26);
this.Controls.Add(this.ServerCustomDatas1TxtBox);
this.Controls.Add(this.label25);
this.Controls.Add(this.label24);
this.Controls.Add(this.label23);
this.Controls.Add(this.label22);
this.Controls.Add(this.waterColorBTxtBox);
this.Controls.Add(this.waterColorGTxtBox);
this.Controls.Add(this.waterColorRTxtBox);
this.Controls.Add(this.label21);
this.Controls.Add(this.label20);
this.Controls.Add(this.skyStyleIndexTxtBox);
this.Controls.Add(this.coordsLbl);
this.Controls.Add(this.regionOverridesTxtBox);
this.Controls.Add(this.label19);
this.Controls.Add(this.NPCShipSpawnEntriesOverrideTemplateNameTxtBox);
this.Controls.Add(this.label18);
this.Controls.Add(this.oceanEpicSpawnEntriesOverrideTemplateNameTxtBox);
this.Controls.Add(this.label17);
this.Controls.Add(this.extraSublevelTxtBox);
this.Controls.Add(this.label16);
this.Controls.Add(this.label29);
this.Controls.Add(this.overrideShooterGameModeDefaultGameIniDataGridView);
this.Controls.Add(this.additionalCmdLineParamsTxtBox);
this.Controls.Add(this.label15);
this.Controls.Add(this.editSpawnRegions);
this.Controls.Add(this.label14);
this.Controls.Add(this.GlobalBiomeSeamlessServerGridPreOffsetValuesOceanWaterTxtBox);
this.Controls.Add(this.label13);
this.Controls.Add(this.GlobalBiomeSeamlessServerGridPreOffsetValuesTxtBox);
this.Controls.Add(this.label12);
this.Controls.Add(this.seamlessDataPortTxt);
this.Controls.Add(this.label11);
this.Controls.Add(this.TreasureMapLootTablesOverrideTxtBox);
this.Controls.Add(this.label9);
this.Controls.Add(this.label8);
this.Controls.Add(this.transitionMinZTxtBox);
this.Controls.Add(this.label7);
this.Controls.Add(this.label10);
this.Controls.Add(this.utcOffsetTxtBox);
this.Controls.Add(this.label6);
this.Controls.Add(this.OceanFloatsamCratesOverrideTxtBox);
this.Controls.Add(this.OceanDinoDepthEntriesOverrideLbl);
this.Controls.Add(this.OceanDinoDepthEntriesOverrideTxtBox);
this.Controls.Add(this.label4);
this.Controls.Add(this.FloorZDist);
this.Controls.Add(this.nameTxtBox);
this.Controls.Add(this.label3);
this.Controls.Add(this.runTestsBtn);
this.Controls.Add(this.homeServerCheckbox);
this.Controls.Add(this.label5);
this.Controls.Add(this.ipTxtBox);
this.Controls.Add(this.cancelBtn);
this.Controls.Add(this.saveBtn);
this.Controls.Add(this.gamePortTxtBox);
this.Controls.Add(this.label2);
this.Controls.Add(this.portTxtBox);
this.Controls.Add(this.label1);
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
this.Name = "EditServerForm";
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
this.Text = "Edit Server";
this.Load += new System.EventHandler(this.EditServerForm_Load);
((System.ComponentModel.ISupportInitialize)(this.overrideShooterGameModeDefaultGameIniDataGridView)).EndInit();
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
private System.Windows.Forms.Label label1;
private System.Windows.Forms.Label label2;
private System.Windows.Forms.TextBox portTxtBox;
private System.Windows.Forms.TextBox gamePortTxtBox;
private System.Windows.Forms.Button saveBtn;
private System.Windows.Forms.TextBox ipTxtBox;
private System.Windows.Forms.Button cancelBtn;
private System.Windows.Forms.Label label5;
private System.Windows.Forms.CheckBox homeServerCheckbox;
private System.Windows.Forms.Button runTestsBtn;
private System.Windows.Forms.TextBox nameTxtBox;
private System.Windows.Forms.Label label3;
private System.Windows.Forms.Label label4;
private System.Windows.Forms.TextBox FloorZDist;
private System.Windows.Forms.Label OceanDinoDepthEntriesOverrideLbl;
private System.Windows.Forms.TextBox OceanDinoDepthEntriesOverrideTxtBox;
private System.Windows.Forms.Label label6;
private System.Windows.Forms.TextBox OceanFloatsamCratesOverrideTxtBox;
private System.Windows.Forms.Label label9;
private System.Windows.Forms.Label label8;
private System.Windows.Forms.TextBox transitionMinZTxtBox;
private System.Windows.Forms.Label label7;
private System.Windows.Forms.Label label10;
private System.Windows.Forms.TextBox utcOffsetTxtBox;
private System.Windows.Forms.Label label11;
private System.Windows.Forms.TextBox TreasureMapLootTablesOverrideTxtBox;
private System.Windows.Forms.Label label12;
private System.Windows.Forms.TextBox seamlessDataPortTxt;
private System.Windows.Forms.Label label13;
private System.Windows.Forms.TextBox GlobalBiomeSeamlessServerGridPreOffsetValuesTxtBox;
private System.Windows.Forms.Label label14;
private System.Windows.Forms.TextBox GlobalBiomeSeamlessServerGridPreOffsetValuesOceanWaterTxtBox;
private System.Windows.Forms.Button editSpawnRegions;
private System.Windows.Forms.TextBox additionalCmdLineParamsTxtBox;
private System.Windows.Forms.Label label15;
private System.Windows.Forms.Label label29;
private System.Windows.Forms.DataGridView overrideShooterGameModeDefaultGameIniDataGridView;
private System.Windows.Forms.Label label16;
private System.Windows.Forms.TextBox extraSublevelTxtBox;
private System.Windows.Forms.TextBox oceanEpicSpawnEntriesOverrideTemplateNameTxtBox;
private System.Windows.Forms.Label label17;
private System.Windows.Forms.TextBox NPCShipSpawnEntriesOverrideTemplateNameTxtBox;
private System.Windows.Forms.Label label18;
private System.Windows.Forms.TextBox regionOverridesTxtBox;
private System.Windows.Forms.Label label19;
private System.Windows.Forms.Label coordsLbl;
private System.Windows.Forms.Label label20;
private System.Windows.Forms.TextBox skyStyleIndexTxtBox;
private System.Windows.Forms.Label label21;
private System.Windows.Forms.TextBox waterColorRTxtBox;
private System.Windows.Forms.TextBox waterColorGTxtBox;
private System.Windows.Forms.TextBox waterColorBTxtBox;
private System.Windows.Forms.Label label22;
private System.Windows.Forms.Label label23;
private System.Windows.Forms.Label label24;
private System.Windows.Forms.TextBox ServerCustomDatas1TxtBox;
private System.Windows.Forms.Label label25;
private System.Windows.Forms.TextBox ServerCustomDatas2TxtBox;
private System.Windows.Forms.Label label26;
private System.Windows.Forms.TextBox ClientCustomDatas2TxtBox;
private System.Windows.Forms.Label label27;
private System.Windows.Forms.TextBox ClientCustomDatas1TxtBox;
private System.Windows.Forms.Label label28;
private System.Windows.Forms.Label label30;
private System.Windows.Forms.ComboBox templateComboBox;
private System.Windows.Forms.TextBox OceanEpicSpawnEntriesOverrideValuesTxtBox;
private System.Windows.Forms.Label label31;
}
}

View file

@ -0,0 +1,269 @@
using AtlasGridDataLibrary;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Diagnostics;
using System.Drawing;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace ServerGridEditor
{
public partial class EditServerForm : Form
{
public Server targetServer;
MainForm mainForm;
public EditServerForm(MainForm mainForm)
{
this.mainForm = mainForm;
InitializeComponent();
}
private void EditServerForm_Load(object sender, EventArgs e)
{
nameTxtBox.Text = targetServer.name;
ipTxtBox.Text = targetServer.ip;
portTxtBox.Text = targetServer.port + "";
gamePortTxtBox.Text = targetServer.gamePort + "";
seamlessDataPortTxt.Text = targetServer.seamlessDataPort + "";
homeServerCheckbox.Checked = targetServer.isHomeServer;
additionalCmdLineParamsTxtBox.Text = targetServer.AdditionalCmdLineParams;
oceanEpicSpawnEntriesOverrideTemplateNameTxtBox.Text = targetServer.oceanEpicSpawnEntriesOverrideTemplateName;
NPCShipSpawnEntriesOverrideTemplateNameTxtBox.Text = targetServer.NPCShipSpawnEntriesOverrideTemplateName;
waterColorRTxtBox.Text = targetServer.waterColorR.ToString();
waterColorGTxtBox.Text = targetServer.waterColorG.ToString();
waterColorBTxtBox.Text = targetServer.waterColorB.ToString();
skyStyleIndexTxtBox.Text = targetServer.skyStyleIndex.ToString();
ServerCustomDatas1TxtBox.Text = targetServer.ServerCustomDatas1;
ServerCustomDatas2TxtBox.Text = targetServer.ServerCustomDatas2;
ClientCustomDatas1TxtBox.Text = targetServer.ClientCustomDatas1;
ClientCustomDatas2TxtBox.Text = targetServer.ClientCustomDatas2;
BindingList<ConfigKeyValueEntry> pairs = new BindingList<ConfigKeyValueEntry>();
pairs.AddingNew += (s, a) =>
{
a.NewObject = new ConfigKeyValueEntry("", "");
};
if (targetServer.OverrideShooterGameModeDefaultGameIni != null)
foreach (KeyValuePair<string, string> DicPair in targetServer.OverrideShooterGameModeDefaultGameIni)
pairs.Add(new ConfigKeyValueEntry(DicPair.Key, DicPair.Value));
overrideShooterGameModeDefaultGameIniDataGridView.DataSource = pairs;
FloorZDist.Text = targetServer.floorZDist + "";
transitionMinZTxtBox.Text = targetServer.transitionMinZ + "";
utcOffsetTxtBox.Text = targetServer.utcOffset + "";
GlobalBiomeSeamlessServerGridPreOffsetValuesTxtBox.Text = targetServer.GlobalBiomeSeamlessServerGridPreOffsetValues;
GlobalBiomeSeamlessServerGridPreOffsetValuesOceanWaterTxtBox.Text = targetServer.GlobalBiomeSeamlessServerGridPreOffsetValuesOceanWater;
OceanDinoDepthEntriesOverrideTxtBox.Text = targetServer.OceanDinoDepthEntriesOverride;
OceanEpicSpawnEntriesOverrideValuesTxtBox.Text = targetServer.OceanEpicSpawnEntriesOverrideValues;
OceanFloatsamCratesOverrideTxtBox.Text = targetServer.oceanFloatsamCratesOverride;
TreasureMapLootTablesOverrideTxtBox.Text = targetServer.treasureMapLootTablesOverride;
regionOverridesTxtBox.Text = targetServer.regionOverrides;
if (targetServer.extraSublevels != null)
extraSublevelTxtBox.Lines = targetServer.extraSublevels.ToArray();
coordsLbl.Text = string.Format("Coords ({0},{1})", targetServer.gridX, targetServer.gridY);
Text += string.Format(" ({0},{1})", targetServer.gridX, targetServer.gridY);
templateComboBox.Items.Add("None");
foreach (ServerTemplateData template in mainForm.currentProject.serverTemplates)
templateComboBox.Items.Add(template.name);
if (string.IsNullOrEmpty(targetServer.serverTemplateName))
templateComboBox.SelectedItem = "None";
if(templateComboBox.Items.Contains(targetServer.serverTemplateName))
templateComboBox.SelectedItem = targetServer.serverTemplateName;
else
templateComboBox.SelectedItem = "None";
}
private void cancelBtn_Click(object sender, EventArgs e)
{
DialogResult = DialogResult.Cancel;
Close();
}
private void createBtn_Click(object sender, EventArgs e)
{
if (Save())
{
DialogResult = DialogResult.OK;
Close();
}
}
private bool Save()
{
int port, gamePort, floorZDist, transitionMinZ, utcOffset, seamlessDataPort;
if (!int.TryParse(portTxtBox.Text, out port) || !int.TryParse(gamePortTxtBox.Text, out gamePort) || !int.TryParse(seamlessDataPortTxt.Text, out seamlessDataPort))
{
MessageBox.Show("Invalid port numbers", "Alert", MessageBoxButtons.OK, MessageBoxIcon.Error);
return false;
}
if (!int.TryParse(FloorZDist.Text, out floorZDist))
{
MessageBox.Show("Invalid number for floor distance from ocean surface", "Alert", MessageBoxButtons.OK, MessageBoxIcon.Error);
return false;
}
if (!int.TryParse(transitionMinZTxtBox.Text, out transitionMinZ))
{
MessageBox.Show("Invalid number for transition minimum Z", "Alert", MessageBoxButtons.OK, MessageBoxIcon.Error);
return false;
}
if (!int.TryParse(utcOffsetTxtBox.Text, out utcOffset))
{
MessageBox.Show("Invalid number for UTC Offset", "Alert", MessageBoxButtons.OK, MessageBoxIcon.Error);
return false;
}
float waterColorR, waterColorG, waterColorB;
int skyStyleIndex;
if (!float.TryParse(waterColorRTxtBox.Text, out waterColorR))
{
MessageBox.Show("Invalid number for waterColorR", "Alert", MessageBoxButtons.OK, MessageBoxIcon.Error);
return false;
}
if (!float.TryParse(waterColorGTxtBox.Text, out waterColorG))
{
MessageBox.Show("Invalid number for waterColorG", "Alert", MessageBoxButtons.OK, MessageBoxIcon.Error);
return false;
}
if (!float.TryParse(waterColorBTxtBox.Text, out waterColorB))
{
MessageBox.Show("Invalid number for waterColorB", "Alert", MessageBoxButtons.OK, MessageBoxIcon.Error);
return false;
}
if (!int.TryParse(skyStyleIndexTxtBox.Text, out skyStyleIndex))
{
MessageBox.Show("Invalid number for skyStyleIndex", "Alert", MessageBoxButtons.OK, MessageBoxIcon.Error);
return false;
}
targetServer.name = nameTxtBox.Text;
targetServer.ip = ipTxtBox.Text;
targetServer.port = port;
targetServer.gamePort = gamePort;
targetServer.seamlessDataPort = seamlessDataPort;
targetServer.isHomeServer = homeServerCheckbox.Checked;
targetServer.AdditionalCmdLineParams = additionalCmdLineParamsTxtBox.Text;
targetServer.oceanEpicSpawnEntriesOverrideTemplateName = oceanEpicSpawnEntriesOverrideTemplateNameTxtBox.Text;
targetServer.NPCShipSpawnEntriesOverrideTemplateName = NPCShipSpawnEntriesOverrideTemplateNameTxtBox.Text;
targetServer.waterColorR = waterColorR;
targetServer.waterColorG = waterColorG;
targetServer.waterColorB = waterColorB;
targetServer.skyStyleIndex = skyStyleIndex;
targetServer.ServerCustomDatas1 = ServerCustomDatas1TxtBox.Text;
targetServer.ServerCustomDatas2 = ServerCustomDatas2TxtBox.Text;
targetServer.ClientCustomDatas1 = ClientCustomDatas1TxtBox.Text;
targetServer.ClientCustomDatas2 = ClientCustomDatas2TxtBox.Text;
if (targetServer.OverrideShooterGameModeDefaultGameIni != null)
targetServer.OverrideShooterGameModeDefaultGameIni.Clear();
else
targetServer.OverrideShooterGameModeDefaultGameIni = new Dictionary<string, string>();
foreach (DataGridViewRow row in overrideShooterGameModeDefaultGameIniDataGridView.Rows)
if (row.Cells[0].Value != null)
targetServer.OverrideShooterGameModeDefaultGameIni.Add(row.Cells[0].Value.ToString(), row.Cells[1].Value != null ? row.Cells[1].Value.ToString() : "");
targetServer.floorZDist = floorZDist;
targetServer.transitionMinZ = transitionMinZ;
targetServer.utcOffset = utcOffset;
targetServer.GlobalBiomeSeamlessServerGridPreOffsetValues = GlobalBiomeSeamlessServerGridPreOffsetValuesTxtBox.Text;
targetServer.GlobalBiomeSeamlessServerGridPreOffsetValuesOceanWater = GlobalBiomeSeamlessServerGridPreOffsetValuesOceanWaterTxtBox.Text;
targetServer.OceanDinoDepthEntriesOverride = OceanDinoDepthEntriesOverrideTxtBox.Text;
targetServer.OceanEpicSpawnEntriesOverrideValues = OceanEpicSpawnEntriesOverrideValuesTxtBox.Text;
targetServer.oceanFloatsamCratesOverride = OceanFloatsamCratesOverrideTxtBox.Text;
targetServer.treasureMapLootTablesOverride = TreasureMapLootTablesOverrideTxtBox.Text;
targetServer.regionOverrides = regionOverridesTxtBox.Text;
targetServer.extraSublevels = new List<string>(extraSublevelTxtBox.Lines);
if (templateComboBox.SelectedItem != null)
{
if (templateComboBox.SelectedItem.ToString() == "None")
targetServer.serverTemplateName = "";
else
targetServer.serverTemplateName = templateComboBox.SelectedItem + "";
}
return true;
}
private void portTxtBox_KeyPress(object sender, KeyPressEventArgs e)
{
StaticHelpers.ForceNumericKeypress(sender, e, false);
}
private void gamePortTxtBox_KeyPress(object sender, KeyPressEventArgs e)
{
StaticHelpers.ForceNumericKeypress(sender, e, false);
}
private void seamlessDataPortTxt_KeyPress(object sender, KeyPressEventArgs e)
{
StaticHelpers.ForceNumericKeypress(sender, e, false);
}
private void gFloorZDist_KeyPress(object sender, KeyPressEventArgs e)
{
StaticHelpers.ForceNumericKeypress(sender, e, false);
}
private void runTestsBtn_Click(object sender, EventArgs e)
{
if (Save())
{
string jsonFileName = MainForm.gameDir + "/" + MainForm.tempJsonFile;
File.WriteAllText(jsonFileName, mainForm.currentProject.Serialize(mainForm));
ProcessStartInfo serverStartInfo, clientStartInfo;
targetServer.LaunchPreview(out serverStartInfo, out clientStartInfo);
}
}
private void textBox1_TextChanged(object sender, EventArgs e)
{
}
private void editSpawnRegions_Click(object sender, EventArgs e)
{
if (mainForm != null)
mainForm.ShowServerEditSpawnRegionsForm(targetServer);
}
private void templateComboBox_DrawItem(object sender, DrawItemEventArgs e)
{
e.DrawBackground();
Graphics g = e.Graphics;
ServerTemplateData template = mainForm.currentProject.GetServerTemplateByName(templateComboBox.Items[e.Index].ToString());
if (template != null)
g.DrawString(templateComboBox.Items[e.Index].ToString(), e.Font, new SolidBrush(template.GetTemplateColor()),
new PointF(e.Bounds.X, e.Bounds.Y));
else
g.DrawString(templateComboBox.Items[e.Index].ToString(), e.Font, new SolidBrush(e.ForeColor), new PointF(e.Bounds.X, e.Bounds.Y));
e.DrawFocusRectangle();
}
}
}

View file

@ -0,0 +1,120 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>

View file

@ -0,0 +1,698 @@
namespace ServerGridEditor
{
partial class EditServerTemplate
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.saveBtn = new System.Windows.Forms.Button();
this.cancelBtn = new System.Windows.Forms.Button();
this.nameTxtBox = new System.Windows.Forms.TextBox();
this.label3 = new System.Windows.Forms.Label();
this.label4 = new System.Windows.Forms.Label();
this.FloorZDist = new System.Windows.Forms.TextBox();
this.OceanDinoDepthEntriesOverrideLbl = new System.Windows.Forms.Label();
this.OceanDinoDepthEntriesOverrideTxtBox = new System.Windows.Forms.TextBox();
this.label6 = new System.Windows.Forms.Label();
this.OceanFloatsamCratesOverrideTxtBox = new System.Windows.Forms.TextBox();
this.label9 = new System.Windows.Forms.Label();
this.label8 = new System.Windows.Forms.Label();
this.transitionMinZTxtBox = new System.Windows.Forms.TextBox();
this.label11 = new System.Windows.Forms.Label();
this.TreasureMapLootTablesOverrideTxtBox = new System.Windows.Forms.TextBox();
this.label13 = new System.Windows.Forms.Label();
this.GlobalBiomeSeamlessServerGridPreOffsetValuesTxtBox = new System.Windows.Forms.TextBox();
this.label14 = new System.Windows.Forms.Label();
this.GlobalBiomeSeamlessServerGridPreOffsetValuesOceanWaterTxtBox = new System.Windows.Forms.TextBox();
this.additionalCmdLineParamsTxtBox = new System.Windows.Forms.TextBox();
this.label15 = new System.Windows.Forms.Label();
this.label29 = new System.Windows.Forms.Label();
this.overrideShooterGameModeDefaultGameIniDataGridView = new System.Windows.Forms.DataGridView();
this.label16 = new System.Windows.Forms.Label();
this.extraSublevelTxtBox = new System.Windows.Forms.TextBox();
this.oceanEpicSpawnEntriesOverrideTemplateNameTxtBox = new System.Windows.Forms.TextBox();
this.label17 = new System.Windows.Forms.Label();
this.NPCShipSpawnEntriesOverrideTemplateNameTxtBox = new System.Windows.Forms.TextBox();
this.label18 = new System.Windows.Forms.Label();
this.regionOverridesTxtBox = new System.Windows.Forms.TextBox();
this.label19 = new System.Windows.Forms.Label();
this.label20 = new System.Windows.Forms.Label();
this.skyStyleIndexTxtBox = new System.Windows.Forms.TextBox();
this.label21 = new System.Windows.Forms.Label();
this.waterColorRTxtBox = new System.Windows.Forms.TextBox();
this.waterColorGTxtBox = new System.Windows.Forms.TextBox();
this.waterColorBTxtBox = new System.Windows.Forms.TextBox();
this.label22 = new System.Windows.Forms.Label();
this.label23 = new System.Windows.Forms.Label();
this.label24 = new System.Windows.Forms.Label();
this.ServerCustomDatas1TxtBox = new System.Windows.Forms.TextBox();
this.label25 = new System.Windows.Forms.Label();
this.ServerCustomDatas2TxtBox = new System.Windows.Forms.TextBox();
this.label26 = new System.Windows.Forms.Label();
this.ClientCustomDatas2TxtBox = new System.Windows.Forms.TextBox();
this.label27 = new System.Windows.Forms.Label();
this.ClientCustomDatas1TxtBox = new System.Windows.Forms.TextBox();
this.label28 = new System.Windows.Forms.Label();
this.label30 = new System.Windows.Forms.Label();
this.label31 = new System.Windows.Forms.Label();
this.label32 = new System.Windows.Forms.Label();
this.templateColBTxtBox = new System.Windows.Forms.TextBox();
this.templateColGTxtBox = new System.Windows.Forms.TextBox();
this.templateColRTxtBox = new System.Windows.Forms.TextBox();
this.label33 = new System.Windows.Forms.Label();
this.OceanEpicSpawnEntriesOverrideValuesTxtBox = new System.Windows.Forms.TextBox();
this.label1 = new System.Windows.Forms.Label();
((System.ComponentModel.ISupportInitialize)(this.overrideShooterGameModeDefaultGameIniDataGridView)).BeginInit();
this.SuspendLayout();
//
// saveBtn
//
this.saveBtn.Location = new System.Drawing.Point(82, 717);
this.saveBtn.Name = "saveBtn";
this.saveBtn.Size = new System.Drawing.Size(94, 32);
this.saveBtn.TabIndex = 9;
this.saveBtn.Text = "Save";
this.saveBtn.UseVisualStyleBackColor = true;
this.saveBtn.Click += new System.EventHandler(this.createBtn_Click);
//
// cancelBtn
//
this.cancelBtn.Location = new System.Drawing.Point(182, 717);
this.cancelBtn.Name = "cancelBtn";
this.cancelBtn.Size = new System.Drawing.Size(96, 32);
this.cancelBtn.TabIndex = 10;
this.cancelBtn.Text = "Cancel";
this.cancelBtn.UseVisualStyleBackColor = true;
this.cancelBtn.Click += new System.EventHandler(this.cancelBtn_Click);
//
// nameTxtBox
//
this.nameTxtBox.Location = new System.Drawing.Point(92, 12);
this.nameTxtBox.Name = "nameTxtBox";
this.nameTxtBox.Size = new System.Drawing.Size(138, 20);
this.nameTxtBox.TabIndex = 17;
//
// label3
//
this.label3.AutoSize = true;
this.label3.Location = new System.Drawing.Point(5, 15);
this.label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(82, 13);
this.label3.TabIndex = 16;
this.label3.Text = "Template Name";
//
// label4
//
this.label4.AutoSize = true;
this.label4.Location = new System.Drawing.Point(7, 95);
this.label4.Name = "label4";
this.label4.Size = new System.Drawing.Size(150, 13);
this.label4.TabIndex = 19;
this.label4.Text = "OceanFloorZDistFromSurface:";
//
// FloorZDist
//
this.FloorZDist.Location = new System.Drawing.Point(162, 92);
this.FloorZDist.Name = "FloorZDist";
this.FloorZDist.Size = new System.Drawing.Size(55, 20);
this.FloorZDist.TabIndex = 18;
//
// OceanDinoDepthEntriesOverrideLbl
//
this.OceanDinoDepthEntriesOverrideLbl.AutoSize = true;
this.OceanDinoDepthEntriesOverrideLbl.Location = new System.Drawing.Point(364, 141);
this.OceanDinoDepthEntriesOverrideLbl.Name = "OceanDinoDepthEntriesOverrideLbl";
this.OceanDinoDepthEntriesOverrideLbl.Size = new System.Drawing.Size(165, 13);
this.OceanDinoDepthEntriesOverrideLbl.TabIndex = 21;
this.OceanDinoDepthEntriesOverrideLbl.Text = "OceanDinoDepthEntriesOverride:";
//
// OceanDinoDepthEntriesOverrideTxtBox
//
this.OceanDinoDepthEntriesOverrideTxtBox.Location = new System.Drawing.Point(371, 157);
this.OceanDinoDepthEntriesOverrideTxtBox.Multiline = true;
this.OceanDinoDepthEntriesOverrideTxtBox.Name = "OceanDinoDepthEntriesOverrideTxtBox";
this.OceanDinoDepthEntriesOverrideTxtBox.Size = new System.Drawing.Size(285, 83);
this.OceanDinoDepthEntriesOverrideTxtBox.TabIndex = 20;
//
// label6
//
this.label6.AutoSize = true;
this.label6.Location = new System.Drawing.Point(364, 255);
this.label6.Name = "label6";
this.label6.Size = new System.Drawing.Size(154, 13);
this.label6.TabIndex = 23;
this.label6.Text = "OceanFloatsamCratesOverride:";
//
// OceanFloatsamCratesOverrideTxtBox
//
this.OceanFloatsamCratesOverrideTxtBox.Location = new System.Drawing.Point(367, 272);
this.OceanFloatsamCratesOverrideTxtBox.Multiline = true;
this.OceanFloatsamCratesOverrideTxtBox.Name = "OceanFloatsamCratesOverrideTxtBox";
this.OceanFloatsamCratesOverrideTxtBox.Size = new System.Drawing.Size(289, 90);
this.OceanFloatsamCratesOverrideTxtBox.TabIndex = 22;
//
// label9
//
this.label9.AutoSize = true;
this.label9.Location = new System.Drawing.Point(185, 121);
this.label9.Name = "label9";
this.label9.Size = new System.Drawing.Size(63, 13);
this.label9.TabIndex = 33;
this.label9.Text = "(ex: -12000)";
//
// label8
//
this.label8.AutoSize = true;
this.label8.Location = new System.Drawing.Point(7, 121);
this.label8.Name = "label8";
this.label8.Size = new System.Drawing.Size(83, 13);
this.label8.TabIndex = 32;
this.label8.Text = "Transition MinZ:";
//
// transitionMinZTxtBox
//
this.transitionMinZTxtBox.Location = new System.Drawing.Point(92, 117);
this.transitionMinZTxtBox.Name = "transitionMinZTxtBox";
this.transitionMinZTxtBox.Size = new System.Drawing.Size(86, 20);
this.transitionMinZTxtBox.TabIndex = 31;
//
// label11
//
this.label11.AutoSize = true;
this.label11.Location = new System.Drawing.Point(364, 364);
this.label11.Name = "label11";
this.label11.Size = new System.Drawing.Size(166, 13);
this.label11.TabIndex = 35;
this.label11.Text = "TreasureMapLootTablesOverride:";
//
// TreasureMapLootTablesOverrideTxtBox
//
this.TreasureMapLootTablesOverrideTxtBox.Location = new System.Drawing.Point(367, 381);
this.TreasureMapLootTablesOverrideTxtBox.Multiline = true;
this.TreasureMapLootTablesOverrideTxtBox.Name = "TreasureMapLootTablesOverrideTxtBox";
this.TreasureMapLootTablesOverrideTxtBox.Size = new System.Drawing.Size(289, 90);
this.TreasureMapLootTablesOverrideTxtBox.TabIndex = 34;
//
// label13
//
this.label13.AutoSize = true;
this.label13.Location = new System.Drawing.Point(364, 13);
this.label13.Name = "label13";
this.label13.Size = new System.Drawing.Size(240, 13);
this.label13.TabIndex = 39;
this.label13.Text = "GlobalBiomeSeamlessServerGridPreOffsetValues:";
//
// GlobalBiomeSeamlessServerGridPreOffsetValuesTxtBox
//
this.GlobalBiomeSeamlessServerGridPreOffsetValuesTxtBox.Location = new System.Drawing.Point(371, 29);
this.GlobalBiomeSeamlessServerGridPreOffsetValuesTxtBox.Multiline = true;
this.GlobalBiomeSeamlessServerGridPreOffsetValuesTxtBox.Name = "GlobalBiomeSeamlessServerGridPreOffsetValuesTxtBox";
this.GlobalBiomeSeamlessServerGridPreOffsetValuesTxtBox.Size = new System.Drawing.Size(285, 41);
this.GlobalBiomeSeamlessServerGridPreOffsetValuesTxtBox.TabIndex = 38;
//
// label14
//
this.label14.AutoSize = true;
this.label14.Location = new System.Drawing.Point(362, 76);
this.label14.Name = "label14";
this.label14.Size = new System.Drawing.Size(301, 13);
this.label14.TabIndex = 41;
this.label14.Text = "GlobalBiomeSeamlessServerGridPreOffsetValuesOceanWater:";
//
// GlobalBiomeSeamlessServerGridPreOffsetValuesOceanWaterTxtBox
//
this.GlobalBiomeSeamlessServerGridPreOffsetValuesOceanWaterTxtBox.Location = new System.Drawing.Point(369, 92);
this.GlobalBiomeSeamlessServerGridPreOffsetValuesOceanWaterTxtBox.Multiline = true;
this.GlobalBiomeSeamlessServerGridPreOffsetValuesOceanWaterTxtBox.Name = "GlobalBiomeSeamlessServerGridPreOffsetValuesOceanWaterTxtBox";
this.GlobalBiomeSeamlessServerGridPreOffsetValuesOceanWaterTxtBox.Size = new System.Drawing.Size(287, 41);
this.GlobalBiomeSeamlessServerGridPreOffsetValuesOceanWaterTxtBox.TabIndex = 40;
//
// additionalCmdLineParamsTxtBox
//
this.additionalCmdLineParamsTxtBox.Location = new System.Drawing.Point(15, 165);
this.additionalCmdLineParamsTxtBox.Name = "additionalCmdLineParamsTxtBox";
this.additionalCmdLineParamsTxtBox.Size = new System.Drawing.Size(281, 20);
this.additionalCmdLineParamsTxtBox.TabIndex = 44;
//
// label15
//
this.label15.AutoSize = true;
this.label15.Location = new System.Drawing.Point(12, 146);
this.label15.Name = "label15";
this.label15.Size = new System.Drawing.Size(182, 13);
this.label15.TabIndex = 43;
this.label15.Text = "Additional CommandLine Parameters:";
//
// label29
//
this.label29.AutoSize = true;
this.label29.Location = new System.Drawing.Point(12, 196);
this.label29.Name = "label29";
this.label29.Size = new System.Drawing.Size(255, 13);
this.label29.TabIndex = 68;
this.label29.Text = "Override ShooterGameMode DefaultGame.ini Values";
//
// overrideShooterGameModeDefaultGameIniDataGridView
//
this.overrideShooterGameModeDefaultGameIniDataGridView.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
this.overrideShooterGameModeDefaultGameIniDataGridView.Location = new System.Drawing.Point(17, 217);
this.overrideShooterGameModeDefaultGameIniDataGridView.Name = "overrideShooterGameModeDefaultGameIniDataGridView";
this.overrideShooterGameModeDefaultGameIniDataGridView.Size = new System.Drawing.Size(249, 110);
this.overrideShooterGameModeDefaultGameIniDataGridView.TabIndex = 67;
//
// label16
//
this.label16.AutoSize = true;
this.label16.Location = new System.Drawing.Point(364, 479);
this.label16.Name = "label16";
this.label16.Size = new System.Drawing.Size(77, 13);
this.label16.TabIndex = 69;
this.label16.Text = "ExtraSublevels";
//
// extraSublevelTxtBox
//
this.extraSublevelTxtBox.Location = new System.Drawing.Point(367, 498);
this.extraSublevelTxtBox.Multiline = true;
this.extraSublevelTxtBox.Name = "extraSublevelTxtBox";
this.extraSublevelTxtBox.Size = new System.Drawing.Size(289, 68);
this.extraSublevelTxtBox.TabIndex = 70;
//
// oceanEpicSpawnEntriesOverrideTemplateNameTxtBox
//
this.oceanEpicSpawnEntriesOverrideTemplateNameTxtBox.Location = new System.Drawing.Point(18, 349);
this.oceanEpicSpawnEntriesOverrideTemplateNameTxtBox.Name = "oceanEpicSpawnEntriesOverrideTemplateNameTxtBox";
this.oceanEpicSpawnEntriesOverrideTemplateNameTxtBox.Size = new System.Drawing.Size(281, 20);
this.oceanEpicSpawnEntriesOverrideTemplateNameTxtBox.TabIndex = 72;
//
// label17
//
this.label17.AutoSize = true;
this.label17.Location = new System.Drawing.Point(15, 330);
this.label17.Name = "label17";
this.label17.Size = new System.Drawing.Size(240, 13);
this.label17.TabIndex = 71;
this.label17.Text = "OceanEpicSpawnEntriesOverrideTemplateName:";
//
// NPCShipSpawnEntriesOverrideTemplateNameTxtBox
//
this.NPCShipSpawnEntriesOverrideTemplateNameTxtBox.Location = new System.Drawing.Point(18, 399);
this.NPCShipSpawnEntriesOverrideTemplateNameTxtBox.Name = "NPCShipSpawnEntriesOverrideTemplateNameTxtBox";
this.NPCShipSpawnEntriesOverrideTemplateNameTxtBox.Size = new System.Drawing.Size(281, 20);
this.NPCShipSpawnEntriesOverrideTemplateNameTxtBox.TabIndex = 74;
//
// label18
//
this.label18.AutoSize = true;
this.label18.Location = new System.Drawing.Point(15, 380);
this.label18.Name = "label18";
this.label18.Size = new System.Drawing.Size(230, 13);
this.label18.TabIndex = 73;
this.label18.Text = "NPCShipSpawnEntriesOverrideTemplateName:";
//
// regionOverridesTxtBox
//
this.regionOverridesTxtBox.Location = new System.Drawing.Point(367, 590);
this.regionOverridesTxtBox.Multiline = true;
this.regionOverridesTxtBox.Name = "regionOverridesTxtBox";
this.regionOverridesTxtBox.Size = new System.Drawing.Size(289, 86);
this.regionOverridesTxtBox.TabIndex = 76;
//
// label19
//
this.label19.AutoSize = true;
this.label19.Location = new System.Drawing.Point(364, 574);
this.label19.Name = "label19";
this.label19.Size = new System.Drawing.Size(86, 13);
this.label19.TabIndex = 75;
this.label19.Text = "RegionOverrides";
//
// label20
//
this.label20.AutoSize = true;
this.label20.Location = new System.Drawing.Point(220, 433);
this.label20.Name = "label20";
this.label20.Size = new System.Drawing.Size(75, 13);
this.label20.TabIndex = 79;
this.label20.Text = "skyStyleIndex:";
//
// skyStyleIndexTxtBox
//
this.skyStyleIndexTxtBox.Location = new System.Drawing.Point(298, 430);
this.skyStyleIndexTxtBox.Name = "skyStyleIndexTxtBox";
this.skyStyleIndexTxtBox.Size = new System.Drawing.Size(55, 20);
this.skyStyleIndexTxtBox.TabIndex = 78;
//
// label21
//
this.label21.AutoSize = true;
this.label21.Location = new System.Drawing.Point(6, 433);
this.label21.Name = "label21";
this.label21.Size = new System.Drawing.Size(60, 13);
this.label21.TabIndex = 80;
this.label21.Text = "waterColor:";
//
// waterColorRTxtBox
//
this.waterColorRTxtBox.Location = new System.Drawing.Point(70, 427);
this.waterColorRTxtBox.Name = "waterColorRTxtBox";
this.waterColorRTxtBox.Size = new System.Drawing.Size(42, 20);
this.waterColorRTxtBox.TabIndex = 81;
//
// waterColorGTxtBox
//
this.waterColorGTxtBox.Location = new System.Drawing.Point(118, 427);
this.waterColorGTxtBox.Name = "waterColorGTxtBox";
this.waterColorGTxtBox.Size = new System.Drawing.Size(42, 20);
this.waterColorGTxtBox.TabIndex = 82;
//
// waterColorBTxtBox
//
this.waterColorBTxtBox.Location = new System.Drawing.Point(166, 427);
this.waterColorBTxtBox.Name = "waterColorBTxtBox";
this.waterColorBTxtBox.Size = new System.Drawing.Size(42, 20);
this.waterColorBTxtBox.TabIndex = 83;
//
// label22
//
this.label22.AutoSize = true;
this.label22.Location = new System.Drawing.Point(82, 449);
this.label22.Name = "label22";
this.label22.Size = new System.Drawing.Size(15, 13);
this.label22.TabIndex = 84;
this.label22.Text = "R";
//
// label23
//
this.label23.AutoSize = true;
this.label23.Location = new System.Drawing.Point(131, 449);
this.label23.Name = "label23";
this.label23.Size = new System.Drawing.Size(15, 13);
this.label23.TabIndex = 85;
this.label23.Text = "G";
//
// label24
//
this.label24.AutoSize = true;
this.label24.Location = new System.Drawing.Point(179, 448);
this.label24.Name = "label24";
this.label24.Size = new System.Drawing.Size(14, 13);
this.label24.TabIndex = 86;
this.label24.Text = "B";
//
// ServerCustomDatas1TxtBox
//
this.ServerCustomDatas1TxtBox.Location = new System.Drawing.Point(121, 478);
this.ServerCustomDatas1TxtBox.Name = "ServerCustomDatas1TxtBox";
this.ServerCustomDatas1TxtBox.Size = new System.Drawing.Size(230, 20);
this.ServerCustomDatas1TxtBox.TabIndex = 88;
//
// label25
//
this.label25.AutoSize = true;
this.label25.Location = new System.Drawing.Point(12, 481);
this.label25.Name = "label25";
this.label25.Size = new System.Drawing.Size(110, 13);
this.label25.TabIndex = 87;
this.label25.Text = "ServerCustomDatas1:";
//
// ServerCustomDatas2TxtBox
//
this.ServerCustomDatas2TxtBox.Location = new System.Drawing.Point(121, 501);
this.ServerCustomDatas2TxtBox.Name = "ServerCustomDatas2TxtBox";
this.ServerCustomDatas2TxtBox.Size = new System.Drawing.Size(230, 20);
this.ServerCustomDatas2TxtBox.TabIndex = 90;
//
// label26
//
this.label26.AutoSize = true;
this.label26.Location = new System.Drawing.Point(12, 504);
this.label26.Name = "label26";
this.label26.Size = new System.Drawing.Size(110, 13);
this.label26.TabIndex = 89;
this.label26.Text = "ServerCustomDatas2:";
//
// ClientCustomDatas2TxtBox
//
this.ClientCustomDatas2TxtBox.Location = new System.Drawing.Point(121, 550);
this.ClientCustomDatas2TxtBox.Name = "ClientCustomDatas2TxtBox";
this.ClientCustomDatas2TxtBox.Size = new System.Drawing.Size(230, 20);
this.ClientCustomDatas2TxtBox.TabIndex = 94;
//
// label27
//
this.label27.AutoSize = true;
this.label27.Location = new System.Drawing.Point(12, 553);
this.label27.Name = "label27";
this.label27.Size = new System.Drawing.Size(105, 13);
this.label27.TabIndex = 93;
this.label27.Text = "ClientCustomDatas2:";
//
// ClientCustomDatas1TxtBox
//
this.ClientCustomDatas1TxtBox.Location = new System.Drawing.Point(121, 527);
this.ClientCustomDatas1TxtBox.Name = "ClientCustomDatas1TxtBox";
this.ClientCustomDatas1TxtBox.Size = new System.Drawing.Size(230, 20);
this.ClientCustomDatas1TxtBox.TabIndex = 92;
//
// label28
//
this.label28.AutoSize = true;
this.label28.Location = new System.Drawing.Point(12, 530);
this.label28.Name = "label28";
this.label28.Size = new System.Drawing.Size(105, 13);
this.label28.TabIndex = 91;
this.label28.Text = "ClientCustomDatas1:";
//
// label30
//
this.label30.AutoSize = true;
this.label30.Location = new System.Drawing.Point(201, 64);
this.label30.Name = "label30";
this.label30.Size = new System.Drawing.Size(14, 13);
this.label30.TabIndex = 101;
this.label30.Text = "B";
//
// label31
//
this.label31.AutoSize = true;
this.label31.Location = new System.Drawing.Point(153, 65);
this.label31.Name = "label31";
this.label31.Size = new System.Drawing.Size(15, 13);
this.label31.TabIndex = 100;
this.label31.Text = "G";
//
// label32
//
this.label32.AutoSize = true;
this.label32.Location = new System.Drawing.Point(104, 65);
this.label32.Name = "label32";
this.label32.Size = new System.Drawing.Size(15, 13);
this.label32.TabIndex = 99;
this.label32.Text = "R";
//
// templateColBTxtBox
//
this.templateColBTxtBox.Location = new System.Drawing.Point(188, 43);
this.templateColBTxtBox.Name = "templateColBTxtBox";
this.templateColBTxtBox.Size = new System.Drawing.Size(42, 20);
this.templateColBTxtBox.TabIndex = 98;
this.templateColBTxtBox.Text = "0";
//
// templateColGTxtBox
//
this.templateColGTxtBox.Location = new System.Drawing.Point(140, 43);
this.templateColGTxtBox.Name = "templateColGTxtBox";
this.templateColGTxtBox.Size = new System.Drawing.Size(42, 20);
this.templateColGTxtBox.TabIndex = 97;
this.templateColGTxtBox.Text = "0";
//
// templateColRTxtBox
//
this.templateColRTxtBox.Location = new System.Drawing.Point(92, 43);
this.templateColRTxtBox.Name = "templateColRTxtBox";
this.templateColRTxtBox.Size = new System.Drawing.Size(42, 20);
this.templateColRTxtBox.TabIndex = 96;
this.templateColRTxtBox.Text = "0";
//
// label33
//
this.label33.AutoSize = true;
this.label33.Location = new System.Drawing.Point(7, 49);
this.label33.Name = "label33";
this.label33.Size = new System.Drawing.Size(78, 13);
this.label33.TabIndex = 95;
this.label33.Text = "Template Color";
//
// OceanEpicSpawnEntriesOverrideValuesTxtBox
//
this.OceanEpicSpawnEntriesOverrideValuesTxtBox.Location = new System.Drawing.Point(365, 705);
this.OceanEpicSpawnEntriesOverrideValuesTxtBox.Multiline = true;
this.OceanEpicSpawnEntriesOverrideValuesTxtBox.Name = "OceanEpicSpawnEntriesOverrideValuesTxtBox";
this.OceanEpicSpawnEntriesOverrideValuesTxtBox.Size = new System.Drawing.Size(289, 53);
this.OceanEpicSpawnEntriesOverrideValuesTxtBox.TabIndex = 103;
//
// label1
//
this.label1.AutoSize = true;
this.label1.Location = new System.Drawing.Point(362, 686);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(197, 13);
this.label1.TabIndex = 102;
this.label1.Text = "OceanEpicSpawnEntriesOverrideValues";
//
// EditServerTemplate
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(667, 770);
this.Controls.Add(this.OceanEpicSpawnEntriesOverrideValuesTxtBox);
this.Controls.Add(this.label1);
this.Controls.Add(this.label30);
this.Controls.Add(this.label31);
this.Controls.Add(this.label32);
this.Controls.Add(this.templateColBTxtBox);
this.Controls.Add(this.templateColGTxtBox);
this.Controls.Add(this.templateColRTxtBox);
this.Controls.Add(this.label33);
this.Controls.Add(this.ClientCustomDatas2TxtBox);
this.Controls.Add(this.label27);
this.Controls.Add(this.ClientCustomDatas1TxtBox);
this.Controls.Add(this.label28);
this.Controls.Add(this.ServerCustomDatas2TxtBox);
this.Controls.Add(this.label26);
this.Controls.Add(this.ServerCustomDatas1TxtBox);
this.Controls.Add(this.label25);
this.Controls.Add(this.label24);
this.Controls.Add(this.label23);
this.Controls.Add(this.label22);
this.Controls.Add(this.waterColorBTxtBox);
this.Controls.Add(this.waterColorGTxtBox);
this.Controls.Add(this.waterColorRTxtBox);
this.Controls.Add(this.label21);
this.Controls.Add(this.label20);
this.Controls.Add(this.skyStyleIndexTxtBox);
this.Controls.Add(this.regionOverridesTxtBox);
this.Controls.Add(this.label19);
this.Controls.Add(this.NPCShipSpawnEntriesOverrideTemplateNameTxtBox);
this.Controls.Add(this.label18);
this.Controls.Add(this.oceanEpicSpawnEntriesOverrideTemplateNameTxtBox);
this.Controls.Add(this.label17);
this.Controls.Add(this.extraSublevelTxtBox);
this.Controls.Add(this.label16);
this.Controls.Add(this.label29);
this.Controls.Add(this.overrideShooterGameModeDefaultGameIniDataGridView);
this.Controls.Add(this.additionalCmdLineParamsTxtBox);
this.Controls.Add(this.label15);
this.Controls.Add(this.label14);
this.Controls.Add(this.GlobalBiomeSeamlessServerGridPreOffsetValuesOceanWaterTxtBox);
this.Controls.Add(this.label13);
this.Controls.Add(this.GlobalBiomeSeamlessServerGridPreOffsetValuesTxtBox);
this.Controls.Add(this.label11);
this.Controls.Add(this.TreasureMapLootTablesOverrideTxtBox);
this.Controls.Add(this.label9);
this.Controls.Add(this.label8);
this.Controls.Add(this.transitionMinZTxtBox);
this.Controls.Add(this.label6);
this.Controls.Add(this.OceanFloatsamCratesOverrideTxtBox);
this.Controls.Add(this.OceanDinoDepthEntriesOverrideLbl);
this.Controls.Add(this.OceanDinoDepthEntriesOverrideTxtBox);
this.Controls.Add(this.label4);
this.Controls.Add(this.FloorZDist);
this.Controls.Add(this.nameTxtBox);
this.Controls.Add(this.label3);
this.Controls.Add(this.cancelBtn);
this.Controls.Add(this.saveBtn);
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
this.Name = "EditServerTemplate";
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
this.Text = "Edit Server Template";
this.Load += new System.EventHandler(this.EditServerTemplate_Load);
((System.ComponentModel.ISupportInitialize)(this.overrideShooterGameModeDefaultGameIniDataGridView)).EndInit();
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
private System.Windows.Forms.Button saveBtn;
private System.Windows.Forms.Button cancelBtn;
private System.Windows.Forms.TextBox nameTxtBox;
private System.Windows.Forms.Label label3;
private System.Windows.Forms.Label label4;
private System.Windows.Forms.TextBox FloorZDist;
private System.Windows.Forms.Label OceanDinoDepthEntriesOverrideLbl;
private System.Windows.Forms.TextBox OceanDinoDepthEntriesOverrideTxtBox;
private System.Windows.Forms.Label label6;
private System.Windows.Forms.TextBox OceanFloatsamCratesOverrideTxtBox;
private System.Windows.Forms.Label label9;
private System.Windows.Forms.Label label8;
private System.Windows.Forms.TextBox transitionMinZTxtBox;
private System.Windows.Forms.Label label11;
private System.Windows.Forms.TextBox TreasureMapLootTablesOverrideTxtBox;
private System.Windows.Forms.Label label13;
private System.Windows.Forms.TextBox GlobalBiomeSeamlessServerGridPreOffsetValuesTxtBox;
private System.Windows.Forms.Label label14;
private System.Windows.Forms.TextBox GlobalBiomeSeamlessServerGridPreOffsetValuesOceanWaterTxtBox;
private System.Windows.Forms.TextBox additionalCmdLineParamsTxtBox;
private System.Windows.Forms.Label label15;
private System.Windows.Forms.Label label29;
private System.Windows.Forms.DataGridView overrideShooterGameModeDefaultGameIniDataGridView;
private System.Windows.Forms.Label label16;
private System.Windows.Forms.TextBox extraSublevelTxtBox;
private System.Windows.Forms.TextBox oceanEpicSpawnEntriesOverrideTemplateNameTxtBox;
private System.Windows.Forms.Label label17;
private System.Windows.Forms.TextBox NPCShipSpawnEntriesOverrideTemplateNameTxtBox;
private System.Windows.Forms.Label label18;
private System.Windows.Forms.TextBox regionOverridesTxtBox;
private System.Windows.Forms.Label label19;
private System.Windows.Forms.Label label20;
private System.Windows.Forms.TextBox skyStyleIndexTxtBox;
private System.Windows.Forms.Label label21;
private System.Windows.Forms.TextBox waterColorRTxtBox;
private System.Windows.Forms.TextBox waterColorGTxtBox;
private System.Windows.Forms.TextBox waterColorBTxtBox;
private System.Windows.Forms.Label label22;
private System.Windows.Forms.Label label23;
private System.Windows.Forms.Label label24;
private System.Windows.Forms.TextBox ServerCustomDatas1TxtBox;
private System.Windows.Forms.Label label25;
private System.Windows.Forms.TextBox ServerCustomDatas2TxtBox;
private System.Windows.Forms.Label label26;
private System.Windows.Forms.TextBox ClientCustomDatas2TxtBox;
private System.Windows.Forms.Label label27;
private System.Windows.Forms.TextBox ClientCustomDatas1TxtBox;
private System.Windows.Forms.Label label28;
private System.Windows.Forms.Label label30;
private System.Windows.Forms.Label label31;
private System.Windows.Forms.Label label32;
private System.Windows.Forms.TextBox templateColBTxtBox;
private System.Windows.Forms.TextBox templateColGTxtBox;
private System.Windows.Forms.TextBox templateColRTxtBox;
private System.Windows.Forms.Label label33;
private System.Windows.Forms.TextBox OceanEpicSpawnEntriesOverrideValuesTxtBox;
private System.Windows.Forms.Label label1;
}
}

View file

@ -0,0 +1,230 @@
using AtlasGridDataLibrary;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Diagnostics;
using System.Drawing;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace ServerGridEditor
{
public partial class EditServerTemplate : Form
{
ServerTemplateData targetServerTemplate;
MainForm mainForm;
public EditServerTemplate(MainForm mainForm, ServerTemplateData targetServerTemplate)
{
this.mainForm = mainForm;
this.targetServerTemplate = targetServerTemplate;
InitializeComponent();
}
private void EditServerTemplate_Load(object sender, EventArgs e)
{
nameTxtBox.Text = targetServerTemplate.name;
additionalCmdLineParamsTxtBox.Text = targetServerTemplate.AdditionalCmdLineParams;
oceanEpicSpawnEntriesOverrideTemplateNameTxtBox.Text = targetServerTemplate.oceanEpicSpawnEntriesOverrideTemplateName;
NPCShipSpawnEntriesOverrideTemplateNameTxtBox.Text = targetServerTemplate.NPCShipSpawnEntriesOverrideTemplateName;
waterColorRTxtBox.Text = targetServerTemplate.waterColorR.ToString();
waterColorGTxtBox.Text = targetServerTemplate.waterColorG.ToString();
waterColorBTxtBox.Text = targetServerTemplate.waterColorB.ToString();
skyStyleIndexTxtBox.Text = targetServerTemplate.skyStyleIndex.ToString();
ServerCustomDatas1TxtBox.Text = targetServerTemplate.ServerCustomDatas1;
ServerCustomDatas2TxtBox.Text = targetServerTemplate.ServerCustomDatas2;
ClientCustomDatas1TxtBox.Text = targetServerTemplate.ClientCustomDatas1;
ClientCustomDatas2TxtBox.Text = targetServerTemplate.ClientCustomDatas2;
BindingList<ConfigKeyValueEntry> pairs = new BindingList<ConfigKeyValueEntry>();
pairs.AddingNew += (s, a) =>
{
a.NewObject = new ConfigKeyValueEntry("", "");
};
if (targetServerTemplate.OverrideShooterGameModeDefaultGameIni != null)
foreach (KeyValuePair<string, string> DicPair in targetServerTemplate.OverrideShooterGameModeDefaultGameIni)
pairs.Add(new ConfigKeyValueEntry(DicPair.Key, DicPair.Value));
overrideShooterGameModeDefaultGameIniDataGridView.DataSource = pairs;
FloorZDist.Text = targetServerTemplate.floorZDist + "";
transitionMinZTxtBox.Text = targetServerTemplate.transitionMinZ + "";
GlobalBiomeSeamlessServerGridPreOffsetValuesTxtBox.Text = targetServerTemplate.GlobalBiomeSeamlessServerGridPreOffsetValues;
GlobalBiomeSeamlessServerGridPreOffsetValuesOceanWaterTxtBox.Text = targetServerTemplate.GlobalBiomeSeamlessServerGridPreOffsetValuesOceanWater;
OceanDinoDepthEntriesOverrideTxtBox.Text = targetServerTemplate.OceanDinoDepthEntriesOverride;
OceanEpicSpawnEntriesOverrideValuesTxtBox.Text = targetServerTemplate.OceanEpicSpawnEntriesOverrideValues;
OceanFloatsamCratesOverrideTxtBox.Text = targetServerTemplate.oceanFloatsamCratesOverride;
TreasureMapLootTablesOverrideTxtBox.Text = targetServerTemplate.treasureMapLootTablesOverride;
regionOverridesTxtBox.Text = targetServerTemplate.regionOverrides;
if (targetServerTemplate.extraSublevels != null)
extraSublevelTxtBox.Lines = targetServerTemplate.extraSublevels.ToArray();
Text += string.Format(" ({0},{1})", targetServerTemplate.gridX, targetServerTemplate.gridY);
templateColRTxtBox.Text = targetServerTemplate.templateColorR + "";
templateColGTxtBox.Text = targetServerTemplate.templateColorG + "";
templateColBTxtBox.Text = targetServerTemplate.templateColorB + "";
}
private void cancelBtn_Click(object sender, EventArgs e)
{
DialogResult = DialogResult.Cancel;
Close();
}
private void createBtn_Click(object sender, EventArgs e)
{
if (Save())
{
DialogResult = DialogResult.OK;
Close();
}
}
private bool Save()
{
nameTxtBox.Text = nameTxtBox.Text.Trim();
if (string.IsNullOrEmpty(nameTxtBox.Text))
{
MessageBox.Show("You must specify a template name", "Alert", MessageBoxButtons.OK, MessageBoxIcon.Error);
return false;
}
if (nameTxtBox.Text == "None")
{
MessageBox.Show("You can't create a template called None", "Alert", MessageBoxButtons.OK, MessageBoxIcon.Error);
return false;
}
foreach (ServerTemplateData template in mainForm.currentProject.serverTemplates)
{
if(nameTxtBox.Text == template.name && targetServerTemplate != template)
{
MessageBox.Show("Another template exists with the same name", "Alert", MessageBoxButtons.OK, MessageBoxIcon.Error);
return false;
}
}
int floorZDist, transitionMinZ;
if (!int.TryParse(FloorZDist.Text, out floorZDist))
{
MessageBox.Show("Invalid number for floor distance from ocean surface", "Alert", MessageBoxButtons.OK, MessageBoxIcon.Error);
return false;
}
if (!int.TryParse(transitionMinZTxtBox.Text, out transitionMinZ))
{
MessageBox.Show("Invalid number for transition minimum Z", "Alert", MessageBoxButtons.OK, MessageBoxIcon.Error);
return false;
}
float waterColorR, waterColorG, waterColorB;
float templateColorR, templateColorG, templateColorB;
int skyStyleIndex;
if (!float.TryParse(waterColorRTxtBox.Text, out waterColorR))
{
MessageBox.Show("Invalid number for waterColorR", "Alert", MessageBoxButtons.OK, MessageBoxIcon.Error);
return false;
}
if (!float.TryParse(waterColorGTxtBox.Text, out waterColorG))
{
MessageBox.Show("Invalid number for waterColorG", "Alert", MessageBoxButtons.OK, MessageBoxIcon.Error);
return false;
}
if (!float.TryParse(waterColorBTxtBox.Text, out waterColorB))
{
MessageBox.Show("Invalid number for waterColorB", "Alert", MessageBoxButtons.OK, MessageBoxIcon.Error);
return false;
}
if (!int.TryParse(skyStyleIndexTxtBox.Text, out skyStyleIndex))
{
MessageBox.Show("Invalid number for skyStyleIndex", "Alert", MessageBoxButtons.OK, MessageBoxIcon.Error);
return false;
}
if (!float.TryParse(templateColRTxtBox.Text, out templateColorR))
{
MessageBox.Show("Invalid number for templateColorR", "Alert", MessageBoxButtons.OK, MessageBoxIcon.Error);
return false;
}
if (!float.TryParse(templateColGTxtBox.Text, out templateColorG))
{
MessageBox.Show("Invalid number for templateColorG", "Alert", MessageBoxButtons.OK, MessageBoxIcon.Error);
return false;
}
if (!float.TryParse(templateColBTxtBox.Text, out templateColorB))
{
MessageBox.Show("Invalid number for templateColorB", "Alert", MessageBoxButtons.OK, MessageBoxIcon.Error);
return false;
}
targetServerTemplate.name = nameTxtBox.Text;
targetServerTemplate.AdditionalCmdLineParams = additionalCmdLineParamsTxtBox.Text;
targetServerTemplate.oceanEpicSpawnEntriesOverrideTemplateName = oceanEpicSpawnEntriesOverrideTemplateNameTxtBox.Text;
targetServerTemplate.NPCShipSpawnEntriesOverrideTemplateName = NPCShipSpawnEntriesOverrideTemplateNameTxtBox.Text;
targetServerTemplate.waterColorR = waterColorR;
targetServerTemplate.waterColorG = waterColorG;
targetServerTemplate.waterColorB = waterColorB;
targetServerTemplate.skyStyleIndex = skyStyleIndex;
targetServerTemplate.ServerCustomDatas1 = ServerCustomDatas1TxtBox.Text;
targetServerTemplate.ServerCustomDatas2 = ServerCustomDatas2TxtBox.Text;
targetServerTemplate.ClientCustomDatas1 = ClientCustomDatas1TxtBox.Text;
targetServerTemplate.ClientCustomDatas2 = ClientCustomDatas2TxtBox.Text;
if (targetServerTemplate.OverrideShooterGameModeDefaultGameIni != null)
targetServerTemplate.OverrideShooterGameModeDefaultGameIni.Clear();
else
targetServerTemplate.OverrideShooterGameModeDefaultGameIni = new Dictionary<string, string>();
foreach (DataGridViewRow row in overrideShooterGameModeDefaultGameIniDataGridView.Rows)
if (row.Cells[0].Value != null)
targetServerTemplate.OverrideShooterGameModeDefaultGameIni.Add(row.Cells[0].Value.ToString(), row.Cells[1].Value != null ? row.Cells[1].Value.ToString() : "");
targetServerTemplate.floorZDist = floorZDist;
targetServerTemplate.transitionMinZ = transitionMinZ;
targetServerTemplate.GlobalBiomeSeamlessServerGridPreOffsetValues = GlobalBiomeSeamlessServerGridPreOffsetValuesTxtBox.Text;
targetServerTemplate.GlobalBiomeSeamlessServerGridPreOffsetValuesOceanWater = GlobalBiomeSeamlessServerGridPreOffsetValuesOceanWaterTxtBox.Text;
targetServerTemplate.OceanDinoDepthEntriesOverride = OceanDinoDepthEntriesOverrideTxtBox.Text;
targetServerTemplate.OceanEpicSpawnEntriesOverrideValues = OceanEpicSpawnEntriesOverrideValuesTxtBox.Text;
targetServerTemplate.oceanFloatsamCratesOverride = OceanFloatsamCratesOverrideTxtBox.Text;
targetServerTemplate.treasureMapLootTablesOverride = TreasureMapLootTablesOverrideTxtBox.Text;
targetServerTemplate.regionOverrides = regionOverridesTxtBox.Text;
targetServerTemplate.extraSublevels = new List<string>(extraSublevelTxtBox.Lines);
targetServerTemplate.templateColorR = templateColorR;
targetServerTemplate.templateColorG = templateColorG;
targetServerTemplate.templateColorB = templateColorB;
return true;
}
private void portTxtBox_KeyPress(object sender, KeyPressEventArgs e)
{
StaticHelpers.ForceNumericKeypress(sender, e, false);
}
private void gamePortTxtBox_KeyPress(object sender, KeyPressEventArgs e)
{
StaticHelpers.ForceNumericKeypress(sender, e, false);
}
private void seamlessDataPortTxt_KeyPress(object sender, KeyPressEventArgs e)
{
StaticHelpers.ForceNumericKeypress(sender, e, false);
}
private void gFloorZDist_KeyPress(object sender, KeyPressEventArgs e)
{
StaticHelpers.ForceNumericKeypress(sender, e, false);
}
}
}

View file

@ -0,0 +1,120 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>

View file

@ -0,0 +1,101 @@
namespace ServerGridEditor.Forms
{
partial class EditServerTemplates
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.templatesLstBox = new System.Windows.Forms.ListBox();
this.addBtn = new System.Windows.Forms.Button();
this.editBtn = new System.Windows.Forms.Button();
this.removeBtn = new System.Windows.Forms.Button();
this.SuspendLayout();
//
// templatesLstBox
//
this.templatesLstBox.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed;
this.templatesLstBox.FormattingEnabled = true;
this.templatesLstBox.Location = new System.Drawing.Point(12, 12);
this.templatesLstBox.Name = "templatesLstBox";
this.templatesLstBox.Size = new System.Drawing.Size(240, 251);
this.templatesLstBox.TabIndex = 0;
this.templatesLstBox.DrawItem += new System.Windows.Forms.DrawItemEventHandler(this.templatesLstBox_DrawItem);
//
// addBtn
//
this.addBtn.Location = new System.Drawing.Point(12, 269);
this.addBtn.Name = "addBtn";
this.addBtn.Size = new System.Drawing.Size(77, 29);
this.addBtn.TabIndex = 1;
this.addBtn.Text = "Add";
this.addBtn.UseVisualStyleBackColor = true;
this.addBtn.Click += new System.EventHandler(this.addBtn_Click);
//
// editBtn
//
this.editBtn.Location = new System.Drawing.Point(95, 269);
this.editBtn.Name = "editBtn";
this.editBtn.Size = new System.Drawing.Size(74, 29);
this.editBtn.TabIndex = 2;
this.editBtn.Text = "Edit";
this.editBtn.UseVisualStyleBackColor = true;
this.editBtn.Click += new System.EventHandler(this.editBtn_Click);
//
// removeBtn
//
this.removeBtn.Location = new System.Drawing.Point(175, 269);
this.removeBtn.Name = "removeBtn";
this.removeBtn.Size = new System.Drawing.Size(77, 29);
this.removeBtn.TabIndex = 3;
this.removeBtn.Text = "Remove";
this.removeBtn.UseVisualStyleBackColor = true;
this.removeBtn.Click += new System.EventHandler(this.removeBtn_Click);
//
// EditServerTemplates
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(266, 307);
this.Controls.Add(this.removeBtn);
this.Controls.Add(this.editBtn);
this.Controls.Add(this.addBtn);
this.Controls.Add(this.templatesLstBox);
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
this.Name = "EditServerTemplates";
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
this.Text = "EditServerTemplates";
this.ResumeLayout(false);
}
#endregion
private System.Windows.Forms.ListBox templatesLstBox;
private System.Windows.Forms.Button addBtn;
private System.Windows.Forms.Button editBtn;
private System.Windows.Forms.Button removeBtn;
}
}

View file

@ -0,0 +1,106 @@
using AtlasGridDataLibrary;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace ServerGridEditor.Forms
{
public partial class EditServerTemplates : Form
{
MainForm mainForm;
public EditServerTemplates(MainForm mainForm)
{
this.mainForm = mainForm;
InitializeComponent();
foreach (ServerTemplateData template in mainForm.currentProject.serverTemplates)
templatesLstBox.Items.Add(template.name);
}
private void addBtn_Click(object sender, EventArgs e)
{
ServerTemplateData serverTemplate = new ServerTemplateData();
var editForm = new EditServerTemplate(mainForm, serverTemplate);
if (editForm.ShowDialog() == DialogResult.OK)
{
mainForm.currentProject.serverTemplates.Add(serverTemplate);
templatesLstBox.Items.Add(serverTemplate.name);
}
}
private void editBtn_Click(object sender, EventArgs e)
{
if (templatesLstBox.SelectedItem != null)
{
ServerTemplateData serverTemplate = mainForm.currentProject.GetServerTemplateByName(templatesLstBox.SelectedItem.ToString());
if (serverTemplate != null)
{
string originalName = serverTemplate.name;
var editForm = new EditServerTemplate(mainForm, serverTemplate);
if (editForm.ShowDialog() == DialogResult.OK)
{
if (serverTemplate.name != originalName)
{
templatesLstBox.Items.Remove(originalName);
templatesLstBox.Items.Add(serverTemplate.name);
}
}
}
}
}
private void removeBtn_Click(object sender, EventArgs e)
{
if (templatesLstBox.SelectedItem != null)
{
ServerTemplateData serverTemplate = mainForm.currentProject.GetServerTemplateByName(templatesLstBox.SelectedItem.ToString());
if (serverTemplate != null)
{
var confirmResult = MessageBox.Show("You are about to delete the selected template\n\nAre you sure?",
"Warning",
MessageBoxButtons.OKCancel, MessageBoxIcon.Warning);
if (confirmResult == DialogResult.OK)
{
templatesLstBox.Items.Remove(serverTemplate.name);
mainForm.currentProject.serverTemplates.Remove(serverTemplate);
}
}
}
}
private void templatesLstBox_DrawItem(object sender, DrawItemEventArgs e)
{
e.DrawBackground();
Graphics g = e.Graphics;
// draw the background color you want
// mine is set to olive, change it to whatever you want
//g.FillRectangle(new SolidBrush(Color.White), e.Bounds);
// draw the text of the list item, not doing this will only show
// the background color
// you will need to get the text of item to display
if (e.Index != -1)
{
ServerTemplateData template = mainForm.currentProject.GetServerTemplateByName(templatesLstBox.Items[e.Index].ToString());
if (template != null)
g.DrawString(templatesLstBox.Items[e.Index].ToString(), e.Font, new SolidBrush(template.GetTemplateColor()),
new PointF(e.Bounds.X, e.Bounds.Y));
else
g.DrawString(templatesLstBox.Items[e.Index].ToString(), e.Font, new SolidBrush(e.ForeColor), new PointF(e.Bounds.X, e.Bounds.Y));
}
e.DrawFocusRectangle();
}
}
}

View file

@ -0,0 +1,120 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>

View file

@ -0,0 +1,157 @@
namespace ServerGridEditor.Forms
{
partial class EditShipPath
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.loopingPathChckBox = new System.Windows.Forms.CheckBox();
this.applyBtn = new System.Windows.Forms.Button();
this.label1 = new System.Windows.Forms.Label();
this.pathNameTxtBox = new System.Windows.Forms.TextBox();
this.autoSpawnChckBox = new System.Windows.Forms.CheckBox();
this.autoSpawnEveryUTCIntervalTxtBox = new System.Windows.Forms.TextBox();
this.label2 = new System.Windows.Forms.Label();
this.autoSpawnShipClassTxtBox = new System.Windows.Forms.TextBox();
this.label3 = new System.Windows.Forms.Label();
this.SuspendLayout();
//
// loopingPathChckBox
//
this.loopingPathChckBox.AutoSize = true;
this.loopingPathChckBox.Location = new System.Drawing.Point(75, 130);
this.loopingPathChckBox.Name = "loopingPathChckBox";
this.loopingPathChckBox.Size = new System.Drawing.Size(114, 17);
this.loopingPathChckBox.TabIndex = 0;
this.loopingPathChckBox.Text = "Loop around world";
this.loopingPathChckBox.UseVisualStyleBackColor = true;
//
// applyBtn
//
this.applyBtn.Location = new System.Drawing.Point(152, 179);
this.applyBtn.Name = "applyBtn";
this.applyBtn.Size = new System.Drawing.Size(75, 23);
this.applyBtn.TabIndex = 1;
this.applyBtn.Text = "Apply";
this.applyBtn.UseVisualStyleBackColor = true;
this.applyBtn.Click += new System.EventHandler(this.applyBtn_Click);
//
// label1
//
this.label1.AutoSize = true;
this.label1.Location = new System.Drawing.Point(9, 20);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(60, 13);
this.label1.TabIndex = 2;
this.label1.Text = "Path Name";
//
// pathNameTxtBox
//
this.pathNameTxtBox.Location = new System.Drawing.Point(75, 17);
this.pathNameTxtBox.Name = "pathNameTxtBox";
this.pathNameTxtBox.Size = new System.Drawing.Size(224, 20);
this.pathNameTxtBox.TabIndex = 3;
//
// autoSpawnChckBox
//
this.autoSpawnChckBox.AutoSize = true;
this.autoSpawnChckBox.Location = new System.Drawing.Point(75, 153);
this.autoSpawnChckBox.Name = "autoSpawnChckBox";
this.autoSpawnChckBox.Size = new System.Drawing.Size(148, 17);
this.autoSpawnChckBox.TabIndex = 4;
this.autoSpawnChckBox.Text = "Auto Spawn At First Node";
this.autoSpawnChckBox.UseVisualStyleBackColor = true;
//
// autoSpawnEveryUTCIntervalTxtBox
//
this.autoSpawnEveryUTCIntervalTxtBox.Location = new System.Drawing.Point(164, 43);
this.autoSpawnEveryUTCIntervalTxtBox.Name = "autoSpawnEveryUTCIntervalTxtBox";
this.autoSpawnEveryUTCIntervalTxtBox.Size = new System.Drawing.Size(135, 20);
this.autoSpawnEveryUTCIntervalTxtBox.TabIndex = 6;
//
// label2
//
this.label2.AutoSize = true;
this.label2.Location = new System.Drawing.Point(9, 46);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(149, 13);
this.label2.TabIndex = 5;
this.label2.Text = "AutoSpawnEveryUTCInterval:";
//
// autoSpawnShipClassTxtBox
//
this.autoSpawnShipClassTxtBox.Location = new System.Drawing.Point(12, 88);
this.autoSpawnShipClassTxtBox.Name = "autoSpawnShipClassTxtBox";
this.autoSpawnShipClassTxtBox.Size = new System.Drawing.Size(335, 20);
this.autoSpawnShipClassTxtBox.TabIndex = 8;
this.autoSpawnShipClassTxtBox.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.autoSpawnShipClass_KeyPress);
//
// label3
//
this.label3.AutoSize = true;
this.label3.Location = new System.Drawing.Point(9, 72);
this.label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(111, 13);
this.label3.TabIndex = 7;
this.label3.Text = "AutoSpawnShipClass:";
//
// EditShipPath
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(359, 216);
this.Controls.Add(this.autoSpawnShipClassTxtBox);
this.Controls.Add(this.label3);
this.Controls.Add(this.autoSpawnEveryUTCIntervalTxtBox);
this.Controls.Add(this.label2);
this.Controls.Add(this.autoSpawnChckBox);
this.Controls.Add(this.pathNameTxtBox);
this.Controls.Add(this.label1);
this.Controls.Add(this.applyBtn);
this.Controls.Add(this.loopingPathChckBox);
this.Name = "EditShipPath";
this.ShowIcon = false;
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
this.Text = "Edit Ship Path";
this.Load += new System.EventHandler(this.EditShipPath_Load);
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
private System.Windows.Forms.CheckBox loopingPathChckBox;
private System.Windows.Forms.Button applyBtn;
private System.Windows.Forms.Label label1;
private System.Windows.Forms.TextBox pathNameTxtBox;
private System.Windows.Forms.CheckBox autoSpawnChckBox;
private System.Windows.Forms.TextBox autoSpawnEveryUTCIntervalTxtBox;
private System.Windows.Forms.Label label2;
private System.Windows.Forms.TextBox autoSpawnShipClassTxtBox;
private System.Windows.Forms.Label label3;
}
}

View file

@ -0,0 +1,53 @@
using AtlasGridDataLibrary;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace ServerGridEditor.Forms
{
public partial class EditShipPath : Form
{
public ShipPathData TargetPath;
public EditShipPath(ShipPathData TargetPath)
{
this.TargetPath = TargetPath;
InitializeComponent();
}
private void EditShipPath_Load(object sender, EventArgs e)
{
loopingPathChckBox.Checked = TargetPath.isLooping;
pathNameTxtBox.Text = TargetPath.PathName;
autoSpawnChckBox.Checked = TargetPath.autoSpawn;
autoSpawnShipClassTxtBox.Text = TargetPath.AutoSpawnShipClass;
autoSpawnEveryUTCIntervalTxtBox.Text = TargetPath.AutoSpawnEveryUTCInterval + "";
}
private void applyBtn_Click(object sender, EventArgs e)
{
TargetPath.isLooping = loopingPathChckBox.Checked;
TargetPath.PathName = pathNameTxtBox.Text;
if (!int.TryParse(autoSpawnEveryUTCIntervalTxtBox.Text, out TargetPath.AutoSpawnEveryUTCInterval))
{
MessageBox.Show("Invalid number for AutoSpawnEveryUTCInterval", "Alert", MessageBoxButtons.OK, MessageBoxIcon.Error);
this.DialogResult = DialogResult.Cancel;
return;
}
TargetPath.AutoSpawnShipClass = autoSpawnShipClassTxtBox.Text;
TargetPath.autoSpawn = autoSpawnChckBox.Checked;
Close();
}
private void autoSpawnShipClass_KeyPress(object sender, KeyPressEventArgs e)
{
StaticHelpers.ForceNumericKeypress(sender, e, false);
}
}
}

View file

@ -0,0 +1,120 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>

View file

@ -0,0 +1,126 @@
namespace ServerGridEditor.Forms
{
partial class EditSpawnRegions
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.spawnRegionsGrid = new System.Windows.Forms.DataGridView();
this.cancelBtn = new System.Windows.Forms.Button();
this.saveBtn = new System.Windows.Forms.Button();
this.regionName = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.regionParent = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.messageLabel = new System.Windows.Forms.Label();
((System.ComponentModel.ISupportInitialize)(this.spawnRegionsGrid)).BeginInit();
this.SuspendLayout();
//
// spawnRegionsGrid
//
this.spawnRegionsGrid.AllowUserToOrderColumns = true;
this.spawnRegionsGrid.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.spawnRegionsGrid.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
this.spawnRegionsGrid.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
this.regionName,
this.regionParent});
this.spawnRegionsGrid.Location = new System.Drawing.Point(12, 29);
this.spawnRegionsGrid.Name = "spawnRegionsGrid";
this.spawnRegionsGrid.Size = new System.Drawing.Size(350, 332);
this.spawnRegionsGrid.TabIndex = 6;
//
// cancelBtn
//
this.cancelBtn.Anchor = System.Windows.Forms.AnchorStyles.Bottom;
this.cancelBtn.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F);
this.cancelBtn.Location = new System.Drawing.Point(189, 372);
this.cancelBtn.Name = "cancelBtn";
this.cancelBtn.Size = new System.Drawing.Size(130, 35);
this.cancelBtn.TabIndex = 8;
this.cancelBtn.Text = "Cancel";
this.cancelBtn.UseVisualStyleBackColor = true;
this.cancelBtn.Click += new System.EventHandler(this.cancelBtn_Click);
//
// saveBtn
//
this.saveBtn.Anchor = System.Windows.Forms.AnchorStyles.Bottom;
this.saveBtn.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.saveBtn.Location = new System.Drawing.Point(53, 372);
this.saveBtn.Name = "saveBtn";
this.saveBtn.Size = new System.Drawing.Size(130, 35);
this.saveBtn.TabIndex = 7;
this.saveBtn.Text = "Save";
this.saveBtn.UseVisualStyleBackColor = true;
this.saveBtn.Click += new System.EventHandler(this.saveBtn_Click);
//
// regionName
//
this.regionName.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill;
this.regionName.HeaderText = "Name";
this.regionName.Name = "regionName";
//
// regionParent
//
this.regionParent.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill;
this.regionParent.HeaderText = "Parent Cell";
this.regionParent.Name = "regionParent";
//
// messageLabel
//
this.messageLabel.AutoSize = true;
this.messageLabel.Location = new System.Drawing.Point(32, 9);
this.messageLabel.Name = "messageLabel";
this.messageLabel.Size = new System.Drawing.Size(321, 13);
this.messageLabel.TabIndex = 24;
this.messageLabel.Text = "Rows with empty Parent Cell fields will automatically be set to cell: ";
//
// EditSpawnRegions
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(374, 419);
this.Controls.Add(this.messageLabel);
this.Controls.Add(this.cancelBtn);
this.Controls.Add(this.saveBtn);
this.Controls.Add(this.spawnRegionsGrid);
this.Name = "EditSpawnRegions";
this.Text = "EditSpawnRegions";
((System.ComponentModel.ISupportInitialize)(this.spawnRegionsGrid)).EndInit();
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
private System.Windows.Forms.DataGridView spawnRegionsGrid;
private System.Windows.Forms.Button cancelBtn;
private System.Windows.Forms.Button saveBtn;
private System.Windows.Forms.DataGridViewTextBoxColumn regionName;
private System.Windows.Forms.DataGridViewTextBoxColumn regionParent;
private System.Windows.Forms.Label messageLabel;
}
}

View file

@ -0,0 +1,108 @@
using AtlasGridDataLibrary;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace ServerGridEditor.Forms
{
public partial class EditSpawnRegions : Form
{
MainForm mainForm = null;
Server ForServer = null;
public EditSpawnRegions(MainForm InMainForm, Server InServer)
{
this.mainForm = InMainForm;
this.ForServer = InServer;
InitializeComponent();
foreach (SpawnRegionData region in mainForm.currentProject.spawnRegions)
{
int index = spawnRegionsGrid.Rows.Add();
spawnRegionsGrid.Rows[index].Cells[regionName.Name].Value = region.name;
spawnRegionsGrid.Rows[index].Cells[regionParent.Name].Value = region.X + "," + region.Y;
if (InServer != null && (InServer.gridX != region.X || InServer.gridY != region.Y))
spawnRegionsGrid.Rows[index].Visible = false;
}
if (ForServer != null)
{
messageLabel.Text = messageLabel.Text + ForServer.gridX + "," + ForServer.gridY;
messageLabel.Visible = true;
}
else
messageLabel.Visible = false;
}
private void saveBtn_Click(object sender, EventArgs e)
{
HashSet<string> names = new HashSet<string>();
foreach (DataGridViewRow row in spawnRegionsGrid.Rows)
{
if (row.Index == spawnRegionsGrid.Rows.Count - 1) continue; //Last row is the new row
if (row.Cells[regionName.Name].Value == null || row.Cells[regionName.Name].Value.ToString().Length == 0)
{
MessageBox.Show("You must assign a unique name to each row", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
return;
}
string name = row.Cells[regionName.Name].Value.ToString();
if (names.Contains(name))
{
MessageBox.Show("Duplicate names " + name + " found\nRegion names must be unique across the atlas", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
return;
}
names.Add(name);
}
mainForm.currentProject.spawnRegions.Clear();
foreach (DataGridViewRow row in spawnRegionsGrid.Rows)
{
if (row.Index == spawnRegionsGrid.Rows.Count - 1) continue; //Last row is the new row
string name = row.Cells[regionName.Name].Value != null ? row.Cells[regionName.Name].Value.ToString() : "";
int serverX = -1, serverY = -1;
string parent = row.Cells[regionParent.Name].Value != null ? row.Cells[regionParent.Name].Value.ToString() : "";
string[] splits = parent.Split(',');
if (splits.Length == 2)
{
serverX = int.Parse(splits[0]);
serverY = int.Parse(splits[1]);
}
Server parentServer = mainForm.GetServerByIndex(new Point(serverX, serverY));
if (parentServer == null)
{
if (ForServer != null)
{
serverX = ForServer.gridX;
serverY = ForServer.gridY;
}
else
{
MessageBox.Show("Can't find parent server for region at index: " + row.Index, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
return;
}
}
SpawnRegionData region = new SpawnRegionData() { name = name, X = serverX, Y = serverY };
mainForm.currentProject.spawnRegions.Add(region);
}
mainForm.Invalidate();
Close();
}
private void cancelBtn_Click(object sender, EventArgs e)
{
Close();
}
}
}

View file

@ -0,0 +1,132 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<metadata name="regionName.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="regionParent.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="regionName.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="regionParent.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
</root>

View file

@ -0,0 +1,162 @@
namespace ServerGridEditor.Forms
{
partial class EditSpawnerTemplatesForm
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.components = new System.ComponentModel.Container();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle2 = new System.Windows.Forms.DataGridViewCellStyle();
this.spawnersGrid = new System.Windows.Forms.DataGridView();
this.saveBtn = new System.Windows.Forms.Button();
this.cancelBtn = new System.Windows.Forms.Button();
this.spawnersBindingSource = new System.Windows.Forms.BindingSource(this.components);
this.sublevelSerializationObjectBindingSource = new System.Windows.Forms.BindingSource(this.components);
this.templateName = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.NPCSpawnEntries = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.NPCSpawnLimits = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.MaxDesiredNumEnemiesMultiplier = new System.Windows.Forms.DataGridViewTextBoxColumn();
((System.ComponentModel.ISupportInitialize)(this.spawnersGrid)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.spawnersBindingSource)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.sublevelSerializationObjectBindingSource)).BeginInit();
this.SuspendLayout();
//
// spawnersGrid
//
this.spawnersGrid.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.spawnersGrid.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
this.spawnersGrid.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
this.templateName,
this.NPCSpawnEntries,
this.NPCSpawnLimits,
this.MaxDesiredNumEnemiesMultiplier});
this.spawnersGrid.Location = new System.Drawing.Point(12, 12);
this.spawnersGrid.Name = "spawnersGrid";
this.spawnersGrid.Size = new System.Drawing.Size(632, 398);
this.spawnersGrid.TabIndex = 0;
//
// saveBtn
//
this.saveBtn.Anchor = System.Windows.Forms.AnchorStyles.Bottom;
this.saveBtn.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.saveBtn.Location = new System.Drawing.Point(198, 432);
this.saveBtn.Name = "saveBtn";
this.saveBtn.Size = new System.Drawing.Size(130, 35);
this.saveBtn.TabIndex = 1;
this.saveBtn.Text = "Save";
this.saveBtn.UseVisualStyleBackColor = true;
this.saveBtn.Click += new System.EventHandler(this.saveBtn_Click);
//
// cancelBtn
//
this.cancelBtn.Anchor = System.Windows.Forms.AnchorStyles.Bottom;
this.cancelBtn.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F);
this.cancelBtn.Location = new System.Drawing.Point(334, 432);
this.cancelBtn.Name = "cancelBtn";
this.cancelBtn.Size = new System.Drawing.Size(130, 35);
this.cancelBtn.TabIndex = 2;
this.cancelBtn.Text = "Cancel";
this.cancelBtn.UseVisualStyleBackColor = true;
this.cancelBtn.Click += new System.EventHandler(this.cancelBtn_Click);
//
// spawnersBindingSource
//
this.spawnersBindingSource.DataSource = typeof(ServerGridEditor.Spawners);
//
// sublevelSerializationObjectBindingSource
//
this.sublevelSerializationObjectBindingSource.DataSource = typeof(AtlasGridDataLibrary.SublevelSerializationObject);
//
// templateName
//
this.templateName.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill;
this.templateName.FillWeight = 50F;
this.templateName.HeaderText = "Name";
this.templateName.Name = "templateName";
//
// NPCSpawnEntries
//
this.NPCSpawnEntries.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill;
dataGridViewCellStyle1.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
this.NPCSpawnEntries.DefaultCellStyle = dataGridViewCellStyle1;
this.NPCSpawnEntries.HeaderText = "NPCSpawnEntries";
this.NPCSpawnEntries.MaxInputLength = 2147483647;
this.NPCSpawnEntries.Name = "NPCSpawnEntries";
//
// NPCSpawnLimits
//
this.NPCSpawnLimits.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill;
dataGridViewCellStyle2.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
this.NPCSpawnLimits.DefaultCellStyle = dataGridViewCellStyle2;
this.NPCSpawnLimits.HeaderText = "NPCSpawnLimits";
this.NPCSpawnLimits.MaxInputLength = 2147483647;
this.NPCSpawnLimits.Name = "NPCSpawnLimits";
//
// MaxDesiredNumEnemiesMultiplier
//
this.MaxDesiredNumEnemiesMultiplier.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill;
this.MaxDesiredNumEnemiesMultiplier.HeaderText = "MaxDesiredNumEnemiesMultiplier";
this.MaxDesiredNumEnemiesMultiplier.Name = "MaxDesiredNumEnemiesMultiplier";
//
// EditSpawnerTemplatesForm
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(656, 479);
this.Controls.Add(this.cancelBtn);
this.Controls.Add(this.saveBtn);
this.Controls.Add(this.spawnersGrid);
this.MaximizeBox = false;
this.MinimizeBox = false;
this.Name = "EditSpawnerTemplatesForm";
this.ShowIcon = false;
this.ShowInTaskbar = false;
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
this.Text = "Edit Spawner Templates";
this.TopMost = true;
((System.ComponentModel.ISupportInitialize)(this.spawnersGrid)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.spawnersBindingSource)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.sublevelSerializationObjectBindingSource)).EndInit();
this.ResumeLayout(false);
}
#endregion
private System.Windows.Forms.DataGridView spawnersGrid;
private System.Windows.Forms.Button saveBtn;
private System.Windows.Forms.Button cancelBtn;
private System.Windows.Forms.BindingSource sublevelSerializationObjectBindingSource;
private System.Windows.Forms.BindingSource spawnersBindingSource;
private System.Windows.Forms.DataGridViewTextBoxColumn templateName;
private System.Windows.Forms.DataGridViewTextBoxColumn NPCSpawnEntries;
private System.Windows.Forms.DataGridViewTextBoxColumn NPCSpawnLimits;
private System.Windows.Forms.DataGridViewTextBoxColumn MaxDesiredNumEnemiesMultiplier;
}
}

View file

@ -0,0 +1,97 @@
using AtlasGridDataLibrary;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace ServerGridEditor.Forms
{
public partial class EditSpawnerTemplatesForm : Form
{
MainForm mainForm;
public EditSpawnerTemplatesForm(MainForm mainForm)
{
this.mainForm = mainForm;
InitializeComponent();
foreach (SpawnerInfoData spawnerInfo in mainForm.spawners.spawnersInfo)
{
int index = spawnersGrid.Rows.Add();
spawnersGrid.Rows[index].Cells[templateName.Name].Value = spawnerInfo.Name;
spawnersGrid.Rows[index].Cells[NPCSpawnEntries.Name].Value = spawnerInfo.NPCSpawnEntries == null ? "" : spawnerInfo.NPCSpawnEntries;
spawnersGrid.Rows[index].Cells[NPCSpawnLimits.Name].Value = spawnerInfo.NPCSpawnLimits == null ? "" : spawnerInfo.NPCSpawnLimits;
spawnersGrid.Rows[index].Cells[MaxDesiredNumEnemiesMultiplier.Name].Value = "" + spawnerInfo.MaxDesiredNumEnemiesMultiplier;
}
}
private void saveBtn_Click(object sender, EventArgs e)
{
//Make sure there are no duplicate names
HashSet<string> names = new HashSet<string>();
foreach (DataGridViewRow row in spawnersGrid.Rows)
{
if (row.Index == spawnersGrid.Rows.Count - 1) continue; //Last row is the new row
string name = (string)row.Cells[templateName.Name].Value;
if (names.Contains(name))
{
//Duplicate name
MessageBox.Show("Duplicate names found\nTemplate names must be unique", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
return;
}
names.Add(name);
}
foreach (DataGridViewRow row in spawnersGrid.Rows)
{
if (row.Index == spawnersGrid.Rows.Count - 1) continue; //Last row is the new row
float tmp;
string val = (string)row.Cells[MaxDesiredNumEnemiesMultiplier.Name].Value;
if (!float.TryParse(val, out tmp))
{
//Invalid multiplier
MessageBox.Show(string.Format("Invalid multiplier value {0}", val), "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
return;
}
}
mainForm.spawners.ClearSpawners();
foreach (DataGridViewRow row in spawnersGrid.Rows)
{
if (row.Index == spawnersGrid.Rows.Count - 1) continue; //Last row is the new row
string name = (string)row.Cells[templateName.Name].Value;
string entries = (string)row.Cells[NPCSpawnEntries.Name].Value;
string limits = (string)row.Cells[NPCSpawnLimits.Name].Value;
float multiplier = float.Parse((string)row.Cells[MaxDesiredNumEnemiesMultiplier.Name].Value);
SpawnerInfoData spawnerInfo = new SpawnerInfoData() { Name = name, NPCSpawnEntries = entries, NPCSpawnLimits = limits, MaxDesiredNumEnemiesMultiplier = multiplier };
mainForm.spawners.AddSpawnerInfo(spawnerInfo);
}
mainForm.spawners.SaveToFile(MainForm.spawnersSaveFile);
Close();
}
private void cancelBtn_Click(object sender, EventArgs e)
{
Close();
}
private void spawnersGrid_CellContentClick(object sender, DataGridViewCellEventArgs e)
{
}
}
}

View file

@ -0,0 +1,138 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<metadata name="templateName.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="NPCSpawnEntries.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="NPCSpawnLimits.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="MaxDesiredNumEnemiesMultiplier.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="spawnersBindingSource.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>294, 17</value>
</metadata>
<metadata name="sublevelSerializationObjectBindingSource.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value>
</metadata>
</root>

View file

@ -0,0 +1,109 @@
namespace ServerGridEditor.Forms
{
partial class LocksForm
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.lockIslandsChkbox = new System.Windows.Forms.CheckBox();
this.button1 = new System.Windows.Forms.Button();
this.lockDiscoChckbox = new System.Windows.Forms.CheckBox();
this.lockShipPathsChckbox = new System.Windows.Forms.CheckBox();
this.SuspendLayout();
//
// lockIslandsChkbox
//
this.lockIslandsChkbox.AutoSize = true;
this.lockIslandsChkbox.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.lockIslandsChkbox.ForeColor = System.Drawing.Color.Green;
this.lockIslandsChkbox.Location = new System.Drawing.Point(26, 33);
this.lockIslandsChkbox.Name = "lockIslandsChkbox";
this.lockIslandsChkbox.Size = new System.Drawing.Size(117, 24);
this.lockIslandsChkbox.TabIndex = 0;
this.lockIslandsChkbox.Text = "Lock Islands";
this.lockIslandsChkbox.UseVisualStyleBackColor = true;
//
// button1
//
this.button1.Location = new System.Drawing.Point(68, 140);
this.button1.Name = "button1";
this.button1.Size = new System.Drawing.Size(75, 23);
this.button1.TabIndex = 1;
this.button1.Text = "Apply";
this.button1.UseVisualStyleBackColor = true;
this.button1.Click += new System.EventHandler(this.button1_Click);
//
// lockDiscoChckbox
//
this.lockDiscoChckbox.AutoSize = true;
this.lockDiscoChckbox.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.lockDiscoChckbox.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(128)))), ((int)(((byte)(0)))));
this.lockDiscoChckbox.Location = new System.Drawing.Point(26, 63);
this.lockDiscoChckbox.Name = "lockDiscoChckbox";
this.lockDiscoChckbox.Size = new System.Drawing.Size(155, 24);
this.lockDiscoChckbox.TabIndex = 2;
this.lockDiscoChckbox.Text = "Lock Disco Zones";
this.lockDiscoChckbox.UseVisualStyleBackColor = true;
//
// lockShipPathsChckbox
//
this.lockShipPathsChckbox.AutoSize = true;
this.lockShipPathsChckbox.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.lockShipPathsChckbox.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(192)))));
this.lockShipPathsChckbox.Location = new System.Drawing.Point(26, 93);
this.lockShipPathsChckbox.Name = "lockShipPathsChckbox";
this.lockShipPathsChckbox.Size = new System.Drawing.Size(143, 24);
this.lockShipPathsChckbox.TabIndex = 3;
this.lockShipPathsChckbox.Text = "Lock Ship Paths";
this.lockShipPathsChckbox.UseVisualStyleBackColor = true;
//
// LocksForm
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(217, 189);
this.Controls.Add(this.lockShipPathsChckbox);
this.Controls.Add(this.lockDiscoChckbox);
this.Controls.Add(this.button1);
this.Controls.Add(this.lockIslandsChkbox);
this.Name = "LocksForm";
this.ShowIcon = false;
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
this.Text = "Locks";
this.Load += new System.EventHandler(this.LocksForm_Load);
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
private System.Windows.Forms.CheckBox lockIslandsChkbox;
private System.Windows.Forms.Button button1;
private System.Windows.Forms.CheckBox lockDiscoChckbox;
private System.Windows.Forms.CheckBox lockShipPathsChckbox;
}
}

View file

@ -0,0 +1,40 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace ServerGridEditor.Forms
{
public partial class LocksForm : Form
{
MainForm mainForm;
Server targetServer;
public LocksForm(MainForm mainForm, Server targetServer)
{
this.mainForm = mainForm;
this.targetServer = targetServer;
InitializeComponent();
}
private void LocksForm_Load(object sender, EventArgs e)
{
lockIslandsChkbox.Checked = targetServer.islandLocked;
lockDiscoChckbox.Checked = targetServer.discoLocked;
lockShipPathsChckbox.Checked = targetServer.pathsLocked;
}
private void button1_Click(object sender, EventArgs e)
{
targetServer.islandLocked = lockIslandsChkbox.Checked;
targetServer.discoLocked = lockDiscoChckbox.Checked;
targetServer.pathsLocked = lockShipPathsChckbox.Checked;
Close();
}
}
}

View file

@ -0,0 +1,120 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>

View file

@ -0,0 +1,900 @@
namespace ServerGridEditor
{
partial class MainForm
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(MainForm));
this.islandListBox = new System.Windows.Forms.ListView();
this.Display = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
this.IslandSize = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
this.LevelName = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
this.addIslandBtn = new System.Windows.Forms.Button();
this.removeIslandBtn = new System.Windows.Forms.Button();
this.mapPanel = new System.Windows.Forms.Panel();
this.createProjBtn = new System.Windows.Forms.Button();
this.loadProjBtn = new System.Windows.Forms.Button();
this.mapHScrollBar = new System.Windows.Forms.HScrollBar();
this.mapVScrollBar = new System.Windows.Forms.VScrollBar();
this.menuStrip1 = new System.Windows.Forms.MenuStrip();
this.projectToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.createToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.openToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.editToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.saveToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.editToolStripMenuItem1 = new System.Windows.Forms.ToolStripMenuItem();
this.editSpawnerTemplatesToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.editAllDiscoveryZonesToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.editSpawnPointsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.editServerTemplatesToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.editLocksToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.exportToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.mapImageToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.localExportToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.cellImagesToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.slippyMapToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.testsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.testAllServersWithDataClearToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.testAllServersWithoutDataClearToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.helpToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.controlsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.scaleLbl = new System.Windows.Forms.Label();
this.saveFileDialog = new System.Windows.Forms.SaveFileDialog();
this.openFileDialog = new System.Windows.Forms.OpenFileDialog();
this.showServerInfoCheckbox = new System.Windows.Forms.CheckBox();
this.showDiscoZoneInfoCheckbox = new System.Windows.Forms.CheckBox();
this.setRatioBtn = new System.Windows.Forms.Button();
this.customRatioTxtBox = new System.Windows.Forms.TextBox();
this.showLinesCheckbox = new System.Windows.Forms.CheckBox();
this.editIslandBtn = new System.Windows.Forms.Button();
this.alphaBgCheckbox = new System.Windows.Forms.CheckBox();
this.tiledBackgroundCheckbox = new System.Windows.Forms.CheckBox();
this.chooseTileBtn = new System.Windows.Forms.Button();
this.label1 = new System.Windows.Forms.Label();
this.tileScaleBox = new System.Windows.Forms.NumericUpDown();
this.label2 = new System.Windows.Forms.Label();
this.cellImageSizetxtbox = new System.Windows.Forms.TextBox();
this.label3 = new System.Windows.Forms.Label();
this.atlasImageSizeTxtBox = new System.Windows.Forms.TextBox();
this.chooseDiscoZoneBtn = new System.Windows.Forms.Button();
this.showShipPathsInfoChckBox = new System.Windows.Forms.CheckBox();
this.disableImageExportingCheckBox = new System.Windows.Forms.CheckBox();
this.imageQualityTxtbox = new System.Windows.Forms.TextBox();
this.label4 = new System.Windows.Forms.Label();
this.showIslandNamesChckBox = new System.Windows.Forms.CheckBox();
this.exportPngsChckBox = new System.Windows.Forms.CheckBox();
this.showForegroundChckBox = new System.Windows.Forms.CheckBox();
this.chooseForegroundBtn = new System.Windows.Forms.Button();
this.foregroundScaleBox = new System.Windows.Forms.NumericUpDown();
this.label5 = new System.Windows.Forms.Label();
this.atlasLocation = new System.Windows.Forms.Label();
this.menuStrip1.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.tileScaleBox)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.foregroundScaleBox)).BeginInit();
this.SuspendLayout();
//
// islandListBox
//
this.islandListBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Right)));
this.islandListBox.AutoArrange = false;
this.islandListBox.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] {
this.Display,
this.IslandSize,
this.LevelName});
this.islandListBox.FullRowSelect = true;
this.islandListBox.Location = new System.Drawing.Point(781, 29);
this.islandListBox.Name = "islandListBox";
this.islandListBox.OwnerDraw = true;
this.islandListBox.Size = new System.Drawing.Size(292, 628);
this.islandListBox.TabIndex = 0;
this.islandListBox.UseCompatibleStateImageBehavior = false;
this.islandListBox.View = System.Windows.Forms.View.Details;
this.islandListBox.DrawColumnHeader += new System.Windows.Forms.DrawListViewColumnHeaderEventHandler(this.islandListBox_DrawColumnHeader);
this.islandListBox.DrawItem += new System.Windows.Forms.DrawListViewItemEventHandler(this.islandListBox_DrawItem);
this.islandListBox.DrawSubItem += new System.Windows.Forms.DrawListViewSubItemEventHandler(this.islandListBox_DrawSubItem);
this.islandListBox.ItemDrag += new System.Windows.Forms.ItemDragEventHandler(this.islandListBox_ItemDrag);
//
// Display
//
this.Display.Text = "Display";
//
// IslandSize
//
this.IslandSize.Text = "Size";
//
// LevelName
//
this.LevelName.Text = "LevelName";
//
// addIslandBtn
//
this.addIslandBtn.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.addIslandBtn.Location = new System.Drawing.Point(781, 664);
this.addIslandBtn.Name = "addIslandBtn";
this.addIslandBtn.Size = new System.Drawing.Size(89, 34);
this.addIslandBtn.TabIndex = 1;
this.addIslandBtn.Text = "Add Island";
this.addIslandBtn.UseVisualStyleBackColor = true;
this.addIslandBtn.Click += new System.EventHandler(this.addIslandBtn_Click);
//
// removeIslandBtn
//
this.removeIslandBtn.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.removeIslandBtn.Location = new System.Drawing.Point(981, 663);
this.removeIslandBtn.Name = "removeIslandBtn";
this.removeIslandBtn.Size = new System.Drawing.Size(92, 34);
this.removeIslandBtn.TabIndex = 2;
this.removeIslandBtn.Text = "Remove Selected";
this.removeIslandBtn.UseVisualStyleBackColor = true;
this.removeIslandBtn.Click += new System.EventHandler(this.removeIslandBtn_Click);
//
// mapPanel
//
this.mapPanel.AllowDrop = true;
this.mapPanel.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.mapPanel.BackColor = System.Drawing.SystemColors.ActiveCaption;
this.mapPanel.Location = new System.Drawing.Point(25, 29);
this.mapPanel.Name = "mapPanel";
this.mapPanel.Size = new System.Drawing.Size(733, 564);
this.mapPanel.TabIndex = 3;
this.mapPanel.DragDrop += new System.Windows.Forms.DragEventHandler(this.mapPanel_DragDrop);
this.mapPanel.DragOver += new System.Windows.Forms.DragEventHandler(this.mapPanel_DragOver);
this.mapPanel.Paint += new System.Windows.Forms.PaintEventHandler(this.mapPanel_Paint);
this.mapPanel.MouseDown += new System.Windows.Forms.MouseEventHandler(this.mapPanel_MouseDown);
this.mapPanel.MouseMove += new System.Windows.Forms.MouseEventHandler(this.mapPanel_MouseMove);
this.mapPanel.MouseUp += new System.Windows.Forms.MouseEventHandler(this.mapPanel_MouseUp);
//
// createProjBtn
//
this.createProjBtn.Anchor = System.Windows.Forms.AnchorStyles.None;
this.createProjBtn.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.createProjBtn.Location = new System.Drawing.Point(442, 245);
this.createProjBtn.Name = "createProjBtn";
this.createProjBtn.Size = new System.Drawing.Size(239, 84);
this.createProjBtn.TabIndex = 19;
this.createProjBtn.Text = "CreateProject";
this.createProjBtn.UseVisualStyleBackColor = true;
this.createProjBtn.Click += new System.EventHandler(this.createProjBtn_Click);
//
// loadProjBtn
//
this.loadProjBtn.Anchor = System.Windows.Forms.AnchorStyles.None;
this.loadProjBtn.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.loadProjBtn.Location = new System.Drawing.Point(442, 364);
this.loadProjBtn.Name = "loadProjBtn";
this.loadProjBtn.Size = new System.Drawing.Size(239, 84);
this.loadProjBtn.TabIndex = 20;
this.loadProjBtn.Text = "Load Project";
this.loadProjBtn.UseVisualStyleBackColor = true;
this.loadProjBtn.Click += new System.EventHandler(this.loadProjBtn_Click);
//
// mapHScrollBar
//
this.mapHScrollBar.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.mapHScrollBar.Enabled = false;
this.mapHScrollBar.Location = new System.Drawing.Point(28, 596);
this.mapHScrollBar.Name = "mapHScrollBar";
this.mapHScrollBar.Size = new System.Drawing.Size(733, 17);
this.mapHScrollBar.TabIndex = 4;
this.mapHScrollBar.Scroll += new System.Windows.Forms.ScrollEventHandler(this.mapHScrollBar_Scroll);
//
// mapVScrollBar
//
this.mapVScrollBar.AllowDrop = true;
this.mapVScrollBar.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Right)));
this.mapVScrollBar.Enabled = false;
this.mapVScrollBar.Location = new System.Drawing.Point(761, 29);
this.mapVScrollBar.Name = "mapVScrollBar";
this.mapVScrollBar.Size = new System.Drawing.Size(17, 584);
this.mapVScrollBar.TabIndex = 5;
this.mapVScrollBar.Scroll += new System.Windows.Forms.ScrollEventHandler(this.mapVScrollBar_Scroll);
//
// menuStrip1
//
this.menuStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.projectToolStripMenuItem,
this.editToolStripMenuItem1,
this.exportToolStripMenuItem,
this.testsToolStripMenuItem,
this.helpToolStripMenuItem});
this.menuStrip1.Location = new System.Drawing.Point(0, 0);
this.menuStrip1.Name = "menuStrip1";
this.menuStrip1.Size = new System.Drawing.Size(1088, 24);
this.menuStrip1.TabIndex = 6;
this.menuStrip1.Text = "menuStrip1";
//
// projectToolStripMenuItem
//
this.projectToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.createToolStripMenuItem,
this.openToolStripMenuItem,
this.editToolStripMenuItem,
this.saveToolStripMenuItem});
this.projectToolStripMenuItem.Name = "projectToolStripMenuItem";
this.projectToolStripMenuItem.Size = new System.Drawing.Size(56, 20);
this.projectToolStripMenuItem.Text = "Project";
//
// createToolStripMenuItem
//
this.createToolStripMenuItem.Name = "createToolStripMenuItem";
this.createToolStripMenuItem.Size = new System.Drawing.Size(108, 22);
this.createToolStripMenuItem.Text = "Create";
this.createToolStripMenuItem.Click += new System.EventHandler(this.createToolStripMenuItem_Click);
//
// openToolStripMenuItem
//
this.openToolStripMenuItem.Name = "openToolStripMenuItem";
this.openToolStripMenuItem.Size = new System.Drawing.Size(108, 22);
this.openToolStripMenuItem.Text = "Open";
this.openToolStripMenuItem.Click += new System.EventHandler(this.openToolStripMenuItem_Click);
//
// editToolStripMenuItem
//
this.editToolStripMenuItem.Enabled = false;
this.editToolStripMenuItem.Name = "editToolStripMenuItem";
this.editToolStripMenuItem.Size = new System.Drawing.Size(108, 22);
this.editToolStripMenuItem.Text = "Edit";
this.editToolStripMenuItem.Click += new System.EventHandler(this.editToolStripMenuItem_Click);
//
// saveToolStripMenuItem
//
this.saveToolStripMenuItem.Enabled = false;
this.saveToolStripMenuItem.Name = "saveToolStripMenuItem";
this.saveToolStripMenuItem.Size = new System.Drawing.Size(108, 22);
this.saveToolStripMenuItem.Text = "Save";
this.saveToolStripMenuItem.Click += new System.EventHandler(this.saveToolStripMenuItem_Click);
//
// editToolStripMenuItem1
//
this.editToolStripMenuItem1.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.editSpawnerTemplatesToolStripMenuItem,
this.editAllDiscoveryZonesToolStripMenuItem,
this.editSpawnPointsToolStripMenuItem,
this.editServerTemplatesToolStripMenuItem,
this.editLocksToolStripMenuItem});
this.editToolStripMenuItem1.Name = "editToolStripMenuItem1";
this.editToolStripMenuItem1.Size = new System.Drawing.Size(39, 20);
this.editToolStripMenuItem1.Text = "Edit";
//
// editSpawnerTemplatesToolStripMenuItem
//
this.editSpawnerTemplatesToolStripMenuItem.Name = "editSpawnerTemplatesToolStripMenuItem";
this.editSpawnerTemplatesToolStripMenuItem.Size = new System.Drawing.Size(199, 22);
this.editSpawnerTemplatesToolStripMenuItem.Text = "Edit Spawner Templates";
this.editSpawnerTemplatesToolStripMenuItem.Click += new System.EventHandler(this.editSpawnerTemplatesToolStripMenuItem_Click);
//
// editAllDiscoveryZonesToolStripMenuItem
//
this.editAllDiscoveryZonesToolStripMenuItem.Name = "editAllDiscoveryZonesToolStripMenuItem";
this.editAllDiscoveryZonesToolStripMenuItem.Size = new System.Drawing.Size(199, 22);
this.editAllDiscoveryZonesToolStripMenuItem.Text = "Edit Discovery Zones";
this.editAllDiscoveryZonesToolStripMenuItem.Click += new System.EventHandler(this.editAllDiscoveryZonesToolStripMenuItem_Click);
//
// editSpawnPointsToolStripMenuItem
//
this.editSpawnPointsToolStripMenuItem.Name = "editSpawnPointsToolStripMenuItem";
this.editSpawnPointsToolStripMenuItem.Size = new System.Drawing.Size(199, 22);
this.editSpawnPointsToolStripMenuItem.Text = "Edit Spawn Regions";
this.editSpawnPointsToolStripMenuItem.Click += new System.EventHandler(this.editSpawnPointsToolStripMenuItem_Click);
//
// editServerTemplatesToolStripMenuItem
//
this.editServerTemplatesToolStripMenuItem.Enabled = false;
this.editServerTemplatesToolStripMenuItem.Name = "editServerTemplatesToolStripMenuItem";
this.editServerTemplatesToolStripMenuItem.Size = new System.Drawing.Size(199, 22);
this.editServerTemplatesToolStripMenuItem.Text = "Edit Server Templates";
this.editServerTemplatesToolStripMenuItem.Click += new System.EventHandler(this.editServerTemplatesToolStripMenuItem_Click);
//
// editLocksToolStripMenuItem
//
this.editLocksToolStripMenuItem.Name = "editLocksToolStripMenuItem";
this.editLocksToolStripMenuItem.Size = new System.Drawing.Size(199, 22);
this.editLocksToolStripMenuItem.Text = "Edit Locks";
this.editLocksToolStripMenuItem.Click += new System.EventHandler(this.editLocksToolStripMenuItem_Click);
//
// exportToolStripMenuItem
//
this.exportToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.mapImageToolStripMenuItem,
this.localExportToolStripMenuItem,
this.cellImagesToolStripMenuItem,
this.slippyMapToolStripMenuItem});
this.exportToolStripMenuItem.Name = "exportToolStripMenuItem";
this.exportToolStripMenuItem.Size = new System.Drawing.Size(52, 20);
this.exportToolStripMenuItem.Text = "Export";
//
// mapImageToolStripMenuItem
//
this.mapImageToolStripMenuItem.Enabled = false;
this.mapImageToolStripMenuItem.Name = "mapImageToolStripMenuItem";
this.mapImageToolStripMenuItem.Size = new System.Drawing.Size(138, 22);
this.mapImageToolStripMenuItem.Text = "Map Image";
this.mapImageToolStripMenuItem.Click += new System.EventHandler(this.mapImageToolStripMenuItem_Click);
//
// localExportToolStripMenuItem
//
this.localExportToolStripMenuItem.Enabled = false;
this.localExportToolStripMenuItem.Name = "localExportToolStripMenuItem";
this.localExportToolStripMenuItem.Size = new System.Drawing.Size(138, 22);
this.localExportToolStripMenuItem.Text = "Local Export";
this.localExportToolStripMenuItem.Click += new System.EventHandler(this.localExportToolStripMenuItem_Click);
//
// cellImagesToolStripMenuItem
//
this.cellImagesToolStripMenuItem.Enabled = false;
this.cellImagesToolStripMenuItem.Name = "cellImagesToolStripMenuItem";
this.cellImagesToolStripMenuItem.Size = new System.Drawing.Size(138, 22);
this.cellImagesToolStripMenuItem.Text = "Cell Images";
this.cellImagesToolStripMenuItem.Click += new System.EventHandler(this.cellImagesToolStripMenuItem_Click);
//
// slippyMapToolStripMenuItem
//
this.slippyMapToolStripMenuItem.Enabled = false;
this.slippyMapToolStripMenuItem.Name = "slippyMapToolStripMenuItem";
this.slippyMapToolStripMenuItem.Size = new System.Drawing.Size(138, 22);
this.slippyMapToolStripMenuItem.Text = "Slippy Map";
this.slippyMapToolStripMenuItem.Click += new System.EventHandler(this.slippyMapToolStripMenuItem_Click);
//
// testsToolStripMenuItem
//
this.testsToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.testAllServersWithDataClearToolStripMenuItem,
this.testAllServersWithoutDataClearToolStripMenuItem});
this.testsToolStripMenuItem.Name = "testsToolStripMenuItem";
this.testsToolStripMenuItem.Size = new System.Drawing.Size(45, 20);
this.testsToolStripMenuItem.Text = "Tests";
//
// testAllServersWithDataClearToolStripMenuItem
//
this.testAllServersWithDataClearToolStripMenuItem.Enabled = false;
this.testAllServersWithDataClearToolStripMenuItem.Name = "testAllServersWithDataClearToolStripMenuItem";
this.testAllServersWithDataClearToolStripMenuItem.Size = new System.Drawing.Size(261, 22);
this.testAllServersWithDataClearToolStripMenuItem.Text = "Test All Servers (With Data Clear)";
//
// testAllServersWithoutDataClearToolStripMenuItem
//
this.testAllServersWithoutDataClearToolStripMenuItem.Name = "testAllServersWithoutDataClearToolStripMenuItem";
this.testAllServersWithoutDataClearToolStripMenuItem.Size = new System.Drawing.Size(261, 22);
this.testAllServersWithoutDataClearToolStripMenuItem.Text = "Test All Servers (Without Data clear)";
this.testAllServersWithoutDataClearToolStripMenuItem.Click += new System.EventHandler(this.testAllServersWithoutDataClearToolStripMenuItem_Click);
//
// helpToolStripMenuItem
//
this.helpToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.controlsToolStripMenuItem});
this.helpToolStripMenuItem.Name = "helpToolStripMenuItem";
this.helpToolStripMenuItem.Size = new System.Drawing.Size(44, 20);
this.helpToolStripMenuItem.Text = "Help";
//
// controlsToolStripMenuItem
//
this.controlsToolStripMenuItem.Name = "controlsToolStripMenuItem";
this.controlsToolStripMenuItem.Size = new System.Drawing.Size(119, 22);
this.controlsToolStripMenuItem.Text = "Controls";
this.controlsToolStripMenuItem.Click += new System.EventHandler(this.controlsToolStripMenuItem_Click);
//
// scaleLbl
//
this.scaleLbl.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.scaleLbl.AutoSize = true;
this.scaleLbl.Location = new System.Drawing.Point(25, 665);
this.scaleLbl.Name = "scaleLbl";
this.scaleLbl.Size = new System.Drawing.Size(130, 13);
this.scaleLbl.TabIndex = 7;
this.scaleLbl.Text = "1 pixel = 1000 unreal units";
//
// showServerInfoCheckbox
//
this.showServerInfoCheckbox.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.showServerInfoCheckbox.AutoSize = true;
this.showServerInfoCheckbox.Checked = true;
this.showServerInfoCheckbox.CheckState = System.Windows.Forms.CheckState.Checked;
this.showServerInfoCheckbox.Location = new System.Drawing.Point(198, 661);
this.showServerInfoCheckbox.Name = "showServerInfoCheckbox";
this.showServerInfoCheckbox.Size = new System.Drawing.Size(108, 17);
this.showServerInfoCheckbox.TabIndex = 8;
this.showServerInfoCheckbox.Text = "Show Server Info";
this.showServerInfoCheckbox.UseVisualStyleBackColor = true;
this.showServerInfoCheckbox.CheckedChanged += new System.EventHandler(this.showServerInfoCheckbox_CheckedChanged);
//
// showDiscoZoneInfoCheckbox
//
this.showDiscoZoneInfoCheckbox.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.showDiscoZoneInfoCheckbox.AutoSize = true;
this.showDiscoZoneInfoCheckbox.Checked = true;
this.showDiscoZoneInfoCheckbox.CheckState = System.Windows.Forms.CheckState.Checked;
this.showDiscoZoneInfoCheckbox.Location = new System.Drawing.Point(161, 638);
this.showDiscoZoneInfoCheckbox.Name = "showDiscoZoneInfoCheckbox";
this.showDiscoZoneInfoCheckbox.Size = new System.Drawing.Size(152, 17);
this.showDiscoZoneInfoCheckbox.TabIndex = 8;
this.showDiscoZoneInfoCheckbox.Text = "Show Discovery Zone Info";
this.showDiscoZoneInfoCheckbox.UseVisualStyleBackColor = true;
this.showDiscoZoneInfoCheckbox.CheckedChanged += new System.EventHandler(this.showServerInfoCheckbox_CheckedChanged);
//
// setRatioBtn
//
this.setRatioBtn.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.setRatioBtn.Location = new System.Drawing.Point(114, 682);
this.setRatioBtn.Name = "setRatioBtn";
this.setRatioBtn.Size = new System.Drawing.Size(75, 23);
this.setRatioBtn.TabIndex = 9;
this.setRatioBtn.Text = "Set Ratio";
this.setRatioBtn.UseVisualStyleBackColor = true;
this.setRatioBtn.Click += new System.EventHandler(this.setRatioBtn_Click);
//
// customRatioTxtBox
//
this.customRatioTxtBox.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.customRatioTxtBox.Location = new System.Drawing.Point(25, 684);
this.customRatioTxtBox.Name = "customRatioTxtBox";
this.customRatioTxtBox.Size = new System.Drawing.Size(83, 20);
this.customRatioTxtBox.TabIndex = 10;
this.customRatioTxtBox.Text = "100";
this.customRatioTxtBox.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.customRatioTxtBox_KeyPress);
//
// showLinesCheckbox
//
this.showLinesCheckbox.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.showLinesCheckbox.AutoSize = true;
this.showLinesCheckbox.Checked = true;
this.showLinesCheckbox.CheckState = System.Windows.Forms.CheckState.Checked;
this.showLinesCheckbox.Location = new System.Drawing.Point(312, 661);
this.showLinesCheckbox.Name = "showLinesCheckbox";
this.showLinesCheckbox.Size = new System.Drawing.Size(77, 17);
this.showLinesCheckbox.TabIndex = 11;
this.showLinesCheckbox.Text = "Show lines";
this.showLinesCheckbox.UseVisualStyleBackColor = true;
this.showLinesCheckbox.CheckedChanged += new System.EventHandler(this.showLinesCheckbox_CheckedChanged);
//
// editIslandBtn
//
this.editIslandBtn.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.editIslandBtn.Location = new System.Drawing.Point(876, 663);
this.editIslandBtn.Name = "editIslandBtn";
this.editIslandBtn.Size = new System.Drawing.Size(99, 34);
this.editIslandBtn.TabIndex = 12;
this.editIslandBtn.Text = "Edit Island";
this.editIslandBtn.UseVisualStyleBackColor = true;
this.editIslandBtn.Click += new System.EventHandler(this.editIslandBtn_Click);
//
// alphaBgCheckbox
//
this.alphaBgCheckbox.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.alphaBgCheckbox.AutoSize = true;
this.alphaBgCheckbox.Location = new System.Drawing.Point(395, 661);
this.alphaBgCheckbox.Name = "alphaBgCheckbox";
this.alphaBgCheckbox.Size = new System.Drawing.Size(147, 17);
this.alphaBgCheckbox.TabIndex = 13;
this.alphaBgCheckbox.Text = "Export Alpha Background";
this.alphaBgCheckbox.UseVisualStyleBackColor = true;
this.alphaBgCheckbox.CheckedChanged += new System.EventHandler(this.alphaBgCheckbox_CheckedChanged);
//
// tiledBackgroundCheckbox
//
this.tiledBackgroundCheckbox.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.tiledBackgroundCheckbox.AutoSize = true;
this.tiledBackgroundCheckbox.Location = new System.Drawing.Point(548, 661);
this.tiledBackgroundCheckbox.Name = "tiledBackgroundCheckbox";
this.tiledBackgroundCheckbox.Size = new System.Drawing.Size(136, 17);
this.tiledBackgroundCheckbox.TabIndex = 14;
this.tiledBackgroundCheckbox.Text = "Water Tile Background";
this.tiledBackgroundCheckbox.UseVisualStyleBackColor = true;
this.tiledBackgroundCheckbox.CheckedChanged += new System.EventHandler(this.tiledBackgroundCheckbox_CheckedChanged);
//
// chooseTileBtn
//
this.chooseTileBtn.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.chooseTileBtn.Location = new System.Drawing.Point(612, 681);
this.chooseTileBtn.Name = "chooseTileBtn";
this.chooseTileBtn.Size = new System.Drawing.Size(86, 23);
this.chooseTileBtn.TabIndex = 15;
this.chooseTileBtn.Text = "Pick water tile";
this.chooseTileBtn.UseVisualStyleBackColor = true;
this.chooseTileBtn.Click += new System.EventHandler(this.chooseTileBtn_Click);
//
// label1
//
this.label1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.label1.AutoSize = true;
this.label1.Location = new System.Drawing.Point(704, 665);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(54, 13);
this.label1.TabIndex = 17;
this.label1.Text = "Tile Scale";
//
// tileScaleBox
//
this.tileScaleBox.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.tileScaleBox.DecimalPlaces = 3;
this.tileScaleBox.Increment = new decimal(new int[] {
1,
0,
0,
65536});
this.tileScaleBox.Location = new System.Drawing.Point(704, 682);
this.tileScaleBox.Maximum = new decimal(new int[] {
99999,
0,
0,
0});
this.tileScaleBox.Minimum = new decimal(new int[] {
1,
0,
0,
196608});
this.tileScaleBox.Name = "tileScaleBox";
this.tileScaleBox.Size = new System.Drawing.Size(54, 20);
this.tileScaleBox.TabIndex = 18;
this.tileScaleBox.Value = new decimal(new int[] {
1,
0,
0,
0});
this.tileScaleBox.ValueChanged += new System.EventHandler(this.tileScaleBox_ValueChanged);
//
// label2
//
this.label2.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.label2.AutoSize = true;
this.label2.Location = new System.Drawing.Point(195, 687);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(79, 13);
this.label2.TabIndex = 21;
this.label2.Text = "Cell Image Size";
//
// cellImageSizetxtbox
//
this.cellImageSizetxtbox.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.cellImageSizetxtbox.Location = new System.Drawing.Point(280, 684);
this.cellImageSizetxtbox.Name = "cellImageSizetxtbox";
this.cellImageSizetxtbox.Size = new System.Drawing.Size(47, 20);
this.cellImageSizetxtbox.TabIndex = 22;
this.cellImageSizetxtbox.TabStop = false;
this.cellImageSizetxtbox.Text = "2048";
this.cellImageSizetxtbox.TextChanged += new System.EventHandler(this.cellImageSizeTxtBox_TextChanged);
this.cellImageSizetxtbox.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.cellImageSizeTxtBox_KeyPress);
//
// label3
//
this.label3.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.label3.AutoSize = true;
this.label3.Location = new System.Drawing.Point(355, 687);
this.label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(85, 13);
this.label3.TabIndex = 23;
this.label3.Text = "Atlas Image Size";
//
// atlasImageSizeTxtBox
//
this.atlasImageSizeTxtBox.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.atlasImageSizeTxtBox.Location = new System.Drawing.Point(446, 684);
this.atlasImageSizeTxtBox.Name = "atlasImageSizeTxtBox";
this.atlasImageSizeTxtBox.Size = new System.Drawing.Size(47, 20);
this.atlasImageSizeTxtBox.TabIndex = 24;
this.atlasImageSizeTxtBox.TabStop = false;
this.atlasImageSizeTxtBox.Text = "2048";
this.atlasImageSizeTxtBox.TextChanged += new System.EventHandler(this.atlasImageSizeTxtBox_TextChanged);
this.atlasImageSizeTxtBox.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.atlasImageSizeTxtBox_KeyPress);
//
// chooseDiscoZoneBtn
//
this.chooseDiscoZoneBtn.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.chooseDiscoZoneBtn.Location = new System.Drawing.Point(499, 682);
this.chooseDiscoZoneBtn.Name = "chooseDiscoZoneBtn";
this.chooseDiscoZoneBtn.Size = new System.Drawing.Size(111, 23);
this.chooseDiscoZoneBtn.TabIndex = 25;
this.chooseDiscoZoneBtn.Text = "Pick discozone tile";
this.chooseDiscoZoneBtn.UseVisualStyleBackColor = true;
this.chooseDiscoZoneBtn.Click += new System.EventHandler(this.chooseDiscoZoneBtn_Click);
//
// showShipPathsInfoChckBox
//
this.showShipPathsInfoChckBox.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.showShipPathsInfoChckBox.AutoSize = true;
this.showShipPathsInfoChckBox.Checked = true;
this.showShipPathsInfoChckBox.CheckState = System.Windows.Forms.CheckState.Checked;
this.showShipPathsInfoChckBox.Location = new System.Drawing.Point(319, 638);
this.showShipPathsInfoChckBox.Name = "showShipPathsInfoChckBox";
this.showShipPathsInfoChckBox.Size = new System.Drawing.Size(107, 17);
this.showShipPathsInfoChckBox.TabIndex = 26;
this.showShipPathsInfoChckBox.Text = "Show Ship Paths";
this.showShipPathsInfoChckBox.UseVisualStyleBackColor = true;
this.showShipPathsInfoChckBox.CheckedChanged += new System.EventHandler(this.showShipPathsInfoChckBox_CheckedChanged);
//
// disableImageExportingCheckBox
//
this.disableImageExportingCheckBox.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.disableImageExportingCheckBox.AutoSize = true;
this.disableImageExportingCheckBox.Checked = true;
this.disableImageExportingCheckBox.CheckState = System.Windows.Forms.CheckState.Checked;
this.disableImageExportingCheckBox.Location = new System.Drawing.Point(432, 638);
this.disableImageExportingCheckBox.Name = "disableImageExportingCheckBox";
this.disableImageExportingCheckBox.Size = new System.Drawing.Size(140, 17);
this.disableImageExportingCheckBox.TabIndex = 27;
this.disableImageExportingCheckBox.Text = "Disable Image Exporting";
this.disableImageExportingCheckBox.UseVisualStyleBackColor = true;
this.disableImageExportingCheckBox.CheckedChanged += new System.EventHandler(this.disableImageExportingCheckBox_CheckedChanged);
//
// imageQualityTxtbox
//
this.imageQualityTxtbox.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.imageQualityTxtbox.Location = new System.Drawing.Point(666, 637);
this.imageQualityTxtbox.Name = "imageQualityTxtbox";
this.imageQualityTxtbox.Size = new System.Drawing.Size(47, 20);
this.imageQualityTxtbox.TabIndex = 29;
this.imageQualityTxtbox.TabStop = false;
this.imageQualityTxtbox.Text = "75";
this.imageQualityTxtbox.TextChanged += new System.EventHandler(this.imageQualityTxtbox_TextChanged);
this.imageQualityTxtbox.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.imageQualityTxtbox_KeyPress);
//
// label4
//
this.label4.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.label4.AutoSize = true;
this.label4.Location = new System.Drawing.Point(578, 639);
this.label4.Name = "label4";
this.label4.Size = new System.Drawing.Size(82, 13);
this.label4.TabIndex = 28;
this.label4.Text = "Image Quality %";
//
// showIslandNamesChckBox
//
this.showIslandNamesChckBox.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.showIslandNamesChckBox.AutoSize = true;
this.showIslandNamesChckBox.Checked = true;
this.showIslandNamesChckBox.CheckState = System.Windows.Forms.CheckState.Checked;
this.showIslandNamesChckBox.Location = new System.Drawing.Point(35, 638);
this.showIslandNamesChckBox.Name = "showIslandNamesChckBox";
this.showIslandNamesChckBox.Size = new System.Drawing.Size(120, 17);
this.showIslandNamesChckBox.TabIndex = 30;
this.showIslandNamesChckBox.Text = "Show Island Names";
this.showIslandNamesChckBox.UseVisualStyleBackColor = true;
this.showIslandNamesChckBox.CheckedChanged += new System.EventHandler(this.showIslandNamesChckBox_CheckedChanged);
//
// exportPngsChckBox
//
this.exportPngsChckBox.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.exportPngsChckBox.AutoSize = true;
this.exportPngsChckBox.Checked = true;
this.exportPngsChckBox.CheckState = System.Windows.Forms.CheckState.Checked;
this.exportPngsChckBox.Location = new System.Drawing.Point(404, 618);
this.exportPngsChckBox.Name = "exportPngsChckBox";
this.exportPngsChckBox.Size = new System.Drawing.Size(89, 17);
this.exportPngsChckBox.TabIndex = 31;
this.exportPngsChckBox.Text = "Export PNGS";
this.exportPngsChckBox.UseVisualStyleBackColor = true;
this.exportPngsChckBox.CheckedChanged += new System.EventHandler(this.exportPngsChckBox_CheckedChanged);
//
// showForegroundChckBox
//
this.showForegroundChckBox.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.showForegroundChckBox.AutoSize = true;
this.showForegroundChckBox.Location = new System.Drawing.Point(35, 616);
this.showForegroundChckBox.Name = "showForegroundChckBox";
this.showForegroundChckBox.Size = new System.Drawing.Size(107, 17);
this.showForegroundChckBox.TabIndex = 32;
this.showForegroundChckBox.Text = "Show foreground";
this.showForegroundChckBox.UseVisualStyleBackColor = true;
this.showForegroundChckBox.CheckedChanged += new System.EventHandler(this.showForegroundChckBox_CheckedChanged);
//
// chooseForegroundBtn
//
this.chooseForegroundBtn.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.chooseForegroundBtn.Location = new System.Drawing.Point(141, 613);
this.chooseForegroundBtn.Name = "chooseForegroundBtn";
this.chooseForegroundBtn.Size = new System.Drawing.Size(95, 23);
this.chooseForegroundBtn.TabIndex = 33;
this.chooseForegroundBtn.Text = "Pick Foreground";
this.chooseForegroundBtn.UseVisualStyleBackColor = true;
this.chooseForegroundBtn.Click += new System.EventHandler(this.chooseForegroundBtn_Click);
//
// foregroundScaleBox
//
this.foregroundScaleBox.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.foregroundScaleBox.DecimalPlaces = 3;
this.foregroundScaleBox.Increment = new decimal(new int[] {
1,
0,
0,
65536});
this.foregroundScaleBox.Location = new System.Drawing.Point(335, 615);
this.foregroundScaleBox.Maximum = new decimal(new int[] {
99999,
0,
0,
0});
this.foregroundScaleBox.Minimum = new decimal(new int[] {
1,
0,
0,
196608});
this.foregroundScaleBox.Name = "foregroundScaleBox";
this.foregroundScaleBox.Size = new System.Drawing.Size(54, 20);
this.foregroundScaleBox.TabIndex = 34;
this.foregroundScaleBox.Value = new decimal(new int[] {
1,
0,
0,
0});
this.foregroundScaleBox.ValueChanged += new System.EventHandler(this.foregroundScaleBox_ValueChanged);
//
// label5
//
this.label5.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.label5.AutoSize = true;
this.label5.Location = new System.Drawing.Point(241, 618);
this.label5.Name = "label5";
this.label5.Size = new System.Drawing.Size(91, 13);
this.label5.TabIndex = 35;
this.label5.Text = "Foreground Scale";
//
// atlasLocation
//
this.atlasLocation.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.atlasLocation.AutoSize = true;
this.atlasLocation.Location = new System.Drawing.Point(684, 11);
this.atlasLocation.Name = "atlasLocation";
this.atlasLocation.Size = new System.Drawing.Size(74, 13);
this.atlasLocation.TabIndex = 36;
this.atlasLocation.Text = "Atlas Location";
//
// MainForm
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(1088, 708);
this.Controls.Add(this.atlasLocation);
this.Controls.Add(this.label5);
this.Controls.Add(this.foregroundScaleBox);
this.Controls.Add(this.chooseForegroundBtn);
this.Controls.Add(this.showForegroundChckBox);
this.Controls.Add(this.exportPngsChckBox);
this.Controls.Add(this.showIslandNamesChckBox);
this.Controls.Add(this.imageQualityTxtbox);
this.Controls.Add(this.label4);
this.Controls.Add(this.disableImageExportingCheckBox);
this.Controls.Add(this.showShipPathsInfoChckBox);
this.Controls.Add(this.chooseDiscoZoneBtn);
this.Controls.Add(this.atlasImageSizeTxtBox);
this.Controls.Add(this.label3);
this.Controls.Add(this.cellImageSizetxtbox);
this.Controls.Add(this.label2);
this.Controls.Add(this.tileScaleBox);
this.Controls.Add(this.label1);
this.Controls.Add(this.chooseTileBtn);
this.Controls.Add(this.tiledBackgroundCheckbox);
this.Controls.Add(this.alphaBgCheckbox);
this.Controls.Add(this.editIslandBtn);
this.Controls.Add(this.showLinesCheckbox);
this.Controls.Add(this.customRatioTxtBox);
this.Controls.Add(this.setRatioBtn);
this.Controls.Add(this.showServerInfoCheckbox);
this.Controls.Add(this.showDiscoZoneInfoCheckbox);
this.Controls.Add(this.scaleLbl);
this.Controls.Add(this.mapVScrollBar);
this.Controls.Add(this.mapHScrollBar);
this.Controls.Add(this.mapPanel);
this.Controls.Add(this.removeIslandBtn);
this.Controls.Add(this.addIslandBtn);
this.Controls.Add(this.islandListBox);
this.Controls.Add(this.menuStrip1);
this.Controls.Add(this.createProjBtn);
this.Controls.Add(this.loadProjBtn);
this.Cursor = System.Windows.Forms.Cursors.Arrow;
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
this.KeyPreview = true;
this.MinimumSize = new System.Drawing.Size(1104, 684);
this.Name = "MainForm";
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
this.Text = "Island Editor";
this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.MainForm_FormClosing);
this.KeyDown += new System.Windows.Forms.KeyEventHandler(this.MainForm_KeyDown);
this.KeyUp += new System.Windows.Forms.KeyEventHandler(this.MainForm_KeyUp);
this.menuStrip1.ResumeLayout(false);
this.menuStrip1.PerformLayout();
((System.ComponentModel.ISupportInitialize)(this.tileScaleBox)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.foregroundScaleBox)).EndInit();
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
private System.Windows.Forms.ColumnHeader Display;
private System.Windows.Forms.ColumnHeader IslandSize;
private System.Windows.Forms.ColumnHeader LevelName;
private System.Windows.Forms.Button addIslandBtn;
private System.Windows.Forms.Button removeIslandBtn;
private System.Windows.Forms.ListView islandListBox;
private System.Windows.Forms.Panel mapPanel;
private System.Windows.Forms.HScrollBar mapHScrollBar;
private System.Windows.Forms.VScrollBar mapVScrollBar;
private System.Windows.Forms.MenuStrip menuStrip1;
private System.Windows.Forms.ToolStripMenuItem projectToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem createToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem openToolStripMenuItem;
private System.Windows.Forms.Label scaleLbl;
private System.Windows.Forms.ToolStripMenuItem saveToolStripMenuItem;
private System.Windows.Forms.SaveFileDialog saveFileDialog;
private System.Windows.Forms.OpenFileDialog openFileDialog;
private System.Windows.Forms.ToolStripMenuItem exportToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem mapImageToolStripMenuItem;
private System.Windows.Forms.CheckBox showServerInfoCheckbox;
private System.Windows.Forms.CheckBox showDiscoZoneInfoCheckbox;
private System.Windows.Forms.Button setRatioBtn;
private System.Windows.Forms.ToolStripMenuItem helpToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem controlsToolStripMenuItem;
private System.Windows.Forms.TextBox customRatioTxtBox;
private System.Windows.Forms.CheckBox showLinesCheckbox;
private System.Windows.Forms.ToolStripMenuItem editToolStripMenuItem;
private System.Windows.Forms.Button editIslandBtn;
private System.Windows.Forms.CheckBox alphaBgCheckbox;
private System.Windows.Forms.CheckBox tiledBackgroundCheckbox;
private System.Windows.Forms.Button chooseTileBtn;
private System.Windows.Forms.Label label1;
private System.Windows.Forms.NumericUpDown tileScaleBox;
private System.Windows.Forms.Button loadProjBtn;
private System.Windows.Forms.Button createProjBtn;
// private System.Windows.Forms.ToolStripMenuItem clearTravelDataToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem testsToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem testAllServersWithDataClearToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem testAllServersWithoutDataClearToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem editToolStripMenuItem1;
private System.Windows.Forms.ToolStripMenuItem editSpawnerTemplatesToolStripMenuItem;
// private System.Windows.Forms.ToolStripMenuItem LOCALClearTravelDataOnlyRemoveDataToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem cellImagesToolStripMenuItem;
private System.Windows.Forms.Label label2;
private System.Windows.Forms.TextBox cellImageSizetxtbox;
private System.Windows.Forms.ToolStripMenuItem slippyMapToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem localExportToolStripMenuItem;
private System.Windows.Forms.Label label3;
private System.Windows.Forms.TextBox atlasImageSizeTxtBox;
private System.Windows.Forms.Button chooseDiscoZoneBtn;
private System.Windows.Forms.ToolStripMenuItem editAllDiscoveryZonesToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem editSpawnPointsToolStripMenuItem;
private System.Windows.Forms.CheckBox showShipPathsInfoChckBox;
private System.Windows.Forms.CheckBox disableImageExportingCheckBox;
private System.Windows.Forms.TextBox imageQualityTxtbox;
private System.Windows.Forms.Label label4;
private System.Windows.Forms.CheckBox showIslandNamesChckBox;
private System.Windows.Forms.CheckBox exportPngsChckBox;
private System.Windows.Forms.CheckBox showForegroundChckBox;
private System.Windows.Forms.Button chooseForegroundBtn;
private System.Windows.Forms.NumericUpDown foregroundScaleBox;
private System.Windows.Forms.Label label5;
private System.Windows.Forms.Label atlasLocation;
private System.Windows.Forms.ToolStripMenuItem editServerTemplatesToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem editLocksToolStripMenuItem;
}
}

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,33 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace ServerGridEditor
{
public class MapPanel : Panel
{
public MainForm mainForm;
public MapPanel()
{
//SetStyle(ControlStyles.AllPaintingInWmPaint | ControlStyles.UserPaint | ControlStyles.DoubleBuffer, true);
//DoubleBuffered = true;
this.SetStyle(ControlStyles.UserPaint | ControlStyles.DoubleBuffer | ControlStyles.AllPaintingInWmPaint, true);
}
protected override void OnPaint(PaintEventArgs e)
{
this.SetStyle(ControlStyles.UserPaint, false);
base.OnPaint(e);
mainForm.mapPanel_Paint(this, e);
this.SetStyle(ControlStyles.UserPaint, true);
}
}
}

View file

@ -0,0 +1,82 @@
namespace ServerGridEditor
{
partial class ProgressForm
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.stepDescLbl = new System.Windows.Forms.Label();
this.stepLbl = new System.Windows.Forms.Label();
this.SuspendLayout();
//
// stepDescLbl
//
this.stepDescLbl.Anchor = System.Windows.Forms.AnchorStyles.None;
this.stepDescLbl.AutoEllipsis = true;
this.stepDescLbl.Font = new System.Drawing.Font("Microsoft Sans Serif", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.stepDescLbl.Location = new System.Drawing.Point(-26, 32);
this.stepDescLbl.Name = "stepDescLbl";
this.stepDescLbl.Size = new System.Drawing.Size(394, 44);
this.stepDescLbl.TabIndex = 0;
this.stepDescLbl.Text = "Step Description";
this.stepDescLbl.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
this.stepDescLbl.Click += new System.EventHandler(this.stepDescLbl_Click);
//
// stepLbl
//
this.stepLbl.Anchor = System.Windows.Forms.AnchorStyles.None;
this.stepLbl.AutoEllipsis = true;
this.stepLbl.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.stepLbl.Location = new System.Drawing.Point(-26, 67);
this.stepLbl.Name = "stepLbl";
this.stepLbl.Size = new System.Drawing.Size(394, 27);
this.stepLbl.TabIndex = 1;
this.stepLbl.Text = "(1/5)";
this.stepLbl.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
//
// ProgressForm
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(343, 128);
this.ControlBox = false;
this.Controls.Add(this.stepLbl);
this.Controls.Add(this.stepDescLbl);
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
this.Name = "ProgressForm";
this.ShowIcon = false;
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
this.Text = "Please wait";
this.ResumeLayout(false);
}
#endregion
private System.Windows.Forms.Label stepDescLbl;
private System.Windows.Forms.Label stepLbl;
}
}

View file

@ -0,0 +1,62 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace ServerGridEditor
{
public partial class ProgressForm : Form
{
int currentStep = 1;
int maxSteps = 1;
public ProgressForm()
{
InitializeComponent();
}
public void Initialize(int maxSteps, string startingStepDescription)
{
stepDescLbl.Text = startingStepDescription;
currentStep = 1;
this.maxSteps = maxSteps;
UpdateStepLabel();
Show();
Invalidate(true);
Refresh();
}
public void SkipSteps(int NumSteps = 1, bool bRefresh = false)
{
currentStep = Math.Min(maxSteps, currentStep + NumSteps);
if (bRefresh)
{
Invalidate(true);
Refresh();
}
}
public void NextStep(string stepDesc)
{
stepDescLbl.Text = stepDesc;
currentStep = Math.Min(maxSteps, ++currentStep);
UpdateStepLabel();
Invalidate(true);
Refresh();
}
void UpdateStepLabel()
{
stepLbl.Text = string.Format("({0}/{1})", "" + currentStep, "" + maxSteps);
}
private void stepDescLbl_Click(object sender, EventArgs e)
{
}
}
}

View file

@ -0,0 +1,120 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>

View file

@ -0,0 +1,279 @@
namespace ServerGridEditor
{
partial class SharedLogConfigForm
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.cancelBtn = new System.Windows.Forms.Button();
this.saveBtn = new System.Windows.Forms.Button();
this.label1 = new System.Windows.Forms.Label();
this.label2 = new System.Windows.Forms.Label();
this.label3 = new System.Windows.Forms.Label();
this.label4 = new System.Windows.Forms.Label();
this.label9 = new System.Windows.Forms.Label();
this.backupModeCombo = new System.Windows.Forms.ComboBox();
this.maxFileHistoryTxtBox = new System.Windows.Forms.TextBox();
this.httpBackupURLTxtBox = new System.Windows.Forms.TextBox();
this.httpApiKeyTxtBox = new System.Windows.Forms.TextBox();
this.s3KeyPrefixTxtBox = new System.Windows.Forms.TextBox();
this.fetchRateSecTxtBox = new System.Windows.Forms.TextBox();
this.label10 = new System.Windows.Forms.Label();
this.snapCleanSecTxtBox = new System.Windows.Forms.TextBox();
this.label11 = new System.Windows.Forms.Label();
this.snapRateSecTxtBox = new System.Windows.Forms.TextBox();
this.label12 = new System.Windows.Forms.Label();
this.snapExpHoursTxtBox = new System.Windows.Forms.TextBox();
this.label13 = new System.Windows.Forms.Label();
this.SuspendLayout();
//
// cancelBtn
//
this.cancelBtn.Location = new System.Drawing.Point(274, 362);
this.cancelBtn.Name = "cancelBtn";
this.cancelBtn.Size = new System.Drawing.Size(90, 32);
this.cancelBtn.TabIndex = 11;
this.cancelBtn.Text = "Cancel";
this.cancelBtn.UseVisualStyleBackColor = true;
this.cancelBtn.Click += new System.EventHandler(this.cancelBtn_Click);
//
// saveBtn
//
this.saveBtn.Location = new System.Drawing.Point(165, 362);
this.saveBtn.Name = "saveBtn";
this.saveBtn.Size = new System.Drawing.Size(90, 32);
this.saveBtn.TabIndex = 64;
this.saveBtn.Text = "Save";
this.saveBtn.UseVisualStyleBackColor = true;
this.saveBtn.Click += new System.EventHandler(this.saveBtn_Click);
//
// label1
//
this.label1.AutoSize = true;
this.label1.Location = new System.Drawing.Point(65, 41);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(74, 13);
this.label1.TabIndex = 65;
this.label1.Text = "Backup Mode";
//
// label2
//
this.label2.AutoSize = true;
this.label2.Location = new System.Drawing.Point(64, 83);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(75, 13);
this.label2.TabIndex = 66;
this.label2.Text = "MaxFileHistory";
//
// label3
//
this.label3.AutoSize = true;
this.label3.Location = new System.Drawing.Point(38, 287);
this.label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(101, 13);
this.label3.TabIndex = 67;
this.label3.Text = "HTTP Backup URL";
//
// label4
//
this.label4.AutoSize = true;
this.label4.Location = new System.Drawing.Point(62, 313);
this.label4.Name = "label4";
this.label4.Size = new System.Drawing.Size(77, 13);
this.label4.TabIndex = 68;
this.label4.Text = "HTTP API Key";
//
// label9
//
this.label9.AutoSize = true;
this.label9.Location = new System.Drawing.Point(69, 245);
this.label9.Name = "label9";
this.label9.Size = new System.Drawing.Size(70, 13);
this.label9.TabIndex = 73;
this.label9.Text = "S3 Key Prefix";
//
// backupModeCombo
//
this.backupModeCombo.FormattingEnabled = true;
this.backupModeCombo.Items.AddRange(new object[] {
"off",
"s3",
"http"});
this.backupModeCombo.Location = new System.Drawing.Point(145, 37);
this.backupModeCombo.Name = "backupModeCombo";
this.backupModeCombo.Size = new System.Drawing.Size(121, 21);
this.backupModeCombo.TabIndex = 74;
//
// maxFileHistoryTxtBox
//
this.maxFileHistoryTxtBox.Location = new System.Drawing.Point(145, 80);
this.maxFileHistoryTxtBox.Name = "maxFileHistoryTxtBox";
this.maxFileHistoryTxtBox.Size = new System.Drawing.Size(62, 20);
this.maxFileHistoryTxtBox.TabIndex = 75;
//
// httpBackupURLTxtBox
//
this.httpBackupURLTxtBox.Location = new System.Drawing.Point(145, 283);
this.httpBackupURLTxtBox.Name = "httpBackupURLTxtBox";
this.httpBackupURLTxtBox.Size = new System.Drawing.Size(286, 20);
this.httpBackupURLTxtBox.TabIndex = 76;
//
// httpApiKeyTxtBox
//
this.httpApiKeyTxtBox.Location = new System.Drawing.Point(145, 309);
this.httpApiKeyTxtBox.Name = "httpApiKeyTxtBox";
this.httpApiKeyTxtBox.Size = new System.Drawing.Size(286, 20);
this.httpApiKeyTxtBox.TabIndex = 77;
//
// s3KeyPrefixTxtBox
//
this.s3KeyPrefixTxtBox.Location = new System.Drawing.Point(145, 242);
this.s3KeyPrefixTxtBox.Name = "s3KeyPrefixTxtBox";
this.s3KeyPrefixTxtBox.Size = new System.Drawing.Size(286, 20);
this.s3KeyPrefixTxtBox.TabIndex = 82;
//
// fetchRateSecTxtBox
//
this.fetchRateSecTxtBox.Location = new System.Drawing.Point(145, 122);
this.fetchRateSecTxtBox.Name = "fetchRateSecTxtBox";
this.fetchRateSecTxtBox.Size = new System.Drawing.Size(62, 20);
this.fetchRateSecTxtBox.TabIndex = 84;
//
// label10
//
this.label10.AutoSize = true;
this.label10.Location = new System.Drawing.Point(57, 125);
this.label10.Name = "label10";
this.label10.Size = new System.Drawing.Size(82, 13);
this.label10.TabIndex = 83;
this.label10.Text = "Fetch Rate Sec";
//
// snapCleanSecTxtBox
//
this.snapCleanSecTxtBox.Location = new System.Drawing.Point(145, 148);
this.snapCleanSecTxtBox.Name = "snapCleanSecTxtBox";
this.snapCleanSecTxtBox.Size = new System.Drawing.Size(62, 20);
this.snapCleanSecTxtBox.TabIndex = 86;
//
// label11
//
this.label11.AutoSize = true;
this.label11.Location = new System.Drawing.Point(23, 151);
this.label11.Name = "label11";
this.label11.Size = new System.Drawing.Size(116, 13);
this.label11.TabIndex = 85;
this.label11.Text = "Snapshot Cleanup Sec";
//
// snapRateSecTxtBox
//
this.snapRateSecTxtBox.Location = new System.Drawing.Point(145, 174);
this.snapRateSecTxtBox.Name = "snapRateSecTxtBox";
this.snapRateSecTxtBox.Size = new System.Drawing.Size(62, 20);
this.snapRateSecTxtBox.TabIndex = 88;
//
// label12
//
this.label12.AutoSize = true;
this.label12.Location = new System.Drawing.Point(38, 177);
this.label12.Name = "label12";
this.label12.Size = new System.Drawing.Size(100, 13);
this.label12.TabIndex = 87;
this.label12.Text = "Snapshot Rate Sec";
//
// snapExpHoursTxtBox
//
this.snapExpHoursTxtBox.Location = new System.Drawing.Point(145, 200);
this.snapExpHoursTxtBox.Name = "snapExpHoursTxtBox";
this.snapExpHoursTxtBox.Size = new System.Drawing.Size(62, 20);
this.snapExpHoursTxtBox.TabIndex = 90;
//
// label13
//
this.label13.AutoSize = true;
this.label13.Location = new System.Drawing.Point(3, 203);
this.label13.Name = "label13";
this.label13.Size = new System.Drawing.Size(135, 13);
this.label13.TabIndex = 89;
this.label13.Text = "Snapshot Expiration Hours ";
//
// SharedLogConfigForm
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(472, 417);
this.Controls.Add(this.snapExpHoursTxtBox);
this.Controls.Add(this.label13);
this.Controls.Add(this.snapRateSecTxtBox);
this.Controls.Add(this.label12);
this.Controls.Add(this.snapCleanSecTxtBox);
this.Controls.Add(this.label11);
this.Controls.Add(this.fetchRateSecTxtBox);
this.Controls.Add(this.label10);
this.Controls.Add(this.s3KeyPrefixTxtBox);
this.Controls.Add(this.httpApiKeyTxtBox);
this.Controls.Add(this.httpBackupURLTxtBox);
this.Controls.Add(this.maxFileHistoryTxtBox);
this.Controls.Add(this.backupModeCombo);
this.Controls.Add(this.label9);
this.Controls.Add(this.label4);
this.Controls.Add(this.label3);
this.Controls.Add(this.label2);
this.Controls.Add(this.label1);
this.Controls.Add(this.saveBtn);
this.Controls.Add(this.cancelBtn);
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
this.Name = "SharedLogConfigForm";
this.Text = "Shared Log Config";
this.Load += new System.EventHandler(this.SharedLogConfigForm_Load);
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
private System.Windows.Forms.Button cancelBtn;
private System.Windows.Forms.Button saveBtn;
private System.Windows.Forms.Label label1;
private System.Windows.Forms.Label label2;
private System.Windows.Forms.Label label3;
private System.Windows.Forms.Label label4;
private System.Windows.Forms.Label label9;
private System.Windows.Forms.ComboBox backupModeCombo;
private System.Windows.Forms.TextBox maxFileHistoryTxtBox;
private System.Windows.Forms.TextBox httpBackupURLTxtBox;
private System.Windows.Forms.TextBox httpApiKeyTxtBox;
private System.Windows.Forms.TextBox s3KeyPrefixTxtBox;
private System.Windows.Forms.TextBox fetchRateSecTxtBox;
private System.Windows.Forms.Label label10;
private System.Windows.Forms.TextBox snapCleanSecTxtBox;
private System.Windows.Forms.Label label11;
private System.Windows.Forms.TextBox snapRateSecTxtBox;
private System.Windows.Forms.Label label12;
private System.Windows.Forms.TextBox snapExpHoursTxtBox;
private System.Windows.Forms.Label label13;
}
}

View file

@ -0,0 +1,107 @@
using AtlasGridDataLibrary;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace ServerGridEditor
{
public partial class SharedLogConfigForm : Form
{
public SharedLogConfigInfo config;
public SharedLogConfigForm()
{
InitializeComponent();
}
private void cancelBtn_Click(object sender, EventArgs e)
{
Close();
}
private void saveBtn_Click(object sender, EventArgs e)
{
int tmp = 0;
if (!int.TryParse(maxFileHistoryTxtBox.Text, out tmp))
{
MessageBox.Show("Invalid Max File History type, must be a number", "Alert", MessageBoxButtons.OK, MessageBoxIcon.Error);
return;
}
if (!int.TryParse(fetchRateSecTxtBox.Text, out tmp))
{
MessageBox.Show("Invalid Fetch Rate Sec, must be a number", "Alert", MessageBoxButtons.OK, MessageBoxIcon.Error);
return;
}
if (!int.TryParse(snapCleanSecTxtBox.Text, out tmp))
{
MessageBox.Show("Invalid Snapshot Cleanup Sec, must be a number", "Alert", MessageBoxButtons.OK, MessageBoxIcon.Error);
return;
}
if (!int.TryParse(snapRateSecTxtBox.Text, out tmp))
{
MessageBox.Show("Invalid Snapshot Rate Sec, must be a number", "Alert", MessageBoxButtons.OK, MessageBoxIcon.Error);
return;
}
if (!int.TryParse(snapExpHoursTxtBox.Text, out tmp))
{
MessageBox.Show("Invalid Snapshot Expiration Hours, must be a number", "Alert", MessageBoxButtons.OK, MessageBoxIcon.Error);
return;
}
switch (backupModeCombo.SelectedIndex)
{
case 0: // off
break;
case 1: // s3
break;
case 2: // http
if (String.IsNullOrWhiteSpace(httpBackupURLTxtBox.Text))
{
MessageBox.Show("HTTP Backup URL must be provided", "Alert", MessageBoxButtons.OK, MessageBoxIcon.Error);
return;
}
break;
}
if (config != null)
{
config.BackupMode = backupModeCombo.Items[backupModeCombo.SelectedIndex].ToString();
config.MaxFileHistory = Int32.Parse(maxFileHistoryTxtBox.Text);
config.S3KeyPrefix = s3KeyPrefixTxtBox.Text;
config.HttpAPIKey = httpApiKeyTxtBox.Text;
config.HttpBackupURL = httpBackupURLTxtBox.Text;
config.FetchRateSec = Int32.Parse(fetchRateSecTxtBox.Text);
config.SnapshotCleanupSec = Int32.Parse(snapCleanSecTxtBox.Text);
config.SnapshotRateSec = Int32.Parse(snapRateSecTxtBox.Text);
config.SnapshotExpirationHours = Int32.Parse(snapExpHoursTxtBox.Text);
}
Close();
}
private void SharedLogConfigForm_Load(object sender, EventArgs e)
{
if (config != null)
{
backupModeCombo.SelectedIndex = backupModeCombo.FindStringExact(config.BackupMode);
maxFileHistoryTxtBox.Text = config.MaxFileHistory.ToString();
s3KeyPrefixTxtBox.Text = config.S3KeyPrefix;
httpApiKeyTxtBox.Text = config.HttpAPIKey;
httpBackupURLTxtBox.Text = config.HttpBackupURL;
fetchRateSecTxtBox.Text = config.FetchRateSec.ToString();
snapCleanSecTxtBox.Text = config.SnapshotCleanupSec.ToString();
snapRateSecTxtBox.Text = config.SnapshotRateSec.ToString();
snapExpHoursTxtBox.Text = config.SnapshotExpirationHours.ToString();
}
else
{
backupModeCombo.SelectedIndex = 0;
}
}
}
}

View file

@ -0,0 +1,120 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>

View file

@ -0,0 +1,173 @@
namespace ServerGridEditor
{
partial class TravelDataConfigForm
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.cancelBtn = new System.Windows.Forms.Button();
this.saveBtn = new System.Windows.Forms.Button();
this.label1 = new System.Windows.Forms.Label();
this.label3 = new System.Windows.Forms.Label();
this.label4 = new System.Windows.Forms.Label();
this.label9 = new System.Windows.Forms.Label();
this.backupModeCombo = new System.Windows.Forms.ComboBox();
this.httpBackupURLTxtBox = new System.Windows.Forms.TextBox();
this.httpApiKeyTxtBox = new System.Windows.Forms.TextBox();
this.s3KeyPrefixTxtBox = new System.Windows.Forms.TextBox();
this.SuspendLayout();
//
// cancelBtn
//
this.cancelBtn.Location = new System.Drawing.Point(274, 249);
this.cancelBtn.Name = "cancelBtn";
this.cancelBtn.Size = new System.Drawing.Size(90, 32);
this.cancelBtn.TabIndex = 11;
this.cancelBtn.Text = "Cancel";
this.cancelBtn.UseVisualStyleBackColor = true;
this.cancelBtn.Click += new System.EventHandler(this.cancelBtn_Click);
//
// saveBtn
//
this.saveBtn.Location = new System.Drawing.Point(165, 249);
this.saveBtn.Name = "saveBtn";
this.saveBtn.Size = new System.Drawing.Size(90, 32);
this.saveBtn.TabIndex = 64;
this.saveBtn.Text = "Save";
this.saveBtn.UseVisualStyleBackColor = true;
this.saveBtn.Click += new System.EventHandler(this.saveBtn_Click);
//
// label1
//
this.label1.AutoSize = true;
this.label1.Location = new System.Drawing.Point(65, 53);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(74, 13);
this.label1.TabIndex = 65;
this.label1.Text = "Backup Mode";
//
// label3
//
this.label3.AutoSize = true;
this.label3.Enabled = false;
this.label3.Location = new System.Drawing.Point(38, 158);
this.label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(101, 13);
this.label3.TabIndex = 67;
this.label3.Text = "HTTP Backup URL";
//
// label4
//
this.label4.AutoSize = true;
this.label4.Enabled = false;
this.label4.Location = new System.Drawing.Point(62, 184);
this.label4.Name = "label4";
this.label4.Size = new System.Drawing.Size(77, 13);
this.label4.TabIndex = 68;
this.label4.Text = "HTTP API Key";
//
// label9
//
this.label9.AutoSize = true;
this.label9.Location = new System.Drawing.Point(69, 102);
this.label9.Name = "label9";
this.label9.Size = new System.Drawing.Size(70, 13);
this.label9.TabIndex = 73;
this.label9.Text = "S3 Key Prefix";
//
// backupModeCombo
//
this.backupModeCombo.FormattingEnabled = true;
this.backupModeCombo.Items.AddRange(new object[] {
"off",
"s3",
"http"});
this.backupModeCombo.Location = new System.Drawing.Point(145, 49);
this.backupModeCombo.Name = "backupModeCombo";
this.backupModeCombo.Size = new System.Drawing.Size(121, 21);
this.backupModeCombo.TabIndex = 74;
//
// httpBackupURLTxtBox
//
this.httpBackupURLTxtBox.Enabled = false;
this.httpBackupURLTxtBox.Location = new System.Drawing.Point(145, 154);
this.httpBackupURLTxtBox.Name = "httpBackupURLTxtBox";
this.httpBackupURLTxtBox.Size = new System.Drawing.Size(286, 20);
this.httpBackupURLTxtBox.TabIndex = 76;
//
// httpApiKeyTxtBox
//
this.httpApiKeyTxtBox.Enabled = false;
this.httpApiKeyTxtBox.Location = new System.Drawing.Point(145, 180);
this.httpApiKeyTxtBox.Name = "httpApiKeyTxtBox";
this.httpApiKeyTxtBox.Size = new System.Drawing.Size(286, 20);
this.httpApiKeyTxtBox.TabIndex = 77;
//
// s3KeyPrefixTxtBox
//
this.s3KeyPrefixTxtBox.Location = new System.Drawing.Point(145, 99);
this.s3KeyPrefixTxtBox.Name = "s3KeyPrefixTxtBox";
this.s3KeyPrefixTxtBox.Size = new System.Drawing.Size(286, 20);
this.s3KeyPrefixTxtBox.TabIndex = 82;
//
// TravelDataConfigForm
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(502, 304);
this.Controls.Add(this.s3KeyPrefixTxtBox);
this.Controls.Add(this.httpApiKeyTxtBox);
this.Controls.Add(this.httpBackupURLTxtBox);
this.Controls.Add(this.backupModeCombo);
this.Controls.Add(this.label9);
this.Controls.Add(this.label4);
this.Controls.Add(this.label3);
this.Controls.Add(this.label1);
this.Controls.Add(this.saveBtn);
this.Controls.Add(this.cancelBtn);
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
this.Name = "TravelDataConfigForm";
this.Text = "Travel Data Config";
this.Load += new System.EventHandler(this.TravelDataConfigForm_Load);
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
private System.Windows.Forms.Button cancelBtn;
private System.Windows.Forms.Button saveBtn;
private System.Windows.Forms.Label label1;
private System.Windows.Forms.Label label3;
private System.Windows.Forms.Label label4;
private System.Windows.Forms.Label label9;
private System.Windows.Forms.ComboBox backupModeCombo;
private System.Windows.Forms.TextBox httpBackupURLTxtBox;
private System.Windows.Forms.TextBox httpApiKeyTxtBox;
private System.Windows.Forms.TextBox s3KeyPrefixTxtBox;
}
}

View file

@ -0,0 +1,70 @@
using AtlasGridDataLibrary;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace ServerGridEditor
{
public partial class TravelDataConfigForm : Form
{
public BackupConfigInfo config;
public TravelDataConfigForm()
{
InitializeComponent();
}
private void cancelBtn_Click(object sender, EventArgs e)
{
Close();
}
private void saveBtn_Click(object sender, EventArgs e)
{
switch (backupModeCombo.SelectedIndex)
{
case 0: // off
break;
case 1: // s3
break;
case 2: // http
if (String.IsNullOrWhiteSpace(httpBackupURLTxtBox.Text))
{
MessageBox.Show("HTTP Backup URL must be provided", "Alert", MessageBoxButtons.OK, MessageBoxIcon.Error);
return;
}
break;
}
if (config != null)
{
config.BackupMode = backupModeCombo.Items[backupModeCombo.SelectedIndex].ToString();
config.S3KeyPrefix = s3KeyPrefixTxtBox.Text;
config.HttpAPIKey = httpApiKeyTxtBox.Text;
config.HttpBackupURL = httpBackupURLTxtBox.Text;
}
Close();
}
private void TravelDataConfigForm_Load(object sender, EventArgs e)
{
if (config != null)
{
backupModeCombo.SelectedIndex = backupModeCombo.FindStringExact(config.BackupMode);
s3KeyPrefixTxtBox.Text = config.S3KeyPrefix;
httpApiKeyTxtBox.Text = config.HttpAPIKey;
httpBackupURLTxtBox.Text = config.HttpBackupURL;
}
else
{
backupModeCombo.SelectedIndex = 0;
}
}
}
}

View file

@ -0,0 +1,120 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>

View file

@ -0,0 +1,213 @@
namespace ServerGridEditor
{
partial class TribeLogConfigForm
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.cancelBtn = new System.Windows.Forms.Button();
this.saveBtn = new System.Windows.Forms.Button();
this.label1 = new System.Windows.Forms.Label();
this.label2 = new System.Windows.Forms.Label();
this.label3 = new System.Windows.Forms.Label();
this.label4 = new System.Windows.Forms.Label();
this.label9 = new System.Windows.Forms.Label();
this.backupModeCombo = new System.Windows.Forms.ComboBox();
this.maxFileHistoryTxtBox = new System.Windows.Forms.TextBox();
this.httpBackupURLTxtBox = new System.Windows.Forms.TextBox();
this.httpApiKeyTxtBox = new System.Windows.Forms.TextBox();
this.s3KeyPrefixTxtBox = new System.Windows.Forms.TextBox();
this.maxRedisLinesTxtBox = new System.Windows.Forms.TextBox();
this.label10 = new System.Windows.Forms.Label();
this.SuspendLayout();
//
// cancelBtn
//
this.cancelBtn.Location = new System.Drawing.Point(274, 351);
this.cancelBtn.Name = "cancelBtn";
this.cancelBtn.Size = new System.Drawing.Size(90, 32);
this.cancelBtn.TabIndex = 11;
this.cancelBtn.Text = "Cancel";
this.cancelBtn.UseVisualStyleBackColor = true;
this.cancelBtn.Click += new System.EventHandler(this.cancelBtn_Click);
//
// saveBtn
//
this.saveBtn.Location = new System.Drawing.Point(165, 351);
this.saveBtn.Name = "saveBtn";
this.saveBtn.Size = new System.Drawing.Size(90, 32);
this.saveBtn.TabIndex = 64;
this.saveBtn.Text = "Save";
this.saveBtn.UseVisualStyleBackColor = true;
this.saveBtn.Click += new System.EventHandler(this.saveBtn_Click);
//
// label1
//
this.label1.AutoSize = true;
this.label1.Location = new System.Drawing.Point(65, 53);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(74, 13);
this.label1.TabIndex = 65;
this.label1.Text = "Backup Mode";
//
// label2
//
this.label2.AutoSize = true;
this.label2.Location = new System.Drawing.Point(64, 101);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(75, 13);
this.label2.TabIndex = 66;
this.label2.Text = "MaxFileHistory";
//
// label3
//
this.label3.AutoSize = true;
this.label3.Location = new System.Drawing.Point(38, 227);
this.label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(101, 13);
this.label3.TabIndex = 67;
this.label3.Text = "HTTP Backup URL";
//
// label4
//
this.label4.AutoSize = true;
this.label4.Location = new System.Drawing.Point(62, 253);
this.label4.Name = "label4";
this.label4.Size = new System.Drawing.Size(77, 13);
this.label4.TabIndex = 68;
this.label4.Text = "HTTP API Key";
//
// label9
//
this.label9.AutoSize = true;
this.label9.Location = new System.Drawing.Point(69, 175);
this.label9.Name = "label9";
this.label9.Size = new System.Drawing.Size(70, 13);
this.label9.TabIndex = 73;
this.label9.Text = "S3 Key Prefix";
//
// backupModeCombo
//
this.backupModeCombo.FormattingEnabled = true;
this.backupModeCombo.Items.AddRange(new object[] {
"off",
"s3",
"http"});
this.backupModeCombo.Location = new System.Drawing.Point(145, 49);
this.backupModeCombo.Name = "backupModeCombo";
this.backupModeCombo.Size = new System.Drawing.Size(121, 21);
this.backupModeCombo.TabIndex = 74;
//
// maxFileHistoryTxtBox
//
this.maxFileHistoryTxtBox.Location = new System.Drawing.Point(145, 98);
this.maxFileHistoryTxtBox.Name = "maxFileHistoryTxtBox";
this.maxFileHistoryTxtBox.Size = new System.Drawing.Size(62, 20);
this.maxFileHistoryTxtBox.TabIndex = 75;
//
// httpBackupURLTxtBox
//
this.httpBackupURLTxtBox.Location = new System.Drawing.Point(145, 223);
this.httpBackupURLTxtBox.Name = "httpBackupURLTxtBox";
this.httpBackupURLTxtBox.Size = new System.Drawing.Size(286, 20);
this.httpBackupURLTxtBox.TabIndex = 76;
//
// httpApiKeyTxtBox
//
this.httpApiKeyTxtBox.Location = new System.Drawing.Point(145, 249);
this.httpApiKeyTxtBox.Name = "httpApiKeyTxtBox";
this.httpApiKeyTxtBox.Size = new System.Drawing.Size(286, 20);
this.httpApiKeyTxtBox.TabIndex = 77;
//
// s3KeyPrefixTxtBox
//
this.s3KeyPrefixTxtBox.Location = new System.Drawing.Point(145, 172);
this.s3KeyPrefixTxtBox.Name = "s3KeyPrefixTxtBox";
this.s3KeyPrefixTxtBox.Size = new System.Drawing.Size(286, 20);
this.s3KeyPrefixTxtBox.TabIndex = 82;
//
// maxRedisLinesTxtBox
//
this.maxRedisLinesTxtBox.Location = new System.Drawing.Point(145, 126);
this.maxRedisLinesTxtBox.Name = "maxRedisLinesTxtBox";
this.maxRedisLinesTxtBox.Size = new System.Drawing.Size(62, 20);
this.maxRedisLinesTxtBox.TabIndex = 84;
//
// label10
//
this.label10.AutoSize = true;
this.label10.Location = new System.Drawing.Point(54, 129);
this.label10.Name = "label10";
this.label10.Size = new System.Drawing.Size(85, 13);
this.label10.TabIndex = 83;
this.label10.Text = "Max Redis Lines";
//
// TribeLogConfigForm
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(482, 404);
this.Controls.Add(this.maxRedisLinesTxtBox);
this.Controls.Add(this.label10);
this.Controls.Add(this.s3KeyPrefixTxtBox);
this.Controls.Add(this.httpApiKeyTxtBox);
this.Controls.Add(this.httpBackupURLTxtBox);
this.Controls.Add(this.maxFileHistoryTxtBox);
this.Controls.Add(this.backupModeCombo);
this.Controls.Add(this.label9);
this.Controls.Add(this.label4);
this.Controls.Add(this.label3);
this.Controls.Add(this.label2);
this.Controls.Add(this.label1);
this.Controls.Add(this.saveBtn);
this.Controls.Add(this.cancelBtn);
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
this.Name = "TribeLogConfigForm";
this.Text = "Tribe Log Config";
this.Load += new System.EventHandler(this.TribeLogConfigForm_Load);
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
private System.Windows.Forms.Button cancelBtn;
private System.Windows.Forms.Button saveBtn;
private System.Windows.Forms.Label label1;
private System.Windows.Forms.Label label2;
private System.Windows.Forms.Label label3;
private System.Windows.Forms.Label label4;
private System.Windows.Forms.Label label9;
private System.Windows.Forms.ComboBox backupModeCombo;
private System.Windows.Forms.TextBox maxFileHistoryTxtBox;
private System.Windows.Forms.TextBox httpBackupURLTxtBox;
private System.Windows.Forms.TextBox httpApiKeyTxtBox;
private System.Windows.Forms.TextBox s3KeyPrefixTxtBox;
private System.Windows.Forms.TextBox maxRedisLinesTxtBox;
private System.Windows.Forms.Label label10;
}
}

View file

@ -0,0 +1,88 @@
using AtlasGridDataLibrary;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace ServerGridEditor
{
public partial class TribeLogConfigForm : Form
{
public TribeLogConfigInfo config;
public TribeLogConfigForm()
{
InitializeComponent();
}
private void cancelBtn_Click(object sender, EventArgs e)
{
Close();
}
private void saveBtn_Click(object sender, EventArgs e)
{
int maxFileHistory = 0;
if (!int.TryParse(maxFileHistoryTxtBox.Text, out maxFileHistory))
{
MessageBox.Show("Invalid Max File History type, must be a number", "Alert", MessageBoxButtons.OK, MessageBoxIcon.Error);
return;
}
int maxRedis = 0;
if (!int.TryParse(maxRedisLinesTxtBox.Text, out maxRedis))
{
MessageBox.Show("Invalid Max Redis Lines, must be a number", "Alert", MessageBoxButtons.OK, MessageBoxIcon.Error);
return;
}
switch (backupModeCombo.SelectedIndex)
{
case 0: // off
break;
case 1: // s3
break;
case 2: // http
if (String.IsNullOrWhiteSpace(httpBackupURLTxtBox.Text))
{
MessageBox.Show("HTTP Backup URL must be provided", "Alert", MessageBoxButtons.OK, MessageBoxIcon.Error);
return;
}
break;
}
if (config != null)
{
config.BackupMode = backupModeCombo.Items[backupModeCombo.SelectedIndex].ToString();
config.MaxFileHistory = Int32.Parse(maxFileHistoryTxtBox.Text);
config.MaxRedisEntries = Int32.Parse(maxRedisLinesTxtBox.Text);
config.S3KeyPrefix = s3KeyPrefixTxtBox.Text;
config.HttpAPIKey = httpApiKeyTxtBox.Text;
config.HttpBackupURL = httpBackupURLTxtBox.Text;
}
Close();
}
private void TribeLogConfigForm_Load(object sender, EventArgs e)
{
if (config != null)
{
backupModeCombo.SelectedIndex = backupModeCombo.FindStringExact(config.BackupMode);
maxFileHistoryTxtBox.Text = config.MaxFileHistory.ToString();
maxRedisLinesTxtBox.Text = config.MaxRedisEntries.ToString();
s3KeyPrefixTxtBox.Text = config.S3KeyPrefix;
httpApiKeyTxtBox.Text = config.HttpAPIKey;
httpBackupURLTxtBox.Text = config.HttpBackupURL;
}
else
{
backupModeCombo.SelectedIndex = 0;
}
}
}
}

View file

@ -0,0 +1,120 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>

View file

@ -0,0 +1,36 @@
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("ServerGridEditor")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("ServerGridEditor")]
[assembly: AssemblyCopyright("Copyright © 2017")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
// Setting ComVisible to false makes the types in this assembly not visible
// to COM components. If you need to access a type in this assembly from
// COM, set the ComVisible attribute to true on that type.
[assembly: ComVisible(false)]
// The following GUID is for the ID of the typelib if this project is exposed to COM
[assembly: Guid("9b3c74b8-57c2-4cf5-8bad-c5c0d9123532")]
// Version information for an assembly consists of the following four values:
//
// Major Version
// Minor Version
// Build Number
// Revision
//
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]

View file

@ -0,0 +1,63 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.42000
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace ServerGridEditor.Properties {
using System;
/// <summary>
/// A strongly-typed resource class, for looking up localized strings, etc.
/// </summary>
// This class was auto-generated by the StronglyTypedResourceBuilder
// class via a tool like ResGen or Visual Studio.
// To add or remove a member, edit your .ResX file then rerun ResGen
// with the /str option, or rebuild your VS project.
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
internal class Resources {
private static global::System.Resources.ResourceManager resourceMan;
private static global::System.Globalization.CultureInfo resourceCulture;
[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
internal Resources() {
}
/// <summary>
/// Returns the cached ResourceManager instance used by this class.
/// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
internal static global::System.Resources.ResourceManager ResourceManager {
get {
if (object.ReferenceEquals(resourceMan, null)) {
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("ServerGridEditor.Properties.Resources", typeof(Resources).Assembly);
resourceMan = temp;
}
return resourceMan;
}
}
/// <summary>
/// Overrides the current thread's CurrentUICulture property for all
/// resource lookups using this strongly typed resource class.
/// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
internal static global::System.Globalization.CultureInfo Culture {
get {
return resourceCulture;
}
set {
resourceCulture = value;
}
}
}
}

View file

@ -0,0 +1,117 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>

View file

@ -0,0 +1,26 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.42000
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace ServerGridEditor.Properties {
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "14.0.0.0")]
internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {
private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
public static Settings Default {
get {
return defaultInstance;
}
}
}
}

View file

@ -0,0 +1,7 @@
<?xml version='1.0' encoding='utf-8'?>
<SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)">
<Profiles>
<Profile Name="(Default)" />
</Profiles>
<Settings />
</SettingsFile>

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 768 B

View file

@ -0,0 +1,331 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{9B3C74B8-57C2-4CF5-8BAD-C5C0D9123532}</ProjectGuid>
<OutputType>WinExe</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>ServerGridEditor</RootNamespace>
<AssemblyName>ServerGridEditor</AssemblyName>
<TargetFrameworkVersion>v4.5.1</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
<NuGetPackageImportStamp>
</NuGetPackageImportStamp>
<TargetFrameworkProfile />
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\unused\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\unused\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x64'">
<DebugSymbols>true</DebugSymbols>
<OutputPath>..\..\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<DebugType>full</DebugType>
<PlatformTarget>x64</PlatformTarget>
<ErrorReport>prompt</ErrorReport>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
<Prefer32Bit>true</Prefer32Bit>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x64'">
<OutputPath>..\..\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<Optimize>true</Optimize>
<DebugType>pdbonly</DebugType>
<PlatformTarget>x64</PlatformTarget>
<ErrorReport>prompt</ErrorReport>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
<Prefer32Bit>true</Prefer32Bit>
</PropertyGroup>
<PropertyGroup>
<ApplicationIcon>icon.ico</ApplicationIcon>
</PropertyGroup>
<ItemGroup>
<Reference Include="Costura, Version=1.6.2.0, Culture=neutral, PublicKeyToken=9919ef960d84173d, processorArchitecture=MSIL">
<HintPath>..\packages\Costura.Fody.1.6.2\lib\dotnet\Costura.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="Magick.NET-Q16-AnyCPU, Version=7.9.0.0, Culture=neutral, PublicKeyToken=2004825badfa91ec, processorArchitecture=MSIL">
<HintPath>..\packages\Magick.NET-Q16-AnyCPU.7.9.0.1\lib\net40\Magick.NET-Q16-AnyCPU.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Newtonsoft.Json, Version=11.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
<HintPath>..\packages\Newtonsoft.Json.11.0.1\lib\net45\Newtonsoft.Json.dll</HintPath>
<SpecificVersion>False</SpecificVersion>
<Private>True</Private>
</Reference>
<Reference Include="PresentationCore" />
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.IO.Compression" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Data" />
<Reference Include="System.Deployment" />
<Reference Include="System.Drawing" />
<Reference Include="System.Net.Http" />
<Reference Include="System.Windows.Forms" />
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="Code\DiscoveryZone.cs" />
<Compile Include="Code\GlobalSettings.cs" />
<Compile Include="Code\Island.cs" />
<Compile Include="Code\MoveableObject.cs" />
<Compile Include="Code\Project.cs" />
<Compile Include="Code\ShipPath.cs" />
<Compile Include="Code\SlippyMap.cs" />
<Compile Include="Code\Spawners.cs" />
<Compile Include="Code\SpawnRegion.cs" />
<Compile Include="Forms\EditServerTemplate.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="Forms\EditServerTemplate.Designer.cs">
<DependentUpon>EditServerTemplate.cs</DependentUpon>
</Compile>
<Compile Include="Forms\EditServerTemplates.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="Forms\EditServerTemplates.Designer.cs">
<DependentUpon>EditServerTemplates.cs</DependentUpon>
</Compile>
<Compile Include="Forms\EditAllLocksForm.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="Forms\EditAllLocksForm.Designer.cs">
<DependentUpon>EditAllLocksForm.cs</DependentUpon>
</Compile>
<Compile Include="Forms\SharedLogConfigForm.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="Forms\SharedLogConfigForm.Designer.cs">
<DependentUpon>SharedLogConfigForm.cs</DependentUpon>
</Compile>
<Compile Include="Forms\TribeLogConfigForm.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="Forms\TribeLogConfigForm.Designer.cs">
<DependentUpon>TribeLogConfigForm.cs</DependentUpon>
</Compile>
<Compile Include="Forms\TravelDataConfigForm.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="Forms\TravelDataConfigForm.Designer.cs">
<DependentUpon>TravelDataConfigForm.cs</DependentUpon>
</Compile>
<Compile Include="Forms\EditDiscoveryZoneInstance.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="Forms\EditDiscoveryZoneInstance.Designer.cs">
<DependentUpon>EditDiscoveryZoneInstance.cs</DependentUpon>
</Compile>
<Compile Include="Forms\EditDiscoZonesForm.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="Forms\EditDiscoZonesForm.Designer.cs">
<DependentUpon>EditDiscoZonesForm.cs</DependentUpon>
</Compile>
<Compile Include="Forms\EditIslandInstance.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="Forms\EditIslandInstance.Designer.cs">
<DependentUpon>EditIslandInstance.cs</DependentUpon>
</Compile>
<Compile Include="Forms\EditShipPath.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="Forms\EditShipPath.Designer.cs">
<DependentUpon>EditShipPath.cs</DependentUpon>
</Compile>
<Compile Include="Forms\EditSpawnerTemplatesForm.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="Forms\EditSpawnerTemplatesForm.Designer.cs">
<DependentUpon>EditSpawnerTemplatesForm.cs</DependentUpon>
</Compile>
<Compile Include="Forms\EditSpawnRegions.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="Forms\EditSpawnRegions.Designer.cs">
<DependentUpon>EditSpawnRegions.cs</DependentUpon>
</Compile>
<Compile Include="Forms\LocksForm.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="Forms\LocksForm.Designer.cs">
<DependentUpon>LocksForm.cs</DependentUpon>
</Compile>
<Compile Include="Forms\ProgressForm.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="Forms\ProgressForm.Designer.cs">
<DependentUpon>ProgressForm.cs</DependentUpon>
</Compile>
<Compile Include="Forms\EditServerForm.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="Forms\EditServerForm.Designer.cs">
<DependentUpon>EditServerForm.cs</DependentUpon>
</Compile>
<Compile Include="Forms\CreateProjectForm.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="Forms\CreateProjectForm.Designer.cs">
<DependentUpon>CreateProjectForm.cs</DependentUpon>
</Compile>
<Compile Include="Forms\MapPanel.cs">
<SubType>Component</SubType>
</Compile>
<Compile Include="Code\Server.cs" />
<Compile Include="Code\StaticHelpers.cs" />
<Compile Include="Forms\MainForm.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="Forms\MainForm.Designer.cs">
<DependentUpon>MainForm.cs</DependentUpon>
</Compile>
<Compile Include="Forms\CreateIslandForm.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="Forms\CreateIslandForm.Designer.cs">
<DependentUpon>CreateIslandForm.cs</DependentUpon>
</Compile>
<Compile Include="Code\Program.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<EmbeddedResource Include="Forms\EditServerTemplate.resx">
<DependentUpon>EditServerTemplate.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Forms\EditServerTemplates.resx">
<DependentUpon>EditServerTemplates.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Forms\EditAllLocksForm.resx">
<DependentUpon>EditAllLocksForm.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Forms\SharedLogConfigForm.resx">
<DependentUpon>SharedLogConfigForm.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Forms\TribeLogConfigForm.resx">
<DependentUpon>TribeLogConfigForm.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Forms\TravelDataConfigForm.resx">
<DependentUpon>TravelDataConfigForm.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Forms\EditDiscoveryZoneInstance.resx">
<DependentUpon>EditDiscoveryZoneInstance.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Forms\EditDiscoZonesForm.resx">
<DependentUpon>EditDiscoZonesForm.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Forms\EditIslandInstance.resx">
<DependentUpon>EditIslandInstance.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Forms\EditShipPath.resx">
<DependentUpon>EditShipPath.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Forms\EditSpawnerTemplatesForm.resx">
<DependentUpon>EditSpawnerTemplatesForm.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Forms\EditSpawnRegions.resx">
<DependentUpon>EditSpawnRegions.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Forms\LocksForm.resx">
<DependentUpon>LocksForm.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Forms\ProgressForm.resx">
<DependentUpon>ProgressForm.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Forms\EditServerForm.resx">
<DependentUpon>EditServerForm.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Forms\CreateProjectForm.resx">
<DependentUpon>CreateProjectForm.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Forms\MainForm.resx">
<DependentUpon>MainForm.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Forms\CreateIslandForm.resx">
<DependentUpon>CreateIslandForm.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Properties\Resources.resx">
<Generator>ResXFileCodeGenerator</Generator>
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
<SubType>Designer</SubType>
</EmbeddedResource>
<Compile Include="Properties\Resources.Designer.cs">
<AutoGen>True</AutoGen>
<DependentUpon>Resources.resx</DependentUpon>
<DesignTime>True</DesignTime>
</Compile>
<None Include="packages.config" />
<None Include="Properties\Settings.settings">
<Generator>SettingsSingleFileGenerator</Generator>
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
</None>
<Compile Include="Properties\Settings.Designer.cs">
<AutoGen>True</AutoGen>
<DependentUpon>Settings.settings</DependentUpon>
<DesignTimeSharedInput>True</DesignTimeSharedInput>
</Compile>
</ItemGroup>
<ItemGroup>
<None Include="App.config" />
</ItemGroup>
<ItemGroup>
<None Include="FodyWeavers.xml" />
<Content Include="icon.ico" />
<Content Include="Resources\discoZoneBox.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="Resources\lock.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="Resources\pencur.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
</ItemGroup>
<ItemGroup>
<WCFMetadata Include="Service References\" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\AtlasGridDataLibrary\AtlasGridDataLibrary.csproj">
<Project>{8a276721-fe14-4414-8c0a-1b3ecc282195}</Project>
<Name>AtlasGridDataLibrary</Name>
</ProjectReference>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<Import Project="..\packages\Fody.2.0.0\build\dotnet\Fody.targets" Condition="Exists('..\packages\Fody.2.0.0\build\dotnet\Fody.targets')" />
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
<PropertyGroup>
<ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
</PropertyGroup>
<Error Condition="!Exists('..\packages\Fody.2.0.0\build\dotnet\Fody.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Fody.2.0.0\build\dotnet\Fody.targets'))" />
<Error Condition="!Exists('..\packages\Costura.Fody.1.6.2\build\dotnet\Costura.Fody.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Costura.Fody.1.6.2\build\dotnet\Costura.Fody.targets'))" />
</Target>
<Import Project="..\packages\Costura.Fody.1.6.2\build\dotnet\Costura.Fody.targets" Condition="Exists('..\packages\Costura.Fody.1.6.2\build\dotnet\Costura.Fody.targets')" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
</Target>
<Target Name="AfterBuild">
</Target>
-->
</Project>

Binary file not shown.

After

Width:  |  Height:  |  Size: 168 KiB

View file

@ -0,0 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="Costura.Fody" version="1.6.2" targetFramework="net452" developmentDependency="true" />
<package id="Fody" version="2.0.0" targetFramework="net452" developmentDependency="true" />
<package id="Magick.NET-Q16-AnyCPU" version="7.9.0.1" targetFramework="net452" />
<package id="Newtonsoft.Json" version="11.0.1" targetFramework="net452" />
</packages>