예제 #1
0
 private void OnAddTestClick(object sender, System.EventArgs e)
 {
     DlgAddCardTest dlg = new DlgAddCardTest();
       if (dlg.ShowDialog() == DialogResult.OK)
       {
     switch (dlg.Choice)
     {
       case "OpenCard":
     CardTestConfig card = new CardTestConfig();
     _model.Tests.Add(card);
     _parentDlg.FillTree();
     break;
       case "SaveCard":
     CardSaveTestConfig save = new CardSaveTestConfig();
     _model.Tests.Add(save);
     _parentDlg.FillTree();
     break;
       case "CloseCard":
     CardCloseTestConfig close = new CardCloseTestConfig();
     _model.Tests.Add(close);
     _parentDlg.FillTree();
     break;
     }
       }
 }
예제 #2
0
 public PnlCloseCardTest(CardCloseTestConfig model)
     : this()
 {
     tbxCallsToCard.DataBindings.Add("Text", model, "CallsToCard");
       _model = model;
       chbCloseCard.Checked = model.CallsToCard != 0;
       tbxCallsToCard.Text = model.CallsToCard.ToString();
       tbxCallsToCard.Enabled = chbCloseCard.Checked;
 }