コード例 #1
0
        public static Configuration DefaultConfiguaration()
        {
            Configuration configuration = new Configuration();

            configuration.IsInstrumentFileLocal = true;
            configuration.InstrumentFileHost = "127.0.0.1";
            configuration.InstrumentFileName = Path.Combine(Installation.DataDir.FullName, "instruments.quant");
            configuration.IsDataFileLocal = true;
            configuration.DataFileHost = "127.0.0.1";
            configuration.DataFileName = Path.Combine(Installation.DataDir.FullName, "data.quant");

            configuration.OrderServer = new ServerConfiguration();
            configuration.OrderServer.TypeName = "SmartQuant.FileOrderServer, SmartQuant";
            configuration.OrderServer.ConnectionString = string.Format("PATH={0}", Path.Combine(Installation.DataDir.FullName, "orders.quant"));

            configuration.DefaultCurrency = "USD";
            configuration.DefaultExchange = "SMART";
            configuration.DefaultDataProvider = "QuantRouter";
            configuration.DefaultExecutionProvider = "QuantRouter";
            configuration.ProviderManagerFileName = Path.Combine(Installation.ConfigDir.FullName, "providermanager.xml");
            configuration.Streamers = new List<StreamerPlugin>();
            configuration.AddDefaultStreamers();
            configuration.Providers = new List<ProviderPlugin>();
            configuration.AddDefaultProviders();

            return configuration;
        }
コード例 #2
0
ファイル: ConfigurationForm.cs プロジェクト: heber/FreeOQ
 public ConfigurationForm()
 {
   eX4XcIhHpDXt70u2x3N.k8isAcYzkUOGF();
   // ISSUE: explicit constructor call
   base.\u002Ector();
   this.JKXV3aLwJM();
   this.yX4VEMYZg2 = Framework.Configuration;
   this.xyKR3EoNCR.SelectedObject = (object) Framework.Installation;
   this.VNvRTbRacf.SelectedObject = (object) Framework.Configuration;
   this.YKMRZiZx4j.SelectedObject = (object) new HmDaRnJpjsxWFcPgrt();
   foreach (Reference reference in (ReadOnlyCollectionBase) this.yX4VEMYZg2.References)
     this.twFVrby9l0(reference);
   foreach (Plugin plugin in (ReadOnlyCollectionBase) this.yX4VEMYZg2.Plugins)
     this.zggVqt1coG(plugin);
   this.yX4VEMYZg2.ReferenceAdded += new ReferenceEventHandler(this.NLSVXtyAfn);
   this.yX4VEMYZg2.ReferenceRemoved += new ReferenceEventHandler(this.oBBVKrJEAC);
   this.yX4VEMYZg2.ReferenceEnabledChanged += new ReferenceEventHandler(this.YoTVmRp19X);
   this.yX4VEMYZg2.PluginAdded += new PluginEventHandler(this.c15VwwamEb);
   this.yX4VEMYZg2.PluginRemoved += new PluginEventHandler(this.rySV06yZ7L);
   this.yX4VEMYZg2.PluginEnabledChanged += new PluginEventHandler(this.wCZVpCvvsY);
   this.Text = string.Format(RNaihRhYEl0wUmAftnB.aYu7exFQKN(15218), (object) Framework.Installation.MainProduct);
 }
コード例 #3
0
ファイル: Framework.cs プロジェクト: ForTrade/CSharp
		private void LoadConfiguration()
		{
			string text;
			try
			{
				text = File.ReadAllText(Installation.ConfigDir.FullName + "\\configuration.xml");
			}
			catch (Exception)
			{
				text = null;
			}
			if (text != null)
			{
				using (MemoryStream memoryStream = new MemoryStream(Encoding.UTF8.GetBytes(text)))
				{
					XmlSerializer xmlSerializer = new XmlSerializer(typeof(Configuration));
					this.configuration = (Configuration)xmlSerializer.Deserialize(memoryStream);
					return;
				}
			}
			this.configuration = new Configuration();
		}