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


C# IPreferences类代码示例

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


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

示例1: StringSequenceFeedSourceStore

        /// <summary>
        /// Initializes a new instance of the StringSequenceFeedSourceStore class.
        /// </summary>
        /// <param name="preferences">IStringSequenceStore instance.</param>
        /// <param name="filterTag">Gallery filter tag for the feed sources.</param>
        public StringSequenceFeedSourceStore(IPreferences preferences, string filterTag)
            : base(preferences)
        {
            _filterTag = filterTag;

            _stringSequenceStore = new StringSequenceStore(this.Preferences);
        }
开发者ID:Newtopian,项目名称:nuget,代码行数:12,代码来源:StringSequenceFeedSourceStore.cs

示例2: BackendManager

        /// <summary>
        /// Initializes a new instance of the
        /// <see cref="Tasque.Core.BackendManager"/> class.
        /// </summary>
        /// <param name='preferences'>
        /// Preferences.
        /// </param>
        /// <exception cref="T:System.ArgumentNullException">
        /// thrown when preferences is <c>null</c>.
        /// </exception>
        public BackendManager(IPreferences preferences)
        {
            manager = new InternalBackendManager (preferences);

            // setup backend manager for AllList
            Tasque.Utils.AllList.SetBackendManager (this);
        }
开发者ID:GNOME,项目名称:tasque,代码行数:17,代码来源:BackendManager.cs

示例3: RecentFilesProvider

		public RecentFilesProvider (IPreferences prefs)
		{
			NumRecentDocs = prefs.Get<int> ("NumRecentDocs", 7);
			
			RefreshRecentDocs ();
			Gtk.RecentManager.Default.Changed += delegate { RefreshRecentDocs (); };
		}
开发者ID:Aurora-and-Equinox,项目名称:docky,代码行数:7,代码来源:RecentFilesProvider.cs

示例4: RenderPackageFactoryViewModel

 public RenderPackageFactoryViewModel(IPreferences preferenceSettings)
 {
     this.factory = new HelixRenderPackageFactory()
     {
         TessellationParameters = { ShowEdges = preferenceSettings.ShowEdges }
     };
 }
开发者ID:norbertzsiros,项目名称:Dynamo,代码行数:7,代码来源:RenderPackageFactoryViewModel.cs

示例5: ConnectionManager

 public ConnectionManager(IPreferences preferences, IPowerManager powerManager, IConnectionInfo connectionInfo, IBlackoutTime blackoutTime)
 {
     Preferences = preferences;
     PowerManager = powerManager;
     ConnectionInfo = connectionInfo;
     BlackoutTime = blackoutTime;
 }
开发者ID:B2MSolutions,项目名称:reyna-net45,代码行数:7,代码来源:ConnectionManager.cs

示例6: StartDynamo

 /// <summary>
 /// Enables starting Dynamo with a mock IUpdateManager
 /// </summary>
 /// <param name="updateManager"></param>
 /// <param name="watchHandler"></param>
 /// <param name="preferences"></param>
 /// <param name="visualizationManager"></param>
 protected void StartDynamo(IUpdateManager updateManager, ILogger logger, IWatchHandler watchHandler, IPreferences preferences, IVisualizationManager visualizationManager)
 {
     //create a new instance of the ViewModel
     Controller = new DynamoController(Context.NONE, updateManager, logger, watchHandler, preferences);
     Controller.DynamoViewModel = new DynamoViewModel(Controller, null);
     DynamoController.IsTestMode = true;
     Controller.VisualizationManager = new VisualizationManager();
 }
开发者ID:algobasket,项目名称:Dynamo,代码行数:15,代码来源:DynamoUnitTest.cs

示例7: Connection

		public Connection (IPreferences preferences)
		{
			if (null == preferences) {
				throw new ArgumentNullException ("preferences");
			}
			this.preferences = preferences;
			this.cookies = new CookieCollection ();
		}
开发者ID:guadalinex-archive,项目名称:guadalinex-v6,代码行数:8,代码来源:Connection.cs

示例8: NuGetFeedSourceStore

 public NuGetFeedSourceStore(IPreferences preferences)
     : base(preferences)
 {
     _packageSourceProvider = new PackageSourceProvider(
         // Do not load user settings or machine wide settings for WebMatrix 'nuget.org' feed
         // In other words, pass all null to LoadDefaultSettings
         Settings.LoadDefaultSettings(null, null, null),
         defaultSources: new[] { new PackageSource("https://www.nuget.org/api/v2", Resources.NuGet_PackageSourceName) });
 }
开发者ID:Newtopian,项目名称:nuget,代码行数:9,代码来源:NuGetFeedSourceStore.cs

示例9: GetPreferences

        public static void GetPreferences(this ModbusAdaptersViewModel modbusAdaptersViewModel, IPreferences preferences, string key)
        {
            var selectedPort = modbusAdaptersViewModel.SelectedPort;

            if (selectedPort != null)
            {
                preferences[key] = selectedPort;
            }
        }
开发者ID:CaptiveAire,项目名称:ModbusRegisterViewer,代码行数:9,代码来源:ModbusAdapatersViewModelExtensions.cs

