Ejemplo n.º 1
0
        /// <summary>
        /// Get all contacts
        /// </summary>
        public MyContactsModel(AppLevelModel appViewModel) : base(appViewModel)
        {
            IconCode      = "People";
            PageTitle     = Q.Resources.MyContacts_PageTitle;
            MainMenu      = appViewModel.TopLevelMenu;
            menuToRestore = appViewModel.TopLevelMenu;
            MainMenuIndex = 2;

            addContactsMenu = new ObservableCollection <MenuItem <AppLevelModel> >();
            addContactsMenu.Add(new MenuItem <AppLevelModel>(Q.Resources.MyContacts_BackToEventList, "ImportAll"));

            SqLiteManager.GetAllContacts(appViewModel, Contacts);

            SubMenu.Add(new MenuItem <AppLevelModel>(
                            appViewModel.NewContact,
                            typeof(ContactItemPage), ResetNewContact));
            SubMenuIndex = -1;
            ResetSubMenuIndexOnNavigation = true;

            BottomMenu = new ObservableCollection <MenuItem <AppLevelModel> >()
            {
                new MenuItem <AppLevelModel>(
                    appViewModel.Settings.AboutViewModel, typeof(AboutPage))
            };
            BottomMenuIndex = -1;
            ResetBottomMenuIndexOnNavigation = true;

            ImplimentsSearch = true;
        }
        /// <summary>
        /// Creates a new event and saves a copy
        /// </summary>
        private NewEventItemModel(AppLevelModel appViewModel, DateTime eventStartDate, bool navFromCalendar) :
            base(appViewModel, eventStartDate, navFromCalendar)
        {
            EditEvent  = true;
            IsNewEvent = true;

            // Override base icons
            IconCode  = "Add";
            PageTitle = Q.Resources.NewEvent_PageTitle;

            SubMenu.Clear();
            SubMenu.Add(new MenuItem <AppLevelModel>(Q.Resources.Event_EditAttendance, "Contact2", EditAttendanceCommand));
            SubMenu.Add(new MenuItem <AppLevelModel>(Q.Resources.Event_SaveEvent, "Save", SaveEventCommand));
            SubMenu.Add(new MenuItem <AppLevelModel>(Q.Resources.Event_DiscardChanges, "Cancel", CancelEventChangesCommand));

            SqLiteManager.RetriveNewEvent(this);

            // Create backup
            meetingBackup = new Meeting
            {
                EventTitle        = EventTitle,
                Venue             = Venue,
                Description       = Description,
                EventStart        = EventBegin,
                EventEnd          = EventBegin,
                ImagePath         = ImagePath,
                VenueContactEmail = VenueContactEmail,
                VenueContactPhone = VenueContactPhone,
                MeetingID         = ID
            };
        }
Ejemplo n.º 3
0
        /// <summary>
        /// pixiv.net site
        /// </summary>
        public PixivSite(bool xmode)
        {
            SubMenu.Add("最新/标签"); // 0
            SubMenu.Add("作者ID");  // 1
            SubMenu.Add("本日排行");  // 2
            SubMenu.Add("本周排行");  // 3
            SubMenu.Add("本月排行");  // 4

            if (xmode)
            {
                for (var i = 0; i < SubMenu.Count; i++)
                {
                    var item = SubMenu[i];
                    if (i == 2 || i == 3 || i == 4)
                    {
                        item.NoNeedKeyword = true;
                    }
                    if (i == 1 || i == 4)
                    {
                        continue;
                    }
                    item.SubMenu.Add(new MoeSiteSubMenuItem {
                        Name = "普通"
                    });
                    item.SubMenu.Add(new MoeSiteSubMenuItem {
                        Name = "R18"
                    });
                }
            }

            DownloadTypes.Add("原图", 4);
        }
