本文整理汇总了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();
}
//.........这里部分代码省略.........