コード例 #1
1
ファイル: Notificator.cs プロジェクト: sarochm/ltc
        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;
        }
コード例 #2
0
        public WorkerWithSettings(ISettingsManager settingsManager)
        {
            this.settingsManager = settingsManager;

            lastSessionSettingsCommand = new DelegateCommand(OnLastSessionSettings);
            GlobalCommands.LastSessionSettingsCommand.RegisterCommand(lastSessionSettingsCommand);
        }
コード例 #3
0
        public WindowsShellViewModel(
			ISettingsManager settingsManager,
			ISettings settings)
            : base(settings)
        {
            this.settingsManager = settingsManager;
        }
コード例 #4
0
		public UserSessionService(ISettingsManager settingsManager, IUserRepository userRepository, IUserSessionRepository userSessionRepository, ISecurityLogService securityLogService)
		{
			_settingsManager = settingsManager;
			_userRepository = userRepository;
			_userSessionRepository = userSessionRepository;
			_securityLogService = securityLogService;
		}
コード例 #5
0
 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);
 }
コード例 #6
0
 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));
 }
 public SqlServerCompactErrorLogSource(string connection, IErrorLogFileParser parser, ISettingsManager settingsManager, ILog log)
 {
     Connection = connection;
     _settingsManager = settingsManager;
     _parser = parser;
     _log = log;
 }
コード例 #8
0
 public StatisticCategorySpreadingViewModel(CategorySpreadingDataProvider spreadingDataProvider,
     ISettingsManager settingsManager,
     IMvxMessenger messenger) : base(messenger)
 {
     this.spreadingDataProvider = spreadingDataProvider;
     this.settingsManager = settingsManager;
 }
コード例 #9
0
        private NicoAccessTimer(ISettingsManager smng, Dictionary<string, NicoWaitInfo> baseWaitInfoMap)
        {
            waitInfoMap = new Dictionary<string, NicoWaitInfo>();
            patternMap = new Dictionary<string, List<Regex>>();

            foreach (string timerName in smng.GetItems<string>(SettingsConstants.TIMER_NAME)) {
                string intervalKey = string.Format("{0}_{1}", SettingsConstants.TIMER_INTERVAL_PREFIX, timerName);
                TimeSpan interval = smng.GetItem<TimeSpan>(intervalKey);
                NicoWaitInfo waitInfo;
                NicoWaitInfo baseWaitInfo;
                if (baseWaitInfoMap != null && baseWaitInfoMap.TryGetValue(timerName, out baseWaitInfo)) {
                    waitInfo = new NicoWaitInfo(interval, baseWaitInfo.LastAccess);
                }
                else {
                    waitInfo = new NicoWaitInfo(interval);
                }
                waitInfoMap.Add(timerName, waitInfo);

                List<Regex> patternList = new List<Regex>();
                patternMap.Add(timerName, patternList);
                string patternKey = string.Format("{0}_{1}", SettingsConstants.TIMER_PATTERN_PREFIX, timerName);
                foreach (Regex pattern in smng.GetItems<Regex>(patternKey)) {
                    patternList.Add(pattern);
                }
            }
        }
コード例 #10
0
        /// <summary>
        /// Creates new instance of the form.
        /// </summary>
        /// <param name="settingsManager">
        /// Settings manager which is used to retrieve information about existing profiles.
        /// </param>
        public EditProfilesForm(ISettingsManager settingsManager)
        {
            InitializeComponent();

            _settingsManager = settingsManager;
            PopulateProfilesList();
        }
