当前位置: 首页>>代码示例>>C#>>正文


C# SettingsStorage.ContainsKey方法代码示例

本文整理汇总了C#中SettingsStorage.ContainsKey方法的典型用法代码示例。如果您正苦于以下问题:C# SettingsStorage.ContainsKey方法的具体用法?C# SettingsStorage.ContainsKey怎么用?C# SettingsStorage.ContainsKey使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在SettingsStorage的用法示例。


在下文中一共展示了SettingsStorage.ContainsKey方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: Load

		public override void Load(SettingsStorage storage)
		{
			_isLoading = true;

			try
			{
				((IPersistable)MarketDataGrid).Load(storage.GetValue<SettingsStorage>("MarketDataGrid") ?? storage.GetValue<SettingsStorage>("Grid"));

				var selectedSettings = storage.GetValue("SelectedSettings", Guid.Empty);
				var settings = ConfigManager.GetService<MarketDataSettingsCache>().Settings;

				if (selectedSettings != Guid.Empty)
					SelectedSettings = settings.FirstOrDefault(s => s.Id == selectedSettings)
						?? settings.FirstOrDefault(s => s.Id != Guid.Empty);

				if (storage.ContainsKey("Security"))
					SecurityPicker.SelectedSecurity = ConfigManager.GetService<IEntityRegistry>().Securities.ReadById(storage.GetValue<string>("Security"));

				FormatCtrl.SelectedFormat = storage.GetValue<StorageFormats>("SelectedFormat");
			}
			finally
			{
				_isLoading = false;
			}

			RefreshGrid();
		}
开发者ID:gurajenaprince406,项目名称:StockSharp,代码行数:27,代码来源:MarketDataPanel.xaml.cs

示例2: Load

			public void Load(SettingsStorage storage)
			{
				Path = storage.GetValue<string>("Path");
				ColumnSeparator = storage.GetValue<string>("ColumnSeparator");
				//RowSeparator = storage.GetValue<string>("RowSeparator");
				SkipFromHeader = storage.GetValue<int>("SkipFromHeader");
				//SkipFromFooter = storage.GetValue<int>("SkipFromFooter");
				Format = storage.GetValue<StorageFormats>("Format");

				if (storage.ContainsKey("Drive"))
					Drive = DriveCache.Instance.GetDrive(storage.GetValue<string>("Drive"));

				TimeZone = TimeZoneInfo.FindSystemTimeZoneById(storage.GetValue<string>("TimeZone"));

				CandleSettings = storage.GetValue("CandleSettings", CandleSettings);
			}
开发者ID:vikewoods,项目名称:StockSharp,代码行数:16,代码来源:ImportPane.xaml.cs

示例3: Load

		/// <summary>
		/// Load settings.
		/// </summary>
		/// <param name="storage">Settings storage.</param>
		public void Load(SettingsStorage storage)
		{
			if (storage.ContainsKey("WorkingTime"))
				WorkingTime.Load(storage.GetValue<SettingsStorage>("WorkingTime"));

			Interval = storage.GetValue<TimeSpan>("Interval");
			AttemptCount = storage.GetValue<int>("AttemptCount");
			ReAttemptCount = storage.GetValue<int>("ReAttemptCount");
			TimeOutInterval = storage.GetValue<TimeSpan>("TimeOutInterval");
		}
开发者ID:zjxbetter,项目名称:StockSharp,代码行数:14,代码来源:ReConnectionSettings.cs

示例4: Load

		public virtual void Load(SettingsStorage storage)
		{
			if (storage.ContainsKey("SelectedSecurity"))
				SelectedSecurity = ConfigManager.GetService<IEntityRegistry>().Securities.ReadById(storage.GetValue<string>("SelectedSecurity"));

			From = storage.GetValue<DateTime?>("From");
			To = storage.GetValue<DateTime?>("To");

			if (storage.ContainsKey("Drive"))
				Drive = DriveCache.Instance.GetDrive(storage.GetValue<string>("Drive"));

			StorageFormat = storage.GetValue<StorageFormats>("StorageFormat");
		}
开发者ID:reddream,项目名称:StockSharp,代码行数:13,代码来源:DataPane.cs

