예제 #1
0
 public CoachPageBase(IWebDriver driver) : base(driver)
 {
     //TODO: Verify page
     _navigationBar = new NavigationBar(driver, By.Id("navtop"));
     _settingsIcon  = new SettingsIcon(driver);
     //ClosePopWindow(driver);
 }
예제 #2
0
        /// <summary>
        /// Page is appeared to screen and animation is finished
        /// </summary>
        public virtual void OnAppeared(AppearEventArgs args)
        {
            if (IsDebugEnabled)
            {
                Debug.WriteLine(NavigationBar.GetTitle(this) + ": OnAppeared");
            }

            LifecycleState = LifecycleStates.Appeared;

            if (ContentCreateEvent == ContentCreateEvents.Appeared && ContentTemplate != null && Content is View == false && _contentElement == null)
            {
                if (_contentElement != null && Children.Contains(_contentElement))
                {
                    Children.Remove(_contentElement);
                }

                _contentElement = ContentTemplate.CreateContent() as View;
                Children.Insert(0, _contentElement);

                if (Content != null)
                {
                    _contentElement.BindingContext = Content;
                }
            }
        }
예제 #3
0
        /// <summary>
        ///
        /// </summary>
        protected override SizeRequest OnMeasure(double widthConstraint, double heightConstraint)
        {
            Size s = new Size();

            if (NavigationBar != null && NavigationBar.IsVisible)
            {
                m_navigationBarSizeRequest = NavigationBar.Measure(widthConstraint, heightConstraint, MeasureFlags.IncludeMargins);
            }
            else
            {
                m_navigationBarSizeRequest = new SizeRequest();
            }

            if (Header != null && Header.IsVisible)
            {
                m_headerSizeRequest = Header.Measure(widthConstraint, heightConstraint, MeasureFlags.IncludeMargins);
            }
            else
            {
                m_headerSizeRequest = new SizeRequest();
            }

            if (Footer != null && Footer.IsVisible)
            {
                m_footerSizeRequest = Footer.Measure(widthConstraint, heightConstraint, MeasureFlags.IncludeMargins);
            }
            else
            {
                m_footerSizeRequest = new SizeRequest();
            }

            if (Content != null)
            {
                m_contentSizeRequest = Content.Measure(widthConstraint, heightConstraint, MeasureFlags.IncludeMargins);
            }
            else
            {
                m_contentSizeRequest = new SizeRequest();
            }

            if (HorizontalOptions.Alignment == LayoutAlignment.Fill && double.IsInfinity(widthConstraint) == false)
            {
                s.Width = widthConstraint;
            }
            else
            {
                s.Width = m_contentSizeRequest.Request.Width;
            }

            if (VerticalOptions.Alignment == LayoutAlignment.Fill && double.IsInfinity(heightConstraint) == false)
            {
                s.Height = heightConstraint;
            }
            else
            {
                s.Height = m_contentSizeRequest.Request.Height + m_headerSizeRequest.Request.Width + m_navigationBarSizeRequest.Request.Height;
            }

            return(new SizeRequest(s, s));
        }
        public void ThenISeeMainNavigationMenu()
        {
            NavigationBar navigationBar = dashboardPage.NavigationBar;
            Link          menuItem      = null;

            try
            {
                menuItem = navigationBar.ToolsMenuItemLink;
            }
            catch (MissingElementException)
            {
                //the ToolsMenuItemLink shoud not be visible, so this would be ok.
            }

            try
            {
                menuItem = navigationBar.OfficesMenuItemLink;
            }
            catch (MissingElementException)
            {
                //the OfficesMenuItemLink shoud not be visible, so this would be ok.
            }

            menuItem.Should().BeNull("Dashboard, Tools and Offices menu items are hidden");
        }
        protected override void OnElementChanged(VisualElementChangedEventArgs e)
        {
            base.OnElementChanged(e);

            NavigationBar.SetBackgroundImage(new UIKit.UIImage(), UIKit.UIBarMetrics.Default);
            NavigationBar.ShadowImage = new UIKit.UIImage();
        }
