mirror of
https://github.com/kwsch/NHSE.git
synced 2026-03-22 09:44:49 -05:00
30 lines
879 B
C#
30 lines
879 B
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Windows.Forms;
|
|
using NHSE.Core;
|
|
|
|
namespace NHSE.WinForms;
|
|
|
|
public partial class BuildingHelp : Form
|
|
{
|
|
private static readonly IReadOnlyDictionary<string, string[]> HelpDictionary = StructureUtil.GetStructureHelpList();
|
|
|
|
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();
|
|
CB_StructureValues.Items.AddRange(values);
|
|
CB_StructureValues.SelectedIndex = 0;
|
|
}
|
|
} |