Пример #1
0
        void ReleaseDesignerOutlets()
        {
            if (HeadImage != null)
            {
                HeadImage.Dispose();
                HeadImage = null;
            }

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

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

            if (InputLayout != null)
            {
                InputLayout.Dispose();
                InputLayout = null;
            }
        }
 private void Name_OnKeyDown(object sender, KeyEventArgs e)
 {
     if (e.Key == Key.Enter)
     {
         if (ReceiverForm.Visibility == Visibility.Visible)
         {
             if (EmailLabel.Visibility == Visibility.Visible)
             {
                 EmailLabel.Focus();
             }
             else if (Phone.Visibility == Visibility.Visible)
             {
                 PCode.Focus();
                 PCode.Select(PCode.Text.Length, 0);
             }
             else
             {
                 ViewModel.Validate();
             }
         }
         else
         {
             ViewModel.Validate();
         }
     }
 }
        void ReleaseDesignerOutlets()
        {
            if (EmailLabel != null)
            {
                EmailLabel.Dispose();
                EmailLabel = null;
            }

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

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

            if (PhotoImageView != null)
            {
                PhotoImageView.Dispose();
                PhotoImageView = null;
            }
        }
Пример #4
0
        public override void ViewDidLoad()
        {
            base.ViewDidLoad();

            prepareViews();

            Title             = ViewModel.Title;
            VersionLabel.Text = ViewModel.Version;

            LoggingOutView.Hidden          = true;
            SendFeedbackSuccessView.Hidden = true;

            this.Bind(ViewModel.Email, EmailLabel.Rx().Text());
            this.Bind(ViewModel.IsSynced, SyncedView.Rx().IsVisible());
            this.Bind(ViewModel.WorkspaceName, WorkspaceLabel.Rx().Text());
            this.Bind(ViewModel.DurationFormat, DurationFormatLabel.Rx().Text());
            this.Bind(ViewModel.IsRunningSync, SyncingView.Rx().IsVisible());
            this.Bind(ViewModel.DateFormat, DateFormatLabel.Rx().Text());
            this.Bind(ViewModel.BeginningOfWeek, BeginningOfWeekLabel.Rx().Text());
            this.Bind(ViewModel.IsFeedbackSuccessViewShowing, SendFeedbackSuccessView.Rx().AnimatedIsVisible());
            this.BindVoid(ViewModel.LoggingOut, () =>
            {
                LoggingOutView.Hidden = false;
                SyncingView.Hidden    = true;
                SyncedView.Hidden     = true;
            });

            this.Bind(HelpView.Rx().Tap(), ViewModel.OpenHelpView);
            this.Bind(LogoutButton.Rx().Tap(), ViewModel.TryLogout);
            this.Bind(AboutView.Rx().Tap(), ViewModel.OpenAboutView);
            this.Bind(FeedbackView.Rx().Tap(), ViewModel.SubmitFeedback);
            this.Bind(DateFormatView.Rx().Tap(), ViewModel.SelectDateFormat);
            this.Bind(WorkspaceView.Rx().Tap(), ViewModel.PickDefaultWorkspace);
            this.Bind(DurationFormatView.Rx().Tap(), ViewModel.SelectDurationFormat);
            this.BindVoid(ManualModeSwitch.Rx().Changed(), ViewModel.ToggleManualMode);
            this.Bind(BeginningOfWeekView.Rx().Tap(), ViewModel.SelectBeginningOfWeek);
            this.Bind(CalendarSettingsView.Rx().Tap(), ViewModel.OpenCalendarSettingsAction);
            this.BindVoid(SendFeedbackSuccessView.Rx().Tap(), ViewModel.CloseFeedbackSuccessView);
            this.Bind(NotificationSettingsView.Rx().Tap(), ViewModel.OpenNotificationSettingsAction);
            this.Bind(TwentyFourHourClockSwitch.Rx().Changed(), ViewModel.ToggleUseTwentyFourHourClock);

            UIApplication.Notifications
            .ObserveWillEnterForeground((sender, e) => startAnimations())
            .DisposedBy(DisposeBag);

            if (!ViewModel.CalendarSettingsEnabled)
            {
                hideCalendarSettingsSection();
            }

            ViewModel.IsManualModeEnabled
            .FirstAsync()
            .Subscribe(isEnabled => ManualModeSwitch.SetState(isEnabled, false))
            .DisposedBy(DisposeBag);

            ViewModel.UseTwentyFourHourFormat
            .FirstAsync()
            .Subscribe(useTwentyFourHourFormat => TwentyFourHourClockSwitch.SetState(useTwentyFourHourFormat, false))
            .DisposedBy(DisposeBag);
        }