예제 #6
0
        public ReservationsNurse(Panel previousPanel)
        {
            // Init previous panel
            this.PreviousPanel = previousPanel;

            // Init panel
            this.Panel           = new Panel();
            this.Panel.AutoSize  = true;
            this.Panel.Location  = new Point(0, 0);
            this.Panel.Name      = "reservationsnurseMainPanel";
            this.Panel.Size      = new Size(Dimensions.PANEL_WIDTH, Dimensions.PANEL_HEIGHT);
            this.Panel.TabIndex  = 0;
            this.Panel.BackColor = Colors.WHITE;
            this.Panel.Visible   = false;

            // Init header
            this.header = new NavigationBar(
                Colors.IMPERIAL_RED,
                "Rezervimet",
                this.Panel,
                this.PreviousPanel,
                "../../Resources/nurse.png"
                );
            this.Panel.Controls.Add(this.header.Panel);
        }
        public override void ViewDidLoad()
        {
            base.ViewDidLoad();


            var gradientLayer = new CAGradientLayer();

            gradientLayer.NeedsDisplayOnBoundsChange = true;

            var b = NavigationBar.Bounds;

            gradientLayer.Bounds = new CGRect(b.X, b.Y, b.Width, b.Height + 20);

            gradientLayer.Colors = new CGColor[] { Color.FromHex("#60C3FF").ToCGColor(),
                                                   Color.FromHex("#5574F7").ToCGColor() };

            float x1 = 0f, x2 = 1f, y1 = 0f, y2 = 1f;

            x1 = x2 = 0.5f;
            gradientLayer.StartPoint = new CGPoint(x1, y1);
            gradientLayer.EndPoint   = new CGPoint(x2, y2);

            UIGraphics.BeginImageContext(gradientLayer.Bounds.Size);
            gradientLayer.RenderInContext(UIGraphics.GetCurrentContext());
            UIImage image = UIGraphics.GetImageFromCurrentImageContext();

            UIGraphics.EndImageContext();

            NavigationBar.SetBackgroundImage(image, UIBarMetrics.Default);
        }
예제 #8
0
        public override void Dispose()
        {
            if (!mDisposed)
            {
                // Mediators set up in InitializeGameState
                CleanupMediator <FashionGameGui>();
                CleanupMediator <FashionNpcMediator>();
                CleanupMediator <PlayerProgression>();
                CleanupMediator <ClothingMediator>();
                CleanupMediator <FashionGameInput>();
                CleanupMediator <FashionMinigameLoadingMediator>();
                CleanupMediator <FashionGameStateMachine>();

                GameFacade.Instance.RemoveMediator <FashionCameraMediator>();
                GameFacade.Instance.RemoveMediator <ClothingMediator>();

                NavigationBar navBar = GameFacade.Instance.RetrieveMediator <ToolbarMediator>().NavigationBar;
                navBar.ClosetButton.Enable();
                navBar.FriendButton.Enable();
                navBar.RoomButton.Enable();
                navBar.ShopButton.Enable();
                navBar.EmoteMenuButton.Enable();
                TopBar topBar = GameFacade.Instance.RetrieveMediator <ToolbarMediator>().TopBar;
                topBar.Mode = TopBar.TopBarMode.Hangout;
                mDisposed   = true;
            }
        }
        public void WhenCustomerOpensAboutUsPage_ThenWindowIsOpenedVideoIsAvailable()
        {
            var aboutUsWindow = NavigationBar.ClickAboutLink();

            Assert.IsTrue(aboutUsWindow.IsWindowOpened());
            Assert.IsTrue(aboutUsWindow.IsVideoAvailable());
        }
        public override void ViewDidLoad()
        {
            base.ViewDidLoad();

            SetBindings();
            SetCommands();
            BaseStyling();
            EventStyling();
            SetEvents();

            NavigationBar.Set(this, HomeButton, FriendsButton, AddPostButton, ProfileButton);

            UsersCollectionView.RegisterNibForCell(FollowerCollectionViewCell.Nib, FollowerCollectionViewCell.Key);

            var layout = new UICollectionViewFlowLayout();

            layout.ItemSize = new CoreGraphics.CGSize(388, 62);

            UsersCollectionView.SetCollectionViewLayout(layout, true);

            UsersCollectionView.Source = source;
            UsersCollectionView.ReloadData();

            source.OnItemChanged += (o, e) =>
            {
                source.LoadData(dataContext.Users.ToList());

                UsersCollectionView.ReloadData();
            };
        }
