Beispiel #1
0
        public override void ViewDidLoad()
        {
            base.ViewDidLoad ();

            LoadWords ();

            Background back = new Background();
            View.Add(back.View);
            View.SendSubviewToBack (back.View);

            RectangleF resultsRect = new RectangleF (0, 75, View.Bounds.Width, View.Bounds.Height - 75);
            resultsTable = new UITableView (resultsRect);
            resultsTable.BackgroundColor = UIColor.Clear;
            Add (resultsTable);
            searchBar = new UISearchBar (new RectangleF(0, 0, View.Bounds.Width, 40));
            searchBar.Text = this.initialSearch;
            Add (searchBar);

            tableSource = new WordsTableSource(this);
            resultsTable.Source = tableSource;

            searchBar.SearchButtonClicked += (s, e) => searchBar.ResignFirstResponder ();

            // refine the search results every time the text changes
            searchBar.TextChanged += (s, e) => RefineSearchItems ();

            RefineSearchItems ();
        }
Beispiel #2
0
        public override void ViewDidLoad()
        {
            base.ViewDidLoad ();
            RectangleF frame;

            Background back = new Background ();
            View.AddSubview (back.View);
            View.SendSubviewToBack (back.View);

            if (UserInterfaceIdiomIsPhone) {
                frame = new RectangleF (10, 110, UIScreen.MainScreen.Bounds.Width - 20, 125);
            } else {
                frame = new RectangleF (10, 450, UIScreen.MainScreen.Bounds.Width - 20, 125);
            }
            tlc = new TagListController (tag, frame);
            this.Add (tlc.View);
            backOne = new UIBarButtonItem (backarrow.MakeBackArrow (), UIBarButtonItemStyle.Plain, null);

            backAll = new UIBarButtonItem (Xmark.MakeImage (), UIBarButtonItemStyle.Plain, null);

            backOne.Clicked += (object sender, EventArgs e) => {
                if(ancestor != null){
                    ancestor.ReleaseLock();
                }
                this.NavigationController.PopViewControllerAnimated (true);
            };
            backAll.Clicked += (object sender, EventArgs e) => {
                if(ancestor != null){
                    ancestor.ReleaseLock();
                }
                this.NavigationController.PopToRootViewController (true);
            };

            UIBarButtonItem[] leftbuttons = { backOne, backAll };

            this.NavigationItem.SetLeftBarButtonItems (leftbuttons, true);

            this.ShowDetails (tag);
            CreateMenuOptions ();

            //			CreateSlideDownMenu ();

            //			UIButton backbutton = new UIButton(new RectangleF(10,25,48,32));
            //			backbutton.SetImage (backarrow.MakeBackArrow(), UIControlState.Normal);
            //			backbutton.TouchUpInside += (object sender, EventArgs e) => {
            //				var handler = this.backpush;
            //				if (handler != null) {
            //					handler (this, new BackClickedEventArgs ());
            //				}
            //				DismissViewControllerAsync (true);
            //			};
            //			Add (backbutton);
        }
        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 ();
            }
        }
Beispiel #4
0
        public override void ViewDidLoad()
        {
            base.ViewDidLoad ();
            this.NavigationController.NavigationBar.BackgroundColor = UIColor.Clear;

            RectangleF neo = new RectangleF (0, 0, UIScreen.MainScreen.Bounds.Width, 1000);

            Background back = new Background ();
            View.Add (back.View);
            View.SendSubviewToBack (back.View);

            UIScrollView scrollview = new UIScrollView (View.Bounds);

            innerViewController = new StorageScreenContent (View.Bounds, lm, scrollview, this);
            innerViewController.View.UserInteractionEnabled = true;
            scrollview.UserInteractionEnabled = true;
            this.View.UserInteractionEnabled = true;
            scrollview.ContentSize = neo.Size;
            scrollview.AddSubview (innerViewController.View);
            scrollview.BackgroundColor = UIColor.Clear;
            Add (scrollview);

            //			innerview.ContentSize = cdc.GetContentsize ();
            //			innerview.AddSubview (cdc.View);
            //			innerview.BackgroundColor = UIColor.Clear;

            //			UIView mymy = this.View;
            //
            //			BlackLeatherTheme.Apply (this.View);

            //			SetPlaceholders ();
            //			Title = MonoTouch.Foundation.NSBundle.MainBundle.LocalizedString ("Storage Data", "Storage Data");

            //			fillEst.MinValue = 0f;
            //			fillEst.MaxValue = 1f;
            //			fillEst.Value = 0.5f; // initial value
            //			fh = new FileHandler ();
            //			dao = new LagerDAO();
            //			lm = dao.readTopItem ();
            //			lm = fh.ReadLagerData ();

            ShowDetails (lm);

            //			AddContactKeyButtons ();

            //			storageName.CommitEditing +=(sender, e) => {
            //				lm.Name = storageName.Text;
            //
            //			};

            //			var b = new GlassButton(bounds){
            ////				Font =
            //			};

            // Perform any additional setup after loading the view, typically from a nib.
        }