Ejemplo n.º 4
0
        public PixivSite()
        {
            var mangaIlluMenu = new MoeMenuItems(new MoeMenuItem("插画+动图"), new MoeMenuItem("漫画"));

            SubMenu.Add("最新/搜索", mangaIlluMenu); // 0
            SubMenu.Add("作者ID", mangaIlluMenu);  // 1

            var rankLv4Menu = new MoeMenuItems(null, "综合", "插画", "漫画", "动图");

            var ranSubMenu = IsR18 ? new MoeMenuItems(rankLv4Menu, "今日", "本周", "最受男性欢迎", "最受女性欢迎")
                : new MoeMenuItems(rankLv4Menu, "今日", "本周", "本月", "新人", "原创", "最受男性欢迎", "最受女性欢迎");

            var rankingMiten = new MoeMenuItem("排行", ranSubMenu)
            {
                Func = { ShowDatePicker = true, ShowKeyword = false }
            };

            SubMenu.Add(rankingMiten); // 2

            SupportState.IsSupportAccount = true;

            DownloadTypes.Add("原图", 4);
            DownloadTypes.Add("中图", 3);
            //DownloadTypes.Add("小图", 2);

            SupportState.IsSupportRating = false;
            SupportState.IsSupportSearchByImageLastId = true;
            SupportState.IsSupportSelectPixivRankNew  = true;
            SupportState.IsSupportSearchByAuthorId    = true;
            LoginPageUrl = "https://accounts.pixiv.net/login";
        }
Ejemplo n.º 5
0
        protected void SetMainMenu()
        {
            // Set to 0 to force index change
            MainMenuIndex = 0;
            if (NavFromCalendar)
            {
                MainMenu = new ObservableCollection <MenuItem <AppLevelModel> >()
                {
                    new MenuItem <AppLevelModel>(Q.Resources.Event_ReturnToCalendar, "ImportAll")
                };
                MainMenuIndex = -1;
                ResetMainMenuIndexOnNavigation = true;
            }
            else
            {
                MainMenu      = AppViewModel.TopLevelMenu;
                MainMenuIndex = 1;
                ResetMainMenuIndexOnNavigation = false;
            }

            SubMenu.Clear();
            SubMenu.Add(new MenuItem <AppLevelModel>(Q.Resources.Event_EditAttendance, "Contact2", EditAttendanceCommand));
            if (EditEvent)
            {
                SubMenu.Add(new MenuItem <AppLevelModel>(Q.Resources.Event_SaveEvent, "Save", SaveEventCommand));
                SubMenu.Add(new MenuItem <AppLevelModel>(Q.Resources.Event_DiscardChanges, "Cancel", CancelEventChangesCommand));
            }
            else
            {
                SubMenu.Add(new MenuItem <AppLevelModel>(Q.Resources.Event_EditEvent, "Edit", ViewEventCommand));
                SubMenu.Add(new MenuItem <AppLevelModel>(Q.Resources.Event_DeleteEvent, "Delete", DeleteEventCommand));
            }
        }
