private void testToolStripMenuItem_Click(object sender, EventArgs e)
        {
            if (SelectedSection == null)
            {
                return;
            }
            ToolStripMenuItem menu = sender as ToolStripMenuItem;
            IActionType       type = menu.Tag as IActionType;

            if (type != null)
            {
                ActionItem item = new ActionItem(type.DisplayName);
                item.Params =
                    new SectionParamCollection(MpeInstaller.ActionProviders[type.DisplayName].GetDefaultParams());
                ActionEdit dlg = new ActionEdit(Package, item);
                if (dlg.ShowDialog() == DialogResult.OK)
                {
                    if (SelectedSection != null)
                    {
                        SelectedSection.Actions.Items.Add(item);
                        list_actions.Items.Add(item);
                    }
                }
            }
        }
        private void mnu_action_edit_Click(object sender, EventArgs e)
        {
            if (list_actions.SelectedItems.Count < 1)
            {
                return;
            }
            ActionEdit dlg = new ActionEdit(Package, (ActionItem)list_actions.SelectedItem);

            dlg.ShowDialog();
        }
Exemplo n.º 3
0
 private void testToolStripMenuItem_Click(object sender, EventArgs e)
 {
   if (SelectedSection == null)
     return;
   ToolStripMenuItem menu = sender as ToolStripMenuItem;
   IActionType type = menu.Tag as IActionType;
   if (type != null)
   {
     ActionItem item = new ActionItem(type.DisplayName);
     item.Params =
       new SectionParamCollection(MpeInstaller.ActionProviders[type.DisplayName].GetDefaultParams());
     ActionEdit dlg = new ActionEdit(Package, item);
     if (dlg.ShowDialog() == DialogResult.OK)
     {
       if (SelectedSection != null)
       {
         SelectedSection.Actions.Items.Add(item);
         list_actions.Items.Add(item);
       }
     }
   }
 }
Exemplo n.º 4
0
 private void mnu_action_edit_Click(object sender, EventArgs e)
 {
   if (list_actions.SelectedItems.Count < 1)
     return;
   ActionEdit dlg = new ActionEdit(Package, (ActionItem)list_actions.SelectedItem);
   dlg.ShowDialog();
 }