Beispiel #1
0
        private void btnSettings_Click(object sender, EventArgs e)
        {
            if (Control.ModifierKeys == Keys.Shift) //YEDEKLE
            {
                Cfg.BackupConfig();
                ShowInfo("Yedekleme başarılı.", "BAŞARILI");
            }
            else if (Control.ModifierKeys == Keys.Control) //YEDEKTEN GERİ YÜKLE
            {
                openFileDialog1.InitialDirectory = System.IO.Path.Combine(Application.StartupPath, "Backups");
                var dialog = openFileDialog1.ShowDialog();
                if (dialog != DialogResult.OK)
                {
                    return;
                }

                string path = openFileDialog1.FileName;
                Cfg.RestoreConfig(path);
                RefProgram();
                ShowInfo("Geri yükleme başarılı.", "BAŞARILI");
            }
            else
            {
                MainClass.OpenForm(new Settings());
            }
        }