Example #1
0
        private void settingsToolStripMenuItem_Click(object sender, EventArgs e)
        {
            if (DBiFace.IsDBAvailable())
            {
                DBiFace.GetOnlineTable();
            }
            var set = new Settings(_log);

            set.ShowDialog();
        }
Example #2
0
        private void MainForm_Load(object sender, EventArgs e)
        {
            if (Properties.Settings.Default.DBPath != "")
            {
                return;
            }
            var set = new Settings(_log);

            set.ShowDialog();
        }
Example #3
0
        //TODO: select between FOS and NoSQL
        public static void InitiateDB(decimal dbType, string path1, string path2,LogDispatcher.LogDispatcher log)
        {
            _log = log;
            if (path1 == "" || path2 == "") return;

            if (AccDB != null)
            {
                AccDB.Scan.ProgressChanged -= _accDB_ProgressChanged;
                AccDB.StateChanged -= _accDB_StateChanged;
                AccDB.CloseDB();
            }

            AccDB = new NoSQLDB(path1, path2,log);
            AccDB.Scan.ProgressChanged += _accDB_ProgressChanged;
            AccDB.StateChanged += _accDB_StateChanged;
            AccDB.Retriever.GetFinish += AccDB_OnGetFinish;
            AccDB.Queue.Committed += Queue_Committed;
            AccDB.Queue.SetThreshold((int)Properties.Settings.Default.TuneQThreshold);
            AccDB.Queue.SetTimeout((int)Properties.Settings.Default.TuneQTimer);
            AccDB.Scan.AccountScanned += Scan_AccountScanned;
            _path1 = path1;

            if (!IsDBAvailable())
            {
                //Database not found/set up
                var set = new Settings(log);
                set.ShowDialog();
                return;
            }

            if (DBCountRows("Accounts") != 0) return;
            if (MessageBox.Show(
                @"DB is not initialized. Initialize and scan now?",
                @"Database is empty",
                MessageBoxButtons.YesNo) != DialogResult.Yes) return;
            //Database is empty
            RescanDB(Properties.Settings.Default.DBAggressiveScan);
        }
Example #4
0
 private void settingsToolStripMenuItem_Click(object sender, EventArgs e)
 {
     if (DBiFace.IsDBAvailable())
         DBiFace.GetOnlineTable();
     var set = new Settings(_log);
     set.ShowDialog();
 }
Example #5
0
 private void MainForm_Load(object sender, EventArgs e)
 {
     if (Properties.Settings.Default.DBPath != "") return;
     var set = new Settings(_log);
     set.ShowDialog();
 }