Beispiel #1
0
        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();
                }
            }
        }
Beispiel #2
0
 private void deletebtn_Click(object sender, EventArgs e)
 {
     if (clonelist.Items.Count > 0)
     {
         MessagerForm f = new MessagerForm(this, MessagerType.Question, deleteallclonesmsg);
         f.ShowDialog(this);
     }
 }
Beispiel #3
0
        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);
            }
        }