Ejemplo n.º 1
0
        private void mnuCloseProcess_Click(object sender, EventArgs e)
        {
            CloseProcessInstruction instruction = new CloseProcessInstruction();

            instruction.Application = m_ApplicationJob;
            if (InstructionBaseDialog.ShowDialog(this, instruction, txtExecuteAfter.VariableNames, m_ApplicationJob))
            {
                SetupInstructionListBoxPanel panel = new SetupInstructionListBoxPanel(instruction);
                panel.VariableNames = txtExecuteAfter.VariableNames;
                instructionsListBox.Panels.Add(panel);
            }
        }
        private void bOK_Click(object sender, EventArgs e)
        {
            // At least, a process name needs to be given
            if (string.IsNullOrEmpty(cboProcessName.Text))
            {
                MessageBox.Show(this, "You did not specify a process to close.\r\n\r\nSpecify a process name in order to add the setup instruction.", System.Windows.Forms.Application.ProductName, MessageBoxButtons.OK, MessageBoxIcon.None);
                DialogResult = DialogResult.None;
                return;
            }

            if (instruction == null)
            {
                this.instruction = new CloseProcessInstruction();
            }

            this.instruction.ProcessName = cboProcessName.Text;
        }
Ejemplo n.º 3
0
 private void mnuCloseProcess_Click(object sender, EventArgs e)
 {
     CloseProcessInstruction instruction = new CloseProcessInstruction();
     instruction.Application = m_ApplicationJob;
     if (InstructionBaseDialog.ShowDialog(this, instruction, txtExecuteAfter.VariableNames, m_ApplicationJob))
     {
         SetupInstructionListBoxPanel panel = new SetupInstructionListBoxPanel(instruction);
         panel.VariableNames = txtExecuteAfter.VariableNames;
         instructionsListBox.Panels.Add(panel);
     }
 }