示例#1
0
        private void buttonDelete_Click(object sender, EventArgs e)
        {
            string command = comboBoxCommand.Text;
            string device  = comboBoxDeviceAddress.Text;

            if (MessageBox.Show("Really delete?", "Confirm delete", MessageBoxButtons.YesNo) == DialogResult.Yes)
            {
                dbMgr.RemoveCommand(device, command);
                dbMgr.SaveConfig();
                this.Close();
            }
        }
示例#2
0
 public void AddToButton(string buttonId, string buttonText, string device, string command, ArrayList dataBytes)
 {
     string[] buttonCMD = new string[3];
     buttonCMD[0] = buttonId;
     buttonCMD[1] = buttonText;
     buttonCMD[2] = device + "," + command;
     for (int i = 0; i < dataBytes.Count; i++)
     {
         buttonCMD[2] += "," + dataBytes[i].ToString();
     }
     dbMgr.UpdateShortcutButton(buttonCMD);
     dbMgr.SaveConfig();
 }
示例#3
0
        private void buttonSave_Click(object sender, System.EventArgs e)
        {
            dbMgr.UpdateRS232Settings(commSettings.ToArray());

            dbMgr.SaveConfig();
            this.Close();
        }
        private void buttonSave_Click(object sender, EventArgs e)
        {
            object[] deviceConfig = new object[4];
            deviceConfig[0] = null;
            deviceConfig[1] = comboBoxDeviceAddress.SelectedValue;
            deviceConfig[2] = comboBoxCommand.Text;
            deviceConfig[3] = textBoxCommandDesc.Text;
            dbMgr.UpdateDevice(deviceConfig);
            int Id = dbMgr.GetDeviceId(comboBoxDeviceAddress.SelectedValue.ToString(), comboBoxCommand.Text);

            SaveDataBytes(Id);
            dbMgr.SaveConfig();
        }