コード例 #11
0
ファイル: AddIn.cs プロジェクト: gildas/Plantronics
        public void Load(IServiceProvider serviceProvider)
        {
            try
            {
                s_traceContext = (ITraceContext)serviceProvider.GetService(typeof(ITraceContext));

                //must have the icelib sdk license to get the session as a service
                s_session = (Session)serviceProvider.GetService(typeof(Session));
                s_connection = new Connection.Connection(s_session);
            }
            catch (ArgumentNullException)
            {
                s_traceContext.Error("unable to get Icelib Session, is the ICELIB SDK License available?");
                Debug.Fail("unable to get service.  Is the ICELIB SDK licence available?");
                throw;
            }

            s_interactionManager = new InteractionManager(s_session, (IQueueService)serviceProvider.GetService(typeof(IQueueService)), s_traceContext);
            s_statusManager = new CicStatusService(s_session, s_traceContext);
            s_notificationService = (INotificationService)serviceProvider.GetService(typeof(INotificationService));

            s_settingsManager = new SettingsManager();
            s_deviceManager = new DeviceManager(s_traceContext, new SpokesDebugLogger(s_traceContext));

            s_statusChanger = new StatusChanger(s_session, s_statusManager, s_deviceManager, s_settingsManager);
            s_notificationServer = new NotificationServer(s_deviceManager, s_settingsManager, s_notificationService);

            s_hookSwitchManager = new InteractionSyncManager(s_interactionManager, s_deviceManager, (IQueueService)serviceProvider.GetService(typeof(IQueueService)), s_traceContext, s_connection);

            s_outboundEventNotificationService = new OutboundEventNotificationService(s_session, s_statusManager, s_deviceManager, s_traceContext);

            s_traceContext.Always("Plantronics AddIn Loaded");
        }
コード例 #12
0
ファイル: DnSpyLoaderManager.cs プロジェクト: levisre/dnSpy
		DnSpyLoaderManager(IImageManager imageManager, IThemeManager themeManager, ISettingsManager settingsManager, [ImportMany] IEnumerable<Lazy<IDnSpyLoader, IDnSpyLoaderMetadata>> mefLoaders) {
			this.imageManager = imageManager;
			this.themeManager = themeManager;
			this.settingsManager = settingsManager;
			this.loaders = mefLoaders.OrderBy(a => a.Metadata.Order).ToArray();
			this.windowLoader = new WindowLoader(this, imageManager, themeManager, settingsManager, loaders);
		}
        public DefaultSmtpEmailNotificationSendingGateway(ISettingsManager settingsManager)
        {
            if (settingsManager == null)
                throw new ArgumentNullException("settingsManager");

            _settingsManager = settingsManager;
        }
コード例 #14
0
ファイル: ShellViewModel.cs プロジェクト: slodge/Charmed
        public ShellViewModel(
			ISettingsManager settingsManager,
			ISettings settings)
        {
            this.settingsManager = settingsManager;
            this.settings = settings;
        }
コード例 #15
0
		BreakpointListSettings(ISettingsManager settingsManager, Lazy<IModuleLoader> moduleLoader, IBreakpointManager breakpointManager) {
			this.settingsManager = settingsManager;
			this.moduleLoader = moduleLoader;
			this.breakpointManager = breakpointManager;
			breakpointManager.OnListModified += BreakpointManager_OnListModified;
			Load();
		}
コード例 #16
0
ファイル: PackageViewModel.cs プロジェクト: grendello/nuget
        internal PackageViewModel(
            IPackage package,
            string source,
            IMruManager mruManager,
            IUIServices uiServices,
            IPackageEditorService editorService,
            ISettingsManager settingsManager)
        {
            if (package == null) {
                throw new ArgumentNullException("package");
            }
            if (mruManager == null) {
                throw new ArgumentNullException("mruManager");
            }
            if (uiServices == null) {
                throw new ArgumentNullException("uiServices");
            }
            if (editorService == null) {
                throw new ArgumentNullException("editorService");
            }
            if (settingsManager == null) {
                throw new ArgumentNullException("settingsManager");
            }

            _settingsManager = settingsManager;
            _editorService = editorService;
            _uiServices = uiServices;
            _mruManager = mruManager;
            _package = package;
            _packageMetadata = new EditablePackageMetadata(_package);
            PackageSource = source;

            _packageRoot = PathToTreeConverter.Convert(_package.GetFiles().ToList(), this);
        }
コード例 #17
0
ファイル: ServiceBase.cs プロジェクト: alt-soft/vc-community
		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;
					}
				}
			}
		}
コード例 #18
0
ファイル: PluginInvoker.cs プロジェクト: NoxWings/FreePIE
 public PluginInvoker(ISettingsManager settingsManager, Func<Type, IPlugin> pluginFactory, IFileSystem fileSystem, IPaths paths)
 {
     this.settingsManager = settingsManager;
     this.pluginFactory = pluginFactory;
     this.fileSystem = fileSystem;
     this.paths = paths;
 }
コード例 #19
0
		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;
		}
