Esempio n. 1
0
        public override bool BarButtonItemSelected(int index)
        {
            switch (index)
            {
            case 0:

                var c = new IssueViewController();
                c.Arguments = new UIBundle();
                c.Arguments.PutInt("GimmickId", _gimmickId);
                this.NavigationController.PushViewController(c, true);

                return(true);

            default:
                return(base.BarButtonItemSelected(index));
            }
        }
Esempio n. 2
0
        public override void ViewWillAppear(bool animated)
        {
            base.ViewWillAppear(animated);

            #region Designer Stuff

            ResizeToShowKeyboard();

            this.HasBarButtonItems = true;

            #endregion

            this.Title = "Chat";

            this.NavigationController.SetNavigationBarHidden(false, true);

            this.HeaderLayout.UserInteractionEnabled = true;
            this.HeaderLayout.AddGestureRecognizer(new UITapGestureRecognizer(
                                                       () =>
            {
                var c       = new IssueViewController();
                c.Arguments = new UIBundle();
                c.Arguments.PutInt("GimmickId", _gimmickId);
                c.Arguments.PutObject <Issue>("Issue", _issue);
                this.NavigationController.PushViewController(c, true);
            }));

            this.MessageList.Source             = _source;
            this.MessageList.RowHeight          = UITableView.AutomaticDimension;
            this.MessageList.EstimatedRowHeight = 74;
            this.MessageList.SeparatorStyle     = UITableViewCellSeparatorStyle.None;
            this.MessageList.BackgroundColor    = ViewBuilder.ColorFromARGB(AppController.Colors.DarkLiver);
            this.MessageList.TableFooterView    = new UIView(CoreGraphics.CGRect.Empty);

            this.SendButton.TouchUpInside += SendButton_TouchUpInside;

            this.MessageText.Constraints.Single(x => x.GetIdentifier() == "Height").Constant = 30f;
            this.MessageText.Changed += MessageText_Changed;

            if (_issue != null)
            {
                LoadIssue();
            }

            RefreshMessages();
        }
Esempio n. 3
0
        public override void ViewWillAppear(bool animated)
        {
            base.ViewWillAppear(animated);

            #region Designer Stuff

            this.FilterButtons = new[] { this.FilterOpenedButton, this.FilterWorkingButton, this.FilterClosedButton };

            this.HasBarButtonItems = true;

            #endregion

            this.Title = "Issues";

            this.FilterOpenedButton.TouchUpInside  += FilterOpenedButton_TouchUpInside;
            this.FilterWorkingButton.TouchUpInside += FilterOpenedButton_TouchUpInside;
            this.FilterClosedButton.TouchUpInside  += FilterOpenedButton_TouchUpInside;

            _source = new IssueViewSource(this, new Issue[0]);
            this.IssueList.Source             = _source;
            this.IssueList.RowHeight          = UITableView.AutomaticDimension;
            this.IssueList.EstimatedRowHeight = 130;
            this.IssueList.SeparatorStyle     = UITableViewCellSeparatorStyle.None;
            this.IssueList.BackgroundColor    = ViewBuilder.ColorFromARGB(AppController.Colors.DarkLiver);
            this.IssueList.TableFooterView    = new UIView(CoreGraphics.CGRect.Empty);
            this.IssueList.ItemSelected      += IssueList_ItemSelected;

            if (_addNew)
            {
                _addNew = false;

                var c = new IssueViewController();
                c.Arguments = new UIBundle();
                c.Arguments.PutInt("GimmickId", _gimmickId);
                this.NavigationController.PushViewController(c, true);
            }
            else
            {
                RefreshIssues(_filter);
            }
        }