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


C# ISettingsService.LoadSettings方法代码示例

本文整理汇总了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();
        }
开发者ID:bergziege,项目名称:NME2,代码行数:36,代码来源:MainViewController.cs

示例2: SettingsForm

        public SettingsForm()
        {
            LocalizationService = ServiceLocator.GetInstance<ILocalizationService>();
            settingsService = ServiceLocator.GetInstance<ISettingsService>();
            InitializeComponent();

            settings = settingsService.LoadSettings();

            LocalizationService.LanguageChanged += LanguageChanged;

            BindControls();
            ApplySettings();
            ToogleLanguageControls();

            Localize();
        }
开发者ID:manuelnelson,项目名称:VisualStudioProjectRenamer,代码行数:16,代码来源:SettingsForm.cs

示例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);
            });
        }
开发者ID:Kampfmoehre,项目名称:PokeGuide,代码行数:19,代码来源:MainViewModel.cs

示例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);
        }
开发者ID:manuelnelson,项目名称:VisualStudioProjectRenamer,代码行数:17,代码来源:MainForm.cs


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