public override void ViewDidLoad ()
		{
			base.ViewDidLoad ();
			var LateralBar = new FlyoutNavigationController {//this will create a new instance of the FlyoutComponent
				NavigationRoot = new RootElement("Menu"){ //Here we create the root of the alements
					new Section("Seccion 1"){//with this code we create Sections
						new StringElement("Header"),
						new StringElement("Controller 1"),//With this code we create the elements on the sections
						new StringElement("Controller 2"),
					},
					new Section("Seccion 2"){
						new StringElement("Controller 3"),
					},
				},
				ViewControllers =  new [] {//here we link Controllers to the elements on the sections
					new UIViewController{View=new UILabel{
							Text = "This is the header"
						}},// The flyout component needs an initializer, and this initializer always needs to be like this, with a new UIViewController{}
					new Controller1(),//here we create the instances for the Controllers
					new Controller2(),
					new Controller3(),
				}
			};

			LateralBar.ToggleMenu();
			View.AddSubview (LateralBar.View);

			// Perform any additional setup after loading the view, typically from a nib.
		}
 public EventListViewController_iPhone(FlyoutNavigationController navigation)
     : base("EventListViewController_iPhone", null)
 {
     this.navigation = navigation;
     //			noticationCenter = true;
     beaconManage = new ESTBeaconManager ();
 }
Esempio n. 3
0
        public void buildMenu()
        {
            navigation = new FlyoutNavigationController();
            navigation.View.Frame = UIScreen.MainScreen.Bounds;
            View.AddSubview (navigation.View);

            // Create the menu:
            navigation.NavigationRoot = new RootElement ("Pack 957") {
                new Section ("Pack 957 Dens") {
                    from page in MenuDens
                        select new StringElement (page) as Element
                },
                new Section ("Fun stuff") {
                    from page in MenuFun
                        select new StringElement (page) as Element
                },
            };

            navigation.ViewControllers = new UIViewController [] {
                new TigerNavigation(),
                new WolfNavigation(),
                new BearNavigation(),
                new WebloNavigation(),
                new MoveLogosNavigation(),
                new CubScoutPromiseNavigation(),
                new CubScoutLawOfThePackNavigation(),
                new CubScoutMottoNavigation(),
            };

            ShowMenuView();
        }
        public override void ViewDidLoad()
        {
            base.ViewDidLoad ();

            // Create the flyout view controller, make it large,
            // and add it as a subview:
            navigation = new FlyoutNavigationController ();
            navigation.Position = FlyOutNavigationPosition.Left;
            navigation.View.Frame = UIScreen.MainScreen.Bounds;
            View.AddSubview (navigation.View);
            this.AddChildViewController (navigation);

            // Create the menu:
            navigation.NavigationRoot = new RootElement ("Task List") {
                new Section ("Task List") {
                    from page in Tasks
                        select new StringElement (page) as Element
                }
            };

            // Create an array of UINavigationControllers that correspond to your
            // menu items:
            navigation.ViewControllers = Array.ConvertAll (Tasks, title =>
               		new UINavigationController (new TaskPageController (navigation, title))
            );
        }
            public TaskPageController(FlyoutNavigationController navigation, string title)
                : base(null)
            {
                Root = new RootElement (title) {
                    new Section {
                        new CheckboxElement (title)
                    }
                };
                NavigationItem.LeftBarButtonItem = new UIBarButtonItem (UIBarButtonSystemItem.Action, delegate {
                    navigation.ToggleMenu ();
                });

                NavigationItem.RightBarButtonItem = new UIBarButtonItem(UIBarButtonSystemItem.Refresh, delegate
                {
                    if(navigation.IsOpen)
                        navigation.ToggleMenu();

                    if(navigation.FlyMode == FlyoutNavigationController.FlyoutMode.Top)
                        navigation.FlyMode = FlyoutNavigationController.FlyoutMode.Left;
                    else if(navigation.FlyMode == FlyoutNavigationController.FlyoutMode.Left)
                        navigation.FlyMode = FlyoutNavigationController.FlyoutMode.Right;
                    else
                        navigation.FlyMode = FlyoutNavigationController.FlyoutMode.Top;
                });
            }
		public override void ViewDidLoad ()
		{
			base.ViewDidLoad ();
			var Navegacion = new FlyoutNavigationController 
			{
				NavigationRoot = new RootElement("Navegacion")
				{
					new Section ("Secciones")
					{
						new StringElement ("Imagen 1"),
						new StringElement ("Imagen 2"),
						new StringElement ("Imagen 3"),
						new StringElement ("Imagen 4"),
					}
				},
				ViewControllers = new []
				{
					new UIViewController{ View=new UIImageView{Image = UIImage.FromFile ("Imagen1.jpg")}},
					new UIViewController{ View=new UIImageView{Image = UIImage.FromFile ("Imagen2.jpg")}},
					new UIViewController{ View=new UIImageView{Image = UIImage.FromFile ("Imagen3.jpg")}},
					new UIViewController{ View=new UIImageView{Image = UIImage.FromFile ("Imagen4.jpg")}},
				},
			};
			Navegacion.ToggleMenu();
			View.AddSubview(Navegacion.View);
		}
        public override void ViewDidLoad()
        {
            base.ViewDidLoad ();
            // Create the flyout view controller, make it large,
            // and add it as a subview:
            navigation = new FlyoutNavigationController ();
            navigation.Position = FlyOutNavigationPosition.Left;

            navigation.View.Frame = UIScreen.MainScreen.Bounds;
            navigation.MenuBorderColor = UIColor.DarkGray;
            navigation.TintColor = UIColor.DarkGray;
            navigation.ShadowViewColor = UIColor.DarkGray;

            View.AddSubview (navigation.View);
            this.AddChildViewController (navigation);

            // Create the menu:

            navigation.NavigationRoot = new RootElement ("Menu")
            {
                new Section ("EZ Menu")
                {
                    from page in menuPages
                    select new StringElement (page) as Element
                }

            };

            navigationPages = new UINavigationController[5];
            navigationPages [0] = new UINavigationController (new SelectClientPage (navigation, "Select Client"));
            navigation.ViewControllers = navigationPages;
        }
