예제 #1
0
        private void ButtonCancel_ClickExtracted()
        {
            ListTabs.Enabled    = true;
            GroupTab.Enabled    = true;
            ListFilters.Enabled = true;
            ListFilters.Focus();
            if (ListFilters.SelectedIndex != -1)
            {
                ShowDetail();
            }

            EditFilterGroup.Enabled = false;
            ButtonNew.Enabled       = true;

            bool selected = ListFilters.SelectedIndex > -1;

            ButtonEdit.Enabled     = selected;
            ButtonDelete.Enabled   = selected;
            ButtonRuleUp.Enabled   = selected;
            ButtonRuleDown.Enabled = selected;
            ButtonRuleCopy.Enabled = selected;
            ButtonRuleMove.Enabled = selected;

            closeButton.Enabled = true;
            if (_isDirectAdd)
            {
                Close();
            }
        }
예제 #2
0
 private void ButtonCancel_Click(object sender, EventArgs e)
 {
     ListTabs.Enabled    = true;
     GroupTab.Enabled    = true;
     ListFilters.Enabled = true;
     ListFilters.Focus();
     if (ListFilters.SelectedIndex != -1)
     {
         ShowDetail();
     }
     EditFilterGroup.Enabled = false;
     ButtonNew.Enabled       = true;
     if (ListFilters.SelectedIndex > -1)
     {
         ButtonEdit.Enabled     = true;
         ButtonDelete.Enabled   = true;
         ButtonRuleUp.Enabled   = true;
         ButtonRuleDown.Enabled = true;
         ButtonRuleCopy.Enabled = true;
         ButtonRuleMove.Enabled = true;
     }
     else
     {
         ButtonEdit.Enabled     = false;
         ButtonDelete.Enabled   = false;
         ButtonRuleUp.Enabled   = false;
         ButtonRuleDown.Enabled = false;
         ButtonRuleCopy.Enabled = false;
         ButtonRuleMove.Enabled = false;
     }
     ButtonClose.Enabled = true;
     if (_directAdd)
     {
         this.Close();
     }
 }