public frmMain() { InitializeComponent(); Text = $@"RomVaultX {Application.StartupPath}"; string driveLetter = AppSettings.ReadSetting("vDriveLetter"); if (driveLetter == null) { AppSettings.AddUpdateAppSettings("vDriveLetter", "V"); driveLetter = AppSettings.ReadSetting("vDriveLetter"); } vDriveLetter = driveLetter.ToCharArray()[0]; addGameGrid(); string res = Program.db.ConnectToDB(); if (!string.IsNullOrEmpty(res)) { MessageBox.Show("res", "DB Error", MessageBoxButtons.OK, MessageBoxIcon.Error); Close(); } DatUpdate.UpdateGotTotal(); DirTree.Setup(RvTreeRow.ReadTreeFromDB()); }
public frmMain() { InitializeComponent(); addGameGrid(); DataAccessLayer.UpdateGotTotal(); DirTree.Setup(RvTreeRow.ReadTreeFromDB()); }
private void btnUpdateDats_Click(object sender, EventArgs e) { FrmProgressWindow progress = new FrmProgressWindow(this, "Scanning Dats", DatUpdate.UpdateDat); progress.ShowDialog(this); progress.Dispose(); DirTree.Setup(RvTreeRow.ReadTreeFromDB()); DatSetSelected(DirTree.Selected); }
private void deepReScanToolStripMenuItem_Click(object sender, EventArgs e) { FrmProgressWindow progress = new FrmProgressWindow(this, "Scanning RomRoot Files", romRootScanner.ScanFilesDeep); progress.ShowDialog(this); progress.Dispose(); DirTree.Setup(RvTreeRow.ReadTreeFromDB()); DatSetSelected(DirTree.Selected); }
private void DoScan() { FrmProgressWindow progress = new FrmProgressWindow(this, "Scanning Files", RomScanner.ScanFiles); progress.ShowDialog(this); progress.Dispose(); DirTree.Setup(RvTreeRow.ReadTreeFromDB()); DatSetSelected(DirTree.Selected); }
public FrmMain() { InitializeComponent(); AddGameMetaData(); Text = $@"RomVault ({Program.StrVersion}-WIP3) {Application.StartupPath}"; _displayColor = new Color[(int)RepStatus.EndValue]; _fontColor = new Color[(int)RepStatus.EndValue]; // RepStatus.UnSet _displayColor[(int)RepStatus.UnScanned] = CBlue; _displayColor[(int)RepStatus.DirCorrect] = CGreen; _displayColor[(int)RepStatus.DirMissing] = CRed; _displayColor[(int)RepStatus.DirCorrupt] = CBrightRed; //BrightRed _displayColor[(int)RepStatus.Missing] = CRed; _displayColor[(int)RepStatus.Correct] = CGreen; _displayColor[(int)RepStatus.NotCollected] = CGrey; _displayColor[(int)RepStatus.UnNeeded] = CCyanGrey; _displayColor[(int)RepStatus.Unknown] = CCyan; _displayColor[(int)RepStatus.InToSort] = CMagenta; _displayColor[(int)RepStatus.Corrupt] = CBrightRed; //BrightRed _displayColor[(int)RepStatus.Ignore] = CGreyBlue; _displayColor[(int)RepStatus.CanBeFixed] = CYellow; _displayColor[(int)RepStatus.MoveToSort] = CPurple; _displayColor[(int)RepStatus.Delete] = CBrown; _displayColor[(int)RepStatus.NeededForFix] = COrange; _displayColor[(int)RepStatus.Rename] = COrange; _displayColor[(int)RepStatus.CorruptCanBeFixed] = CYellow; _displayColor[(int)RepStatus.MoveToCorrupt] = CPurple; //Missing _displayColor[(int)RepStatus.Deleted] = CWhite; for (int i = 0; i < (int)RepStatus.EndValue; i++) { _fontColor[i] = Contrasty(_displayColor[i]); } _gameGridColumnXPositions = new int[(int)RepStatus.EndValue]; DirTree.Setup(ref DB.DirTree); splitContainer3_Panel1_Resize(new object(), new EventArgs()); splitContainer4_Panel1_Resize(new object(), new EventArgs()); _mnuContext = new ContextMenu(); MenuItem mnuScan = new MenuItem { Text = @"Scan", Tag = null }; _mnuFile = new MenuItem { Text = @"Set Dir Settings", Tag = null }; _mnuOpen = new MenuItem { Text = @"Open", Tag = null }; MenuItem mnuFixDat = new MenuItem { Text = @"Create Fix DATs", Tag = null }; MenuItem mnuMakeDat = new MenuItem { Text = @"Make Dat with CHDs as disk", Tag = null }; MenuItem mnuMakeDat2 = new MenuItem { Text = @"Make Dat with CHDs as rom", Tag = null }; _mnuContext.MenuItems.Add(mnuScan); _mnuContext.MenuItems.Add(_mnuOpen); _mnuContext.MenuItems.Add(_mnuFile); _mnuContext.MenuItems.Add(mnuFixDat); _mnuContext.MenuItems.Add(mnuMakeDat); _mnuContext.MenuItems.Add(mnuMakeDat2); mnuScan.Click += MnuToSortScan; _mnuOpen.Click += MnuOpenClick; _mnuFile.Click += MnuFileClick; mnuFixDat.Click += MnuMakeFixDatClick; mnuMakeDat.Click += MnuMakeDatClick; mnuMakeDat2.Click += MnuMakeDat2Click; _mnuContextToSort = new ContextMenu(); _mnuToSortScan = new MenuItem { Text = @"Scan", Tag = null }; _mnuToSortOpen = new MenuItem { Text = @"Open", Tag = null }; _mnuToSortDelete = new MenuItem { Text = @"Remove", Tag = null }; _mnuToSortSetPrimary = new MenuItem { Text = @"Set To Primary ToSort", Tag = null }; _mnuToSortSetCache = new MenuItem { Text = @"Set To Cache ToSort", Tag = null }; _mnuContextToSort.MenuItems.Add(_mnuToSortScan); _mnuContextToSort.MenuItems.Add(_mnuToSortOpen); _mnuContextToSort.MenuItems.Add(_mnuToSortDelete); _mnuContextToSort.MenuItems.Add(_mnuToSortSetPrimary); _mnuContextToSort.MenuItems.Add(_mnuToSortSetCache); _mnuToSortScan.Click += MnuToSortScan; _mnuToSortOpen.Click += MnuToSortOpen; _mnuToSortDelete.Click += MnuToSortDelete; _mnuToSortSetPrimary.Click += MnuToSortSetPrimary; _mnuToSortSetCache.Click += MnuToSortSetCache; chkBoxShowCorrect.Checked = Settings.rvSettings.chkBoxShowCorrect; chkBoxShowMissing.Checked = Settings.rvSettings.chkBoxShowMissing; chkBoxShowFixed.Checked = Settings.rvSettings.chkBoxShowFixed; chkBoxShowMerged.Checked = Settings.rvSettings.chkBoxShowMerged; TabArtworkInitialize(); }