Esempio n. 1
0
        void ReleaseDesignerOutlets()
        {
            if (ExampleTextView != null)
            {
                ExampleTextView.Dispose();
                ExampleTextView = null;
            }

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

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

            if (MoreInfoTextField != null)
            {
                MoreInfoTextField.Dispose();
                MoreInfoTextField = null;
            }
        }
Esempio n. 2
0
        void ReleaseDesignerOutlets()
        {
            if (AddContact != null)
            {
                AddContact.Dispose();
                AddContact = null;
            }

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

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

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

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

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

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

            if (UpdateButton != null)
            {
                UpdateButton.Dispose();
                UpdateButton = null;
            }
        }
Esempio n. 4
0
        void ReleaseDesignerOutlets()
        {
            if (AddMemberButton != null)
            {
                AddMemberButton.Dispose();
                AddMemberButton = null;
            }

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

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

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

            if (startButton != null)
            {
                startButton.Dispose();
                startButton = null;
            }
        }
Esempio n. 5
0
        void ReleaseDesignerOutlets()
        {
            if (AddButton != null)
            {
                AddButton.Dispose();
                AddButton = null;
            }

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

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

            if (PhoneNumberTextField != null)
            {
                PhoneNumberTextField.Dispose();
                PhoneNumberTextField = null;
            }
        }
Esempio n. 6
0
        public override void ViewDidLoad()
        {
            base.ViewDidLoad();
            //TODO: not to use local list, use azure
            //Family = AzureHelper.GetFamilyMembers();

            // Perform any additional setup after loading the view, typically from a nib.
            NameTextField.ClearsOnBeginEditing = true;
            NameTextField.EditingChanged      += (sender1, e1) => {
                Name = ((UITextField)sender1).Text.ToString();
                //NameTextField.ResignFirstResponder();
            };
            startButton.TouchUpInside += (sender, e) => {
                NameTextField.ResignFirstResponder();
                if (Name == "")
                {
                    var alert = UIAlertController.Create("Empty Name", "Please Enter Your Name", UIAlertControllerStyle.Alert);
                    alert.AddAction(UIAlertAction.Create("Ok", UIAlertActionStyle.Default, null));
                    PresentViewController(alert, true, null);
                }
                else
                {
                    CameraViewController cameraView = this.Storyboard.InstantiateViewController("CameraViewController") as CameraViewController;
                    if (cameraView != null)
                    {
                        cameraView.userName = Name;
                        this.NavigationController.PushViewController(cameraView, true);
                    }
                }
            };

            AddMemberButton.TouchUpInside += (sender, e) =>
            {
                NameTextField.ResignFirstResponder();

                FamilyListController family = this.Storyboard.InstantiateViewController("FamilyListController") as FamilyListController;
                if (family != null)
                {
                    family.Family = Family;
                    this.NavigationController.PushViewController(family, true);
                }
            };

            FamilyListButton.TouchUpInside += (object sender, EventArgs e) => {
                Family = AzureHelper.GetFamilyMembers();

                NameTextField.ResignFirstResponder();
                // Launches a new instance of CallHistoryController
                FamilyMemberController familyMember = this.Storyboard.InstantiateViewController("FamilyMemberController") as FamilyMemberController;
                if (familyMember != null)
                {
                    familyMember.Family = Family;
                    this.NavigationController.PushViewController(familyMember, true);
                }
            };

            NameTextField.ResignFirstResponder();
        }
        private void SetupBinding()
        {
            EmailTextField.EditingChanged += (s, e) => { };
            Bindings.Add(this.SetBinding(
                             () => EmailTextField.Text,
                             () => Vm.Email,
                             BindingMode.OneWay));

            NameTextField.EditingChanged += (s, e) => { };
            Bindings.Add(this.SetBinding(
                             () => NameTextField.Text,
                             () => Vm.UserName,
                             BindingMode.OneWay));

            PasswordTextField.EditingChanged += (s, e) => { };
            Bindings.Add(this.SetBinding(
                             () => PasswordTextField.Text,
                             () => Vm.Password,
                             BindingMode.OneWay));

            Bindings.Add(this
                         .SetBinding(() => Vm.EmailValidationError)
                         .WhenSourceChanges(() =>
            {
                if (Vm.EmailValidationError)
                {
                    EmailTextField.Shake();
                }
            }));

            Bindings.Add(this
                         .SetBinding(() => Vm.UserNameValidationError)
                         .WhenSourceChanges(() =>
            {
                if (Vm.UserNameValidationError)
                {
                    NameTextField.Shake();
                }
            }));

            Bindings.Add(this
                         .SetBinding(() => Vm.PasswordValidationError)
                         .WhenSourceChanges(() =>
            {
                if (Vm.PasswordValidationError)
                {
                    PasswordTextField.Shake();
                }
            }));

            SignUpButton.TouchUpInside += (s, e) => { };
            SignUpButton.SetCommand(
                "TouchUpInside",
                Vm.SignUpCommand);
        }
        void ReleaseDesignerOutlets()
        {
            if (CheckButton != null)
            {
                CheckButton.Dispose();
                CheckButton = null;
            }

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

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

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

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

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

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

            if (SubmitButton != null)
            {
                SubmitButton.Dispose();
                SubmitButton = null;
            }
        }
