Пример #1
0
 private void profileButton_Click(object sender, RoutedEventArgs e)
 {
     if (SelectedGrid.SelectedItem as Unit != null)
     {
         CharWindow profile = new CharWindow(this, SelectedGrid.SelectedItem as Unit);
         profile.Show();
     }
 }
Пример #2
0
 public AddOrChangeItem(CharWindow chw, Item item, Unit unit)
 {
     InitializeComponent();
     charwindow        = chw;
     this.item         = item;
     this.unit         = unit;
     itemName.Text     = this.item.Name;
     avgitemCost.Value = item.Cost;
     weight.Value      = item.Weight;
     amount.Value      = item.Stack;
 }
Пример #3
0
 public AddOrChangeItem(CharWindow chw, Move move, Unit unit)
 {
     InitializeComponent();
     charwindow    = chw;
     this.unit     = unit;
     Mode          = "edit_move";
     this.move     = move;
     itemName.Text = move.Name;
     descr.Document.Blocks.Clear();
     descr.AppendText(move.Descr);
     hideItemStuff();
 }
Пример #4
0
 public AddOrChangeItem(CharWindow chw, Unit unit, string mode)
 {
     InitializeComponent();
     charwindow = chw;
     Mode       = mode;
     this.unit  = unit;
     if (Mode == "new_move")
     {
         hideItemStuff();
     }
     else
     {
         Mode = "new_item";
     }
 }