Exemple #1
0
        public void RefreshMacroList(string name = "")
        {
            if (_showMacroCmds)
            {
                // Create empty group
                if (_macroCommands == null)
                {
                    _macroCommands = new TreeNode("Macro");
                    treeViewCommandList.Nodes.Add(_macroCommands);
                    _editableGroups.Add(_macroCommands);
                }
                else
                {
                    _macroCommands.Nodes.Clear();
                }

                string[] macroList = IrssMacro.GetMacroList(FolderMacros, true);
                if (macroList != null && macroList.Length > 0)
                {
                    string cmdName = Common.CmdPrefixMacro + name;
                    foreach (string macro in macroList)
                    {
                        if (macro != Common.CmdPrefixMacro)
                        {
                            TreeNode node = _macroCommands.Nodes.Add(macro);
                            if (cmdName == macro)
                            {
                                treeViewCommandList.SelectedNode = node;
                            }
                        }
                    }
                }
            }
            treeViewCommandList_AfterSelect(null, null);
        }
Exemple #2
0
        private void SetupMacroList()
        {
            comboBoxMacro.Items.Clear();

            string[] macroList = IrssMacro.GetMacroList(Program.FolderMacros, false);
            if (macroList != null && macroList.Length > 0)
            {
                comboBoxMacro.Items.AddRange(macroList);
                comboBoxMacro.SelectedIndex = 0;
            }
        }
Exemple #3
0
        /// <summary>
        /// Refreshes the macro command list.
        /// </summary>
        private void RefreshCommandList()
        {
            comboBoxCommands.Items.Clear();

            comboBoxCommands.Items.Add(Common.UITextRun);
            comboBoxCommands.Items.Add(Common.UITextPause);
            comboBoxCommands.Items.Add(Common.UITextSerial);
            comboBoxCommands.Items.Add(Common.UITextWindowMsg);
            comboBoxCommands.Items.Add(Common.UITextTcpMsg);
            comboBoxCommands.Items.Add(Common.UITextHttpMsg);
            comboBoxCommands.Items.Add(Common.UITextKeys);
            comboBoxCommands.Items.Add(Common.UITextMouse);
            comboBoxCommands.Items.Add(Common.UITextEject);
            comboBoxCommands.Items.Add(Common.UITextPopup);
            comboBoxCommands.Items.Add(Common.UITextVirtualKB);
            comboBoxCommands.Items.Add(Common.UITextSmsKB);
            comboBoxCommands.Items.Add(Common.UITextBeep);
            comboBoxCommands.Items.Add(Common.UITextSound);
            comboBoxCommands.Items.Add(Common.UITextDisplayMode);
            comboBoxCommands.Items.Add(Common.UITextStandby);
            comboBoxCommands.Items.Add(Common.UITextHibernate);
            comboBoxCommands.Items.Add(Common.UITextReboot);
            comboBoxCommands.Items.Add(Common.UITextShutdown);
            comboBoxCommands.Items.Add(Common.UITextLabel);
            comboBoxCommands.Items.Add(Common.UITextGotoLabel);
            comboBoxCommands.Items.Add(Common.UITextIf);
            comboBoxCommands.Items.Add(Common.UITextSetVar);
            comboBoxCommands.Items.Add(Common.UITextClearVars);
            comboBoxCommands.Items.Add(Common.UITextLoadVars);
            comboBoxCommands.Items.Add(Common.UITextSaveVars);

            string[] macroList = IrssMacro.GetMacroList(Program.FolderMacros, true);
            if (macroList != null && macroList.Length > 0)
            {
                comboBoxCommands.Items.AddRange(macroList);
            }

            string[] irList = Common.GetIRList(true);
            if (irList != null && irList.Length > 0)
            {
                comboBoxCommands.Items.AddRange(irList);
            }
        }
Exemple #4
0
        private void LoadMenuMacros()
        {
            SetWindowTitle(UITextMacros);

            listViewMenu.LargeImageList = null;

            SetToListStyle();

            string[] macros = IrssMacro.GetMacroList(Program.FolderMacros, false);
            if (macros.Length == 0)
            {
                return;
            }

            foreach (string macro in macros)
            {
                ListViewItem item = new ListViewItem(macro);
                item.Tag = TagMacro + macro;

                listViewMenu.Items.Add(item);
            }
        }