Esempio n. 9
0
        void ReleaseDesignerOutlets()
        {
            if (ModelTextField != null)
            {
                ModelTextField.Dispose();
                ModelTextField = null;
            }

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

            if (SaveBarButtonItem != null)
            {
                SaveBarButtonItem.Dispose();
                SaveBarButtonItem = null;
            }
        }
        void ReleaseDesignerOutlets()
        {
            if (NameTextField != null)
            {
                NameTextField.Dispose();
                NameTextField = null;
            }

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

            if (NextButton != null)
            {
                NextButton.Dispose();
                NextButton = null;
            }
        }
Esempio n. 11
0
        private void HighFiveButton_TouchUpInside(object sender, EventArgs e)
        {
            NameTextField.ResignFirstResponder();
            if (ViewModel.HighFiveCommand.CanExecute("Not empty string"))
            {
                FlashView.Hidden = false;
                FlashView.Alpha  = 1;
                ContentView.BringSubviewToFront(FlashView);
                UIView.Animate(
                    0.4,
                    () =>
                {
                    FlashView.Alpha = 0;
                },
                    () =>
                {
                    FlashView.Hidden = true;
                });

                ViewModel.HighFiveCommand.Execute(null);
            }
        }
        void ReleaseDesignerOutlets()
        {
            if (LocationTextField != null)
            {
                LocationTextField.Dispose();
                LocationTextField = null;
            }

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

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

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

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

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

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

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

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

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

            if (SaveButton != null)
            {
                SaveButton.Dispose();
                SaveButton = null;
            }
        }
Esempio n. 14
0
        void ReleaseDesignerOutlets()
        {
            if (ClientLabel != null)
            {
                ClientLabel.Dispose();
                ClientLabel = null;
            }

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

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

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

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

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

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

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

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

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

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

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

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

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

            if (PrivateProjectLabel != null)
            {
                PrivateProjectLabel.Dispose();
                PrivateProjectLabel = null;
            }
        }
Esempio n. 15
0
 #region Used For Animation
        public void AnimateTextNameLabel(string text, double delay, Action completed)
        {
            NameTextField.AnimateText(text, delay, completed);
        }
Esempio n. 16
0
        public override void ViewDidLoad()
        {
            base.ViewDidLoad();

            TitleLabel.Text           = Resources.NewProject;
            NameTextField.Placeholder = Resources.ProjectName;
            ErrorLabel.Text           = Resources.ProjectNameTakenError;
            DoneButton.SetTitle(Resources.Create, UIControlState.Normal);
            ProjectNameUsedErrorTextHeight.Constant = 0;

            // Name
            NameTextField.Rx().Text()
            .Subscribe(ViewModel.Name.Accept)
            .DisposedBy(DisposeBag);

            ViewModel.Name
            .Subscribe(NameTextField.Rx().TextObserver())
            .DisposedBy(DisposeBag);

            // Color
            ColorPickerOpeningView.Rx()
            .BindAction(ViewModel.PickColor)
            .DisposedBy(DisposeBag);

            ViewModel.Color
            .Select(color => color.ToNativeColor())
            .Subscribe(ColorCircleView.Rx().BackgroundColor())
            .DisposedBy(DisposeBag);

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

            ViewModel.Error
            .Select(e => string.IsNullOrEmpty(e) ? new nfloat(0) : errorVisibleHeight)
            .Subscribe(ProjectNameUsedErrorTextHeight.Rx().Constant())
            .DisposedBy(DisposeBag);

            if (UIDevice.CurrentDevice.UserInterfaceIdiom == UIUserInterfaceIdiom.Pad)
            {
                ViewModel.Error
                .Select(e => string.IsNullOrEmpty(e) ? desiredIpadHeight : errorVisibleHeight + desiredIpadHeight)
                .Select(h => new CGSize(0, h))
                .Subscribe(this.Rx().PreferredContentSize())
                .DisposedBy(DisposeBag);
            }

            // Workspace
            WorkspaceLabel.Rx()
            .BindAction(ViewModel.PickWorkspace)
            .DisposedBy(DisposeBag);

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

            // Client
            ClientLabel.Rx()
            .BindAction(ViewModel.PickClient)
            .DisposedBy(DisposeBag);

            var emptyText = Resources.AddClient.PrependWithAddIcon(ClientLabel.Font.CapHeight);

            ViewModel.ClientName
            .Select(attributedClientName)
            .Subscribe(ClientLabel.Rx().AttributedText())
            .DisposedBy(DisposeBag);

            // Is Private
            PrivateProjectSwitchContainer.Rx().Tap()
            .Select(_ => PrivateProjectSwitch.On)
            .Subscribe(ViewModel.IsPrivate.Accept)
            .DisposedBy(DisposeBag);

            ViewModel.IsPrivate
            .Subscribe(PrivateProjectSwitch.Rx().On())
            .DisposedBy(DisposeBag);

            // Save
            DoneButton.Rx()
            .BindAction(ViewModel.Save)
            .DisposedBy(DisposeBag);

            CloseButton.Rx()
            .BindAction(ViewModel.Close)
            .DisposedBy(DisposeBag);

            NSAttributedString attributedClientName(string clientName)
            {
                if (string.IsNullOrEmpty(clientName))
                {
                    return(emptyText);
                }

                return(new NSAttributedString(clientName));
            }
        }
 public void FillNameTextField(string text)
 {
     NameTextField.Clear();
     NameTextField.SendKeys(text);
 }
