Exemplo n.º 1
0
        public override void ViewDidLoad()
        {
            base.ViewDidLoad();
            View.BackgroundColor = UIColor.FromRGB(.9f, .9f, .9f);

            var title = new UILabel(new RectangleF(0, 50, 270, 20));

            title.Font          = UIFont.SystemFontOfSize(24.0f);
            title.TextAlignment = UITextAlignment.Center;
            title.TextColor     = UIColor.Blue;
            title.Text          = "Menu";

            var body = new UILabel(new RectangleF(30, 70, 200, 100));

            body.Font          = UIFont.SystemFontOfSize(12.0f);
            body.TextAlignment = UITextAlignment.Center;
            body.Lines         = 0;
            body.Text          = @"This is a sub menu!";

            var backButton = new UIButton(UIButtonType.System);

            backButton.Frame = new RectangleF(0, 180, 260, 20);
            backButton.SetTitle("Back", UIControlState.Normal);
            backButton.TouchUpInside += (sender, e) => {
                SidebarController.ChangeMenuView(new SideMenuController());
            };

            View.Add(title);
            View.Add(body);
            View.Add(backButton);
        }
        private void ShowClassRooms()
        {
            FeedbackViewController FeedbackView = this.Storyboard.InstantiateViewController("FeedbackViewController") as FeedbackViewController;

            FeedbackView.NavigationItem.SetHidesBackButton(true, false);

            this.NavController.PushViewController(FeedbackView, false);
            var menuController = (MyMenuController)Storyboard.InstantiateViewController("MyMenuController");

            SidebarController.ChangeMenuView(menuController);
            SidebarController.MenuWidth      = 250;
            SidebarController.ReopenOnRotate = false;
        }
        private void ShowLogin()
        {
            LoginViewController LoginView = this.Storyboard.InstantiateViewController("LoginViewController") as LoginViewController;

            LoginView.NavigationItem.SetHidesBackButton(true, false);

            this.NavController.PushViewController(LoginView, false);
            var menuController = (MyMenuController)Storyboard.InstantiateViewController("MyMenuController");

            SidebarController.ChangeMenuView(menuController);
            SidebarController.MenuWidth      = 250;
            SidebarController.ReopenOnRotate = false;
        }
Exemplo n.º 4
0
        public override void ViewDidLoad()
        {
            base.ViewDidLoad();
            View.BackgroundColor = UIColor.FromRGB(.9f, .9f, .9f);

            var title = new UILabel(new RectangleF(0, 50, 270, 20));

            title.Font          = UIFont.SystemFontOfSize(24.0f);
            title.TextAlignment = UITextAlignment.Center;
            title.TextColor     = UIColor.Blue;
            title.Text          = "Menu";

            var body = new UILabel(new RectangleF(30, 70, 200, 100));

            body.Font          = UIFont.SystemFontOfSize(12.0f);
            body.TextAlignment = UITextAlignment.Center;
            body.Lines         = 0;
            body.Text          = @"This is the side menu. You can use any UIViewController to put whatever you want here!";

            var introButton = new UIButton(UIButtonType.System);

            introButton.Frame = new RectangleF(0, 180, 260, 20);
            introButton.SetTitle("Intro", UIControlState.Normal);
            introButton.TouchUpInside += (sender, e) => {
                SidebarController.ChangeContentView(new IntroController());
            };

            var contentButton = new UIButton(UIButtonType.System);

            contentButton.Frame = new RectangleF(0, 220, 260, 20);
            contentButton.SetTitle("Content", UIControlState.Normal);
            contentButton.TouchUpInside += (sender, e) => {
                SidebarController.ChangeContentView(new ContentController());
            };

            var subMenuButton = new UIButton(UIButtonType.System);

            subMenuButton.Frame = new RectangleF(0, 260, 260, 20);
            subMenuButton.SetTitle("Sub Menu", UIControlState.Normal);
            subMenuButton.TouchUpInside += (sender, e) => {
                SidebarController.ChangeMenuView(new SubMenuController());
            };

            View.Add(title);
            View.Add(body);
            View.Add(introButton);
            View.Add(contentButton);
            View.Add(subMenuButton);
        }
        private void ShowMap()
        {
            // Launches a new instance of CallHistoryController
            MapViewController mapView = this.Storyboard.InstantiateViewController("MapViewController") as MapViewController;

            if (mapView != null)
            {
                mapView.NavigationItem.SetHidesBackButton(true, false);
                this.NavController.PushViewController(mapView, false);
                var menuController = (MyMenuController)Storyboard.InstantiateViewController("MyMenuController");
                SidebarController.ChangeMenuView(menuController);
                SidebarController.MenuWidth      = 250;
                SidebarController.ReopenOnRotate = false;
            }
        }