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


C# ApplicationDataContainer.CreateContainer方法代码示例

本文整理汇总了C#中Windows.Storage.ApplicationDataContainer.CreateContainer方法的典型用法代码示例。如果您正苦于以下问题:C# ApplicationDataContainer.CreateContainer方法的具体用法?C# ApplicationDataContainer.CreateContainer怎么用?C# ApplicationDataContainer.CreateContainer使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Windows.Storage.ApplicationDataContainer的用法示例。


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

示例1: SettingsManager

        public SettingsManager(ref MapControl MapMain)
        {
            // Check is the instance doesnt already exist.
            if (Current != null)
            {
                //if there is an instance in the app already present then simply throw an error.
                throw new Exception("Only one settings manager can exist in a App.");
            }

            // Setting the instance to the static instance field.
            Current = this;

            this.MapMain = MapMain;

            ApplicationData.Current.DataChanged += new TypedEventHandler<ApplicationData, object>(DataChangeHandler);

            // Roaming Settings
            RoamingSettings = ApplicationData.Current.RoamingSettings;

            RoamingSettings.CreateContainer("Map", ApplicationDataCreateDisposition.Always);
            RoamingSettings.CreateContainer("Appearance", ApplicationDataCreateDisposition.Always);
            

            // Local Settings
            LocalSettings = ApplicationData.Current.LocalSettings;

            LocalSettings.CreateContainer("Location", ApplicationDataCreateDisposition.Always);
        }
开发者ID:LdwgWffnschmdt,项目名称:CykeMaps,代码行数:28,代码来源:SettingsManager.cs

示例2: SettingsManager

 //-------------------------------------------------------------------------------------
 // Class constructor
 /// <summary>
 /// Class constructor. Scope is internal so external code cannot create instances.
 /// </summary>
 static SettingsManager()
 {
     #if !WINDOWS_PHONE
     // Initialise the _settings object
     _settings = ApplicationData.Current.LocalSettings;
     _settings.CreateContainer("main", ApplicationDataCreateDisposition.Always);
     #endif
 }
开发者ID:huucp,项目名称:DiscorRoboGame,代码行数:13,代码来源:SettingsManager.cs

示例3: CreateEmailProxiesSettings

 internal void CreateEmailProxiesSettings(ApplicationDataContainer localRootContainer)
 {
     if (!localRootContainer.Containers.ContainsKey(projectContainerName))
     {
         localRootContainer.CreateContainer(projectContainerName, ApplicationDataCreateDisposition.Always);
     }
     var emailProxiesSettings = localRootContainer.Containers[projectContainerName];
     CreateIpSettings(emailProxiesSettings);
 }
开发者ID:KeesPolling,项目名称:Popmail,代码行数:9,代码来源:Settings.cs

示例4: CreateIpSettings

 private void CreateIpSettings(ApplicationDataContainer emailProxiesContainer)
 {
     if (!emailProxiesContainer.Containers.ContainsKey(ipContainerName))
     {
         emailProxiesContainer.CreateContainer(ipContainerName, ApplicationDataCreateDisposition.Always);
     }
     var ipSettings = emailProxiesContainer.Containers[ipContainerName].Values;
     ipSettings["MinBufferSize"] = (uint)1024;
     ipSettings["MaxBufferSize"] = (uint)65536;
     ipSettings["LogResponse"] = (bool)true;  //TODO this mist be set to false!!!!
     ipSettings["Timeout"] = (uint)1000;
     }
开发者ID:KeesPolling,项目名称:Popmail,代码行数:12,代码来源:Settings.cs

示例5: WriteSetting

		private static void WriteSetting(ApplicationDataContainer container, string containerName, string name, string value)
		{
			var selectedcontainer = !container.Containers.ContainsKey(containerName)
				? container.CreateContainer(containerName, ApplicationDataCreateDisposition.Always)
				: container.Containers[containerName];

			if (selectedcontainer.Values.ContainsKey(name))
				selectedcontainer.Values[name] = value;
			else
				selectedcontainer.Values.Add(name, value);
		}
开发者ID:0xdeafcafe,项目名称:SnapDotNet,代码行数:11,代码来源:IsolatedStorage.cs

示例6: SaveConnection

        private void SaveConnection(ApplicationDataContainer store, ConnectionOptions conn)
        {
            ApplicationDataContainer connStore;
            if (!store.Containers.TryGetValue("connection", out connStore))
            {
                connStore = store.CreateContainer("connection", ApplicationDataCreateDisposition.Always);
            }

            connStore.Values["scheme"] = conn.Scheme;
            connStore.Values["host"] = conn.Host;
            connStore.Values["port"] = conn.Port;
            connStore.Values["base"] = conn.Base;
            connStore.Values["username"] = conn.Username;
            connStore.Values["password"] = conn.Password;
        }
开发者ID:gleroi,项目名称:selfnet,代码行数:15,代码来源:SelfwinApp.cs


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