private void ArmletGridUI_OnLoaded(object sender, RoutedEventArgs e) { if (Model == null) { return; } foreach (var armletInfo in Model.GetArmlets()) { Source11.Add(new ArmletWatcher(armletInfo)); } ArmletGrid.ItemsSource = Source11; foreach (var ship in Model.GetShips()) { var shipUi = new ShipControl { Ship = ship, parent = this}; ShipStackPanel.Children.Add(shipUi); } for (int i = 3; i <= 100; i++) { RoomHit_Percentage.Items.Add(new ComboBoxItem() {Content = i.ToString()}); } Model.SimulatorDisconnected += () => Dispatcher.BeginInvoke(new Action(ModelOnSimulatorDisconnected)); ShaybaKill.Click += (o, args) => ((ShipControl)ShipStackPanel.Children[0]).ClickRoomHit(77); }
private void ArmletGridUI_OnLoaded(object sender, RoutedEventArgs e) { if (Model == null) { return; } foreach (var armletInfo in Model.GetArmlets()) { Source11.Add(new ArmletWatcher(armletInfo)); } ArmletGrid.ItemsSource = Source11; foreach (var ship in Model.GetShips()) { var shipUi = new ShipControl { Ship = ship, parent = this }; ShipStackPanel.Children.Add(shipUi); } for (int i = 3; i <= 100; i++) { RoomHit_Percentage.Items.Add(new ComboBoxItem() { Content = i.ToString() }); } Model.SimulatorDisconnected += () => Dispatcher.BeginInvoke(new Action(ModelOnSimulatorDisconnected)); ShaybaKill.Click += (o, args) => ((ShipControl)ShipStackPanel.Children[0]).ClickRoomHit(77); }