Beispiel #1
0
        public static void UpdateDateAndOpenChartForm(string code, Form Owner, bool NewWindow)
        {
            YahooDataManager ydm = new YahooDataManager();

            ydm.CacheRoot = FormulaHelper.Root + "Cache";
            CommonDataProvider cdp = new CommonDataProvider(ydm);

            if (mCurrentChartForm == null || NewWindow)
            {
                mCurrentChartForm           = new ChartForm();
                mCurrentChartForm.MdiParent = Owner;
                mCurrentChartForm.Show();
                FormList.Add(mCurrentChartForm);
            }

            mCurrentChartForm.m_code = code;
            mCurrentChartForm.om.SaveObject(mCurrentChartForm.m_code);
            ((ChartWinControl)mCurrentChartForm.om.Canvas).ShowChart(cdp);
            mCurrentChartForm.Activate();
            mCurrentChartForm.om.LoadObject(code);
        }