Пример #1
0
        private void UpdateGoodUnequip(EquippableVG good)
        {
            Button equipB = (Button)MainStackPanel.FindName(good.getItemId() + "equip");

            equipB.Content = "equip";
            equipB.Click  += equipItem;
            equipB.Click  -= unequipItem;
        }
Пример #2
0
 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;
 }
Пример #3
0
 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);
     }
 }
Пример #4
0
 private void Window_MouseDown(object sender, MouseButtonEventArgs e)
 {
     MainStackPanel.Focus();
 }
Пример #5
0
        private void UpdateGoodBalance(VirtualGood good, int balance, int amountAdded)
        {
            TextBlock balanceText = (TextBlock)MainStackPanel.FindName(good.getItemId() + "balance");

            balanceText.Text = "balance: " + balance.ToString();
        }