Beispiel #1
0
        private void mnuCopyFile_Click(object sender, EventArgs e)
        {
            CopyFileInstruction instruction = new CopyFileInstruction();

            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)
        {
            // Both information must be given
            if (string.IsNullOrEmpty(txtSource.Text))
            {
                MessageBox.Show(this, "You did not specify a source file to copy.\r\n\r\nSpecify a source file in order to add the setup instruction.", System.Windows.Forms.Application.ProductName, MessageBoxButtons.OK, MessageBoxIcon.None);
                DialogResult = DialogResult.None;
                return;
            }

            if (string.IsNullOrEmpty(txtTarget.Text))
            {
                MessageBox.Show(this, "You did not specify a target location for the file to copy.\r\n\r\nSpecify a target location 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 CopyFileInstruction();
            }

            this.instruction.Source = txtSource.Text;
            this.instruction.Target = txtTarget.Text;
        }
 private void mnuCopyFile_Click(object sender, EventArgs e)
 {
     CopyFileInstruction instruction = new CopyFileInstruction();
     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);
     }
 }