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


C# ISettingsManager类代码示例

本文整理汇总了C#中ISettingsManager的典型用法代码示例。如果您正苦于以下问题:C# ISettingsManager类的具体用法?C# ISettingsManager怎么用?C# ISettingsManager使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


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

示例1: Notificator

        public Notificator(IEventLogger eventLogger, ISettingsManager settingsManager)
        {
            _eventLogger = eventLogger;
            _settingsManager = settingsManager;

            var menuItem = new MenuItem(Strings.Exit);
            menuItem.Click += menuItem_Click;
            var contextMenu = new ContextMenu(new[] {menuItem});
            _notifyIcon = new NotifyIcon
            {
                Icon = new Icon("TryIcon.ico"),
                Visible = true,
                BalloonTipTitle = Strings.Caution,
                Text = Strings.Initializing,
                ContextMenu = contextMenu
            };

            var oneRunTimer = new Timer(3000)
            {
                AutoReset = false,
                Enabled = true
            };
            oneRunTimer.Elapsed += _timer_Elapsed; // runs only once after aplication start

            var timer = new Timer(60000)
            {
                AutoReset = true,
                Enabled = true
            };
            timer.Elapsed += _timer_Elapsed;
        }
开发者ID:sarochm,项目名称:ltc,代码行数:31,代码来源:Notificator.cs

示例2: Load

        public IEnumerable<object> Load(ISettingsManager settingsManager)
        {
            var section = settingsManager.GetOrCreateSection(SETTINGS_GUID);

            foreach (var o in fileListLoader.Load(section.GetOrCreateSection(FILE_LISTS_SECTION)))
                yield return o;

            var tgws = new List<SerializedTabGroupWindow>();
            var tgwsHash = new HashSet<string>();
            foreach (var tgwSection in section.SectionsWithName(TABGROUPWINDOW_SECTION)) {
                var tgw = SerializedTabGroupWindow.Load(tgwSection);
                yield return null;
                if (tgwsHash.Contains(tgw.Name))
                    continue;
                tgws.Add(tgw);
            }

            // The files are added to the treeview with a slight delay. Make sure the files have
            // been added to the TV or the node lookup code will fail to find the nodes it needs.
            yield return LoaderConstants.Delay;

            foreach (var o in fileTabSerializer.Restore(tgws))
                yield return o;

            fileTabManager.OnTabsLoaded();
        }
开发者ID:lovebanyi,项目名称:dnSpy,代码行数:26,代码来源:FileTabManagerLoader.cs

示例3: JwtGenerationOptionsFactory

        public JwtGenerationOptionsFactory(
            ISettingsManager settingsManager)
        {
            settingsManager.NotNull(nameof(settingsManager));

            _settingsManager = settingsManager;
        }
开发者ID:c4rm4x,项目名称:C4rm4x.WebApi.Test,代码行数:7,代码来源:JwtGenerationOptionsFactory.cs

示例4: StandardEngine

        public StandardEngine(
            ISettingsManager settingsManager,
            IBranchManager branchManager,
            ICommandLineManager commandLineManager,
            IBannerManager bannerManager,
            IAppearanceManager appearanceManager,
            IErrorManager errorManager,
            IDialogsManager dialogsManager,
            IHelpManager helpManager,
            IAdvancedMenuManager advancedMenuManager,
            IEndpointManager endpointManager
            )
        {
            SettingsManager = settingsManager;
            BranchManager = branchManager;
            BannerManager = bannerManager;
            AppearanceManager = appearanceManager;
            CommandLineManager = commandLineManager;
            ErrorManager = errorManager;
            DialogsManager = dialogsManager;
            HelpManager = helpManager;
            AdvancedMenuManager = advancedMenuManager;
            EndpointManager = endpointManager;

            Identifier = Guid.NewGuid();
        }
开发者ID:jardrake03,项目名称:incert,代码行数:26,代码来源:StandardEngine.cs

示例5: MainViewModel

        public MainViewModel(IScreen screen, ISettingsManager settingsManager, IVersionManager versionManager)
        {
            HostScreen = screen;

            Games = new GamesViewModel(Locator.Current);
            Downloads = new DownloadsViewModel(Locator.Current.GetService<IJobManager>());
            Messsages = new MessagesViewModel(Locator.Current.GetService<IDatabaseManager>(), Locator.Current.GetService<IMessageManager>());
            GotoSettings = ReactiveCommand.CreateAsyncObservable(_ => screen.Router.Navigate.ExecuteAsync(new SettingsViewModel(screen, settingsManager, versionManager, Locator.Current.GetService<IGameManager>())));

            // login status
            settingsManager.WhenAnyValue(sm => sm.AuthenticatedUser)
                .Select(u => u == null ? "Not logged." : $"Logged as {u.Name}")
                .ToProperty(this, x => x.LoginStatus, out _loginStatus);

            // show notice when new version arrives but hide when button was clicked
            versionManager.NewVersionAvailable
                .Where(release => release != null)
                .Subscribe(newRelease => {
                    ShowUpdateNotice = true;
                });
            CloseUpdateNotice.Subscribe(_ => {
                ShowUpdateNotice = false;
            });

            // restart button
            RestartApp.Subscribe(_ => { UpdateManager.RestartApp(); });
        }
开发者ID:freezy,项目名称:vpdb-agent,代码行数:27,代码来源:MainViewModel.cs

示例6: BreakpointListSettings

		BreakpointListSettings(ISettingsManager settingsManager, Lazy<IModuleLoader> moduleLoader, IBreakpointManager breakpointManager) {
			this.settingsManager = settingsManager;
			this.moduleLoader = moduleLoader;
			this.breakpointManager = breakpointManager;
			breakpointManager.OnListModified += BreakpointManager_OnListModified;
			Load();
		}
