Пример #1
0
 protected override void OnClosing(System.ComponentModel.CancelEventArgs e)
 {
     base.OnClosing(e);
     RCONWindow.CloseAllWindows();
     PlayerListWindow.CloseAllWindows();
     this.versionChecker.DisposeAsync().DoNotWait();
 }
        protected override void OnClosing(System.ComponentModel.CancelEventArgs e)
        {
            base.OnClosing(e);
            RCONWindow.CloseAllWindows();
            PlayerListWindow.CloseAllWindows();
            this.versionChecker.DisposeAsync().DoNotWait();

            var installFolder = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location);
            var backupFolder  = IOUtils.NormalizePath(string.IsNullOrWhiteSpace(Config.Default.BackupPath)
                ? Path.Combine(Config.Default.DataDir, Config.Default.BackupDir)
                : Path.Combine(Config.Default.BackupPath));

            SettingsUtils.BackupUserConfigSettings(Config.Default, "userconfig.json", installFolder, backupFolder);
        }