示例5:

		void IPersistable.Load(SettingsStorage storage)
		{
			if (storage.ContainsKey("Drive"))
				DrivePanel.SelectedDrive = DriveCache.Instance.GetDrive(storage.GetValue<string>("Drive"));

			DrivePanel.StorageFormat = storage.GetValue<StorageFormats>("StorageFormat");

			MarketData.Load(storage.GetValue<SettingsStorage>("MarketData"));
			SecurityPicker.Load(storage.GetValue<SettingsStorage>("SecurityPicker"));
			DataTypeComboBox.SelectedIndex = storage.GetValue<int>("DataTypeComboBox");
		}
开发者ID:knoppixmeister,项目名称:StockSharp,代码行数:11,代码来源:GluingDataPane.xaml.cs

示例6: Load

		public override void Load(SettingsStorage storage)
		{
			if (storage.ContainsKey("UnderlyingAsset"))
				UnderlyingAsset.SelectedSecurity = ConfigManager.GetService<IEntityRegistry>().Securities.ReadById(storage.GetValue<string>("UnderlyingAsset"));

			Desk.Load(storage.GetValue<SettingsStorage>("Desk"));

			if (storage.ContainsKey("ExpiryDate"))
				ExpiryDate.Value = storage.GetValue<DateTime>("ExpiryDate");

			MinStrike.Value = storage.GetValue<decimal?>("MinStrike");
			MaxStrike.Value = storage.GetValue<decimal?>("MaxStrike");

			UseBlackMode.IsChecked = Desk.UseBlackModel;

			if (storage.ContainsKey("CurrentDate"))
				CurrentDate.Value = storage.GetValue<DateTime>("CurrentDate");

			AssetPrice.Value = storage.GetValue<decimal?>("AssetPrice");
		}
开发者ID:hbwjz,项目名称:StockSharp,代码行数:20,代码来源:OptionDeskPanel.xaml.cs

示例7: Load

		public override void Load(SettingsStorage storage)
		{
			if (storage.ContainsKey("UnderlyingAsset"))
				UnderlyingAsset.SelectedSecurity = ConfigManager.GetService<IEntityRegistry>().Securities.ReadById(storage.GetValue<string>("UnderlyingAsset"));

			if (storage.ContainsKey("CurrentDate"))
				CurrentDate.Value = storage.GetValue<DateTime>("CurrentDate");

			AssetPrice.Value = storage.GetValue<decimal?>("AssetPrice");
		}
开发者ID:zjxbetter,项目名称:StockSharp,代码行数:10,代码来源:OptionPositionChartPanel.xaml.cs

示例8: Load

		public override void Load(SettingsStorage storage)
		{
			base.Load(storage);

			DepthGrid.Load(storage.GetValue<SettingsStorage>("DepthGrid"));
			Depth.SelectedIndex = storage.GetValue<int>("Depth");

			if (storage.ContainsKey("DepthGenerationInterval"))
				DepthGenerationInterval.Value = storage.GetValue<int>("DepthGenerationInterval");

			BuildFrom.SelectedIndex = storage.GetValue<int>("BuildFrom");
		}
开发者ID:zjxbetter,项目名称:StockSharp,代码行数:12,代码来源:DepthPane.xaml.cs

示例9: Load

		public override void Load(SettingsStorage storage)
		{
			_isLoading = true;

			try
			{
				((IPersistable)Grid).Load(storage.GetValue<SettingsStorage>("Grid"));

				if (storage.ContainsKey("Security"))
					SecurityPicker.SelectedSecurity = ConfigManager.GetService<IEntityRegistry>().Securities.ReadById(storage.GetValue<string>("Security"));

				FormatCtrl.SelectedFormat = storage.GetValue<StorageFormats>("SelectedFormat");
			}
			finally
			{
				_isLoading = false;
			}

			RefreshGrid();
		}
开发者ID:reddream,项目名称:StockSharp,代码行数:20,代码来源:MarketDataPanel.xaml.cs