コード例 #20
0
        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();
        }
コード例 #21
0
        public AppearanceManager(ISettingsManager manager)
        {
            _manager = manager;

            DefaultMargin = new Thickness(0, 0, 0, 2);
            DefaultPadding = new Thickness(0, 4, 0, 4);
        }
コード例 #22
0
ファイル: StandardEngine.cs プロジェクト: jardrake03/incert
        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();
        }
コード例 #23
0
        public JwtGenerationOptionsFactory(
            ISettingsManager settingsManager)
        {
            settingsManager.NotNull(nameof(settingsManager));

            _settingsManager = settingsManager;
        }
 public void Setup()
 {
     _webRequestHelper = new Mock<IWebRequestHelper>();
     _fileSystemHelper = new Mock<IFileSystemHelper>();
     _csvParser = new Mock<ICsvParser>();
     _settingsManager = new FakeSettingsManager();
 }
コード例 #25
0
ファイル: MainViewModel.cs プロジェクト: freezy/vpdb-agent
        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(); });
        }
コード例 #26
0
 public FilteringParameters(ISettingsManager settingsManager)
 {
     this.settingsManager = settingsManager;
     if (settingsManager.DoValuesExist())
         ReadValuesFromSettings();
     this.InitializeRanges();
 }
コード例 #27
0
		protected void SaveObjectSettings(ISettingsManager settingManager, object obj)
		{
            var haveSettingsObjects = obj.GetFlatObjectsListWithInterface<IHaveSettings>();

			foreach (var haveSettingsObject in haveSettingsObjects)
			{
				var entity = haveSettingsObject as Entity;

				if (entity != null && !entity.IsTransient())
				{
                    var objectType = entity.GetType().Name;
					var settings = new List<SettingEntry>();

					if (haveSettingsObject.Settings != null)
					{
						//Save settings
						foreach (var setting in haveSettingsObject.Settings)
						{
							setting.ObjectId = entity.Id;
                            setting.ObjectType = objectType;
							settings.Add(setting);
						}
					}

					settingManager.SaveSettings(settings.ToArray());
				}
			}
		}
コード例 #28
0
ファイル: SetupService.cs プロジェクト: andyliyuze/POPForums
		public SetupService(ISetupRepository setupRepository, IUserService userService, ISettingsManager settingsManager, IProfileService profileService)
		{
			_setupRepository = setupRepository;
			_userService = userService;
			_settingsManager = settingsManager;
			_profileService = profileService;
		}
        public SettingsPresenter(ISettingsView view, ISettingsManager settingsManager)
        {
            View = view;
            _settingsManager = settingsManager;

            RegisterEvents();
        }
コード例 #30
0
 public Id3LocalLibraryBase(ISettingsManager settings)
     : base(settings)
 {
 }
コード例 #31
0
ファイル: ResourceProcessor.cs プロジェクト: richross/JabbR
 public ResourceProcessor(ISettingsManager settingsManager, IList <IContentProvider> contentProviders)
 {
     _settingsManager  = settingsManager;
     _contentProviders = contentProviders;
 }
コード例 #32
0
 public PrivateMessageService(IPrivateMessageRepository privateMessageRepo, ISettingsManager settingsManager, ITextParsingService textParsingService)
 {
     _privateMessageRepository = privateMessageRepo;
     _settingsManager          = settingsManager;
     _textParsingService       = textParsingService;
 }
コード例 #33
0
        public SyncController(Func <string, IThemeService> themeFactory, Func <string, IPagesService> pageFactory, ISettingsManager manager)
        {
            if (themeFactory == null)
            {
                throw new ArgumentNullException("factory");
            }

            if (manager == null)
            {
                throw new ArgumentNullException("manager");
            }
            var chosenThemeRepository = manager.GetValue(
                "VirtoCommerce.Content.MainProperties.ThemesRepositoryType",
                string.Empty);

            var chosenPagesRepository = manager.GetValue(
                "VirtoCommerce.Content.MainProperties.PagesRepositoryType",
                string.Empty);

            this._themeService = themeFactory.Invoke(chosenThemeRepository);
            this._pagesService = pageFactory.Invoke(chosenPagesRepository);
        }
