Exemplo n.º 1
0
 private void btnActionsAdd_Click(object sender, EventArgs e)
 {
     using (FileActionForm form = new FileActionForm())
     {
         if (form.ShowDialog() == DialogResult.OK)
         {
             ExternalProgram fileAction = form.FileAction;
             fileAction.IsActive = true;
             Workflow.Settings.ExternalPrograms.Add(fileAction);
             AddFileAction(fileAction);
         }
     }
 }
Exemplo n.º 2
0
        private void btnActionsEdit_Click(object sender, EventArgs e)
        {
            if (lvActions.SelectedItems.Count > 0)
            {
                ListViewItem lvi = lvActions.SelectedItems[0];
                ExternalProgram fileAction = lvi.Tag as ExternalProgram;

                using (FileActionForm form = new FileActionForm(fileAction))
                {
                    if (form.ShowDialog() == DialogResult.OK)
                    {
                        lvi.Text = fileAction.Name ?? "";
                        lvi.SubItems[1].Text = fileAction.Path ?? "";
                        lvi.SubItems[2].Text = fileAction.Args ?? "";
                    }
                }
            }
        }