Ejemplo n.º 6
0
 protected override void BuildSubMenus()
 {
     SubMenu.Add(new MenuItem("home-menuitem", "HOME")
     {
         HelpText   = "Enfield's Detail Home Page",
         Controller = "Public",
         Action     = "Index",
         IsSelected = (page == "Home")
     });
     SubMenu.Add(new MenuItem("services-menuitem", "SERVICES")
     {
         HelpText   = "Enfield's Detail Services Page",
         Controller = "Public",
         Action     = "Services",
         IsSelected = (page == "Services")
     });
     SubMenu.Add(new MenuItem("gallery-menuitem", "GALLERY")
     {
         HelpText   = "Enfield's Detail Gallery Page",
         Controller = "Public",
         Action     = "Gallery",
         IsSelected = (page == "Gallery")
     });
     SubMenu.Add(new MenuItem("contact-menuitem", "CONTACT")
     {
         HelpText   = "Enfield's Detail Contact Page",
         Controller = "Public",
         Action     = "Contact",
         IsSelected = (page == "Contact")
     });
 }
        private async Task <bool> CancelChangesCommandTask()
        {
            if (!backupContact.EmailAddress.Equals(EmailAddress) ||
                !backupContact.EmailAddress.Equals(EmailAddress) ||
                !backupContact.EmailAddress2.Equals(EmailAddress2) ||
                !backupContact.FirstName.Equals(FirstName) ||
                !backupContact.ImagePath.Equals(ImagePath) ||
                !backupContact.LastName.Equals(LastName) ||
                !backupContact.PhoneNumber.Equals(PhoneNumber) ||
                !backupContact.PhoneNumber2.Equals(PhoneNumber2) ||
                !backupContact.ImagePath.Equals(ImagePath))
            {
                AppViewModel.MessageDialogResults = MessageDialogResultsEnum.No_Results;

                // Send message
                AppViewModel.MessageDialog(
                    Q.Resources.Contact_CancelConfirmDialog_Message,
                    Q.Resources.Contact_CancelConfirmDialog_Title,
                    MessageDialogOptions.Okay_Cancel);

                await Task.Factory.StartNew(() =>
                {
                    while (AppViewModel.MessageDialogResults == MessageDialogResultsEnum.No_Results)
                    {
                        Task.Delay(100);
                    }
                });

                if (AppViewModel.MessageDialogResults == MessageDialogResultsEnum.Okay)
                {
                    // Cancel changes
                    SubMenu.Clear();
                    SubMenu.Add(new MenuItem <AppLevelModel>(Q.Resources.Contact_Edit, "Edit", EditCommand));
                    EditContact = false;

                    // Restore from backup
                    ID            = backupContact.ContactID;
                    EmailAddress  = backupContact.EmailAddress;
                    EmailAddress2 = backupContact.EmailAddress2;
                    FirstName     = backupContact.FirstName;
                    LastName      = backupContact.LastName;
                    PhoneNumber   = backupContact.PhoneNumber;
                    PhoneNumber2  = backupContact.PhoneNumber;
                    ImagePath     = backupContact.ImagePath;

                    return(true);
                }
                else
                {
                    return(false);
                }
            }
            else
            {
                return(true);
            }
        }
Ejemplo n.º 8
0
 public EshuuSite()
 {
     SupportState.IsSupportScore = false;
     SubMenu.Add("标签");
     SubMenu.Add("来源");
     SubMenu.Add("画师");
     SubMenu.Add("角色");
     DownloadTypes.Add("原图", 4);
 }
Ejemplo n.º 9
0
        protected override void EventSaveAction()
        {
            // Restore sub-menu
            SubMenu.Clear();
            SubMenu.Add(new MenuItem <AppLevelModel>(Q.Resources.Event_EditAttendance, "Contact2", EditAttendanceCommand));
            SubMenu.Add(new MenuItem <AppLevelModel>(Q.Resources.Event_EditEvent, "Edit", EditEventCommand));
            EditEvent = false;

            AppViewModel.Calendar.AddOrUpdateEvent(this);
        }
 private async void For_CancelChangesCommand()
 {
     if (await CancelChangesCommandTask())
     {
         EditContact = false;
         SubMenu.Clear();
         SubMenu.Add(new MenuItem <AppLevelModel>(Q.Resources.Contact_Edit, "Edit", EditCommand));
         SubMenuIndex = -1;
     }
 }
Ejemplo n.º 11
0
        private static MainMenu buildDelegateMenu()
        {
            MainMenu mainMenu = new MainMenu();

            mainMenu.MainMenuItems.Title = " Main Menu (Delegate) ";

            SubMenu dateAndTime = new SubMenu("Show Date/Time");

            dateAndTime.Add(new ActionItem("Show Time", new Options.Time().Do));
            dateAndTime.Add(new ActionItem("Show Date", new Options.Date().Do));
            mainMenu.Add(dateAndTime);

            SubMenu versionAndCapitals = new SubMenu("Version and Capitals");

            versionAndCapitals.Add(new ActionItem("Count Capitals", new Options.CountCapitals().Do));
            versionAndCapitals.Add(new ActionItem("Show Version", new Options.ShowVersion().Do));
            mainMenu.Add(versionAndCapitals);

            return(mainMenu);
        }
