Fix warning CS8524 instances (#36837)
This commit is contained in:
@@ -90,10 +90,12 @@ public sealed partial class NanoTaskItemPopup : DefaultWindow
|
|||||||
{
|
{
|
||||||
if (item is NanoTaskItem task)
|
if (item is NanoTaskItem task)
|
||||||
{
|
{
|
||||||
var button = task.Priority switch {
|
var button = task.Priority switch
|
||||||
|
{
|
||||||
NanoTaskPriority.High => HighButton,
|
NanoTaskPriority.High => HighButton,
|
||||||
NanoTaskPriority.Medium => MediumButton,
|
NanoTaskPriority.Medium => MediumButton,
|
||||||
NanoTaskPriority.Low => LowButton,
|
NanoTaskPriority.Low => LowButton,
|
||||||
|
_ => throw new ArgumentException("Invalid priority"),
|
||||||
};
|
};
|
||||||
button.Pressed = true;
|
button.Pressed = true;
|
||||||
DescriptionInput.Text = task.Description;
|
DescriptionInput.Text = task.Description;
|
||||||
|
|||||||
@@ -38,10 +38,12 @@ public sealed partial class NanoTaskUiFragment : BoxContainer
|
|||||||
|
|
||||||
foreach (var task in tasks)
|
foreach (var task in tasks)
|
||||||
{
|
{
|
||||||
var container = task.Data.Priority switch {
|
var container = task.Data.Priority switch
|
||||||
|
{
|
||||||
NanoTaskPriority.High => HighContainer,
|
NanoTaskPriority.High => HighContainer,
|
||||||
NanoTaskPriority.Medium => MediumContainer,
|
NanoTaskPriority.Medium => MediumContainer,
|
||||||
NanoTaskPriority.Low => LowContainer,
|
NanoTaskPriority.Low => LowContainer,
|
||||||
|
_ => throw new ArgumentException("Invalid priority"),
|
||||||
};
|
};
|
||||||
var control = new NanoTaskItemControl(task);
|
var control = new NanoTaskItemControl(task);
|
||||||
container.AddChild(control);
|
container.AddChild(control);
|
||||||
|
|||||||
@@ -80,7 +80,8 @@ public sealed partial class NodeScannerDisplay : FancyWindow
|
|||||||
ArtifactState.None => "\u2800", // placeholder for line to not be squeezed
|
ArtifactState.None => "\u2800", // placeholder for line to not be squeezed
|
||||||
ArtifactState.Ready => Loc.GetString("node-scanner-artifact-state-ready"),
|
ArtifactState.Ready => Loc.GetString("node-scanner-artifact-state-ready"),
|
||||||
ArtifactState.Unlocking => Loc.GetString("node-scanner-artifact-state-unlocking"),
|
ArtifactState.Unlocking => Loc.GetString("node-scanner-artifact-state-unlocking"),
|
||||||
ArtifactState.Cooldown => Loc.GetString("node-scanner-artifact-state-cooldown")
|
ArtifactState.Cooldown => Loc.GetString("node-scanner-artifact-state-cooldown"),
|
||||||
|
_ => throw new ArgumentException("Invalid state"),
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user