Esempio n. 1
0
 private void OpenChart(int i, bool NewWindow)
 {
     if (StockDB.CurrentList.Count > 0)
     {
         i = (i + StockDB.CurrentList.Count) % StockDB.CurrentList.Count;
         this.dgList.CurrentRowIndex = i;
         string text1 = (string)this.dgList[i, this.SymbolColumn];
         ChartForm.OpenChartForm(text1, base.MdiParent, NewWindow);
     }
 }
Esempio n. 2
0
        private void SymbolForm_KeyDown(object sender, KeyEventArgs e)
        {
            Keys keys1 = e.KeyCode;

            if (keys1 != Keys.Return)
            {
                if (keys1 == Keys.Escape)
                {
                    base.Close();
                    return;
                }
                return;
            }
            if ((this.dgSymbol.CurrentRowIndex < 0) || (this.dgSymbol.CurrentRowIndex >= this.dvSymbol.Count))
            {
                goto Label_0118;
            }
            string       text1 = this.dgSymbol[this.dgSymbol.CurrentRowIndex, 2].ToString();
            ShortcutType type1 = (ShortcutType)int.Parse(this.dgSymbol[this.dgSymbol.CurrentRowIndex, 0].ToString());

            if (base.Owner is ChartForm)
            {
                switch (type1)
                {
                case ShortcutType.Stock:
                {
                    if (this.dgSymbol.CurrentRowIndex >= 0)
                    {
                        ChartForm.OpenChartForm(text1, base.Owner.MdiParent, false);
                    }
                    goto Label_00FA;
                }

                case ShortcutType.Indicator:
                {
                    (base.Owner as ChartForm).ChartControl.SetAreaByName(text1);
                    goto Label_00FA;
                }
                }
            }
            else if ((base.Owner is ListForm) && (type1 == ShortcutType.Stock))
            {
                ListForm.Current.GotoSymbol(text1);
            }
Label_00FA:
            if (type1 == ShortcutType.Folder)
            {
                ListForm.Current.FolderId = int.Parse(text1);
                ListForm.Current.Activate();
            }
Label_0118:
            base.Close();
        }