コード例 #1
0
ファイル: DS2Backup.cs プロジェクト: huynh8/DS2SOTFSBackup
        private void DS2Backup_Shown(object sender, EventArgs e)
        {
            backingUp = false;
            gameSave = new GameSave();
            backupSave = new BackupSave();

            GameSaveTextBox.Text = gameSave.Path;
            BackupSaveTextBox.Text = backupSave.Path;
        }
コード例 #2
0
ファイル: BackupSave.cs プロジェクト: huynh8/DS2SOTFSBackup
        public void backup(GameSave gameSave)
        {
            if (!System.IO.Directory.Exists(this.path + @"\Backups"))
            {
                System.IO.Directory.CreateDirectory(this.path + @"\Backups");
            }

            if(numBackupSaves == MAX_BACKUP_SAVES)
            {
                numBackupSaves = 1;
                latestSaveIndex = numBackupSaves;
            }
            else
            {
                latestSaveIndex = numBackupSaves++;
            }

            FileSysManip.copyFile("DS2SOFS0000.sl2", gameSave.Path, this.Path + @"\Backups" + @"\" + numBackupSaves);
        }