示例10: ScanAllPackageDirectories

 private void ScanAllPackageDirectories(IPreferences preferences)
 { 
     foreach (var dir in 
         Directory.EnumerateDirectories(RootPackagesDirectory, "*", SearchOption.TopDirectoryOnly))
     {
         var pkg = ScanPackageDirectory(dir);
         if (preferences.PackageDirectoriesToUninstall.Contains(dir)) pkg.MarkForUninstall(preferences);
     }
 }
开发者ID:whztt07,项目名称:Dynamo,代码行数:9,代码来源:PackageLoader.cs

示例11: Load

 public void Load(IPreferences preferences, IPathManager pathManager)
 {
     // Load Packages
     PackageLoader.DoCachedPackageUninstalls(preferences);
     PackageLoader.LoadAll(new LoadPackageParams
     {
         Preferences = preferences,
         PathManager = pathManager
     });
 }
开发者ID:JinWooShin,项目名称:Dynamo,代码行数:10,代码来源:PackageManagerExtension.cs

示例12: StartupParams

 /// <summary>
 /// Initializes a new instance of the <see cref="StartupParams"/> class.
 /// </summary>
 /// <param name="provider"><see cref="IAuthProvider"/> for DynamoModel</param>
 /// <param name="pathManager"><see cref="IPathManager"/> for DynamoModel</param>
 /// <param name="libraryLoader"><see cref="ILibraryLoader"/> for DynamoModel</param>
 /// <param name="customNodeManager"><see cref="ICustomNodeManager"/> for DynamoModel</param>
 /// <param name="dynamoVersion"><see cref="Version"/> for DynamoModel</param>
 /// <param name="preferences"><see cref="IPreferences"/> for DynamoModel</param>
 public StartupParams(IAuthProvider provider, IPathManager pathManager,
     ILibraryLoader libraryLoader, ICustomNodeManager customNodeManager,
     Version dynamoVersion, IPreferences preferences)
 {
     this.authProvider = provider;
     this.pathManager = pathManager;
     this.libraryLoader = libraryLoader;
     this.customNodeManager = customNodeManager;
     this.dynamoVersion = dynamoVersion;
     this.preferences = preferences;
 }
开发者ID:sh4nnongoh,项目名称:Dynamo,代码行数:20,代码来源:StartupParams.cs

示例13: InternalBackendManager

        public InternalBackendManager(IPreferences preferences)
        {
            if (preferences == null)
                throw new ArgumentNullException ("preferences");
            this.preferences = preferences;

            availableBackendNodes = AddinManager
                .GetExtensionNodes<BackendNode> (typeof(IBackend));

            taskLists = new TaskListCollection ();
        }
开发者ID:GNOME,项目名称:tasque,代码行数:11,代码来源:InternalBackendManager.cs

示例14: ApplyPreferences

        public static void ApplyPreferences(this ModbusAdaptersViewModel modbusAdaptersViewModel, IPreferences preferences, string key)
        {
            var displayName = preferences[key];

            var item = modbusAdaptersViewModel.Ports.FirstOrDefault(a => string.Compare(a, displayName, true) == 0);

            if (item != null)
            {
                modbusAdaptersViewModel.SelectedPort = item;
            }
        }
开发者ID:CaptiveAire,项目名称:ModbusRegisterViewer,代码行数:11,代码来源:ModbusAdapatersViewModelExtensions.cs

示例15: Initialize

		public void Initialize (IPreferences preferences)
		{
			if (preferences == null)
				throw new ArgumentNullException ("preferences");
			this.preferences = preferences;

			// *************************************
			// AUTHENTICATION to Remember The Milk
			// *************************************
			string authToken = preferences.Get (PreferencesKeys.AuthTokenKey);
			if (authToken != null) {
				Logger.Debug ("Found AuthToken, checking credentials...");
				try {
					Rtm = new RtmNet.Rtm (ApiKey, SharedSecret, authToken);
					rtmAuth = Rtm.AuthCheckToken (authToken);
					Timeline = Rtm.TimelineCreate ();
					Logger.Debug ("RTM Auth Token is valid!");
					Logger.Debug ("Setting configured status to true");
					IsConfigured = true;
				} catch (RtmNet.RtmApiException e) {
					preferences.Set (PreferencesKeys.AuthTokenKey, null);
					preferences.Set (PreferencesKeys.UserIdKey, null);
					preferences.Set (PreferencesKeys.UserNameKey, null);
					Rtm = null;
					rtmAuth = null;
					Logger.Error ("Exception authenticating, reverting "
					              + e.Message);
				} catch (RtmNet.ResponseXmlException e) {
					Rtm = null;
					rtmAuth = null;
					Logger.Error ("Cannot parse RTM response. " +
						"Maybe the service is down. " + e.Message);
				} catch (RtmNet.RtmWebException e) {
					Rtm = null;
					rtmAuth = null;
					Logger.Error ("Not connected to RTM, maybe proxy: #{0}",
					              e.Message);
				} catch (System.Net.WebException e) {
					Rtm = null;
					rtmAuth = null;
					Logger.Error ("Problem connecting to internet: #{0}",
					              e.Message);
				}
			}

			if (Rtm == null) {
				Rtm = new RtmNet.Rtm (ApiKey, SharedSecret);
				if (NeedsConfiguration != null)
					NeedsConfiguration (this, EventArgs.Empty);
				return;
			}

			FinishInitialization ();
		}
开发者ID:GNOME,项目名称:tasque,代码行数:54,代码来源:RtmBackend.cs


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