public override void ViewDidLoad() { base.ViewDidLoad (); InitActiveField (); items = GetActiveGalleryItems (); Console.WriteLine (items.Count); var imgView = new UIImageView (BlueSea.MakeBlueSea ()) { ContentMode = UIViewContentMode.ScaleToFill, AutoresizingMask = UIViewAutoresizing.All, Frame = View.Bounds }; View.AddSubview (imgView); View.SendSubviewToBack (imgView); carousel = new CarouselView (UIScreen.MainScreen.Bounds); //carousel. = images.Count; carousel.DataSource = new GalleryDataSource (this); gd = new GalleryDelegate (this); carousel.Delegate = gd; carousel.CarouselType = CarouselType.CoverFlow; carousel.ConfigureView (); View.AddSubview (carousel); // // tap = new UITapGestureRecognizer (Tapped); // tap.NumberOfTapsRequired = 1; // carousel.AddGestureRecognizer (tap); View.AddSubview (carousel); //CreateAddBarButton (); //CreateDeleteBarButton (); //carousel.CurrentItemIndex //InitSateliteMenu (); menu = new IndexerSateliteMenu ("Gallery", this); View.Add (menu.View); CreateOptions (); View.BringSubviewToFront (ActiveText); }
public override void ViewDidLoad() { base.ViewDidLoad (); Title = AppDelegate.its.getTranslatedText ("Indexer Dashboard"); this.NavigationController.NavigationBar.Translucent = true; Background back = new Background (); Add (back.View); View.SendSubviewToBack (back.View); float mapHeight = 200; const float navbarHeight = 100; const float panelContentHeight = 1000; if (!UserInterfaceIdiomIsPhone) { mapHeight = 450; } MainMap = new OverSightMap (new RectangleF (10, navbarHeight, UIScreen.MainScreen.Bounds.Width - buffer * 2, mapHeight), this); View.AddSubview (MainMap.View); if (AppDelegate.Variant == "LITE") { adView = new GADBannerView (size: GADAdSizeCons.Banner, origin: new PointF (0, navbarHeight + mapHeight)) { AdUnitID = AppDelegate.AdmobID, RootViewController = this }; adView.DidReceiveAd += (sender, args) => { if (!viewOnScreen) View.AddSubview (adView); viewOnScreen = true; }; adView.LoadRequest (GADRequest.Request); } float statpanelwidth = UIScreen.MainScreen.Bounds.Width / 3; float rightPanelWidth = UIScreen.MainScreen.Bounds.Width - statpanelwidth - 3*buffer; const float headerheight = 100; float panelsHeight = UIScreen.MainScreen.Bounds.Height - mapHeight - buffer; const float panelY = headerheight + buffer; statpanel = new StatisticsPanel (new SizeF(statpanelwidth,panelContentHeight)); statpanelScroll = new UIScrollView (new RectangleF(buffer, mapHeight + buffer + navbarHeight, statpanelwidth, panelsHeight)); statpanelScroll.AddSubview (statpanel.View); // foreach (UIGestureRecognizer uig in statpanel.View.GestureRecognizers) { // uig.Delegate = new SwipeDelegate (); // } statpanelScroll.ContentSize = new SizeF (statpanelwidth, panelContentHeight); statpanelScroll.UserInteractionEnabled = true; View.AddSubview (statpanelScroll); rightPanelRect = new RectangleF (statpanelwidth + buffer, mapHeight + buffer + navbarHeight, rightPanelWidth, panelsHeight); rightPanel = new DashboardRightPanel (rightPanelWidth, this); // DashBoardHeader header = new DashBoardHeader (new RectangleF(0, 20 ,UIScreen.MainScreen.Bounds.Width, 22)); // View.AddSubview (header.View); AddSearchBar (); // search.AutosizesSubviews = false; // search.SizeToFit (); View.AddSubview (Search); rightPanelScroll = new UIScrollView (rightPanelRect); rightPanelScroll.ContentSize = rightPanel.getSize (); rightPanelScroll.AddSubview (rightPanel.View); rightPanelScroll.ShowsVerticalScrollIndicator = false; rightPanelScroll.UserInteractionEnabled = true; View.AddSubview (rightPanelScroll); menu = new IndexerSateliteMenu ("Dashboard", this); menu.View.UserInteractionEnabled = true; // foreach (UIGestureRecognizer uig in menu.View.GestureRecognizers) { // uig.Delegate = new SwipeDelegate (); // } View.AddSubview (menu.View); AddHelpButton (); AddSettingsButton (); curtainsIsDown = true; PullDownCurtain (); if (UserInterfaceIdiomIsPhone) { menu.SateliteButton.TouchUpInside += (object sender, EventArgs e) => ToggleCurtains (); } }