コード例 #34
0
 public ShippingMethodsSearchService(Func <IShippingRepository> repositoryFactory, IPlatformMemoryCache platformMemoryCache, IShippingMethodsService shippingMethodsService, ISettingsManager settingsManager)
     : base(repositoryFactory, platformMemoryCache, (ICrudService <ShippingMethod>)shippingMethodsService)
 {
     _settingsManager = settingsManager;
 }
コード例 #35
0
 public ProfilesController(ISecurityService securityService, ISettingsManager settingsManager)
 {
     _securityService = securityService;
     _settingsManager = settingsManager;
 }
コード例 #36
0
 public SettingController(ISettingsManager settingsManager)
 {
     _settingsManager = settingsManager;
 }
コード例 #37
0
 public OldCallController(ICallHistoryRepository callHistoryRepository, ISettingsManager settingsManager)
 {
     _callHistoryRepository = callHistoryRepository;
     _settingsManager       = settingsManager;
 }
コード例 #38
0
 public RoamingSettingsStore(ISettingsManager settingsManager)
 {
     _settingsManager = settingsManager ?? throw new ArgumentNullException(nameof(settingsManager));
 }
コード例 #39
0
ファイル: DataRestoreService.cs プロジェクト: apphost/sscms
 public DataRestoreService(ISettingsManager settingsManager, IConfigRepository configRepository, IDatabaseManager databaseManager)
 {
     _settingsManager  = settingsManager;
     _configRepository = configRepository;
     _databaseManager  = databaseManager;
 }
コード例 #40
0
 protected AbstractKeyboardEffect(IRage rage, ILogger logger, ISettingsManager settingsManager, IColorManager colorManager)
     : base(rage, logger, settingsManager, colorManager)
 {
 }
コード例 #41
0
 public PlatformExportImportManager(UserManager <ApplicationUser> userManager, RoleManager <Role> roleManager, IPermissionsRegistrar permissionsProvider, ISettingsManager settingsManager,
                                    IDynamicPropertyService dynamicPropertyService, IDynamicPropertySearchService dynamicPropertySearchService, ILocalModuleCatalog moduleCatalog, IPlatformMemoryCache memoryCache)
 {
     _dynamicPropertyService       = dynamicPropertyService;
     _userManager                  = userManager;
     _roleManager                  = roleManager;
     _settingsManager              = settingsManager;
     _moduleCatalog                = moduleCatalog;
     _memoryCache                  = memoryCache;
     _permissionsProvider          = permissionsProvider;
     _dynamicPropertySearchService = dynamicPropertySearchService;
 }
コード例 #42
0
 private DesktopApplication(DesktopApplicationController applicationController, IApplicationOptions applicationOptions, ISettingsManager settingsManager)
     : base(applicationController, applicationOptions, settingsManager)
 {
     ApplicationController = applicationController;
     ApplicationOptions    = applicationOptions;
 }
コード例 #43
0
ファイル: StatisticViewModel.cs プロジェクト: Simcon/MoneyFox
 /// <summary>
 ///     Creates a StatisticViewModel Object and passes the first and last day of the current month
 ///     as a start and end date.
 /// </summary>
 protected StatisticViewModel(IMvxMessenger messenger, ISettingsManager settingsManager, IMvxLogProvider logProvider, IMvxNavigationService navigationService)
     : this(DateTime.Today.GetFirstDayOfMonth(), DateTime.Today.GetLastDayOfMonth(), messenger, settingsManager, logProvider, navigationService)
 {
 }
コード例 #44
0
 public PlatformExportImportController(IPlatformExportImportManager platformExportManager, IPushNotificationManager pushNotifier, IBlobStorageProvider blobStorageProvider, IBlobUrlResolver blobUrlResolver, ISettingsManager settingManager, IUserNameResolver userNameResolver)
 {
     _platformExportManager = platformExportManager;
     _pushNotifier          = pushNotifier;
     _blobStorageProvider   = blobStorageProvider;
     _blobUrlResolver       = blobUrlResolver;
     _settingsManager       = settingManager;
     _userNameResolver      = userNameResolver;
 }
コード例 #45
0
 public OpenFileEditorAssociationSettings([ImportMany] IEditor[] editors, ISettingsManager settingsManager, IFileDefinitionManager fileDefinitionManager) :
     base(editors, fileDefinitionManager, settingsManager)
 {
 }
