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