Esempio n. 8
0
		public override void ViewDidLoad ()
		{
			base.ViewDidLoad ();
			var navigation = new FlyoutNavigationController () {
				NavigationRoot = new RootElement("ViveBus"){
					new Section("Menu"){
						new StringElement ("Mapa"),
						new StringElement ("FAQS"),
						new StringElement ("Acerca de"),
					}
				},
			};
			navigation.ViewControllers = new UIViewController[] {
				new MapViewController(navigation),
				new InformationViewController(navigation, "Preguntas Frecuentes", "faqs.json"),
				new InformationViewController(navigation,"Acerca de", "about.json"),
			};
			navigation.View.Frame = UIScreen.MainScreen.Bounds;
			navigation.HideShadow = true;
			navigation.ShouldReceiveTouch += (recognizer, touch) => {
				if(touch.View.Superview.GetType() == typeof(MapView)){
					return false;
				}else{

					return true;
				}
			};
			View.AddSubview (navigation.View);
			navigation.NavigationTableView.AddCSSClass ("menu-table");
		}
Esempio n. 9
0
		public override void ViewDidLoad ()
		{
			base.ViewDidLoad ();
			var navigation = new FlyoutNavigationController() {
				// Create the navigation menu
				NavigationRoot = new RootElement ("Navigation") {
					MainSection
				}
			};

			navigation.TintColor = Theme.PrimaryColor;

			var liveChatController = (LiveChatViewController)this.Storyboard.InstantiateViewController ("LiveChatViewControllerId");
			liveChatController.Navigation = navigation;
			var settings = new SettingsViewController (navigation);
			navigation.ViewControllers = new [] {
				new UINavigationController (new WatsonChatViewController (navigation)),
				new UINavigationController (liveChatController),
				new UINavigationController (settings),
			};

			MainSection.HeaderView = new UIView (new CGRect (navigation.NavigationRoot.TableView.Frame.X, navigation.NavigationRoot.TableView.Frame.Y, navigation.NavigationRoot.TableView.Frame.Width, 140)){
				BackgroundColor = UIColor.Clear
			};
			NameLabel = new UILabel (new CGRect (navigation.NavigationRoot.TableView.Frame.X + 20, 100, navigation.NavigationRoot.TableView.Frame.Width - 20, 40)) {
				Text = string.Format("Hi {0}!",App.UserName),
				TextColor = Theme.DarkPrimaryColor
			};
			MainSection.HeaderView.AddSubview (NameLabel);
			// Show the navigation view
			View.AddSubview (navigation.View);
		}
