示例#1
0
 public static void LoadDictionary(string sFIXDictionary)
 {
     if (!string.IsNullOrEmpty(sFIXDictionary))
     {
         dataDictionary = new FIXDictionary.DataDictionary();
         dataDictionary.Load(sFIXDictionary);
     }
 }
示例#2
0
        public static FIXConverter CreateInstance(string sFIXDictionary)
        {
            if (Instance == null)
            {
                Instance = new FIXConverter();

                if (!string.IsNullOrEmpty(sFIXDictionary))
                {
                    dataDictionary = new FIXDictionary.DataDictionary();
                    dataDictionary.Load(sFIXDictionary);
                }

                fixClasses = FIXClassesInfo.CreateInstance();
                fixClasses.LoadQuickFIXTypesInfo("QuickFix.FIX");
            }
            return(Instance);
        }
示例#3
0
        void LoadDictionaryAndFields()
        {
            InsightCalculator.InsightsDatabase =
                JsonConvert.DeserializeObject <InsightsDatabase>(
                    File.ReadAllText(Path.Combine(Application.StartupPath, "insights.json")));
            dd = new QuickFix.DataDictionary.DataDictionary();

            Stream stream = new FileStream(Path.Combine(Application.StartupPath, "spec", "FIX42.xml"), FileMode.Open, FileAccess.Read);

            dd.Load(stream);

            foreach (var ddField in dd.FieldsByTag)
            {
                var c = new ComboBoxItem();
                c.Text = ddField.Value.Name + $" ({ddField.Key})";
                c.Tag  = ddField.Value;
                _fieldsBoxItems.Add(ddField.Key, c);
                FieldCol.Items.Add(c);
            }
        }