Ejemplo n.º 12
0
        public MiniTokyoSite()
        {
            var lv3 = new MoeMenuItems(null, "最新", "最热");

            SubMenu.Add("壁纸", lv3);
            SubMenu.Add("扫描图", lv3);
            SubMenu.Add("手机壁纸", lv3);
            SubMenu.Add("Indy Art", lv3);

            DownloadTypes.Add("原图", 4);
        }
Ejemplo n.º 13
0
        public BilibiliSite()
        {
            var sub = new MoeMenuItems(new MoeMenuItem("最新"), new MoeMenuItem("最热"));

            SubMenu.Add("画友", sub);
            SubMenu.Add("摄影(COS)", sub);
            SubMenu.Add("摄影(私服)", sub);

            SupportState.IsSupportRating = false;
            DownloadTypes.Add("原图", 4);
        }
Ejemplo n.º 14
0
 protected override void BuildSubMenus()
 {
     SubMenu.Add(new MenuItem("dealer-statements-menuitem", "Dealer Statements")
     {
         HelpText   = "Print a dealer statements report",
         Controller = ReportController,
         Action     = "DealerStatements",
         IsSelected = (ActionName == "DealerStatements")
     });
     SubMenu.Add(new MenuItem("private-statements-menuitem", "Private Statements")
     {
         HelpText   = "Print a private statements report",
         Controller = ReportController,
         Action     = "PrivateStatements",
         IsSelected = (ActionName == "PrivateStatements")
     });
     SubMenu.Add(new MenuItem("dealer-totals-menuitem", "Dealer Totals")
     {
         HelpText   = "Print a dealer totals report",
         Controller = ReportController,
         Action     = "DealerTotals",
         IsSelected = (ActionName == "DealerTotals")
     });
     SubMenu.Add(new MenuItem("payroll-menuitem", "Payroll")
     {
         HelpText   = "Print a payroll report",
         Controller = ReportController,
         Action     = "Payroll",
         IsSelected = (ActionName == "Payroll")
     });
     SubMenu.Add(new MenuItem("daily-log-menuitem", "Daily Log")
     {
         HelpText   = "Print a daily log report",
         Controller = ReportController,
         Action     = "DailyLog",
         IsSelected = (ActionName == "DailyLog")
     });
     SubMenu.Add(new MenuItem("invoice-report-menuitem", "Invoice")
     {
         HelpText   = "Print or reprint an invoice",
         Controller = ReportController,
         Action     = "Invoice",
         IsSelected = (ActionName == "Invoice")
     });
     SubMenu.Add(new MenuItem("employee-log-menuitem", "Employee Log")
     {
         HelpText   = "Print an employee log report",
         Controller = ReportController,
         Action     = "EmployeeLog",
         IsSelected = (ActionName == "EmployeeLog")
     });
 }
        public ContactItemModel(AppLevelModel appViewModel) : base(appViewModel)
        {
            // Used for Navigation
            IconCode  = "AddFriend";
            PageTitle = Q.Resources.ContactItem_PageTitle;

            MainMenu      = AppViewModel.GuestMenuForAllContacts;
            MainMenuIndex = 0;

            SubMenu.Add(new MenuItem <AppLevelModel>(Q.Resources.Contact_Edit, "Edit", EditCommand));
            SubMenuIndex = -1;
            ResetSubMenuIndexOnNavigation = true;
        }
Ejemplo n.º 16
0
        public BilibiliSite()
        {
            var sub = new MoeMenuItems(new MoeMenuItem("最新"), new MoeMenuItem("最热"));

            SubMenu.Add("画友", sub);
            SubMenu.Add("摄影(COS)", sub);
            SubMenu.Add("摄影(私服)", sub);

            SupportState.IsSupportRating = false;
            DownloadTypes.Add("原图", 4);

            SupportState.IsSupportAccount     = true;
            SupportState.IsSupportThumbButton = true;
            SupportState.IsSupportStarButton  = true;
            LoginPageUrl = "https://passport.bilibili.com/login";
        }
