Ejemplo n.º 1
0
		public CartridgeDetail (AppDelegate appDelegate) : base ("CartridgeDetail", null)
		{
			this.appDelegate = appDelegate;

			// OS specific details
			if (new Version (UIDevice.CurrentDevice.SystemVersion) >= new Version(7,0)) 
			{
				// Code that uses features from Xamarin.iOS 7.0
				this.EdgesForExtendedLayout = UIRectEdge.None;
			}
		}
Ejemplo n.º 2
0
		public CartridgeList (AppDelegate app) : base()
		{
			this.appDelegate = app;

			// OS specific details
			if (new Version (UIDevice.CurrentDevice.SystemVersion) >= new Version(7,0)) 
			{
				// Code that uses features from Xamarin.iOS 7.0
				this.EdgesForExtendedLayout = UIRectEdge.None;
			}

			// Create source for table view
			cartListSource = new CartridgeListSource();
			cartListSource.OnSelect = OnSelect;

			// Create table view
			Table = new UITableView()
			{
				Source = cartListSource,
				AutoresizingMask = UIViewAutoresizing.All,
				AutosizesSubviews = true
			};
		}
Ejemplo n.º 3
0
		public ScreenController (AppDelegate appDelegate, Cartridge cart, Boolean restore)
		{
			// Save for later use
			this.appDelegate = appDelegate;
			this.cart = cart;
			this.restore = restore;

			// Set color of NavigationBar and NavigationButtons (TintColor)
			if (new Version (UIDevice.CurrentDevice.SystemVersion) >= new Version(7,0)) 
				NavigationBar.SetBackgroundImage (Images.BlueTop, UIBarMetrics.Default);
			else
				NavigationBar.SetBackgroundImage (Images.Blue, UIBarMetrics.Default);

			// Create Location Manager
			locationManager = new CLLocationManager ();
			locationManager.DesiredAccuracy = CLLocation.AccurracyBestForNavigation;
			if (CLLocationManager.LocationServicesEnabled) {
				locationManager.StartUpdatingLocation ();
			}

			// Now check, if location is accurate enough
			checkLocation = new CheckLocation(this, locationManager);
			PushViewController (checkLocation, true);
		}