Пример #5
0
        protected override void SetupLayoutConstraints()
        {
            base.SetupLayoutConstraints();
            this.SubviewsDoNotTranslateAutoresizingMaskIntoConstraints();

            this.AddConstraints(
                FirstNameLabel.AtLeftOf(this, Theme.Dimensions.Inset2x),
                FirstNameLabel.AtTopOfSafeArea(this, Theme.Dimensions.Inset2x),
                FirstNameLabel.AtRightOf(this, Theme.Dimensions.Inset2x),
                FirstNameLabel.Height().EqualTo(Theme.Dimensions.LabelBodyHeight));
            this.AddConstraints(
                FirstName.AtLeftOf(this, Theme.Dimensions.Inset3x),
                FirstName.Below(FirstNameLabel, Theme.Dimensions.Inset1x),
                FirstName.AtRightOf(this, Theme.Dimensions.Inset2x),
                FirstName.Height().EqualTo(Theme.Dimensions.TextFieldRegularHeight));

            this.AddConstraints(
                LastNameLabel.AtLeftOf(this, Theme.Dimensions.Inset2x),
                LastNameLabel.Below(FirstName, Theme.Dimensions.Inset1x),
                LastNameLabel.AtRightOf(this, Theme.Dimensions.Inset2x),
                LastNameLabel.Height().EqualTo(Theme.Dimensions.LabelBodyHeight));
            this.AddConstraints(
                LastName.AtLeftOf(this, Theme.Dimensions.Inset3x),
                LastName.Below(LastNameLabel, Theme.Dimensions.Inset1x),
                LastName.AtRightOf(this, Theme.Dimensions.Inset2x),
                LastName.Height().EqualTo(Theme.Dimensions.TextFieldRegularHeight));

            this.AddConstraints(
                EmailLabel.AtLeftOf(this, Theme.Dimensions.Inset2x),
                EmailLabel.Below(LastName, Theme.Dimensions.Inset1x),
                EmailLabel.AtRightOf(this, Theme.Dimensions.Inset2x),
                EmailLabel.Height().EqualTo(Theme.Dimensions.LabelBodyHeight));
            this.AddConstraints(
                Email.AtLeftOf(this, Theme.Dimensions.Inset3x),
                Email.Below(EmailLabel, Theme.Dimensions.Inset1x),
                Email.AtRightOf(this, Theme.Dimensions.Inset2x),
                Email.Height().EqualTo(Theme.Dimensions.TextFieldRegularHeight));

            this.AddConstraints(
                LanguageLabel.AtLeftOf(this, Theme.Dimensions.Inset2x),
                LanguageLabel.Below(Email, Theme.Dimensions.Inset1x),
                LanguageLabel.AtRightOf(this, Theme.Dimensions.Inset2x),
                LanguageLabel.Height().EqualTo(Theme.Dimensions.LabelBodyHeight));
            this.AddConstraints(
                LanguageSelected.AtLeftOf(this, Theme.Dimensions.Inset3x),
                LanguageSelected.Below(LanguageLabel, Theme.Dimensions.Inset1x),
                LanguageSelected.Height().EqualTo(Theme.Dimensions.TextFieldRegularHeight));
            this.AddConstraints(
                SelectLanguageButton.Width().EqualTo(80),
                SelectLanguageButton.Below(LanguageLabel, Theme.Dimensions.Inset2x),
                SelectLanguageButton.AtRightOf(this, Theme.Dimensions.Inset2x),
                SelectLanguageButton.Height().EqualTo(Theme.Dimensions.ButtonRegularHeight));

            this.AddConstraints(
                SaveButton.Width().EqualTo(80),
                SaveButton.Below(SelectLanguageButton, Theme.Dimensions.Inset6x),
                SaveButton.AtRightOf(this, Theme.Dimensions.Inset2x),
                SaveButton.Height().EqualTo(Theme.Dimensions.ButtonRegularHeight));
        }
