本文整理汇总了C#中System.Windows.Documents.List.ToString方法的典型用法代码示例。如果您正苦于以下问题:C# List.ToString方法的具体用法?C# List.ToString怎么用?C# List.ToString使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类System.Windows.Documents.List
的用法示例。
在下文中一共展示了List.ToString方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: IconButton_Okay_Click
private void IconButton_Okay_Click(object sender, EventArgs e)
{
var newName = NewNameBox.Text.Trim();
IList<string> badChars = new List<string>();
if (newName.Equals(string.Empty))
{
return;
}
if (newName.Equals(_actionable.DisplayName))
{
NavigateOnSuccess(Utils.CreateActionableFromPath(_actionable.Path));
return;
}
else if (!FileUtils.IsValidFileName(newName, out badChars))
{
MessageBox.Show("You used the following invalid characters: " + badChars.ToString(), "Invalid characters", MessageBoxButton.OK);
return;
}
else if (!FileUtils.IsUniqueFileName(newName, _actionable.Name, _actionable.Path.Parent.PathString))
{
MessageBox.Show("An item with the same name already exists in that location.\n\nNote that names are case-insensitive.", "Invalid name", MessageBoxButton.OK);
return;
}
else if (newName.Equals("."))
{
MessageBox.Show("The name \".\" is an invalid file name.", "Invalid name", MessageBoxButton.OK);
return;
}
else if (newName.StartsWith("."))
{
var r = MessageBox.Show("Items whose names start with '.' are hidden. You can enable showing hidden files in the application's settings.", "Hidden file", MessageBoxButton.OKCancel);
if (r == MessageBoxResult.Cancel)
return;
}
try
{
var act = _actionable.Rename(newName);
NavigateOnSuccess(act);
}
catch (Exception ex)
{
return;
}
}
示例2: bw_RunWorkerCompletedSchueler
private void bw_RunWorkerCompletedSchueler(object sender, RunWorkerCompletedEventArgs e)
{
JavaScriptSerializer json_serializer = new JavaScriptSerializer();
Schueler[] schueler = (Schueler[])json_serializer.Deserialize<Schueler[]>((String)e.Result);
List<Schueler> content = new List<Schueler>(schueler);
Console.WriteLine(content.ToString());
cmbSchueler.ItemsSource = content;
}
示例3: bw_RunWorkerCompletedRatings
private void bw_RunWorkerCompletedRatings(object sender, RunWorkerCompletedEventArgs e)
{
JavaScriptSerializer json_serializer = new JavaScriptSerializer();
StandRating[] staendeR = (StandRating[])json_serializer.Deserialize<StandRating[]>((String)e.Result);
List<StandRating> content = new List<StandRating>(staendeR);
currentStand.standratings = content;
Console.WriteLine("Staende: " + content.ToString());
gridRatings.ItemsSource = content;
lblMessage.Content = content.Count + " Ratings Loaded";
if(gridRatings.Items.Count != 0)
{
calcAvgRatings();
}
else
{
btnResetRatings.IsEnabled = false;
lblMessage.Content = "Dieser Stand hat keine Ratings";
}
}