Esempio n. 18
0
 private void ViewTapped(UITapGestureRecognizer obj)
 {
     NameTextField.ResignFirstResponder();
 }
Esempio n. 19
0

            if (SelectedCard.IsFlipped)
            {
                cardBack.Hidden = false;
            }
            else
            {
                cardFront.Hidden = false;
            }


            var SwipeGestureRecognizer = new UISwipeGestureRecognizer((UISwipeGestureRecognizer obj) =>
            {
                Flip();
            });
            SwipeGestureRecognizer.Direction = UISwipeGestureRecognizerDirection.Left | UISwipeGestureRecognizerDirection.Right;
            ContainerView.AddGestureRecognizer(SwipeGestureRecognizer);


        }

        public override void ViewWillAppear(bool animated)
        {
            base.ViewWillAppear(animated);

            Update(true);

            CABasicAnimation grow = CABasicAnimation.FromKeyPath("transform.scale");
            grow.From = NSObject.FromObject(0);
            grow.Duration = .5;
            grow.RemovedOnCompletion = true;
            ContainerView.Layer.AddAnimation(grow, "grow");
        }
        public override void ViewDidAppear(bool animated)
        {
            base.ViewDidAppear(animated);

            TableViewRowEditingChangedNotification = NSNotificationCenter.DefaultCenter.AddObserver(new NSString(Strings.InternalNotifications.notification_table_row_editing_changed), (obj) =>
            {
                InvokeOnMainThread(() =>
                {
                    Update(false);
                });
            });
        }
        public override void ViewDidDisappear(bool animated)
        {
            base.ViewDidDisappear(animated);

            TableViewRowEditingChangedNotification?.Dispose();
            TableViewRowEditingChangedNotification = null;
        }
        public override void ViewWillLayoutSubviews()
        {
            base.ViewWillLayoutSubviews();

            if (ContainerView != null)
            {
                ContainerView.Frame = new CGRect(8, 8, View.Bounds.Width - 16, GetCalculatedHeight() + 33); //40 is the total insets that appear in a tableviewcell

                var cardFront = ContainerView.Subviews.Where(c => c.GetType() == typeof(CardFront)).FirstOrDefault() as CardFront;
                if (cardFront != null)
                    cardFront.Frame = ContainerView.Bounds;

                var cardBack = ContainerView.Subviews.Where(c => c.GetType() == typeof(CardBack)).FirstOrDefault() as CardBack;
                if (cardBack != null) 
                    cardBack.Frame = ContainerView.Bounds;
            }
        }
        protected override void Dispose(bool disposing)
        {
            base.Dispose(disposing);
            if (disposing)
            {
                ContainerView.Subviews.ToList().ForEach(v => v.RemoveFromSuperview());
                ContainerView?.RemoveFromSuperview();
                ContainerView?.Dispose();
                ContainerView = null;

                TableViewRowEditingChangedNotification?.Dispose();
                TableViewRowEditingChangedNotification = null;
            }
        }
        public void FocusOnName()
        {
            NameTextField.BecomeFirstResponder();
        }
        public void Update(bool reloadImages)
        {
            if (SelectedCard == null) return;

            NameTextField.Text = (SelectedCard.Name.Equals(Strings.Basic.new_card, StringComparison.InvariantCultureIgnoreCase) && Editable) ? null : SelectedCard.Name;

            var cardFront = ContainerView.Subviews.Where(c => c.GetType() == typeof(CardFront)).FirstOrDefault() as CardFront;
        void ReleaseDesignerOutlets()
        {
            if (AllEmployeesLabel != null)
            {
                AllEmployeesLabel.Dispose();
                AllEmployeesLabel = null;
            }

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

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

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

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

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

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

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

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

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

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