开发者ID:lovebanyi,项目名称:dnSpy,代码行数:7,代码来源:BreakpointListSettings.cs

示例7: LoadObjectSettings

		protected void LoadObjectSettings(ISettingsManager settingManager, object obj)
		{
			var haveSettingsObjects = obj.GetFlatListObjectsWithInterface<IHaveSettings>();
			foreach (var haveSettingsObject in haveSettingsObjects)
			{
				var entity = haveSettingsObject as Entity;
				if (entity != null && !entity.IsTransient())
				{
					var storedSettings = settingManager.GetObjectSettings(entity.GetType().Name, entity.Id);
					//Merge default settings and stored in db 
					if (haveSettingsObject.Settings != null)
					{
						var resultSettings = new List<SettingEntry>();
						foreach (var setting in haveSettingsObject.Settings)
						{
							var storedSetting = storedSettings.FirstOrDefault(x => x.Name == setting.Name);
							if (storedSetting != null)
							{
								resultSettings.Add(storedSetting);
							}
							else
							{
								resultSettings.Add(setting);
							}
						}
						haveSettingsObject.Settings = resultSettings;
					}
					else
					{
						haveSettingsObject.Settings = storedSettings;
					}
				}
			}
		}
开发者ID:alt-soft,项目名称:vc-community,代码行数:34,代码来源:ServiceBase.cs

示例8: ThemeController

		public ThemeController(Func<string, IThemeService> factory, ISettingsManager manager, string pathForMultipart, string pathForFiles, string defaultThemePath)
		{
			if (factory == null)
			{
				throw new ArgumentNullException("factory");
			}

			if (manager == null)
			{
				throw new ArgumentNullException("manager");
			}

			if (string.IsNullOrEmpty(pathForMultipart))
				throw new ArgumentNullException("pathForMultipart");

			if (string.IsNullOrEmpty(pathForFiles))
				throw new ArgumentNullException("pathForFiles");

			var chosenRepository = manager.GetValue(
				"VirtoCommerce.Content.MainProperties.ThemesRepositoryType",
				string.Empty);

			_pathForMultipart = pathForMultipart;
			_pathForFiles = pathForFiles;
			_defaultThemePath = defaultThemePath;

			var themeService = factory.Invoke(chosenRepository);
			this._themeService = themeService;
		}
开发者ID:n1njab0b,项目名称:vc-community,代码行数:29,代码来源:ThemeController.cs

示例9: NodejsFormattingDialogPage

 public NodejsFormattingDialogPage(string category) : base(category) {
     uint handle;
     string registryRoot;
     var registry = NodejsPackage.Instance.GetService(typeof(SLocalRegistry)) as ILocalRegistry4;
     var regKey = registry.GetLocalRegistryRootEx((uint)__VsLocalRegistryType.RegType_UserSettings, out handle, out registryRoot);
     _settingsManager = (ISettingsManager)NodejsPackage.Instance.GetService(typeof(SVsSettingsPersistenceManager));
 }
开发者ID:paladique,项目名称:nodejstools,代码行数:7,代码来源:NodejsFormattingDialogPage.cs

示例10: WorkerWithSettings

        public WorkerWithSettings(ISettingsManager settingsManager)
        {
            this.settingsManager = settingsManager;

            lastSessionSettingsCommand = new DelegateCommand(OnLastSessionSettings);
            GlobalCommands.LastSessionSettingsCommand.RegisterCommand(lastSessionSettingsCommand);
        }
开发者ID:KiselevKN,项目名称:BootMega,代码行数:7,代码来源:WorkerWithSettings.cs

示例11: WindowsShellViewModel

        public WindowsShellViewModel(
			ISettingsManager settingsManager,
			ISettings settings)
            : base(settings)
        {
            this.settingsManager = settingsManager;
        }
开发者ID:brentedwards,项目名称:Charmed,代码行数:7,代码来源:WindowsShellViewModel.cs

示例12: UserSessionService

		public UserSessionService(ISettingsManager settingsManager, IUserRepository userRepository, IUserSessionRepository userSessionRepository, ISecurityLogService securityLogService)
		{
			_settingsManager = settingsManager;
			_userRepository = userRepository;
			_userSessionRepository = userSessionRepository;
			_securityLogService = securityLogService;
		}
开发者ID:andyliyuze,项目名称:POPForums,代码行数:7,代码来源:UserSessionService.cs

示例13: Initialize

 public override void Initialize()
 {
     base.Initialize();
     m_SettingsManager = Game.Services.GetService<ISettingsManager>();
     m_ArialFont = Game.Services.GetService<IFontManager>().SpriteFont;
     m_SpriteBatch = new SpriteBatch(Game.GraphicsDevice);
 }
开发者ID:BorisBorshevsky,项目名称:MonoGameSpaceInvanders,代码行数:7,代码来源:ScoresBoard.cs

示例14: SetupService

		public SetupService(ISetupRepository setupRepository, IUserService userService, ISettingsManager settingsManager, IProfileService profileService)
		{
			_setupRepository = setupRepository;
			_userService = userService;
			_settingsManager = settingsManager;
			_profileService = profileService;
		}
开发者ID:andyliyuze,项目名称:POPForums,代码行数:7,代码来源:SetupService.cs

示例15: FilteringParameters

 public FilteringParameters(ISettingsManager settingsManager)
 {
     this.settingsManager = settingsManager;
     if (settingsManager.DoValuesExist())
         ReadValuesFromSettings();
     this.InitializeRanges();
 }
开发者ID:DormantDreams,项目名称:video-game-level-scanner,代码行数:7,代码来源:FilteringParameters.cs


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