private void ListForm_KeyPress(object sender, KeyPressEventArgs e) { if (e.KeyChar != '+') { SymbolForm.PressKeyAndShow(this, e.KeyChar); } }
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); } }
private void OnPluginChange(object source, FileSystemEventArgs e) { if (base.ActiveMdiChild is ChartForm) { (base.ActiveMdiChild as ChartForm).RefreshChart(); } SymbolForm.RefreshIndicators(); }
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; }
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); } }
private void ListForm_Load(object sender, EventArgs e) { this.RefreshList(); SymbolForm.InitSymbolList(StockDB.GetSymbolList()); }
private void ChartForm_KeyPress(object sender, KeyPressEventArgs e) { SymbolForm.PressKeyAndShow(this, e.KeyChar); }