예제 #11
0
		void UpdateHideNavigationBarSeparator()
		{
			bool shouldHide = NavPage.OnThisPlatform().HideNavigationBarSeparator();

			// Just setting the ShadowImage is good for iOS11
			if (_defaultNavBarShadowImage == null)
				_defaultNavBarShadowImage = NavigationBar.ShadowImage;

			if (shouldHide)
				NavigationBar.ShadowImage = new UIImage();
			else
				NavigationBar.ShadowImage = _defaultNavBarShadowImage;

			if (!Forms.IsiOS11OrNewer)
			{
				// For iOS 10 and lower, you need to set the background image. 
				// If you set this for iOS11, you'll remove the background color.
				if (_defaultNavBarBackImage == null)
					_defaultNavBarBackImage = NavigationBar.GetBackgroundImage(UIBarMetrics.Default);

				if (shouldHide)
					NavigationBar.SetBackgroundImage(new UIImage(), UIBarMetrics.Default);
				else
					NavigationBar.SetBackgroundImage(_defaultNavBarBackImage, UIBarMetrics.Default);
			}
		}
예제 #12
0
        public override void ViewWillAppear(bool animated)
        {
            base.ViewWillAppear(animated);

            MyNavigationPageRenderer myNavigationPageRenderer = (MyNavigationPageRenderer)this.Element;

            var gradientLayer = new CAGradientLayer();

            gradientLayer.Bounds = NavigationBar.Bounds;
            gradientLayer.Colors = new CGColor[] {
                myNavigationPageRenderer.StartColor.ToCGColor(),
                    myNavigationPageRenderer.EndColor.ToCGColor()
            };
            gradientLayer.StartPoint = new CGPoint(0.0, 0.5);
            gradientLayer.EndPoint   = new CGPoint(1.0, 0.5);

            UIGraphics.BeginImageContext(gradientLayer.Bounds.Size);
            gradientLayer.RenderInContext(UIGraphics.GetCurrentContext());
            UIImage image = UIGraphics.GetImageFromCurrentImageContext();

            UIGraphics.EndImageContext();

            NavigationBar.ShadowImage = new UIImage();
            NavigationBar.SetBackgroundImage(image, UIBarMetrics.Default);
        }
예제 #13
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);
        }
예제 #14
0
        public static void WaitUntilNavBarLoad(this IWebDriver driver)
        {
            var delay         = TimeSpan.FromSeconds(20);
            var navigationBar = new NavigationBar(driver);
            var wait          = new WebDriverWait(driver, delay);

            wait.Until(x => x.FindElement(By.Id(navigationBar.LogoutButton.GetAttribute("id"))));
        }
예제 #15
0
 public override void ViewDidLayoutSubviews()
 {
     base.ViewDidLayoutSubviews();
     if (_blurView != null)
     {
         NavigationBar.SendSubviewToBack(_blurView);
     }
 }
예제 #16
0
        public void WhenINavigateToCaseListPage()
        {
            //Navigate to Case List and Save CaseListPage on current context
            caseDetailPage.Pause(3);
            NavigationBar navBar = caseDetailPage.NavigationBar;

            SetSharedPageObjectInCurrentContext("Case List", navBar.GoToCasesList());
        }
예제 #17
0
        public override void ViewDidLoad()
        {
            base.ViewDidLoad();

            NavigationBar.ShadowImage   = new UIImage();
            NavigationBar.ClipsToBounds = true;
            NavigationBar.SetBackgroundImage(new UIImage(), UIBarMetrics.Default);
        }
		void UpdateClassBrowserVisibility (bool threaded)
		{
			if (shouldShowclassBrowser && canShowClassBrowser) {
				if (classBrowser == null) {
					classBrowser = new NavigationBar (this);
					classBrowser.StatusBox.UpdateWidth ();
					this.UpdateLineCol ();
					vbox.PackStart (classBrowser, false, false, CHILD_PADDING);
					vbox.ReorderChild (classBrowser, 0);
					PopulateClassCombo (threaded);
				}
			} else {
				if (classBrowser != null) {
					vbox.Remove (classBrowser);
					classBrowser.Destroy ();
					classBrowser = null;
				}
			}
		}