Пример #6
0
 private void UnHideLoginComp()
 {
     EmailTextB.Show();
     PassTextB.Show();
     LoginButton.Show();
     EmailLabel.Show();
     PassLabel.Show();
 }
Пример #7
0
 private void HideLoginComp()
 {
     EmailTextB.Hide();
     PassTextB.Hide();
     LoginButton.Hide();
     EmailLabel.Hide();
     PassLabel.Hide();
 }
Пример #8
0
        void ReleaseDesignerOutlets()
        {
            if (EmailLabel != null)
            {
                EmailLabel.Dispose();
                EmailLabel = null;
            }

            if (FullNameLabel != null)
            {
                FullNameLabel.Dispose();
                FullNameLabel = null;
            }
        }
Пример #9
0
        void ReleaseDesignerOutlets()
        {
            if (EmailLabel != null)
            {
                EmailLabel.Dispose();
                EmailLabel = null;
            }

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

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

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

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

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

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

            if (SignOutButton != null)
            {
                SignOutButton.Dispose();
                SignOutButton = null;
            }
        }
Пример #10
0
        void ReleaseDesignerOutlets()
        {
            if (ApiResponseLabel != null)
            {
                ApiResponseLabel.Dispose();
                ApiResponseLabel = null;
            }

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

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

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

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

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

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

            if (QueryApiButton != null)
            {
                QueryApiButton.Dispose();
                QueryApiButton = null;
            }
        }
        void ReleaseDesignerOutlets()
        {
            if (EmailLabel != null)
            {
                EmailLabel.Dispose();
                EmailLabel = null;
            }

            if (LogoutButton != null)
            {
                LogoutButton.Dispose();
                LogoutButton = null;
            }
        }
        void ReleaseDesignerOutlets()
        {
            if (ConstraintToSuperview != null)
            {
                ConstraintToSuperview.Dispose();
                ConstraintToSuperview = null;
            }

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

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

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

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

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

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

            if (WrongPasswordErrorImage != null)
            {
                WrongPasswordErrorImage.Dispose();
                WrongPasswordErrorImage = null;
            }
        }
Пример #13
0
        public override void ViewDidLoad()
        {
            base.ViewDidLoad();

            prepareViews();

            Title             = ViewModel.Title;
            VersionLabel.Text = ViewModel.Version;

            LoggingOutView.Hidden          = true;
            SendFeedbackSuccessView.Hidden = true;

            this.Bind(ViewModel.Email, EmailLabel.BindText());
            this.Bind(ViewModel.IsSynced, SyncedView.BindIsVisible());
            this.Bind(ViewModel.WorkspaceName, WorkspaceLabel.BindText());
            this.Bind(ViewModel.DurationFormat, DurationFormatLabel.BindText());
            this.Bind(ViewModel.IsRunningSync, SyncingView.BindIsVisible());
            this.Bind(ViewModel.DateFormat, DateFormatLabel.BindText());
            this.Bind(ViewModel.IsManualModeEnabled, ManualModeSwitch.BindIsOn());
            this.Bind(ViewModel.BeginningOfWeek, BeginningOfWeekLabel.BindText());
            this.Bind(ViewModel.UseTwentyFourHourFormat, TwentyFourHourClockSwitch.BindIsOn());
            this.BindVoid(ViewModel.LoggingOut, () =>
            {
                LoggingOutView.Hidden = false;
                SyncingView.Hidden    = true;
                SyncedView.Hidden     = true;
            });
            this.Bind(ViewModel.IsFeedbackSuccessViewShowing, SendFeedbackSuccessView.BindAnimatedIsVisible());

            this.Bind(HelpView.Tapped(), ViewModel.OpenHelpView);
            this.Bind(LogoutButton.Tapped(), ViewModel.TryLogout);
            this.Bind(AboutView.Tapped(), ViewModel.OpenAboutView);
            this.Bind(FeedbackView.Tapped(), ViewModel.SubmitFeedback);
            this.Bind(DateFormatView.Tapped(), ViewModel.SelectDateFormat);
            this.Bind(WorkspaceView.Tapped(), ViewModel.PickDefaultWorkspace);
            this.BindVoid(ManualModeView.Tapped(), ViewModel.ToggleManualMode);
            this.Bind(DurationFormatView.Tapped(), ViewModel.SelectDurationFormat);
            this.Bind(BeginningOfWeekView.Tapped(), ViewModel.SelectBeginningOfWeek);
            this.Bind(TwentyFourHourClockView.Tapped(), ViewModel.ToggleUseTwentyFourHourClock);
            this.BindVoid(SendFeedbackSuccessView.Tapped(), ViewModel.CloseFeedbackSuccessView);

            UIApplication.Notifications
            .ObserveWillEnterForeground((sender, e) => startAnimations())
            .DisposedBy(DisposeBag);
        }
 void ReleaseDesignerOutlets()
 {
     if (EmailLabel != null)
     {
         EmailLabel.Dispose();
         EmailLabel = null;
     }
     if (HeadshotImage != null)
     {
         HeadshotImage.Dispose();
         HeadshotImage = null;
     }
     if (NameLabel != null)
     {
         NameLabel.Dispose();
         NameLabel = null;
     }
 }
