Beispiel #1
0
 public void RefreshList()
 {
     if (!this.SymbolChanged && this.RealtimeChanged)
     {
         this.RefreshData();
     }
     else if (this.SymbolChanged || this.RealtimeChanged)
     {
         StockDB.ResetList();
         this.RefreshData();
         StockDB.RecreateFolders();
     }
     this.RealtimeChanged = false;
     this.SymbolChanged   = false;
 }
Beispiel #2
0
 public static void Open()
 {
     if (!Directory.Exists(StockDB.DataPath))
     {
         Directory.CreateDirectory(StockDB.DataPath);
     }
     if (!Directory.Exists(StockDB.HistoricalPath))
     {
         Directory.CreateDirectory(StockDB.HistoricalPath);
     }
     StockDB.CreateDBSchema();
     StockDB.LoadDB(StockDB.dtSymbolList);
     StockDB.LoadDB(StockDB.dtFolderAll);
     StockDB.LoadDB(StockDB.dtFolderRel);
     StockDB.RecreateFolders();
 }
Beispiel #3
0
        private void miQuickAdd_Click(object sender, EventArgs e)
        {
            string text1 = InputBox.ShowInputBox("Symbol", "");

            if (text1 != "")
            {
                if (StockDB.GetSymbol(text1) == null)
                {
                    string[] textArray1 = YahooDataManager.GetStockName(text1);
                    if (textArray1.Length == 3)
                    {
                        StockDB.LoadSymbolRow(text1, textArray1[1], textArray1[2]);
                        StockDB.RecreateFolders();
                        ListForm.Current.SymbolChanged = true;
                        ListForm.Current.RefreshList();
                    }
                }
            }
            ListForm.Current.GotoSymbol(text1);
        }