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


C# List.ToString方法代码示例

本文整理汇总了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;
            }
        }
开发者ID:ireynolds,项目名称:Document-Store,代码行数:46,代码来源:RenameItem.xaml.cs

示例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;
            

        }
开发者ID:Joniras,项目名称:Tatue-Organiser,代码行数:13,代码来源:EditStand.xaml.cs

示例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";
            }
            

        }
开发者ID:Joniras,项目名称:Tatue-Organiser,代码行数:22,代码来源:StandRatingAdmin.xaml.cs


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