Пример #15
0
        void ReleaseDesignerOutlets()
        {
            if (BackButton != null)
            {
                BackButton.Dispose();
                BackButton = null;
            }

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

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

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

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

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

            if (TitleViewLabel != null)
            {
                TitleViewLabel.Dispose();
                TitleViewLabel = null;
            }
        }
Пример #16
0
        void ReleaseDesignerOutlets()
        {
            if (ChoosePicture != null)
            {
                ChoosePicture.Dispose();
                ChoosePicture = null;
            }

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

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

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

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

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

            if (UserPicture != null)
            {
                UserPicture.Dispose();
                UserPicture = null;
            }
        }
        void ReleaseDesignerOutlets()
        {
            if (EmailLabel != null)
            {
                EmailLabel.Dispose();
                EmailLabel = null;
            }

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

            if (NoInternetConnection != null)
            {
                NoInternetConnection.Dispose();
                NoInternetConnection = null;
            }
        }
Пример #18
0
        /* private void SetBalloonTip()
         * {
         *   notifyIcon1.Icon = SystemIcons.Exclamation;
         *   notifyIcon1.BalloonTipTitle = "Balloon Tip Title";
         *   notifyIcon1.BalloonTipText = "Balloon Tip Text.";
         *   notifyIcon1.BalloonTipIcon = ToolTipIcon.Error;
         *   this.Click += new EventHandler(Form1_Click);
         * }
         *
         * void Form1_Click(object sender, EventArgs e)
         * {
         *   notifyIcon1.Visible = true;
         *   notifyIcon1.ShowBalloonTip(30000);
         * } */

        public bool IsValid(string emailBoss)
        {
            Regex check = new Regex(@"^\w+[\w-\.]+\@\w{5}\.[a-z]{2,3}$");
            bool  valid;

            valid = check.IsMatch(emailBoss);
            if (valid == true)
            {
                return(true);
            }
            else
            {
                SetBalloonTip();
                notifyIcon1.Visible = true;
                notifyIcon1.ShowBalloonTip(30);

                EmailLabel.Show();
                return(false);
            }
        }
Пример #19
0
        void ReleaseDesignerOutlets()
        {
            if (BackButton != null)
            {
                BackButton.Dispose();
                BackButton = null;
            }

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

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

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

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

            if (SifremiUnuttum != null)
            {
                SifremiUnuttum.Dispose();
                SifremiUnuttum = null;
            }
        }
Пример #20
0
        void ReleaseDesignerOutlets()
        {
            if (closeSession != null)
            {
                closeSession.Dispose();
                closeSession = null;
            }

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

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

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

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

            if (VersionLabel != null)
            {
                VersionLabel.Dispose();
                VersionLabel = null;
            }
        }
