Exemplo n.º 1
0
        private void RunNow(string actions)
        {
            this.Cursor = Cursors.WaitCursor;
            string output = DosCommands.Execute(actions);

            MessageBox.Show(output, "Custom Action", MessageBoxButtons.OK, MessageBoxIcon.Information);
            this.Cursor = Cursors.Default;
        }
Exemplo n.º 2
0
        private void OnCustomAction(object sender, EventArgs e)
        {
            ToolStripMenuItem mnuItem = sender as ToolStripMenuItem;

            if (mnuItem != null)
            {
                string output = DosCommands.Execute(mnuItem.Tag.ToString());
                SetToolStripStatusLabel("Executed " + mnuItem.Text, true);
            }
        }