예제 #1
0
        private async Task ContentScrolled(double yOffset)
        {
            if (yOffset > headerMaxScroll &&
                -LblTitle.TranslationX > labelTitleMaxTranslation)
            {
                return;
            }

            double scrollY = yOffset < 0 ? 0 : yOffset;
            double labelTitleTranslation = labelTitleMaxTranslation * scrollY / headerMaxScroll;
            double imageTranslationX     = imgProfileMaxTranslationX * scrollY / headerMaxScroll;
            double imageTranslationY     = imgProfileMaxTranslationY * scrollY / headerMaxScroll;
            double imageScale            = 1 - imgProfileMinScaleDiff * scrollY / headerMaxScroll;

            Debug.WriteLine($"scrollY: {scrollY}");
            Debug.WriteLine($"labelTitleTranslation: {labelTitleTranslation}");
            Debug.WriteLine($"imageTranslationX: {imageTranslationX}");
            Debug.WriteLine($"imageTranslationY: {imageTranslationY}");
            Debug.WriteLine($"imageScale: {imageScale}");

            if (scrollY >= headerMaxScroll)
            {
                await Task.WhenAll(GridImageBackgroud.TranslateTo(0, -headerMaxScroll),
                                   LblTitle.TranslateTo(-labelTitleMaxTranslation, 0),
                                   ImgProfilePicture.TranslateTo(imgProfileMaxTranslationX, -imgProfileMaxTranslationY),
                                   ImgProfilePicture.ScaleTo(1 - imgProfileMinScaleDiff));
            }
            else
            {
                await Task.WhenAll(GridImageBackgroud.TranslateTo(0, -scrollY),
                                   LblTitle.TranslateTo(-labelTitleTranslation, 0),
                                   ImgProfilePicture.TranslateTo(imageTranslationX, -imageTranslationY),
                                   ImgProfilePicture.ScaleTo(imageScale));
            }
        }
        void ReleaseDesignerOutlets()
        {
            if (tblStages != null)
            {
                tblStages.Dispose();
                tblStages = null;
            }

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

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

            if (LblDescription != null)
            {
                LblDescription.Dispose();
                LblDescription = null;
            }
        }
예제 #3
0
        void ReleaseDesignerOutlets()
        {
            if (ContentViewHeightConstraint != null)
            {
                ContentViewHeightConstraint.Dispose();
                ContentViewHeightConstraint = null;
            }

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

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

            if (LblSpeakers != null)
            {
                LblSpeakers.Dispose();
                LblSpeakers = null;
            }
        }
예제 #4
0
 public void Binding(MapCarInfoBindItem item)
 {
     if (item == null)
     {
         return;
     }
     LblTitle.SetBinding(TextBlock.TextProperty, new Binding("Title"));
     LblTitle.DataContext = item;
     LblText.SetBinding(TextBlock.TextProperty, new Binding("Text"));
     LblText.DataContext = item;
     TextToolTip.SetBinding(TextBlock.TextProperty, new Binding("Text"));
     TextToolTip.DataContext = item;
 }
예제 #5
0
 private void SetWaitCursor(string TextStatus, Action Method)
 {
     Application.UseWaitCursor = true;
     Cursor             = Cursors.WaitCursor;
     MenuStrip1.Enabled = false;
     LblTitle.Text      = TextStatus;
     LblTitle.GetCurrentParent().Update();
     Method();
     LblTitle.Text             = string.Format("Sliding Puzzle | Mode: {0} | Size: {1} x {1}", ModeString, PuzzleSize);
     MenuStrip1.Enabled        = true;
     Application.UseWaitCursor = false;
     Cursor = Cursors.Default;
 }
예제 #6
0
        void ReleaseDesignerOutlets()
        {
            if (LblTitle != null)
            {
                LblTitle.Dispose();
                LblTitle = null;
            }

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

            if (TableView != null)
            {
                TableView.Dispose();
                TableView = null;
            }
        }
예제 #7
0
        public override void ViewDidLoad()
        {
            base.ViewDidLoad();

            View.InjectMainBackground(this.View.Bounds);
            View.AdaptSizeToScreen();

            NavigationController.SetNavigationBarHidden(true, true);

            MainTitle.Frame = new CGRect(0, 0, UIScreen.MainScreen.Bounds.Width, TableView.Frame.Top);


            MainTitle.TextContainer.LineFragmentPadding = 0;
            MainTitle.Text = string.Empty;
            MainTitle.ApplyTitleStyle();

            //MainTitle.TextContainerInset = new UIEdgeInsets((MainTitle.Bounds.Height / 2) - 8, (nfloat)LangTableRow.PADDING_LEFT, 0, 0);

            LblTitle.Text      = Translator.GetText("choose_lang");
            LblTitle.Font      = UIFont.FromName("Arial", 16f);
            LblTitle.TextColor = Style.Header.TextColor;

            LblTitle.Frame = new CGRect((nfloat)LangTableRow.PADDING_LEFT, (MainTitle.Bounds.Height / 2) - (LblTitle.Bounds.Height / 2), UIScreen.MainScreen.Bounds.Width, TableView.Frame.Top);
            LblTitle.SizeToFit();

            // Initialize table
            //TableView.Frame = new CGRect(0, MainTitle.Frame.Y + MainTitle.Frame.Size.Height, UIScreen.MainScreen.Bounds.Width, 0);
            TableView.Source          = new LangTableSource(ViewModel.Langs, this);
            TableView.SeparatorStyle  = UITableViewCellSeparatorStyle.SingleLine;
            TableView.SeparatorColor  = Style.OptionView.LineSeparatorColor;
            TableView.BackgroundColor = Style.OptionView.TableBackgroundColor;
            TableView.SeparatorInset  = UIEdgeInsets.Zero;
            TableView.TintColor       = Style.OptionView.ContentColor;

            _spinner = new Spinner(View);
        }
        void ReleaseDesignerOutlets()
        {
            if (ChkEnabled != null)
            {
                ChkEnabled.Dispose();
                ChkEnabled = null;
            }

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

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

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

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

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

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

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

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

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

            if (TxtTitle != null)
            {
                TxtTitle.Dispose();
                TxtTitle = null;
            }
        }
예제 #9
0
        void ReleaseDesignerOutlets()
        {
            if (AmountDoneBar != null)
            {
                AmountDoneBar.Dispose();
                AmountDoneBar = null;
            }

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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