Ejemplo n.º 17
0
        public NewContactItemModel(AppLevelModel appViewModel) : base(appViewModel)
        {
            // Used for Navigation
            IconCode  = "AddFriend";
            PageTitle = Q.Resources.ContactNew_PageTitle;

            MainMenu = new ObservableCollection <MenuItem <AppLevelModel> >()
            {
                new MenuItem <AppLevelModel>(Q.Resources.Contact_ReturnToMyContacts, "ImportAll")
            };
            MainMenuIndex = 0;

            SubMenu.Add(new MenuItem <AppLevelModel>(Q.Resources.Contact_Edit, "Edit", EditCommand));
            BottomMenuIndex = -1;
            ResetSubMenuIndexOnNavigation = true;
        }
Ejemplo n.º 18
0
 protected override void BuildSubMenus()
 {
     SubMenu.Add(new MenuItem("account-listing-menuitem", "All Accounts")
     {
         HelpText   = "Search existing accounts",
         Controller = AccountController,
         Action     = "AccountListing",
         IsSelected = (ActionName == "AccountListing")
     });
     SubMenu.Add(new MenuItem("new-account-menuitem", "New Account")
     {
         HelpText   = "Add a new account",
         Controller = AccountController,
         Action     = "NewAccount",
         IsSelected = (ActionName == "NewAccount")
     });
 }
Ejemplo n.º 19
0
        public BilibiliSite()
        {
            SubMenu.Add("画友", new MoeSiteSubMenu(
                            new MoeSiteSubMenuItem("最新"),
                            new MoeSiteSubMenuItem("最热")));
            SubMenu.Add("摄影(COS)", new MoeSiteSubMenu(
                            new MoeSiteSubMenuItem("最新"),
                            new MoeSiteSubMenuItem("最热")));
            SubMenu.Add("摄影(私服)", new MoeSiteSubMenu(
                            new MoeSiteSubMenuItem("最新"),
                            new MoeSiteSubMenuItem("最热")));

            SurpportState.IsSupportKeyword = false;
            SurpportState.IsSupportScore   = false;
            SurpportState.IsSupportRating  = false;
            DownloadTypes.Add("原图", 4);
        }
Ejemplo n.º 20
0
        public CalendarModel(AppLevelModel appViewModel) : base(appViewModel)
        {
            MainMenu         = appViewModel.TopLevelMenu;
            MainMenuIndex    = 0;
            IsInitialAppPage = true;
            IconCode         = "Home";
            PageTitle        = Q.Resources.Calendar_PageTitle;

            //SubMenu.Add(new MenuItem<AppLevelModel>(
            //    this,
            //    typeof(CalendarMonthPage),
            //    null,
            //    null,
            //    "Month", "Calendar", true));
            //SubMenu.Add(new MenuItem<AppLevelModel>(
            //    this,
            //    typeof(CalendarWeekPage),
            //    null,
            //    null,
            //    "Week", "CalendarWeek", true));
            //SubMenu.Add(new MenuItem<AppLevelModel>(
            //    this,
            //    typeof(CalendarDayPage),
            //    null,
            //    null,
            //    "Day", "CalendarDay", true));

            // New event command
            SubMenu.Add(NewEventCommand = new MenuItem <AppLevelModel>(
                            null,
                            typeof(EventItemPage),
                            null,
                            NewEventBeforeCommand,
                            Q.Resources.Calendar_AddNewEvent, "Add"));
            SubMenuIndex = -1;

            BottomMenu = new ObservableCollection <MenuItem <AppLevelModel> >()
            {
                new MenuItem <AppLevelModel>(appViewModel.Settings.AboutViewModel, typeof(AboutPage))
            };
            BottomMenuIndex = -1;
            ResetBottomMenuIndexOnNavigation = true;

            var endMonth = new DateTime(CurrentDate.Year, CurrentDate.Month, 1).AddMonths(1);
        }
