Пример #1
0
        private void wrkwithBind(object sender, System.EventArgs e)
        {
            if (treeView1.SelectedNode != null)
            {
                editingBind     = treeView1.SelectedNode.Text;
                editingBindCmds = IBMi.getConfig(editingBind).Split('|');

                wrkWithBind();

                treeView1.SelectedNode.Tag = string.Join("|", editingBindCmds);
            }
            else
            {
                MessageBox.Show("Please select a binding to edit.");
            }
        }
Пример #2
0
        public void cmdBindings_Load()
        {
            TreeNode curNode;

            bindings = new List <string>();

            foreach (string bind in IBMi.getConfig("binds").Split('|'))
            {
                bindings.Add(bind.Trim());
            }
            treeView1.Nodes.Clear();
            foreach (string bind in bindings)
            {
                curNode     = treeView1.Nodes.Add(bind);
                curNode.Tag = IBMi.getConfig(bind);
            }
        }
Пример #3
0
        private void button1_Click(object sender, EventArgs e)
        {
            List <string> bindings;

            if (validate())
            {
                IBMi.setConfig("CLBind", string.Join("|", generateCommands()));
                bindings = IBMi.getConfig("binds").Split('|').ToList();
                bindings.Add("CLBind");
                IBMi.setConfig("binds", string.Join("|", bindings.ToArray()));

                if (Main.bindsWindow != null)
                {
                    Main.bindsWindow.cmdBindings_Load();
                    Win32.SendMessage(PluginBase.nppData._nppHandle, NppMsg.NPPM_DMMSHOW, 0, Main.bindsWindow.Handle);
                }

                this.Close();
            }
        }
Пример #4
0
 private void userSettings_Load(object sender, EventArgs e)
 {
     textBox1.Text = IBMi.getConfig("system");
     textBox2.Text = IBMi.getConfig("username");
     textBox3.Text = IBMi.getConfig("password");
 }