private void _ofdProject_FileOk(object sender, CancelEventArgs e) { // Check if the game directory is prepared for a game project and decline it if not. if (GameProject.ValidatePath(_ofdProject.FileName)) { GameProject = new GameProject(_ofdProject.FileName); } else { // Neither the container file nor a DataRaw directory was found, deem game directory as invalid. MessageForm.Show("This is not in a valid KartRider game directory" + Environment.NewLine + "(no packed " + "or unpacked game data was found).", MessageBoxButtons.OK, MessageBoxIcon.Exclamation); e.Cancel = true; } }
private void MainForm_Load(object sender, EventArgs e) { // Restore the last window states. DesktopLocation = new Point(_settings.WindowX, _settings.WindowY); ClientSize = new Size(_settings.WindowWidth, _settings.WindowHeight); if (_settings.WindowMaximized) { WindowState = FormWindowState.Maximized; } if (File.Exists(_settings.LastProjectPath)) { GameProject = new GameProject(_settings.LastProjectPath); _tvProject.Navigate(_settings.ProjectLastLocation[_gameProject.ExecutablePath]); } _hasLoaded = true; }
private void ProjectItem_Click(object sender, EventArgs e) { ToolStripMenuItem menuItem = (ToolStripMenuItem)sender; GameProject = new GameProject(menuItem.Text); }