public DialogNewGame() { AirCoon.Game.Handler.SaveGame sg = new AirCoon.Game.Handler.SaveGame(); List <Dictionary <string, string> > aps = sg.GetAvailibleHubNames(); this.InitializeComponent(); foreach (Dictionary <string, string> ap in aps) { ComboBoxItem b = new ComboBoxItem(); b.Tag = ap["Iata"]; b.Content = ap["Iata"] + " - " + ap["Name"]; if (ap["Iata"] == "ATL") { b.IsSelected = true; } Hub.Items.Add(b); } // End Foreach } // End Constructor
} // End Constructor public DialogNewGame(String name, String code, String Iata, String message) { AirCoon.Game.Handler.SaveGame sg = new AirCoon.Game.Handler.SaveGame(); List <Dictionary <string, string> > aps = sg.GetAvailibleHubNames(); this.InitializeComponent(); Name.Text = name; Code.Text = code; Error.Text = message; foreach (Dictionary <string, string> ap in aps) { ComboBoxItem b = new ComboBoxItem(); b.Tag = ap["Iata"]; b.Content = ap["Iata"] + " - " + ap["Name"]; if (ap["Iata"] == Iata) { b.IsSelected = true; } Hub.Items.Add(b); } // End Foreach } // End Constructor