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


C# BindingList.ToList方法代码示例

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


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

示例1: CustomTeam_Load

 private void CustomTeam_Load(object sender, EventArgs e)
 {
     currId = 0;
     if (this.team == null)
     {
         this.players = new BindingList<Player>();
         this.team = new Team("" + System.DateTime.Today.ToString(), this.teamNameTextBox.Text, players.ToList<Player>());
     }
     else
     {
         this.players = new BindingList<Player>(team.Players);
     }
     this.playersListBox.DataSource = players;
     updateForm();
 }
开发者ID:jdharms,项目名称:20-20,代码行数:15,代码来源:CustomTeam.cs

示例2: Main_Load

        private void Main_Load(object sender, EventArgs e)
        {
            Microsoft.Win32.SystemEvents.DisplaySettingsChanged +=
                new System.EventHandler(displaySettingsChanged);

            ChangeWindowSize();
            PrepareMainScreen();

            lstCourses = dlRegistration.getClasses();
            lstCoursesList = lstCourses.ToList();
            lstCourseCodes = new List<string>();
            foreach (course crsCourses in lstCoursesList)
            {
                lstCourseCodes.Add(crsCourses.CourseCode);
            }
            validStudents = dlRegistration.getRegisteredStudents();
        }
开发者ID:jacodutoit,项目名称:FingerprintMatch,代码行数:17,代码来源:Main.cs

示例3: GetAllUnitGroup

        public List<UnitGroup> GetAllUnitGroup()
        {
            var UG = new BindingList<UnitGroup>();
            UnitGroup ug1 = new UnitGroup();
            UnitGroup ug2 = new UnitGroup();

            ug1.name = "652";
            ug1.number = "1";
            ug1.description = "挤爆了";
            ug1.create_date = new DateTime();
            ug1.create_user_id = 1;
            ug1.Id = 1;
            ug1.is_delete = "是";
            ug1.modify_date = new DateTime();
            ug1.modify_user_id = 1;
            ug1.Parent_Id = 0;

            ug2.name = "158";
            ug2.number = "2";
            ug2.description = "挤上天";
            ug2.create_date = new DateTime();
            ug2.create_user_id = 2;
            ug2.Id = 2;
            ug2.is_delete = "否";
            ug2.modify_date = new DateTime();
            ug2.modify_user_id = 2;
            ug2.Parent_Id = 0;

            UG.Add(ug1);
            UG.Add(ug2);
            return UG.ToList();
        }
开发者ID:gofixiao,项目名称:HYPDM_Pro,代码行数:32,代码来源:MeasurementUnitBuild.cs

示例4: FindRelatedUsersForUserGroup

        public List<Users> FindRelatedUsersForUserGroup(int groupID)
        {
            IList<Users> list = new BindingList<Users>();
            Users user = new Users();
            Users user1 = new Users();

            user.login_name = "小徐";
            user.real_name = "查到了";
            user.isChecked = false;
            user.birthday = new DateTime();
            user.sex = "男";
            user.age = 18;
            user.remark = "我是小徐,大家好";
            user.major = "本科(买的)";
            user.email = "[email protected]";
            user.birthday = new DateTime();
            user.company_id = 1;
            user.audit_state = "0";
            user.stor_key = "123";
            user.mobile_phone = "119";
            user.office_phone = "120";
            user.immediate_manager = "威哥";
            user.user_number = "1234567usernumber";
            user.default_department = "酱油部门";
            user.create_user_id = 123;
            user.create_date = new DateTime();
            user.modify_user_id = 1234;
            user.modify_date = new DateTime();
            user.is_delete = "1";
            user.id = 1;

            user1.login_name = "小宫";
            user1.real_name = "很高兴";
            user1.isChecked = false;
            user1.birthday = new DateTime();
            user1.sex = "男";
            user1.age = 18;
            user1.remark = "我是小宫,大家好";
            user1.major = "专科";
            user1.email = "[email protected]";
            user1.birthday = new DateTime();
            user1.company_id = 1;
            user1.audit_state = "0";
            user1.stor_key = "123";
            user1.mobile_phone = "119";
            user1.office_phone = "120";
            user1.immediate_manager = "威哥";
            user1.user_number = "123456usernumber";
            user1.default_department = "酱油部门";
            user1.create_user_id = 123;
            user1.create_date = new DateTime();
            user1.modify_user_id = 1234;
            user1.modify_date = new DateTime();
            user1.is_delete = "1";
            user1.id = 2;
            list.Add(user);
            list.Add(user1);

            return list.ToList();
        }
开发者ID:gofixiao,项目名称:HYPDM_Pro,代码行数:60,代码来源:UsersManage.cs

示例5: SubscribeListBindingEvents

 private void SubscribeListBindingEvents()
 {
     CurrentBudget.Model.PropertyChanged += BudgetModelOnPropertyChanged;
     Incomes = new BindingList<Income>(CurrentBudget.Model.Incomes.ToList());
     Incomes.ToList().ForEach(
         i =>
         {
             i.PropertyChanged += OnIncomeAmountPropertyChanged;
             i.Bucket.PropertyChanged += OnIncomeAmountPropertyChanged;
         });
     Expenses = new BindingList<Expense>(CurrentBudget.Model.Expenses.ToList());
     Expenses.ToList().ForEach(
         e =>
         {
             e.PropertyChanged += OnExpenseAmountPropertyChanged;
             e.Bucket.PropertyChanged += OnExpenseAmountPropertyChanged;
         });
 }
开发者ID:Benrnz,项目名称:BudgetAnalyser,代码行数:18,代码来源:BudgetController.cs

示例6: loadAddress

 public void loadAddress(BindingList<String> direcciones)
 {
     this.Direcciones.Clear();
     direcciones.ToList().ForEach((String direccion) => this.Direcciones.Add(direccion));
 }
开发者ID:gastonprieto,项目名称:gis-tp,代码行数:5,代码来源:SelectAddress.cs

示例7: SortLength

        public static BindingList<Song> SortLength(SortOrder sortOrder, BindingList<Song> sortList)
        {
            List<Song> sortedList = sortList.ToList();

            sortedList.Sort(delegate(Song song1, Song song2)
            {
                return song1.Length.CompareTo(song2.Length);
            });

            if (sortOrder == SortOrder.Descending)
                sortedList.Reverse();

            return new BindingList<Song>(sortedList);
        }
开发者ID:cboseak,项目名称:KoPlayer,代码行数:14,代码来源:Sorting.cs

示例8: SortBindingList

        public static BindingList<Song> SortBindingList(BindingList<Song> sortList, SortOrder sortOrder, string field)
        {
            List<Song> sortedList = sortList.ToList();

            sortedList.Sort(delegate(Song song1, Song song2)
            {
                return song1.Title.CompareTo(song2.Title);
            });

            if (sortOrder == SortOrder.Descending)
                sortedList.Reverse();

            return new BindingList<Song>(sortedList);
        }
开发者ID:cboseak,项目名称:KoPlayer,代码行数:14,代码来源:Sorting.cs


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