Ejemplo n.º 21
0
 protected override void BuildSubMenus()
 {
     SubMenu.Add(new MenuItem("invoice-listing-menuitem", "Invoices")
     {
         HelpText   = "View and administrate invoices and invoice detail",
         Controller = AdminController,
         Action     = "InvoiceListing",
         IsSelected = (ActionName == "InvoiceListing")
     });
     SubMenu.Add(new MenuItem("user-listing-menuitem", "Employees")
     {
         HelpText   = "Add new users or change something about a current user",
         Controller = AdminController,
         Action     = "UserListing",
         IsSelected = (ActionName == "UserListing")
     });
     SubMenu.Add(new MenuItem("location-listing-menuitem", "Locations")
     {
         HelpText   = "Add a new location or change an existing location",
         Controller = AdminController,
         Action     = "LocationListing",
         IsSelected = (ActionName == "LocationListing")
     });
     SubMenu.Add(new MenuItem("services-and-labor-menuitem", "Services and Labor")
     {
         HelpText   = "Add or edit service types and/or labor types",
         Controller = AdminController,
         Action     = "ServicesAndLabor",
         IsSelected = (ActionName == "ServicesAndLabor")
     });
     SubMenu.Add(new MenuItem("security-log-menuitem", "Security Log")
     {
         HelpText   = "View login attempts",
         Controller = AdminController,
         Action     = "SecurityLog",
         IsSelected = (ActionName == "SecurityLog")
     });
     SubMenu.Add(new MenuItem("error-log-menuitem", "Error Log")
     {
         HelpText   = "View the Elmah log",
         Controller = AdminController,
         Action     = "ErrorLog",
         IsSelected = (ActionName == "ErrorLog")
     });
 }
Ejemplo n.º 22
0
        /// <summary>
        /// Confirm if user wants to cancel changes
        /// </summary>
        private async Task <bool> CancelChangesCommandTask()
        {
            if (!string.IsNullOrWhiteSpace(EmailAddress) ||
                !string.IsNullOrWhiteSpace(EmailAddress2) ||
                !string.IsNullOrWhiteSpace(FirstName) ||
                !string.IsNullOrWhiteSpace(LastName) ||
                !string.IsNullOrWhiteSpace(PhoneNumber) ||
                !string.IsNullOrWhiteSpace(PhoneNumber2))
            {
                AppViewModel.MessageDialogResults = MessageDialogResultsEnum.No_Results;

                // Send message
                AppViewModel.MessageDialog(
                    Q.Resources.Contact_SaveConfirmDialog_Message,
                    Q.Resources.Contact_CancelConfirmDialog_Title,
                    MessageDialogOptions.Okay_Cancel);

                await Task.Factory.StartNew(() =>
                {
                    while (AppViewModel.MessageDialogResults == MessageDialogResultsEnum.No_Results)
                    {
                        Task.Delay(100);
                    }
                });

                if (AppViewModel.MessageDialogResults == MessageDialogResultsEnum.Okay)
                {
                    SubMenu.Clear();
                    SubMenu.Add(new MenuItem <AppLevelModel>(Q.Resources.Contact_Edit, "Edit", EditCommand));
                    EditContact = false;

                    return(true);
                }
                else
                {
                    return(false);
                }
            }
            else
            {
                return(true);
            }
        }
        /// <summary>
        /// Get contacts for event
        /// </summary>
        public EventGuestListModel(
            AppLevelModel appViewModel,
            BaseEventItemModel eventModel) : base(appViewModel)
        {
            IconCode      = "People";
            PageTitle     = Q.Resources.EventAttendance_PageTitle;
            MainMenu      = appViewModel.GuestMenuForEventContacts;
            MainMenuIndex = 0;

            SubMenu.Add(new MenuItem <AppLevelModel>(Q.Resources.Event_AcceptChanges, "Accept", AcceptAttendanceChanges));
            SubMenuIndex = -1;
            ResetSubMenuIndexOnNavigation = true;

            // Set bottom menu
            BottomMenu = new ObservableCollection <MenuItem <AppLevelModel> >()
            {
                new MenuItem <AppLevelModel>(
                    appViewModel.Settings.AboutViewModel, typeof(AboutPage))
            };
            BottomMenuIndex = -1;
            ResetBottomMenuIndexOnNavigation = true;

            ImplimentsSearch = true;
        }