Esempio n. 10
0
        public FieldImage(string farmName,int farmID,FlyoutNavigationController fnc,SelectField sf)
            : base(UITableViewStyle.Grouped, null)
        {
            Root = new RootElement (null) {};
            this.Pushing = true;

            var section = new Section () {};
            var totalRainGuage = new StringElement ("Total Raid Guage(mm): " + DBConnection.getRain (farmID),()=>{});
            var rainGuage=new EntryElement ("New Rain Guage(mm): ",null,"         ");
            rainGuage.KeyboardType = UIKeyboardType.NumbersAndPunctuation;
            var update=new StringElement("Add",()=>{
                try{
                DBConnection.updateRain(farmID,Int32.Parse(rainGuage.Value));
                }
                catch(Exception e){
                    new UIAlertView ("Error", "Wrong input format!", null, "Continue").Show ();
                    return;
                }
                UIAlertView alert = new UIAlertView ();
                alert.Title = "Success";
                alert.Message = "Your Data Has Been Saved";
                alert.AddButton("OK");
                alert.Show();
            });
            var showDetail=new StringElement("Show Rain Guage Detail",()=>{
                RainDetail rd=new RainDetail(farmID,farmName);
                sf.NavigationController.PushViewController(rd,true);
            });
            section.Add (totalRainGuage);
            section.Add (rainGuage);
            section.Add (update);
            section.Add (showDetail);

            Root.Add (section);

            var section2 = new Section () { };
            var farmImg=UIImage.FromFile ("img/"+farmName+".jpg");
            if(farmImg==null)
                farmImg=UIImage.FromFile ("Icon.png");
            var imageView = new UIImageView (farmImg);
            if(farmImg==null)
                farmImg=UIImage.FromFile ("Icon.png");

            var scrollView=new UIScrollView (
                new RectangleF(0,0,fnc.View.Frame.Width-20,250)
            );

            scrollView.ContentSize = imageView.Image.Size;
            scrollView.AddSubview (imageView);

            scrollView.MaximumZoomScale = 3f;
            scrollView.MinimumZoomScale = .1f;
            scrollView.ViewForZoomingInScrollView += (UIScrollView sv) => { return imageView; };

            var imageElement=new UIViewElement(null,scrollView,false);
            section2.Add(imageElement);
            Root.Add (section2);
        }
Esempio n. 11
0
		public WatsonChatViewController(FlyoutNavigationController navigation)
		{
			this.navigation = navigation;

//			UIApplication.Notifications.ObserveContentSizeCategoryChanged (delegate {
//			
//				CollectionView.CollectionViewLayout.MessageBubbleFont = UIFont.PreferredBody;
//				CollectionView.UpdateConstraints();
//			});
		}
 public OpenMenuGestureRecognizer(NSObject target, Selector action,FlyoutNavigationController parent)
     : base(target,action)
 {
     Parent = parent;
     this.ShouldReceiveTouch += (sender,touch)=> {
         if(touch.View is UISlider || touch.View is MPVolumeView)
             return false;
         return Parent.shouldReceiveTouch(sender,touch);
     };
 }
