Пример #1
0
 public SymbolForm()
 {
     this.htSymbol = new Hashtable();
     this.PY       = Encoding.GetEncoding("GB2312").GetBytes("\u554a\u82ad\u64e6\u642d\u86fe\u53d1\u5676\u54c8\u51fb\u51fb\u5580\u5783\u5988\u62ff\u54e6\u556a\u671f\u7136\u6492\u584c\u6316\u6316\u6316\u6614\u538b\u531dAA");
     this.InitializeComponent();
     this.dtSymbol = new DataTable();
     this.dtSymbol.Columns.Add("ShortcutType");
     this.dtSymbol.Columns.Add("Shortcut");
     this.dtSymbol.Columns.Add("Code");
     this.dtSymbol.Columns.Add("Name");
     this.dtSymbol.Columns.Add("Key");
     this.AddStyleColumns(this.dgSymbol.TableStyles[0]);
     this.AddShortcut(FormulaBase.GetAllIndicators(false), ShortcutType.Indicator, false);
 }
Пример #2
0
 private void RefreshTree()
 {
     tvFormula.BeginUpdate();
     try
     {
         tvFormula.ImageList = ilFormula;
         tvFormula.Nodes.Clear();
         tvFormula.Nodes.Add("Root");
         tvFormula.Nodes[0].Nodes.Add("Scan");
         string[] strs2 = FormulaBase.GetAllIndicators(false);
         for (int j = 0; j < (int)strs2.Length; j++)
         {
             string str1 = strs2[j];
             int    i    = str1.IndexOf('.');
             if (i > 0)
             {
                 string str2 = str1.Substring(0, i).ToUpper();
                 if (Array.IndexOf(new string[] { "NATIVE", "TRADING", "DEMO" }, str2) < 0)
                 {
                     CreateNode(str1);
                 }
             }
         }
         tvFormula.Nodes[0].Expand();
         tvFormula.Nodes[0].Nodes[0].Expand();
         gbParam.Controls.Clear();
         if (tvFormula.Nodes[0].Nodes[0].Nodes.Count > 0)
         {
             tvFormula.SelectedNode = tvFormula.Nodes[0].Nodes[0].Nodes[0];
         }
     }
     finally
     {
         tvFormula.EndUpdate();
     }
 }
Пример #3
0
 public static void RefreshIndicators()
 {
     SymbolForm.Current.AddShortcut(FormulaBase.GetAllIndicators(false), ShortcutType.Indicator, true);
 }