Пример #21
0
        void ReleaseDesignerOutlets()
        {
            if (ConfirmPasswordInput != null)
            {
                ConfirmPasswordInput.Dispose();
                ConfirmPasswordInput = null;
            }

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

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

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

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

            if (PasswordLabel != null)
            {
                PasswordLabel.Dispose();
                PasswordLabel = null;
            }
        }
Пример #22
0
        void ReleaseDesignerOutlets()
        {
            if (AlertsTicketsSegmentedControl != null)
            {
                AlertsTicketsSegmentedControl.Dispose();
                AlertsTicketsSegmentedControl = null;
            }

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

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

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

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

            if (UserPicture != null)
            {
                UserPicture.Dispose();
                UserPicture = null;
            }
        }
Пример #23
0
 private void RegistrationButton_Click(object sender, EventArgs e)
 {
     if (registration)
     {
         LastNameTextBox.Hide();
         EmailTextBox.Hide();
         label1.Text     = "Вход";
         LoginLabel.Text = "Логин";
         LastNameLabel.Hide();
         EmailLabel.Hide();
         GenderLabel.Hide();
         GenderComboBox.Hide();
         BirthDateLabel.Hide();
         BirthDateTimePicker.Hide();
         LoginButton.Text        = "Войти";
         RegistrationButton.Text = "Регистрация";
         RobotCheckBox.Text      = "Я не робот";
         registration            = false;
     }
     else
     {
         LastNameTextBox.Show();
         EmailTextBox.Show();
         label1.Text     = "Регистрация";
         LoginLabel.Text = "Имя";
         LastNameLabel.Show();
         EmailLabel.Show();
         GenderLabel.Show();
         GenderComboBox.Show();
         BirthDateLabel.Show();
         BirthDateTimePicker.Show();
         LoginButton.Text        = "Создать";
         RegistrationButton.Text = "Авторизация";
         RobotCheckBox.Text      = "Принимаю условия\nсоглашения и т.д.";
         registration            = true;
     }
 }
