protected override async void OnAppearing() { base.OnAppearing(); if (!_initialized) { await Task.WhenAll( WelcomeLabel.TranslateTo(_formsWidth, 0, 0, null), PosyLabel.TranslateTo(_formsWidth, 0, 0, null), FormLayout.TranslateTo(0, _formsHeight, 0, null), CalculateButton.TranslateTo(0, _formsHeight, 0, null), IntroLabel.TranslateTo(_formsWidth, 0, 0, null) ); PositionStars(); RotateStars(); await Task.WhenAll( WelcomeLabel.TranslateTo(0, 0, 400, Easing.CubicInOut), PosyLabel.TranslateTo(0, 0, 450, Easing.CubicInOut), IntroLabel.TranslateTo(0, 0, 500, Easing.CubicInOut), FormLayout.TranslateTo(0, 0, 550, Easing.CubicInOut), CalculateButton.TranslateTo(0, 0, 550, Easing.CubicInOut) ); _initialized = true; } }
void ReleaseDesignerOutlets() { if (AppointmentLoadingIndicator != null) { AppointmentLoadingIndicator.Dispose(); AppointmentLoadingIndicator = null; } if (BackgroundToHeaderConstraint != null) { BackgroundToHeaderConstraint.Dispose(); BackgroundToHeaderConstraint = null; } if (DateLabel != null) { DateLabel.Dispose(); DateLabel = null; } if (HeaderView != null) { HeaderView.Dispose(); HeaderView = null; } if (HeaderViewHeightConstraint != null) { HeaderViewHeightConstraint.Dispose(); HeaderViewHeightConstraint = null; } if (MedicineLoadingIndicator != null) { MedicineLoadingIndicator.Dispose(); MedicineLoadingIndicator = null; } if (MedicineNoDataCenterView != null) { MedicineNoDataCenterView.Dispose(); MedicineNoDataCenterView = null; } if (MedicineNoDataView != null) { MedicineNoDataView.Dispose(); MedicineNoDataView = null; } if (MedicineView != null) { MedicineView.Dispose(); MedicineView = null; } if (NameLabel != null) { NameLabel.Dispose(); NameLabel = null; } if (NameLeadingConstraint != null) { NameLeadingConstraint.Dispose(); NameLeadingConstraint = null; } if (NameTopConstraint != null) { NameTopConstraint.Dispose(); NameTopConstraint = null; } if (NextAppointmentAlertLabel != null) { NextAppointmentAlertLabel.Dispose(); NextAppointmentAlertLabel = null; } if (NextAppointmentDateLabel != null) { NextAppointmentDateLabel.Dispose(); NextAppointmentDateLabel = null; } if (NextAppointmentDateLabelBottomToTitleTopConstraint != null) { NextAppointmentDateLabelBottomToTitleTopConstraint.Dispose(); NextAppointmentDateLabelBottomToTitleTopConstraint = null; } if (NextAppointmentTitleBottomToAlertTopConstraint != null) { NextAppointmentTitleBottomToAlertTopConstraint.Dispose(); NextAppointmentTitleBottomToAlertTopConstraint = null; } if (NextAppointmentTitleLabel != null) { NextAppointmentTitleLabel.Dispose(); NextAppointmentTitleLabel = null; } if (NextAppointmentTitleToBottomConstraint != null) { NextAppointmentTitleToBottomConstraint.Dispose(); NextAppointmentTitleToBottomConstraint = null; } if (NextAppointmentTitleToTopConstraint != null) { NextAppointmentTitleToTopConstraint.Dispose(); NextAppointmentTitleToTopConstraint = null; } if (NextAppointmentView != null) { NextAppointmentView.Dispose(); NextAppointmentView = null; } if (NextAppointmentViewBottomConstraint != null) { NextAppointmentViewBottomConstraint.Dispose(); NextAppointmentViewBottomConstraint = null; } if (NextMedicineLabel != null) { NextMedicineLabel.Dispose(); NextMedicineLabel = null; } if (NoDataCenterView != null) { NoDataCenterView.Dispose(); NoDataCenterView = null; } if (NoDataLeftView != null) { NoDataLeftView.Dispose(); NoDataLeftView = null; } if (NoDataRightView != null) { NoDataRightView.Dispose(); NoDataRightView = null; } if (VideoCallButton != null) { VideoCallButton.Dispose(); VideoCallButton = null; } if (WelcomeLabel != null) { WelcomeLabel.Dispose(); WelcomeLabel = null; } }
public void Create(object masterView, string bgLayerImageName, string logoImageName, RectangleF frame, OnButtonClick onClick) { // take the handler OnClick = onClick; View = PlatformView.Create( ); View.BackgroundColor = ControlStylingConfig.OOBE_Splash_BG_Color; View.AddAsSubview(masterView); ImageBG = PlatformImageView.Create( ); ImageBG.AddAsSubview(View.PlatformNativeObject); MemoryStream stream = Rock.Mobile.IO.AssetConvert.AssetToStream(bgLayerImageName); if (stream != null) { stream.Position = 0; ImageBG.Opacity = 0; ImageBG.Image = stream; ImageBG.ImageScaleType = PlatformImageView.ScaleType.ScaleAspectFill; stream.Dispose( ); } NetworkErrorLabel = PlatformLabel.Create( ); NetworkErrorLabel.SetFont(ControlStylingConfig.Font_Light, 18); NetworkErrorLabel.TextColor = 0xCCCCCCFF; NetworkErrorLabel.Text = OOBEStrings.NetworkError; NetworkErrorLabel.TextAlignment = TextAlignment.Center; NetworkErrorLabel.Opacity = 0; NetworkErrorLabel.SizeToFit( ); NetworkErrorLabel.AddAsSubview(View.PlatformNativeObject); NetworkRetryButton = PlatformButton.Create( ); NetworkRetryButton.SetFont(ControlStylingConfig.Font_Light, ControlStylingConfig.Medium_FontSize); NetworkRetryButton.TextColor = 0xCCCCCCFF; NetworkRetryButton.Text = OOBEStrings.NetworRetry; NetworkRetryButton.Opacity = 0; NetworkRetryButton.SizeToFit( ); NetworkRetryButton.ClickEvent = (PlatformButton button ) => { OnClick(-1, false); }; NetworkRetryButton.AddAsSubview(View.PlatformNativeObject); WelcomeLabel = PlatformLabel.Create( ); WelcomeLabel.SetFont(ControlStylingConfig.Font_Bold, 85); WelcomeLabel.TextColor = 0xCCCCCCFF; WelcomeLabel.Text = OOBEStrings.Welcome; WelcomeLabel.Opacity = 0; WelcomeLabel.SizeToFit( ); WelcomeLabel.AddAsSubview(View.PlatformNativeObject); CampusHeader = PlatformLabel.Create( ); CampusHeader.SetFont(ControlStylingConfig.Font_Light, 18); CampusHeader.TextColor = 0xCCCCCCFF; CampusHeader.Text = OOBEStrings.CampusIntro; CampusHeader.TextAlignment = TextAlignment.Center; CampusHeader.Opacity = 0; CampusHeader.SizeToFit( ); CampusHeader.AddAsSubview(View.PlatformNativeObject); // we'll wait to setup campuses until after a successful download CampusButtons = new List <PlatformButton>( ); RegisterButton = PlatformButton.Create( ); RegisterButton.SetFont(ControlStylingConfig.Font_Light, ControlStylingConfig.Large_FontSize); RegisterButton.TextColor = 0xCCCCCCFF; RegisterButton.Text = string.Format(OOBEStrings.WantAccount, GeneralConfig.OrganizationShortName); RegisterButton.Opacity = 0; RegisterButton.SizeToFit( ); RegisterButton.ClickEvent = (PlatformButton button ) => { // do not allow multiple register taps if (State == OOBE_State.WaitForAccountChoice) { OnClick(0, false); EnterNextState(OOBE_State.Done); } }; RegisterButton.AddAsSubview(View.PlatformNativeObject); RegisterSeperator = PlatformView.Create( ); RegisterSeperator.BackgroundColor = ControlStylingConfig.BG_Layer_BorderColor; RegisterSeperator.Bounds = new RectangleF(0, 0, 0, 1); RegisterSeperator.AddAsSubview(View.PlatformNativeObject); LoginButton = PlatformButton.Create( ); LoginButton.SetFont(ControlStylingConfig.Font_Light, ControlStylingConfig.Large_FontSize); LoginButton.TextColor = 0xCCCCCCFF; LoginButton.Text = string.Format(OOBEStrings.HaveAccount, GeneralConfig.OrganizationShortName); LoginButton.Opacity = 0; LoginButton.SizeToFit( ); LoginButton.ClickEvent = (PlatformButton button ) => { // do not allow multiple register taps if (State == OOBE_State.WaitForAccountChoice) { OnClick(1, false); EnterNextState(OOBE_State.Done); } }; LoginButton.AddAsSubview(View.PlatformNativeObject); LoginSeperator = PlatformView.Create( ); LoginSeperator.BackgroundColor = ControlStylingConfig.BG_Layer_BorderColor; LoginSeperator.Bounds = new RectangleF(0, 0, 0, 1); LoginSeperator.AddAsSubview(View.PlatformNativeObject); SkipButton = PlatformButton.Create( ); SkipButton.SetFont(ControlStylingConfig.Font_Light, ControlStylingConfig.Large_FontSize); SkipButton.TextColor = 0xCCCCCCFF; SkipButton.Text = OOBEStrings.SkipAccount; SkipButton.Opacity = 0; SkipButton.SizeToFit( ); SkipButton.ClickEvent = (PlatformButton button ) => { // do not allow multiple register taps if (State == OOBE_State.WaitForAccountChoice) { OnClick(2, false); EnterNextState(OOBE_State.Done); } }; SkipButton.AddAsSubview(View.PlatformNativeObject); stream = Rock.Mobile.IO.AssetConvert.AssetToStream(logoImageName); stream.Position = 0; ImageLogo = PlatformImageView.Create( ); ImageLogo.AddAsSubview(View.PlatformNativeObject); ImageLogo.Image = stream; ImageLogo.ImageScaleType = PlatformImageView.ScaleType.ScaleAspectFit; stream.Dispose( ); State = OOBE_State.Startup; }
private void fetchWelcomeMessage() { setDayStatus(); WelcomeLabel.Invoke(new Action(() => WelcomeLabel.Text = string.Format("Hello {0} {1},\ngood {2}!", r_FacebookManager.CurrentUser.FirstName, r_FacebookManager.CurrentUser.LastName, m_CurrentDayStatus))); }