Ejemplo n.º 1
0
 private void m_pActions_DoubleClick(object sender, EventArgs e)
 {
     if(m_pTab_Actions_Actions.SelectedItems.Count > 0){
         GlobalMessageRuleActionBase action = (GlobalMessageRuleActionBase)m_pTab_Actions_Actions.SelectedItems[0].Tag;
         wfrm_GlobalMessageRule_Action frm = new wfrm_GlobalMessageRule_Action(m_pRule,action);
         if(frm.ShowDialog(this) == DialogResult.OK){
             LoadActions();
         }
     }
 }
Ejemplo n.º 2
0
        private void m_pTab_Actions_ActionsToolbar_ItemClicked(object sender,ToolStripItemClickedEventArgs e)
        {
            if(e.ClickedItem.Tag == null){
                return;
            }

            if(e.ClickedItem.Tag.ToString() == "add"){                
                wfrm_GlobalMessageRule_Action frm = new wfrm_GlobalMessageRule_Action(m_pRule);
                if(frm.ShowDialog(this) == DialogResult.OK){
                    LoadActions();
                }
            }
            else if(e.ClickedItem.Tag.ToString() == "edit"){
                if(m_pTab_Actions_Actions.SelectedItems.Count > 0){
                    GlobalMessageRuleActionBase action = (GlobalMessageRuleActionBase)m_pTab_Actions_Actions.SelectedItems[0].Tag;
                    wfrm_GlobalMessageRule_Action frm = new wfrm_GlobalMessageRule_Action(m_pRule,action);
                    if(frm.ShowDialog(this) == DialogResult.OK){
                        LoadActions();
                    }
                }
            }
            else if(e.ClickedItem.Tag.ToString() == "delete"){
                if(m_pTab_Actions_Actions.SelectedItems.Count > 0){
                    GlobalMessageRuleActionBase action = (GlobalMessageRuleActionBase)m_pTab_Actions_Actions.SelectedItems[0].Tag;
                    if(MessageBox.Show(this,"Are you sure you want to delete Action '" + action.Description + "' !","Confirm Delete",MessageBoxButtons.YesNo,MessageBoxIcon.Question,MessageBoxDefaultButton.Button2) == DialogResult.Yes){
                        action.Owner.Remove(action);
                        LoadActions();
                    }
                }
            }
        }