Пример #1
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;
            }
        }
Пример #2
0
        public override void ViewDidLoad()
        {
            try
            {
                base.ViewDidLoad();

                c.AddViews(Snackbar, Snackbar.SnackText, Snackbar.SnackButton);

                SexLabel.Text              = LangEnglish.Sex;
                EmailLabel.Text            = LangEnglish.Email;
                EmailExplanationLabel.Text = LangEnglish.EmailExplanation;
                PasswordLabel.Text         = LangEnglish.Password;
                ConfirmPasswordLabel.Text  = LangEnglish.ConfirmPassword;
                UsernameLabel.Text         = LangEnglish.Username;
                CheckUsername.SetTitle(LangEnglish.CheckAvailability, UIControlState.Normal);
                NameLabel.Text = LangEnglish.Name;
                Images.SetTitle(LangEnglish.Images, UIControlState.Normal);
                ImagesProgressText.Text       = "";
                DescriptionLabel.Text         = LangEnglish.Description;
                UseLocationLabel.Text         = LangEnglish.UseLocation;
                LocationExplanation.Text      = LangEnglish.LocationExplanation;
                LocationShareLabel.Text       = LangEnglish.LocationShare;
                LocationShareAllLabel.Text    = LangEnglish.LocationShareAll;
                LocationShareLikeLabel.Text   = LangEnglish.LocationShareLike;
                LocationShareMatchLabel.Text  = LangEnglish.LocationShareMatch;
                LocationShareFriendLabel.Text = LangEnglish.LocationShareFriend;
                LocationShareNoneLabel.Text   = LangEnglish.LocationShareNone;
                DistanceShareLabel.Text       = LangEnglish.DistanceShare;
                DistanceShareAllLabel.Text    = LangEnglish.DistanceShareAll;
                DistanceShareLikeLabel.Text   = LangEnglish.DistanceShareLike;
                DistanceShareMatchLabel.Text  = LangEnglish.DistanceShareMatch;
                DistanceShareFriendLabel.Text = LangEnglish.DistanceShareFriend;
                DistanceShareNoneLabel.Text   = LangEnglish.DistanceShareNone;
                Register.SetTitle(LangEnglish.Register, UIControlState.Normal);
                Reset.SetTitle(LangEnglish.Reset, UIControlState.Normal);
                RegisterCancel.SetTitle(LangEnglish.Cancel, UIControlState.Normal);
                ImageEditorLabel.Text = LangEnglish.ImageEditorLabel;

                DescriptionText.Delegate = this;

                CheckUsername.Layer.MasksToBounds  = true; //required for presevering corner radius for highlighted state
                Images.Layer.MasksToBounds         = true;
                Register.Layer.MasksToBounds       = true;
                Reset.Layer.MasksToBounds          = true;
                RegisterCancel.Layer.MasksToBounds = true;

                Sex.Model = new DropDownList(LangEnglish.SexEntries, "Sex", 120, this);
                c.DrawBorder(DescriptionText);
                c.DrawBorder(EulaText);

                EulaLabel.Text = LangEnglish.EulaLabel;
                EulaText.Text  = LangEnglish.EulaText;

                LoaderCircle.Hidden = true;

                ImageEditorFrameBorder.Layer.BorderColor = UIColor.FromName("PrimaryDark").CGColor;
                ImageEditorFrameBorder.Layer.BorderWidth = 1;

                rc = new RegisterCommonMethods(this, c, ImagesUploaded, Email, Username, Name, DescriptionText, CheckUsername, Images,
                                               ImagesProgressText, LoaderCircle, ImagesProgress, UseLocationSwitch, LocationShareAll, LocationShareLike, LocationShareMatch, LocationShareFriend, LocationShareNone,
                                               DistanceShareAll, DistanceShareLike, DistanceShareMatch, DistanceShareFriend, DistanceShareNone, ImageEditorControls, TopSeparator, RippleImageEditor, ImageEditorStatus, ImageEditorCancel, ImageEditorOK, ImageEditor, ImageEditorFrame, ImageEditorFrameBorder);

                RegisterScroll.SetContext(this);

                ImagesUploaded.SetContext(this);
                ImagesUploaded.numColumns  = 5; //it does not get passed in the layout file
                ImagesUploaded.tileSpacing = 2;

                if (!File.Exists(regSessionFile))
                {
                    regsessionid = "";
                }
                else
                {
                    regsessionid = File.ReadAllText(regSessionFile);
                }

                Register.TouchUpInside       += Register_Click;
                Reset.TouchUpInside          += Reset_Click;
                RegisterCancel.TouchUpInside += RegisterCancel_Click;

                ImageEditorCancel.TouchUpInside += rc.CancelImageEditing;
                ImageEditorOK.TouchUpInside     += rc.OKImageEditing;

                RoundBottom_Base                 = RoundBottom;
                Snackbar_Base                    = Snackbar;
                BottomConstraint_Base            = BottomConstraint;
                SnackTopConstraint_Base          = SnackTopConstraint;
                SnackBottomConstraint_Base       = SnackBottomConstraint;
                ScrollBottomConstraint_Base      = ScrollBottomConstraint;
                ScrollBottomOuterConstraint_Base = ScrollBottomOuterConstraint;
            }
            catch (Exception ex)
            {
                c.ReportErrorSilent(ex.Message + Environment.NewLine + ex.StackTrace);
            }
        }