本文整理汇总了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, "-");
}
示例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;
});
}
示例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);
}
示例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()]));
}
示例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;
}
示例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);
}