Esempio n. 13
0
		public override void ViewDidLoad ()
		{
			base.ViewDidLoad ();
			// create a slideout navigation controller with the top navigation controller and the menu view controller
			navigation = new FlyoutNavigationController {
				// Create the navigation menu
				NavigationRoot = new RootElement ("Navigation") {
					new Section ("Lịch Học") {

						new ImageStringElement("Theo Học Kỳ",UIImage.FromBundle("menupic/Iclichhoc.png")),
						new ImageStringElement("Theo Tuần",UIImage.FromBundle("menupic/calendar.png")),
					},
					new Section ("Điểm Thi") {

						new ImageStringElement("Theo Học Kỳ ",UIImage.FromBundle("menupic/Icdiemthi.png")),
						new ImageStringElement("Tất Cả ",UIImage.FromBundle("menupic/IcAdiemthi.png")),
					}
					,
					new Section ("Học Phí-Lịch Thi") {

						new ImageStringElement("Lịch Thi",UIImage.FromBundle("menupic/Iclichthi.png")),

						new ImageStringElement("Học Phí",UIImage.FromBundle("menupic/Ichocphi.png")),


					},
					new Section("Ứng Dụng") {
						new ImageStringElement("Cài đặt",UIImage.FromBundle("menupic/Icsettings.png")),
						new ImageStringElement("Đăng xuất",UIImage.FromBundle("menupic/signout.png")),
					}
				},
				// Supply view controllers corresponding to menu items:
				ViewControllers = new UIViewController[] {
					new VCLichHoc(),
					new VCLichHocTuan(),

					new VCDiemThi(),
					new VCADiemThi(),
					new VCLichThi(),
					new VCHocPhi(),
					new VCSettings(),

				},
			};
			// Show the navigation view

			navigation.SelectedIndexChanged = new Action (() => {
				if (navigation.SelectedIndex==7)
				{
					ApiHelper.LogOut();
				}
			});
			View.AddSubview (navigation.View);
			// Perform any additional setup after loading the view, typically from a nib.
		}
			public TaskPageController (FlyoutNavigationController navigation, string title) : base (null)
			{
				Root = new RootElement (title) {
					new Section {
						new CheckboxElement (title)
					}
				};
				NavigationItem.LeftBarButtonItem = new UIBarButtonItem (UIBarButtonSystemItem.Action, delegate {
					navigation.ToggleMenu ();
				});
			}
Esempio n. 15
0
 public OpenMenuGestureRecognizer(NSObject target, Selector action, FlyoutNavigationController parent) : base(target, action)
 {
     Parent                   = parent;
     this.Direction           = UISwipeGestureRecognizerDirection.Right;
     this.ShouldReceiveTouch += (sender, touch) => {
         if (touch.View is UISlider || touch.View is MPVolumeView)
         {
             return(false);
         }
         return(Parent.shouldReceiveTouch(sender, touch));
     };
 }
 public OpenMenuGestureRecognizer(NSObject target, Selector action,FlyoutNavigationController parent)
     : base(target,action)
 {
     Parent = parent;
     this.ShouldReceiveTouch += (sender,touch)=> {
         //Ugly hack to ignore touches that are on a cell that is moving...
         bool isMovingCell = touch.View.ToString().IndexOf("UITableViewCellReorderControl",StringComparison.InvariantCultureIgnoreCase) > -1;
         if(touch.View is UISlider || touch.View is MPVolumeView || isMovingCell)
             return false;
         return Parent.shouldReceiveTouch(sender,touch);
     };
 }
