public ClothesViewModel(CharacterViewModel parent, ClothesKind kind) { CharacterViewModel = parent; Kind = kind; UpdateKeys(); SkirtTexture = new ClothesTextureViewModel(this, false); UnderwearTexture = new ClothesTextureViewModel(this, true); }
private void btnSave_Click(object sender, EventArgs e) { //description can't be null if (string.IsNullOrEmpty(txtDescription.Text.Trim())) { MessageBox.Show("Input description..."); txtDescription.Focus(); return; } //Save clothes Kind var clothes = new ClothesKind() { Description = txtDescription.Text }; db.ClothesKinds.Add(clothes); db.SaveChanges(); this.LoadData(); MessageBox.Show("Saved..."); }