コード例 #1
0
        protected virtual void OnCommandGenerated(CommandGeneratedEventArgs e)
        {
            EventHandler <CommandGeneratedEventArgs> handler = CommandGenerated;

            if (handler != null)
            {
                handler(this, e);
            }
        }
コード例 #2
0
        private void buttonCommandEdit_Click(object sender, EventArgs e)
        {
            string newCommand = CommandFetch(null, true);

            if (newCommand != null)
            {
                CommandGeneratedEventArgs args = new CommandGeneratedEventArgs();
                args.test    = false;
                args.command = newCommand;
                OnCommandGenerated(args);
            }
        }
コード例 #3
0
        private void macroToolStripMenuItem_Click(object sender, EventArgs e)
        {
            MacroEditor macroEditor = new MacroEditor("", IRServer, _BlastFunc, _LearnIrFunc, _ProcessCommand);

            macroEditor.ShowDialog(this);
            RefreshMacroList(macroEditor.MacroName);
            if (macroEditor.DialogResult == DialogResult.OK)
            {
                CommandGeneratedEventArgs args = new CommandGeneratedEventArgs();
                args.test    = false;
                args.command = Common.CmdPrefixMacro + macroEditor.MacroName;
                OnCommandGenerated(args);
            }
        }
コード例 #4
0
 private void commandList_CommandGenerated(object sender, CommandGeneratedEventArgs e)
 {
     if (e.test)
     {
         // Test the command
         // TODO
     }
     else
     {
         // Insert command in the list
         EditedMacro = true;
         if (listBoxMacro.SelectedIndex > -1)
         {
             InsertCommand(e.command, listBoxMacro.SelectedIndex + 1);
             listBoxMacro.SelectedIndex = listBoxMacro.SelectedIndex + 1;
         }
         else
         {
             InsertCommand(e.command);
             listBoxMacro.SelectedIndex = listBoxMacro.Items.Count - 1;
         }
     }
 }
コード例 #5
0
        private void buttonCommandEdit_Click(object sender, EventArgs e)
        {
            string newCommand = CommandFetch(null, true);

            if (newCommand != null)
            {
                CommandGeneratedEventArgs args = new CommandGeneratedEventArgs();
                args.test = false;
                args.command = newCommand;
                OnCommandGenerated(args);
            }
        }
コード例 #6
0
 private void macroToolStripMenuItem_Click(object sender, EventArgs e)
 {
     MacroEditor macroEditor = new MacroEditor("", IRServer, _BlastFunc, _LearnIrFunc, _ProcessCommand);
     macroEditor.ShowDialog(this);
     RefreshMacroList(macroEditor.MacroName);
     if (macroEditor.DialogResult == DialogResult.OK)
     {
         CommandGeneratedEventArgs args = new CommandGeneratedEventArgs();
         args.test = false;
         args.command = Common.CmdPrefixMacro + macroEditor.MacroName;
         OnCommandGenerated(args);
     }
 }
コード例 #7
0
 protected virtual void OnCommandGenerated(CommandGeneratedEventArgs e)
 {
     EventHandler<CommandGeneratedEventArgs> handler = CommandGenerated;
     if (handler != null)
     {
         handler(this, e);
     }
 }
コード例 #8
0
ファイル: MainForm.cs プロジェクト: Azzuro/IR-Server-Suite
        private void commandManager_CommandGenerated(object sender, CommandGeneratedEventArgs e)
        {

            if (e.test)
            {
                // Test the command
                // TODO
            }
            else
            {
                // Insert command in the list
                InsertCommand(e.command);
            }
        }
コード例 #9
0
ファイル: MacroEditor.cs プロジェクト: Azzuro/IR-Server-Suite
        private void commandList_CommandGenerated(object sender, CommandGeneratedEventArgs e)
        {

            if (e.test)
            {
                // Test the command
                // TODO
            }
            else
            {
                // Insert command in the list
                EditedMacro = true;
                if (listBoxMacro.SelectedIndex > -1)
                {
                    InsertCommand(e.command, listBoxMacro.SelectedIndex + 1);
                    listBoxMacro.SelectedIndex = listBoxMacro.SelectedIndex + 1;
                }
                else
                {
                    InsertCommand(e.command);
                    listBoxMacro.SelectedIndex = listBoxMacro.Items.Count - 1;
                }
            }
        }