Esempio n. 17
0
		public SettingsViewController (FlyoutNavigationController navigation) : base(new RootElement("Settings"))
		{
			Navigation = navigation;
			nameElement = new EntryElement ("Name", null, null);
			nameElement.EntryEnded += (object sender, EventArgs e) => { 
				App.UserName = nameElement.Value;
				HomeNavigationController.UpdateName();
			};

			url = new StringElement ("Url");
			dialogId = new StringElement ("Dialog Id");
			userId = new StringElement ("User Id");


			Root.Add (new Section ("USER INFO"){ nameElement });
			Root.Add(
				new Section ("WATSON CONFIGURATION") { 
					url,
					dialogId,
					userId,
				});
			

			var reconfigureElement = new StringElement ("RECONFIGURE", async () => {
				spinner.StartAnimating ();
				BluemixDialogService bluemixService;
				UIAlertController alert;
				bool isSuccess = false;
				bluemixService = new BluemixDialogService ();

				try {
					await bluemixService.ReConfigureService ();
					isSuccess = true;
				} catch (Exception ex) {
					bluemixService.ConfigureDefaultService();
					System.Diagnostics.Debug.WriteLine ("Ask X: Exception Occurred: " + ex.Message);
					Xamarin.Insights.Report (ex);
				} finally {
					SetValues (true);
					spinner.StopAnimating ();
					if (isSuccess)
						alert = UIAlertController.Create("Watson Configuration", "Updated successfully!", UIAlertControllerStyle.Alert);
					else
						alert = UIAlertController.Create("Watson Configuration", "Oops! Configuration failed. Set to default.", UIAlertControllerStyle.Alert);
					alert.AddAction (UIAlertAction.Create ("Ok", UIAlertActionStyle.Default, null));
					PresentViewControllerAsync(alert, true);
				}
			});

			reconfigureElement.Alignment = UITextAlignment.Center;
			Root.Add (new Section(null, "New configuration will be updated from the server."){reconfigureElement});

		}
 public OpenMenuGestureRecognizer(NSObject target, Selector action, FlyoutNavigationController parent) : base(target, action)
 {
     Parent = parent;
     this.ShouldReceiveTouch += (sender, touch) => {
         //Ugly hack to ignore touches that are on a cell that is moving...
         bool isMovingCell = touch.View.ToString().IndexOf("UITableViewCellReorderControl", StringComparison.InvariantCultureIgnoreCase) > -1;
         if (touch.View is UISlider || touch.View is MPVolumeView || isMovingCell)
         {
             return(false);
         }
         return(Parent.shouldReceiveTouch(sender, touch));
     };
 }
        public SelectClientPage(FlyoutNavigationController navigation, string title)
        {
            menuButton = new UIBarButtonItem
                (
                    UIImage.FromFile ("*****@*****.**"),
                    UIBarButtonItemStyle.Plain,
                    (s, e) => {
                        navigation.ToggleMenu(); }
                );

            NavigationItem.LeftBarButtonItem = menuButton;
            NavigationItem.Title = "A";
        }
        public override void ViewDidLoad()
        {
            base.ViewDidLoad ();
            // Perform any additional setup after loading the view, typically from a nib.
            //			this.backgroundImage.Image = UIImage.FromBundle ("Welcome.png");

            //			ESTBeaconRegion beaconRegion = new ESTBeaconRegion (46790, 29975, "BlueBeacon");
            //			beaconManage.Delegate = new BeaconManagerDelegate ();
            //			beaconManage.AvoidUnknownStateBeacons = true;
            //			beaconManage.StartRangingBeaconsInRegion (beaconRegion);
            //			Console.WriteLine ("I'm finishign here");

            navigation = new FlyoutNavigationController ();
            navigation.View.Frame = UIScreen.MainScreen.Bounds;
            View.AddSubview (navigation.View);

            // Create the menu:
            //			navigation.NavigationRoot = new RootElement ("Play With Estimote") {
            //				new Section ("Play With Estimote") {
            //					new StringElement (featureMenu[0]),
            //					new StringElement (featureMenu[1]),
            //					new StringElement (featureMenu[2]),
            //					new StringElement (featureMenu[3]),
            //					new StringElement (featureMenu[4]),
            //				}
            //			};

            navigation.NavigationRoot = new RootElement ("Play With Estimote", new RadioGroup("session", 0)) {
                new Section ("Estimote Beacon Demo") {
                    new RadioElement(featureMenu[0], "session"),
                    new RadioElement(featureMenu[1], "session"),
                    new RadioElement(featureMenu[2], "session"),
                    new RadioElement(featureMenu[3], "session"),
                    new RadioElement(featureMenu[4], "session")
                }
            };

            // Create an array of UINavigationControllers that correspond to your
            // menu items:
            navigation.ViewControllers = new[] {
                new UINavigationController (new EventListViewController_iPhone (navigation)),
                new UINavigationController (new LabsViewController (navigation)),
                new UINavigationController (new RoleSelectController(navigation)),
                new UINavigationController (new EstimoteProximityController (navigation)),
                new UINavigationController (new ProximityDemoViewController (navigation)),
            //				new UINavigationController(new BeaconScanGuide(navigation)),
            };
        }
Esempio n. 21
0
		public PageOne (FlyoutNavigationController navigation, string title) : base(null)
		{
			menuButton = new UIBarButtonItem 
				(
					UIImage.FromFile ("*****@*****.**"),
					UIBarButtonItemStyle.Plain,
					(s, e) => {
						navigation.ToggleMenu(); }
				);
			
			NavigationItem.LeftBarButtonItem = menuButton;

			Root = new RootElement ("Page One") 
			{ 

			};
			
		}
