本文整理汇总了C#中SettingsStorage类的典型用法代码示例。如果您正苦于以下问题:C# SettingsStorage类的具体用法?C# SettingsStorage怎么用?C# SettingsStorage使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
SettingsStorage类属于命名空间,在下文中一共展示了SettingsStorage类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Save
/// <summary>
/// Save settings.
/// </summary>
/// <param name="storage">Settings storage.</param>
public void Save(SettingsStorage storage)
{
if (_alertSchema == null)
return;
storage.SetValue("AlertSchema", _alertSchema.Save());
}
示例2: Save
public override void Save(SettingsStorage storage)
{
base.Save(storage);
storage.SetValue("PositionsPanel", PositionsPanel.Save());
storage.SetValue("AlertSettings", AlertBtn.Save());
}
示例3: Load
/// <summary>
/// Load settings.
/// </summary>
/// <param name="settings">Settings storage.</param>
public override void Load(SettingsStorage settings)
{
base.Load(settings);
LongMa.LoadNotNull(settings, "LongMa");
ShortMa.LoadNotNull(settings, "ShortMa");
}
示例4: Load
public override void Load(SettingsStorage storage)
{
if (storage == null)
throw new ArgumentNullException(nameof(storage));
_panels.Clear();
var controls = storage.GetValue<SettingsStorage[]>("Controls");
var controlsDict = new Dictionary<string, BaseStudioControl>();
foreach (var settings in controls)
{
try
{
var control = LoadBaseStudioControl(settings);
controlsDict.Add(control.Key, control);
}
catch (Exception excp)
{
this.AddErrorLog(excp);
}
}
var dockLayout = storage.GetValue<string>("Layout");
if (!dockLayout.IsEmpty())
LoadDockLayout(dockLayout, controlsDict);
}
示例5: Save
/// <summary>
/// Save settings.
/// </summary>
/// <param name="settings">Settings storage.</param>
public override void Save(SettingsStorage settings)
{
base.Save(settings);
settings.SetValue("ShortSma", ShortSma.Save());
settings.SetValue("LongSma", LongSma.Save());
}
示例6:
void IPersistable.Load(SettingsStorage storage)
{
Address = storage.GetValue<EndPoint>(nameof(Address));
Login = storage.GetValue<string>(nameof(Login));
Password = storage.GetValue<string>(nameof(Password));
Type = storage.GetValue<ProxyTypes>(nameof(Type));
}
示例7: Load
/// <summary>
/// Загрузить настройки.
/// </summary>
/// <param name="storage">Хранилище настроек.</param>
public void Load(SettingsStorage storage)
{
Rules.AddRange(storage.GetValue<IList<AlertRule>>("Rules"));
AlertType = storage.GetValue<string>("AlertType").To<AlertTypes?>();
Caption = storage.GetValue<string>("Caption");
Message = storage.GetValue<string>("Message");
}
示例8: Save
/// <summary>
/// Сохранить настройки.
/// </summary>
/// <param name="storage">Хранилище настроек.</param>
public void Save(SettingsStorage storage)
{
storage.SetValue("Rules", Rules);
storage.SetValue("AlertType", AlertType.To<string>());
storage.SetValue("Caption", Caption);
storage.SetValue("Message", Message);
}
示例9: Save
/// <summary>
/// Сохранить настройки.
/// </summary>
/// <param name="storage">Хранилище настроек.</param>
public override void Save(SettingsStorage storage)
{
base.Save(storage);
storage.SetValue("Address", Address.To<string>());
storage.SetValue("CustomDateFormat", CustomDateFormat);
}
示例10: Load
/// <summary>
/// Загрузить настройки.
/// </summary>
/// <param name="storage">Хранилище настроек.</param>
public override void Load(SettingsStorage storage)
{
base.Load(storage);
Address = storage.GetValue<Uri>("Address");
CustomDateFormat = storage.GetValue<string>("CustomDateFormat");
}
示例11: Save
/// <summary>
/// Сохранить настройки.
/// </summary>
/// <param name="storage">Хранилище настроек.</param>
public override void Save(SettingsStorage storage)
{
base.Save(storage);
storage.SetValue("Login", Login);
storage.SetValue("Password", Password);
}
示例12: Save
/// <summary>
/// Save settings.
/// </summary>
/// <param name="storage">Settings storage.</param>
public override void Save(SettingsStorage storage)
{
base.Save(storage);
storage.SetValue("Key", Key);
storage.SetValue("Secret", Secret);
}
示例13: Load
/// <summary>
/// Загрузить настройки.
/// </summary>
/// <param name="storage">Хранилище настроек.</param>
public override void Load(SettingsStorage storage)
{
base.Load(storage);
Login = storage.GetValue<string>("Login");
Password = storage.GetValue<SecureString>("Password");
}
示例14: Load
/// <summary>
/// Загрузить настройки.
/// </summary>
/// <param name="storage">Хранилище настроек.</param>
public override void Load(SettingsStorage storage)
{
base.Load(storage);
Key = storage.GetValue<SecureString>("Key");
Secret = storage.GetValue<SecureString>("Secret");
}
示例15: Save
/// <summary>
/// Сохранить настройки.
/// </summary>
/// <param name="settings">Хранилище настроек.</param>
public override void Save(SettingsStorage settings)
{
base.Save(settings);
settings.SetValue("line1", _line1.Save());
settings.SetValue("line2", _line2.Save());
}