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(); } }
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; }
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(); }
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"; } }