Esempio n. 22
0
        public override void DidReceiveMemoryWarning()
        {
            // Releases the view if it doesn't have a superview.
            base.DidReceiveMemoryWarning ();
            fnc = new FlyoutNavigationController ();
            fnc.View.Frame = UIScreen.MainScreen.Bounds;
            View.AddSubview (fnc.View);

            // Create the field:
            fnc.NavigationRoot = new RootElement ("Task List") {
                new Section ("Task List") {
                    from page in Tasks
                        select new StringElement (page) as Element
                }
            };

            // Release any cached data, images, etc that aren't in use.
        }
Esempio n. 23
0
		//
		// This method is invoked when the application has loaded and is ready to run. In this 
		// method you should instantiate the window, load the UI into it and then make the window
		// visible.
		//
		// You have 17 seconds to return from this method, or iOS will terminate your application.
		//
		public override bool FinishedLaunching (UIApplication app, NSDictionary options)
		{
			window = new UIWindow (UIScreen.MainScreen.Bounds);

			SetAppearance();

			FlyoutNavigationController.MenuWidth = 80;
			navigation = new FlyoutNavigationController {
				// Create the navigation menu
				NavigationRoot = new RootElement ("Navigation") {
					new Section ("") {
						new IconElement (Resources.KickstarterIcon, "Kickstarter"),
						new IconElement (Resources.ActivityIcon, "Activity"),
						new IconElement (Resources.ProfileIcon, "Profile"),
					}
				},
				// Supply view controllers corresponding to menu items:
				ViewControllers = new [] {
					new UINavigationController(new KickstarterViewController()),
					new UINavigationController(new ActivityViewController()),
					new UINavigationController(new ProfileViewController()),
				},
			};

			navigation.NavigationRoot.TableView.SeparatorStyle = UITableViewCellSeparatorStyle.DoubleLineEtched;
			navigation.NavigationRoot.TableView.BackgroundColor = UIColor.Black;
			navigation.NavigationRoot.TableView.ScrollEnabled = false;
			// Show the navigation view
			//navigation.ToggleMenu ();
			//navigation.SelectedIndex = 2;



			
			window.RootViewController = navigation;
			window.MakeKeyAndVisible ();
			
			return true;
		}
		public override void ViewDidLoad ()
		{
			flyout = new FlyoutNavigationController {
				NavigationRoot = new RootElement ("Willie's Cycles") {
					new Section () {
						new StyledStringElement ("Search for Parts") { Font = UIFont.FromName ("SegoeUI-Light", 20f) }
					},
					new Section () {
						new StyledStringElement ("About") { Font = UIFont.FromName ("SegoeUI-Light", 20f) },
						// new StyledStringElement ("Photo Gallery") { Font = UIFont.FromName ("SegoeUI-Light", 20f) },
						new StyledStringElement ("Terms of Service") { Font = UIFont.FromName ("SegoeUI-Light", 20f) },
						new StyledStringElement ("Licensure") { Font = UIFont.FromName ("SegoeUI-Light", 20f) }
					}
				}
			};

			var searchViewController = new UINavigationController (new SearchViewController (flyout));
			searchViewController.NavigationBar.BarTintColor = UIColor.Clear.FromHexString ("#094074", 1.0f);
			searchViewController.NavigationBar.TintColor = UIColor.White;
			searchViewController.NavigationBar.Translucent = false;
			searchViewController.NavigationBar.TitleTextAttributes = new UIStringAttributes () { Font = UIFont.FromName ("SegoeUI-Light", 20f), ForegroundColor = UIColor.White };

			var aboutViewController = new AboutViewController (flyout);
			// var photoGalleryViewController = new PhotoGalleryViewController (flyout);
			var disclaimerViewController = new DisclaimerViewController (flyout);
			var licensureViewController = new LicensureViewController (flyout);

			flyout.ViewControllers = new UIViewController[] {
				searchViewController,
				aboutViewController,
				// photoGalleryViewController,
				disclaimerViewController,
				licensureViewController
			};

			View.AddSubview (flyout.View);
		}
        public override void ViewDidLoad()
        {
            base.ViewDidLoad();

            // Create the flyout view controller, make it large,
            // and add it as a subview:
            navigation = new FlyoutNavigationController();
            navigation.Position = FlyOutNavigationPosition.Left;
            navigation.View.Frame = UIScreen.MainScreen.Bounds;
            View.AddSubview(navigation.View);
            this.AddChildViewController(navigation);

            // Create the menu:
            navigation.NavigationRoot = new RootElement("Menu") {
                new Section ("Menu") {
                   new StringElement("Recent Events"),
                   new StringElement("Create Event"),
                   new StringElement("Delete Event"),
                   new StringElement("Calendar"),
                   new StringElement("Overtime Schedule"),
                   new StringElement("Setting"),
                   new StringElement("Logout", delegate {DismissModalViewController(true); }),
                }
            };
            // Create an array of UINavigationControllers that correspond to your
            // menu items:

            navigation.ViewControllers = new[] {
               new UINavigationController((RecentEventsController)this.Storyboard.InstantiateViewController("RecentEventsController")),
               new UINavigationController(new CreateEventController()),
               new UINavigationController(new DeleteEventController()),
               new UINavigationController((RecentEventsController)this.Storyboard.InstantiateViewController("RecentEventsController")),
               new UINavigationController((RecentEventsController)this.Storyboard.InstantiateViewController("RecentEventsController")),
               new UINavigationController((RecentEventsController)this.Storyboard.InstantiateViewController("RecentEventsController")),
            };

        }
