本文整理汇总了C#中ISettingsService.LoadSettings方法的典型用法代码示例。如果您正苦于以下问题:C# ISettingsService.LoadSettings方法的具体用法?C# ISettingsService.LoadSettings怎么用?C# ISettingsService.LoadSettings使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ISettingsService
的用法示例。
在下文中一共展示了ISettingsService.LoadSettings方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: MainViewController
///<summary>
/// Ctor.
///</summary>
///<param name="attachedView"></param>
public MainViewController(IMainView attachedView)
{
_settingsService = new SettingsService();
_settingsService.LoadSettings();
_attachedView = attachedView;
_timer = new Timer { Enabled = true, Interval = _settingsService.CurrentSettings.Interval * 1000 };
_timer.Elapsed += TimerElapsed;
_attachedView.RequestAboutDialog += AttachedViewRequestAboutDialog;
_attachedView.RequestSync += AttachedViewRequestSync;
_attachedView.RequestFsxConnect += AttachedViewRequestFsxConnect;
_attachedView.RequestFscDisconnect += AttachedViewRequestFscDisconnect;
_attachedView.RequestToggleFsxConnectionState += AttachedViewRequestToggleFsxConnectionState;
_attachedView.NewMessageArrived += AttachedViewNewMessageArrived;
_attachedView.TabChanged += AttachedViewTabChanged;
_attachedView.RequestSettingsLoad += AttachedViewRequestSettingsLoad;
_attachedView.RequestSettingsReset += AttachedViewRequestSettingsReset;
_attachedView.RequestSettingsSave += AttachedViewRequestSettingsSave;
//// set object manager
//_synchonisationService.SServerPath = _settingsService.CurrentSettings.ServerPath;
//_synchonisationService.SSimObjectPath = _settingsService.CurrentSettings.SimObjectsPath;
// set operator
Staticfuncs.Serverpath = _settingsService.CurrentSettings.ServerPath;
InitView();
}
示例2: SettingsForm
public SettingsForm()
{
LocalizationService = ServiceLocator.GetInstance<ILocalizationService>();
settingsService = ServiceLocator.GetInstance<ISettingsService>();
InitializeComponent();
settings = settingsService.LoadSettings();
LocalizationService.LanguageChanged += LanguageChanged;
BindControls();
ApplySettings();
ToogleLanguageControls();
Localize();
}
示例3: MainViewModel
/// <summary>
/// Initializes a new instance of the MainViewModel class.
/// </summary>
public MainViewModel(INavigationService navigationService, IDataService dataService, ISettingsService settingsService)
{
_tokenSource = new CancellationTokenSource();
_navigationService = navigationService;
_dataService = dataService;
_settingsService = settingsService;
Messenger.Default.Register<DisplayLanguage>(this, ChangeLanguage);
Task.Factory.StartNew(async () =>
{
Settings settings = await settingsService.LoadSettings();
_cachedVersionId = settings.CurrentVersion.Id;
Messenger.Default.Send<DisplayLanguage>(settings.CurrentLanguage);
});
}
示例4: MainForm
public MainForm()
{
InitializeComponent();
controller = new MainFormController();
LocalizationService = ServiceLocator.GetInstance<ILocalizationService>();
settingsService = ServiceLocator.GetInstance<ISettingsService>();
LocalizationService.LanguageChanged += LanguageChanged;
Localize();
ToogleControls();
SetStatusMessage();
settings = settingsService.LoadSettings();
SetGlobalPaletteMode();
SetLanguage();
controller.UpdateOnStartup(settings);
}