示例10: Load

		/// <summary>
		/// Load settings.
		/// </summary>
		/// <param name="storage">Settings storage.</param>
		public void Load(SettingsStorage storage)
		{
			if (storage.ContainsKey(nameof(WorkingTime)))
				WorkingTime.Load(storage.GetValue<SettingsStorage>(nameof(WorkingTime)));

			Interval = storage.GetValue<TimeSpan>(nameof(Interval));
			AttemptCount = storage.GetValue<int>(nameof(AttemptCount));
			ReAttemptCount = storage.GetValue<int>(nameof(ReAttemptCount));
			TimeOutInterval = storage.GetValue<TimeSpan>(nameof(TimeOutInterval));
		}
开发者ID:RakotVT,项目名称:StockSharp,代码行数:14,代码来源:ReConnectionSettings.cs

示例11: Load

		public override void Load(SettingsStorage storage)
		{
			base.Load(storage);

			if (storage.ContainsKey("SelectedLevel1Fields"))
			{
				Level1FieldsCtrl.SelectedFields = storage
					.GetValue<string>("SelectedLevel1Fields")
					.Split(",")
					.Select(s => s.To<Level1Fields>())
					.ToArray();
			}

			FindedChanges.Load(storage.GetValue<SettingsStorage>("FindedChanges"));
		}
开发者ID:jackman0925,项目名称:StockSharp,代码行数:15,代码来源:Level1Pane.xaml.cs

示例12: Load

			public void Load(SettingsStorage storage)
			{
				if (storage.ContainsKey(nameof(Security)))
					Security = ConfigManager.GetService<IEntityRegistry>().Securities.ReadById(storage.GetValue<string>("Security"));

				From = storage.GetValue<DateTime>(nameof(From));
				To = storage.GetValue<DateTime>(nameof(To));

				if (storage.ContainsKey(nameof(Drive)))
					Drive = DriveCache.Instance.GetDrive(storage.GetValue<string>(nameof(Drive)));

				StorageFormat = storage.GetValue<StorageFormats>(nameof(StorageFormat));
			}
开发者ID:bbqchickenrobot,项目名称:StockSharp,代码行数:13,代码来源:AnalyticsPane.xaml.cs

示例13: Load

		public override void Load(SettingsStorage storage)
		{
			base.Load(storage);

			DepthGrid.Load(storage.GetValue<SettingsStorage>("DepthGrid"));
			Depth.SelectedIndex = storage.GetValue<int>("Depth");

			if (storage.ContainsKey("DepthGenerationInterval"))
				DepthGenerationInterval.Value = storage.GetValue<int>("DepthGenerationInterval");

			if (storage.ContainsKey("IsBuildFromOrderLog"))
				IsBuildFromOrderLog.IsChecked = storage.GetValue<bool>("IsBuildFromOrderLog");
		}
开发者ID:carlosaduro,项目名称:StockSharp,代码行数:13,代码来源:DepthPane.xaml.cs

示例14: Load

		public override void Load(SettingsStorage storage)
		{
			base.Load(storage);

			if (storage.ContainsKey("SelectedLevel1Fields"))
			{
				Level1FieldsCtrl.SelectedFields = storage
					.GetValue<string>("SelectedLevel1Fields")
					.Split(",")
					.Select(s => s.To<Level1Fields>())
					.ToArray();
			}

			FindedChanges.Load(storage.GetValue<SettingsStorage>("FindedChanges"));

			var selectedFields = Level1FieldsCtrl.SelectedFields.ToArray();

			foreach (var pair in _columns)
			{
				pair.Value.Visibility = selectedFields.Contains(pair.Key) ? Visibility.Visible : Visibility.Collapsed;
			}
		}
开发者ID:zjxbetter,项目名称:StockSharp,代码行数:22,代码来源:Level1Pane.xaml.cs

示例15:

        void IPersistable.Load(SettingsStorage storage)
        {

            if (storage.ContainsKey("LogMonitor"))
                MonitorControl.Load(storage.GetValue<SettingsStorage>("LogMonitor"));
        }
开发者ID:RakotVT,项目名称:StockSharp,代码行数:6,代码来源:LogsPane.xaml.cs


注:本文中的SettingsStorage.ContainsKey方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。