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


C# Resources.GetStringArray方法代码示例

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


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

示例1: 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

示例2: GetArrayValue

        public override IEnumerable GetArrayValue(Resources resources, int resourceId, Type memberType)
        {
            IEnumerable collection = null;

            // get the type fromthe member
            var elementType = memberType.GetEnumerableElementType();
            if (elementType != null)
            {
                if (elementType == typeof(int))
                    collection = resources.GetIntArray(resourceId);
                else if (elementType == typeof(string))
                    collection = resources.GetStringArray(resourceId);
            }

            // we don't know how to handle collections without a type
            return collection;
        }
开发者ID:mattleibow,项目名称:Genetics,代码行数:17,代码来源:IntegerArrayGene.cs

示例3: GetValue

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

示例4: 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


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