示例#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";
     }
 }