예제 #1
0
        private void deleteButton_Click(object sender, EventArgs e)
        {
            var confirmResult = MessageBox.Show("Are you sure, you want delete this plugin(" + OSTabsControl.SelectedTab.Name + ") ??",
                                                "Delete Confirmation !!",
                                                MessageBoxButtons.YesNo, MessageBoxIcon.Warning);

            if (confirmResult == DialogResult.Yes)
            {
                if (OSTabsControl.TabCount > 0)
                {
                    utils.Delete("delete from plugins where name='" + OSTabsControl.SelectedTab.Name + "'");
                    updateTabs();
                }
            }
        }
예제 #2
0
 private bool updateRecordToDB()
 {
     try
     {
         utils.Update("UPDATE plugins SET os='" + osComboBox.SelectedItem + "', dll_address='" + addressTextBox.Text.Replace(@"\", @"\\") + "' WHERE name='" + tabName + "'");
         utils.Delete("DELETE FROM apps WHERE plugin_name='" + tabName + "'");
         CheckBox[] appsBox = this.checkBoxPanel.Controls.OfType <CheckBox>().ToArray();
         foreach (CheckBox box in appsBox)
         {
             if (box.Checked)
             {
                 utils.Insert("insert into apps (name,path,plugin_name)values('" + box.Text + "','" + apps[box.Text] + "','" + tabName + "');");
             }
         }
     }
     catch (MySQLException e)
     {
         Debug.Fail(e.getMessage());
         return(false);
     }
     return(true);
 }