當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。