Update to .NET 10 (#683)

This commit is contained in:
Kurt
2026-01-13 16:02:58 -06:00
committed by GitHub
parent 63bd5f643c
commit fa3f0e3cc8
316 changed files with 31897 additions and 32159 deletions

View File

@@ -3,30 +3,28 @@
using System.Windows.Forms;
using NHSE.Core;
namespace NHSE.WinForms
namespace NHSE.WinForms;
public partial class BuildingHelp : Form
{
public partial class BuildingHelp : Form
private static readonly IReadOnlyDictionary<string, string[]> HelpDictionary = StructureUtil.GetStructureHelpList();
public BuildingHelp()
{
private static readonly IReadOnlyDictionary<string, string[]> HelpDictionary = StructureUtil.GetStructureHelpList();
InitializeComponent();
this.TranslateInterface(GameInfo.CurrentLanguage);
public BuildingHelp()
{
InitializeComponent();
this.TranslateInterface(GameInfo.CurrentLanguage);
foreach (var entry in HelpDictionary)
CB_StructureType.Items.Add(entry.Key);
CB_StructureType.SelectedIndex = 0;
}
private void CB_StructureType_SelectedIndexChanged(object sender, EventArgs e)
{
var name = CB_StructureType.Text;
var values = HelpDictionary[name];
CB_StructureValues.Items.Clear();
foreach (var item in values)
CB_StructureValues.Items.Add(item);
CB_StructureValues.SelectedIndex = 0;
}
foreach (var entry in HelpDictionary)
CB_StructureType.Items.Add(entry.Key);
CB_StructureType.SelectedIndex = 0;
}
}
private void CB_StructureType_SelectedIndexChanged(object sender, EventArgs e)
{
var name = CB_StructureType.Text;
var values = HelpDictionary[name];
CB_StructureValues.Items.Clear();
CB_StructureValues.Items.AddRange(values);
CB_StructureValues.SelectedIndex = 0;
}
}