Ejemplo n.º 1
0
        /// <summary>
        /// Shows the home screen.
        /// </summary>
        public void showHomeScreen()
        {
            var inboxVC = new Inbox.InboxVC();
            var navVc   = new UINavigationController(inboxVC);
            var fixitVw = new UIView(new CoreGraphics.CGRect(0, 0, UIScreen.MainScreen.Bounds.Width, 20));

            fixitVw.BackgroundColor = IosUtils.IosColorConstant.ThemeNavBlue;
            navVc.View.AddSubview(fixitVw);

            var settingVC = new SettingsVc();

            settingVC.inboxVc = inboxVC;
            var NavDrawer = new SWRevealViewController();

            NavDrawer.RearViewRevealWidth    = UIScreen.MainScreen.Bounds.Width * 0.75f;
            NavDrawer.FrontViewController    = navVc;
            NavDrawer.RearViewController     = settingVC;
            NavDrawer.RearViewRevealOverdraw = 0.0f;
            inboxVC.revealVC          = NavDrawer;
            settingVC.revealVC        = NavDrawer;
            inboxVC.MailTypeId        = 1;
            Window.RootViewController = NavDrawer;
            Window.MakeKeyAndVisible();
        }
Ejemplo n.º 2
0
        public void RowSelected(UITableView tableView, NSIndexPath indexPath)
        {
            selectedIndex = indexPath;
            if (indexPath.Section == 0)
            {
                if (inboxVc == null)
                {
                    inboxVc          = new Inbox.InboxVC();
                    inboxVc.revealVC = revealVC;
                }

                //if (indexPath.Row == 0)
                //{
                //	inboxVc.MailTypeId = 1;
                //}
                //else if (indexPath.Row == 1)
                //{
                //	inboxVc.MailTypeId = 2;
                //}
                //else if (indexPath.Row == 2)
                //{
                //	inboxVc.
                //}
                //else if (indexPath.Row == 3)
                //{

                //}

                ShowVC(inboxVc);
                inboxVc.MailTypeId = indexPath.Row + 1;
            }
            else if (indexPath.Section == 1)
            {
                if (indexPath.Row == 0)
                {
                    if (calendarVc == null)
                    {
                        calendarVc = new CalendarVC();
                    }
                    calendarVc.revealVC = revealVC;
                    ShowVC(calendarVc);
                }
                else if (indexPath.Row == 1)
                {
                    // add calendar event
                    if (calendarVc != null)
                    {
                        var createNotesVc = new CreateCalendarEventVC();
                        calendarVc.NavigationController.PushViewController(createNotesVc, true);
                        revealVC.RevealToggleAnimated(true);
                    }
                    else if (notesVC == null)
                    {
                        calendarVc          = new CalendarVC();
                        calendarVc.revealVC = revealVC;
                        ShowVC(calendarVc);
                        var createNotesVc = new CreateCalendarEventVC();
                        calendarVc.NavigationController.PushViewController(createNotesVc, true);
                    }
                }
            }
            else if (indexPath.Section == 2)
            {
                if (indexPath.Row == 0)
                {
                    if (orderVc == null)
                    {
                        orderVc          = new Orders.OrderListVC();
                        orderVc.revealVC = revealVC;
                    }
                    ShowVC(orderVc);
                }
            }
            else if (indexPath.Section == 3)
            {
                if (indexPath.Row == 0)
                {
                    if (notesVC == null)
                    {
                        notesVC          = new Notes.ViewNotesVC();
                        notesVC.revealVC = revealVC;
                    }
                    ShowVC(notesVC);
                }
                else if (indexPath.Row == 1)
                {
                    if (notesVC == null)
                    {
                        notesVC          = new Notes.ViewNotesVC();
                        notesVC.revealVC = revealVC;
                    }
                    ShowVC(notesVC);
                }
                else if (indexPath.Row == 2)
                {
                    if (notesVC != null)
                    {
                        var createNotesVc = new CreateNotesVC();
                        notesVC.NavigationController.PushViewController(createNotesVc, true);
                        revealVC.RevealToggleAnimated(true);
                    }
                    else if (notesVC == null)
                    {
                        notesVC          = new Notes.ViewNotesVC();
                        notesVC.revealVC = revealVC;
                        ShowVC(notesVC);
                        var createNotesVc = new CreateNotesVC();
                        notesVC.NavigationController.PushViewController(createNotesVc, true);
                    }
                }
                else if (indexPath.Row == 3)
                {
                    if (notesVC == null)
                    {
                        notesVC          = new Notes.ViewNotesVC();
                        notesVC.revealVC = revealVC;
                    }
                    ShowVC(notesVC);
                }
            }
            else if (indexPath.Section == 4)
            {
            }
        }