private void newGroupbtn_Click(object sender, EventArgs e) { using (NewGroupWindow ngw = new NewGroupWindow()) { ngw.ShowDialog(this.TopLevelControl); } refreshtables(); }
private void AddGroup() { var window = new NewGroupWindow(); var vmWindow = new VMnewGroup(window, new List <string>( from contract in this.Root.Contracts select contract.Name)); window.DataContext = vmWindow; if (window.ShowDialog() == true) { this.Root.Contracts.Add(new ContractModel(vmWindow.Name)); } }