Пример #24
0
        public override void ViewDidLoad()
        {
            base.ViewDidLoad();

            GroupSimilarTimeEntriesLabel.Text = Resources.GroupTimeEntries;
            YourProfileCellLabel.Text         = Resources.YourProfile;
            WorkspaceCellLabel.Text           = Resources.Workspace;
            FormatSettingsHeaderLabel.Text    = Resources.FormatSettings;
            DateFormatCellLabel.Text          = Resources.DateFormat;
            Use24HourClockCellLabel.Text      = Resources.Use24HourClock;
            DurationFormatCellLabel.Text      = Resources.DurationFormat;
            FirstDayOfTheWeekCellLabel.Text   = Resources.FirstDayOfTheWeek;
            ManualModeCellLabel.Text          = Resources.ManualMode;
            ManualModeDescriptionLabel.Text   = Resources.ManualModeDescription;
            CalendarSettingsCellLabel.Text    = Resources.CalendarSettingsTitle;
            SmartAlertCellLabel.Text          = Resources.SmartAlerts;
            SubmitFeedbackCellLabel.Text      = Resources.SubmitFeedback;
            AboutCellLabel.Text          = Resources.About;
            HelpCellLabel.Text           = Resources.Help;
            LoggingOutLabel.Text         = Resources.LoggingOutSecurely;
            SyncingLabel.Text            = Resources.Syncing;
            SyncedLabel.Text             = Resources.SyncCompleted;
            FeedbackToastTitleLabel.Text = Resources.DoneWithExclamationMark.ToUpper();
            FeedbackToastTextLabel.Text  = Resources.ThankYouForTheFeedback;
            LogoutButton.SetTitle(Resources.SignOutOfToggl, UIControlState.Normal);

            prepareViews();

            Title             = ViewModel.Title;
            VersionLabel.Text = ViewModel.Version;

            LoggingOutView.Hidden          = true;
            SendFeedbackSuccessView.Hidden = true;

            ViewModel.Email
            .Subscribe(EmailLabel.Rx().Text())
            .DisposedBy(DisposeBag);

            ViewModel.IsSynced
            .Subscribe(SyncedView.Rx().IsVisible())
            .DisposedBy(DisposeBag);

            ViewModel.WorkspaceName
            .Subscribe(WorkspaceLabel.Rx().Text())
            .DisposedBy(DisposeBag);

            ViewModel.DurationFormat
            .Subscribe(DurationFormatLabel.Rx().Text())
            .DisposedBy(DisposeBag);

            ViewModel.IsRunningSync
            .Subscribe(SyncingView.Rx().IsVisible())
            .DisposedBy(DisposeBag);

            ViewModel.DateFormat
            .Subscribe(DateFormatLabel.Rx().Text())
            .DisposedBy(DisposeBag);

            ViewModel.BeginningOfWeek
            .Subscribe(BeginningOfWeekLabel.Rx().Text())
            .DisposedBy(DisposeBag);

            ViewModel.IsFeedbackSuccessViewShowing
            .Subscribe(SendFeedbackSuccessView.Rx().AnimatedIsVisible())
            .DisposedBy(DisposeBag);

            ViewModel.LoggingOut
            .Subscribe(_ =>
            {
                LoggingOutView.Hidden = false;
                SyncingView.Hidden    = true;
                SyncedView.Hidden     = true;
            })
            .DisposedBy(DisposeBag);

            HelpView.Rx()
            .BindAction(ViewModel.OpenHelpView)
            .DisposedBy(DisposeBag);

            LogoutButton.Rx()
            .BindAction(ViewModel.TryLogout)
            .DisposedBy(DisposeBag);

            AboutView.Rx()
            .BindAction(ViewModel.OpenAboutView)
            .DisposedBy(DisposeBag);

            FeedbackView.Rx()
            .BindAction(ViewModel.SubmitFeedback)
            .DisposedBy(DisposeBag);

            DateFormatView.Rx()
            .BindAction(ViewModel.SelectDateFormat)
            .DisposedBy(DisposeBag);

            WorkspaceView.Rx()
            .BindAction(ViewModel.PickDefaultWorkspace)
            .DisposedBy(DisposeBag);

            DurationFormatView.Rx()
            .BindAction(ViewModel.SelectDurationFormat)
            .DisposedBy(DisposeBag);

            ManualModeSwitch.Rx().Changed()
            .Subscribe(ViewModel.ToggleManualMode)
            .DisposedBy(DisposeBag);

            GroupSimilarTimeEntriesSwitch.Rx()
            .BindAction(ViewModel.ToggleTimeEntriesGrouping)
            .DisposedBy(DisposeBag);

            BeginningOfWeekView.Rx()
            .BindAction(ViewModel.SelectBeginningOfWeek)
            .DisposedBy(DisposeBag);

            CalendarSettingsView.Rx()
            .BindAction(ViewModel.OpenCalendarSettings)
            .DisposedBy(DisposeBag);

            SendFeedbackSuccessView.Rx().Tap()
            .Subscribe(ViewModel.CloseFeedbackSuccessView)
            .DisposedBy(DisposeBag);

            NotificationSettingsView.Rx()
            .BindAction(ViewModel.OpenNotificationSettings)
            .DisposedBy(DisposeBag);

            TwentyFourHourClockSwitch.Rx().Changed()
            .Subscribe(ViewModel.ToggleTwentyFourHourSettings.Inputs)
            .DisposedBy(DisposeBag);

            UIApplication.Notifications
            .ObserveWillEnterForeground((sender, e) => startAnimations())
            .DisposedBy(DisposeBag);

            if (!ViewModel.CalendarSettingsEnabled)
            {
                hideCalendarSettingsSection();
            }

            ViewModel.IsManualModeEnabled
            .FirstAsync()
            .Subscribe(isEnabled => ManualModeSwitch.SetState(isEnabled, false))
            .DisposedBy(DisposeBag);

            ViewModel.IsGroupingTimeEntries
            .FirstAsync()
            .Subscribe(isGrouping => GroupSimilarTimeEntriesSwitch.SetState(isGrouping, false))
            .DisposedBy(DisposeBag);

            ViewModel.UseTwentyFourHourFormat
            .FirstAsync()
            .Subscribe(useTwentyFourHourFormat => TwentyFourHourClockSwitch.SetState(useTwentyFourHourFormat, false))
            .DisposedBy(DisposeBag);
        }
        void ReleaseDesignerOutlets()
        {
            if (AddressLine12StackView != null)
            {
                AddressLine12StackView.Dispose();
                AddressLine12StackView = null;
            }

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

            if (ZipCodeTextField != null)
            {
                ZipCodeTextField.Dispose();
                ZipCodeTextField = null;
            }
        }
