Beispiel #1
0
 private void newGroupbtn_Click(object sender, EventArgs e)
 {
     using (NewGroupWindow ngw = new NewGroupWindow())
     {
         ngw.ShowDialog(this.TopLevelControl);
     }
     refreshtables();
 }
Beispiel #2
0
        public VMnewGroup(NewGroupWindow parent, List <string> existingNames)
        {
            this.name          = string.Empty;
            this.parent        = parent;
            this.existingNames = existingNames;

            this.CommandOk          = new DelegateCommand(this.Ok, this.CanOk);
            this.CommandTextChanged = new DelegateCommand <object>(this.TextChanged);
        }
Beispiel #3
0
        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));
            }
        }