C&C Remastered Map Editor
Initial commit of C&C Remastered Map Editor code
This commit is contained in:
parent
1f6350fe6e
commit
e37e174be1
|
@ -0,0 +1,36 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<configuration>
|
||||||
|
<configSections>
|
||||||
|
<sectionGroup name="applicationSettings" type="System.Configuration.ApplicationSettingsGroup, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||||
|
<section name="MobiusEditor.Properties.Settings" type="System.Configuration.ClientSettingsSection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false"/>
|
||||||
|
</sectionGroup>
|
||||||
|
<sectionGroup name="userSettings" type="System.Configuration.UserSettingsGroup, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||||
|
<section name="MobiusEditor.Properties.Settings" type="System.Configuration.ClientSettingsSection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" allowExeDefinition="MachineToLocalUser" requirePermission="false"/>
|
||||||
|
</sectionGroup>
|
||||||
|
</configSections>
|
||||||
|
<startup>
|
||||||
|
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.2"/>
|
||||||
|
</startup>
|
||||||
|
<applicationSettings>
|
||||||
|
<MobiusEditor.Properties.Settings>
|
||||||
|
<setting name="Quality" serializeAs="String">
|
||||||
|
<value>2</value>
|
||||||
|
</setting>
|
||||||
|
</MobiusEditor.Properties.Settings>
|
||||||
|
</applicationSettings>
|
||||||
|
<userSettings>
|
||||||
|
<MobiusEditor.Properties.Settings>
|
||||||
|
<setting name="ToolDialogPosition" serializeAs="String">
|
||||||
|
<value>0, 0</value>
|
||||||
|
</setting>
|
||||||
|
<setting name="ShowInviteWarning" serializeAs="String">
|
||||||
|
<value>True</value>
|
||||||
|
</setting>
|
||||||
|
</MobiusEditor.Properties.Settings>
|
||||||
|
</userSettings>
|
||||||
|
<runtime>
|
||||||
|
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
|
||||||
|
<probing privatePath="bin" />
|
||||||
|
</assemblyBinding>
|
||||||
|
</runtime>
|
||||||
|
</configuration>
|
|
@ -0,0 +1,536 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="15.0">
|
||||||
|
<Import Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" />
|
||||||
|
<PropertyGroup>
|
||||||
|
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||||
|
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||||
|
<ProjectGuid>{397CEF00-8930-4EC8-B15F-F7CF7193FB22}</ProjectGuid>
|
||||||
|
<OutputType>WinExe</OutputType>
|
||||||
|
<RootNamespace>MobiusEditor</RootNamespace>
|
||||||
|
<AssemblyName Condition="'$(Configuration)'=='Debug'">CnCTDRAMapEditorD</AssemblyName>
|
||||||
|
<AssemblyName Condition="'$(Configuration)'=='Release'">CnCTDRAMapEditor</AssemblyName>
|
||||||
|
<AssemblyName Condition="'$(Configuration)'=='Gold'">CnCTDRAMapEditor</AssemblyName>
|
||||||
|
<TargetFrameworkVersion>v4.6.2</TargetFrameworkVersion>
|
||||||
|
<FileAlignment>512</FileAlignment>
|
||||||
|
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
|
||||||
|
<Deterministic>true</Deterministic>
|
||||||
|
<SccProjectName>SAK</SccProjectName>
|
||||||
|
<SccLocalPath>SAK</SccLocalPath>
|
||||||
|
<SccAuxPath>SAK</SccAuxPath>
|
||||||
|
<SccProvider>SAK</SccProvider>
|
||||||
|
<TargetFrameworkProfile />
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||||
|
<PlatformTarget>x64</PlatformTarget>
|
||||||
|
<DebugSymbols>true</DebugSymbols>
|
||||||
|
<DebugType>full</DebugType>
|
||||||
|
<Optimize>false</Optimize>
|
||||||
|
<OutputPath>bin\Debug\</OutputPath>
|
||||||
|
<DefineConstants>TRACE;DEBUG;STEAMWORKS_WIN;STEAMWORKS_X64;DEVELOPER</DefineConstants>
|
||||||
|
<ErrorReport>prompt</ErrorReport>
|
||||||
|
<WarningLevel>4</WarningLevel>
|
||||||
|
<LangVersion>7.3</LangVersion>
|
||||||
|
<Prefer32Bit>false</Prefer32Bit>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||||
|
<PlatformTarget>x64</PlatformTarget>
|
||||||
|
<DebugType>pdbonly</DebugType>
|
||||||
|
<Optimize>true</Optimize>
|
||||||
|
<OutputPath>bin\Release\</OutputPath>
|
||||||
|
<DefineConstants>TRACE;STEAMWORKS_WIN;STEAMWORKS_X64;DEVELOPER</DefineConstants>
|
||||||
|
<ErrorReport>prompt</ErrorReport>
|
||||||
|
<WarningLevel>4</WarningLevel>
|
||||||
|
<LangVersion>7.3</LangVersion>
|
||||||
|
<Prefer32Bit>false</Prefer32Bit>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Gold|AnyCPU'">
|
||||||
|
<OutputPath>bin\Gold\</OutputPath>
|
||||||
|
<DefineConstants>TRACE;STEAMWORKS_WIN;STEAMWORKS_X64</DefineConstants>
|
||||||
|
<Optimize>true</Optimize>
|
||||||
|
<DebugType>pdbonly</DebugType>
|
||||||
|
<PlatformTarget>x64</PlatformTarget>
|
||||||
|
<LangVersion>7.3</LangVersion>
|
||||||
|
<ErrorReport>prompt</ErrorReport>
|
||||||
|
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
|
||||||
|
<Prefer32Bit>false</Prefer32Bit>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup>
|
||||||
|
<ApplicationIcon>Resources\GameIcon00.ico</ApplicationIcon>
|
||||||
|
</PropertyGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<Reference Include="System" />
|
||||||
|
<Reference Include="System.Core" />
|
||||||
|
<Reference Include="System.IO.Compression" />
|
||||||
|
<Reference Include="System.IO.Compression.FileSystem" />
|
||||||
|
<Reference Include="System.Numerics" />
|
||||||
|
<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.Windows.Forms" />
|
||||||
|
<Reference Include="System.Xml" />
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<Compile Include="Controls\BasicSettings.cs">
|
||||||
|
<SubType>UserControl</SubType>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="Controls\BasicSettings.Designer.cs">
|
||||||
|
<DependentUpon>BasicSettings.cs</DependentUpon>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="Controls\BriefingSettings.cs">
|
||||||
|
<SubType>UserControl</SubType>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="Controls\BriefingSettings.Designer.cs">
|
||||||
|
<DependentUpon>BriefingSettings.cs</DependentUpon>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="Controls\ImageTooltip.cs">
|
||||||
|
<SubType>Component</SubType>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="Controls\ImageTooltip.Designer.cs">
|
||||||
|
<DependentUpon>ImageTooltip.cs</DependentUpon>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="Controls\MapPanel.cs">
|
||||||
|
<SubType>Component</SubType>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="Controls\MapPanel.Designer.cs">
|
||||||
|
<DependentUpon>MapPanel.cs</DependentUpon>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="Controls\MenuButton.cs">
|
||||||
|
<SubType>Component</SubType>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="Controls\MenuButton.Designer.cs">
|
||||||
|
<DependentUpon>MenuButton.cs</DependentUpon>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="Controls\PropertiesComboBox.cs">
|
||||||
|
<SubType>Component</SubType>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="Controls\PropertiesComboBox.Designer.cs">
|
||||||
|
<DependentUpon>PropertiesComboBox.cs</DependentUpon>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="Controls\TerrainProperties.cs">
|
||||||
|
<SubType>UserControl</SubType>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="Controls\TerrainProperties.Designer.cs">
|
||||||
|
<DependentUpon>TerrainProperties.cs</DependentUpon>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="Controls\ObjectProperties.cs">
|
||||||
|
<SubType>UserControl</SubType>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="Controls\ObjectProperties.Designer.cs">
|
||||||
|
<DependentUpon>ObjectProperties.cs</DependentUpon>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="Controls\PlayerSettings.cs">
|
||||||
|
<SubType>UserControl</SubType>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="Controls\PlayerSettings.Designer.cs">
|
||||||
|
<DependentUpon>PlayerSettings.cs</DependentUpon>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="Controls\TypeComboBox.cs">
|
||||||
|
<SubType>Component</SubType>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="Controls\TypeComboBox.Designer.cs">
|
||||||
|
<DependentUpon>TypeComboBox.cs</DependentUpon>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="Dialogs\ErrorMessageBox.cs">
|
||||||
|
<SubType>Form</SubType>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="Dialogs\ErrorMessageBox.Designer.cs">
|
||||||
|
<DependentUpon>ErrorMessageBox.cs</DependentUpon>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="Dialogs\InviteMessageBox.cs">
|
||||||
|
<SubType>Form</SubType>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="Dialogs\InviteMessageBox.Designer.cs">
|
||||||
|
<DependentUpon>InviteMessageBox.cs</DependentUpon>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="Dialogs\MapSettingsDialog.cs">
|
||||||
|
<SubType>Form</SubType>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="Dialogs\MapSettingsDialog.Designer.cs">
|
||||||
|
<DependentUpon>MapSettingsDialog.cs</DependentUpon>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="Dialogs\NewMapDialog.cs">
|
||||||
|
<SubType>Form</SubType>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="Dialogs\NewMapDialog.Designer.cs">
|
||||||
|
<DependentUpon>NewMapDialog.cs</DependentUpon>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="Dialogs\SteamDialog.cs">
|
||||||
|
<SubType>Form</SubType>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="Dialogs\SteamDialog.Designer.cs">
|
||||||
|
<DependentUpon>SteamDialog.cs</DependentUpon>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="Dialogs\TriggersDialog.cs">
|
||||||
|
<SubType>Form</SubType>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="Dialogs\TriggersDialog.Designer.cs">
|
||||||
|
<DependentUpon>TriggersDialog.cs</DependentUpon>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="Dialogs\TeamTypesDialog.cs">
|
||||||
|
<SubType>Form</SubType>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="Dialogs\TeamTypesDialog.Designer.cs">
|
||||||
|
<DependentUpon>TeamTypesDialog.cs</DependentUpon>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="Event\RenderEventArgs.cs" />
|
||||||
|
<Compile Include="Event\UndoRedoEventArgs.cs" />
|
||||||
|
<Compile Include="Globals.cs" />
|
||||||
|
<Compile Include="Interface\IBrowsableType.cs" />
|
||||||
|
<Compile Include="Interface\ICellOccupier.cs" />
|
||||||
|
<Compile Include="Interface\ICellOverlapper.cs" />
|
||||||
|
<Compile Include="Interface\IGamePlugin.cs" />
|
||||||
|
<Compile Include="Interface\INamedType.cs" />
|
||||||
|
<Compile Include="Interface\ITechnoType.cs" />
|
||||||
|
<Compile Include="Interface\ITool.cs" />
|
||||||
|
<Compile Include="Interface\IWidget.cs" />
|
||||||
|
<Compile Include="MainForm.cs">
|
||||||
|
<SubType>Form</SubType>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="MainForm.Designer.cs">
|
||||||
|
<DependentUpon>MainForm.cs</DependentUpon>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="Model\BasicSection.cs" />
|
||||||
|
<Compile Include="Model\BriefingSection.cs" />
|
||||||
|
<Compile Include="Model\Building.cs" />
|
||||||
|
<Compile Include="Model\CellGrid.cs" />
|
||||||
|
<Compile Include="Model\CellMetrics.cs" />
|
||||||
|
<Compile Include="Model\CellTrigger.cs" />
|
||||||
|
<Compile Include="Model\DirectionType.cs" />
|
||||||
|
<Compile Include="Model\House.cs" />
|
||||||
|
<Compile Include="Model\HouseType.cs" />
|
||||||
|
<Compile Include="Model\BuildingType.cs" />
|
||||||
|
<Compile Include="Model\Infantry.cs" />
|
||||||
|
<Compile Include="Model\Map.cs" />
|
||||||
|
<Compile Include="Model\MapSection.cs" />
|
||||||
|
<Compile Include="Model\OccupierSet.cs" />
|
||||||
|
<Compile Include="Model\OverlapperSet.cs" />
|
||||||
|
<Compile Include="Model\Overlay.cs" />
|
||||||
|
<Compile Include="Model\OverlayType.cs" />
|
||||||
|
<Compile Include="Model\Smudge.cs" />
|
||||||
|
<Compile Include="Model\SmudgeType.cs" />
|
||||||
|
<Compile Include="Model\SteamSection.cs" />
|
||||||
|
<Compile Include="Model\TeamType.cs" />
|
||||||
|
<Compile Include="Model\Template.cs" />
|
||||||
|
<Compile Include="Model\TemplateType.cs" />
|
||||||
|
<Compile Include="Model\Terrain.cs" />
|
||||||
|
<Compile Include="Model\TerrainType.cs" />
|
||||||
|
<Compile Include="Model\TheaterType.cs" />
|
||||||
|
<Compile Include="Model\Trigger.cs" />
|
||||||
|
<Compile Include="Model\InfantryType.cs" />
|
||||||
|
<Compile Include="Model\TypeItem.cs" />
|
||||||
|
<Compile Include="Model\Unit.cs" />
|
||||||
|
<Compile Include="Model\UnitType.cs" />
|
||||||
|
<Compile Include="Model\Waypoint.cs" />
|
||||||
|
<Compile Include="Program.cs" />
|
||||||
|
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||||
|
<Compile Include="RedAlert\ActionDataTypes.cs" />
|
||||||
|
<Compile Include="RedAlert\ActionTypes.cs" />
|
||||||
|
<Compile Include="RedAlert\BasicSection.cs" />
|
||||||
|
<Compile Include="RedAlert\BuildingTypes.cs" />
|
||||||
|
<Compile Include="RedAlert\Constants.cs" />
|
||||||
|
<Compile Include="RedAlert\DirectionTypes.cs" />
|
||||||
|
<Compile Include="RedAlert\EventTypes.cs" />
|
||||||
|
<Compile Include="RedAlert\GamePlugin.cs" />
|
||||||
|
<Compile Include="RedAlert\House.cs" />
|
||||||
|
<Compile Include="RedAlert\HouseTypes.cs" />
|
||||||
|
<Compile Include="RedAlert\InfantryTypes.cs" />
|
||||||
|
<Compile Include="RedAlert\MissionTypes.cs" />
|
||||||
|
<Compile Include="RedAlert\OverlayTypes.cs" />
|
||||||
|
<Compile Include="RedAlert\SmudgeTypes.cs" />
|
||||||
|
<Compile Include="RedAlert\TeamMissionTypes.cs" />
|
||||||
|
<Compile Include="RedAlert\TemplateTypes.cs" />
|
||||||
|
<Compile Include="RedAlert\TerrainTypes.cs" />
|
||||||
|
<Compile Include="RedAlert\TheaterTypes.cs" />
|
||||||
|
<Compile Include="RedAlert\UnitTypes.cs" />
|
||||||
|
<Compile Include="Render\MapRenderer.cs" />
|
||||||
|
<Compile Include="Steamworks.NET\autogen\isteamapplist.cs" />
|
||||||
|
<Compile Include="Steamworks.NET\autogen\isteamapps.cs" />
|
||||||
|
<Compile Include="Steamworks.NET\autogen\isteamclient.cs" />
|
||||||
|
<Compile Include="Steamworks.NET\autogen\isteamcontroller.cs" />
|
||||||
|
<Compile Include="Steamworks.NET\autogen\isteamfriends.cs" />
|
||||||
|
<Compile Include="Steamworks.NET\autogen\isteamgameserver.cs" />
|
||||||
|
<Compile Include="Steamworks.NET\autogen\isteamgameserverapps.cs" />
|
||||||
|
<Compile Include="Steamworks.NET\autogen\isteamgameserverclient.cs" />
|
||||||
|
<Compile Include="Steamworks.NET\autogen\isteamgameserverhttp.cs" />
|
||||||
|
<Compile Include="Steamworks.NET\autogen\isteamgameserverinventory.cs" />
|
||||||
|
<Compile Include="Steamworks.NET\autogen\isteamgameservernetworking.cs" />
|
||||||
|
<Compile Include="Steamworks.NET\autogen\isteamgameserverstats.cs" />
|
||||||
|
<Compile Include="Steamworks.NET\autogen\isteamgameserverugc.cs" />
|
||||||
|
<Compile Include="Steamworks.NET\autogen\isteamgameserverutils.cs" />
|
||||||
|
<Compile Include="Steamworks.NET\autogen\isteamhtmlsurface.cs" />
|
||||||
|
<Compile Include="Steamworks.NET\autogen\isteamhttp.cs" />
|
||||||
|
<Compile Include="Steamworks.NET\autogen\isteaminput.cs" />
|
||||||
|
<Compile Include="Steamworks.NET\autogen\isteaminventory.cs" />
|
||||||
|
<Compile Include="Steamworks.NET\autogen\isteammatchmaking.cs" />
|
||||||
|
<Compile Include="Steamworks.NET\autogen\isteammusic.cs" />
|
||||||
|
<Compile Include="Steamworks.NET\autogen\isteammusicremote.cs" />
|
||||||
|
<Compile Include="Steamworks.NET\autogen\isteamnetworking.cs" />
|
||||||
|
<Compile Include="Steamworks.NET\autogen\isteamparentalsettings.cs" />
|
||||||
|
<Compile Include="Steamworks.NET\autogen\isteamremoteplay.cs" />
|
||||||
|
<Compile Include="Steamworks.NET\autogen\isteamremotestorage.cs" />
|
||||||
|
<Compile Include="Steamworks.NET\autogen\isteamscreenshots.cs" />
|
||||||
|
<Compile Include="Steamworks.NET\autogen\isteamugc.cs" />
|
||||||
|
<Compile Include="Steamworks.NET\autogen\isteamunifiedmessages.cs" />
|
||||||
|
<Compile Include="Steamworks.NET\autogen\isteamuser.cs" />
|
||||||
|
<Compile Include="Steamworks.NET\autogen\isteamuserstats.cs" />
|
||||||
|
<Compile Include="Steamworks.NET\autogen\isteamutils.cs" />
|
||||||
|
<Compile Include="Steamworks.NET\autogen\isteamvideo.cs" />
|
||||||
|
<Compile Include="Steamworks.NET\autogen\NativeMethods.cs" />
|
||||||
|
<Compile Include="Steamworks.NET\autogen\SteamCallbacks.cs" />
|
||||||
|
<Compile Include="Steamworks.NET\autogen\SteamConstants.cs" />
|
||||||
|
<Compile Include="Steamworks.NET\autogen\SteamEnums.cs" />
|
||||||
|
<Compile Include="Steamworks.NET\autogen\SteamStructs.cs" />
|
||||||
|
<Compile Include="Steamworks.NET\CallbackDispatcher.cs" />
|
||||||
|
<Compile Include="Steamworks.NET\CallbackIdentity.cs" />
|
||||||
|
<Compile Include="Steamworks.NET\InteropHelp.cs" />
|
||||||
|
<Compile Include="Steamworks.NET\ISteamMatchmakingResponses.cs" />
|
||||||
|
<Compile Include="Steamworks.NET\Packsize.cs" />
|
||||||
|
<Compile Include="Steamworks.NET\Steam.cs" />
|
||||||
|
<Compile Include="Steamworks.NET\types\MatchmakingTypes\gameserveritem_t.cs" />
|
||||||
|
<Compile Include="Steamworks.NET\types\MatchmakingTypes\servernetadr_t.cs" />
|
||||||
|
<Compile Include="Steamworks.NET\types\SteamClientPublic\CGameID.cs" />
|
||||||
|
<Compile Include="Steamworks.NET\types\SteamClientPublic\CSteamID.cs" />
|
||||||
|
<Compile Include="Steamworks.NET\types\SteamClientPublic\HAuthTicket.cs" />
|
||||||
|
<Compile Include="Steamworks.NET\types\SteamClient\SteamAPIWarningMessageHook_t.cs" />
|
||||||
|
<Compile Include="Steamworks.NET\types\SteamClient\SteamAPI_CheckCallbackRegistered_t.cs" />
|
||||||
|
<Compile Include="Steamworks.NET\types\SteamClient\SteamAPI_PostAPIResultInProcess_t.cs" />
|
||||||
|
<Compile Include="Steamworks.NET\types\SteamController\ControllerActionSetHandle_t.cs" />
|
||||||
|
<Compile Include="Steamworks.NET\types\SteamController\ControllerAnalogActionHandle_t.cs" />
|
||||||
|
<Compile Include="Steamworks.NET\types\SteamController\ControllerDigitalActionHandle_t.cs" />
|
||||||
|
<Compile Include="Steamworks.NET\types\SteamController\ControllerHandle_t.cs" />
|
||||||
|
<Compile Include="Steamworks.NET\types\SteamFriends\FriendsGroupID_t.cs" />
|
||||||
|
<Compile Include="Steamworks.NET\types\SteamHTMLSurface\HHTMLBrowser.cs" />
|
||||||
|
<Compile Include="Steamworks.NET\types\SteamHTTP\HTTPCookieContainerHandle.cs" />
|
||||||
|
<Compile Include="Steamworks.NET\types\SteamHTTP\HTTPRequestHandle.cs" />
|
||||||
|
<Compile Include="Steamworks.NET\types\SteamInput\InputActionSetHandle_t.cs" />
|
||||||
|
<Compile Include="Steamworks.NET\types\SteamInput\InputAnalogActionHandle_t.cs" />
|
||||||
|
<Compile Include="Steamworks.NET\types\SteamInput\InputDigitalActionHandle_t.cs" />
|
||||||
|
<Compile Include="Steamworks.NET\types\SteamInput\InputHandle_t.cs" />
|
||||||
|
<Compile Include="Steamworks.NET\types\SteamInventory\SteamInventoryResult_t.cs" />
|
||||||
|
<Compile Include="Steamworks.NET\types\SteamInventory\SteamInventoryUpdateHandle_t.cs" />
|
||||||
|
<Compile Include="Steamworks.NET\types\SteamInventory\SteamItemDef_t.cs" />
|
||||||
|
<Compile Include="Steamworks.NET\types\SteamInventory\SteamItemInstanceID_t.cs" />
|
||||||
|
<Compile Include="Steamworks.NET\types\SteamMatchmaking\HServerListRequest.cs" />
|
||||||
|
<Compile Include="Steamworks.NET\types\SteamMatchmaking\HServerQuery.cs" />
|
||||||
|
<Compile Include="Steamworks.NET\types\SteamNetworking\SNetListenSocket_t.cs" />
|
||||||
|
<Compile Include="Steamworks.NET\types\SteamNetworking\SNetSocket_t.cs" />
|
||||||
|
<Compile Include="Steamworks.NET\types\SteamRemoteStorage\PublishedFileId_t.cs" />
|
||||||
|
<Compile Include="Steamworks.NET\types\SteamRemoteStorage\PublishedFileUpdateHandle_t.cs" />
|
||||||
|
<Compile Include="Steamworks.NET\types\SteamRemoteStorage\UGCFileWriteStreamHandle_t.cs" />
|
||||||
|
<Compile Include="Steamworks.NET\types\SteamRemoteStorage\UGCHandle_t.cs" />
|
||||||
|
<Compile Include="Steamworks.NET\types\SteamScreenshots\ScreenshotHandle.cs" />
|
||||||
|
<Compile Include="Steamworks.NET\types\SteamTypes\AccountID_t.cs" />
|
||||||
|
<Compile Include="Steamworks.NET\types\SteamTypes\AppId_t.cs" />
|
||||||
|
<Compile Include="Steamworks.NET\types\SteamTypes\DepotId_t.cs" />
|
||||||
|
<Compile Include="Steamworks.NET\types\SteamTypes\ManifestId_t.cs" />
|
||||||
|
<Compile Include="Steamworks.NET\types\SteamTypes\PartyBeaconID_t.cs" />
|
||||||
|
<Compile Include="Steamworks.NET\types\SteamTypes\RTime32.cs" />
|
||||||
|
<Compile Include="Steamworks.NET\types\SteamTypes\SiteId_t.cs" />
|
||||||
|
<Compile Include="Steamworks.NET\types\SteamTypes\SteamAPICall_t.cs" />
|
||||||
|
<Compile Include="Steamworks.NET\types\SteamUGC\UGCQueryHandle_t.cs" />
|
||||||
|
<Compile Include="Steamworks.NET\types\SteamUGC\UGCUpdateHandle_t.cs" />
|
||||||
|
<Compile Include="Steamworks.NET\types\SteamUnifiedMessages\ClientUnifiedMessageHandle.cs" />
|
||||||
|
<Compile Include="Steamworks.NET\types\SteamUserStats\SteamLeaderboardEntries_t.cs" />
|
||||||
|
<Compile Include="Steamworks.NET\types\SteamUserStats\SteamLeaderboard_t.cs" />
|
||||||
|
<Compile Include="Steamworks.NET\types\Steam_api_common\HSteamPipe.cs" />
|
||||||
|
<Compile Include="Steamworks.NET\types\Steam_api_common\HSteamUser.cs" />
|
||||||
|
<Compile Include="TiberianDawn\ActionTypes.cs" />
|
||||||
|
<Compile Include="TiberianDawn\BasicSection.cs" />
|
||||||
|
<Compile Include="TiberianDawn\Constants.cs" />
|
||||||
|
<Compile Include="TiberianDawn\DirectionTypes.cs" />
|
||||||
|
<Compile Include="TiberianDawn\EventTypes.cs" />
|
||||||
|
<Compile Include="TiberianDawn\GamePlugin.cs" />
|
||||||
|
<Compile Include="TiberianDawn\House.cs" />
|
||||||
|
<Compile Include="TiberianDawn\HouseTypes.cs" />
|
||||||
|
<Compile Include="TiberianDawn\BuildingTypes.cs" />
|
||||||
|
<Compile Include="TiberianDawn\MissionTypes.cs" />
|
||||||
|
<Compile Include="TiberianDawn\OverlayTypes.cs" />
|
||||||
|
<Compile Include="TiberianDawn\SmudgeTypes.cs" />
|
||||||
|
<Compile Include="TiberianDawn\TeamMissionTypes.cs" />
|
||||||
|
<Compile Include="TiberianDawn\TemplateTypes.cs" />
|
||||||
|
<Compile Include="TiberianDawn\TerrainTypes.cs" />
|
||||||
|
<Compile Include="TiberianDawn\TheaterTypes.cs" />
|
||||||
|
<Compile Include="TiberianDawn\InfantryTypes.cs" />
|
||||||
|
<Compile Include="TiberianDawn\UnitTypes.cs" />
|
||||||
|
<Compile Include="Tools\BuildingTool.cs" />
|
||||||
|
<Compile Include="Tools\Dialogs\ResourcesToolDialog.cs">
|
||||||
|
<SubType>Form</SubType>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="Tools\Dialogs\ResourcesToolDialog.Designer.cs">
|
||||||
|
<DependentUpon>ResourcesToolDialog.cs</DependentUpon>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="Tools\Dialogs\ObjectToolDialog.cs">
|
||||||
|
<SubType>Form</SubType>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="Tools\Dialogs\ObjectToolDialog.Designer.cs">
|
||||||
|
<DependentUpon>ObjectToolDialog.cs</DependentUpon>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="Tools\Dialogs\GenericToolDialog.cs">
|
||||||
|
<SubType>Form</SubType>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="Tools\Dialogs\GenericToolDialog.Designer.cs">
|
||||||
|
<DependentUpon>GenericToolDialog.cs</DependentUpon>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="Tools\Dialogs\TerrainToolDialog.cs">
|
||||||
|
<SubType>Form</SubType>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="Tools\Dialogs\TerrainToolDialog.Designer.cs">
|
||||||
|
<DependentUpon>TerrainToolDialog.cs</DependentUpon>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="Tools\Dialogs\TemplateToolDialog.cs">
|
||||||
|
<SubType>Form</SubType>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="Tools\Dialogs\TemplateToolDialog.Designer.cs">
|
||||||
|
<DependentUpon>TemplateToolDialog.cs</DependentUpon>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="Tools\Dialogs\CellTriggersToolDialog.cs">
|
||||||
|
<SubType>Form</SubType>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="Tools\Dialogs\CellTriggersToolDialog.Designer.cs">
|
||||||
|
<DependentUpon>CellTriggersToolDialog.cs</DependentUpon>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="Tools\Dialogs\WaypointsToolDialog.cs">
|
||||||
|
<SubType>Form</SubType>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="Tools\Dialogs\WaypointsToolDialog.Designer.cs">
|
||||||
|
<DependentUpon>WaypointsToolDialog.cs</DependentUpon>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="Tools\InfantryTool.cs" />
|
||||||
|
<Compile Include="Tools\OverlaysTool.cs" />
|
||||||
|
<Compile Include="Tools\ResourcesTool.cs" />
|
||||||
|
<Compile Include="Tools\SmudgeTool.cs" />
|
||||||
|
<Compile Include="Tools\TemplateTool.cs" />
|
||||||
|
<Compile Include="Tools\TerrainTool.cs" />
|
||||||
|
<Compile Include="Tools\UnitTool.cs" />
|
||||||
|
<Compile Include="Tools\ViewTool.cs" />
|
||||||
|
<Compile Include="Tools\WallsTool.cs" />
|
||||||
|
<Compile Include="Tools\CellTriggersTool.cs" />
|
||||||
|
<Compile Include="Tools\WaypointsTool.cs" />
|
||||||
|
<Compile Include="Utility\CRC.cs" />
|
||||||
|
<Compile Include="Utility\ExtensionMethods.cs" />
|
||||||
|
<Compile Include="Utility\GameTextManager.cs" />
|
||||||
|
<Compile Include="Utility\INI.cs" />
|
||||||
|
<Compile Include="Utility\Megafile.cs" />
|
||||||
|
<Compile Include="Utility\MegafileBuilder.cs" />
|
||||||
|
<Compile Include="Utility\MegafileManager.cs" />
|
||||||
|
<Compile Include="Utility\MRU.cs" />
|
||||||
|
<Compile Include="Utility\PropertyTracker.cs" />
|
||||||
|
<Compile Include="Utility\SteamworksUGC.cs" />
|
||||||
|
<Compile Include="Utility\TeamColor.cs" />
|
||||||
|
<Compile Include="Utility\TeamColorManager.cs" />
|
||||||
|
<Compile Include="Utility\TextureManager.cs" />
|
||||||
|
<Compile Include="Utility\TGASharpLib.cs" />
|
||||||
|
<Compile Include="Utility\Tileset.cs" />
|
||||||
|
<Compile Include="Utility\TilesetManager.cs" />
|
||||||
|
<Compile Include="Utility\UndoRedoList.cs" />
|
||||||
|
<Compile Include="Utility\WWCompression.cs" />
|
||||||
|
<Compile Include="Widgets\NavigationWidget.cs" />
|
||||||
|
<EmbeddedResource Include="Controls\BasicSettings.resx">
|
||||||
|
<DependentUpon>BasicSettings.cs</DependentUpon>
|
||||||
|
</EmbeddedResource>
|
||||||
|
<EmbeddedResource Include="Controls\BriefingSettings.resx">
|
||||||
|
<DependentUpon>BriefingSettings.cs</DependentUpon>
|
||||||
|
</EmbeddedResource>
|
||||||
|
<EmbeddedResource Include="Controls\MapPanel.resx">
|
||||||
|
<DependentUpon>MapPanel.cs</DependentUpon>
|
||||||
|
</EmbeddedResource>
|
||||||
|
<EmbeddedResource Include="Controls\TerrainProperties.resx">
|
||||||
|
<DependentUpon>TerrainProperties.cs</DependentUpon>
|
||||||
|
</EmbeddedResource>
|
||||||
|
<EmbeddedResource Include="Controls\ObjectProperties.resx">
|
||||||
|
<DependentUpon>ObjectProperties.cs</DependentUpon>
|
||||||
|
</EmbeddedResource>
|
||||||
|
<EmbeddedResource Include="Controls\PlayerSettings.resx">
|
||||||
|
<DependentUpon>PlayerSettings.cs</DependentUpon>
|
||||||
|
</EmbeddedResource>
|
||||||
|
<EmbeddedResource Include="Dialogs\ErrorMessageBox.resx">
|
||||||
|
<DependentUpon>ErrorMessageBox.cs</DependentUpon>
|
||||||
|
</EmbeddedResource>
|
||||||
|
<EmbeddedResource Include="Dialogs\InviteMessageBox.resx">
|
||||||
|
<DependentUpon>InviteMessageBox.cs</DependentUpon>
|
||||||
|
</EmbeddedResource>
|
||||||
|
<EmbeddedResource Include="Dialogs\MapSettingsDialog.resx">
|
||||||
|
<DependentUpon>MapSettingsDialog.cs</DependentUpon>
|
||||||
|
</EmbeddedResource>
|
||||||
|
<EmbeddedResource Include="Dialogs\NewMapDialog.resx">
|
||||||
|
<DependentUpon>NewMapDialog.cs</DependentUpon>
|
||||||
|
</EmbeddedResource>
|
||||||
|
<EmbeddedResource Include="Dialogs\SteamDialog.resx">
|
||||||
|
<DependentUpon>SteamDialog.cs</DependentUpon>
|
||||||
|
</EmbeddedResource>
|
||||||
|
<EmbeddedResource Include="Dialogs\TriggersDialog.resx">
|
||||||
|
<DependentUpon>TriggersDialog.cs</DependentUpon>
|
||||||
|
</EmbeddedResource>
|
||||||
|
<EmbeddedResource Include="Dialogs\TeamTypesDialog.resx">
|
||||||
|
<DependentUpon>TeamTypesDialog.cs</DependentUpon>
|
||||||
|
</EmbeddedResource>
|
||||||
|
<EmbeddedResource Include="MainForm.resx">
|
||||||
|
<DependentUpon>MainForm.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>
|
||||||
|
<EmbeddedResource Include="Tools\Dialogs\ResourcesToolDialog.resx">
|
||||||
|
<DependentUpon>ResourcesToolDialog.cs</DependentUpon>
|
||||||
|
</EmbeddedResource>
|
||||||
|
<EmbeddedResource Include="Tools\Dialogs\ObjectToolDialog.resx">
|
||||||
|
<DependentUpon>ObjectToolDialog.cs</DependentUpon>
|
||||||
|
</EmbeddedResource>
|
||||||
|
<EmbeddedResource Include="Tools\Dialogs\GenericToolDialog.resx">
|
||||||
|
<DependentUpon>GenericToolDialog.cs</DependentUpon>
|
||||||
|
</EmbeddedResource>
|
||||||
|
<EmbeddedResource Include="Tools\Dialogs\TerrainToolDialog.resx">
|
||||||
|
<DependentUpon>TerrainToolDialog.cs</DependentUpon>
|
||||||
|
</EmbeddedResource>
|
||||||
|
<EmbeddedResource Include="Tools\Dialogs\TemplateToolDialog.resx">
|
||||||
|
<DependentUpon>TemplateToolDialog.cs</DependentUpon>
|
||||||
|
</EmbeddedResource>
|
||||||
|
<EmbeddedResource Include="Tools\Dialogs\CellTriggersToolDialog.resx">
|
||||||
|
<DependentUpon>CellTriggersToolDialog.cs</DependentUpon>
|
||||||
|
</EmbeddedResource>
|
||||||
|
<EmbeddedResource Include="Tools\Dialogs\WaypointsToolDialog.resx">
|
||||||
|
<DependentUpon>WaypointsToolDialog.cs</DependentUpon>
|
||||||
|
</EmbeddedResource>
|
||||||
|
<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>
|
||||||
|
<EmbeddedResource Include="Resources\GameIcon00.ico" />
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<None Include="Resources\UI_CustomMissionPreviewDefault.png" />
|
||||||
|
<Content Include="Steamworks.NET\redist\steam_api.dll" />
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<PackageReference Include="Newtonsoft.Json">
|
||||||
|
<Version>12.0.3</Version>
|
||||||
|
</PackageReference>
|
||||||
|
<PackageReference Include="Pfim">
|
||||||
|
<Version>0.9.1</Version>
|
||||||
|
</PackageReference>
|
||||||
|
<PackageReference Include="System.ValueTuple">
|
||||||
|
<Version>4.5.0</Version>
|
||||||
|
</PackageReference>
|
||||||
|
</ItemGroup>
|
||||||
|
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||||
|
</Project>
|
|
@ -0,0 +1,518 @@
|
||||||
|
//
|
||||||
|
// Copyright 2020 Electronic Arts Inc.
|
||||||
|
//
|
||||||
|
// The Command & Conquer Map Editor and corresponding source code is free
|
||||||
|
// software: you can redistribute it and/or modify it under the terms of
|
||||||
|
// the GNU General Public License as published by the Free Software Foundation,
|
||||||
|
// either version 3 of the License, or (at your option) any later version.
|
||||||
|
|
||||||
|
// The Command & Conquer Map Editor and corresponding source code is distributed
|
||||||
|
// in the hope that it will be useful, but with permitted additional restrictions
|
||||||
|
// under Section 7 of the GPL. See the GNU General Public License in LICENSE.TXT
|
||||||
|
// distributed with this program. You should have received a copy of the
|
||||||
|
// GNU General Public License along with permitted additional restrictions
|
||||||
|
// with this program. If not, see https://github.com/electronicarts/CnC_Remastered_Collection
|
||||||
|
namespace MobiusEditor.Controls
|
||||||
|
{
|
||||||
|
partial class BasicSettings
|
||||||
|
{
|
||||||
|
/// <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 Component 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.tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel();
|
||||||
|
this.label10 = new System.Windows.Forms.Label();
|
||||||
|
this.loseComboBox = new System.Windows.Forms.ComboBox();
|
||||||
|
this.isSinglePlayerCheckBox = new System.Windows.Forms.CheckBox();
|
||||||
|
this.win4ComboBox = new System.Windows.Forms.ComboBox();
|
||||||
|
this.win3ComboBox = new System.Windows.Forms.ComboBox();
|
||||||
|
this.win2ComboBox = new System.Windows.Forms.ComboBox();
|
||||||
|
this.winComboBox = new System.Windows.Forms.ComboBox();
|
||||||
|
this.actionComboBox = new System.Windows.Forms.ComboBox();
|
||||||
|
this.briefComboBox = new System.Windows.Forms.ComboBox();
|
||||||
|
this.introComboBox = new System.Windows.Forms.ComboBox();
|
||||||
|
this.win4Label = new System.Windows.Forms.Label();
|
||||||
|
this.win3Label = new System.Windows.Forms.Label();
|
||||||
|
this.win2Label = new System.Windows.Forms.Label();
|
||||||
|
this.label9 = new System.Windows.Forms.Label();
|
||||||
|
this.label8 = new System.Windows.Forms.Label();
|
||||||
|
this.label7 = new System.Windows.Forms.Label();
|
||||||
|
this.label1 = new System.Windows.Forms.Label();
|
||||||
|
this.buildLevelLabel = 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.label5 = new System.Windows.Forms.Label();
|
||||||
|
this.nameTxt = new System.Windows.Forms.TextBox();
|
||||||
|
this.playerComboBox = new System.Windows.Forms.ComboBox();
|
||||||
|
this.buidLevelNud = new System.Windows.Forms.NumericUpDown();
|
||||||
|
this.percentNud = new System.Windows.Forms.NumericUpDown();
|
||||||
|
this.carryOverMoneyNud = new System.Windows.Forms.NumericUpDown();
|
||||||
|
this.label6 = new System.Windows.Forms.Label();
|
||||||
|
this.authorTxt = new System.Windows.Forms.TextBox();
|
||||||
|
this.baseLabel = new System.Windows.Forms.Label();
|
||||||
|
this.baseComboBox = new System.Windows.Forms.ComboBox();
|
||||||
|
this.tableLayoutPanel1.SuspendLayout();
|
||||||
|
((System.ComponentModel.ISupportInitialize)(this.buidLevelNud)).BeginInit();
|
||||||
|
((System.ComponentModel.ISupportInitialize)(this.percentNud)).BeginInit();
|
||||||
|
((System.ComponentModel.ISupportInitialize)(this.carryOverMoneyNud)).BeginInit();
|
||||||
|
this.SuspendLayout();
|
||||||
|
//
|
||||||
|
// tableLayoutPanel1
|
||||||
|
//
|
||||||
|
this.tableLayoutPanel1.AutoSize = true;
|
||||||
|
this.tableLayoutPanel1.ColumnCount = 2;
|
||||||
|
this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle());
|
||||||
|
this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100F));
|
||||||
|
this.tableLayoutPanel1.Controls.Add(this.label10, 0, 15);
|
||||||
|
this.tableLayoutPanel1.Controls.Add(this.loseComboBox, 1, 15);
|
||||||
|
this.tableLayoutPanel1.Controls.Add(this.isSinglePlayerCheckBox, 1, 16);
|
||||||
|
this.tableLayoutPanel1.Controls.Add(this.win4ComboBox, 1, 14);
|
||||||
|
this.tableLayoutPanel1.Controls.Add(this.win3ComboBox, 1, 13);
|
||||||
|
this.tableLayoutPanel1.Controls.Add(this.win2ComboBox, 1, 12);
|
||||||
|
this.tableLayoutPanel1.Controls.Add(this.winComboBox, 1, 11);
|
||||||
|
this.tableLayoutPanel1.Controls.Add(this.actionComboBox, 1, 10);
|
||||||
|
this.tableLayoutPanel1.Controls.Add(this.briefComboBox, 1, 9);
|
||||||
|
this.tableLayoutPanel1.Controls.Add(this.introComboBox, 1, 8);
|
||||||
|
this.tableLayoutPanel1.Controls.Add(this.win4Label, 0, 14);
|
||||||
|
this.tableLayoutPanel1.Controls.Add(this.win3Label, 0, 13);
|
||||||
|
this.tableLayoutPanel1.Controls.Add(this.win2Label, 0, 12);
|
||||||
|
this.tableLayoutPanel1.Controls.Add(this.label9, 0, 11);
|
||||||
|
this.tableLayoutPanel1.Controls.Add(this.label8, 0, 10);
|
||||||
|
this.tableLayoutPanel1.Controls.Add(this.label7, 0, 9);
|
||||||
|
this.tableLayoutPanel1.Controls.Add(this.label1, 0, 8);
|
||||||
|
this.tableLayoutPanel1.Controls.Add(this.buildLevelLabel, 0, 0);
|
||||||
|
this.tableLayoutPanel1.Controls.Add(this.label2, 0, 1);
|
||||||
|
this.tableLayoutPanel1.Controls.Add(this.label3, 0, 2);
|
||||||
|
this.tableLayoutPanel1.Controls.Add(this.label4, 0, 3);
|
||||||
|
this.tableLayoutPanel1.Controls.Add(this.label5, 0, 4);
|
||||||
|
this.tableLayoutPanel1.Controls.Add(this.nameTxt, 1, 2);
|
||||||
|
this.tableLayoutPanel1.Controls.Add(this.playerComboBox, 1, 4);
|
||||||
|
this.tableLayoutPanel1.Controls.Add(this.buidLevelNud, 1, 0);
|
||||||
|
this.tableLayoutPanel1.Controls.Add(this.percentNud, 1, 3);
|
||||||
|
this.tableLayoutPanel1.Controls.Add(this.carryOverMoneyNud, 1, 1);
|
||||||
|
this.tableLayoutPanel1.Controls.Add(this.label6, 0, 5);
|
||||||
|
this.tableLayoutPanel1.Controls.Add(this.authorTxt, 1, 5);
|
||||||
|
this.tableLayoutPanel1.Controls.Add(this.baseLabel, 0, 6);
|
||||||
|
this.tableLayoutPanel1.Controls.Add(this.baseComboBox, 1, 6);
|
||||||
|
this.tableLayoutPanel1.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||||
|
this.tableLayoutPanel1.Location = new System.Drawing.Point(0, 0);
|
||||||
|
this.tableLayoutPanel1.Name = "tableLayoutPanel1";
|
||||||
|
this.tableLayoutPanel1.RowCount = 17;
|
||||||
|
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle());
|
||||||
|
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle());
|
||||||
|
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle());
|
||||||
|
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle());
|
||||||
|
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle());
|
||||||
|
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle());
|
||||||
|
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle());
|
||||||
|
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle());
|
||||||
|
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle());
|
||||||
|
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle());
|
||||||
|
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle());
|
||||||
|
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle());
|
||||||
|
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle());
|
||||||
|
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle());
|
||||||
|
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle());
|
||||||
|
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle());
|
||||||
|
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100F));
|
||||||
|
this.tableLayoutPanel1.Size = new System.Drawing.Size(300, 403);
|
||||||
|
this.tableLayoutPanel1.TabIndex = 1;
|
||||||
|
//
|
||||||
|
// label10
|
||||||
|
//
|
||||||
|
this.label10.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||||
|
this.label10.Location = new System.Drawing.Point(2, 355);
|
||||||
|
this.label10.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
|
||||||
|
this.label10.Name = "label10";
|
||||||
|
this.label10.Size = new System.Drawing.Size(87, 25);
|
||||||
|
this.label10.TabIndex = 35;
|
||||||
|
this.label10.Text = "Lose";
|
||||||
|
this.label10.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
|
||||||
|
//
|
||||||
|
// loseComboBox
|
||||||
|
//
|
||||||
|
this.loseComboBox.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||||
|
this.loseComboBox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
|
||||||
|
this.loseComboBox.FormattingEnabled = true;
|
||||||
|
this.loseComboBox.Location = new System.Drawing.Point(93, 357);
|
||||||
|
this.loseComboBox.Margin = new System.Windows.Forms.Padding(2);
|
||||||
|
this.loseComboBox.Name = "loseComboBox";
|
||||||
|
this.loseComboBox.Size = new System.Drawing.Size(205, 21);
|
||||||
|
this.loseComboBox.TabIndex = 34;
|
||||||
|
//
|
||||||
|
// isSinglePlayerCheckBox
|
||||||
|
//
|
||||||
|
this.isSinglePlayerCheckBox.AutoSize = true;
|
||||||
|
this.isSinglePlayerCheckBox.Location = new System.Drawing.Point(93, 382);
|
||||||
|
this.isSinglePlayerCheckBox.Margin = new System.Windows.Forms.Padding(2);
|
||||||
|
this.isSinglePlayerCheckBox.Name = "isSinglePlayerCheckBox";
|
||||||
|
this.isSinglePlayerCheckBox.Size = new System.Drawing.Size(87, 17);
|
||||||
|
this.isSinglePlayerCheckBox.TabIndex = 32;
|
||||||
|
this.isSinglePlayerCheckBox.Text = "Single-Player";
|
||||||
|
this.isSinglePlayerCheckBox.UseVisualStyleBackColor = true;
|
||||||
|
this.isSinglePlayerCheckBox.CheckedChanged += new System.EventHandler(this.isSinglePlayerCheckBox_CheckedChanged);
|
||||||
|
//
|
||||||
|
// win4ComboBox
|
||||||
|
//
|
||||||
|
this.win4ComboBox.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||||
|
this.win4ComboBox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
|
||||||
|
this.win4ComboBox.FormattingEnabled = true;
|
||||||
|
this.win4ComboBox.Location = new System.Drawing.Point(93, 332);
|
||||||
|
this.win4ComboBox.Margin = new System.Windows.Forms.Padding(2);
|
||||||
|
this.win4ComboBox.Name = "win4ComboBox";
|
||||||
|
this.win4ComboBox.Size = new System.Drawing.Size(205, 21);
|
||||||
|
this.win4ComboBox.TabIndex = 31;
|
||||||
|
//
|
||||||
|
// win3ComboBox
|
||||||
|
//
|
||||||
|
this.win3ComboBox.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||||
|
this.win3ComboBox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
|
||||||
|
this.win3ComboBox.FormattingEnabled = true;
|
||||||
|
this.win3ComboBox.Location = new System.Drawing.Point(93, 307);
|
||||||
|
this.win3ComboBox.Margin = new System.Windows.Forms.Padding(2);
|
||||||
|
this.win3ComboBox.Name = "win3ComboBox";
|
||||||
|
this.win3ComboBox.Size = new System.Drawing.Size(205, 21);
|
||||||
|
this.win3ComboBox.TabIndex = 30;
|
||||||
|
//
|
||||||
|
// win2ComboBox
|
||||||
|
//
|
||||||
|
this.win2ComboBox.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||||
|
this.win2ComboBox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
|
||||||
|
this.win2ComboBox.FormattingEnabled = true;
|
||||||
|
this.win2ComboBox.Location = new System.Drawing.Point(93, 282);
|
||||||
|
this.win2ComboBox.Margin = new System.Windows.Forms.Padding(2);
|
||||||
|
this.win2ComboBox.Name = "win2ComboBox";
|
||||||
|
this.win2ComboBox.Size = new System.Drawing.Size(205, 21);
|
||||||
|
this.win2ComboBox.TabIndex = 29;
|
||||||
|
//
|
||||||
|
// winComboBox
|
||||||
|
//
|
||||||
|
this.winComboBox.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||||
|
this.winComboBox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
|
||||||
|
this.winComboBox.FormattingEnabled = true;
|
||||||
|
this.winComboBox.Location = new System.Drawing.Point(93, 257);
|
||||||
|
this.winComboBox.Margin = new System.Windows.Forms.Padding(2);
|
||||||
|
this.winComboBox.Name = "winComboBox";
|
||||||
|
this.winComboBox.Size = new System.Drawing.Size(205, 21);
|
||||||
|
this.winComboBox.TabIndex = 28;
|
||||||
|
//
|
||||||
|
// actionComboBox
|
||||||
|
//
|
||||||
|
this.actionComboBox.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||||
|
this.actionComboBox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
|
||||||
|
this.actionComboBox.FormattingEnabled = true;
|
||||||
|
this.actionComboBox.Location = new System.Drawing.Point(93, 232);
|
||||||
|
this.actionComboBox.Margin = new System.Windows.Forms.Padding(2);
|
||||||
|
this.actionComboBox.Name = "actionComboBox";
|
||||||
|
this.actionComboBox.Size = new System.Drawing.Size(205, 21);
|
||||||
|
this.actionComboBox.TabIndex = 27;
|
||||||
|
//
|
||||||
|
// briefComboBox
|
||||||
|
//
|
||||||
|
this.briefComboBox.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||||
|
this.briefComboBox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
|
||||||
|
this.briefComboBox.FormattingEnabled = true;
|
||||||
|
this.briefComboBox.Location = new System.Drawing.Point(93, 207);
|
||||||
|
this.briefComboBox.Margin = new System.Windows.Forms.Padding(2);
|
||||||
|
this.briefComboBox.Name = "briefComboBox";
|
||||||
|
this.briefComboBox.Size = new System.Drawing.Size(205, 21);
|
||||||
|
this.briefComboBox.TabIndex = 26;
|
||||||
|
//
|
||||||
|
// introComboBox
|
||||||
|
//
|
||||||
|
this.introComboBox.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||||
|
this.introComboBox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
|
||||||
|
this.introComboBox.FormattingEnabled = true;
|
||||||
|
this.introComboBox.Location = new System.Drawing.Point(93, 182);
|
||||||
|
this.introComboBox.Margin = new System.Windows.Forms.Padding(2);
|
||||||
|
this.introComboBox.Name = "introComboBox";
|
||||||
|
this.introComboBox.Size = new System.Drawing.Size(205, 21);
|
||||||
|
this.introComboBox.TabIndex = 25;
|
||||||
|
//
|
||||||
|
// win4Label
|
||||||
|
//
|
||||||
|
this.win4Label.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||||
|
this.win4Label.Location = new System.Drawing.Point(2, 330);
|
||||||
|
this.win4Label.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
|
||||||
|
this.win4Label.Name = "win4Label";
|
||||||
|
this.win4Label.Size = new System.Drawing.Size(87, 25);
|
||||||
|
this.win4Label.TabIndex = 24;
|
||||||
|
this.win4Label.Text = "Win4";
|
||||||
|
this.win4Label.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
|
||||||
|
//
|
||||||
|
// win3Label
|
||||||
|
//
|
||||||
|
this.win3Label.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||||
|
this.win3Label.Location = new System.Drawing.Point(2, 305);
|
||||||
|
this.win3Label.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
|
||||||
|
this.win3Label.Name = "win3Label";
|
||||||
|
this.win3Label.Size = new System.Drawing.Size(87, 25);
|
||||||
|
this.win3Label.TabIndex = 23;
|
||||||
|
this.win3Label.Text = "Win3";
|
||||||
|
this.win3Label.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
|
||||||
|
//
|
||||||
|
// win2Label
|
||||||
|
//
|
||||||
|
this.win2Label.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||||
|
this.win2Label.Location = new System.Drawing.Point(2, 280);
|
||||||
|
this.win2Label.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
|
||||||
|
this.win2Label.Name = "win2Label";
|
||||||
|
this.win2Label.Size = new System.Drawing.Size(87, 25);
|
||||||
|
this.win2Label.TabIndex = 22;
|
||||||
|
this.win2Label.Text = "Win2";
|
||||||
|
this.win2Label.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
|
||||||
|
//
|
||||||
|
// label9
|
||||||
|
//
|
||||||
|
this.label9.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||||
|
this.label9.Location = new System.Drawing.Point(2, 255);
|
||||||
|
this.label9.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
|
||||||
|
this.label9.Name = "label9";
|
||||||
|
this.label9.Size = new System.Drawing.Size(87, 25);
|
||||||
|
this.label9.TabIndex = 21;
|
||||||
|
this.label9.Text = "Win";
|
||||||
|
this.label9.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
|
||||||
|
//
|
||||||
|
// label8
|
||||||
|
//
|
||||||
|
this.label8.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||||
|
this.label8.Location = new System.Drawing.Point(2, 230);
|
||||||
|
this.label8.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
|
||||||
|
this.label8.Name = "label8";
|
||||||
|
this.label8.Size = new System.Drawing.Size(87, 25);
|
||||||
|
this.label8.TabIndex = 20;
|
||||||
|
this.label8.Text = "Action";
|
||||||
|
this.label8.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
|
||||||
|
//
|
||||||
|
// label7
|
||||||
|
//
|
||||||
|
this.label7.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||||
|
this.label7.Location = new System.Drawing.Point(2, 205);
|
||||||
|
this.label7.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
|
||||||
|
this.label7.Name = "label7";
|
||||||
|
this.label7.Size = new System.Drawing.Size(87, 25);
|
||||||
|
this.label7.TabIndex = 19;
|
||||||
|
this.label7.Text = "Brief";
|
||||||
|
this.label7.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
|
||||||
|
//
|
||||||
|
// label1
|
||||||
|
//
|
||||||
|
this.label1.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||||
|
this.label1.Location = new System.Drawing.Point(2, 180);
|
||||||
|
this.label1.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
|
||||||
|
this.label1.Name = "label1";
|
||||||
|
this.label1.Size = new System.Drawing.Size(87, 25);
|
||||||
|
this.label1.TabIndex = 18;
|
||||||
|
this.label1.Text = "Intro";
|
||||||
|
this.label1.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
|
||||||
|
//
|
||||||
|
// buildLevelLabel
|
||||||
|
//
|
||||||
|
this.buildLevelLabel.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||||
|
this.buildLevelLabel.Location = new System.Drawing.Point(3, 0);
|
||||||
|
this.buildLevelLabel.Name = "buildLevelLabel";
|
||||||
|
this.buildLevelLabel.Size = new System.Drawing.Size(85, 26);
|
||||||
|
this.buildLevelLabel.TabIndex = 0;
|
||||||
|
this.buildLevelLabel.Text = "Build Level";
|
||||||
|
this.buildLevelLabel.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
|
||||||
|
//
|
||||||
|
// label2
|
||||||
|
//
|
||||||
|
this.label2.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||||
|
this.label2.Location = new System.Drawing.Point(3, 26);
|
||||||
|
this.label2.Name = "label2";
|
||||||
|
this.label2.Size = new System.Drawing.Size(85, 26);
|
||||||
|
this.label2.TabIndex = 2;
|
||||||
|
this.label2.Text = "Carryover Money";
|
||||||
|
this.label2.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
|
||||||
|
//
|
||||||
|
// label3
|
||||||
|
//
|
||||||
|
this.label3.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||||
|
this.label3.Location = new System.Drawing.Point(3, 52);
|
||||||
|
this.label3.Name = "label3";
|
||||||
|
this.label3.Size = new System.Drawing.Size(85, 26);
|
||||||
|
this.label3.TabIndex = 3;
|
||||||
|
this.label3.Text = "Name";
|
||||||
|
this.label3.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
|
||||||
|
//
|
||||||
|
// label4
|
||||||
|
//
|
||||||
|
this.label4.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||||
|
this.label4.Location = new System.Drawing.Point(3, 78);
|
||||||
|
this.label4.Name = "label4";
|
||||||
|
this.label4.Size = new System.Drawing.Size(85, 26);
|
||||||
|
this.label4.TabIndex = 4;
|
||||||
|
this.label4.Text = "Percent";
|
||||||
|
this.label4.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
|
||||||
|
//
|
||||||
|
// label5
|
||||||
|
//
|
||||||
|
this.label5.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||||
|
this.label5.Location = new System.Drawing.Point(3, 104);
|
||||||
|
this.label5.Name = "label5";
|
||||||
|
this.label5.Size = new System.Drawing.Size(85, 27);
|
||||||
|
this.label5.TabIndex = 5;
|
||||||
|
this.label5.Text = "Player";
|
||||||
|
this.label5.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
|
||||||
|
//
|
||||||
|
// nameTxt
|
||||||
|
//
|
||||||
|
this.nameTxt.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||||
|
this.nameTxt.Location = new System.Drawing.Point(94, 55);
|
||||||
|
this.nameTxt.Name = "nameTxt";
|
||||||
|
this.nameTxt.Size = new System.Drawing.Size(203, 20);
|
||||||
|
this.nameTxt.TabIndex = 7;
|
||||||
|
//
|
||||||
|
// playerComboBox
|
||||||
|
//
|
||||||
|
this.playerComboBox.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||||
|
this.playerComboBox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
|
||||||
|
this.playerComboBox.FormattingEnabled = true;
|
||||||
|
this.playerComboBox.Location = new System.Drawing.Point(94, 107);
|
||||||
|
this.playerComboBox.Name = "playerComboBox";
|
||||||
|
this.playerComboBox.Size = new System.Drawing.Size(203, 21);
|
||||||
|
this.playerComboBox.TabIndex = 9;
|
||||||
|
//
|
||||||
|
// buidLevelNud
|
||||||
|
//
|
||||||
|
this.buidLevelNud.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||||
|
this.buidLevelNud.Location = new System.Drawing.Point(94, 3);
|
||||||
|
this.buidLevelNud.Name = "buidLevelNud";
|
||||||
|
this.buidLevelNud.Size = new System.Drawing.Size(203, 20);
|
||||||
|
this.buidLevelNud.TabIndex = 10;
|
||||||
|
//
|
||||||
|
// percentNud
|
||||||
|
//
|
||||||
|
this.percentNud.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||||
|
this.percentNud.Location = new System.Drawing.Point(94, 81);
|
||||||
|
this.percentNud.Name = "percentNud";
|
||||||
|
this.percentNud.Size = new System.Drawing.Size(203, 20);
|
||||||
|
this.percentNud.TabIndex = 11;
|
||||||
|
//
|
||||||
|
// carryOverMoneyNud
|
||||||
|
//
|
||||||
|
this.carryOverMoneyNud.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||||
|
this.carryOverMoneyNud.Location = new System.Drawing.Point(94, 29);
|
||||||
|
this.carryOverMoneyNud.Name = "carryOverMoneyNud";
|
||||||
|
this.carryOverMoneyNud.Size = new System.Drawing.Size(203, 20);
|
||||||
|
this.carryOverMoneyNud.TabIndex = 12;
|
||||||
|
//
|
||||||
|
// label6
|
||||||
|
//
|
||||||
|
this.label6.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||||
|
this.label6.Location = new System.Drawing.Point(2, 131);
|
||||||
|
this.label6.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
|
||||||
|
this.label6.Name = "label6";
|
||||||
|
this.label6.Size = new System.Drawing.Size(87, 24);
|
||||||
|
this.label6.TabIndex = 13;
|
||||||
|
this.label6.Text = "Author";
|
||||||
|
this.label6.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
|
||||||
|
//
|
||||||
|
// authorTxt
|
||||||
|
//
|
||||||
|
this.authorTxt.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||||
|
this.authorTxt.Location = new System.Drawing.Point(93, 133);
|
||||||
|
this.authorTxt.Margin = new System.Windows.Forms.Padding(2);
|
||||||
|
this.authorTxt.Name = "authorTxt";
|
||||||
|
this.authorTxt.Size = new System.Drawing.Size(205, 20);
|
||||||
|
this.authorTxt.TabIndex = 14;
|
||||||
|
//
|
||||||
|
// baseLabel
|
||||||
|
//
|
||||||
|
this.baseLabel.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||||
|
this.baseLabel.Location = new System.Drawing.Point(2, 155);
|
||||||
|
this.baseLabel.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
|
||||||
|
this.baseLabel.Name = "baseLabel";
|
||||||
|
this.baseLabel.Size = new System.Drawing.Size(87, 25);
|
||||||
|
this.baseLabel.TabIndex = 15;
|
||||||
|
this.baseLabel.Text = "Base";
|
||||||
|
this.baseLabel.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
|
||||||
|
//
|
||||||
|
// baseComboBox
|
||||||
|
//
|
||||||
|
this.baseComboBox.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||||
|
this.baseComboBox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
|
||||||
|
this.baseComboBox.FormattingEnabled = true;
|
||||||
|
this.baseComboBox.Location = new System.Drawing.Point(93, 157);
|
||||||
|
this.baseComboBox.Margin = new System.Windows.Forms.Padding(2);
|
||||||
|
this.baseComboBox.Name = "baseComboBox";
|
||||||
|
this.baseComboBox.Size = new System.Drawing.Size(205, 21);
|
||||||
|
this.baseComboBox.TabIndex = 16;
|
||||||
|
//
|
||||||
|
// BasicSettings
|
||||||
|
//
|
||||||
|
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||||
|
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||||
|
this.Controls.Add(this.tableLayoutPanel1);
|
||||||
|
this.Name = "BasicSettings";
|
||||||
|
this.Size = new System.Drawing.Size(300, 403);
|
||||||
|
this.tableLayoutPanel1.ResumeLayout(false);
|
||||||
|
this.tableLayoutPanel1.PerformLayout();
|
||||||
|
((System.ComponentModel.ISupportInitialize)(this.buidLevelNud)).EndInit();
|
||||||
|
((System.ComponentModel.ISupportInitialize)(this.percentNud)).EndInit();
|
||||||
|
((System.ComponentModel.ISupportInitialize)(this.carryOverMoneyNud)).EndInit();
|
||||||
|
this.ResumeLayout(false);
|
||||||
|
this.PerformLayout();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
private System.Windows.Forms.TableLayoutPanel tableLayoutPanel1;
|
||||||
|
private System.Windows.Forms.Label buildLevelLabel;
|
||||||
|
private System.Windows.Forms.Label label2;
|
||||||
|
private System.Windows.Forms.Label label3;
|
||||||
|
private System.Windows.Forms.Label label4;
|
||||||
|
private System.Windows.Forms.Label label5;
|
||||||
|
private System.Windows.Forms.TextBox nameTxt;
|
||||||
|
private System.Windows.Forms.ComboBox playerComboBox;
|
||||||
|
private System.Windows.Forms.NumericUpDown buidLevelNud;
|
||||||
|
private System.Windows.Forms.NumericUpDown percentNud;
|
||||||
|
private System.Windows.Forms.NumericUpDown carryOverMoneyNud;
|
||||||
|
private System.Windows.Forms.Label label6;
|
||||||
|
private System.Windows.Forms.TextBox authorTxt;
|
||||||
|
private System.Windows.Forms.Label baseLabel;
|
||||||
|
private System.Windows.Forms.ComboBox baseComboBox;
|
||||||
|
private System.Windows.Forms.Label win4Label;
|
||||||
|
private System.Windows.Forms.Label win3Label;
|
||||||
|
private System.Windows.Forms.Label win2Label;
|
||||||
|
private System.Windows.Forms.Label label9;
|
||||||
|
private System.Windows.Forms.Label label8;
|
||||||
|
private System.Windows.Forms.Label label7;
|
||||||
|
private System.Windows.Forms.Label label1;
|
||||||
|
private System.Windows.Forms.CheckBox isSinglePlayerCheckBox;
|
||||||
|
private System.Windows.Forms.ComboBox win4ComboBox;
|
||||||
|
private System.Windows.Forms.ComboBox win3ComboBox;
|
||||||
|
private System.Windows.Forms.ComboBox win2ComboBox;
|
||||||
|
private System.Windows.Forms.ComboBox winComboBox;
|
||||||
|
private System.Windows.Forms.ComboBox actionComboBox;
|
||||||
|
private System.Windows.Forms.ComboBox briefComboBox;
|
||||||
|
private System.Windows.Forms.ComboBox introComboBox;
|
||||||
|
private System.Windows.Forms.ComboBox loseComboBox;
|
||||||
|
private System.Windows.Forms.Label label10;
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,80 @@
|
||||||
|
//
|
||||||
|
// Copyright 2020 Electronic Arts Inc.
|
||||||
|
//
|
||||||
|
// The Command & Conquer Map Editor and corresponding source code is free
|
||||||
|
// software: you can redistribute it and/or modify it under the terms of
|
||||||
|
// the GNU General Public License as published by the Free Software Foundation,
|
||||||
|
// either version 3 of the License, or (at your option) any later version.
|
||||||
|
|
||||||
|
// The Command & Conquer Map Editor and corresponding source code is distributed
|
||||||
|
// in the hope that it will be useful, but with permitted additional restrictions
|
||||||
|
// under Section 7 of the GPL. See the GNU General Public License in LICENSE.TXT
|
||||||
|
// distributed with this program. You should have received a copy of the
|
||||||
|
// GNU General Public License along with permitted additional restrictions
|
||||||
|
// with this program. If not, see https://github.com/electronicarts/CnC_Remastered_Collection
|
||||||
|
using MobiusEditor.Interface;
|
||||||
|
using System;
|
||||||
|
using System.Data;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Windows.Forms;
|
||||||
|
|
||||||
|
namespace MobiusEditor.Controls
|
||||||
|
{
|
||||||
|
public partial class BasicSettings : UserControl
|
||||||
|
{
|
||||||
|
public BasicSettings(IGamePlugin plugin, dynamic basicSection)
|
||||||
|
{
|
||||||
|
InitializeComponent();
|
||||||
|
|
||||||
|
playerComboBox.DataSource = plugin.Map.Houses.Select(h => h.Type.Name).ToArray();
|
||||||
|
baseComboBox.DataSource = plugin.Map.Houses.Select(h => h.Type.Name).ToArray();
|
||||||
|
introComboBox.DataSource = plugin.Map.MovieTypes.ToArray();
|
||||||
|
briefComboBox.DataSource = plugin.Map.MovieTypes.ToArray();
|
||||||
|
actionComboBox.DataSource = plugin.Map.MovieTypes.ToArray();
|
||||||
|
winComboBox.DataSource = plugin.Map.MovieTypes.ToArray();
|
||||||
|
win2ComboBox.DataSource = plugin.Map.MovieTypes.ToArray();
|
||||||
|
win3ComboBox.DataSource = plugin.Map.MovieTypes.ToArray();
|
||||||
|
win4ComboBox.DataSource = plugin.Map.MovieTypes.ToArray();
|
||||||
|
loseComboBox.DataSource = plugin.Map.MovieTypes.ToArray();
|
||||||
|
|
||||||
|
carryOverMoneyNud.DataBindings.Add("Value", basicSection, "CarryOverMoney");
|
||||||
|
nameTxt.DataBindings.Add("Text", basicSection, "Name");
|
||||||
|
percentNud.DataBindings.Add("Value", basicSection, "Percent");
|
||||||
|
playerComboBox.DataBindings.Add("SelectedItem", basicSection, "Player");
|
||||||
|
authorTxt.DataBindings.Add("Text", basicSection, "Author");
|
||||||
|
isSinglePlayerCheckBox.DataBindings.Add("Checked", basicSection, "SoloMission");
|
||||||
|
introComboBox.DataBindings.Add("SelectedItem", basicSection, "Intro");
|
||||||
|
briefComboBox.DataBindings.Add("SelectedItem", basicSection, "Brief");
|
||||||
|
actionComboBox.DataBindings.Add("SelectedItem", basicSection, "Action");
|
||||||
|
winComboBox.DataBindings.Add("SelectedItem", basicSection, "Win");
|
||||||
|
loseComboBox.DataBindings.Add("SelectedItem", basicSection, "Lose");
|
||||||
|
|
||||||
|
switch (plugin.GameType)
|
||||||
|
{
|
||||||
|
case GameType.TiberianDawn:
|
||||||
|
buidLevelNud.DataBindings.Add("Value", basicSection, "BuildLevel");
|
||||||
|
baseLabel.Visible = baseComboBox.Visible = false;
|
||||||
|
win2Label.Visible = win2ComboBox.Visible = false;
|
||||||
|
win3Label.Visible = win3ComboBox.Visible = false;
|
||||||
|
win4Label.Visible = win4ComboBox.Visible = false;
|
||||||
|
break;
|
||||||
|
case GameType.RedAlert:
|
||||||
|
buidLevelNud.Visible = buildLevelLabel.Visible = false;
|
||||||
|
baseComboBox.DataBindings.Add("SelectedItem", basicSection, "BasePlayer");
|
||||||
|
win2ComboBox.DataBindings.Add("SelectedItem", basicSection, "Win2");
|
||||||
|
win3ComboBox.DataBindings.Add("SelectedItem", basicSection, "Win3");
|
||||||
|
win4ComboBox.DataBindings.Add("SelectedItem", basicSection, "Win4");
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
introComboBox.Enabled = briefComboBox.Enabled = actionComboBox.Enabled = loseComboBox.Enabled = isSinglePlayerCheckBox.Checked;
|
||||||
|
winComboBox.Enabled = win2ComboBox.Enabled = win3ComboBox.Enabled = win4ComboBox.Enabled = isSinglePlayerCheckBox.Checked;
|
||||||
|
}
|
||||||
|
|
||||||
|
private void isSinglePlayerCheckBox_CheckedChanged(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
introComboBox.Enabled = briefComboBox.Enabled = actionComboBox.Enabled = loseComboBox.Enabled = isSinglePlayerCheckBox.Checked;
|
||||||
|
winComboBox.Enabled = win2ComboBox.Enabled = win3ComboBox.Enabled = win4ComboBox.Enabled = isSinglePlayerCheckBox.Checked;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -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>
|
|
@ -0,0 +1,75 @@
|
||||||
|
//
|
||||||
|
// Copyright 2020 Electronic Arts Inc.
|
||||||
|
//
|
||||||
|
// The Command & Conquer Map Editor and corresponding source code is free
|
||||||
|
// software: you can redistribute it and/or modify it under the terms of
|
||||||
|
// the GNU General Public License as published by the Free Software Foundation,
|
||||||
|
// either version 3 of the License, or (at your option) any later version.
|
||||||
|
|
||||||
|
// The Command & Conquer Map Editor and corresponding source code is distributed
|
||||||
|
// in the hope that it will be useful, but with permitted additional restrictions
|
||||||
|
// under Section 7 of the GPL. See the GNU General Public License in LICENSE.TXT
|
||||||
|
// distributed with this program. You should have received a copy of the
|
||||||
|
// GNU General Public License along with permitted additional restrictions
|
||||||
|
// with this program. If not, see https://github.com/electronicarts/CnC_Remastered_Collection
|
||||||
|
namespace MobiusEditor.Controls
|
||||||
|
{
|
||||||
|
partial class BriefingSettings
|
||||||
|
{
|
||||||
|
/// <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 Component 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.briefingTxt = new System.Windows.Forms.TextBox();
|
||||||
|
this.SuspendLayout();
|
||||||
|
//
|
||||||
|
// briefingTxt
|
||||||
|
//
|
||||||
|
this.briefingTxt.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||||
|
this.briefingTxt.Location = new System.Drawing.Point(0, 0);
|
||||||
|
this.briefingTxt.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
|
||||||
|
this.briefingTxt.Multiline = true;
|
||||||
|
this.briefingTxt.Name = "briefingTxt";
|
||||||
|
this.briefingTxt.Size = new System.Drawing.Size(600, 400);
|
||||||
|
this.briefingTxt.TabIndex = 0;
|
||||||
|
//
|
||||||
|
// BriefingSettings
|
||||||
|
//
|
||||||
|
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||||
|
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||||
|
this.Controls.Add(this.briefingTxt);
|
||||||
|
this.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
|
||||||
|
this.Name = "BriefingSettings";
|
||||||
|
this.Size = new System.Drawing.Size(600, 400);
|
||||||
|
this.ResumeLayout(false);
|
||||||
|
this.PerformLayout();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
private System.Windows.Forms.TextBox briefingTxt;
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,29 @@
|
||||||
|
//
|
||||||
|
// Copyright 2020 Electronic Arts Inc.
|
||||||
|
//
|
||||||
|
// The Command & Conquer Map Editor and corresponding source code is free
|
||||||
|
// software: you can redistribute it and/or modify it under the terms of
|
||||||
|
// the GNU General Public License as published by the Free Software Foundation,
|
||||||
|
// either version 3 of the License, or (at your option) any later version.
|
||||||
|
|
||||||
|
// The Command & Conquer Map Editor and corresponding source code is distributed
|
||||||
|
// in the hope that it will be useful, but with permitted additional restrictions
|
||||||
|
// under Section 7 of the GPL. See the GNU General Public License in LICENSE.TXT
|
||||||
|
// distributed with this program. You should have received a copy of the
|
||||||
|
// GNU General Public License along with permitted additional restrictions
|
||||||
|
// with this program. If not, see https://github.com/electronicarts/CnC_Remastered_Collection
|
||||||
|
using MobiusEditor.Interface;
|
||||||
|
using System.Windows.Forms;
|
||||||
|
|
||||||
|
namespace MobiusEditor.Controls
|
||||||
|
{
|
||||||
|
public partial class BriefingSettings : UserControl
|
||||||
|
{
|
||||||
|
public BriefingSettings(IGamePlugin plugin, dynamic briefingSection)
|
||||||
|
{
|
||||||
|
InitializeComponent();
|
||||||
|
|
||||||
|
briefingTxt.DataBindings.Add("Text", briefingSection, "Briefing");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -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>
|
|
@ -0,0 +1,50 @@
|
||||||
|
//
|
||||||
|
// Copyright 2020 Electronic Arts Inc.
|
||||||
|
//
|
||||||
|
// The Command & Conquer Map Editor and corresponding source code is free
|
||||||
|
// software: you can redistribute it and/or modify it under the terms of
|
||||||
|
// the GNU General Public License as published by the Free Software Foundation,
|
||||||
|
// either version 3 of the License, or (at your option) any later version.
|
||||||
|
|
||||||
|
// The Command & Conquer Map Editor and corresponding source code is distributed
|
||||||
|
// in the hope that it will be useful, but with permitted additional restrictions
|
||||||
|
// under Section 7 of the GPL. See the GNU General Public License in LICENSE.TXT
|
||||||
|
// distributed with this program. You should have received a copy of the
|
||||||
|
// GNU General Public License along with permitted additional restrictions
|
||||||
|
// with this program. If not, see https://github.com/electronicarts/CnC_Remastered_Collection
|
||||||
|
namespace MobiusEditor.Controls
|
||||||
|
{
|
||||||
|
partial class ImageTooltip
|
||||||
|
{
|
||||||
|
/// <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 Component 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()
|
||||||
|
{
|
||||||
|
components = new System.ComponentModel.Container();
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,64 @@
|
||||||
|
//
|
||||||
|
// Copyright 2020 Electronic Arts Inc.
|
||||||
|
//
|
||||||
|
// The Command & Conquer Map Editor and corresponding source code is free
|
||||||
|
// software: you can redistribute it and/or modify it under the terms of
|
||||||
|
// the GNU General Public License as published by the Free Software Foundation,
|
||||||
|
// either version 3 of the License, or (at your option) any later version.
|
||||||
|
|
||||||
|
// The Command & Conquer Map Editor and corresponding source code is distributed
|
||||||
|
// in the hope that it will be useful, but with permitted additional restrictions
|
||||||
|
// under Section 7 of the GPL. See the GNU General Public License in LICENSE.TXT
|
||||||
|
// distributed with this program. You should have received a copy of the
|
||||||
|
// GNU General Public License along with permitted additional restrictions
|
||||||
|
// with this program. If not, see https://github.com/electronicarts/CnC_Remastered_Collection
|
||||||
|
using System;
|
||||||
|
using System.Drawing;
|
||||||
|
using System.Windows.Forms;
|
||||||
|
|
||||||
|
namespace MobiusEditor.Controls
|
||||||
|
{
|
||||||
|
public partial class ImageTooltip : ToolTip
|
||||||
|
{
|
||||||
|
public Size MaxSize { get; set; } = Size.Empty;
|
||||||
|
|
||||||
|
public ImageTooltip()
|
||||||
|
{
|
||||||
|
InitializeComponent();
|
||||||
|
|
||||||
|
OwnerDraw = true;
|
||||||
|
Popup += ImageTooltip_Popup;
|
||||||
|
Draw += ImageTooltip_Draw;
|
||||||
|
}
|
||||||
|
|
||||||
|
private void ImageTooltip_Popup(object sender, PopupEventArgs e)
|
||||||
|
{
|
||||||
|
if (e.AssociatedControl.Tag is Image image)
|
||||||
|
{
|
||||||
|
var size = image.Size;
|
||||||
|
if (MaxSize.Width > 0)
|
||||||
|
{
|
||||||
|
size.Width = Math.Min(MaxSize.Width, size.Width);
|
||||||
|
}
|
||||||
|
if (MaxSize.Height > 0)
|
||||||
|
{
|
||||||
|
size.Height = Math.Min(MaxSize.Height, size.Height);
|
||||||
|
}
|
||||||
|
|
||||||
|
e.ToolTipSize = size;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
e.Cancel = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void ImageTooltip_Draw(object sender, DrawToolTipEventArgs e)
|
||||||
|
{
|
||||||
|
if (e.AssociatedControl.Tag is Image image)
|
||||||
|
{
|
||||||
|
e.Graphics.DrawImage(image, e.Bounds);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,52 @@
|
||||||
|
//
|
||||||
|
// Copyright 2020 Electronic Arts Inc.
|
||||||
|
//
|
||||||
|
// The Command & Conquer Map Editor and corresponding source code is free
|
||||||
|
// software: you can redistribute it and/or modify it under the terms of
|
||||||
|
// the GNU General Public License as published by the Free Software Foundation,
|
||||||
|
// either version 3 of the License, or (at your option) any later version.
|
||||||
|
|
||||||
|
// The Command & Conquer Map Editor and corresponding source code is distributed
|
||||||
|
// in the hope that it will be useful, but with permitted additional restrictions
|
||||||
|
// under Section 7 of the GPL. See the GNU General Public License in LICENSE.TXT
|
||||||
|
// distributed with this program. You should have received a copy of the
|
||||||
|
// GNU General Public License along with permitted additional restrictions
|
||||||
|
// with this program. If not, see https://github.com/electronicarts/CnC_Remastered_Collection
|
||||||
|
namespace MobiusEditor.Controls
|
||||||
|
{
|
||||||
|
partial class MapPanel
|
||||||
|
{
|
||||||
|
/// <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 Component 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.SuspendLayout();
|
||||||
|
this.ResumeLayout(false);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,535 @@
|
||||||
|
//
|
||||||
|
// Copyright 2020 Electronic Arts Inc.
|
||||||
|
//
|
||||||
|
// The Command & Conquer Map Editor and corresponding source code is free
|
||||||
|
// software: you can redistribute it and/or modify it under the terms of
|
||||||
|
// the GNU General Public License as published by the Free Software Foundation,
|
||||||
|
// either version 3 of the License, or (at your option) any later version.
|
||||||
|
|
||||||
|
// The Command & Conquer Map Editor and corresponding source code is distributed
|
||||||
|
// in the hope that it will be useful, but with permitted additional restrictions
|
||||||
|
// under Section 7 of the GPL. See the GNU General Public License in LICENSE.TXT
|
||||||
|
// distributed with this program. You should have received a copy of the
|
||||||
|
// GNU General Public License along with permitted additional restrictions
|
||||||
|
// with this program. If not, see https://github.com/electronicarts/CnC_Remastered_Collection
|
||||||
|
using MobiusEditor.Event;
|
||||||
|
using MobiusEditor.Interface;
|
||||||
|
using MobiusEditor.Model;
|
||||||
|
using MobiusEditor.Utility;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.ComponentModel;
|
||||||
|
using System.Drawing;
|
||||||
|
using System.Drawing.Drawing2D;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Runtime.InteropServices;
|
||||||
|
using System.Windows.Forms;
|
||||||
|
|
||||||
|
namespace MobiusEditor.Controls
|
||||||
|
{
|
||||||
|
public partial class MapPanel : Panel
|
||||||
|
{
|
||||||
|
private bool updatingCamera;
|
||||||
|
private Rectangle cameraBounds;
|
||||||
|
private Point lastScrollPosition;
|
||||||
|
|
||||||
|
private (Point map, SizeF client)? referencePositions;
|
||||||
|
|
||||||
|
private Matrix mapToViewTransform = new Matrix();
|
||||||
|
private Matrix viewToPageTransform = new Matrix();
|
||||||
|
|
||||||
|
private Matrix compositeTransform = new Matrix();
|
||||||
|
private Matrix invCompositeTransform = new Matrix();
|
||||||
|
|
||||||
|
private readonly HashSet<Point> invalidateCells = new HashSet<Point>();
|
||||||
|
private bool fullInvalidation;
|
||||||
|
|
||||||
|
private Image mapImage;
|
||||||
|
public Image MapImage
|
||||||
|
{
|
||||||
|
get => mapImage;
|
||||||
|
set
|
||||||
|
{
|
||||||
|
if (mapImage != value)
|
||||||
|
{
|
||||||
|
mapImage = value;
|
||||||
|
UpdateCamera();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private int minZoom = 1;
|
||||||
|
public int MinZoom
|
||||||
|
{
|
||||||
|
get => minZoom;
|
||||||
|
set
|
||||||
|
{
|
||||||
|
if (minZoom != value)
|
||||||
|
{
|
||||||
|
minZoom = value;
|
||||||
|
Zoom = zoom;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private int maxZoom = 8;
|
||||||
|
public int MaxZoom
|
||||||
|
{
|
||||||
|
get => maxZoom;
|
||||||
|
set
|
||||||
|
{
|
||||||
|
if (maxZoom != value)
|
||||||
|
{
|
||||||
|
maxZoom = value;
|
||||||
|
Zoom = zoom;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private int zoomStep = 1;
|
||||||
|
public int ZoomStep
|
||||||
|
{
|
||||||
|
get => zoomStep;
|
||||||
|
set
|
||||||
|
{
|
||||||
|
if (zoomStep != value)
|
||||||
|
{
|
||||||
|
zoomStep = value;
|
||||||
|
Zoom = (Zoom / zoomStep) * zoomStep;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private int zoom = 1;
|
||||||
|
public int Zoom
|
||||||
|
{
|
||||||
|
get => zoom;
|
||||||
|
set
|
||||||
|
{
|
||||||
|
var newZoom = Math.Max(MinZoom, Math.Min(MaxZoom, value));
|
||||||
|
if (zoom != newZoom)
|
||||||
|
{
|
||||||
|
zoom = newZoom;
|
||||||
|
|
||||||
|
var clientPosition = PointToClient(MousePosition);
|
||||||
|
referencePositions = (ClientToMap(clientPosition), new SizeF(clientPosition.X / (float)ClientSize.Width, clientPosition.Y / (float)ClientSize.Height));
|
||||||
|
|
||||||
|
UpdateCamera();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private int quality = Properties.Settings.Default.Quality;
|
||||||
|
public int Quality
|
||||||
|
{
|
||||||
|
get => quality;
|
||||||
|
set
|
||||||
|
{
|
||||||
|
if (quality != value)
|
||||||
|
{
|
||||||
|
quality = value;
|
||||||
|
Invalidate();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
[Category("Behavior")]
|
||||||
|
[DefaultValue(false)]
|
||||||
|
public bool FocusOnMouseEnter { get; set; }
|
||||||
|
|
||||||
|
public event EventHandler<RenderEventArgs> PreRender;
|
||||||
|
public event EventHandler<RenderEventArgs> PostRender;
|
||||||
|
|
||||||
|
public MapPanel()
|
||||||
|
{
|
||||||
|
InitializeComponent();
|
||||||
|
DoubleBuffered = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Point MapToClient(Point point)
|
||||||
|
{
|
||||||
|
var points = new Point[] { point };
|
||||||
|
compositeTransform.TransformPoints(points);
|
||||||
|
return points[0];
|
||||||
|
}
|
||||||
|
|
||||||
|
public Size MapToClient(Size size)
|
||||||
|
{
|
||||||
|
var points = new Point[] { (Point)size };
|
||||||
|
compositeTransform.VectorTransformPoints(points);
|
||||||
|
return (Size)points[0];
|
||||||
|
}
|
||||||
|
|
||||||
|
public Rectangle MapToClient(Rectangle rectangle)
|
||||||
|
{
|
||||||
|
var points = new Point[] { rectangle.Location, new Point(rectangle.Right, rectangle.Bottom) };
|
||||||
|
compositeTransform.TransformPoints(points);
|
||||||
|
return new Rectangle(points[0], new Size(points[1].X - points[0].X, points[1].Y - points[0].Y));
|
||||||
|
}
|
||||||
|
|
||||||
|
public Point ClientToMap(Point point)
|
||||||
|
{
|
||||||
|
var points = new Point[] { point };
|
||||||
|
invCompositeTransform.TransformPoints(points);
|
||||||
|
return points[0];
|
||||||
|
}
|
||||||
|
|
||||||
|
public Size ClientToMap(Size size)
|
||||||
|
{
|
||||||
|
var points = new Point[] { (Point)size };
|
||||||
|
invCompositeTransform.VectorTransformPoints(points);
|
||||||
|
return (Size)points[0];
|
||||||
|
}
|
||||||
|
|
||||||
|
public Rectangle ClientToMap(Rectangle rectangle)
|
||||||
|
{
|
||||||
|
var points = new Point[] { rectangle.Location, new Point(rectangle.Right, rectangle.Bottom) };
|
||||||
|
invCompositeTransform.TransformPoints(points);
|
||||||
|
return new Rectangle(points[0], new Size(points[1].X - points[0].X, points[1].Y - points[0].Y));
|
||||||
|
}
|
||||||
|
|
||||||
|
public void Invalidate(Map invalidateMap)
|
||||||
|
{
|
||||||
|
if (!fullInvalidation)
|
||||||
|
{
|
||||||
|
invalidateCells.Clear();
|
||||||
|
fullInvalidation = true;
|
||||||
|
Invalidate();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public void Invalidate(Map invalidateMap, Rectangle cellBounds)
|
||||||
|
{
|
||||||
|
if (fullInvalidation)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
var count = invalidateCells.Count;
|
||||||
|
invalidateCells.UnionWith(cellBounds.Points());
|
||||||
|
if (invalidateCells.Count > count)
|
||||||
|
{
|
||||||
|
var overlapCells = invalidateMap.Overlappers.Overlaps(invalidateCells).ToHashSet();
|
||||||
|
invalidateCells.UnionWith(overlapCells);
|
||||||
|
Invalidate();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public void Invalidate(Map invalidateMap, IEnumerable<Rectangle> cellBounds)
|
||||||
|
{
|
||||||
|
if (fullInvalidation)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
var count = invalidateCells.Count;
|
||||||
|
invalidateCells.UnionWith(cellBounds.SelectMany(c => c.Points()));
|
||||||
|
if (invalidateCells.Count > count)
|
||||||
|
{
|
||||||
|
var overlapCells = invalidateMap.Overlappers.Overlaps(invalidateCells).ToHashSet();
|
||||||
|
invalidateCells.UnionWith(overlapCells);
|
||||||
|
Invalidate();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public void Invalidate(Map invalidateMap, Point location)
|
||||||
|
{
|
||||||
|
if (fullInvalidation)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
Invalidate(invalidateMap, new Rectangle(location, new Size(1, 1)));
|
||||||
|
}
|
||||||
|
|
||||||
|
public void Invalidate(Map invalidateMap, IEnumerable<Point> locations)
|
||||||
|
{
|
||||||
|
if (fullInvalidation)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
Invalidate(invalidateMap, locations.Select(l => new Rectangle(l, new Size(1, 1))));
|
||||||
|
}
|
||||||
|
|
||||||
|
public void Invalidate(Map invalidateMap, int cell)
|
||||||
|
{
|
||||||
|
if (fullInvalidation)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (invalidateMap.Metrics.GetLocation(cell, out Point location))
|
||||||
|
{
|
||||||
|
Invalidate(invalidateMap, location);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public void Invalidate(Map invalidateMap, IEnumerable<int> cells)
|
||||||
|
{
|
||||||
|
if (fullInvalidation)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
Invalidate(invalidateMap, cells
|
||||||
|
.Where(c => invalidateMap.Metrics.GetLocation(c, out Point location))
|
||||||
|
.Select(c =>
|
||||||
|
{
|
||||||
|
invalidateMap.Metrics.GetLocation(c, out Point location);
|
||||||
|
return location;
|
||||||
|
})
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void Invalidate(Map invalidateMap, ICellOverlapper overlapper)
|
||||||
|
{
|
||||||
|
if (fullInvalidation)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
var rectangle = invalidateMap.Overlappers[overlapper];
|
||||||
|
if (rectangle.HasValue)
|
||||||
|
{
|
||||||
|
Invalidate(invalidateMap, rectangle.Value);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
protected override void OnMouseEnter(EventArgs e)
|
||||||
|
{
|
||||||
|
base.OnMouseEnter(e);
|
||||||
|
|
||||||
|
if (FocusOnMouseEnter)
|
||||||
|
{
|
||||||
|
Focus();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
protected override void OnMouseWheel(MouseEventArgs e)
|
||||||
|
{
|
||||||
|
Zoom += ZoomStep * Math.Sign(e.Delta);
|
||||||
|
}
|
||||||
|
|
||||||
|
protected override void OnClientSizeChanged(EventArgs e)
|
||||||
|
{
|
||||||
|
base.OnClientSizeChanged(e);
|
||||||
|
|
||||||
|
UpdateCamera();
|
||||||
|
}
|
||||||
|
|
||||||
|
protected override void OnScroll(ScrollEventArgs se)
|
||||||
|
{
|
||||||
|
base.OnScroll(se);
|
||||||
|
|
||||||
|
InvalidateScroll();
|
||||||
|
}
|
||||||
|
|
||||||
|
protected override void OnPaintBackground(PaintEventArgs e)
|
||||||
|
{
|
||||||
|
base.OnPaintBackground(e);
|
||||||
|
|
||||||
|
e.Graphics.Clear(BackColor);
|
||||||
|
}
|
||||||
|
|
||||||
|
protected override void OnPaint(PaintEventArgs pe)
|
||||||
|
{
|
||||||
|
base.OnPaint(pe);
|
||||||
|
|
||||||
|
InvalidateScroll();
|
||||||
|
|
||||||
|
PreRender?.Invoke(this, new RenderEventArgs(pe.Graphics, fullInvalidation ? null : invalidateCells));
|
||||||
|
|
||||||
|
if (mapImage != null)
|
||||||
|
{
|
||||||
|
pe.Graphics.Transform = compositeTransform;
|
||||||
|
|
||||||
|
var oldCompositingMode = pe.Graphics.CompositingMode;
|
||||||
|
var oldCompositingQuality = pe.Graphics.CompositingQuality;
|
||||||
|
var oldInterpolationMode = pe.Graphics.InterpolationMode;
|
||||||
|
if (Quality > 1)
|
||||||
|
{
|
||||||
|
pe.Graphics.CompositingMode = CompositingMode.SourceCopy;
|
||||||
|
pe.Graphics.CompositingQuality = CompositingQuality.HighSpeed;
|
||||||
|
}
|
||||||
|
|
||||||
|
pe.Graphics.InterpolationMode = InterpolationMode.NearestNeighbor;
|
||||||
|
pe.Graphics.DrawImage(mapImage, 0, 0);
|
||||||
|
|
||||||
|
pe.Graphics.CompositingMode = oldCompositingMode;
|
||||||
|
pe.Graphics.CompositingQuality = oldCompositingQuality;
|
||||||
|
pe.Graphics.InterpolationMode = oldInterpolationMode;
|
||||||
|
}
|
||||||
|
|
||||||
|
PostRender?.Invoke(this, new RenderEventArgs(pe.Graphics, fullInvalidation ? null : invalidateCells));
|
||||||
|
|
||||||
|
#if DEVELOPER
|
||||||
|
if (Globals.Developer.ShowOverlapCells)
|
||||||
|
{
|
||||||
|
var invalidPen = new Pen(Color.DarkRed);
|
||||||
|
foreach (var cell in invalidateCells)
|
||||||
|
{
|
||||||
|
pe.Graphics.DrawRectangle(invalidPen, new Rectangle(cell.X * Globals.TileWidth, cell.Y * Globals.TileHeight, Globals.TileWidth, Globals.TileHeight));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
invalidateCells.Clear();
|
||||||
|
fullInvalidation = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
private void UpdateCamera()
|
||||||
|
{
|
||||||
|
if (mapImage == null)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (ClientSize.IsEmpty)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
updatingCamera = true;
|
||||||
|
|
||||||
|
var mapAspect = (double)mapImage.Width / mapImage.Height;
|
||||||
|
var panelAspect = (double)ClientSize.Width / ClientSize.Height;
|
||||||
|
var cameraLocation = cameraBounds.Location;
|
||||||
|
|
||||||
|
var size = Size.Empty;
|
||||||
|
if (panelAspect > mapAspect)
|
||||||
|
{
|
||||||
|
size.Height = mapImage.Height / zoom;
|
||||||
|
size.Width = (int)(size.Height * panelAspect);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
size.Width = mapImage.Width / zoom;
|
||||||
|
size.Height = (int)(size.Width / panelAspect);
|
||||||
|
}
|
||||||
|
|
||||||
|
var location = Point.Empty;
|
||||||
|
var scrollSize = Size.Empty;
|
||||||
|
if (size.Width < mapImage.Width)
|
||||||
|
{
|
||||||
|
location.X = Math.Max(0, Math.Min(mapImage.Width - size.Width, cameraBounds.Left));
|
||||||
|
scrollSize.Width = mapImage.Width * ClientSize.Width / size.Width;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
location.X = (mapImage.Width - size.Width) / 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (size.Height < mapImage.Height)
|
||||||
|
{
|
||||||
|
location.Y = Math.Max(0, Math.Min(mapImage.Height - size.Height, cameraBounds.Top));
|
||||||
|
scrollSize.Height = mapImage.Height * ClientSize.Height / size.Height;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
location.Y = (mapImage.Height - size.Height) / 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
cameraBounds = new Rectangle(location, size);
|
||||||
|
RecalculateTransforms();
|
||||||
|
|
||||||
|
if (referencePositions.HasValue)
|
||||||
|
{
|
||||||
|
var mapPoint = referencePositions.Value.map;
|
||||||
|
var clientSize = referencePositions.Value.client;
|
||||||
|
|
||||||
|
cameraLocation = cameraBounds.Location;
|
||||||
|
if (scrollSize.Width != 0)
|
||||||
|
{
|
||||||
|
cameraLocation.X = Math.Max(0, Math.Min(mapImage.Width - cameraBounds.Width, (int)(mapPoint.X - (cameraBounds.Width * clientSize.Width))));
|
||||||
|
}
|
||||||
|
if (scrollSize.Height != 0)
|
||||||
|
{
|
||||||
|
cameraLocation.Y = Math.Max(0, Math.Min(mapImage.Height - cameraBounds.Height, (int)(mapPoint.Y - (cameraBounds.Height * clientSize.Height))));
|
||||||
|
}
|
||||||
|
if (!scrollSize.IsEmpty)
|
||||||
|
{
|
||||||
|
cameraBounds.Location = cameraLocation;
|
||||||
|
RecalculateTransforms();
|
||||||
|
}
|
||||||
|
|
||||||
|
referencePositions = null;
|
||||||
|
}
|
||||||
|
|
||||||
|
SuspendDrawing();
|
||||||
|
AutoScrollMinSize = scrollSize;
|
||||||
|
AutoScrollPosition = (Point)MapToClient((Size)cameraBounds.Location);
|
||||||
|
lastScrollPosition = AutoScrollPosition;
|
||||||
|
ResumeDrawing();
|
||||||
|
|
||||||
|
updatingCamera = false;
|
||||||
|
|
||||||
|
Invalidate();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void RecalculateTransforms()
|
||||||
|
{
|
||||||
|
mapToViewTransform.Reset();
|
||||||
|
mapToViewTransform.Translate(cameraBounds.Left, cameraBounds.Top);
|
||||||
|
mapToViewTransform.Scale(cameraBounds.Width, cameraBounds.Height);
|
||||||
|
mapToViewTransform.Invert();
|
||||||
|
|
||||||
|
viewToPageTransform.Reset();
|
||||||
|
viewToPageTransform.Scale(ClientSize.Width, ClientSize.Height);
|
||||||
|
|
||||||
|
compositeTransform.Reset();
|
||||||
|
compositeTransform.Multiply(viewToPageTransform);
|
||||||
|
compositeTransform.Multiply(mapToViewTransform);
|
||||||
|
|
||||||
|
invCompositeTransform.Reset();
|
||||||
|
invCompositeTransform.Multiply(compositeTransform);
|
||||||
|
invCompositeTransform.Invert();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void InvalidateScroll()
|
||||||
|
{
|
||||||
|
if (updatingCamera)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if ((lastScrollPosition.X != AutoScrollPosition.X) || (lastScrollPosition.Y != AutoScrollPosition.Y))
|
||||||
|
{
|
||||||
|
var delta = ClientToMap((Size)(lastScrollPosition - (Size)AutoScrollPosition));
|
||||||
|
lastScrollPosition = AutoScrollPosition;
|
||||||
|
|
||||||
|
var cameraLocation = cameraBounds.Location;
|
||||||
|
if (AutoScrollMinSize.Width != 0)
|
||||||
|
{
|
||||||
|
cameraLocation.X = Math.Max(0, Math.Min(mapImage.Width - cameraBounds.Width, cameraBounds.Left + delta.Width));
|
||||||
|
}
|
||||||
|
if (AutoScrollMinSize.Height != 0)
|
||||||
|
{
|
||||||
|
cameraLocation.Y = Math.Max(0, Math.Min(mapImage.Height - cameraBounds.Height, cameraBounds.Top + delta.Height));
|
||||||
|
}
|
||||||
|
if (!AutoScrollMinSize.IsEmpty)
|
||||||
|
{
|
||||||
|
cameraBounds.Location = cameraLocation;
|
||||||
|
RecalculateTransforms();
|
||||||
|
}
|
||||||
|
|
||||||
|
Invalidate();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
[DllImport("user32.dll")]
|
||||||
|
private static extern int SendMessage(IntPtr hWnd, Int32 wMsg, bool wParam, Int32 lParam);
|
||||||
|
|
||||||
|
private const int WM_SETREDRAW = 11;
|
||||||
|
|
||||||
|
private void SuspendDrawing()
|
||||||
|
{
|
||||||
|
SendMessage(Handle, WM_SETREDRAW, false, 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void ResumeDrawing()
|
||||||
|
{
|
||||||
|
SendMessage(Handle, WM_SETREDRAW, true, 0);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,123 @@
|
||||||
|
<?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="$this.TrayLargeIcon" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||||
|
<value>False</value>
|
||||||
|
</metadata>
|
||||||
|
</root>
|
|
@ -0,0 +1,50 @@
|
||||||
|
//
|
||||||
|
// Copyright 2020 Electronic Arts Inc.
|
||||||
|
//
|
||||||
|
// The Command & Conquer Map Editor and corresponding source code is free
|
||||||
|
// software: you can redistribute it and/or modify it under the terms of
|
||||||
|
// the GNU General Public License as published by the Free Software Foundation,
|
||||||
|
// either version 3 of the License, or (at your option) any later version.
|
||||||
|
|
||||||
|
// The Command & Conquer Map Editor and corresponding source code is distributed
|
||||||
|
// in the hope that it will be useful, but with permitted additional restrictions
|
||||||
|
// under Section 7 of the GPL. See the GNU General Public License in LICENSE.TXT
|
||||||
|
// distributed with this program. You should have received a copy of the
|
||||||
|
// GNU General Public License along with permitted additional restrictions
|
||||||
|
// with this program. If not, see https://github.com/electronicarts/CnC_Remastered_Collection
|
||||||
|
namespace MobiusEditor.Controls
|
||||||
|
{
|
||||||
|
partial class MenuButton
|
||||||
|
{
|
||||||
|
/// <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 Component 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()
|
||||||
|
{
|
||||||
|
components = new System.ComponentModel.Container();
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,74 @@
|
||||||
|
//
|
||||||
|
// Copyright 2020 Electronic Arts Inc.
|
||||||
|
//
|
||||||
|
// The Command & Conquer Map Editor and corresponding source code is free
|
||||||
|
// software: you can redistribute it and/or modify it under the terms of
|
||||||
|
// the GNU General Public License as published by the Free Software Foundation,
|
||||||
|
// either version 3 of the License, or (at your option) any later version.
|
||||||
|
|
||||||
|
// The Command & Conquer Map Editor and corresponding source code is distributed
|
||||||
|
// in the hope that it will be useful, but with permitted additional restrictions
|
||||||
|
// under Section 7 of the GPL. See the GNU General Public License in LICENSE.TXT
|
||||||
|
// distributed with this program. You should have received a copy of the
|
||||||
|
// GNU General Public License along with permitted additional restrictions
|
||||||
|
// with this program. If not, see https://github.com/electronicarts/CnC_Remastered_Collection
|
||||||
|
using System.ComponentModel;
|
||||||
|
using System.Drawing;
|
||||||
|
using System.Drawing.Drawing2D;
|
||||||
|
using System.Windows.Forms;
|
||||||
|
|
||||||
|
namespace MobiusEditor.Controls
|
||||||
|
{
|
||||||
|
public partial class MenuButton : Button
|
||||||
|
{
|
||||||
|
public const int DefaultSplitWidth = 20;
|
||||||
|
|
||||||
|
[DefaultValue(null), Browsable(true), DesignerSerializationVisibility(DesignerSerializationVisibility.Visible)]
|
||||||
|
public ContextMenuStrip Menu { get; set; }
|
||||||
|
|
||||||
|
[DefaultValue(DefaultSplitWidth), Browsable(true), DesignerSerializationVisibility(DesignerSerializationVisibility.Visible)]
|
||||||
|
public int SplitWidth { get; set; } = DefaultSplitWidth;
|
||||||
|
|
||||||
|
public MenuButton()
|
||||||
|
{
|
||||||
|
InitializeComponent();
|
||||||
|
}
|
||||||
|
|
||||||
|
protected override void OnMouseDown(MouseEventArgs mevent)
|
||||||
|
{
|
||||||
|
var splitRect = new Rectangle(Width - SplitWidth, 0, SplitWidth, Height);
|
||||||
|
|
||||||
|
if ((Menu != null) && (mevent.Button == MouseButtons.Left) && splitRect.Contains(mevent.Location))
|
||||||
|
{
|
||||||
|
Menu.Show(this, 0, Height);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
base.OnMouseDown(mevent);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
protected override void OnPaint(PaintEventArgs pevent)
|
||||||
|
{
|
||||||
|
base.OnPaint(pevent);
|
||||||
|
|
||||||
|
if ((Menu != null) && (SplitWidth > 0))
|
||||||
|
{
|
||||||
|
int arrowX = ClientRectangle.Width - 14;
|
||||||
|
int arrowY = ClientRectangle.Height / 2 - 1;
|
||||||
|
|
||||||
|
var arrowBrush = Enabled ? SystemBrushes.ControlText : SystemBrushes.ButtonShadow;
|
||||||
|
var arrows = new[] { new Point(arrowX, arrowY), new Point(arrowX + 7, arrowY), new Point(arrowX + 3, arrowY + 4) };
|
||||||
|
pevent.Graphics.FillPolygon(arrowBrush, arrows);
|
||||||
|
|
||||||
|
int lineX = ClientRectangle.Width - SplitWidth;
|
||||||
|
int lineYFrom = arrowY - 4;
|
||||||
|
int lineYTo = arrowY + 8;
|
||||||
|
using (var separatorPen = new Pen(Brushes.DarkGray) { DashStyle = DashStyle.Dot })
|
||||||
|
{
|
||||||
|
pevent.Graphics.DrawLine(separatorPen, lineX, lineYFrom, lineX, lineYTo);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,345 @@
|
||||||
|
//
|
||||||
|
// Copyright 2020 Electronic Arts Inc.
|
||||||
|
//
|
||||||
|
// The Command & Conquer Map Editor and corresponding source code is free
|
||||||
|
// software: you can redistribute it and/or modify it under the terms of
|
||||||
|
// the GNU General Public License as published by the Free Software Foundation,
|
||||||
|
// either version 3 of the License, or (at your option) any later version.
|
||||||
|
|
||||||
|
// The Command & Conquer Map Editor and corresponding source code is distributed
|
||||||
|
// in the hope that it will be useful, but with permitted additional restrictions
|
||||||
|
// under Section 7 of the GPL. See the GNU General Public License in LICENSE.TXT
|
||||||
|
// distributed with this program. You should have received a copy of the
|
||||||
|
// GNU General Public License along with permitted additional restrictions
|
||||||
|
// with this program. If not, see https://github.com/electronicarts/CnC_Remastered_Collection
|
||||||
|
namespace MobiusEditor.Controls
|
||||||
|
{
|
||||||
|
partial class ObjectProperties
|
||||||
|
{
|
||||||
|
/// <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 Component 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.tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel();
|
||||||
|
this.label1 = new System.Windows.Forms.Label();
|
||||||
|
this.label2 = new System.Windows.Forms.Label();
|
||||||
|
this.directionLabel = new System.Windows.Forms.Label();
|
||||||
|
this.missionLabel = new System.Windows.Forms.Label();
|
||||||
|
this.label5 = new System.Windows.Forms.Label();
|
||||||
|
this.houseComboBox = new MobiusEditor.Controls.PropertiesComboBox();
|
||||||
|
this.strengthNud = new System.Windows.Forms.NumericUpDown();
|
||||||
|
this.directionComboBox = new MobiusEditor.Controls.PropertiesComboBox();
|
||||||
|
this.missionComboBox = new MobiusEditor.Controls.PropertiesComboBox();
|
||||||
|
this.triggerComboBox = new MobiusEditor.Controls.PropertiesComboBox();
|
||||||
|
this.basePriorityNud = new System.Windows.Forms.NumericUpDown();
|
||||||
|
this.prebuiltCheckBox = new System.Windows.Forms.CheckBox();
|
||||||
|
this.basePriorityLabel = new System.Windows.Forms.Label();
|
||||||
|
this.sellableCheckBox = new System.Windows.Forms.CheckBox();
|
||||||
|
this.rebuildCheckBox = new System.Windows.Forms.CheckBox();
|
||||||
|
this.tableLayoutPanel1.SuspendLayout();
|
||||||
|
((System.ComponentModel.ISupportInitialize)(this.strengthNud)).BeginInit();
|
||||||
|
((System.ComponentModel.ISupportInitialize)(this.basePriorityNud)).BeginInit();
|
||||||
|
this.SuspendLayout();
|
||||||
|
//
|
||||||
|
// tableLayoutPanel1
|
||||||
|
//
|
||||||
|
this.tableLayoutPanel1.ColumnCount = 2;
|
||||||
|
this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 31.25F));
|
||||||
|
this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 68.75F));
|
||||||
|
this.tableLayoutPanel1.Controls.Add(this.label1, 0, 0);
|
||||||
|
this.tableLayoutPanel1.Controls.Add(this.label2, 0, 1);
|
||||||
|
this.tableLayoutPanel1.Controls.Add(this.directionLabel, 0, 2);
|
||||||
|
this.tableLayoutPanel1.Controls.Add(this.missionLabel, 0, 3);
|
||||||
|
this.tableLayoutPanel1.Controls.Add(this.label5, 0, 4);
|
||||||
|
this.tableLayoutPanel1.Controls.Add(this.houseComboBox, 1, 0);
|
||||||
|
this.tableLayoutPanel1.Controls.Add(this.strengthNud, 1, 1);
|
||||||
|
this.tableLayoutPanel1.Controls.Add(this.directionComboBox, 1, 2);
|
||||||
|
this.tableLayoutPanel1.Controls.Add(this.missionComboBox, 1, 3);
|
||||||
|
this.tableLayoutPanel1.Controls.Add(this.triggerComboBox, 1, 4);
|
||||||
|
this.tableLayoutPanel1.Controls.Add(this.basePriorityNud, 1, 5);
|
||||||
|
this.tableLayoutPanel1.Controls.Add(this.prebuiltCheckBox, 1, 7);
|
||||||
|
this.tableLayoutPanel1.Controls.Add(this.basePriorityLabel, 0, 5);
|
||||||
|
this.tableLayoutPanel1.Controls.Add(this.sellableCheckBox, 1, 8);
|
||||||
|
this.tableLayoutPanel1.Controls.Add(this.rebuildCheckBox, 1, 9);
|
||||||
|
this.tableLayoutPanel1.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||||
|
this.tableLayoutPanel1.Location = new System.Drawing.Point(0, 0);
|
||||||
|
this.tableLayoutPanel1.Margin = new System.Windows.Forms.Padding(4);
|
||||||
|
this.tableLayoutPanel1.Name = "tableLayoutPanel1";
|
||||||
|
this.tableLayoutPanel1.RowCount = 11;
|
||||||
|
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle());
|
||||||
|
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle());
|
||||||
|
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle());
|
||||||
|
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle());
|
||||||
|
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle());
|
||||||
|
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle());
|
||||||
|
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle());
|
||||||
|
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle());
|
||||||
|
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle());
|
||||||
|
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle());
|
||||||
|
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100F));
|
||||||
|
this.tableLayoutPanel1.Size = new System.Drawing.Size(299, 262);
|
||||||
|
this.tableLayoutPanel1.TabIndex = 0;
|
||||||
|
//
|
||||||
|
// label1
|
||||||
|
//
|
||||||
|
this.label1.AutoSize = true;
|
||||||
|
this.label1.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||||
|
this.label1.Location = new System.Drawing.Point(4, 0);
|
||||||
|
this.label1.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
|
||||||
|
this.label1.Name = "label1";
|
||||||
|
this.label1.Size = new System.Drawing.Size(85, 32);
|
||||||
|
this.label1.TabIndex = 0;
|
||||||
|
this.label1.Text = "House";
|
||||||
|
this.label1.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
|
||||||
|
//
|
||||||
|
// label2
|
||||||
|
//
|
||||||
|
this.label2.AutoSize = true;
|
||||||
|
this.label2.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||||
|
this.label2.Location = new System.Drawing.Point(4, 32);
|
||||||
|
this.label2.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
|
||||||
|
this.label2.Name = "label2";
|
||||||
|
this.label2.Size = new System.Drawing.Size(85, 30);
|
||||||
|
this.label2.TabIndex = 1;
|
||||||
|
this.label2.Text = "Strength";
|
||||||
|
this.label2.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
|
||||||
|
//
|
||||||
|
// directionLabel
|
||||||
|
//
|
||||||
|
this.directionLabel.AutoSize = true;
|
||||||
|
this.directionLabel.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||||
|
this.directionLabel.Location = new System.Drawing.Point(4, 62);
|
||||||
|
this.directionLabel.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
|
||||||
|
this.directionLabel.Name = "directionLabel";
|
||||||
|
this.directionLabel.Size = new System.Drawing.Size(85, 32);
|
||||||
|
this.directionLabel.TabIndex = 2;
|
||||||
|
this.directionLabel.Text = "Direction";
|
||||||
|
this.directionLabel.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
|
||||||
|
//
|
||||||
|
// missionLabel
|
||||||
|
//
|
||||||
|
this.missionLabel.AutoSize = true;
|
||||||
|
this.missionLabel.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||||
|
this.missionLabel.Location = new System.Drawing.Point(4, 94);
|
||||||
|
this.missionLabel.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
|
||||||
|
this.missionLabel.Name = "missionLabel";
|
||||||
|
this.missionLabel.Size = new System.Drawing.Size(85, 32);
|
||||||
|
this.missionLabel.TabIndex = 3;
|
||||||
|
this.missionLabel.Text = "Mission";
|
||||||
|
this.missionLabel.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
|
||||||
|
//
|
||||||
|
// label5
|
||||||
|
//
|
||||||
|
this.label5.AutoSize = true;
|
||||||
|
this.label5.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||||
|
this.label5.Location = new System.Drawing.Point(4, 126);
|
||||||
|
this.label5.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
|
||||||
|
this.label5.Name = "label5";
|
||||||
|
this.label5.Size = new System.Drawing.Size(85, 32);
|
||||||
|
this.label5.TabIndex = 4;
|
||||||
|
this.label5.Text = "Trigger";
|
||||||
|
this.label5.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
|
||||||
|
//
|
||||||
|
// houseComboBox
|
||||||
|
//
|
||||||
|
this.houseComboBox.DisplayMember = "Name";
|
||||||
|
this.houseComboBox.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||||
|
this.houseComboBox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
|
||||||
|
this.houseComboBox.FormattingEnabled = true;
|
||||||
|
this.houseComboBox.Location = new System.Drawing.Point(97, 4);
|
||||||
|
this.houseComboBox.Margin = new System.Windows.Forms.Padding(4);
|
||||||
|
this.houseComboBox.Name = "houseComboBox";
|
||||||
|
this.houseComboBox.Size = new System.Drawing.Size(198, 24);
|
||||||
|
this.houseComboBox.TabIndex = 5;
|
||||||
|
this.houseComboBox.ValueMember = "Type";
|
||||||
|
this.houseComboBox.SelectedIndexChanged += new System.EventHandler(this.comboBox_SelectedValueChanged);
|
||||||
|
//
|
||||||
|
// strengthNud
|
||||||
|
//
|
||||||
|
this.strengthNud.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||||
|
this.strengthNud.Location = new System.Drawing.Point(97, 36);
|
||||||
|
this.strengthNud.Margin = new System.Windows.Forms.Padding(4);
|
||||||
|
this.strengthNud.Maximum = new decimal(new int[] {
|
||||||
|
256,
|
||||||
|
0,
|
||||||
|
0,
|
||||||
|
0});
|
||||||
|
this.strengthNud.Minimum = new decimal(new int[] {
|
||||||
|
1,
|
||||||
|
0,
|
||||||
|
0,
|
||||||
|
0});
|
||||||
|
this.strengthNud.Name = "strengthNud";
|
||||||
|
this.strengthNud.Size = new System.Drawing.Size(198, 22);
|
||||||
|
this.strengthNud.TabIndex = 6;
|
||||||
|
this.strengthNud.Value = new decimal(new int[] {
|
||||||
|
256,
|
||||||
|
0,
|
||||||
|
0,
|
||||||
|
0});
|
||||||
|
this.strengthNud.ValueChanged += new System.EventHandler(this.nud_ValueChanged);
|
||||||
|
//
|
||||||
|
// directionComboBox
|
||||||
|
//
|
||||||
|
this.directionComboBox.DisplayMember = "Name";
|
||||||
|
this.directionComboBox.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||||
|
this.directionComboBox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
|
||||||
|
this.directionComboBox.FormattingEnabled = true;
|
||||||
|
this.directionComboBox.Location = new System.Drawing.Point(97, 66);
|
||||||
|
this.directionComboBox.Margin = new System.Windows.Forms.Padding(4);
|
||||||
|
this.directionComboBox.Name = "directionComboBox";
|
||||||
|
this.directionComboBox.Size = new System.Drawing.Size(198, 24);
|
||||||
|
this.directionComboBox.TabIndex = 7;
|
||||||
|
this.directionComboBox.ValueMember = "Type";
|
||||||
|
this.directionComboBox.SelectedIndexChanged += new System.EventHandler(this.comboBox_SelectedValueChanged);
|
||||||
|
//
|
||||||
|
// missionComboBox
|
||||||
|
//
|
||||||
|
this.missionComboBox.DisplayMember = "Name";
|
||||||
|
this.missionComboBox.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||||
|
this.missionComboBox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
|
||||||
|
this.missionComboBox.FormattingEnabled = true;
|
||||||
|
this.missionComboBox.Location = new System.Drawing.Point(97, 98);
|
||||||
|
this.missionComboBox.Margin = new System.Windows.Forms.Padding(4);
|
||||||
|
this.missionComboBox.Name = "missionComboBox";
|
||||||
|
this.missionComboBox.Size = new System.Drawing.Size(198, 24);
|
||||||
|
this.missionComboBox.TabIndex = 8;
|
||||||
|
this.missionComboBox.ValueMember = "Type";
|
||||||
|
this.missionComboBox.SelectedIndexChanged += new System.EventHandler(this.comboBox_SelectedValueChanged);
|
||||||
|
//
|
||||||
|
// triggerComboBox
|
||||||
|
//
|
||||||
|
this.triggerComboBox.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||||
|
this.triggerComboBox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
|
||||||
|
this.triggerComboBox.FormattingEnabled = true;
|
||||||
|
this.triggerComboBox.Location = new System.Drawing.Point(97, 130);
|
||||||
|
this.triggerComboBox.Margin = new System.Windows.Forms.Padding(4);
|
||||||
|
this.triggerComboBox.Name = "triggerComboBox";
|
||||||
|
this.triggerComboBox.Size = new System.Drawing.Size(198, 24);
|
||||||
|
this.triggerComboBox.TabIndex = 9;
|
||||||
|
this.triggerComboBox.SelectedIndexChanged += new System.EventHandler(this.comboBox_SelectedValueChanged);
|
||||||
|
//
|
||||||
|
// basePriorityNud
|
||||||
|
//
|
||||||
|
this.basePriorityNud.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||||
|
this.basePriorityNud.Location = new System.Drawing.Point(96, 160);
|
||||||
|
this.basePriorityNud.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
|
||||||
|
this.basePriorityNud.Maximum = new decimal(new int[] {
|
||||||
|
2147483647,
|
||||||
|
0,
|
||||||
|
0,
|
||||||
|
0});
|
||||||
|
this.basePriorityNud.Minimum = new decimal(new int[] {
|
||||||
|
1,
|
||||||
|
0,
|
||||||
|
0,
|
||||||
|
-2147483648});
|
||||||
|
this.basePriorityNud.Name = "basePriorityNud";
|
||||||
|
this.basePriorityNud.Size = new System.Drawing.Size(200, 22);
|
||||||
|
this.basePriorityNud.TabIndex = 11;
|
||||||
|
this.basePriorityNud.ValueChanged += new System.EventHandler(this.nud_ValueChanged);
|
||||||
|
//
|
||||||
|
// prebuiltCheckBox
|
||||||
|
//
|
||||||
|
this.prebuiltCheckBox.AutoSize = true;
|
||||||
|
this.prebuiltCheckBox.Location = new System.Drawing.Point(96, 186);
|
||||||
|
this.prebuiltCheckBox.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
|
||||||
|
this.prebuiltCheckBox.Name = "prebuiltCheckBox";
|
||||||
|
this.prebuiltCheckBox.Size = new System.Drawing.Size(78, 21);
|
||||||
|
this.prebuiltCheckBox.TabIndex = 12;
|
||||||
|
this.prebuiltCheckBox.Text = "Prebuilt";
|
||||||
|
this.prebuiltCheckBox.UseVisualStyleBackColor = true;
|
||||||
|
this.prebuiltCheckBox.CheckedChanged += new System.EventHandler(this.checkBox_CheckedChanged);
|
||||||
|
//
|
||||||
|
// basePriorityLabel
|
||||||
|
//
|
||||||
|
this.basePriorityLabel.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||||
|
this.basePriorityLabel.Location = new System.Drawing.Point(3, 158);
|
||||||
|
this.basePriorityLabel.Name = "basePriorityLabel";
|
||||||
|
this.basePriorityLabel.Size = new System.Drawing.Size(87, 26);
|
||||||
|
this.basePriorityLabel.TabIndex = 13;
|
||||||
|
this.basePriorityLabel.Text = "Base Priority";
|
||||||
|
this.basePriorityLabel.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
|
||||||
|
//
|
||||||
|
// sellableCheckBox
|
||||||
|
//
|
||||||
|
this.sellableCheckBox.AutoSize = true;
|
||||||
|
this.sellableCheckBox.Location = new System.Drawing.Point(96, 211);
|
||||||
|
this.sellableCheckBox.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
|
||||||
|
this.sellableCheckBox.Name = "sellableCheckBox";
|
||||||
|
this.sellableCheckBox.Size = new System.Drawing.Size(80, 21);
|
||||||
|
this.sellableCheckBox.TabIndex = 14;
|
||||||
|
this.sellableCheckBox.Text = "Sellable";
|
||||||
|
this.sellableCheckBox.UseVisualStyleBackColor = true;
|
||||||
|
this.sellableCheckBox.CheckedChanged += new System.EventHandler(this.checkBox_CheckedChanged);
|
||||||
|
//
|
||||||
|
// rebuildCheckBox
|
||||||
|
//
|
||||||
|
this.rebuildCheckBox.AutoSize = true;
|
||||||
|
this.rebuildCheckBox.Location = new System.Drawing.Point(96, 236);
|
||||||
|
this.rebuildCheckBox.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
|
||||||
|
this.rebuildCheckBox.Name = "rebuildCheckBox";
|
||||||
|
this.rebuildCheckBox.Size = new System.Drawing.Size(78, 21);
|
||||||
|
this.rebuildCheckBox.TabIndex = 15;
|
||||||
|
this.rebuildCheckBox.Text = "Rebuild";
|
||||||
|
this.rebuildCheckBox.UseVisualStyleBackColor = true;
|
||||||
|
this.rebuildCheckBox.CheckedChanged += new System.EventHandler(this.checkBox_CheckedChanged);
|
||||||
|
//
|
||||||
|
// ObjectProperties
|
||||||
|
//
|
||||||
|
this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 16F);
|
||||||
|
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||||
|
this.Controls.Add(this.tableLayoutPanel1);
|
||||||
|
this.Margin = new System.Windows.Forms.Padding(4);
|
||||||
|
this.Name = "ObjectProperties";
|
||||||
|
this.Size = new System.Drawing.Size(299, 262);
|
||||||
|
this.tableLayoutPanel1.ResumeLayout(false);
|
||||||
|
this.tableLayoutPanel1.PerformLayout();
|
||||||
|
((System.ComponentModel.ISupportInitialize)(this.strengthNud)).EndInit();
|
||||||
|
((System.ComponentModel.ISupportInitialize)(this.basePriorityNud)).EndInit();
|
||||||
|
this.ResumeLayout(false);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
private System.Windows.Forms.TableLayoutPanel tableLayoutPanel1;
|
||||||
|
private System.Windows.Forms.Label label1;
|
||||||
|
private System.Windows.Forms.Label label2;
|
||||||
|
private System.Windows.Forms.Label directionLabel;
|
||||||
|
private System.Windows.Forms.Label missionLabel;
|
||||||
|
private System.Windows.Forms.Label label5;
|
||||||
|
private MobiusEditor.Controls.PropertiesComboBox houseComboBox;
|
||||||
|
private System.Windows.Forms.NumericUpDown strengthNud;
|
||||||
|
private MobiusEditor.Controls.PropertiesComboBox directionComboBox;
|
||||||
|
private MobiusEditor.Controls.PropertiesComboBox missionComboBox;
|
||||||
|
private MobiusEditor.Controls.PropertiesComboBox triggerComboBox;
|
||||||
|
private System.Windows.Forms.NumericUpDown basePriorityNud;
|
||||||
|
private System.Windows.Forms.CheckBox prebuiltCheckBox;
|
||||||
|
private System.Windows.Forms.Label basePriorityLabel;
|
||||||
|
private System.Windows.Forms.CheckBox sellableCheckBox;
|
||||||
|
private System.Windows.Forms.CheckBox rebuildCheckBox;
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,272 @@
|
||||||
|
//
|
||||||
|
// Copyright 2020 Electronic Arts Inc.
|
||||||
|
//
|
||||||
|
// The Command & Conquer Map Editor and corresponding source code is free
|
||||||
|
// software: you can redistribute it and/or modify it under the terms of
|
||||||
|
// the GNU General Public License as published by the Free Software Foundation,
|
||||||
|
// either version 3 of the License, or (at your option) any later version.
|
||||||
|
|
||||||
|
// The Command & Conquer Map Editor and corresponding source code is distributed
|
||||||
|
// in the hope that it will be useful, but with permitted additional restrictions
|
||||||
|
// under Section 7 of the GPL. See the GNU General Public License in LICENSE.TXT
|
||||||
|
// distributed with this program. You should have received a copy of the
|
||||||
|
// GNU General Public License along with permitted additional restrictions
|
||||||
|
// with this program. If not, see https://github.com/electronicarts/CnC_Remastered_Collection
|
||||||
|
using MobiusEditor.Interface;
|
||||||
|
using MobiusEditor.Model;
|
||||||
|
using MobiusEditor.Utility;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Specialized;
|
||||||
|
using System.ComponentModel;
|
||||||
|
using System.Data;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Windows.Forms;
|
||||||
|
|
||||||
|
namespace MobiusEditor.Controls
|
||||||
|
{
|
||||||
|
public partial class ObjectProperties : UserControl
|
||||||
|
{
|
||||||
|
private bool isMockObject;
|
||||||
|
|
||||||
|
public IGamePlugin Plugin { get; private set; }
|
||||||
|
|
||||||
|
private INotifyPropertyChanged obj;
|
||||||
|
public INotifyPropertyChanged Object
|
||||||
|
{
|
||||||
|
get => obj;
|
||||||
|
set
|
||||||
|
{
|
||||||
|
if (obj != value)
|
||||||
|
{
|
||||||
|
if (obj != null)
|
||||||
|
{
|
||||||
|
obj.PropertyChanged -= Obj_PropertyChanged;
|
||||||
|
}
|
||||||
|
|
||||||
|
obj = value;
|
||||||
|
|
||||||
|
if (obj != null)
|
||||||
|
{
|
||||||
|
obj.PropertyChanged += Obj_PropertyChanged;
|
||||||
|
}
|
||||||
|
|
||||||
|
Rebind();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public ObjectProperties()
|
||||||
|
{
|
||||||
|
InitializeComponent();
|
||||||
|
}
|
||||||
|
|
||||||
|
public void Initialize(IGamePlugin plugin, bool isMockObject)
|
||||||
|
{
|
||||||
|
this.isMockObject = isMockObject;
|
||||||
|
|
||||||
|
Plugin = plugin;
|
||||||
|
plugin.Map.Triggers.CollectionChanged += Triggers_CollectionChanged;
|
||||||
|
|
||||||
|
houseComboBox.DataSource = plugin.Map.Houses.Select(t => new TypeItem<HouseType>(t.Type.Name, t.Type)).ToArray();
|
||||||
|
missionComboBox.DataSource = plugin.Map.MissionTypes;
|
||||||
|
|
||||||
|
UpdateDataSource();
|
||||||
|
|
||||||
|
Disposed += (sender, e) =>
|
||||||
|
{
|
||||||
|
Object = null;
|
||||||
|
plugin.Map.Triggers.CollectionChanged -= Triggers_CollectionChanged;
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
private void Triggers_CollectionChanged(object sender, NotifyCollectionChangedEventArgs e)
|
||||||
|
{
|
||||||
|
UpdateDataSource();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void UpdateDataSource()
|
||||||
|
{
|
||||||
|
triggerComboBox.DataSource = Trigger.None.Yield().Concat(Plugin.Map.Triggers.Select(t => t.Name).Distinct()).ToArray();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void Rebind()
|
||||||
|
{
|
||||||
|
houseComboBox.DataBindings.Clear();
|
||||||
|
strengthNud.DataBindings.Clear();
|
||||||
|
directionComboBox.DataBindings.Clear();
|
||||||
|
missionComboBox.DataBindings.Clear();
|
||||||
|
triggerComboBox.DataBindings.Clear();
|
||||||
|
basePriorityNud.DataBindings.Clear();
|
||||||
|
prebuiltCheckBox.DataBindings.Clear();
|
||||||
|
sellableCheckBox.DataBindings.Clear();
|
||||||
|
rebuildCheckBox.DataBindings.Clear();
|
||||||
|
|
||||||
|
if (obj == null)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
switch (obj)
|
||||||
|
{
|
||||||
|
case Infantry infantry:
|
||||||
|
{
|
||||||
|
houseComboBox.Enabled = true;
|
||||||
|
directionComboBox.DataSource = Plugin.Map.DirectionTypes
|
||||||
|
.Where(t => t.Facing != FacingType.None)
|
||||||
|
.Select(t => new TypeItem<DirectionType>(t.Name, t)).ToArray();
|
||||||
|
|
||||||
|
missionComboBox.DataBindings.Add("SelectedItem", obj, "Mission");
|
||||||
|
missionLabel.Visible = missionComboBox.Visible = true;
|
||||||
|
basePriorityLabel.Visible = basePriorityNud.Visible = false;
|
||||||
|
prebuiltCheckBox.Visible = false;
|
||||||
|
sellableCheckBox.Visible = false;
|
||||||
|
rebuildCheckBox.Visible = false;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case Unit unit:
|
||||||
|
{
|
||||||
|
houseComboBox.Enabled = true;
|
||||||
|
directionComboBox.DataSource = Plugin.Map.DirectionTypes.Select(t => new TypeItem<DirectionType>(t.Name, t)).ToArray();
|
||||||
|
missionComboBox.DataBindings.Add("SelectedItem", obj, "Mission");
|
||||||
|
missionLabel.Visible = missionComboBox.Visible = true;
|
||||||
|
basePriorityLabel.Visible = basePriorityNud.Visible = false;
|
||||||
|
prebuiltCheckBox.Visible = false;
|
||||||
|
sellableCheckBox.Visible = false;
|
||||||
|
rebuildCheckBox.Visible = false;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case Building building:
|
||||||
|
{
|
||||||
|
houseComboBox.Enabled = building.IsPrebuilt;
|
||||||
|
directionComboBox.DataSource = Plugin.Map.DirectionTypes.Select(t => new TypeItem<DirectionType>(t.Name, t)).ToArray();
|
||||||
|
directionComboBox.Visible = (building.Type != null) && building.Type.HasTurret;
|
||||||
|
missionLabel.Visible = missionComboBox.Visible = false;
|
||||||
|
basePriorityLabel.Visible = basePriorityNud.Visible = true;
|
||||||
|
prebuiltCheckBox.Visible = true;
|
||||||
|
prebuiltCheckBox.Enabled = building.BasePriority >= 0;
|
||||||
|
|
||||||
|
basePriorityNud.DataBindings.Add("Value", obj, "BasePriority");
|
||||||
|
prebuiltCheckBox.DataBindings.Add("Checked", obj, "IsPrebuilt");
|
||||||
|
|
||||||
|
switch (Plugin.GameType)
|
||||||
|
{
|
||||||
|
case GameType.TiberianDawn:
|
||||||
|
{
|
||||||
|
sellableCheckBox.Visible = false;
|
||||||
|
rebuildCheckBox.Visible = false;
|
||||||
|
} break;
|
||||||
|
case GameType.RedAlert:
|
||||||
|
{
|
||||||
|
sellableCheckBox.DataBindings.Add("Checked", obj, "Sellable");
|
||||||
|
rebuildCheckBox.DataBindings.Add("Checked", obj, "Rebuild");
|
||||||
|
sellableCheckBox.Visible = true;
|
||||||
|
rebuildCheckBox.Visible = true;
|
||||||
|
} break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
houseComboBox.DataBindings.Add("SelectedValue", obj, "House");
|
||||||
|
strengthNud.DataBindings.Add("Value", obj, "Strength");
|
||||||
|
directionComboBox.DataBindings.Add("SelectedValue", obj, "Direction");
|
||||||
|
triggerComboBox.DataBindings.Add("SelectedItem", obj, "Trigger");
|
||||||
|
}
|
||||||
|
|
||||||
|
private void Obj_PropertyChanged(object sender, PropertyChangedEventArgs e)
|
||||||
|
{
|
||||||
|
switch (e.PropertyName)
|
||||||
|
{
|
||||||
|
case "Type":
|
||||||
|
{
|
||||||
|
Rebind();
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case "BasePriority":
|
||||||
|
{
|
||||||
|
if (obj is Building building)
|
||||||
|
{
|
||||||
|
prebuiltCheckBox.Enabled = building.BasePriority >= 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case "IsPrebuilt":
|
||||||
|
{
|
||||||
|
if (obj is Building building)
|
||||||
|
{
|
||||||
|
if (!building.IsPrebuilt)
|
||||||
|
{
|
||||||
|
var basePlayer = Plugin.Map.HouseTypes.Where(h => h.Equals(Plugin.Map.BasicSection.BasePlayer)).FirstOrDefault() ?? Plugin.Map.HouseTypes.First();
|
||||||
|
building.House = basePlayer;
|
||||||
|
}
|
||||||
|
houseComboBox.Enabled = building.IsPrebuilt;
|
||||||
|
}
|
||||||
|
} break;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!isMockObject)
|
||||||
|
{
|
||||||
|
Plugin.Dirty = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void comboBox_SelectedValueChanged(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
foreach (Binding binding in (sender as ComboBox).DataBindings)
|
||||||
|
{
|
||||||
|
binding.WriteValue();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void nud_ValueChanged(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
foreach (Binding binding in (sender as NumericUpDown).DataBindings)
|
||||||
|
{
|
||||||
|
binding.WriteValue();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void checkBox_CheckedChanged(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
foreach (Binding binding in (sender as CheckBox).DataBindings)
|
||||||
|
{
|
||||||
|
binding.WriteValue();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public class ObjectPropertiesPopup : ToolStripDropDown
|
||||||
|
{
|
||||||
|
private readonly ToolStripControlHost host;
|
||||||
|
|
||||||
|
public ObjectProperties ObjectProperties { get; private set; }
|
||||||
|
|
||||||
|
public ObjectPropertiesPopup(IGamePlugin plugin, INotifyPropertyChanged obj)
|
||||||
|
{
|
||||||
|
ObjectProperties = new ObjectProperties();
|
||||||
|
ObjectProperties.Initialize(plugin, false);
|
||||||
|
ObjectProperties.Object = obj;
|
||||||
|
|
||||||
|
host = new ToolStripControlHost(ObjectProperties);
|
||||||
|
Padding = Margin = host.Padding = host.Margin = Padding.Empty;
|
||||||
|
MinimumSize = ObjectProperties.MinimumSize;
|
||||||
|
ObjectProperties.MinimumSize = ObjectProperties.Size;
|
||||||
|
MaximumSize = ObjectProperties.MaximumSize;
|
||||||
|
ObjectProperties.MaximumSize = ObjectProperties.Size;
|
||||||
|
Size = ObjectProperties.Size;
|
||||||
|
Items.Add(host);
|
||||||
|
ObjectProperties.Disposed += (sender, e) =>
|
||||||
|
{
|
||||||
|
ObjectProperties = null;
|
||||||
|
Dispose(true);
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
protected override void OnClosed(ToolStripDropDownClosedEventArgs e)
|
||||||
|
{
|
||||||
|
base.OnClosed(e);
|
||||||
|
|
||||||
|
ObjectProperties.Object = null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -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>
|
|
@ -0,0 +1,375 @@
|
||||||
|
//
|
||||||
|
// Copyright 2020 Electronic Arts Inc.
|
||||||
|
//
|
||||||
|
// The Command & Conquer Map Editor and corresponding source code is free
|
||||||
|
// software: you can redistribute it and/or modify it under the terms of
|
||||||
|
// the GNU General Public License as published by the Free Software Foundation,
|
||||||
|
// either version 3 of the License, or (at your option) any later version.
|
||||||
|
|
||||||
|
// The Command & Conquer Map Editor and corresponding source code is distributed
|
||||||
|
// in the hope that it will be useful, but with permitted additional restrictions
|
||||||
|
// under Section 7 of the GPL. See the GNU General Public License in LICENSE.TXT
|
||||||
|
// distributed with this program. You should have received a copy of the
|
||||||
|
// GNU General Public License along with permitted additional restrictions
|
||||||
|
// with this program. If not, see https://github.com/electronicarts/CnC_Remastered_Collection
|
||||||
|
namespace MobiusEditor.Controls
|
||||||
|
{
|
||||||
|
partial class PlayerSettings
|
||||||
|
{
|
||||||
|
/// <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 Component 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.tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel();
|
||||||
|
this.iqNud = new System.Windows.Forms.NumericUpDown();
|
||||||
|
this.techLevelNud = new System.Windows.Forms.NumericUpDown();
|
||||||
|
this.maxVesselsNud = new System.Windows.Forms.NumericUpDown();
|
||||||
|
this.maxInfantryNud = new System.Windows.Forms.NumericUpDown();
|
||||||
|
this.iqLbl = new System.Windows.Forms.Label();
|
||||||
|
this.techLevelLbl = new System.Windows.Forms.Label();
|
||||||
|
this.maxVesselsLbl = new System.Windows.Forms.Label();
|
||||||
|
this.maxInfantryLbl = new System.Windows.Forms.Label();
|
||||||
|
this.label1 = new System.Windows.Forms.Label();
|
||||||
|
this.edgeComboBox = new System.Windows.Forms.ComboBox();
|
||||||
|
this.label2 = new System.Windows.Forms.Label();
|
||||||
|
this.creditsNud = new System.Windows.Forms.NumericUpDown();
|
||||||
|
this.label3 = new System.Windows.Forms.Label();
|
||||||
|
this.label4 = new System.Windows.Forms.Label();
|
||||||
|
this.maxBuildingsNud = new System.Windows.Forms.NumericUpDown();
|
||||||
|
this.maxUnitsNud = new System.Windows.Forms.NumericUpDown();
|
||||||
|
this.label5 = new System.Windows.Forms.Label();
|
||||||
|
this.playersListBox = new System.Windows.Forms.ListBox();
|
||||||
|
this.playerControlLbl = new System.Windows.Forms.Label();
|
||||||
|
this.playerControlCheckBox = new System.Windows.Forms.CheckBox();
|
||||||
|
this.tableLayoutPanel1.SuspendLayout();
|
||||||
|
((System.ComponentModel.ISupportInitialize)(this.iqNud)).BeginInit();
|
||||||
|
((System.ComponentModel.ISupportInitialize)(this.techLevelNud)).BeginInit();
|
||||||
|
((System.ComponentModel.ISupportInitialize)(this.maxVesselsNud)).BeginInit();
|
||||||
|
((System.ComponentModel.ISupportInitialize)(this.maxInfantryNud)).BeginInit();
|
||||||
|
((System.ComponentModel.ISupportInitialize)(this.creditsNud)).BeginInit();
|
||||||
|
((System.ComponentModel.ISupportInitialize)(this.maxBuildingsNud)).BeginInit();
|
||||||
|
((System.ComponentModel.ISupportInitialize)(this.maxUnitsNud)).BeginInit();
|
||||||
|
this.SuspendLayout();
|
||||||
|
//
|
||||||
|
// tableLayoutPanel1
|
||||||
|
//
|
||||||
|
this.tableLayoutPanel1.AutoSize = true;
|
||||||
|
this.tableLayoutPanel1.ColumnCount = 2;
|
||||||
|
this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle());
|
||||||
|
this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle());
|
||||||
|
this.tableLayoutPanel1.Controls.Add(this.playerControlLbl, 0, 8);
|
||||||
|
this.tableLayoutPanel1.Controls.Add(this.iqNud, 1, 7);
|
||||||
|
this.tableLayoutPanel1.Controls.Add(this.techLevelNud, 1, 6);
|
||||||
|
this.tableLayoutPanel1.Controls.Add(this.maxVesselsNud, 1, 5);
|
||||||
|
this.tableLayoutPanel1.Controls.Add(this.maxInfantryNud, 1, 4);
|
||||||
|
this.tableLayoutPanel1.Controls.Add(this.iqLbl, 0, 7);
|
||||||
|
this.tableLayoutPanel1.Controls.Add(this.techLevelLbl, 0, 6);
|
||||||
|
this.tableLayoutPanel1.Controls.Add(this.maxVesselsLbl, 0, 5);
|
||||||
|
this.tableLayoutPanel1.Controls.Add(this.maxInfantryLbl, 0, 4);
|
||||||
|
this.tableLayoutPanel1.Controls.Add(this.label1, 0, 0);
|
||||||
|
this.tableLayoutPanel1.Controls.Add(this.edgeComboBox, 1, 0);
|
||||||
|
this.tableLayoutPanel1.Controls.Add(this.label2, 0, 1);
|
||||||
|
this.tableLayoutPanel1.Controls.Add(this.creditsNud, 1, 1);
|
||||||
|
this.tableLayoutPanel1.Controls.Add(this.label3, 0, 2);
|
||||||
|
this.tableLayoutPanel1.Controls.Add(this.label4, 0, 3);
|
||||||
|
this.tableLayoutPanel1.Controls.Add(this.maxBuildingsNud, 1, 2);
|
||||||
|
this.tableLayoutPanel1.Controls.Add(this.maxUnitsNud, 1, 3);
|
||||||
|
this.tableLayoutPanel1.Controls.Add(this.label5, 0, 9);
|
||||||
|
this.tableLayoutPanel1.Controls.Add(this.playersListBox, 1, 9);
|
||||||
|
this.tableLayoutPanel1.Controls.Add(this.playerControlCheckBox, 1, 8);
|
||||||
|
this.tableLayoutPanel1.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||||
|
this.tableLayoutPanel1.Location = new System.Drawing.Point(0, 0);
|
||||||
|
this.tableLayoutPanel1.Name = "tableLayoutPanel1";
|
||||||
|
this.tableLayoutPanel1.RowCount = 10;
|
||||||
|
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle());
|
||||||
|
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle());
|
||||||
|
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle());
|
||||||
|
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle());
|
||||||
|
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle());
|
||||||
|
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle());
|
||||||
|
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle());
|
||||||
|
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle());
|
||||||
|
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle());
|
||||||
|
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle());
|
||||||
|
this.tableLayoutPanel1.Size = new System.Drawing.Size(329, 372);
|
||||||
|
this.tableLayoutPanel1.TabIndex = 2;
|
||||||
|
//
|
||||||
|
// iqNud
|
||||||
|
//
|
||||||
|
this.iqNud.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||||
|
this.iqNud.Location = new System.Drawing.Point(81, 186);
|
||||||
|
this.iqNud.Maximum = new decimal(new int[] {
|
||||||
|
2147483647,
|
||||||
|
0,
|
||||||
|
0,
|
||||||
|
0});
|
||||||
|
this.iqNud.Name = "iqNud";
|
||||||
|
this.iqNud.Size = new System.Drawing.Size(245, 20);
|
||||||
|
this.iqNud.TabIndex = 26;
|
||||||
|
//
|
||||||
|
// techLevelNud
|
||||||
|
//
|
||||||
|
this.techLevelNud.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||||
|
this.techLevelNud.Location = new System.Drawing.Point(81, 160);
|
||||||
|
this.techLevelNud.Maximum = new decimal(new int[] {
|
||||||
|
2147483647,
|
||||||
|
0,
|
||||||
|
0,
|
||||||
|
0});
|
||||||
|
this.techLevelNud.Name = "techLevelNud";
|
||||||
|
this.techLevelNud.Size = new System.Drawing.Size(245, 20);
|
||||||
|
this.techLevelNud.TabIndex = 25;
|
||||||
|
//
|
||||||
|
// maxVesselsNud
|
||||||
|
//
|
||||||
|
this.maxVesselsNud.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||||
|
this.maxVesselsNud.Location = new System.Drawing.Point(81, 134);
|
||||||
|
this.maxVesselsNud.Maximum = new decimal(new int[] {
|
||||||
|
2147483647,
|
||||||
|
0,
|
||||||
|
0,
|
||||||
|
0});
|
||||||
|
this.maxVesselsNud.Name = "maxVesselsNud";
|
||||||
|
this.maxVesselsNud.Size = new System.Drawing.Size(245, 20);
|
||||||
|
this.maxVesselsNud.TabIndex = 24;
|
||||||
|
//
|
||||||
|
// maxInfantryNud
|
||||||
|
//
|
||||||
|
this.maxInfantryNud.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||||
|
this.maxInfantryNud.Location = new System.Drawing.Point(81, 108);
|
||||||
|
this.maxInfantryNud.Maximum = new decimal(new int[] {
|
||||||
|
2147483647,
|
||||||
|
0,
|
||||||
|
0,
|
||||||
|
0});
|
||||||
|
this.maxInfantryNud.Name = "maxInfantryNud";
|
||||||
|
this.maxInfantryNud.Size = new System.Drawing.Size(245, 20);
|
||||||
|
this.maxInfantryNud.TabIndex = 23;
|
||||||
|
//
|
||||||
|
// iqLbl
|
||||||
|
//
|
||||||
|
this.iqLbl.AutoSize = true;
|
||||||
|
this.iqLbl.Location = new System.Drawing.Point(3, 183);
|
||||||
|
this.iqLbl.Name = "iqLbl";
|
||||||
|
this.iqLbl.Size = new System.Drawing.Size(18, 13);
|
||||||
|
this.iqLbl.TabIndex = 22;
|
||||||
|
this.iqLbl.Text = "IQ";
|
||||||
|
//
|
||||||
|
// techLevelLbl
|
||||||
|
//
|
||||||
|
this.techLevelLbl.AutoSize = true;
|
||||||
|
this.techLevelLbl.Location = new System.Drawing.Point(3, 157);
|
||||||
|
this.techLevelLbl.Name = "techLevelLbl";
|
||||||
|
this.techLevelLbl.Size = new System.Drawing.Size(61, 13);
|
||||||
|
this.techLevelLbl.TabIndex = 21;
|
||||||
|
this.techLevelLbl.Text = "Tech Level";
|
||||||
|
//
|
||||||
|
// maxVesselsLbl
|
||||||
|
//
|
||||||
|
this.maxVesselsLbl.AutoSize = true;
|
||||||
|
this.maxVesselsLbl.Location = new System.Drawing.Point(3, 131);
|
||||||
|
this.maxVesselsLbl.Name = "maxVesselsLbl";
|
||||||
|
this.maxVesselsLbl.Size = new System.Drawing.Size(66, 13);
|
||||||
|
this.maxVesselsLbl.TabIndex = 20;
|
||||||
|
this.maxVesselsLbl.Text = "Max Vessels";
|
||||||
|
//
|
||||||
|
// maxInfantryLbl
|
||||||
|
//
|
||||||
|
this.maxInfantryLbl.AutoSize = true;
|
||||||
|
this.maxInfantryLbl.Location = new System.Drawing.Point(3, 105);
|
||||||
|
this.maxInfantryLbl.Name = "maxInfantryLbl";
|
||||||
|
this.maxInfantryLbl.Size = new System.Drawing.Size(65, 13);
|
||||||
|
this.maxInfantryLbl.TabIndex = 19;
|
||||||
|
this.maxInfantryLbl.Text = "Max Infantry";
|
||||||
|
//
|
||||||
|
// label1
|
||||||
|
//
|
||||||
|
this.label1.AutoSize = true;
|
||||||
|
this.label1.Location = new System.Drawing.Point(3, 0);
|
||||||
|
this.label1.Name = "label1";
|
||||||
|
this.label1.Size = new System.Drawing.Size(32, 13);
|
||||||
|
this.label1.TabIndex = 0;
|
||||||
|
this.label1.Text = "Edge";
|
||||||
|
//
|
||||||
|
// edgeComboBox
|
||||||
|
//
|
||||||
|
this.edgeComboBox.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||||
|
this.edgeComboBox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
|
||||||
|
this.edgeComboBox.FormattingEnabled = true;
|
||||||
|
this.edgeComboBox.Location = new System.Drawing.Point(81, 3);
|
||||||
|
this.edgeComboBox.Name = "edgeComboBox";
|
||||||
|
this.edgeComboBox.Size = new System.Drawing.Size(245, 21);
|
||||||
|
this.edgeComboBox.TabIndex = 10;
|
||||||
|
//
|
||||||
|
// label2
|
||||||
|
//
|
||||||
|
this.label2.AutoSize = true;
|
||||||
|
this.label2.Location = new System.Drawing.Point(3, 27);
|
||||||
|
this.label2.Name = "label2";
|
||||||
|
this.label2.Size = new System.Drawing.Size(39, 13);
|
||||||
|
this.label2.TabIndex = 11;
|
||||||
|
this.label2.Text = "Credits";
|
||||||
|
//
|
||||||
|
// creditsNud
|
||||||
|
//
|
||||||
|
this.creditsNud.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||||
|
this.creditsNud.Location = new System.Drawing.Point(81, 30);
|
||||||
|
this.creditsNud.Maximum = new decimal(new int[] {
|
||||||
|
2147483647,
|
||||||
|
0,
|
||||||
|
0,
|
||||||
|
0});
|
||||||
|
this.creditsNud.Name = "creditsNud";
|
||||||
|
this.creditsNud.Size = new System.Drawing.Size(245, 20);
|
||||||
|
this.creditsNud.TabIndex = 12;
|
||||||
|
//
|
||||||
|
// label3
|
||||||
|
//
|
||||||
|
this.label3.AutoSize = true;
|
||||||
|
this.label3.Location = new System.Drawing.Point(3, 53);
|
||||||
|
this.label3.Name = "label3";
|
||||||
|
this.label3.Size = new System.Drawing.Size(72, 13);
|
||||||
|
this.label3.TabIndex = 13;
|
||||||
|
this.label3.Text = "Max Buildings";
|
||||||
|
//
|
||||||
|
// label4
|
||||||
|
//
|
||||||
|
this.label4.AutoSize = true;
|
||||||
|
this.label4.Location = new System.Drawing.Point(3, 79);
|
||||||
|
this.label4.Name = "label4";
|
||||||
|
this.label4.Size = new System.Drawing.Size(54, 13);
|
||||||
|
this.label4.TabIndex = 14;
|
||||||
|
this.label4.Text = "Max Units";
|
||||||
|
//
|
||||||
|
// maxBuildingsNud
|
||||||
|
//
|
||||||
|
this.maxBuildingsNud.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||||
|
this.maxBuildingsNud.Location = new System.Drawing.Point(81, 56);
|
||||||
|
this.maxBuildingsNud.Maximum = new decimal(new int[] {
|
||||||
|
2147483647,
|
||||||
|
0,
|
||||||
|
0,
|
||||||
|
0});
|
||||||
|
this.maxBuildingsNud.Name = "maxBuildingsNud";
|
||||||
|
this.maxBuildingsNud.Size = new System.Drawing.Size(245, 20);
|
||||||
|
this.maxBuildingsNud.TabIndex = 15;
|
||||||
|
//
|
||||||
|
// maxUnitsNud
|
||||||
|
//
|
||||||
|
this.maxUnitsNud.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||||
|
this.maxUnitsNud.Location = new System.Drawing.Point(81, 82);
|
||||||
|
this.maxUnitsNud.Maximum = new decimal(new int[] {
|
||||||
|
2147483647,
|
||||||
|
0,
|
||||||
|
0,
|
||||||
|
0});
|
||||||
|
this.maxUnitsNud.Name = "maxUnitsNud";
|
||||||
|
this.maxUnitsNud.Size = new System.Drawing.Size(245, 20);
|
||||||
|
this.maxUnitsNud.TabIndex = 16;
|
||||||
|
//
|
||||||
|
// label5
|
||||||
|
//
|
||||||
|
this.label5.AutoSize = true;
|
||||||
|
this.label5.Location = new System.Drawing.Point(3, 229);
|
||||||
|
this.label5.Name = "label5";
|
||||||
|
this.label5.Size = new System.Drawing.Size(31, 13);
|
||||||
|
this.label5.TabIndex = 17;
|
||||||
|
this.label5.Text = "Allies";
|
||||||
|
//
|
||||||
|
// playersListBox
|
||||||
|
//
|
||||||
|
this.playersListBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
|
||||||
|
| System.Windows.Forms.AnchorStyles.Left)));
|
||||||
|
this.playersListBox.FormattingEnabled = true;
|
||||||
|
this.playersListBox.Location = new System.Drawing.Point(81, 232);
|
||||||
|
this.playersListBox.Name = "playersListBox";
|
||||||
|
this.playersListBox.SelectionMode = System.Windows.Forms.SelectionMode.MultiSimple;
|
||||||
|
this.playersListBox.Size = new System.Drawing.Size(100, 134);
|
||||||
|
this.playersListBox.TabIndex = 18;
|
||||||
|
//
|
||||||
|
// playerControlLbl
|
||||||
|
//
|
||||||
|
this.playerControlLbl.AutoSize = true;
|
||||||
|
this.playerControlLbl.Location = new System.Drawing.Point(3, 209);
|
||||||
|
this.playerControlLbl.Name = "playerControlLbl";
|
||||||
|
this.playerControlLbl.Size = new System.Drawing.Size(72, 13);
|
||||||
|
this.playerControlLbl.TabIndex = 27;
|
||||||
|
this.playerControlLbl.Text = "Player Control";
|
||||||
|
//
|
||||||
|
// playerControlCheckBox
|
||||||
|
//
|
||||||
|
this.playerControlCheckBox.AutoSize = true;
|
||||||
|
this.playerControlCheckBox.Location = new System.Drawing.Point(81, 212);
|
||||||
|
this.playerControlCheckBox.Name = "playerControlCheckBox";
|
||||||
|
this.playerControlCheckBox.Size = new System.Drawing.Size(15, 14);
|
||||||
|
this.playerControlCheckBox.TabIndex = 28;
|
||||||
|
this.playerControlCheckBox.UseVisualStyleBackColor = true;
|
||||||
|
//
|
||||||
|
// PlayerSettings
|
||||||
|
//
|
||||||
|
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||||
|
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||||
|
this.Controls.Add(this.tableLayoutPanel1);
|
||||||
|
this.Name = "PlayerSettings";
|
||||||
|
this.Size = new System.Drawing.Size(329, 372);
|
||||||
|
this.tableLayoutPanel1.ResumeLayout(false);
|
||||||
|
this.tableLayoutPanel1.PerformLayout();
|
||||||
|
((System.ComponentModel.ISupportInitialize)(this.iqNud)).EndInit();
|
||||||
|
((System.ComponentModel.ISupportInitialize)(this.techLevelNud)).EndInit();
|
||||||
|
((System.ComponentModel.ISupportInitialize)(this.maxVesselsNud)).EndInit();
|
||||||
|
((System.ComponentModel.ISupportInitialize)(this.maxInfantryNud)).EndInit();
|
||||||
|
((System.ComponentModel.ISupportInitialize)(this.creditsNud)).EndInit();
|
||||||
|
((System.ComponentModel.ISupportInitialize)(this.maxBuildingsNud)).EndInit();
|
||||||
|
((System.ComponentModel.ISupportInitialize)(this.maxUnitsNud)).EndInit();
|
||||||
|
this.ResumeLayout(false);
|
||||||
|
this.PerformLayout();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
private System.Windows.Forms.TableLayoutPanel tableLayoutPanel1;
|
||||||
|
private System.Windows.Forms.Label label1;
|
||||||
|
private System.Windows.Forms.ComboBox edgeComboBox;
|
||||||
|
private System.Windows.Forms.Label label2;
|
||||||
|
private System.Windows.Forms.NumericUpDown creditsNud;
|
||||||
|
private System.Windows.Forms.Label label3;
|
||||||
|
private System.Windows.Forms.Label label4;
|
||||||
|
private System.Windows.Forms.NumericUpDown maxBuildingsNud;
|
||||||
|
private System.Windows.Forms.NumericUpDown maxUnitsNud;
|
||||||
|
private System.Windows.Forms.Label label5;
|
||||||
|
private System.Windows.Forms.ListBox playersListBox;
|
||||||
|
private System.Windows.Forms.Label techLevelLbl;
|
||||||
|
private System.Windows.Forms.Label maxVesselsLbl;
|
||||||
|
private System.Windows.Forms.Label maxInfantryLbl;
|
||||||
|
private System.Windows.Forms.Label iqLbl;
|
||||||
|
private System.Windows.Forms.NumericUpDown maxVesselsNud;
|
||||||
|
private System.Windows.Forms.NumericUpDown maxInfantryNud;
|
||||||
|
private System.Windows.Forms.NumericUpDown iqNud;
|
||||||
|
private System.Windows.Forms.NumericUpDown techLevelNud;
|
||||||
|
private System.Windows.Forms.Label playerControlLbl;
|
||||||
|
private System.Windows.Forms.CheckBox playerControlCheckBox;
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,86 @@
|
||||||
|
//
|
||||||
|
// Copyright 2020 Electronic Arts Inc.
|
||||||
|
//
|
||||||
|
// The Command & Conquer Map Editor and corresponding source code is free
|
||||||
|
// software: you can redistribute it and/or modify it under the terms of
|
||||||
|
// the GNU General Public License as published by the Free Software Foundation,
|
||||||
|
// either version 3 of the License, or (at your option) any later version.
|
||||||
|
|
||||||
|
// The Command & Conquer Map Editor and corresponding source code is distributed
|
||||||
|
// in the hope that it will be useful, but with permitted additional restrictions
|
||||||
|
// under Section 7 of the GPL. See the GNU General Public License in LICENSE.TXT
|
||||||
|
// distributed with this program. You should have received a copy of the
|
||||||
|
// GNU General Public License along with permitted additional restrictions
|
||||||
|
// with this program. If not, see https://github.com/electronicarts/CnC_Remastered_Collection
|
||||||
|
using MobiusEditor.Interface;
|
||||||
|
using MobiusEditor.Model;
|
||||||
|
using MobiusEditor.Utility;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Data;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Windows.Forms;
|
||||||
|
|
||||||
|
namespace MobiusEditor.Controls
|
||||||
|
{
|
||||||
|
public partial class PlayerSettings : UserControl
|
||||||
|
{
|
||||||
|
private readonly PropertyTracker<House> houseSettingsTracker;
|
||||||
|
private readonly dynamic house;
|
||||||
|
|
||||||
|
public PlayerSettings(IGamePlugin plugin, PropertyTracker<House> houseSettingsTracker)
|
||||||
|
{
|
||||||
|
this.houseSettingsTracker = houseSettingsTracker;
|
||||||
|
house = houseSettingsTracker;
|
||||||
|
|
||||||
|
InitializeComponent();
|
||||||
|
|
||||||
|
edgeComboBox.Items.Clear();
|
||||||
|
edgeComboBox.Items.AddRange(new string[] { "North", "South", "West", "East" });
|
||||||
|
|
||||||
|
creditsNud.DataBindings.Add("Value", houseSettingsTracker, "Credits");
|
||||||
|
maxBuildingsNud.DataBindings.Add("Value", houseSettingsTracker, "MaxBuilding");
|
||||||
|
maxUnitsNud.DataBindings.Add("Value", houseSettingsTracker, "MaxUnit");
|
||||||
|
edgeComboBox.DataBindings.Add("SelectedItem", houseSettingsTracker, "Edge");
|
||||||
|
|
||||||
|
switch (plugin.GameType)
|
||||||
|
{
|
||||||
|
case GameType.TiberianDawn:
|
||||||
|
maxInfantryNud.Visible = maxInfantryLbl.Visible = false;
|
||||||
|
maxVesselsNud.Visible = maxVesselsLbl.Visible = false;
|
||||||
|
techLevelNud.Visible = techLevelLbl.Visible = false;
|
||||||
|
iqNud.Visible = iqLbl.Visible = false;
|
||||||
|
playerControlCheckBox.Visible = playerControlLbl.Visible = false;
|
||||||
|
break;
|
||||||
|
case GameType.RedAlert:
|
||||||
|
maxInfantryNud.DataBindings.Add("Value", houseSettingsTracker, "MaxInfantry");
|
||||||
|
maxVesselsNud.DataBindings.Add("Value", houseSettingsTracker, "MaxVessel");
|
||||||
|
techLevelNud.DataBindings.Add("Value", houseSettingsTracker, "TechLevel");
|
||||||
|
iqNud.DataBindings.Add("Value", houseSettingsTracker, "IQ");
|
||||||
|
playerControlCheckBox.DataBindings.Add("Checked", houseSettingsTracker, "PlayerControl");
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
playersListBox.Items.Clear();
|
||||||
|
playersListBox.Items.AddRange(plugin.Map.Houses.Select(h => h.Type.Name).ToArray());
|
||||||
|
|
||||||
|
var selectedIndices = new List<int>();
|
||||||
|
foreach (var id in house.Allies)
|
||||||
|
{
|
||||||
|
playersListBox.SetSelected(id, true);
|
||||||
|
}
|
||||||
|
|
||||||
|
playersListBox.SelectedIndexChanged += playersListBox_SelectedIndexChanged;
|
||||||
|
}
|
||||||
|
|
||||||
|
private void playersListBox_SelectedIndexChanged(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
var allies = 0;
|
||||||
|
foreach (int selectedIndex in playersListBox.SelectedIndices)
|
||||||
|
{
|
||||||
|
allies |= 1 << selectedIndex;
|
||||||
|
}
|
||||||
|
house.Allies = new AlliesMask(allies);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -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>
|
|
@ -0,0 +1,50 @@
|
||||||
|
//
|
||||||
|
// Copyright 2020 Electronic Arts Inc.
|
||||||
|
//
|
||||||
|
// The Command & Conquer Map Editor and corresponding source code is free
|
||||||
|
// software: you can redistribute it and/or modify it under the terms of
|
||||||
|
// the GNU General Public License as published by the Free Software Foundation,
|
||||||
|
// either version 3 of the License, or (at your option) any later version.
|
||||||
|
|
||||||
|
// The Command & Conquer Map Editor and corresponding source code is distributed
|
||||||
|
// in the hope that it will be useful, but with permitted additional restrictions
|
||||||
|
// under Section 7 of the GPL. See the GNU General Public License in LICENSE.TXT
|
||||||
|
// distributed with this program. You should have received a copy of the
|
||||||
|
// GNU General Public License along with permitted additional restrictions
|
||||||
|
// with this program. If not, see https://github.com/electronicarts/CnC_Remastered_Collection
|
||||||
|
namespace MobiusEditor.Controls
|
||||||
|
{
|
||||||
|
partial class PropertiesComboBox
|
||||||
|
{
|
||||||
|
/// <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 Component 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()
|
||||||
|
{
|
||||||
|
components = new System.ComponentModel.Container();
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,65 @@
|
||||||
|
//
|
||||||
|
// Copyright 2020 Electronic Arts Inc.
|
||||||
|
//
|
||||||
|
// The Command & Conquer Map Editor and corresponding source code is free
|
||||||
|
// software: you can redistribute it and/or modify it under the terms of
|
||||||
|
// the GNU General Public License as published by the Free Software Foundation,
|
||||||
|
// either version 3 of the License, or (at your option) any later version.
|
||||||
|
|
||||||
|
// The Command & Conquer Map Editor and corresponding source code is distributed
|
||||||
|
// in the hope that it will be useful, but with permitted additional restrictions
|
||||||
|
// under Section 7 of the GPL. See the GNU General Public License in LICENSE.TXT
|
||||||
|
// distributed with this program. You should have received a copy of the
|
||||||
|
// GNU General Public License along with permitted additional restrictions
|
||||||
|
// with this program. If not, see https://github.com/electronicarts/CnC_Remastered_Collection
|
||||||
|
using System;
|
||||||
|
using System.Windows.Forms;
|
||||||
|
|
||||||
|
namespace MobiusEditor.Controls
|
||||||
|
{
|
||||||
|
public partial class PropertiesComboBox : ComboBox
|
||||||
|
{
|
||||||
|
private bool savedAutoClose;
|
||||||
|
|
||||||
|
private ToolStripDropDown DropDownHost
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
var parent = Parent;
|
||||||
|
while ((parent != null) && !(parent is ToolStripDropDown))
|
||||||
|
{
|
||||||
|
parent = parent.Parent;
|
||||||
|
}
|
||||||
|
return parent as ToolStripDropDown;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public PropertiesComboBox()
|
||||||
|
{
|
||||||
|
InitializeComponent();
|
||||||
|
}
|
||||||
|
|
||||||
|
protected override void OnDropDownClosed(EventArgs e)
|
||||||
|
{
|
||||||
|
var dropDownHost = DropDownHost;
|
||||||
|
if (dropDownHost != null)
|
||||||
|
{
|
||||||
|
dropDownHost.AutoClose = savedAutoClose;
|
||||||
|
}
|
||||||
|
|
||||||
|
base.OnDropDownClosed(e);
|
||||||
|
}
|
||||||
|
|
||||||
|
protected override void OnDropDown(EventArgs e)
|
||||||
|
{
|
||||||
|
var dropDownHost = DropDownHost;
|
||||||
|
if (dropDownHost != null)
|
||||||
|
{
|
||||||
|
savedAutoClose = dropDownHost.AutoClose;
|
||||||
|
dropDownHost.AutoClose = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
base.OnDropDown(e);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,112 @@
|
||||||
|
//
|
||||||
|
// Copyright 2020 Electronic Arts Inc.
|
||||||
|
//
|
||||||
|
// The Command & Conquer Map Editor and corresponding source code is free
|
||||||
|
// software: you can redistribute it and/or modify it under the terms of
|
||||||
|
// the GNU General Public License as published by the Free Software Foundation,
|
||||||
|
// either version 3 of the License, or (at your option) any later version.
|
||||||
|
|
||||||
|
// The Command & Conquer Map Editor and corresponding source code is distributed
|
||||||
|
// in the hope that it will be useful, but with permitted additional restrictions
|
||||||
|
// under Section 7 of the GPL. See the GNU General Public License in LICENSE.TXT
|
||||||
|
// distributed with this program. You should have received a copy of the
|
||||||
|
// GNU General Public License along with permitted additional restrictions
|
||||||
|
// with this program. If not, see https://github.com/electronicarts/CnC_Remastered_Collection
|
||||||
|
namespace MobiusEditor.Controls
|
||||||
|
{
|
||||||
|
partial class TerrainProperties
|
||||||
|
{
|
||||||
|
/// <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 Component 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.tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel();
|
||||||
|
this.label5 = new System.Windows.Forms.Label();
|
||||||
|
this.triggerComboBox = new MobiusEditor.Controls.PropertiesComboBox();
|
||||||
|
this.tableLayoutPanel1.SuspendLayout();
|
||||||
|
this.SuspendLayout();
|
||||||
|
//
|
||||||
|
// tableLayoutPanel1
|
||||||
|
//
|
||||||
|
this.tableLayoutPanel1.ColumnCount = 2;
|
||||||
|
this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 31.25F));
|
||||||
|
this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 68.75F));
|
||||||
|
this.tableLayoutPanel1.Controls.Add(this.label5, 0, 0);
|
||||||
|
this.tableLayoutPanel1.Controls.Add(this.triggerComboBox, 1, 0);
|
||||||
|
this.tableLayoutPanel1.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||||
|
this.tableLayoutPanel1.Location = new System.Drawing.Point(0, 0);
|
||||||
|
this.tableLayoutPanel1.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
|
||||||
|
this.tableLayoutPanel1.Name = "tableLayoutPanel1";
|
||||||
|
this.tableLayoutPanel1.RowCount = 1;
|
||||||
|
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle());
|
||||||
|
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 20F));
|
||||||
|
this.tableLayoutPanel1.Size = new System.Drawing.Size(336, 38);
|
||||||
|
this.tableLayoutPanel1.TabIndex = 0;
|
||||||
|
//
|
||||||
|
// label5
|
||||||
|
//
|
||||||
|
this.label5.AutoSize = true;
|
||||||
|
this.label5.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||||
|
this.label5.Location = new System.Drawing.Point(4, 0);
|
||||||
|
this.label5.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
|
||||||
|
this.label5.Name = "label5";
|
||||||
|
this.label5.Size = new System.Drawing.Size(97, 38);
|
||||||
|
this.label5.TabIndex = 4;
|
||||||
|
this.label5.Text = "Trigger";
|
||||||
|
this.label5.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
|
||||||
|
//
|
||||||
|
// triggerComboBox
|
||||||
|
//
|
||||||
|
this.triggerComboBox.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||||
|
this.triggerComboBox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
|
||||||
|
this.triggerComboBox.FormattingEnabled = true;
|
||||||
|
this.triggerComboBox.Location = new System.Drawing.Point(109, 5);
|
||||||
|
this.triggerComboBox.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
|
||||||
|
this.triggerComboBox.Name = "triggerComboBox";
|
||||||
|
this.triggerComboBox.Size = new System.Drawing.Size(223, 28);
|
||||||
|
this.triggerComboBox.TabIndex = 9;
|
||||||
|
this.triggerComboBox.SelectedIndexChanged += new System.EventHandler(this.comboBox_SelectedValueChanged);
|
||||||
|
//
|
||||||
|
// TriggerProperties
|
||||||
|
//
|
||||||
|
this.AutoScaleDimensions = new System.Drawing.SizeF(9F, 20F);
|
||||||
|
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||||
|
this.Controls.Add(this.tableLayoutPanel1);
|
||||||
|
this.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
|
||||||
|
this.Name = "TriggerProperties";
|
||||||
|
this.Size = new System.Drawing.Size(336, 38);
|
||||||
|
this.tableLayoutPanel1.ResumeLayout(false);
|
||||||
|
this.tableLayoutPanel1.PerformLayout();
|
||||||
|
this.ResumeLayout(false);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
private System.Windows.Forms.TableLayoutPanel tableLayoutPanel1;
|
||||||
|
private System.Windows.Forms.Label label5;
|
||||||
|
private MobiusEditor.Controls.PropertiesComboBox triggerComboBox;
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,158 @@
|
||||||
|
//
|
||||||
|
// Copyright 2020 Electronic Arts Inc.
|
||||||
|
//
|
||||||
|
// The Command & Conquer Map Editor and corresponding source code is free
|
||||||
|
// software: you can redistribute it and/or modify it under the terms of
|
||||||
|
// the GNU General Public License as published by the Free Software Foundation,
|
||||||
|
// either version 3 of the License, or (at your option) any later version.
|
||||||
|
|
||||||
|
// The Command & Conquer Map Editor and corresponding source code is distributed
|
||||||
|
// in the hope that it will be useful, but with permitted additional restrictions
|
||||||
|
// under Section 7 of the GPL. See the GNU General Public License in LICENSE.TXT
|
||||||
|
// distributed with this program. You should have received a copy of the
|
||||||
|
// GNU General Public License along with permitted additional restrictions
|
||||||
|
// with this program. If not, see https://github.com/electronicarts/CnC_Remastered_Collection
|
||||||
|
using MobiusEditor.Interface;
|
||||||
|
using MobiusEditor.Model;
|
||||||
|
using MobiusEditor.Utility;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.ComponentModel;
|
||||||
|
using System.Data;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Windows.Forms;
|
||||||
|
|
||||||
|
namespace MobiusEditor.Controls
|
||||||
|
{
|
||||||
|
public partial class TerrainProperties : UserControl
|
||||||
|
{
|
||||||
|
private bool isMockObject;
|
||||||
|
|
||||||
|
public IGamePlugin Plugin { get; private set; }
|
||||||
|
|
||||||
|
private Terrain terrain;
|
||||||
|
public Terrain Terrain
|
||||||
|
{
|
||||||
|
get => terrain;
|
||||||
|
set
|
||||||
|
{
|
||||||
|
if (terrain != value)
|
||||||
|
{
|
||||||
|
terrain = value;
|
||||||
|
Rebind();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public TerrainProperties()
|
||||||
|
{
|
||||||
|
InitializeComponent();
|
||||||
|
}
|
||||||
|
|
||||||
|
public void Initialize(IGamePlugin plugin, bool isMockObject)
|
||||||
|
{
|
||||||
|
this.isMockObject = isMockObject;
|
||||||
|
|
||||||
|
Plugin = plugin;
|
||||||
|
plugin.Map.Triggers.CollectionChanged += Triggers_CollectionChanged;
|
||||||
|
|
||||||
|
UpdateDataSource();
|
||||||
|
|
||||||
|
Disposed += (sender, e) =>
|
||||||
|
{
|
||||||
|
Terrain = null;
|
||||||
|
plugin.Map.Triggers.CollectionChanged -= Triggers_CollectionChanged;
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
private void Triggers_CollectionChanged(object sender, System.Collections.Specialized.NotifyCollectionChangedEventArgs e)
|
||||||
|
{
|
||||||
|
UpdateDataSource();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void UpdateDataSource()
|
||||||
|
{
|
||||||
|
triggerComboBox.DataSource = Trigger.None.Yield().Concat(Plugin.Map.Triggers.Select(t => t.Name).Distinct()).ToArray();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void Rebind()
|
||||||
|
{
|
||||||
|
triggerComboBox.DataBindings.Clear();
|
||||||
|
|
||||||
|
if (terrain == null)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
triggerComboBox.DataBindings.Add("SelectedItem", terrain, "Trigger");
|
||||||
|
}
|
||||||
|
|
||||||
|
private void Obj_PropertyChanged(object sender, PropertyChangedEventArgs e)
|
||||||
|
{
|
||||||
|
switch (e.PropertyName)
|
||||||
|
{
|
||||||
|
case "Type":
|
||||||
|
{
|
||||||
|
Rebind();
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!isMockObject)
|
||||||
|
{
|
||||||
|
Plugin.Dirty = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void comboBox_SelectedValueChanged(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
foreach (Binding binding in (sender as ComboBox).DataBindings)
|
||||||
|
{
|
||||||
|
binding.WriteValue();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void nud_ValueChanged(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
foreach (Binding binding in (sender as NumericUpDown).DataBindings)
|
||||||
|
{
|
||||||
|
binding.WriteValue();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public class TerrainPropertiesPopup : ToolStripDropDown
|
||||||
|
{
|
||||||
|
private readonly ToolStripControlHost host;
|
||||||
|
|
||||||
|
public TerrainProperties TerrainProperties { get; private set; }
|
||||||
|
|
||||||
|
public TerrainPropertiesPopup(IGamePlugin plugin, Terrain terrain)
|
||||||
|
{
|
||||||
|
TerrainProperties = new TerrainProperties();
|
||||||
|
TerrainProperties.Initialize(plugin, false);
|
||||||
|
TerrainProperties.Terrain = terrain;
|
||||||
|
|
||||||
|
host = new ToolStripControlHost(TerrainProperties);
|
||||||
|
Padding = Margin = host.Padding = host.Margin = Padding.Empty;
|
||||||
|
MinimumSize = TerrainProperties.MinimumSize;
|
||||||
|
TerrainProperties.MinimumSize = TerrainProperties.Size;
|
||||||
|
MaximumSize = TerrainProperties.MaximumSize;
|
||||||
|
TerrainProperties.MaximumSize = TerrainProperties.Size;
|
||||||
|
Size = TerrainProperties.Size;
|
||||||
|
Items.Add(host);
|
||||||
|
TerrainProperties.Disposed += (sender, e) =>
|
||||||
|
{
|
||||||
|
TerrainProperties = null;
|
||||||
|
Dispose(true);
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
protected override void OnClosed(ToolStripDropDownClosedEventArgs e)
|
||||||
|
{
|
||||||
|
base.OnClosed(e);
|
||||||
|
|
||||||
|
TerrainProperties.Terrain = null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -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>
|
|
@ -0,0 +1,50 @@
|
||||||
|
//
|
||||||
|
// Copyright 2020 Electronic Arts Inc.
|
||||||
|
//
|
||||||
|
// The Command & Conquer Map Editor and corresponding source code is free
|
||||||
|
// software: you can redistribute it and/or modify it under the terms of
|
||||||
|
// the GNU General Public License as published by the Free Software Foundation,
|
||||||
|
// either version 3 of the License, or (at your option) any later version.
|
||||||
|
|
||||||
|
// The Command & Conquer Map Editor and corresponding source code is distributed
|
||||||
|
// in the hope that it will be useful, but with permitted additional restrictions
|
||||||
|
// under Section 7 of the GPL. See the GNU General Public License in LICENSE.TXT
|
||||||
|
// distributed with this program. You should have received a copy of the
|
||||||
|
// GNU General Public License along with permitted additional restrictions
|
||||||
|
// with this program. If not, see https://github.com/electronicarts/CnC_Remastered_Collection
|
||||||
|
namespace MobiusEditor.Controls
|
||||||
|
{
|
||||||
|
partial class TypeComboBox
|
||||||
|
{
|
||||||
|
/// <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 Component 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()
|
||||||
|
{
|
||||||
|
components = new System.ComponentModel.Container();
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,98 @@
|
||||||
|
//
|
||||||
|
// Copyright 2020 Electronic Arts Inc.
|
||||||
|
//
|
||||||
|
// The Command & Conquer Map Editor and corresponding source code is free
|
||||||
|
// software: you can redistribute it and/or modify it under the terms of
|
||||||
|
// the GNU General Public License as published by the Free Software Foundation,
|
||||||
|
// either version 3 of the License, or (at your option) any later version.
|
||||||
|
|
||||||
|
// The Command & Conquer Map Editor and corresponding source code is distributed
|
||||||
|
// in the hope that it will be useful, but with permitted additional restrictions
|
||||||
|
// under Section 7 of the GPL. See the GNU General Public License in LICENSE.TXT
|
||||||
|
// distributed with this program. You should have received a copy of the
|
||||||
|
// GNU General Public License along with permitted additional restrictions
|
||||||
|
// with this program. If not, see https://github.com/electronicarts/CnC_Remastered_Collection
|
||||||
|
using MobiusEditor.Interface;
|
||||||
|
using MobiusEditor.Model;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.ComponentModel;
|
||||||
|
using System.Data;
|
||||||
|
using System.Drawing;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Windows.Forms;
|
||||||
|
|
||||||
|
namespace MobiusEditor.Controls
|
||||||
|
{
|
||||||
|
public partial class TypeComboBox : ComboBox
|
||||||
|
{
|
||||||
|
[Category("Behavior")]
|
||||||
|
public Image MissingThumbnail { get; set; } = SystemIcons.Error.ToBitmap();
|
||||||
|
|
||||||
|
public IEnumerable<IBrowsableType> Types
|
||||||
|
{
|
||||||
|
get => Items.Cast<TypeItem<IBrowsableType>>().Select(t => t.Type);
|
||||||
|
set
|
||||||
|
{
|
||||||
|
DataSource = value.Select(t => new TypeItem<IBrowsableType>(t.DisplayName, t)).ToArray();
|
||||||
|
DropDownHeight = Math.Max(DropDownHeight, value.Max(t => (t.Thumbnail?.Height ?? MissingThumbnail.Height) * 3));
|
||||||
|
Invalidate();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public IBrowsableType SelectedType => SelectedValue as IBrowsableType;
|
||||||
|
|
||||||
|
public TypeComboBox()
|
||||||
|
{
|
||||||
|
InitializeComponent();
|
||||||
|
|
||||||
|
DisplayMember = "Name";
|
||||||
|
ValueMember = "Type";
|
||||||
|
}
|
||||||
|
|
||||||
|
protected override void OnMeasureItem(MeasureItemEventArgs e)
|
||||||
|
{
|
||||||
|
base.OnMeasureItem(e);
|
||||||
|
|
||||||
|
var typeItem = Items[e.Index] as TypeItem<IBrowsableType>;
|
||||||
|
if (typeItem?.Type != null)
|
||||||
|
{
|
||||||
|
e.ItemHeight = typeItem.Type.Thumbnail?.Height ?? MissingThumbnail.Height;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
protected override void OnDrawItem(DrawItemEventArgs e)
|
||||||
|
{
|
||||||
|
base.OnDrawItem(e);
|
||||||
|
|
||||||
|
e.DrawBackground();
|
||||||
|
|
||||||
|
if ((e.Index >= 0) && (e.Index < Items.Count))
|
||||||
|
{
|
||||||
|
var typeItem = Items[e.Index] as TypeItem<IBrowsableType>;
|
||||||
|
if (typeItem?.Type != null)
|
||||||
|
{
|
||||||
|
StringFormat stringFormat = new StringFormat
|
||||||
|
{
|
||||||
|
LineAlignment = StringAlignment.Center
|
||||||
|
};
|
||||||
|
|
||||||
|
var textColor = ((e.State & DrawItemState.Selected) == DrawItemState.Selected) ? SystemBrushes.HighlightText : SystemBrushes.WindowText;
|
||||||
|
var textSize = e.Graphics.MeasureString(typeItem.Name, Font, e.Bounds.Width, stringFormat);
|
||||||
|
e.Graphics.DrawString(typeItem.Name, Font, textColor, e.Bounds, stringFormat);
|
||||||
|
|
||||||
|
if ((e.State & DrawItemState.ComboBoxEdit) == DrawItemState.None)
|
||||||
|
{
|
||||||
|
var thumbnail = typeItem.Type.Thumbnail ?? MissingThumbnail;
|
||||||
|
var thumbnailWidth = (int)Math.Min(e.Bounds.Width - textSize.Width, thumbnail.Width);
|
||||||
|
var thumbnailSize = new Size(thumbnailWidth, thumbnailWidth * thumbnail.Height / thumbnail.Width);
|
||||||
|
var thumbnailBounds = new Rectangle(new Point(e.Bounds.Right - thumbnailSize.Width, e.Bounds.Top), thumbnailSize);
|
||||||
|
e.Graphics.DrawImage(thumbnail, thumbnailBounds);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
e.DrawFocusRectangle();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,158 @@
|
||||||
|
//
|
||||||
|
// Copyright 2020 Electronic Arts Inc.
|
||||||
|
//
|
||||||
|
// The Command & Conquer Map Editor and corresponding source code is free
|
||||||
|
// software: you can redistribute it and/or modify it under the terms of
|
||||||
|
// the GNU General Public License as published by the Free Software Foundation,
|
||||||
|
// either version 3 of the License, or (at your option) any later version.
|
||||||
|
|
||||||
|
// The Command & Conquer Map Editor and corresponding source code is distributed
|
||||||
|
// in the hope that it will be useful, but with permitted additional restrictions
|
||||||
|
// under Section 7 of the GPL. See the GNU General Public License in LICENSE.TXT
|
||||||
|
// distributed with this program. You should have received a copy of the
|
||||||
|
// GNU General Public License along with permitted additional restrictions
|
||||||
|
// with this program. If not, see https://github.com/electronicarts/CnC_Remastered_Collection
|
||||||
|
namespace MobiusEditor.Dialogs
|
||||||
|
{
|
||||||
|
partial class ErrorMessageBox
|
||||||
|
{
|
||||||
|
/// <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.tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel();
|
||||||
|
this.lblMessage = new System.Windows.Forms.Label();
|
||||||
|
this.txtErrors = new System.Windows.Forms.TextBox();
|
||||||
|
this.flowLayoutPanel1 = new System.Windows.Forms.FlowLayoutPanel();
|
||||||
|
this.btnOK = new System.Windows.Forms.Button();
|
||||||
|
this.btnCopy = new System.Windows.Forms.Button();
|
||||||
|
this.tableLayoutPanel1.SuspendLayout();
|
||||||
|
this.flowLayoutPanel1.SuspendLayout();
|
||||||
|
this.SuspendLayout();
|
||||||
|
//
|
||||||
|
// tableLayoutPanel1
|
||||||
|
//
|
||||||
|
this.tableLayoutPanel1.ColumnCount = 1;
|
||||||
|
this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100F));
|
||||||
|
this.tableLayoutPanel1.Controls.Add(this.lblMessage, 0, 0);
|
||||||
|
this.tableLayoutPanel1.Controls.Add(this.txtErrors, 0, 1);
|
||||||
|
this.tableLayoutPanel1.Controls.Add(this.flowLayoutPanel1, 0, 2);
|
||||||
|
this.tableLayoutPanel1.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||||
|
this.tableLayoutPanel1.Location = new System.Drawing.Point(0, 0);
|
||||||
|
this.tableLayoutPanel1.Name = "tableLayoutPanel1";
|
||||||
|
this.tableLayoutPanel1.RowCount = 3;
|
||||||
|
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle());
|
||||||
|
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100F));
|
||||||
|
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle());
|
||||||
|
this.tableLayoutPanel1.Size = new System.Drawing.Size(447, 285);
|
||||||
|
this.tableLayoutPanel1.TabIndex = 0;
|
||||||
|
//
|
||||||
|
// lblMessage
|
||||||
|
//
|
||||||
|
this.lblMessage.AutoSize = true;
|
||||||
|
this.lblMessage.Location = new System.Drawing.Point(3, 0);
|
||||||
|
this.lblMessage.Name = "lblMessage";
|
||||||
|
this.lblMessage.Size = new System.Drawing.Size(191, 13);
|
||||||
|
this.lblMessage.TabIndex = 1;
|
||||||
|
this.lblMessage.Text = "The following errors were encountered:";
|
||||||
|
//
|
||||||
|
// txtErrors
|
||||||
|
//
|
||||||
|
this.txtErrors.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||||
|
this.txtErrors.Location = new System.Drawing.Point(3, 16);
|
||||||
|
this.txtErrors.Multiline = true;
|
||||||
|
this.txtErrors.Name = "txtErrors";
|
||||||
|
this.txtErrors.ReadOnly = true;
|
||||||
|
this.txtErrors.ScrollBars = System.Windows.Forms.ScrollBars.Both;
|
||||||
|
this.txtErrors.Size = new System.Drawing.Size(441, 231);
|
||||||
|
this.txtErrors.TabIndex = 0;
|
||||||
|
this.txtErrors.WordWrap = false;
|
||||||
|
//
|
||||||
|
// flowLayoutPanel1
|
||||||
|
//
|
||||||
|
this.flowLayoutPanel1.AutoSize = true;
|
||||||
|
this.flowLayoutPanel1.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink;
|
||||||
|
this.flowLayoutPanel1.Controls.Add(this.btnOK);
|
||||||
|
this.flowLayoutPanel1.Controls.Add(this.btnCopy);
|
||||||
|
this.flowLayoutPanel1.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||||
|
this.flowLayoutPanel1.FlowDirection = System.Windows.Forms.FlowDirection.RightToLeft;
|
||||||
|
this.flowLayoutPanel1.Location = new System.Drawing.Point(3, 253);
|
||||||
|
this.flowLayoutPanel1.Name = "flowLayoutPanel1";
|
||||||
|
this.flowLayoutPanel1.Size = new System.Drawing.Size(441, 29);
|
||||||
|
this.flowLayoutPanel1.TabIndex = 1;
|
||||||
|
//
|
||||||
|
// btnOK
|
||||||
|
//
|
||||||
|
this.btnOK.DialogResult = System.Windows.Forms.DialogResult.Cancel;
|
||||||
|
this.btnOK.Location = new System.Drawing.Point(363, 3);
|
||||||
|
this.btnOK.Name = "btnOK";
|
||||||
|
this.btnOK.Size = new System.Drawing.Size(75, 23);
|
||||||
|
this.btnOK.TabIndex = 0;
|
||||||
|
this.btnOK.Text = "&OK";
|
||||||
|
this.btnOK.UseVisualStyleBackColor = true;
|
||||||
|
//
|
||||||
|
// btnCopy
|
||||||
|
//
|
||||||
|
this.btnCopy.Location = new System.Drawing.Point(246, 3);
|
||||||
|
this.btnCopy.Name = "btnCopy";
|
||||||
|
this.btnCopy.Size = new System.Drawing.Size(111, 23);
|
||||||
|
this.btnCopy.TabIndex = 1;
|
||||||
|
this.btnCopy.Text = "&Copy to Clipboard";
|
||||||
|
this.btnCopy.UseVisualStyleBackColor = true;
|
||||||
|
this.btnCopy.Click += new System.EventHandler(this.btnCopy_Click);
|
||||||
|
//
|
||||||
|
// ErrorMessageBox
|
||||||
|
//
|
||||||
|
this.AcceptButton = this.btnOK;
|
||||||
|
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||||
|
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||||
|
this.CancelButton = this.btnOK;
|
||||||
|
this.ClientSize = new System.Drawing.Size(447, 285);
|
||||||
|
this.Controls.Add(this.tableLayoutPanel1);
|
||||||
|
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
|
||||||
|
this.MaximizeBox = false;
|
||||||
|
this.MinimizeBox = false;
|
||||||
|
this.Name = "ErrorMessageBox";
|
||||||
|
this.ShowInTaskbar = false;
|
||||||
|
this.SizeGripStyle = System.Windows.Forms.SizeGripStyle.Hide;
|
||||||
|
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
|
||||||
|
this.Text = "Error Report";
|
||||||
|
this.tableLayoutPanel1.ResumeLayout(false);
|
||||||
|
this.tableLayoutPanel1.PerformLayout();
|
||||||
|
this.flowLayoutPanel1.ResumeLayout(false);
|
||||||
|
this.ResumeLayout(false);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
private System.Windows.Forms.TableLayoutPanel tableLayoutPanel1;
|
||||||
|
private System.Windows.Forms.TextBox txtErrors;
|
||||||
|
private System.Windows.Forms.Label lblMessage;
|
||||||
|
private System.Windows.Forms.FlowLayoutPanel flowLayoutPanel1;
|
||||||
|
private System.Windows.Forms.Button btnOK;
|
||||||
|
private System.Windows.Forms.Button btnCopy;
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,55 @@
|
||||||
|
//
|
||||||
|
// Copyright 2020 Electronic Arts Inc.
|
||||||
|
//
|
||||||
|
// The Command & Conquer Map Editor and corresponding source code is free
|
||||||
|
// software: you can redistribute it and/or modify it under the terms of
|
||||||
|
// the GNU General Public License as published by the Free Software Foundation,
|
||||||
|
// either version 3 of the License, or (at your option) any later version.
|
||||||
|
|
||||||
|
// The Command & Conquer Map Editor and corresponding source code is distributed
|
||||||
|
// in the hope that it will be useful, but with permitted additional restrictions
|
||||||
|
// under Section 7 of the GPL. See the GNU General Public License in LICENSE.TXT
|
||||||
|
// distributed with this program. You should have received a copy of the
|
||||||
|
// GNU General Public License along with permitted additional restrictions
|
||||||
|
// with this program. If not, see https://github.com/electronicarts/CnC_Remastered_Collection
|
||||||
|
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 MobiusEditor.Dialogs
|
||||||
|
{
|
||||||
|
public partial class ErrorMessageBox : Form
|
||||||
|
{
|
||||||
|
public string Message
|
||||||
|
{
|
||||||
|
set
|
||||||
|
{
|
||||||
|
lblMessage.Text = value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public IEnumerable<string> Errors
|
||||||
|
{
|
||||||
|
set
|
||||||
|
{
|
||||||
|
txtErrors.Text = string.Join(Environment.NewLine, value);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public ErrorMessageBox()
|
||||||
|
{
|
||||||
|
InitializeComponent();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void btnCopy_Click(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
Clipboard.SetText(txtErrors.Text);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -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>
|
|
@ -0,0 +1,153 @@
|
||||||
|
//
|
||||||
|
// Copyright 2020 Electronic Arts Inc.
|
||||||
|
//
|
||||||
|
// The Command & Conquer Map Editor and corresponding source code is free
|
||||||
|
// software: you can redistribute it and/or modify it under the terms of
|
||||||
|
// the GNU General Public License as published by the Free Software Foundation,
|
||||||
|
// either version 3 of the License, or (at your option) any later version.
|
||||||
|
|
||||||
|
// The Command & Conquer Map Editor and corresponding source code is distributed
|
||||||
|
// in the hope that it will be useful, but with permitted additional restrictions
|
||||||
|
// under Section 7 of the GPL. See the GNU General Public License in LICENSE.TXT
|
||||||
|
// distributed with this program. You should have received a copy of the
|
||||||
|
// GNU General Public License along with permitted additional restrictions
|
||||||
|
// with this program. If not, see https://github.com/electronicarts/CnC_Remastered_Collection
|
||||||
|
namespace MobiusEditor.Dialogs
|
||||||
|
{
|
||||||
|
partial class InviteMessageBox
|
||||||
|
{
|
||||||
|
/// <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.flowLayoutPanel1 = new System.Windows.Forms.FlowLayoutPanel();
|
||||||
|
this.flowLayoutPanel2 = new System.Windows.Forms.FlowLayoutPanel();
|
||||||
|
this.btnOK = new System.Windows.Forms.Button();
|
||||||
|
this.checkBoxDontShowThisAgain = new System.Windows.Forms.CheckBox();
|
||||||
|
this.pictureBoxIcon = new System.Windows.Forms.PictureBox();
|
||||||
|
this.label1 = new System.Windows.Forms.Label();
|
||||||
|
this.flowLayoutPanel1.SuspendLayout();
|
||||||
|
this.flowLayoutPanel2.SuspendLayout();
|
||||||
|
((System.ComponentModel.ISupportInitialize)(this.pictureBoxIcon)).BeginInit();
|
||||||
|
this.SuspendLayout();
|
||||||
|
//
|
||||||
|
// flowLayoutPanel1
|
||||||
|
//
|
||||||
|
this.flowLayoutPanel1.Controls.Add(this.flowLayoutPanel2);
|
||||||
|
this.flowLayoutPanel1.Controls.Add(this.btnOK);
|
||||||
|
this.flowLayoutPanel1.Controls.Add(this.checkBoxDontShowThisAgain);
|
||||||
|
this.flowLayoutPanel1.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||||
|
this.flowLayoutPanel1.FlowDirection = System.Windows.Forms.FlowDirection.TopDown;
|
||||||
|
this.flowLayoutPanel1.Location = new System.Drawing.Point(0, 0);
|
||||||
|
this.flowLayoutPanel1.Name = "flowLayoutPanel1";
|
||||||
|
this.flowLayoutPanel1.Size = new System.Drawing.Size(425, 97);
|
||||||
|
this.flowLayoutPanel1.TabIndex = 0;
|
||||||
|
//
|
||||||
|
// flowLayoutPanel2
|
||||||
|
//
|
||||||
|
this.flowLayoutPanel2.AutoSize = true;
|
||||||
|
this.flowLayoutPanel2.Controls.Add(this.pictureBoxIcon);
|
||||||
|
this.flowLayoutPanel2.Controls.Add(this.label1);
|
||||||
|
this.flowLayoutPanel2.Location = new System.Drawing.Point(3, 3);
|
||||||
|
this.flowLayoutPanel2.Name = "flowLayoutPanel2";
|
||||||
|
this.flowLayoutPanel2.Size = new System.Drawing.Size(419, 38);
|
||||||
|
this.flowLayoutPanel2.TabIndex = 0;
|
||||||
|
//
|
||||||
|
// btnOK
|
||||||
|
//
|
||||||
|
this.btnOK.Anchor = System.Windows.Forms.AnchorStyles.None;
|
||||||
|
this.btnOK.DialogResult = System.Windows.Forms.DialogResult.OK;
|
||||||
|
this.btnOK.Location = new System.Drawing.Point(175, 47);
|
||||||
|
this.btnOK.Name = "btnOK";
|
||||||
|
this.btnOK.Size = new System.Drawing.Size(75, 23);
|
||||||
|
this.btnOK.TabIndex = 1;
|
||||||
|
this.btnOK.Text = "&OK";
|
||||||
|
this.btnOK.UseVisualStyleBackColor = true;
|
||||||
|
//
|
||||||
|
// checkBoxDontShowThisAgain
|
||||||
|
//
|
||||||
|
this.checkBoxDontShowThisAgain.AutoSize = true;
|
||||||
|
this.flowLayoutPanel1.SetFlowBreak(this.checkBoxDontShowThisAgain, true);
|
||||||
|
this.checkBoxDontShowThisAgain.Location = new System.Drawing.Point(3, 76);
|
||||||
|
this.checkBoxDontShowThisAgain.Name = "checkBoxDontShowThisAgain";
|
||||||
|
this.checkBoxDontShowThisAgain.Size = new System.Drawing.Size(127, 17);
|
||||||
|
this.checkBoxDontShowThisAgain.TabIndex = 2;
|
||||||
|
this.checkBoxDontShowThisAgain.Text = "Don\'t show this again";
|
||||||
|
this.checkBoxDontShowThisAgain.UseVisualStyleBackColor = true;
|
||||||
|
//
|
||||||
|
// pictureBoxIcon
|
||||||
|
//
|
||||||
|
this.pictureBoxIcon.Location = new System.Drawing.Point(3, 3);
|
||||||
|
this.pictureBoxIcon.Name = "pictureBoxIcon";
|
||||||
|
this.pictureBoxIcon.Size = new System.Drawing.Size(32, 32);
|
||||||
|
this.pictureBoxIcon.TabIndex = 0;
|
||||||
|
this.pictureBoxIcon.TabStop = false;
|
||||||
|
//
|
||||||
|
// label1
|
||||||
|
//
|
||||||
|
this.label1.Anchor = System.Windows.Forms.AnchorStyles.None;
|
||||||
|
this.label1.AutoSize = true;
|
||||||
|
this.label1.Location = new System.Drawing.Point(41, 12);
|
||||||
|
this.label1.Name = "label1";
|
||||||
|
this.label1.Size = new System.Drawing.Size(375, 13);
|
||||||
|
this.label1.TabIndex = 1;
|
||||||
|
this.label1.Text = "To join a game session or accept game invites, please first exit the Map Editor.";
|
||||||
|
//
|
||||||
|
// CheckMessageBox
|
||||||
|
//
|
||||||
|
this.AcceptButton = this.btnOK;
|
||||||
|
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||||
|
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||||
|
this.CancelButton = this.btnOK;
|
||||||
|
this.ClientSize = new System.Drawing.Size(425, 97);
|
||||||
|
this.Controls.Add(this.flowLayoutPanel1);
|
||||||
|
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
|
||||||
|
this.MaximizeBox = false;
|
||||||
|
this.MinimizeBox = false;
|
||||||
|
this.Name = "CheckMessageBox";
|
||||||
|
this.ShowInTaskbar = false;
|
||||||
|
this.SizeGripStyle = System.Windows.Forms.SizeGripStyle.Hide;
|
||||||
|
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
|
||||||
|
this.Text = "Map Editor";
|
||||||
|
this.Load += new System.EventHandler(this.InviteMessageBox_Load);
|
||||||
|
this.flowLayoutPanel1.ResumeLayout(false);
|
||||||
|
this.flowLayoutPanel1.PerformLayout();
|
||||||
|
this.flowLayoutPanel2.ResumeLayout(false);
|
||||||
|
this.flowLayoutPanel2.PerformLayout();
|
||||||
|
((System.ComponentModel.ISupportInitialize)(this.pictureBoxIcon)).EndInit();
|
||||||
|
this.ResumeLayout(false);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
private System.Windows.Forms.FlowLayoutPanel flowLayoutPanel1;
|
||||||
|
private System.Windows.Forms.FlowLayoutPanel flowLayoutPanel2;
|
||||||
|
private System.Windows.Forms.Button btnOK;
|
||||||
|
private System.Windows.Forms.CheckBox checkBoxDontShowThisAgain;
|
||||||
|
private System.Windows.Forms.PictureBox pictureBoxIcon;
|
||||||
|
private System.Windows.Forms.Label label1;
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,38 @@
|
||||||
|
//
|
||||||
|
// Copyright 2020 Electronic Arts Inc.
|
||||||
|
//
|
||||||
|
// The Command & Conquer Map Editor and corresponding source code is free
|
||||||
|
// software: you can redistribute it and/or modify it under the terms of
|
||||||
|
// the GNU General Public License as published by the Free Software Foundation,
|
||||||
|
// either version 3 of the License, or (at your option) any later version.
|
||||||
|
|
||||||
|
// The Command & Conquer Map Editor and corresponding source code is distributed
|
||||||
|
// in the hope that it will be useful, but with permitted additional restrictions
|
||||||
|
// under Section 7 of the GPL. See the GNU General Public License in LICENSE.TXT
|
||||||
|
// distributed with this program. You should have received a copy of the
|
||||||
|
// GNU General Public License along with permitted additional restrictions
|
||||||
|
// with this program. If not, see https://github.com/electronicarts/CnC_Remastered_Collection
|
||||||
|
using System;
|
||||||
|
using System.Drawing;
|
||||||
|
using System.Windows.Forms;
|
||||||
|
|
||||||
|
namespace MobiusEditor.Dialogs
|
||||||
|
{
|
||||||
|
public partial class InviteMessageBox : Form
|
||||||
|
{
|
||||||
|
public bool DontShowAgain => checkBoxDontShowThisAgain.Checked;
|
||||||
|
|
||||||
|
public InviteMessageBox()
|
||||||
|
{
|
||||||
|
InitializeComponent();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void InviteMessageBox_Load(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
using (var infoIcon = new Icon(SystemIcons.Information, pictureBoxIcon.Width, pictureBoxIcon.Height))
|
||||||
|
{
|
||||||
|
pictureBoxIcon.Image = infoIcon.ToBitmap();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -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>
|
|
@ -0,0 +1,166 @@
|
||||||
|
//
|
||||||
|
// Copyright 2020 Electronic Arts Inc.
|
||||||
|
//
|
||||||
|
// The Command & Conquer Map Editor and corresponding source code is free
|
||||||
|
// software: you can redistribute it and/or modify it under the terms of
|
||||||
|
// the GNU General Public License as published by the Free Software Foundation,
|
||||||
|
// either version 3 of the License, or (at your option) any later version.
|
||||||
|
|
||||||
|
// The Command & Conquer Map Editor and corresponding source code is distributed
|
||||||
|
// in the hope that it will be useful, but with permitted additional restrictions
|
||||||
|
// under Section 7 of the GPL. See the GNU General Public License in LICENSE.TXT
|
||||||
|
// distributed with this program. You should have received a copy of the
|
||||||
|
// GNU General Public License along with permitted additional restrictions
|
||||||
|
// with this program. If not, see https://github.com/electronicarts/CnC_Remastered_Collection
|
||||||
|
namespace MobiusEditor.Dialogs
|
||||||
|
{
|
||||||
|
partial class MapSettingsDialog
|
||||||
|
{
|
||||||
|
/// <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.tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel();
|
||||||
|
this.flowLayoutPanel1 = new System.Windows.Forms.FlowLayoutPanel();
|
||||||
|
this.btnCancel = new System.Windows.Forms.Button();
|
||||||
|
this.btnOK = new System.Windows.Forms.Button();
|
||||||
|
this.settingsTreeView = new System.Windows.Forms.TreeView();
|
||||||
|
this.settingsPanel = new System.Windows.Forms.Panel();
|
||||||
|
this.tableLayoutPanel1.SuspendLayout();
|
||||||
|
this.flowLayoutPanel1.SuspendLayout();
|
||||||
|
this.SuspendLayout();
|
||||||
|
//
|
||||||
|
// tableLayoutPanel1
|
||||||
|
//
|
||||||
|
this.tableLayoutPanel1.ColumnCount = 2;
|
||||||
|
this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 20F));
|
||||||
|
this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 80F));
|
||||||
|
this.tableLayoutPanel1.Controls.Add(this.flowLayoutPanel1, 0, 1);
|
||||||
|
this.tableLayoutPanel1.Controls.Add(this.settingsTreeView, 0, 0);
|
||||||
|
this.tableLayoutPanel1.Controls.Add(this.settingsPanel, 1, 0);
|
||||||
|
this.tableLayoutPanel1.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||||
|
this.tableLayoutPanel1.Location = new System.Drawing.Point(0, 0);
|
||||||
|
this.tableLayoutPanel1.Name = "tableLayoutPanel1";
|
||||||
|
this.tableLayoutPanel1.RowCount = 2;
|
||||||
|
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100F));
|
||||||
|
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle());
|
||||||
|
this.tableLayoutPanel1.Size = new System.Drawing.Size(784, 561);
|
||||||
|
this.tableLayoutPanel1.TabIndex = 0;
|
||||||
|
//
|
||||||
|
// flowLayoutPanel1
|
||||||
|
//
|
||||||
|
this.flowLayoutPanel1.AutoSize = true;
|
||||||
|
this.flowLayoutPanel1.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink;
|
||||||
|
this.tableLayoutPanel1.SetColumnSpan(this.flowLayoutPanel1, 2);
|
||||||
|
this.flowLayoutPanel1.Controls.Add(this.btnCancel);
|
||||||
|
this.flowLayoutPanel1.Controls.Add(this.btnOK);
|
||||||
|
this.flowLayoutPanel1.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||||
|
this.flowLayoutPanel1.FlowDirection = System.Windows.Forms.FlowDirection.RightToLeft;
|
||||||
|
this.flowLayoutPanel1.Location = new System.Drawing.Point(3, 524);
|
||||||
|
this.flowLayoutPanel1.Name = "flowLayoutPanel1";
|
||||||
|
this.flowLayoutPanel1.Size = new System.Drawing.Size(778, 34);
|
||||||
|
this.flowLayoutPanel1.TabIndex = 1;
|
||||||
|
//
|
||||||
|
// btnCancel
|
||||||
|
//
|
||||||
|
this.btnCancel.AutoSize = true;
|
||||||
|
this.btnCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel;
|
||||||
|
this.btnCancel.Location = new System.Drawing.Point(708, 2);
|
||||||
|
this.btnCancel.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
|
||||||
|
this.btnCancel.Name = "btnCancel";
|
||||||
|
this.btnCancel.Size = new System.Drawing.Size(68, 30);
|
||||||
|
this.btnCancel.TabIndex = 2;
|
||||||
|
this.btnCancel.Text = "&Cancel";
|
||||||
|
this.btnCancel.UseVisualStyleBackColor = true;
|
||||||
|
//
|
||||||
|
// btnOK
|
||||||
|
//
|
||||||
|
this.btnOK.AutoSize = true;
|
||||||
|
this.btnOK.DialogResult = System.Windows.Forms.DialogResult.OK;
|
||||||
|
this.btnOK.Location = new System.Drawing.Point(654, 2);
|
||||||
|
this.btnOK.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
|
||||||
|
this.btnOK.Name = "btnOK";
|
||||||
|
this.btnOK.Size = new System.Drawing.Size(50, 30);
|
||||||
|
this.btnOK.TabIndex = 3;
|
||||||
|
this.btnOK.Text = "&OK";
|
||||||
|
this.btnOK.UseVisualStyleBackColor = true;
|
||||||
|
//
|
||||||
|
// settingsTreeView
|
||||||
|
//
|
||||||
|
this.settingsTreeView.CheckBoxes = true;
|
||||||
|
this.settingsTreeView.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||||
|
this.settingsTreeView.DrawMode = System.Windows.Forms.TreeViewDrawMode.OwnerDrawText;
|
||||||
|
this.settingsTreeView.HideSelection = false;
|
||||||
|
this.settingsTreeView.Location = new System.Drawing.Point(3, 3);
|
||||||
|
this.settingsTreeView.Name = "settingsTreeView";
|
||||||
|
this.settingsTreeView.Size = new System.Drawing.Size(150, 515);
|
||||||
|
this.settingsTreeView.TabIndex = 2;
|
||||||
|
this.settingsTreeView.AfterCheck += new System.Windows.Forms.TreeViewEventHandler(this.settingsTreeView_AfterCheck);
|
||||||
|
this.settingsTreeView.DrawNode += new System.Windows.Forms.DrawTreeNodeEventHandler(this.settingsTreeView_DrawNode);
|
||||||
|
this.settingsTreeView.AfterSelect += new System.Windows.Forms.TreeViewEventHandler(this.settingsTreeView_AfterSelect);
|
||||||
|
//
|
||||||
|
// settingsPanel
|
||||||
|
//
|
||||||
|
this.settingsPanel.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||||
|
this.settingsPanel.Location = new System.Drawing.Point(166, 10);
|
||||||
|
this.settingsPanel.Margin = new System.Windows.Forms.Padding(10, 10, 10, 10);
|
||||||
|
this.settingsPanel.Name = "settingsPanel";
|
||||||
|
this.settingsPanel.Size = new System.Drawing.Size(608, 501);
|
||||||
|
this.settingsPanel.TabIndex = 3;
|
||||||
|
//
|
||||||
|
// MapSettingsDialog
|
||||||
|
//
|
||||||
|
this.AcceptButton = this.btnOK;
|
||||||
|
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||||
|
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||||
|
this.CancelButton = this.btnCancel;
|
||||||
|
this.ClientSize = new System.Drawing.Size(784, 561);
|
||||||
|
this.ControlBox = false;
|
||||||
|
this.Controls.Add(this.tableLayoutPanel1);
|
||||||
|
this.MaximizeBox = false;
|
||||||
|
this.MinimizeBox = false;
|
||||||
|
this.Name = "MapSettingsDialog";
|
||||||
|
this.ShowIcon = false;
|
||||||
|
this.ShowInTaskbar = false;
|
||||||
|
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
|
||||||
|
this.Text = "Map Settings";
|
||||||
|
this.tableLayoutPanel1.ResumeLayout(false);
|
||||||
|
this.tableLayoutPanel1.PerformLayout();
|
||||||
|
this.flowLayoutPanel1.ResumeLayout(false);
|
||||||
|
this.flowLayoutPanel1.PerformLayout();
|
||||||
|
this.ResumeLayout(false);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
private System.Windows.Forms.TableLayoutPanel tableLayoutPanel1;
|
||||||
|
private System.Windows.Forms.FlowLayoutPanel flowLayoutPanel1;
|
||||||
|
private System.Windows.Forms.Button btnCancel;
|
||||||
|
private System.Windows.Forms.Button btnOK;
|
||||||
|
private System.Windows.Forms.TreeView settingsTreeView;
|
||||||
|
private System.Windows.Forms.Panel settingsPanel;
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,157 @@
|
||||||
|
//
|
||||||
|
// Copyright 2020 Electronic Arts Inc.
|
||||||
|
//
|
||||||
|
// The Command & Conquer Map Editor and corresponding source code is free
|
||||||
|
// software: you can redistribute it and/or modify it under the terms of
|
||||||
|
// the GNU General Public License as published by the Free Software Foundation,
|
||||||
|
// either version 3 of the License, or (at your option) any later version.
|
||||||
|
|
||||||
|
// The Command & Conquer Map Editor and corresponding source code is distributed
|
||||||
|
// in the hope that it will be useful, but with permitted additional restrictions
|
||||||
|
// under Section 7 of the GPL. See the GNU General Public License in LICENSE.TXT
|
||||||
|
// distributed with this program. You should have received a copy of the
|
||||||
|
// GNU General Public License along with permitted additional restrictions
|
||||||
|
// with this program. If not, see https://github.com/electronicarts/CnC_Remastered_Collection
|
||||||
|
using MobiusEditor.Controls;
|
||||||
|
using MobiusEditor.Interface;
|
||||||
|
using MobiusEditor.Model;
|
||||||
|
using MobiusEditor.Utility;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Data;
|
||||||
|
using System.Drawing;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Runtime.InteropServices;
|
||||||
|
using System.Windows.Forms;
|
||||||
|
|
||||||
|
namespace MobiusEditor.Dialogs
|
||||||
|
{
|
||||||
|
public partial class MapSettingsDialog : Form
|
||||||
|
{
|
||||||
|
private const int TVIF_STATE = 0x8;
|
||||||
|
private const int TVIS_STATEIMAGEMASK = 0xF000;
|
||||||
|
private const int TV_FIRST = 0x1100;
|
||||||
|
private const int TVM_SETITEM = TV_FIRST + 63;
|
||||||
|
|
||||||
|
[DllImport("user32.dll")]
|
||||||
|
static extern IntPtr SendMessage(IntPtr hWnd, uint Msg, IntPtr wParam, IntPtr lParam);
|
||||||
|
|
||||||
|
private struct TVITEM
|
||||||
|
{
|
||||||
|
public int mask;
|
||||||
|
public IntPtr hItem;
|
||||||
|
public int state;
|
||||||
|
public int stateMask;
|
||||||
|
[MarshalAs(UnmanagedType.LPTStr)]
|
||||||
|
public String lpszText;
|
||||||
|
public int cchTextMax;
|
||||||
|
public int iImage;
|
||||||
|
public int iSelectedImage;
|
||||||
|
public int cChildren;
|
||||||
|
public IntPtr lParam;
|
||||||
|
}
|
||||||
|
|
||||||
|
private readonly IGamePlugin plugin;
|
||||||
|
private readonly PropertyTracker<BasicSection> basicSettingsTracker;
|
||||||
|
private readonly PropertyTracker<BriefingSection> briefingSettingsTracker;
|
||||||
|
private readonly IDictionary<House, PropertyTracker<House>> houseSettingsTrackers;
|
||||||
|
private readonly TreeNode playersNode;
|
||||||
|
|
||||||
|
public MapSettingsDialog(IGamePlugin plugin, PropertyTracker<BasicSection> basicSettingsTracker, PropertyTracker<BriefingSection> briefingSettingsTracker,
|
||||||
|
IDictionary<House, PropertyTracker<House>> houseSettingsTrackers)
|
||||||
|
{
|
||||||
|
InitializeComponent();
|
||||||
|
|
||||||
|
this.plugin = plugin;
|
||||||
|
this.basicSettingsTracker = basicSettingsTracker;
|
||||||
|
this.briefingSettingsTracker = briefingSettingsTracker;
|
||||||
|
this.houseSettingsTrackers = houseSettingsTrackers;
|
||||||
|
|
||||||
|
settingsTreeView.BeginUpdate();
|
||||||
|
settingsTreeView.Nodes.Clear();
|
||||||
|
settingsTreeView.Nodes.Add("BASIC", "Basic");
|
||||||
|
settingsTreeView.Nodes.Add("BRIEFING", "Briefing");
|
||||||
|
|
||||||
|
playersNode = settingsTreeView.Nodes.Add("Players");
|
||||||
|
foreach (var player in plugin.Map.Houses)
|
||||||
|
{
|
||||||
|
var playerNode = playersNode.Nodes.Add(player.Type.Name, player.Type.Name);
|
||||||
|
playerNode.Checked = player.Enabled;
|
||||||
|
}
|
||||||
|
playersNode.Expand();
|
||||||
|
|
||||||
|
settingsTreeView.EndUpdate();
|
||||||
|
settingsTreeView.SelectedNode = settingsTreeView.Nodes[0];
|
||||||
|
}
|
||||||
|
|
||||||
|
private void settingsTreeView_AfterSelect(object sender, TreeViewEventArgs e)
|
||||||
|
{
|
||||||
|
settingsPanel.Controls.Clear();
|
||||||
|
|
||||||
|
switch (settingsTreeView.SelectedNode.Name)
|
||||||
|
{
|
||||||
|
case "BASIC":
|
||||||
|
{
|
||||||
|
settingsPanel.Controls.Add(new BasicSettings(plugin, basicSettingsTracker));
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case "BRIEFING":
|
||||||
|
{
|
||||||
|
settingsPanel.Controls.Add(new BriefingSettings(plugin, briefingSettingsTracker));
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
{
|
||||||
|
var player = plugin.Map.Houses.Where(h => h.Type.Name == settingsTreeView.SelectedNode.Name).FirstOrDefault();
|
||||||
|
if (player != null)
|
||||||
|
{
|
||||||
|
settingsPanel.Controls.Add(new PlayerSettings(plugin, houseSettingsTrackers[player]));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void settingsTreeView_DrawNode(object sender, DrawTreeNodeEventArgs e)
|
||||||
|
{
|
||||||
|
if (!playersNode.Nodes.Contains(e.Node))
|
||||||
|
{
|
||||||
|
HideCheckBox(e.Node);
|
||||||
|
e.DrawDefault = true;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
e.Graphics.DrawString(e.Node.Text, e.Node.TreeView.Font, new SolidBrush(settingsTreeView.ForeColor), e.Node.Bounds.X, e.Node.Bounds.Y);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void HideCheckBox(TreeNode node)
|
||||||
|
{
|
||||||
|
TVITEM tvi = new TVITEM
|
||||||
|
{
|
||||||
|
hItem = node.Handle,
|
||||||
|
mask = TVIF_STATE,
|
||||||
|
stateMask = TVIS_STATEIMAGEMASK,
|
||||||
|
state = 0,
|
||||||
|
lpszText = null,
|
||||||
|
cchTextMax = 0,
|
||||||
|
iImage = 0,
|
||||||
|
iSelectedImage = 0,
|
||||||
|
cChildren = 0,
|
||||||
|
lParam = IntPtr.Zero
|
||||||
|
};
|
||||||
|
IntPtr lparam = Marshal.AllocHGlobal(Marshal.SizeOf(tvi));
|
||||||
|
Marshal.StructureToPtr(tvi, lparam, false);
|
||||||
|
SendMessage(node.TreeView.Handle, TVM_SETITEM, IntPtr.Zero, lparam);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void settingsTreeView_AfterCheck(object sender, TreeViewEventArgs e)
|
||||||
|
{
|
||||||
|
var player = plugin.Map.Houses.Where(h => h.Type.Name == e.Node.Name).FirstOrDefault();
|
||||||
|
if (player != null)
|
||||||
|
{
|
||||||
|
((dynamic)houseSettingsTrackers[player]).Enabled = e.Node.Checked;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -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>
|
|
@ -0,0 +1,301 @@
|
||||||
|
//
|
||||||
|
// Copyright 2020 Electronic Arts Inc.
|
||||||
|
//
|
||||||
|
// The Command & Conquer Map Editor and corresponding source code is free
|
||||||
|
// software: you can redistribute it and/or modify it under the terms of
|
||||||
|
// the GNU General Public License as published by the Free Software Foundation,
|
||||||
|
// either version 3 of the License, or (at your option) any later version.
|
||||||
|
|
||||||
|
// The Command & Conquer Map Editor and corresponding source code is distributed
|
||||||
|
// in the hope that it will be useful, but with permitted additional restrictions
|
||||||
|
// under Section 7 of the GPL. See the GNU General Public License in LICENSE.TXT
|
||||||
|
// distributed with this program. You should have received a copy of the
|
||||||
|
// GNU General Public License along with permitted additional restrictions
|
||||||
|
// with this program. If not, see https://github.com/electronicarts/CnC_Remastered_Collection
|
||||||
|
namespace MobiusEditor.Dialogs
|
||||||
|
{
|
||||||
|
partial class NewMapDialog
|
||||||
|
{
|
||||||
|
/// <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.tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel();
|
||||||
|
this.flowLayoutPanel1 = new System.Windows.Forms.FlowLayoutPanel();
|
||||||
|
this.btnCancel = new System.Windows.Forms.Button();
|
||||||
|
this.btnOK = new System.Windows.Forms.Button();
|
||||||
|
this.flowLayoutPanel2 = new System.Windows.Forms.FlowLayoutPanel();
|
||||||
|
this.groupBox1 = new System.Windows.Forms.GroupBox();
|
||||||
|
this.flowLayoutPanel3 = new System.Windows.Forms.FlowLayoutPanel();
|
||||||
|
this.radioTD = new System.Windows.Forms.RadioButton();
|
||||||
|
this.radioRA = new System.Windows.Forms.RadioButton();
|
||||||
|
this.groupBox2 = new System.Windows.Forms.GroupBox();
|
||||||
|
this.flowLayoutPanel4 = new System.Windows.Forms.FlowLayoutPanel();
|
||||||
|
this.radioTheater1 = new System.Windows.Forms.RadioButton();
|
||||||
|
this.radioTheater2 = new System.Windows.Forms.RadioButton();
|
||||||
|
this.radioTheater3 = new System.Windows.Forms.RadioButton();
|
||||||
|
this.tableLayoutPanel1.SuspendLayout();
|
||||||
|
this.flowLayoutPanel1.SuspendLayout();
|
||||||
|
this.flowLayoutPanel2.SuspendLayout();
|
||||||
|
this.groupBox1.SuspendLayout();
|
||||||
|
this.flowLayoutPanel3.SuspendLayout();
|
||||||
|
this.groupBox2.SuspendLayout();
|
||||||
|
this.flowLayoutPanel4.SuspendLayout();
|
||||||
|
this.SuspendLayout();
|
||||||
|
//
|
||||||
|
// tableLayoutPanel1
|
||||||
|
//
|
||||||
|
this.tableLayoutPanel1.ColumnCount = 1;
|
||||||
|
this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100F));
|
||||||
|
this.tableLayoutPanel1.Controls.Add(this.flowLayoutPanel1, 0, 1);
|
||||||
|
this.tableLayoutPanel1.Controls.Add(this.flowLayoutPanel2, 0, 0);
|
||||||
|
this.tableLayoutPanel1.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||||
|
this.tableLayoutPanel1.Location = new System.Drawing.Point(0, 0);
|
||||||
|
this.tableLayoutPanel1.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
|
||||||
|
this.tableLayoutPanel1.Name = "tableLayoutPanel1";
|
||||||
|
this.tableLayoutPanel1.RowCount = 2;
|
||||||
|
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100F));
|
||||||
|
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle());
|
||||||
|
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 13F));
|
||||||
|
this.tableLayoutPanel1.Size = new System.Drawing.Size(356, 324);
|
||||||
|
this.tableLayoutPanel1.TabIndex = 0;
|
||||||
|
//
|
||||||
|
// flowLayoutPanel1
|
||||||
|
//
|
||||||
|
this.flowLayoutPanel1.AutoSize = true;
|
||||||
|
this.flowLayoutPanel1.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink;
|
||||||
|
this.flowLayoutPanel1.Controls.Add(this.btnCancel);
|
||||||
|
this.flowLayoutPanel1.Controls.Add(this.btnOK);
|
||||||
|
this.flowLayoutPanel1.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||||
|
this.flowLayoutPanel1.FlowDirection = System.Windows.Forms.FlowDirection.RightToLeft;
|
||||||
|
this.flowLayoutPanel1.Location = new System.Drawing.Point(2, 295);
|
||||||
|
this.flowLayoutPanel1.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
|
||||||
|
this.flowLayoutPanel1.Name = "flowLayoutPanel1";
|
||||||
|
this.flowLayoutPanel1.Size = new System.Drawing.Size(352, 27);
|
||||||
|
this.flowLayoutPanel1.TabIndex = 0;
|
||||||
|
//
|
||||||
|
// btnCancel
|
||||||
|
//
|
||||||
|
this.btnCancel.AutoSize = true;
|
||||||
|
this.btnCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel;
|
||||||
|
this.btnCancel.Location = new System.Drawing.Point(300, 2);
|
||||||
|
this.btnCancel.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
|
||||||
|
this.btnCancel.Name = "btnCancel";
|
||||||
|
this.btnCancel.Size = new System.Drawing.Size(50, 23);
|
||||||
|
this.btnCancel.TabIndex = 1;
|
||||||
|
this.btnCancel.Text = "&Cancel";
|
||||||
|
this.btnCancel.UseVisualStyleBackColor = true;
|
||||||
|
//
|
||||||
|
// btnOK
|
||||||
|
//
|
||||||
|
this.btnOK.AutoSize = true;
|
||||||
|
this.btnOK.DialogResult = System.Windows.Forms.DialogResult.OK;
|
||||||
|
this.btnOK.Location = new System.Drawing.Point(246, 2);
|
||||||
|
this.btnOK.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
|
||||||
|
this.btnOK.Name = "btnOK";
|
||||||
|
this.btnOK.Size = new System.Drawing.Size(50, 23);
|
||||||
|
this.btnOK.TabIndex = 0;
|
||||||
|
this.btnOK.Text = "&OK";
|
||||||
|
this.btnOK.UseVisualStyleBackColor = true;
|
||||||
|
//
|
||||||
|
// flowLayoutPanel2
|
||||||
|
//
|
||||||
|
this.flowLayoutPanel2.Controls.Add(this.groupBox1);
|
||||||
|
this.flowLayoutPanel2.Controls.Add(this.groupBox2);
|
||||||
|
this.flowLayoutPanel2.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||||
|
this.flowLayoutPanel2.FlowDirection = System.Windows.Forms.FlowDirection.TopDown;
|
||||||
|
this.flowLayoutPanel2.Location = new System.Drawing.Point(2, 2);
|
||||||
|
this.flowLayoutPanel2.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
|
||||||
|
this.flowLayoutPanel2.Name = "flowLayoutPanel2";
|
||||||
|
this.flowLayoutPanel2.Size = new System.Drawing.Size(352, 289);
|
||||||
|
this.flowLayoutPanel2.TabIndex = 1;
|
||||||
|
//
|
||||||
|
// groupBox1
|
||||||
|
//
|
||||||
|
this.groupBox1.Controls.Add(this.flowLayoutPanel3);
|
||||||
|
this.groupBox1.Location = new System.Drawing.Point(2, 2);
|
||||||
|
this.groupBox1.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
|
||||||
|
this.groupBox1.Name = "groupBox1";
|
||||||
|
this.groupBox1.Padding = new System.Windows.Forms.Padding(2, 2, 2, 2);
|
||||||
|
this.groupBox1.Size = new System.Drawing.Size(339, 70);
|
||||||
|
this.groupBox1.TabIndex = 2;
|
||||||
|
this.groupBox1.TabStop = false;
|
||||||
|
this.groupBox1.Text = "Game Type";
|
||||||
|
//
|
||||||
|
// flowLayoutPanel3
|
||||||
|
//
|
||||||
|
this.flowLayoutPanel3.AutoSize = true;
|
||||||
|
this.flowLayoutPanel3.Controls.Add(this.radioTD);
|
||||||
|
this.flowLayoutPanel3.Controls.Add(this.radioRA);
|
||||||
|
this.flowLayoutPanel3.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||||
|
this.flowLayoutPanel3.FlowDirection = System.Windows.Forms.FlowDirection.TopDown;
|
||||||
|
this.flowLayoutPanel3.Location = new System.Drawing.Point(2, 15);
|
||||||
|
this.flowLayoutPanel3.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
|
||||||
|
this.flowLayoutPanel3.Name = "flowLayoutPanel3";
|
||||||
|
this.flowLayoutPanel3.Size = new System.Drawing.Size(335, 53);
|
||||||
|
this.flowLayoutPanel3.TabIndex = 0;
|
||||||
|
//
|
||||||
|
// radioTD
|
||||||
|
//
|
||||||
|
this.radioTD.AutoSize = true;
|
||||||
|
this.radioTD.Checked = true;
|
||||||
|
this.radioTD.Location = new System.Drawing.Point(2, 2);
|
||||||
|
this.radioTD.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
|
||||||
|
this.radioTD.Name = "radioTD";
|
||||||
|
this.radioTD.Size = new System.Drawing.Size(94, 17);
|
||||||
|
this.radioTD.TabIndex = 0;
|
||||||
|
this.radioTD.TabStop = true;
|
||||||
|
this.radioTD.Text = "Tiberian Dawn";
|
||||||
|
this.radioTD.UseVisualStyleBackColor = true;
|
||||||
|
this.radioTD.CheckedChanged += new System.EventHandler(this.radioGameType_CheckedChanged);
|
||||||
|
//
|
||||||
|
// radioRA
|
||||||
|
//
|
||||||
|
this.radioRA.AutoSize = true;
|
||||||
|
this.radioRA.Location = new System.Drawing.Point(2, 23);
|
||||||
|
this.radioRA.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
|
||||||
|
this.radioRA.Name = "radioRA";
|
||||||
|
this.radioRA.Size = new System.Drawing.Size(69, 17);
|
||||||
|
this.radioRA.TabIndex = 1;
|
||||||
|
this.radioRA.Text = "Red Alert";
|
||||||
|
this.radioRA.UseVisualStyleBackColor = true;
|
||||||
|
this.radioRA.CheckedChanged += new System.EventHandler(this.radioGameType_CheckedChanged);
|
||||||
|
//
|
||||||
|
// groupBox2
|
||||||
|
//
|
||||||
|
this.groupBox2.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right)));
|
||||||
|
this.groupBox2.Controls.Add(this.flowLayoutPanel4);
|
||||||
|
this.groupBox2.Location = new System.Drawing.Point(2, 76);
|
||||||
|
this.groupBox2.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
|
||||||
|
this.groupBox2.Name = "groupBox2";
|
||||||
|
this.groupBox2.Padding = new System.Windows.Forms.Padding(2, 2, 2, 2);
|
||||||
|
this.groupBox2.Size = new System.Drawing.Size(339, 89);
|
||||||
|
this.groupBox2.TabIndex = 3;
|
||||||
|
this.groupBox2.TabStop = false;
|
||||||
|
this.groupBox2.Text = "Theater";
|
||||||
|
//
|
||||||
|
// flowLayoutPanel4
|
||||||
|
//
|
||||||
|
this.flowLayoutPanel4.AutoSize = true;
|
||||||
|
this.flowLayoutPanel4.Controls.Add(this.radioTheater1);
|
||||||
|
this.flowLayoutPanel4.Controls.Add(this.radioTheater2);
|
||||||
|
this.flowLayoutPanel4.Controls.Add(this.radioTheater3);
|
||||||
|
this.flowLayoutPanel4.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||||
|
this.flowLayoutPanel4.FlowDirection = System.Windows.Forms.FlowDirection.TopDown;
|
||||||
|
this.flowLayoutPanel4.Location = new System.Drawing.Point(2, 15);
|
||||||
|
this.flowLayoutPanel4.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
|
||||||
|
this.flowLayoutPanel4.Name = "flowLayoutPanel4";
|
||||||
|
this.flowLayoutPanel4.Size = new System.Drawing.Size(335, 72);
|
||||||
|
this.flowLayoutPanel4.TabIndex = 0;
|
||||||
|
//
|
||||||
|
// radioTheater1
|
||||||
|
//
|
||||||
|
this.radioTheater1.AutoSize = true;
|
||||||
|
this.radioTheater1.Checked = true;
|
||||||
|
this.radioTheater1.Location = new System.Drawing.Point(2, 2);
|
||||||
|
this.radioTheater1.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
|
||||||
|
this.radioTheater1.Name = "radioTheater1";
|
||||||
|
this.radioTheater1.Size = new System.Drawing.Size(56, 17);
|
||||||
|
this.radioTheater1.TabIndex = 0;
|
||||||
|
this.radioTheater1.TabStop = true;
|
||||||
|
this.radioTheater1.Text = "Desert";
|
||||||
|
this.radioTheater1.UseVisualStyleBackColor = true;
|
||||||
|
//
|
||||||
|
// radioTheater2
|
||||||
|
//
|
||||||
|
this.radioTheater2.AutoSize = true;
|
||||||
|
this.radioTheater2.Location = new System.Drawing.Point(2, 23);
|
||||||
|
this.radioTheater2.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
|
||||||
|
this.radioTheater2.Name = "radioTheater2";
|
||||||
|
this.radioTheater2.Size = new System.Drawing.Size(76, 17);
|
||||||
|
this.radioTheater2.TabIndex = 1;
|
||||||
|
this.radioTheater2.Text = "Temperate";
|
||||||
|
this.radioTheater2.UseVisualStyleBackColor = true;
|
||||||
|
//
|
||||||
|
// radioTheater3
|
||||||
|
//
|
||||||
|
this.radioTheater3.AutoSize = true;
|
||||||
|
this.radioTheater3.Location = new System.Drawing.Point(2, 44);
|
||||||
|
this.radioTheater3.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
|
||||||
|
this.radioTheater3.Name = "radioTheater3";
|
||||||
|
this.radioTheater3.Size = new System.Drawing.Size(56, 17);
|
||||||
|
this.radioTheater3.TabIndex = 2;
|
||||||
|
this.radioTheater3.TabStop = true;
|
||||||
|
this.radioTheater3.Text = "Winter";
|
||||||
|
this.radioTheater3.UseVisualStyleBackColor = true;
|
||||||
|
//
|
||||||
|
// NewMapDialog
|
||||||
|
//
|
||||||
|
this.AcceptButton = this.btnOK;
|
||||||
|
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||||
|
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||||
|
this.CancelButton = this.btnCancel;
|
||||||
|
this.ClientSize = new System.Drawing.Size(356, 324);
|
||||||
|
this.ControlBox = false;
|
||||||
|
this.Controls.Add(this.tableLayoutPanel1);
|
||||||
|
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
|
||||||
|
this.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
|
||||||
|
this.MaximizeBox = false;
|
||||||
|
this.MinimizeBox = false;
|
||||||
|
this.Name = "NewMapDialog";
|
||||||
|
this.ShowIcon = false;
|
||||||
|
this.ShowInTaskbar = false;
|
||||||
|
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
|
||||||
|
this.Text = "New Map";
|
||||||
|
this.tableLayoutPanel1.ResumeLayout(false);
|
||||||
|
this.tableLayoutPanel1.PerformLayout();
|
||||||
|
this.flowLayoutPanel1.ResumeLayout(false);
|
||||||
|
this.flowLayoutPanel1.PerformLayout();
|
||||||
|
this.flowLayoutPanel2.ResumeLayout(false);
|
||||||
|
this.groupBox1.ResumeLayout(false);
|
||||||
|
this.groupBox1.PerformLayout();
|
||||||
|
this.flowLayoutPanel3.ResumeLayout(false);
|
||||||
|
this.flowLayoutPanel3.PerformLayout();
|
||||||
|
this.groupBox2.ResumeLayout(false);
|
||||||
|
this.groupBox2.PerformLayout();
|
||||||
|
this.flowLayoutPanel4.ResumeLayout(false);
|
||||||
|
this.flowLayoutPanel4.PerformLayout();
|
||||||
|
this.ResumeLayout(false);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
private System.Windows.Forms.TableLayoutPanel tableLayoutPanel1;
|
||||||
|
private System.Windows.Forms.FlowLayoutPanel flowLayoutPanel1;
|
||||||
|
private System.Windows.Forms.Button btnCancel;
|
||||||
|
private System.Windows.Forms.Button btnOK;
|
||||||
|
private System.Windows.Forms.FlowLayoutPanel flowLayoutPanel2;
|
||||||
|
private System.Windows.Forms.GroupBox groupBox1;
|
||||||
|
private System.Windows.Forms.GroupBox groupBox2;
|
||||||
|
private System.Windows.Forms.FlowLayoutPanel flowLayoutPanel3;
|
||||||
|
private System.Windows.Forms.RadioButton radioTD;
|
||||||
|
private System.Windows.Forms.RadioButton radioRA;
|
||||||
|
private System.Windows.Forms.FlowLayoutPanel flowLayoutPanel4;
|
||||||
|
private System.Windows.Forms.RadioButton radioTheater1;
|
||||||
|
private System.Windows.Forms.RadioButton radioTheater2;
|
||||||
|
private System.Windows.Forms.RadioButton radioTheater3;
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,85 @@
|
||||||
|
//
|
||||||
|
// Copyright 2020 Electronic Arts Inc.
|
||||||
|
//
|
||||||
|
// The Command & Conquer Map Editor and corresponding source code is free
|
||||||
|
// software: you can redistribute it and/or modify it under the terms of
|
||||||
|
// the GNU General Public License as published by the Free Software Foundation,
|
||||||
|
// either version 3 of the License, or (at your option) any later version.
|
||||||
|
|
||||||
|
// The Command & Conquer Map Editor and corresponding source code is distributed
|
||||||
|
// in the hope that it will be useful, but with permitted additional restrictions
|
||||||
|
// under Section 7 of the GPL. See the GNU General Public License in LICENSE.TXT
|
||||||
|
// distributed with this program. You should have received a copy of the
|
||||||
|
// GNU General Public License along with permitted additional restrictions
|
||||||
|
// with this program. If not, see https://github.com/electronicarts/CnC_Remastered_Collection
|
||||||
|
using MobiusEditor.Interface;
|
||||||
|
using System;
|
||||||
|
using System.Windows.Forms;
|
||||||
|
|
||||||
|
namespace MobiusEditor.Dialogs
|
||||||
|
{
|
||||||
|
public partial class NewMapDialog : Form
|
||||||
|
{
|
||||||
|
private GameType gameType = GameType.TiberianDawn;
|
||||||
|
public GameType GameType
|
||||||
|
{
|
||||||
|
get => gameType;
|
||||||
|
set
|
||||||
|
{
|
||||||
|
if (gameType != value)
|
||||||
|
{
|
||||||
|
gameType = value;
|
||||||
|
UpdateGameType();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public string TheaterName
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
if (radioTheater1.Checked) return radioTheater1.Text;
|
||||||
|
if (radioTheater2.Checked) return radioTheater2.Text;
|
||||||
|
if (radioTheater3.Checked) return radioTheater3.Text;
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public NewMapDialog()
|
||||||
|
{
|
||||||
|
InitializeComponent();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void UpdateGameType |