コード例 #1
0
 private void newGroupbtn_Click(object sender, EventArgs e)
 {
     using (NewGroupWindow ngw = new NewGroupWindow())
     {
         ngw.ShowDialog(this.TopLevelControl);
     }
     refreshtables();
 }
コード例 #2
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));
            }
        }