コード例 #46
0
 private ReminderSettingsViewModel CreateViewModel(ISaveReminderSettingsCommand saveReminderSettingsCommand = null, ISettingsManager settingsManager = null)
 {
     saveReminderSettingsCommand = saveReminderSettingsCommand ?? Substitute.For <ISaveReminderSettingsCommand>();
     settingsManager             = settingsManager ?? Substitute.For <ISettingsManager>();
     return(new ReminderSettingsViewModel(saveReminderSettingsCommand, settingsManager));
 }
コード例 #47
0
 public IdentityController(ILoginLinkFactory loginLinkFactory, IStateHashingService stateHashingService, ISettingsManager settingsManager, IFacebookCallbackProcessor facebookCallbackProcessor, IGoogleCallbackProcessor googleCallbackProcessor, IMicrosoftCallbackProcessor microsoftCallbackProcessor, IOAuth2JwtCallbackProcessor oAuth2JwtCallbackProcessor, IExternalUserAssociationManager externalUserAssociationManager, IUserService userService, IExternalLoginTempService externalLoginTempService, IUserRetrievalShim userRetrievalShim, ISecurityLogService securityLogService)
 {
     _loginLinkFactory               = loginLinkFactory;
     _stateHashingService            = stateHashingService;
     _settingsManager                = settingsManager;
     _facebookCallbackProcessor      = facebookCallbackProcessor;
     _googleCallbackProcessor        = googleCallbackProcessor;
     _microsoftCallbackProcessor     = microsoftCallbackProcessor;
     _oAuth2JwtCallbackProcessor     = oAuth2JwtCallbackProcessor;
     _externalUserAssociationManager = externalUserAssociationManager;
     _userService = userService;
     _externalLoginTempService = externalLoginTempService;
     _userRetrievalShim        = userRetrievalShim;
     _securityLogService       = securityLogService;
 }
コード例 #48
0
 public AzureContentBlobStorageProviderFactory(IOptions <AzureContentBlobOptions> options, IOptions <PlatformOptions> platformOptions, ISettingsManager settingsManager)
 {
     _options         = options.Value;
     _platformOptions = platformOptions;
     _settingsManager = settingsManager;
 }
コード例 #49
0
ファイル: AdminController.cs プロジェクト: ellaisys/POPForums
 public AdminController(IUserService userService, IProfileService profileService, ISettingsManager settingsManager, ICategoryService categoryService, IForumService forumService, ISearchService searchService, ISecurityLogService securityLogService, IErrorLog errorLog, IBanService banService, IModerationLogService modLogService, IIPHistoryService ipHistoryService, IImageService imageService, IMailingListService mailingListService, IEventDefinitionService eventDefinitionService, IAwardDefinitionService awardDefinitionService, IEventPublisher eventPublisher, IUserRetrievalShim userRetrievalShim, IServiceHeartbeatService serviceHeartbeat)
 {
     _userService            = userService;
     _profileService         = profileService;
     _settingsManager        = settingsManager;
     _categoryService        = categoryService;
     _forumService           = forumService;
     _searchService          = searchService;
     _securityLogService     = securityLogService;
     _errorLogService        = errorLog;
     _banService             = banService;
     _moderationLogService   = modLogService;
     _ipHistoryService       = ipHistoryService;
     _imageService           = imageService;
     _mailingListService     = mailingListService;
     _eventDefinitionService = eventDefinitionService;
     _awardDefinitionService = awardDefinitionService;
     _eventPublisher         = eventPublisher;
     _userRetrievalShim      = userRetrievalShim;
     _serviceHeartbeat       = serviceHeartbeat;
 }
コード例 #50
0
 protected EditorFileAssociationSettings(IEditor[] editors, IFileDefinitionManager fileDefinitionManager, ISettingsManager settings)
     : base(settings)
 {
     SettingsChanged      += EditorFileAssociationSettings_SettingsChanged;
     Editors               = editors;
     FileDefinitionManager = fileDefinitionManager;
 }
 public FileSystemContentBlobStorageProvider(IOptions <FileSystemContentBlobOptions> options, IOptions <PlatformOptions> platformOptions, ISettingsManager settingsManager)
     : base(options, platformOptions, settingsManager)
 {
 }
