예제 #1
0
        private void ScrollToCell(Rect targetCell)
        {
            double deltaX = 0;
            double deltaY = 0;

            if (targetCell.Left < 0)
            {
                deltaX = targetCell.Left;
            }
            else if (this.ActualWidth < targetCell.Right)
            {
                deltaX = targetCell.Right - (this.ActualWidth);
            }

            if (targetCell.Top < 0)
            {
                deltaY = targetCell.Top;
            }
            else if (this.ActualHeight < targetCell.Bottom)
            {
                deltaY = targetCell.Bottom - (this.ActualHeight);
            }

            double resHorOffset  = Math.Max(0, MainScrollView.HorizontalOffset + deltaX);
            double resVertOffset = Math.Max(0, MainScrollView.VerticalOffset + deltaY);

            MainScrollView.ScrollToHorizontalOffset(resHorOffset);
            MainScrollView.ScrollToVerticalOffset(resVertOffset);
        }
예제 #2
0
        void ReleaseDesignerOutlets()
        {
            if (bookScrollView != null)
            {
                bookScrollView.Dispose();
                bookScrollView = null;
            }

            if (historyTableView != null)
            {
                historyTableView.Dispose();
                historyTableView = null;
            }

            if (historyTF != null)
            {
                historyTF.Dispose();
                historyTF = null;
            }

            if (histroyEmptyLabel != null)
            {
                histroyEmptyLabel.Dispose();
                histroyEmptyLabel = null;
            }

            if (MainDocumentView != null)
            {
                MainDocumentView.Dispose();
                MainDocumentView = null;
            }

            if (MainScrollView != null)
            {
                MainScrollView.Dispose();
                MainScrollView = null;
            }

            if (popupButton != null)
            {
                popupButton.Dispose();
                popupButton = null;
            }

            if (publicationEmptyLabel != null)
            {
                publicationEmptyLabel.Dispose();
                publicationEmptyLabel = null;
            }

            if (PublicationsCustomView != null)
            {
                PublicationsCustomView.Dispose();
                PublicationsCustomView = null;
            }
        }
        public void BindForm(LogExplorerForm form)
        {
            _form    = form;
            mainView = new MainView(this);
            mainView.Bind(_form.pbMain);
            scr = new MainScrollView(this);
            scr.Bind(_form.vScroll);
            profileSelector = new ProfileSelector(this);
            profileSelector.Bind(_form.comboBoxProfile);


            //todo: init views
        }
        void ReleaseDesignerOutlets()
        {
            if (BackButton != null)
            {
                BackButton.Dispose();
                BackButton = null;
            }

            if (cnsTopConstrain != null)
            {
                cnsTopConstrain.Dispose();
                cnsTopConstrain = null;
            }

            if (EnterConfirm != null)
            {
                EnterConfirm.Dispose();
                EnterConfirm = null;
            }

            if (EnterUserPassword != null)
            {
                EnterUserPassword.Dispose();
                EnterUserPassword = null;
            }

            if (MainScrollView != null)
            {
                MainScrollView.Dispose();
                MainScrollView = null;
            }

            if (RegistrationButton != null)
            {
                RegistrationButton.Dispose();
                RegistrationButton = null;
            }

            if (UserEmail != null)
            {
                UserEmail.Dispose();
                UserEmail = null;
            }

            if (UserName != null)
            {
                UserName.Dispose();
                UserName = null;
            }
        }
        void ReleaseDesignerOutlets()
        {
            if (MainScrollView != null)
            {
                MainScrollView.Dispose();
                MainScrollView = null;
            }

            if (Spinner != null)
            {
                Spinner.Dispose();
                Spinner = null;
            }
        }
예제 #6
0
        void SetupScrollView()
        {
            var OverviewController = Storyboard.InstantiateViewController("OverviewController") as OverviewController;
            var CameraController   = Storyboard.InstantiateViewController("CameraController") as CameraController;

            MainScrollView.ContentSize = new CoreGraphics.CGSize(View.Frame.Width * 2, View.Frame.Height);

            OverviewController.View.Frame = new CoreGraphics.CGRect(CameraController.View.Frame.Width, 0, View.Frame.Width, View.Frame.Height);
            CameraController.View.Frame   = View.Frame;

            MainScrollView.Frame            = View.Frame;
            MainScrollView.AutoresizingMask = UIViewAutoresizing.FlexibleWidth;
            MainScrollView.AddSubview(OverviewController.View);
            MainScrollView.AddSubview(CameraController.View);
            View.BringSubviewToFront(MainScrollView);
        }
예제 #7
0
        /// <summary>
        /// Adds a FolderDisplay object to the UI's column view
        /// </summary>
        /// <param name="fd">FolderDisplay object to add</param>
        /// <param name="readd">Whether this FolderDisplay should be re-added to the displayList</param>
        private void addToTable(FolderDisplay fd, bool readd = true)
        {
            //create the grid separator

            /*ContentGrid.ColumnDefinitions.Add(new ColumnDefinition() { Width = new GridLength(5) });
             * GridSplitter gs = new GridSplitter() { Width = 5 };
             * ContentGrid.Children.Add(gs);
             * Grid.SetColumn(gs, ContentGrid.ColumnDefinitions.Count - 1);
             * Grid.SetRow(gs, 1);*/

            //add the datagrid
            ContentGrid.ColumnDefinitions.Add(new ColumnDefinition()
            {
                Width = new GridLength(1, GridUnitType.Star)
            });
            ContentGrid.Children.Add(fd.dg);
            Grid.SetRow(fd.dg, 1);
            Grid.SetColumn(fd.dg, ContentGrid.ColumnDefinitions.Count - 1);

            Label l = new Label()
            {
                Content = fd.folderData.path.Name + " - " + fd.totalSizeFormatted()
            };

            ContentGrid.Children.Add(l);
            Grid.SetRow(l, 0);
            Grid.SetColumn(l, ContentGrid.ColumnDefinitions.Count - 1);

            if (readd)
            {
                displayList.Add(fd);
            }

            //scroll to end
            MainScrollView.ScrollToHorizontalOffset(System.Int32.MaxValue);
            MainScrollView.UpdateLayout();
        }
예제 #8
0
 /// <summary>
 /// When trying to go to the next step and the API key is invalid:
 /// Scroll to the top, so the user can always see the error message.
 /// </summary>
 private void OnInvalidApiKeyChecked(EventArgs e, object sender)
 {
     MainScrollView.ScrollToTop();
 }
예제 #9
0
 private void ScrollTheView(bool move)
 {
     cnsTopConstrain.Constant = -_scrollAmount;
     MainScrollView.UpdateConstraints();
 }
예제 #10
0
 private void KeyBoardDownNotification(NSNotification notification)
 {
     cnsTopConstrain.Constant = default(int);
     MainScrollView.UpdateConstraints();
 }
예제 #11
0
        public async void Scroll()
        {
            await Task.Delay(TimeSpan.FromSeconds(0.2f));

            await MainScrollView.ScrollToAsync(MainScrollView.ScrollX, MainScrollView.ScrollY - 40, false);
        }