diff --git a/OpenRA.Game/Actor.cs b/OpenRA.Game/Actor.cs index e5a6a9386e..39e2a9055e 100755 --- a/OpenRA.Game/Actor.cs +++ b/OpenRA.Game/Actor.cs @@ -13,7 +13,6 @@ using System.Collections.Generic; using System.Drawing; using System.Linq; using OpenRA.FileFormats; -using OpenRA.Support; using OpenRA.Traits; using OpenRA.Traits.Activities; diff --git a/OpenRA.Game/ActorReference.cs b/OpenRA.Game/ActorReference.cs index b85925427e..736d2fa545 100755 --- a/OpenRA.Game/ActorReference.cs +++ b/OpenRA.Game/ActorReference.cs @@ -10,7 +10,6 @@ using System.Collections; using System.Collections.Generic; -using System.IO; namespace OpenRA.FileFormats { diff --git a/OpenRA.Game/Map.cs b/OpenRA.Game/Map.cs index eeef9fc445..628dd20ff0 100644 --- a/OpenRA.Game/Map.cs +++ b/OpenRA.Game/Map.cs @@ -13,10 +13,9 @@ using System.Collections.Generic; using System.Drawing; using System.IO; using System.Linq; -using System.Reflection; using System.Security.Cryptography; -using OpenRA.FileFormats; using System.Text; +using OpenRA.FileFormats; namespace OpenRA { diff --git a/OpenRA.Game/Player.cs b/OpenRA.Game/Player.cs index 9e16d52355..7c9021e2f2 100644 --- a/OpenRA.Game/Player.cs +++ b/OpenRA.Game/Player.cs @@ -9,7 +9,6 @@ #endregion using System.Collections.Generic; -using System.Drawing; using System.Linq; using OpenRA.FileFormats; using OpenRA.Network; diff --git a/OpenRA.Game/Utilities.cs b/OpenRA.Game/Utilities.cs index 92f7e21bc5..ab96758dd9 100644 --- a/OpenRA.Game/Utilities.cs +++ b/OpenRA.Game/Utilities.cs @@ -10,7 +10,6 @@ using System; using System.Diagnostics; -using System.Threading; namespace OpenRA { diff --git a/OpenRA.Game/Widgets/BackgroundWidget.cs b/OpenRA.Game/Widgets/BackgroundWidget.cs index 720c166948..f1a9cd4167 100644 --- a/OpenRA.Game/Widgets/BackgroundWidget.cs +++ b/OpenRA.Game/Widgets/BackgroundWidget.cs @@ -8,8 +8,6 @@ */ #endregion -using OpenRA.Graphics; - namespace OpenRA.Widgets { public class BackgroundWidget : Widget diff --git a/OpenRA.Game/Widgets/ChatDisplayWidget.cs b/OpenRA.Game/Widgets/ChatDisplayWidget.cs index 10d3660fbb..ef3e10fb21 100644 --- a/OpenRA.Game/Widgets/ChatDisplayWidget.cs +++ b/OpenRA.Game/Widgets/ChatDisplayWidget.cs @@ -11,7 +11,6 @@ using System.Collections.Generic; using System.Drawing; using System.Linq; -using OpenRA.Graphics; namespace OpenRA.Widgets { diff --git a/OpenRA.Game/Widgets/ChatEntryWidget.cs b/OpenRA.Game/Widgets/ChatEntryWidget.cs index c928d6e023..66bc4557aa 100755 --- a/OpenRA.Game/Widgets/ChatEntryWidget.cs +++ b/OpenRA.Game/Widgets/ChatEntryWidget.cs @@ -9,7 +9,6 @@ #endregion using System.Drawing; -using OpenRA.Graphics; using OpenRA.Network; namespace OpenRA.Widgets diff --git a/OpenRA.Game/Widgets/ColorBlockWidget.cs b/OpenRA.Game/Widgets/ColorBlockWidget.cs index 2a0de7612d..604d26ac17 100644 --- a/OpenRA.Game/Widgets/ColorBlockWidget.cs +++ b/OpenRA.Game/Widgets/ColorBlockWidget.cs @@ -10,7 +10,6 @@ using System; using System.Drawing; -using OpenRA.Graphics; namespace OpenRA.Widgets { diff --git a/OpenRA.Game/Widgets/LabelWidget.cs b/OpenRA.Game/Widgets/LabelWidget.cs index 169f9f28d9..b31feadd6a 100644 --- a/OpenRA.Game/Widgets/LabelWidget.cs +++ b/OpenRA.Game/Widgets/LabelWidget.cs @@ -9,7 +9,6 @@ #endregion using System; -using System.Collections.Generic; using System.Drawing; using OpenRA.Graphics; diff --git a/OpenRA.Game/Widgets/MapPreviewWidget.cs b/OpenRA.Game/Widgets/MapPreviewWidget.cs index 422cf3d8f1..234cca020e 100644 --- a/OpenRA.Game/Widgets/MapPreviewWidget.cs +++ b/OpenRA.Game/Widgets/MapPreviewWidget.cs @@ -11,7 +11,6 @@ using System; using System.Collections.Generic; using System.Drawing; -using System.Linq; using OpenRA.FileFormats; using OpenRA.Graphics; diff --git a/OpenRA.Game/Widgets/PerfGraphWidget.cs b/OpenRA.Game/Widgets/PerfGraphWidget.cs index 2384cd2ca8..ad0d04f714 100644 --- a/OpenRA.Game/Widgets/PerfGraphWidget.cs +++ b/OpenRA.Game/Widgets/PerfGraphWidget.cs @@ -10,7 +10,6 @@ using System.Drawing; using System.Linq; -using OpenRA.Graphics; using OpenRA.Support; namespace OpenRA.Widgets diff --git a/OpenRA.Game/Widgets/ProgressBarWidget.cs b/OpenRA.Game/Widgets/ProgressBarWidget.cs index 2a2cac02dd..914fc12807 100644 --- a/OpenRA.Game/Widgets/ProgressBarWidget.cs +++ b/OpenRA.Game/Widgets/ProgressBarWidget.cs @@ -10,8 +10,6 @@ using System; using System.Drawing; -using System.Collections.Generic; -using OpenRA.Graphics; namespace OpenRA.Widgets { diff --git a/OpenRA.Game/Widgets/ScrollPanelWidget.cs b/OpenRA.Game/Widgets/ScrollPanelWidget.cs index 818d6564ed..2ab681536d 100644 --- a/OpenRA.Game/Widgets/ScrollPanelWidget.cs +++ b/OpenRA.Game/Widgets/ScrollPanelWidget.cs @@ -8,9 +8,9 @@ */ #endregion +using System; using System.Drawing; using OpenRA.Graphics; -using System; namespace OpenRA.Widgets { diff --git a/OpenRA.Game/Widgets/ScrollingTextWidget.cs b/OpenRA.Game/Widgets/ScrollingTextWidget.cs index ebae11efe7..b0a326eab8 100755 --- a/OpenRA.Game/Widgets/ScrollingTextWidget.cs +++ b/OpenRA.Game/Widgets/ScrollingTextWidget.cs @@ -10,7 +10,6 @@ using System; using System.Drawing; -using OpenRA.Graphics; namespace OpenRA.Widgets { diff --git a/OpenRA.Game/Widgets/SliderWidget.cs b/OpenRA.Game/Widgets/SliderWidget.cs index feaf91c233..bb81add601 100755 --- a/OpenRA.Game/Widgets/SliderWidget.cs +++ b/OpenRA.Game/Widgets/SliderWidget.cs @@ -10,7 +10,6 @@ using System; using System.Drawing; -using OpenRA.Graphics; namespace OpenRA.Widgets { diff --git a/OpenRA.Game/Widgets/TimerWidget.cs b/OpenRA.Game/Widgets/TimerWidget.cs index f3176723fa..aca410290b 100644 --- a/OpenRA.Game/Widgets/TimerWidget.cs +++ b/OpenRA.Game/Widgets/TimerWidget.cs @@ -9,7 +9,6 @@ #endregion using System.Drawing; -using OpenRA.Graphics; using OpenRA.Support; namespace OpenRA.Widgets diff --git a/OpenRA.Game/Widgets/WidgetUtils.cs b/OpenRA.Game/Widgets/WidgetUtils.cs index 9fe5a3eed5..c2705e993d 100644 --- a/OpenRA.Game/Widgets/WidgetUtils.cs +++ b/OpenRA.Game/Widgets/WidgetUtils.cs @@ -9,10 +9,10 @@ #endregion using System; +using System.Collections.Generic; using System.Drawing; using System.Linq; using OpenRA.Graphics; -using System.Collections.Generic; namespace OpenRA.Widgets { diff --git a/OpenRA.Game/World.cs b/OpenRA.Game/World.cs index b35e8c59f5..2c42faee26 100644 --- a/OpenRA.Game/World.cs +++ b/OpenRA.Game/World.cs @@ -15,8 +15,8 @@ using OpenRA.Effects; using OpenRA.FileFormats; using OpenRA.Network; using OpenRA.Orders; -using OpenRA.Traits; using OpenRA.Support; +using OpenRA.Traits; using XRandom = OpenRA.Thirdparty.Random; namespace OpenRA diff --git a/OpenRA.Mods.Cnc/Activities/HarvesterDockSequence.cs b/OpenRA.Mods.Cnc/Activities/HarvesterDockSequence.cs index e861777370..ca98986fe9 100644 --- a/OpenRA.Mods.Cnc/Activities/HarvesterDockSequence.cs +++ b/OpenRA.Mods.Cnc/Activities/HarvesterDockSequence.cs @@ -8,14 +8,14 @@ */ #endregion +using System; +using System.Collections.Generic; +using OpenRA.Mods.RA; using OpenRA.Mods.RA.Activities; +using OpenRA.Mods.RA.Move; +using OpenRA.Mods.RA.Render; using OpenRA.Traits; using OpenRA.Traits.Activities; -using System.Collections.Generic; -using OpenRA.Mods.RA.Move; -using OpenRA.Mods.RA; -using OpenRA.Mods.RA.Render; -using System; namespace OpenRA.Mods.Cnc { diff --git a/OpenRA.Mods.Cnc/CncColorPickerPaletteModifier.cs b/OpenRA.Mods.Cnc/CncColorPickerPaletteModifier.cs index 9f2b34e269..24596b8015 100644 --- a/OpenRA.Mods.Cnc/CncColorPickerPaletteModifier.cs +++ b/OpenRA.Mods.Cnc/CncColorPickerPaletteModifier.cs @@ -12,7 +12,6 @@ using System.Collections.Generic; using System.Linq; using OpenRA.FileFormats; using OpenRA.Graphics; -using OpenRA.Mods.Cnc.Widgets; using OpenRA.Traits; namespace OpenRA.Mods.Cnc diff --git a/OpenRA.Mods.Cnc/CncLoadScreen.cs b/OpenRA.Mods.Cnc/CncLoadScreen.cs index 618586b155..0cfef18d05 100644 --- a/OpenRA.Mods.Cnc/CncLoadScreen.cs +++ b/OpenRA.Mods.Cnc/CncLoadScreen.cs @@ -10,12 +10,10 @@ using System.Collections.Generic; using System.Drawing; -using System.Linq; -using OpenRA.Support; -using OpenRA.Graphics; -using OpenRA.Widgets; using OpenRA.FileFormats; -using System; +using OpenRA.Graphics; +using OpenRA.Support; +using OpenRA.Widgets; namespace OpenRA.Mods.Cnc { diff --git a/OpenRA.Mods.Cnc/CncWaterPaletteRotation.cs b/OpenRA.Mods.Cnc/CncWaterPaletteRotation.cs index 276894c4bf..2d9e88641d 100644 --- a/OpenRA.Mods.Cnc/CncWaterPaletteRotation.cs +++ b/OpenRA.Mods.Cnc/CncWaterPaletteRotation.cs @@ -8,10 +8,9 @@ */ #endregion -using System.Drawing; -using OpenRA.Traits; using System.Collections.Generic; using OpenRA.FileFormats; +using OpenRA.Traits; namespace OpenRA.Mods.Cnc { diff --git a/OpenRA.Mods.Cnc/IonCannonPower.cs b/OpenRA.Mods.Cnc/IonCannonPower.cs index 6a23442e9e..0629ecf9ae 100644 --- a/OpenRA.Mods.Cnc/IonCannonPower.cs +++ b/OpenRA.Mods.Cnc/IonCannonPower.cs @@ -10,8 +10,6 @@ using OpenRA.Mods.Cnc.Effects; using OpenRA.Mods.RA; -using OpenRA.Orders; -using OpenRA.Traits; namespace OpenRA.Mods.Cnc { diff --git a/OpenRA.Mods.Cnc/Missions/CncShellmapScript.cs b/OpenRA.Mods.Cnc/Missions/CncShellmapScript.cs index 2ab0010994..aa161972d3 100755 --- a/OpenRA.Mods.Cnc/Missions/CncShellmapScript.cs +++ b/OpenRA.Mods.Cnc/Missions/CncShellmapScript.cs @@ -10,11 +10,10 @@ using System; using System.Collections.Generic; -using OpenRA.Mods.RA.Air; -using OpenRA.Traits; using OpenRA.FileFormats; using OpenRA.Mods.RA.Activities; using OpenRA.Mods.RA.Move; +using OpenRA.Traits; namespace OpenRA.Mods.RA { diff --git a/OpenRA.Mods.Cnc/Missions/Gdi01Script.cs b/OpenRA.Mods.Cnc/Missions/Gdi01Script.cs index 5d9f74ae6d..2d957dba7b 100644 --- a/OpenRA.Mods.Cnc/Missions/Gdi01Script.cs +++ b/OpenRA.Mods.Cnc/Missions/Gdi01Script.cs @@ -8,17 +8,13 @@ */ #endregion -using System; using System.Collections.Generic; using System.Linq; -using OpenRA; using OpenRA.FileFormats; using OpenRA.Mods.RA; using OpenRA.Mods.RA.Activities; using OpenRA.Mods.RA.Move; using OpenRA.Traits; -using OpenRA.Traits.Activities; -using OpenRA.Widgets; namespace OpenRA.Mods.Cnc { diff --git a/OpenRA.Mods.Cnc/PoisonedByTiberium.cs b/OpenRA.Mods.Cnc/PoisonedByTiberium.cs index 5f4ec0e592..ebe5e7e0c9 100644 --- a/OpenRA.Mods.Cnc/PoisonedByTiberium.cs +++ b/OpenRA.Mods.Cnc/PoisonedByTiberium.cs @@ -9,8 +9,6 @@ #endregion using System.Linq; -using OpenRA.GameRules; -using OpenRA.Mods.RA; using OpenRA.Traits; namespace OpenRA.Mods.Cnc diff --git a/OpenRA.Mods.Cnc/ProductionAirdrop.cs b/OpenRA.Mods.Cnc/ProductionAirdrop.cs index 5bc3685783..3e17453cec 100644 --- a/OpenRA.Mods.Cnc/ProductionAirdrop.cs +++ b/OpenRA.Mods.Cnc/ProductionAirdrop.cs @@ -12,10 +12,9 @@ using System.Linq; using OpenRA.FileFormats; using OpenRA.Mods.RA; using OpenRA.Mods.RA.Activities; +using OpenRA.Mods.RA.Air; using OpenRA.Mods.RA.Render; using OpenRA.Traits; -using OpenRA.Traits.Activities; -using OpenRA.Mods.RA.Air; namespace OpenRA.Mods.Cnc { diff --git a/OpenRA.Mods.Cnc/RenderCargo.cs b/OpenRA.Mods.Cnc/RenderCargo.cs index a7c461ad0c..299a77735b 100644 --- a/OpenRA.Mods.Cnc/RenderCargo.cs +++ b/OpenRA.Mods.Cnc/RenderCargo.cs @@ -8,11 +8,10 @@ */ #endregion -using System; using System.Collections.Generic; using System.Linq; -using OpenRA.Traits; using OpenRA.Mods.RA; +using OpenRA.Traits; namespace OpenRA.Mods.Cnc { diff --git a/OpenRA.Mods.Cnc/RenderGunboat.cs b/OpenRA.Mods.Cnc/RenderGunboat.cs index 9bc8a899ca..b98aba86ed 100644 --- a/OpenRA.Mods.Cnc/RenderGunboat.cs +++ b/OpenRA.Mods.Cnc/RenderGunboat.cs @@ -8,9 +8,9 @@ */ #endregion +using System; using OpenRA.Graphics; using OpenRA.Traits; -using System; namespace OpenRA.Mods.RA.Render { diff --git a/OpenRA.Mods.Cnc/SpawnViceroid.cs b/OpenRA.Mods.Cnc/SpawnViceroid.cs index 0fb144f5b3..6df21a020d 100644 --- a/OpenRA.Mods.Cnc/SpawnViceroid.cs +++ b/OpenRA.Mods.Cnc/SpawnViceroid.cs @@ -8,9 +8,9 @@ */ #endregion -using OpenRA.Traits; -using OpenRA.FileFormats; using System.Linq; +using OpenRA.FileFormats; +using OpenRA.Traits; namespace OpenRA.Mods.Cnc { diff --git a/OpenRA.Mods.Cnc/TiberiumRefinery.cs b/OpenRA.Mods.Cnc/TiberiumRefinery.cs index 3c5946bcd8..e0d549fdd4 100644 --- a/OpenRA.Mods.Cnc/TiberiumRefinery.cs +++ b/OpenRA.Mods.Cnc/TiberiumRefinery.cs @@ -8,14 +8,10 @@ */ #endregion -using System.Drawing; +using System.Collections.Generic; using OpenRA.Mods.RA; -using OpenRA.Mods.RA.Activities; -using OpenRA.Mods.RA.Render; using OpenRA.Traits; using OpenRA.Traits.Activities; -using OpenRA.Mods.RA.Move; -using System.Collections.Generic; namespace OpenRA.Mods.Cnc { diff --git a/OpenRA.Mods.Cnc/Widgets/CncCheatsLogic.cs b/OpenRA.Mods.Cnc/Widgets/CncCheatsLogic.cs index 18a76b8741..6969da9f14 100644 --- a/OpenRA.Mods.Cnc/Widgets/CncCheatsLogic.cs +++ b/OpenRA.Mods.Cnc/Widgets/CncCheatsLogic.cs @@ -18,8 +18,6 @@ */ #endregion -using System; -using OpenRA; using OpenRA.Traits; using OpenRA.Widgets; diff --git a/OpenRA.Mods.Cnc/Widgets/CncConnectionLogic.cs b/OpenRA.Mods.Cnc/Widgets/CncConnectionLogic.cs index 04c14c2095..069fe43863 100644 --- a/OpenRA.Mods.Cnc/Widgets/CncConnectionLogic.cs +++ b/OpenRA.Mods.Cnc/Widgets/CncConnectionLogic.cs @@ -8,10 +8,9 @@ */ #endregion +using System; using OpenRA.Network; using OpenRA.Widgets; -using System; -using System.Collections.Generic; namespace OpenRA.Mods.Cnc.Widgets { diff --git a/OpenRA.Mods.Cnc/Widgets/CncIngameChromeLogic.cs b/OpenRA.Mods.Cnc/Widgets/CncIngameChromeLogic.cs index c78530f7cd..39110fb7f5 100755 --- a/OpenRA.Mods.Cnc/Widgets/CncIngameChromeLogic.cs +++ b/OpenRA.Mods.Cnc/Widgets/CncIngameChromeLogic.cs @@ -8,12 +8,10 @@ */ #endregion -using OpenRA.Traits; -using OpenRA.Widgets; -using System.Drawing; -using System.Collections.Generic; using System; +using System.Drawing; using OpenRA.Mods.RA; +using OpenRA.Widgets; namespace OpenRA.Mods.Cnc.Widgets { diff --git a/OpenRA.Mods.Cnc/Widgets/CncInstallLogic.cs b/OpenRA.Mods.Cnc/Widgets/CncInstallLogic.cs index a7418dc42f..a07d675d1f 100755 --- a/OpenRA.Mods.Cnc/Widgets/CncInstallLogic.cs +++ b/OpenRA.Mods.Cnc/Widgets/CncInstallLogic.cs @@ -16,8 +16,8 @@ using System.Linq; using System.Net; using System.Threading; using OpenRA.FileFormats; -using OpenRA.Widgets; using OpenRA.Mods.RA.Widgets.Delegates; +using OpenRA.Widgets; namespace OpenRA.Mods.Cnc.Widgets { diff --git a/OpenRA.Mods.Cnc/Widgets/CncLobbyLogic.cs b/OpenRA.Mods.Cnc/Widgets/CncLobbyLogic.cs index d246a59ea2..448ecf607e 100755 --- a/OpenRA.Mods.Cnc/Widgets/CncLobbyLogic.cs +++ b/OpenRA.Mods.Cnc/Widgets/CncLobbyLogic.cs @@ -13,10 +13,10 @@ using System.Collections.Generic; using System.Drawing; using System.Linq; using OpenRA.FileFormats; +using OpenRA.Graphics; using OpenRA.Network; using OpenRA.Traits; using OpenRA.Widgets; -using OpenRA.Graphics; namespace OpenRA.Mods.Cnc.Widgets { diff --git a/OpenRA.Mods.Cnc/Widgets/CncMapChooserLogic.cs b/OpenRA.Mods.Cnc/Widgets/CncMapChooserLogic.cs index 726f59a005..41b163eb7b 100644 --- a/OpenRA.Mods.Cnc/Widgets/CncMapChooserLogic.cs +++ b/OpenRA.Mods.Cnc/Widgets/CncMapChooserLogic.cs @@ -8,14 +8,11 @@ */ #endregion -using System.Drawing; -using System.Linq; -using OpenRA.FileFormats; -using OpenRA.Network; -using OpenRA.Widgets; -using System.IO; using System; +using System.IO; +using System.Linq; using OpenRA.Graphics; +using OpenRA.Widgets; namespace OpenRA.Mods.Cnc.Widgets { diff --git a/OpenRA.Mods.Cnc/Widgets/CncMenuLogic.cs b/OpenRA.Mods.Cnc/Widgets/CncMenuLogic.cs index c7dde0522d..2fb5847f03 100755 --- a/OpenRA.Mods.Cnc/Widgets/CncMenuLogic.cs +++ b/OpenRA.Mods.Cnc/Widgets/CncMenuLogic.cs @@ -8,18 +8,10 @@ */ #endregion -using System.Collections.Generic; -using OpenRA.FileFormats; -using System.Net; -using OpenRA.Network; -using OpenRA.Server; -using OpenRA.Widgets; -using System; -using System.Drawing; using System.Linq; -using OpenRA.GameRules; +using System.Net; using OpenRA.Mods.RA; -using OpenRA.Support; +using OpenRA.Widgets; namespace OpenRA.Mods.Cnc.Widgets { diff --git a/OpenRA.Mods.Cnc/Widgets/CncModBrowserLogic.cs b/OpenRA.Mods.Cnc/Widgets/CncModBrowserLogic.cs index f0a646968f..10703a8a8c 100644 --- a/OpenRA.Mods.Cnc/Widgets/CncModBrowserLogic.cs +++ b/OpenRA.Mods.Cnc/Widgets/CncModBrowserLogic.cs @@ -11,13 +11,8 @@ using System; using System.Collections.Generic; using System.Linq; -using System.Net; -using System.Text; -using System.Threading; using OpenRA.FileFormats; using OpenRA.Graphics; -using OpenRA.Mods.RA.Widgets.Delegates; -using OpenRA.Server; using OpenRA.Widgets; namespace OpenRA.Mods.Cnc.Widgets diff --git a/OpenRA.Mods.Cnc/Widgets/CncMusicPlayerLogic.cs b/OpenRA.Mods.Cnc/Widgets/CncMusicPlayerLogic.cs index c60a983ae8..079a30a8b8 100644 --- a/OpenRA.Mods.Cnc/Widgets/CncMusicPlayerLogic.cs +++ b/OpenRA.Mods.Cnc/Widgets/CncMusicPlayerLogic.cs @@ -9,16 +9,13 @@ #endregion using System; -using System.Drawing; -using System.Linq; -using OpenRA.FileFormats; -using OpenRA.Support; -using OpenRA.Widgets; -using OpenRA.Traits; -using OpenRA.Graphics; -using System.Collections.Generic; using System.IO; +using System.Linq; using System.Threading; +using OpenRA.FileFormats; +using OpenRA.Graphics; +using OpenRA.Traits; +using OpenRA.Widgets; namespace OpenRA.Mods.Cnc.Widgets { diff --git a/OpenRA.Mods.Cnc/Widgets/CncReplayBrowserLogic.cs b/OpenRA.Mods.Cnc/Widgets/CncReplayBrowserLogic.cs index 09bb04e633..ab39a62aa8 100644 --- a/OpenRA.Mods.Cnc/Widgets/CncReplayBrowserLogic.cs +++ b/OpenRA.Mods.Cnc/Widgets/CncReplayBrowserLogic.cs @@ -9,25 +9,22 @@ #endregion using System; -using System.Drawing; using System.IO; using System.Linq; -using OpenRA.FileFormats; -using OpenRA.Network; -using OpenRA.Widgets; -using OpenRA.Mods.RA.Widgets.Delegates; using OpenRA.Graphics; +using OpenRA.Mods.RA.Widgets.Delegates; +using OpenRA.Widgets; namespace OpenRA.Mods.Cnc.Widgets { public class CncReplayBrowserLogic : IWidgetDelegate { - Widget panel; + Widget panel; [ObjectCreator.UseCtor] public CncReplayBrowserLogic([ObjectCreator.Param] Widget widget, - [ObjectCreator.Param] Action onExit, - [ObjectCreator.Param] Action onStart) + [ObjectCreator.Param] Action onExit, + [ObjectCreator.Param] Action onStart) { panel = widget.GetWidget("REPLAYBROWSER_PANEL"); diff --git a/OpenRA.Mods.Cnc/Widgets/CncServerCreationLogic.cs b/OpenRA.Mods.Cnc/Widgets/CncServerCreationLogic.cs index 858c36177e..c08c57763c 100644 --- a/OpenRA.Mods.Cnc/Widgets/CncServerCreationLogic.cs +++ b/OpenRA.Mods.Cnc/Widgets/CncServerCreationLogic.cs @@ -8,12 +8,11 @@ */ #endregion +using System; using System.Linq; using System.Net; -using OpenRA.Widgets; -using System; -using System.Collections.Generic; using OpenRA.GameRules; +using OpenRA.Widgets; namespace OpenRA.Mods.Cnc.Widgets { @@ -24,15 +23,16 @@ namespace OpenRA.Mods.Cnc.Widgets Action onExit; Map map; bool advertiseOnline; + [ObjectCreator.UseCtor] public CncServerCreationLogic([ObjectCreator.Param] Widget widget, - [ObjectCreator.Param] Action onExit, - [ObjectCreator.Param] Action openLobby) + [ObjectCreator.Param] Action onExit, + [ObjectCreator.Param] Action openLobby) { panel = widget.GetWidget("CREATESERVER_PANEL"); onCreate = openLobby; this.onExit = onExit; - + var settings = Game.Settings; panel.GetWidget("BACK_BUTTON").OnClick = () => { Widget.CloseWindow(); onExit(); }; panel.GetWidget("CREATE_BUTTON").OnClick = CreateAndJoin; @@ -64,22 +64,22 @@ namespace OpenRA.Mods.Cnc.Widgets var advertiseCheckbox = panel.GetWidget("ADVERTISE_CHECKBOX"); advertiseCheckbox.IsChecked = () => advertiseOnline; advertiseCheckbox.OnClick = () => advertiseOnline ^= true; - + // Disable these until we have some logic behind them panel.GetWidget("SERVER_DESC").IsDisabled = () => true; panel.GetWidget("SERVER_PASSWORD").IsDisabled = () => true; } - + void CreateAndJoin() { var name = panel.GetWidget("SERVER_NAME").Text; int listenPort, externalPort; if (!int.TryParse(panel.GetWidget("LISTEN_PORT").Text, out listenPort)) listenPort = 1234; - + if (!int.TryParse(panel.GetWidget("EXTERNAL_PORT").Text, out externalPort)) externalPort = 1234; - + // Save new settings Game.Settings.Server.Name = name; Game.Settings.Server.ListenPort = listenPort; @@ -90,7 +90,7 @@ namespace OpenRA.Mods.Cnc.Widgets // Take a copy so that subsequent changes don't affect the server var settings = new ServerSettings(Game.Settings.Server); - + // Create and join the server Game.CreateServer(settings); Widget.CloseWindow(); diff --git a/OpenRA.Mods.Cnc/Widgets/CncSettingsLogic.cs b/OpenRA.Mods.Cnc/Widgets/CncSettingsLogic.cs index 2120b4ce4f..87b7d289cc 100755 --- a/OpenRA.Mods.Cnc/Widgets/CncSettingsLogic.cs +++ b/OpenRA.Mods.Cnc/Widgets/CncSettingsLogic.cs @@ -9,12 +9,12 @@ #endregion using System; +using System.Collections.Generic; +using System.Drawing; using OpenRA.FileFormats; using OpenRA.FileFormats.Graphics; using OpenRA.GameRules; using OpenRA.Widgets; -using System.Collections.Generic; -using System.Drawing; namespace OpenRA.Mods.Cnc.Widgets { diff --git a/OpenRA.Mods.Cnc/WithFire.cs b/OpenRA.Mods.Cnc/WithFire.cs index 6a182c8bcb..c9d96e1f80 100644 --- a/OpenRA.Mods.Cnc/WithFire.cs +++ b/OpenRA.Mods.Cnc/WithFire.cs @@ -8,10 +8,8 @@ */ #endregion -using System.Collections.Generic; -using System.Linq; -using OpenRA.Traits; using OpenRA.Graphics; +using OpenRA.Traits; namespace OpenRA.Mods.Cnc { diff --git a/OpenRA.Mods.Cnc/WithRoof.cs b/OpenRA.Mods.Cnc/WithRoof.cs index 6f74b6c1ed..337f5f7697 100644 --- a/OpenRA.Mods.Cnc/WithRoof.cs +++ b/OpenRA.Mods.Cnc/WithRoof.cs @@ -8,10 +8,8 @@ */ #endregion -using System.Collections.Generic; -using System.Linq; -using OpenRA.Traits; using OpenRA.Graphics; +using OpenRA.Traits; namespace OpenRA.Mods.Cnc {