示例#1
0
        private void MainForm_Load(object sender, EventArgs e)
        {
            if (File.Exists(_statsDmpPath))
            {
                File.Delete(_statsDmpPath);
            }
            var statsThread = new Thread(ShowStats)
            {
                IsBackground     = true,
                CurrentCulture   = new CultureInfo("en-US"),
                CurrentUICulture = new CultureInfo("en-US")
            };

            statsThread.Start();

            var workingDirectory         = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location);
            var customCampaignFolderPath = Path.Combine(workingDirectory, "CustomCampaignData");

            Directory.CreateDirectory(customCampaignFolderPath);

            ModManagerService.BackupGameFiles();
        }
 private void WarOfAssassinsForm_FormClosing(object sender, FormClosingEventArgs e)
 {
     ModManagerService.RestoreGameFiles();
 }