private void UpdateGoodUnequip(EquippableVG good) { Button equipB = (Button)MainStackPanel.FindName(good.getItemId() + "equip"); equipB.Content = "equip"; equipB.Click += equipItem; equipB.Click -= unequipItem; }
private void AddActionTabs(int partyid) { actiontabs = new ActionTabs(partyid, Employee); MainStackPanel.Children.Add(actiontabs); MainStackPanel.AddHandler(PawnActionSelector.CheckOutEvent, new RoutedEventHandler(Done)); MainStackPanel.AddHandler(PawnEditor.PawnSavedEvent, new RoutedEventHandler(Done)); MainStackPanel.AddHandler(PurchaseEditor.PurchaseSaveAndCloseEvent, new RoutedEventHandler(Done)); hasactiontabs = true; }
public void LoadExpanders(List <ExpanderData> List) { sortedList = List; MainStackPanel.Children.Clear(); foreach (ExpanderData data in List) { data.CreateExpander(); foreach (ToolBoxItem item in data.Items) { item.ToggleButton.Style = MainStackPanel.FindResource("MyToggleButtonStyle") as System.Windows.Style; } MainStackPanel.Children.Add(data.Expander); } }
private void Window_MouseDown(object sender, MouseButtonEventArgs e) { MainStackPanel.Focus(); }
private void UpdateGoodBalance(VirtualGood good, int balance, int amountAdded) { TextBlock balanceText = (TextBlock)MainStackPanel.FindName(good.getItemId() + "balance"); balanceText.Text = "balance: " + balance.ToString(); }