コード例 #52
0
ファイル: ForumService.cs プロジェクト: monoskinu/POPForums
 public ForumService(IForumRepository forumRepository, ITopicRepository topicRepository, IPostRepository postRepository, ICategoryRepository categoryRepository, IProfileRepository profileRepository, ITextParsingService textParsingService, ISettingsManager settingsManager, ILastReadService lastReadService, IEventPublisher eventPublisher, IBroker broker)
 {
     _forumRepository    = forumRepository;
     _topicRepository    = topicRepository;
     _postRepository     = postRepository;
     _categoryRepository = categoryRepository;
     _profileRepository  = profileRepository;
     _settingsManager    = settingsManager;
     _textParsingService = textParsingService;
     _lastReadService    = lastReadService;
     _eventPublisher     = eventPublisher;
     _broker             = broker;
 }
コード例 #53
0
ファイル: App.xaml.cs プロジェクト: minkione/win.HideezClient
        protected override async void OnStartup(StartupEventArgs e)
        {
            base.OnStartup(e);

            InitializeDIContainer();

            // Init settings
            ApplicationSettings settings = null;
            ISettingsManager <ApplicationSettings> appSettingsManager = Container.Resolve <ISettingsManager <ApplicationSettings> >();

            try
            {
                var appSettingsDirectory = Path.GetDirectoryName(appSettingsManager.SettingsFilePath);
                if (!Directory.Exists(appSettingsDirectory))
                {
                    Directory.CreateDirectory(appSettingsDirectory);
                }

                settings = await appSettingsManager.LoadSettingsAsync().ConfigureAwait(true);

                // Init localization
                var culture = new CultureInfo(settings.SelectedUiLanguage);
                TranslationSource.Instance.CurrentCulture = culture;
                Thread.CurrentThread.CurrentCulture       = culture;
                Thread.CurrentThread.CurrentUICulture     = culture;
            }
            catch (Exception exp)
            {
                var sb = new StringBuilder();
                sb.AppendLine();
                sb.AppendLine("Unexpected Error 1 in App.Application_Startup()");
                sb.AppendLine($"   Message:{exp.Message}");
                sb.AppendLine($"StackTrace:{exp.StackTrace}");
                sb.AppendLine();
                _log.WriteLine(sb.ToString(), LogErrorSeverity.Error);
            }

            // Due to implementation constraints, taskbar icon must be instantiated as late as possible
            Container.RegisterInstance(FindResource("TaskbarIcon") as TaskbarIcon, new ContainerControlledLifetimeManager());
            Container.Resolve <ITaskbarIconManager>();
            _log.WriteLine("Resolve DI container");
            _startupHelper      = Container.Resolve <IStartupHelper>();
            _workstationManager = Container.Resolve <IWorkstationManager>();

            _metaMessenger = Container.Resolve <IMetaPubSub>();

            _metaMessenger.Subscribe <ConnectedToServerEvent>(OnConnectedToServer);

            _serviceWatchdog = Container.Resolve <IServiceWatchdog>();
            _serviceWatchdog.Start();
            _deviceManager         = Container.Resolve <IDeviceManager>();
            _userActionHandler     = Container.Resolve <UserActionHandler>();
            _hotkeyManager         = Container.Resolve <IHotkeyManager>();
            _hotkeyManager.Enabled = true;
            _buttonManager         = Container.Resolve <IButtonManager>();
            _buttonManager.Enabled = true;
            _messageWindow         = Container.Resolve <MessageWindow>();
            Container.Resolve <IProximityLockManager>();
            Container.Resolve <IVaultLowBatteryMonitor>();

            SystemEvents.SessionSwitch += SystemEvents_SessionSwitch;


            // This will create an instance of password manager view model and allow handling of "Add new account" user action
            // It is required for subscribtion of PasswordManagerViewModel to the "AddAccountForApp" message
            // Note: PasswordManagerViewModel is not required for simplified UI
            Container.Resolve <PasswordManagerViewModel>();

            // Public Suffix list loading and updating may take some time (more than 8000 entries)
            // Better to load it before its required (for main domain extraction)
            await Task.Run(URLHelper.PreloadPublicSuffixAsync);

            // Handle first launch
            if (settings.IsFirstLaunch)
            {
                OnFirstLaunch();

                settings.IsFirstLaunch = false;
                appSettingsManager.SaveSettings(settings);
            }

            _windowsManager = Container.Resolve <IWindowsManager>();
            await _windowsManager.InitializeMainWindowAsync();

            await _metaMessenger.TryConnectToServer("HideezServicePipe");
        }