Ejemplo n.º 24
0
        protected override void BuildSubMenus()
        {
            var model = Model as ShopFloorModel;

            if (model != null)
            {
                CurrentInvoice = model.Invoice;
            }

            SubMenu.Add(new MenuItem("new-vehicle-menuitem", "New Vehicle")
            {
                HelpText   = "Log a new vehicle into the current location",
                Controller = ShopFloorController,
                Action     = "NewVehicle",
                IsSelected = (ActionName == "NewVehicle")
            });
            SubMenu.Add(new MenuItem("print-invoice-menuitem", "Print Invoice")
            {
                HelpText   = "Open an invoice report for the current vehicle",
                Controller = ReportController,
                Action     = "InvoiceReport",
                IsEnabled  = (CurrentInvoice != null)
            });
            SubMenu.Add(new MenuItem("complete-vehicle-menuitem", "Complete Vehicle")
            {
                HelpText   = "Flag the current vehicle as completed",
                Controller = ShopFloorController,
                Action     = "CompleteVehicle",
                IsEnabled  = (CurrentInvoice != null),
                IsVisible  = (CurrentInvoice != null && !CurrentInvoice.IsComplete)
            });
            SubMenu.Add(new MenuItem("recall-vehicle-menuitem", "Recall Vehicle")
            {
                HelpText   = "Recall the current vehicle back to the shop",
                Controller = ShopFloorController,
                Action     = "RecallVehicle",
                IsEnabled  = (CurrentInvoice != null),
                IsVisible  = (CurrentInvoice != null && CurrentInvoice.IsComplete)
            });
            SubMenu.Add(new MenuItem("add-history-menuitem", "Add Note")
            {
                HelpText   = "Add a note to the history of the current vehicle",
                Controller = ShopFloorController,
                Action     = "AddHistory",
                IsEnabled  = (CurrentInvoice != null && !string.IsNullOrEmpty(CurrentInvoice.StockNumber))
            });
            SubMenu.Add(new MenuItem("delete-invoice-menuitem", "Delete Invoice")
            {
                HelpText   = "Permanently delete the current invoice",
                Controller = ShopFloorController,
                Action     = "DeleteInvoice",
                IsEnabled  = (CurrentInvoice != null),
                IsVisible  = (RoleName == "Administrator")
            });
            SubMenu.Add(new MenuItem("find-invoice-menuitem", "Search")
            {
                HelpText   = "Find a vehicle by invoice number or stock number",
                Controller = ShopFloorController,
                Action     = "FindInvoice"
            });
            SubMenu.Add(new MenuItem("sign-in-menuitem", "Sign In")
            {
                HelpText   = "Sign in to the shop at the current location",
                Controller = ShopFloorController,
                Action     = "SignIn"
            });
            SubMenu.Add(new MenuItem("sign-out-menuitem", "Sign Out")
            {
                HelpText   = "Sign out of the shop at the current location",
                Controller = ShopFloorController,
                Action     = "SignOut"
            });
        }
Ejemplo n.º 25
0
        private string Type => SubListIndex == 0 ? "wallpapers" : "scans";// 1 搜索壁纸  2搜索扫描图

        public MiniTokyoSite()
        {
            SubMenu.Add("壁纸");
            SubMenu.Add("扫描图");
            DownloadTypes.Add("原图", 4);
        }
 public void Add(MenuItem i_Option)
 {
     m_MainMenu.Add(i_Option);
 }
Ejemplo n.º 27
0
 public void AddMenuItem(MenuItem md)
 {
     MIHeading.Empty = false;
     md.Level        = Level + 1;
     SubMenu.Add(md);
 }