예제 #19
0
        public UserBrowserPage()
        {
            // Create the files tree
            filesList = new TreeView();
            filesList.RowActivated += on_filesList_row_activated;
            filesList.ButtonPressEvent += filesList_ButtonPressEvent;

            // Create the navigation bar
            Alignment navigationBarAlignment = new Alignment(0, 0, 1, 1);
            navigationBarAlignment.TopPadding = 3;
            navigationBarAlignment.BottomPadding = 3;
            navigationBar = new NavigationBar ();
            navigationBar.PathButtonClicked += on_navigationBar_PathButtonClicked;
            navigationBarAlignment.Add(navigationBar);
            base.PackStart(navigationBarAlignment, false, false, 0);
            navigationBarAlignment.ShowAll ();

            // Load some images
            stockDirectoryPixbuf = Gui.LoadIcon(16, "folder");
            stockFilePixbuf      = Gui.LoadIcon(16, "text-x-generic");
            networkIcon          = Gui.LoadIcon(16, "stock_internet");

            // Set up the file list
            filesList.Selection.Changed += filesList_Selection_Changed;
            filesList.Selection.Mode = SelectionMode.Browse;
            /*
            filesList.Selection.Mode = SelectionMode.Multiple;
            filesList.RubberBanding = true;
            */

            filesListStore = new ListStore (typeof(IDirectoryItem));
            filesList.Model = filesListStore;

            TreeViewColumn column;

            // Add Name column
            column = new TreeViewColumn ();
            column.Title = "Name";
            column.Resizable = true;

            Gtk.CellRendererPixbuf fileListRowIcon = new Gtk.CellRendererPixbuf();
            column.PackStart (fileListRowIcon, false);
            column.SetCellDataFunc (fileListRowIcon, new TreeCellDataFunc(FileNameIconFunc));

            Gtk.CellRendererText fileListRowText = new Gtk.CellRendererText();
            column.PackStart (fileListRowText, true);
            column.SetCellDataFunc (fileListRowText, new TreeCellDataFunc(FileNameTextFunc));

            filesList.AppendColumn (column);

            // Add Size Column
            column = filesList.AppendColumn ("Size", new CellRendererText(), new TreeCellDataFunc (FileSizeFunc));
               	column.Resizable = true;

            // Add Type Column
            column = filesList.AppendColumn ("Type", new CellRendererText(), new TreeCellDataFunc (FileTypeFunc));
            column.Resizable = true;

            // Add InfoHash Column
            column = filesList.AppendColumn ("Info Hash", new CellRendererText(), new TreeCellDataFunc (FileInfoHashFunc));
            column.Resizable = true;

            base.PackStart(Gui.AddScrolledWindow(filesList), true, true, 0);
            filesList.ShowAll();

            waitingBoxAlignment = new Alignment(0.5f, 0.5f, 0, 0);
            VBox waitingBox = new VBox();
            waitProgressBar = new ProgressBar();
            waitLabel = new Label();
            waitingBox.PackStart(waitProgressBar, false, false, 0);
            waitingBox.PackStart(waitLabel, false, false, 0);
            waitingBoxAlignment.Add(waitingBox);
            this.PackStart(waitingBoxAlignment, true, true, 0);

            Core.NetworkAdded += Core_NetworkAdded;
            foreach (Network network in Core.Networks) {
                Core_NetworkAdded (network);
            }

            resultPopupMenu = new Menu();

            ImageMenuItem item = new ImageMenuItem("Download");
            item.Image = new Image(Gui.LoadIcon(16, "go-down"));
            item.Activated += on_mnuFileDownload_activate;
            resultPopupMenu.Append(item);

            item = new ImageMenuItem(Gtk.Stock.Properties, null);
            item.Activated += filePropertiesMenuItem_Activated;
            resultPopupMenu.Append(item);

            NavigateTo ("/");
        }