예제 #1
0
 private void ListForm_KeyPress(object sender, KeyPressEventArgs e)
 {
     if (e.KeyChar != '+')
     {
         SymbolForm.PressKeyAndShow(this, e.KeyChar);
     }
 }
예제 #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);
            }
        }
예제 #3
0
 private void OnPluginChange(object source, FileSystemEventArgs e)
 {
     if (base.ActiveMdiChild is ChartForm)
     {
         (base.ActiveMdiChild as ChartForm).RefreshChart();
     }
     SymbolForm.RefreshIndicators();
 }
예제 #4
0
 private void MainForm_Load(object sender, EventArgs e)
 {
     PluginManager.Load(Environment.CurrentDirectory + @"\Plugins\");
     PluginManager.OnPluginChanged += new FileSystemEventHandler(this.OnPluginChange);
     ListForm.ShowForm(this);
     SymbolForm.AddFolder();
     this.tmShareware.Enabled = true;
 }
예제 #5
0
 public static void PressKeyAndShow(Form Owner, char c)
 {
     if (char.IsSymbol(c) || char.IsLetterOrDigit(c))
     {
         SymbolForm.ShowForm(Owner);
         SymbolForm.Current.tbSelect.Text = "";
         SymbolForm.Current.AddKeys(c);
     }
 }
예제 #6
0
 private void ListForm_Load(object sender, EventArgs e)
 {
     this.RefreshList();
     SymbolForm.InitSymbolList(StockDB.GetSymbolList());
 }
예제 #7
0
 private void ChartForm_KeyPress(object sender, KeyPressEventArgs e)
 {
     SymbolForm.PressKeyAndShow(this, e.KeyChar);
 }