コード例 #54
0
 public SettingsSecurityViewModel(ISettingsManager settingsManager, IPasswordStorage passwordStorage, IDialogService dialogService)
 {
     this.settingsManager = settingsManager;
     this.passwordStorage = passwordStorage;
     this.dialogService   = dialogService;
 }
コード例 #55
0
 public IndexingJobs(IndexDocumentConfiguration[] documentsConfigs, IIndexingManager indexingManager, ISettingsManager settingsManager,
                     IndexProgressHandler progressHandler, IIndexingInterceptor[] interceptors = null)
 {
     _documentsConfigs = documentsConfigs;
     _indexingManager  = indexingManager;
     _settingsManager  = settingsManager;
     _progressHandler  = progressHandler;
     _interceptors     = interceptors;
 }
コード例 #56
0
ファイル: AvaTaxImpl.cs プロジェクト: alt-soft/vc-community
 public AvaTaxImpl(string username, string password, string serviceUrl, string companyCode, string isEnabled, ISettingsManager settingsManager)
 {
     _username        = username;
     _password        = password;
     _serviceUrl      = serviceUrl;
     _companyCode     = companyCode;
     _isEnabled       = isEnabled;
     _settingsManager = settingsManager;
 }
コード例 #57
0
 public ModulesController(IModuleCatalog moduleCatalog, IModuleInstaller moduleInstaller, IPushNotificationManager pushNotifier, IUserNameResolver userNameResolver, ISettingsManager settingsManager)
 {
     _moduleCatalog    = moduleCatalog;
     _moduleInstaller  = moduleInstaller;
     _pushNotifier     = pushNotifier;
     _userNameResolver = userNameResolver;
     _settingsManager  = settingsManager;
 }
コード例 #58
0
 public AccountController(IUserService userService, IProfileService profileService, INewAccountMailer newAccountMailer, ISettingsManager settingsManager, IPostService postService, ITopicService topicService, IForumService forumService, ILastReadService lastReadService, IClientSettingsMapper clientSettingsMapper, IUserEmailer userEmailer, IImageService imageService, IFeedService feedService, IUserAwardService userAwardService, IExternalUserAssociationManager externalUserAssociationManager, IUserRetrievalShim userRetrievalShim, IExternalLoginRoutingService externalLoginRoutingService, IExternalLoginTempService externalLoginTempService, IConfig config, IReCaptchaService reCaptchaService)
 {
     _userService                    = userService;
     _settingsManager                = settingsManager;
     _profileService                 = profileService;
     _newAccountMailer               = newAccountMailer;
     _postService                    = postService;
     _topicService                   = topicService;
     _forumService                   = forumService;
     _lastReadService                = lastReadService;
     _clientSettingsMapper           = clientSettingsMapper;
     _userEmailer                    = userEmailer;
     _imageService                   = imageService;
     _feedService                    = feedService;
     _userAwardService               = userAwardService;
     _externalUserAssociationManager = externalUserAssociationManager;
     _userRetrievalShim              = userRetrievalShim;
     _externalLoginRoutingService    = externalLoginRoutingService;
     _externalLoginTempService       = externalLoginTempService;
     _config           = config;
     _reCaptchaService = reCaptchaService;
 }
コード例 #59
0
 public BeiaDeviceDriverSpeakerStreamSession(ISettingsManager settingsManager, BeiaDeviceDriverConnectionManager connectionManager, Guid sessionId, string deviceId, Guid streamId) :
     base(settingsManager, connectionManager, sessionId, deviceId, streamId)
 {
     // TODO: Set Channel to correct channel number
     Channel = 1;
 }
コード例 #60
-1
ファイル: Settings.cs プロジェクト: MobileEssentials/clide
 /// <summary>
 /// Initializes a new instance of the <see cref="Settings"/> class.
 /// </summary>
 /// <param name="manager">The settings manager that will read and save data for this instance.</param>
 public Settings(ISettingsManager manager)
 {
     this.tracer = Tracer.Get(this.GetType());
     this.manager = manager;
     this.manager.Read(this);
     this.IsInitialized = false;
 }