本文整理汇总了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;
}
示例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();
}
示例3: JwtGenerationOptionsFactory
public JwtGenerationOptionsFactory(
ISettingsManager settingsManager)
{
settingsManager.NotNull(nameof(settingsManager));
_settingsManager = settingsManager;
}
示例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();
}
示例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(); });
}
示例6: BreakpointListSettings
BreakpointListSettings(ISettingsManager settingsManager, Lazy<IModuleLoader> moduleLoader, IBreakpointManager breakpointManager) {
this.settingsManager = settingsManager;
this.moduleLoader = moduleLoader;
this.breakpointManager = breakpointManager;
breakpointManager.OnListModified += BreakpointManager_OnListModified;
Load();
}
示例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;
}
}
}
}
示例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;
}
示例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));
}
示例10: WorkerWithSettings
public WorkerWithSettings(ISettingsManager settingsManager)
{
this.settingsManager = settingsManager;
lastSessionSettingsCommand = new DelegateCommand(OnLastSessionSettings);
GlobalCommands.LastSessionSettingsCommand.RegisterCommand(lastSessionSettingsCommand);
}
示例11: WindowsShellViewModel
public WindowsShellViewModel(
ISettingsManager settingsManager,
ISettings settings)
: base(settings)
{
this.settingsManager = settingsManager;
}
示例12: UserSessionService
public UserSessionService(ISettingsManager settingsManager, IUserRepository userRepository, IUserSessionRepository userSessionRepository, ISecurityLogService securityLogService)
{
_settingsManager = settingsManager;
_userRepository = userRepository;
_userSessionRepository = userSessionRepository;
_securityLogService = securityLogService;
}
示例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);
}
示例14: SetupService
public SetupService(ISetupRepository setupRepository, IUserService userService, ISettingsManager settingsManager, IProfileService profileService)
{
_setupRepository = setupRepository;
_userService = userService;
_settingsManager = settingsManager;
_profileService = profileService;
}
示例15: FilteringParameters
public FilteringParameters(ISettingsManager settingsManager)
{
this.settingsManager = settingsManager;
if (settingsManager.DoValuesExist())
ReadValuesFromSettings();
this.InitializeRanges();
}