static void Main() { Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); if (IsAdmin() == false) { MessagerForm f = new MessagerForm(null, MessagerType.Info, noadminmsg); f.ShowDialog(); Application.Exit(); } else { if (IsSevenOrHigher() == true) { string resource = "Cloning.Newtonsoft.Json.dll"; EmbeddedAssembly.Load(resource, "Newtonsoft.Json.dll"); AppDomain.CurrentDomain.AssemblyResolve += new ResolveEventHandler(CurrentDomain_AssemblyResolve); // load settings, if there is no settings, load defaults Options.LoadSettings(); Application.Run(new MainForm()); } else { MessagerForm f = new MessagerForm(null, MessagerType.Info, unsupportedmsg); f.ShowDialog(); Application.Exit(); } } }
private void deletebtn_Click(object sender, EventArgs e) { if (clonelist.Items.Count > 0) { MessagerForm f = new MessagerForm(this, MessagerType.Question, deleteallclonesmsg); f.ShowDialog(this); } }
private string Backup() { try { foreach (DataGridViewRow selectedDriver in DriverList.SelectedRows) { string deviceGUID = selectedDriver.Cells[2].Value.ToString(); string driverID = selectedDriver.Cells[3].Value.ToString(); driverUtility.BackupDriver(deviceGUID, driverID, DriverBackupFolder + Now + "\\"); } return(DriverBackupFolder + Now); } catch { MessagerForm f = new MessagerForm(null, MessagerType.Info, ErrorMessage); f.ShowDialog(); return(string.Empty); } }