Exemplo n.º 1
0
        public static DataPackage GetRealtimeData(string Code)
        {
            DataTable table1 = StockDB.GetRealtimeList(false);
            DataRow   row1   = table1.Rows.Find(Code);

            return(StockDB.GetRealtimeData(row1));
        }
Exemplo n.º 2
0
        public static void OpenChartForm(string Code, Form Owner, bool NewWindow)
        {
            if (idm == null)
            {
                idm = new FileDataManager(SymbolForm.GetSymbolTable());
            }
            IDataProvider iDataProvider = idm[Code];

            if (iDataProvider != null)
            {
                (iDataProvider as CommonDataProvider).Merge(StockDB.GetRealtimeData(Code));
                if (CurrentChartForm == null || NewWindow)
                {
                    CurrentChartForm           = new ChartForm();
                    CurrentChartForm.MdiParent = Owner;
                    CurrentChartForm.Show();
                    FormList.Add(CurrentChartForm);
                }
                CurrentChartForm.om.SaveObject(CurrentChartForm.Code);
                CurrentChartForm.Code = Code;
                CurrentChartForm.ChartControl.ShowChart(iDataProvider);
                CurrentChartForm.Activate();
                CurrentChartForm.om.LoadObject(Code);
            }
        }
Exemplo n.º 3
0
        public static void MergeRealtime()
        {
            FileDataManager manager1 = new FileDataManager(null);

            foreach (DataRow row1 in StockDB.dtSymbolList.Rows)
            {
                if (!object.Equals(row1["LastTime"], row1["MergeTime"]))
                {
                    string text1 = row1["Code"].ToString().Trim();
                    row1["MergeTime"]           = row1["LastTime"];
                    StockDB.dtSymbolListChanged = true;
                    StockDB.MergeOneRealtime(manager1, text1, StockDB.GetRealtimeData(row1));
                }
            }
        }