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


C# View.CompactListMemberPrint方法代码示例

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


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

示例1: RunApplication

        public void RunApplication(View.ConsoleView c_view, Model.Registry c_reg)
        {
            bool quit = false;
            int menuChoice;
            int boatMenuChoice;
            int listnumber;

            while (quit == false)
            {
                try
                {

                    menuChoice = c_view.Menu();
                    switch (menuChoice)
                    {
                        //Quit
                        case 0:
                            quit = true;
                            break;
                        //Compact List
                        case 1:

                            for (int i = 1; i <= c_reg.GetNumberOfMembers(); i++)
                            {
                                c_view.CompactListMemberPrint(c_reg.GetMember(i - 1));
                            }
                            c_view.PressKeyToContinue();
                            break;
                        //Verbose List
                        case 2:

                            for (int i = 1; i <= c_reg.GetNumberOfMembers(); i++)
                            {
                                c_view.VerboseListMemberPrint(c_reg.GetMember(i - 1));
                            }
                            c_view.PressKeyToContinue();
                            break;
                        //Add Member
                        case 3:
                            c_reg.AddMember(c_view.AddMember());
                            c_view.PressKeyToContinue();
                            c_reg.SaveLists();
                            break;
                        //Delete Member
                        case 4:
                            for (int i = 1; i <= c_reg.GetNumberOfMembers(); i++)
                            {
                                c_view.SelectListMember(c_reg.GetMember(i - 1), i);
                            }
                            c_reg.DeleteMember(c_view.SelectMember());
                            c_view.PressKeyToContinue();
                            c_reg.SaveLists();
                            break;
                        //Edit Member
                        case 5:
                            for (int i = 1; i <= c_reg.GetNumberOfMembers(); i++)
                            {
                                c_view.SelectListMember(c_reg.GetMember(i - 1), i);
                            }
                            listnumber = c_view.SelectMember();
                            c_reg.EditMember(listnumber, c_view.AddMember());
                            c_reg.SaveLists();
                            break;
                        case 6:
                        //View Member
                            for (int i = 1; i <= c_reg.GetNumberOfMembers(); i++)
                            {
                                c_view.SelectListMember(c_reg.GetMember(i - 1), i);
                            }
                            listnumber = c_view.SelectMember();
                            c_view.VerboseListMemberPrint(c_reg.GetMember(listnumber));
                            boatMenuChoice = c_view.BoatMenu();

                            switch (boatMenuChoice)
                            {
                                case 0:
                                    break;
                                case 1:
                                    //Add Boat
                                    c_reg.AddBoat(c_view.AddBoat(), listnumber);
                                    c_reg.SaveLists();
                                    break;
                                case 2:
                                    //Delete Boat
                                    c_reg.DeleteBoat(c_view.SelectBoat(c_reg.GetMember(listnumber)), listnumber);
                                    c_reg.SaveLists();
                                    break;
                                //Edit Boat
                                case 3:
                                    c_reg.EditBoat(c_view.SelectBoat(c_reg.GetMember(listnumber)), listnumber, c_view.AddBoat());
                                    c_reg.SaveLists();
                                    break;
                            }
                            break;
                    }
                }
                catch
                {
                    c_view.ErrorMessege();
                }
//.........这里部分代码省略.........
开发者ID:sslnustudent,项目名称:OOAD,代码行数:101,代码来源:User.cs


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