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


C# Resources.GetString方法代码示例

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


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

示例1: GetStringFromPlugin

 public static string GetStringFromPlugin(Resources pluginRes, string pluginPackage, string stringId)
 {
     int titleId = pluginRes.GetIdentifier(pluginPackage + ":string/" + stringId, null, null);
     string title = null;
     if (titleId != 0)
         title = pluginRes.GetString(titleId);
     return title;
 }
开发者ID:pythe,项目名称:wristpass,代码行数:8,代码来源:PluginDetailsActivity.cs

示例2: PopulateChoiceEntry

		// Initializes a single choice type restriction entry.
		public static void PopulateChoiceEntry (Resources res, RestrictionEntry reSingleChoice)
		{
			String[] choiceEntries = res.GetStringArray (Resource.Array.choice_entry_entries);
			String[] choiceValues = res.GetStringArray (Resource.Array.choice_entry_values);

			if (reSingleChoice.SelectedString == null)
				reSingleChoice.SelectedString =  choiceValues [0];

			reSingleChoice.Title = res.GetString (Resource.String.choice_entry_title);
			reSingleChoice.SetChoiceEntries (choiceEntries);
			reSingleChoice.SetChoiceValues (choiceValues);
			reSingleChoice.Type = RestrictionEntryType.Choice;
		}
开发者ID:89sos98,项目名称:monodroid-samples,代码行数:14,代码来源:GetRestrictionsReceiver.cs

示例3: PopulateMultiEntry

		// Initializes a multi-select type restriction entry.
		public static void PopulateMultiEntry (Resources res, RestrictionEntry reMultiSelect)
		{
			String[] multiEntries = res.GetStringArray (Resource.Array.multi_entry_entries);
			String[] multiValues = res.GetStringArray (Resource.Array.multi_entry_values);

			if (reMultiSelect.GetAllSelectedStrings() == null)
				reMultiSelect.SetAllSelectedStrings (new String[0]);

			reMultiSelect.Title = res.GetString (Resource.String.multi_entry_title);
			reMultiSelect.SetChoiceEntries (multiEntries);
			reMultiSelect.SetChoiceValues (multiValues);
			reMultiSelect.Type = RestrictionEntryType.MultiSelect;
		}
开发者ID:89sos98,项目名称:monodroid-samples,代码行数:14,代码来源:GetRestrictionsReceiver.cs

示例4: PopulateBooleanEntry

		// Initializes a boolean type restriction entry.
		public static void PopulateBooleanEntry (Resources res, RestrictionEntry entry)
		{
			entry.Type = RestrictionEntryType.Boolean;
			entry.Title = res.GetString (Resource.String.boolean_entry_title);
		}
开发者ID:89sos98,项目名称:monodroid-samples,代码行数:6,代码来源:GetRestrictionsReceiver.cs

示例5: GetValue

 public override object GetValue(Resources resources, int resourceId, Type memberType)
 {
     return resources.GetString(resourceId);
 }
开发者ID:mattleibow,项目名称:Genetics,代码行数:4,代码来源:StringGene.cs


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