Fix CA1852

This commit is contained in:
RoosterDragon
2023-03-13 18:49:21 +00:00
committed by Pavel Penev
parent 277699cbd5
commit f4af5c1764
310 changed files with 510 additions and 507 deletions

View File

@@ -461,7 +461,7 @@ namespace OpenRA.Mods.Common.Widgets.Logic
bool ShouldDoOnSave { get; }
}
class EditActorEditorAction : IEditorAction
sealed class EditActorEditorAction : IEditorAction
{
[TranslationReference("name", "id")]
const string EditedActor = "notification-edited-actor";
@@ -502,7 +502,7 @@ namespace OpenRA.Mods.Common.Widgets.Logic
}
}
class EditActorPreview
sealed class EditActorPreview
{
readonly EditorActorPreview actor;
readonly SetActorIdAction setActorIdAction;

View File

@@ -24,7 +24,7 @@ namespace OpenRA.Mods.Common.Widgets.Logic
[TranslationReference("actorType")]
const string ActorTypeTooltip = "label-actor-type";
class ActorSelectorActor
sealed class ActorSelectorActor
{
public readonly ActorInfo Actor;
public readonly string[] Categories;

View File

@@ -29,7 +29,7 @@ namespace OpenRA.Mods.Common.Widgets.Logic
public string UiLabel;
}
class SaveDirectory
sealed class SaveDirectory
{
public readonly Folder Folder;
public readonly string DisplayName;

View File

@@ -21,7 +21,7 @@ namespace OpenRA.Mods.Common.Widgets.Logic
{
public class TileSelectorLogic : CommonSelectorLogic
{
class TileSelectorTemplate
sealed class TileSelectorTemplate
{
public readonly TerrainTemplateInfo Template;
public readonly string[] Categories;

View File

@@ -14,7 +14,7 @@ using OpenRA.Widgets;
namespace OpenRA.Mods.Common.Widgets.Logic
{
class GameInfoBriefingLogic : ChromeLogic
sealed class GameInfoBriefingLogic : ChromeLogic
{
[ObjectCreator.UseCtor]
public GameInfoBriefingLogic(Widget widget, ModData modData, World world)

View File

@@ -20,7 +20,7 @@ namespace OpenRA.Mods.Common.Widgets.Logic
{
public enum IngameInfoPanel { AutoSelect, Map, Objectives, Debug, Chat, LobbbyOptions }
class GameInfoLogic : ChromeLogic
sealed class GameInfoLogic : ChromeLogic
{
[TranslationReference]
const string Objectives = "menu-game-info.objectives";

View File

@@ -16,7 +16,7 @@ using OpenRA.Widgets;
namespace OpenRA.Mods.Common.Widgets.Logic
{
class GameInfoObjectivesLogic : ChromeLogic
sealed class GameInfoObjectivesLogic : ChromeLogic
{
[TranslationReference]
const string InProgress = "label-mission-in-progress";

View File

@@ -20,7 +20,7 @@ using OpenRA.Widgets;
namespace OpenRA.Mods.Common.Widgets.Logic
{
class GameInfoStatsLogic : ChromeLogic
sealed class GameInfoStatsLogic : ChromeLogic
{
[TranslationReference]
const string Unmute = "label-unmute-player";

View File

@@ -53,7 +53,7 @@ namespace OpenRA.Mods.Common.Widgets.Logic
CameraOption selected;
readonly LabelWidget shroudLabel;
class CameraOption
sealed class CameraOption
{
public readonly Player Player;
public readonly string Label;

View File

@@ -595,7 +595,7 @@ namespace OpenRA.Mods.Common.Widgets.Logic
// HACK The height of the templates and the scrollpanel needs to be kept in synch
bool ShowScrollBar => players.Count() + (hasTeams ? teams.Count() : 0) > 10;
class StatsDropDownOption
sealed class StatsDropDownOption
{
public string Title;
public Func<bool> IsSelected;

View File

@@ -14,7 +14,7 @@ using OpenRA.Widgets;
namespace OpenRA.Mods.Common.Widgets.Logic
{
class ScriptErrorLogic : ChromeLogic
sealed class ScriptErrorLogic : ChromeLogic
{
[ObjectCreator.UseCtor]
public ScriptErrorLogic(Widget widget, World world)

View File

@@ -14,7 +14,7 @@ using OpenRA.Widgets;
namespace OpenRA.Mods.Common.Widgets.Logic
{
class KickClientLogic : ChromeLogic
sealed class KickClientLogic : ChromeLogic
{
[TranslationReference("player")]
const string KickClient = "dialog-kick-client.prompt";

View File

@@ -14,7 +14,7 @@ using OpenRA.Widgets;
namespace OpenRA.Mods.Common.Widgets.Logic
{
class KickSpectatorsLogic : ChromeLogic
sealed class KickSpectatorsLogic : ChromeLogic
{
[TranslationReference("count")]
const string KickSpectators = "dialog-kick-spectators.prompt";

View File

@@ -895,7 +895,7 @@ namespace OpenRA.Mods.Common.Widgets.Logic
public string Side;
}
class DropDownOption
sealed class DropDownOption
{
public string Title;
public Func<bool> IsSelected = () => false;

View File

@@ -38,7 +38,7 @@ namespace OpenRA.Mods.Common.Widgets.Logic
[TranslationReference]
const string Slot = "options-lobby-slot.slot";
class SlotDropDownOption
sealed class SlotDropDownOption
{
public readonly string Title;
public readonly string Order;
@@ -677,7 +677,7 @@ namespace OpenRA.Mods.Common.Widgets.Logic
}
}
class ShowPlayerActionDropDownOption
sealed class ShowPlayerActionDropDownOption
{
public Action Click { get; set; }
public string Title;

View File

@@ -378,7 +378,7 @@ namespace OpenRA.Mods.Common.Widgets.Logic
newsStatus.GetText = () => message;
}
class NewsItem
sealed class NewsItem
{
public string Title;
public string Author;

View File

@@ -446,7 +446,7 @@ namespace OpenRA.Mods.Common.Widgets.Logic
Game.CreateAndStartLocalServer(selectedMap.Uid, orders);
}
class DropDownOption
sealed class DropDownOption
{
public string Title;
public Func<bool> IsSelected;

View File

@@ -819,13 +819,13 @@ namespace OpenRA.Mods.Common.Widgets.Logic
base.Dispose(disposing);
}
class ReplayState
sealed class ReplayState
{
public bool Visible;
public ScrollItemWidget Item;
}
class Filter
sealed class Filter
{
public GameType Type;
public DateType Date;

View File

@@ -201,7 +201,7 @@ namespace OpenRA.Mods.Common.Widgets
TooltipUnit = null;
}
class ArmyIcon
sealed class ArmyIcon
{
public Rectangle Bounds { get; set; }
public ArmyUnit Unit { get; set; }