Пример #26
0
        void ReleaseDesignerOutlets()
        {
            if (AboutView != null)
            {
                AboutView.Dispose();
                AboutView = null;
            }

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

            if (WorkspaceView != null)
            {
                WorkspaceView.Dispose();
                WorkspaceView = null;
            }
        }
Пример #27
0
        void ReleaseDesignerOutlets()
        {
            if (CloseButton != null)
            {
                CloseButton.Dispose();
                CloseButton = null;
            }

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

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

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

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

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

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

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

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

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

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

            if (BottonImageView != null)
            {
                BottonImageView.Dispose();
                BottonImageView = null;
            }
        }
Пример #28
0
        void ReleaseDesignerOutlets()
        {
            if (BottomConstraint != null)
            {
                BottomConstraint.Dispose();
                BottomConstraint = null;
            }

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

            if (UsernameLabel != null)
            {
                UsernameLabel.Dispose();
                UsernameLabel = null;
            }
        }
Пример #29
0
        public override void ViewDidLoad()
        {
            base.ViewDidLoad();

            Title = Resources.LoginTitle;
            ResetSuccessLabel.Text        = Resources.APITokenResetSuccess;
            InstructionLabel.Text         = Resources.TokenResetInstruction;
            PasswordTextField.Placeholder = Resources.Password;
            SignOutButton.SetTitle(Resources.OrSignOut, UIControlState.Normal);

            prepareViews();

            ViewModel.Error
            .Subscribe(ErrorLabel.Rx().Text())
            .DisposedBy(DisposeBag);

            ViewModel.Email
            .SelectToString()
            .Subscribe(EmailLabel.Rx().Text())
            .DisposedBy(DisposeBag);

            ViewModel.Password
            .Subscribe(PasswordTextField.Rx().TextObserver())
            .DisposedBy(DisposeBag);

            PasswordTextField.Rx().Text()
            .Subscribe(ViewModel.Password)
            .DisposedBy(DisposeBag);

            ViewModel.IsPasswordMasked
            .Subscribe(PasswordTextField.Rx().SecureTextEntry())
            .DisposedBy(DisposeBag);

            SignOutButton.Rx()
            .BindAction(ViewModel.SignOut)
            .DisposedBy(DisposeBag);

            ShowPasswordButton.Rx()
            .BindAction(ViewModel.TogglePasswordVisibility)
            .DisposedBy(DisposeBag);

            nextButton.Rx().Tap()
            .Subscribe(ViewModel.Done.Inputs)
            .DisposedBy(DisposeBag);

            PasswordTextField.Rx().ShouldReturn()
            .Subscribe(ViewModel.Done.Inputs)
            .DisposedBy(DisposeBag);

            //Enabled
            ViewModel.NextIsEnabled
            .Subscribe(nextButton.Rx().Enabled())
            .DisposedBy(DisposeBag);

            //Visibility
            ViewModel.HasError
            .Subscribe(ErrorView.Rx().IsVisible())
            .DisposedBy(DisposeBag);

            ViewModel.Done.Executing
            .Invert()
            .Subscribe(ShowPasswordButton.Rx().IsVisible())
            .DisposedBy(DisposeBag);

            ViewModel.Done.Executing
            .Subscribe(ActivityIndicatorView.Rx().IsVisible())
            .DisposedBy(DisposeBag);

            PasswordTextField.BecomeFirstResponder();
        }
Пример #30
0
        void ReleaseDesignerOutlets()
        {
            if (Address1Label != null)
            {
                Address1Label.Dispose();
                Address1Label = null;
            }

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

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

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

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

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

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

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

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

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

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

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

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

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

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