Esempio n. 26
0
		public RootViewController () : base ("RootViewController", null)
		{
			instance = this;
			navigation = new FlyoutNavigationController ();
		}
Esempio n. 27
0
        public SelectField(String farmName,int farmID,int fieldNumber)
            : base(UITableViewStyle.Grouped, null)
        {
            Root = new RootElement (farmName) {};
            this.Pushing = true;

               			var fnc = new FlyoutNavigationController() { };
            fnc.View.Frame = UIScreen.MainScreen.Bounds;
            View.AddSubview (fnc.View);

            // button for slide out fields
            /*
            this.NavigationItem.SetRightBarButtonItem(new UIBarButtonItem (UIBarButtonSystemItem.Action, (s,e)=> {
                fnc.ToggleMenu ();
            }),true);
            */
            this.NavigationItem.SetRightBarButtonItem(new UIBarButtonItem("Field", UIBarButtonItemStyle.Plain, (sender,args) => {fnc.ToggleMenu ();}), true);

            //create the menu
            var fields = DBConnection.getAllFields(farmID);
            var menuSection = new Section ("Fields") {};
            foreach(Field field in fields){
                var fieldID=field.fieldID;//change this
                var fieldName=field.fieldName;//change this

                var fieldNameElment=new StringElement(fieldName,()=>{
                    Selection selection=new Selection(farmName,fieldName,fieldID);
                    this.NavigationController.PushViewController(selection,true);
                });
                menuSection.Add (fieldNameElment);
            }

            fnc.NavigationRoot=new RootElement("Fields"){menuSection};

            fnc.ViewControllers=new []{
                new FieldImage(farmName,farmID,fnc,this),
                //new UIViewController { View = new UILabel { Text = "Animals (drag right)" } },
            };
        }
		public SearchViewController (FlyoutNavigationController flyoutViewController)
		{
			flyout = flyoutViewController;
		}
Esempio n. 29
0
 public BeaconScanGuide(FlyoutNavigationController navigation)
     : base("BeaconScanGuide", null)
 {
     this.navigation = navigation;
 }
 public EstimoteProximityController(FlyoutNavigationController navitation)
     : base("EstimoteProximityController", null)
 {
     this.navigation = navitation;
     beaconManager = new ESTBeaconManager();
 }
		public LicensureViewController (FlyoutNavigationController flyoutViewController)
		{
			flyout = flyoutViewController;	
		}
Esempio n. 32
0
		public InformationViewController (FlyoutNavigationController navigation,String title, String filename )
		{	
			navigationViewController = new NavigationViewController (navigation, title);
			dialogViewController = new DialogViewController (JsonElement.FromFile (filename));
		}