/// <summary> /// 加载预定义的所有菜单内容。 /// </summary> private NavigationViewModel() { PrimaryItems = new List <MasterPageItem>(); SecondaryItems = new List <MasterPageItem>(); #if __IOS__ AppleItems = new List <MasterPageItem>(); InAppEntrance = new InfoEntranceGroup("其他功能"); #endif FetchOptions(); }
public void PreLoad() { Core.App.Service = new UIMS(); Core.App.DailyClassCount = 11; Core.App.GradePoint = new GradeEntrance(); Core.App.Schedule = new Schedule(); Core.App.Message = new MessageEntrance(); Core.App.Feed = new OA(); var group1 = new InfoEntranceGroup { GroupTitle = "公共信息查询" }; group1.Add(new InfoEntranceWrapper("学院介绍查询", "查询学院介绍", () => new CollegeIntroduce())); Core.App.InfoEntrances.Add(group1); }
public void PreLoad() { Core.App.DailyClassCount = 11; Service = new Lazy <ISchoolSystem>(() => new UIMS(NoticeChange)); GradePoint = new Lazy <IGradeEntrance>(() => new GradeEntrance()); Schedule = new Lazy <IScheduleEntrance>(() => new Schedule()); Message = new Lazy <IMessageEntrance>(() => new MessageEntrance()); Feed = new Lazy <IFeedEntrance>(() => new OA()); InfoList = new InfoEntranceGroup { GroupTitle = "公共信息查询" }; InfoList.Add(new InfoEntranceWrapper(typeof(EmptyRoom))); InfoList.Add(new InfoEntranceWrapper(typeof(TeachEvaluate))); InfoList.Add(new InfoEntranceWrapper(typeof(CollegeIntroduce))); InfoList.Add(new InfoEntranceWrapper(typeof(ProgramMaster))); InfoList.Add(new InfoEntranceWrapper(typeof(ClassSchedule))); InfoList.Add(new InfoEntranceWrapper(typeof(SelectCourse))); InfoList.Add(new InfoEntranceWrapper(typeof(LibrarySearch))); // InfoList.Add(new InfoEntranceWrapper(typeof(LibraryZwyy))); InfoList.Add(new InfoEntranceWrapper(typeof(AdviceSchedule))); Core.App.InfoEntrances.Add(InfoList); }
/// <summary> /// 根据现有的预定义菜单内容添加入口点。 /// </summary> private void FetchOptions() { PrimaryItems.Clear(); SecondaryItems.Clear(); SecondaryItems.Add(new MasterPageItem("设置", "SettingPage")); #if __IOS__ AppleItems.Clear(); InAppEntrance.Clear(); var settingList = new InfoEntranceGroup("设置") { new TapEntranceWrapper("设置", "调整程序运行的参数。", (nav) => nav.PushAsync(SecondaryItems[0].CorePage)), new TapEntranceWrapper("关于", "程序的版本信息、开发人员、许可证和隐私声明等。", (nav) => nav.PushAsync(new AboutPage())), }; #endif AddMenuEntry("首页", "IndexPage", "\xE10F", sel: true, apple: "tab_rec.png"); AddMenuEntry("课程表", "SchedulePage", "\xECA5", apple: "tab_sched.png"); #if !__ANDROID__ if (Core.App.Feed != null) { AddMenuEntry("学校通知", "FeedPage", "\xED0D", apple: "tab_feed.png"); } if (Core.App.Message != null) { AddMenuEntry("站内消息", "MessagePage", "\xE715"); } #else if (Core.App.Feed != null && Core.App.Message != null) { AddMenuEntry("消息通知", "MessageTabbedPage", "\xE715"); } else if (Core.App.Feed != null) { AddMenuEntry("学校通知", "FeedPage", "\xED0D"); } else if (Core.App.Message != null) { AddMenuEntry("站内消息", "MessagePage", "\xE715"); } #endif if (Core.App.GradePoint != null) { AddMenuEntry("学分成绩", "GradePointPage", "\xE82D"); } if (Core.App.InfoEntrances.Count > 0 || Core.RuntimePlatform == "iOS") { AddMenuEntry("信息查询", "InfoQueryPage", "\xE946", apple: "tab_about.png"); } #if __IOS__ if (InAppEntrance.Count > 0) { Core.App.InfoEntrances.Insert(0, InAppEntrance); } Core.App.InfoEntrances.Add(settingList); #endif }