本文整理汇总了C#中ISettingsManager类的典型用法代码示例。如果您正苦于以下问题:C# ISettingsManager类的具体用法?C# ISettingsManager怎么用?C# ISettingsManager使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
ISettingsManager类属于命名空间,在下文中一共展示了ISettingsManager类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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
示例16: PluginInvoker
public PluginInvoker(ISettingsManager settingsManager, Func<Type, IPlugin> pluginFactory, IFileSystem fileSystem, IPaths paths)
{
this.settingsManager = settingsManager;
this.pluginFactory = pluginFactory;
this.fileSystem = fileSystem;
this.paths = paths;
}
开发者ID:NoxWings,项目名称:FreePIE,代码行数:7,代码来源:PluginInvoker.cs
示例17: SaveObjectSettings
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());
}
}
}
开发者ID:rajendra1809,项目名称:VirtoCommerce,代码行数:28,代码来源:ServiceBase.cs
示例18: PackageViewModel
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);
}
开发者ID:grendello,项目名称:nuget,代码行数:34,代码来源:PackageViewModel.cs
示例19: ShellViewModel
public ShellViewModel(
ISettingsManager settingsManager,
ISettings settings)
{
this.settingsManager = settingsManager;
this.settings = settings;
}
开发者ID:slodge,项目名称:Charmed,代码行数:7,代码来源:ShellViewModel.cs
示例20: AppearanceManager
public AppearanceManager(ISettingsManager manager)
{
_manager = manager;
DefaultMargin = new Thickness(0, 0, 0, 2);
DefaultPadding = new Thickness(0, 4, 0, 4);
}
开发者ID:jardrake03,项目名称:incert,代码行数:7,代码来源:AppearanceManager.cs
注:本文中的ISettingsManager类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论