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


C# Property.ToString方法代码示例

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


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

示例1: BindDataSource

 private static void BindDataSource(DropDownList list, Property id, object dataSource)
 {
     list.DataSource = dataSource;
     list.DataValueField = id.ToString();
     list.DataTextField = Property.Type.ToString();
     list.DataBind();
     list.Items.Insert(0, "-");
 }
开发者ID:sliplow,项目名称:Skyline,代码行数:8,代码来源:Account.aspx.cs

示例2: getBiggest

        public Card getBiggest(List<Card> cards, Property selectedProp)
        {
            FieldInfo field = typeof(Card).GetField(selectedProp.ToString().ToLower());

            int card1Value = 0;
            int card2Value = 0;

            Func<Card, Card, Card> testBigger = (card1, card2) => {
                return card1Value > card2Value ? card1 : card2;
            };

            return cards.Aggregate((card1, card2) => {

                if(card1 == null || card2 == null){
                    return card1 == null ? card2 : card1;
                }

                card1Value = (int) field.GetValue(card1);
                card2Value = (int) field.GetValue(card2);

                if (isTrumph(card1) && isHead(card2) || isTrumph(card2) && isHead(card1)
                    || !isTrumph(card1) && !isTrumph(card2) && card1Value != card2Value) {
                        return testBigger(card1, card2);
                }

                return card1Value == card2Value ? null : isTrumph(card1) ? card1 : isTrumph(card2) ? card2 : null;
            });
        }
开发者ID:pedroassis,项目名称:SuperTrunfo,代码行数:28,代码来源:TurnService.cs

示例3: ScheduleRemoval

		private void ScheduleRemoval (Property prop, Scheduler.Priority priority)
		{
			if (queryable.ThisScheduler.ContainsByTag (prop.ToString ())) {
				Logger.Log.Debug ("Not adding a Task for already running: {0}", prop.ToString ());
				return;
			}
			
			Scheduler.Task task = queryable.NewRemoveByPropertyTask (prop);
			task.Priority = priority;
			task.SubPriority = 0;
			queryable.ThisScheduler.Add (task);
		}
开发者ID:ArsenShnurkov,项目名称:beagle-1,代码行数:12,代码来源:ThunderbirdIndexer.cs

示例4: ShowImageDetailView

        public void ShowImageDetailView(string detailViewName, int heightOffSet, int widthOffSet, Property property, bool loadFromShape = false)
        {
            Logger.Instance.Log(LogPriority.MIDDLE, this, "[SHAPE EDIT DIALOG] open title + description dialog");
            string speak = "";
            gui_Menu = new GUI_Menu(); //init GUI MENU  
            //create entry for dic
            createDetailView(detailViewName, 0, 48, 120, 12, true);
            detailViewDic[detailViewName].SetVisibility(true);
            //load data from selected Shape     
            if (loadFromShape)
            {
                loadImageData();
            }
            //as default title is selected and show
            activeProperty = property;
            selectedPropertyMenuItem = property;
            setContent(detailViewName, property);
            switch (property)
            {
                case Property.Title:
                    speak = LL.GetTrans("tangram.lector.image_data.title");
                    break;
                case Property.Description:
                    speak = LL.GetTrans("tangram.lector.image_data.desc");
                    break;
            }

            audioRenderer.PlaySoundImmediately(LL.GetTrans("tangram.lector.image_data.generic_property_value", speak, propertiesDic[activeProperty.ToString().ToLower()]));
        }
开发者ID:TUD-INF-IAI-MCI,项目名称:Tangram_Lector_Workstation,代码行数:29,代码来源:ImageData.cs

示例5: SaveBrailleInput

 /// <summary>
 /// Save and Set content of detailView depending on property
 /// </summary>
 /// <param name="property">The property.</param>
 /// <param name="content">The content.</param>
 private void SaveBrailleInput(Property property, string content)
 {
     propertiesDic[property.ToString().ToLower()] = content;
 }
开发者ID:TUD-INF-IAI-MCI,项目名称:Tangram_Lector_Workstation,代码行数:9,代码来源:ImageData.cs

示例6: comunicatePropertiesSwitch

 private void comunicatePropertiesSwitch(Property property, Property previousProperty)
 {
     String command = getAudioForProperty(property);
     activeProperty = property;
     string previousContent = removeInputStr(property, previousProperty); // content of detailView contain inputField
     SaveBrailleInput(previousProperty, previousContent);
     setContent(TITLE_DESC_VIEW_NAME, property);
     // Test, whether property has content, if yes speak it
     string content = propertiesDic[property.ToString().ToLower()];
     if (content.Length != 0)
     {
         //command += " ist " + content;
         command = LL.GetTrans("tangram.lector.image_data.generic_property_value", command, content);
     }
     else
     {
         //command += " eingeben";
         command = LL.GetTrans("tangram.lector.image_data.enter_property", command);
     }
     AudioRenderer.Instance.PlaySoundImmediately(command);
     Logger.Instance.Log(LogPriority.MIDDLE, this, "[SHAPE EDIT DIALOG] show " + property.ToString() + ": " + content);
 }
开发者ID:TUD-INF-IAI-MCI,项目名称:Tangram_Lector_Workstation,代码行数:22,代码来源:ImageData.cs


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