コード例 #1
0
        private void CreateActionButtons()
        {
            var xCurr = View.Frame.Width;

            // Create the Plan button.
            xCurr                    -= _xMargin + _controlsWidth;
            _planButton               = ControlsFactory.NewStandardButton(new CGRect(xCurr, _yXcodeControlsMargin, _controlsWidth, _controlsHeight));
            _planButton.Title         = "Plan";
            _planButton.Enabled       = true;
            _planButton.KeyEquivalent = ControlsFactory.EnterKey;
            _planButton.Action        = new ObjCRuntime.Selector("PlanScreenings:");
            View.AddSubview(_planButton);

            // Create the Undo Planning button.
            xCurr                -= _xDistance + _controlsWidth;
            _unplanButton         = ControlsFactory.NewStandardButton(new CGRect(xCurr, _yXcodeControlsMargin, _controlsWidth, _controlsHeight));
            _unplanButton.Title   = "Unplan";
            _unplanButton.Enabled = ScreeningsPlan.Screenings.Count(s => s.AutomaticallyPlanned) >= 1;
            _unplanButton.Action  = new ObjCRuntime.Selector("UnplanScreenings:");
            View.AddSubview(_unplanButton);

            // Create the Close button.
            xCurr -= _xDistance + _controlsWidth;
            var doneButton = ControlsFactory.NewCancelButton(new CGRect(xCurr, _yXcodeControlsMargin, _controlsWidth, _controlsHeight));

            doneButton.Title  = "Close";
            doneButton.Action = new ObjCRuntime.Selector("ClosePlanView:");
            View.AddSubview(doneButton);
        }
コード例 #2
0
        void CreateCancelButton()
        {
            CGRect   cancelButtonRect = new CGRect(_xMargin, _yMargin, _cancelButtonWidth, _buttonHeight);
            NSButton cancelButton     = ControlsFactory.NewCancelButton(cancelButtonRect);

            cancelButton.Action = new ObjCRuntime.Selector("CancelUncombine:");
            View.AddSubview(cancelButton);
        }
コード例 #3
0
        private void CreateActionButtons()
        {
            var xCurr = View.Frame.Width;

            // Create the Close button.
            xCurr -= _xBetweenControls + _controlWidth;
            var rect = new CGRect(xCurr, _yControlsMargin, _controlWidth, _controlHeight);

            _doneButton        = ControlsFactory.NewCancelButton(rect);
            _doneButton.Action = new ObjCRuntime.Selector("CloseAvailabilityDialog:");
            View.AddSubview(_doneButton);
        }
コード例 #4
0
        private void CreateBottomButtons()
        {
            var xCurr = _xMargin + _contentWidth;

            // Create the close button.
            xCurr -= _buttonWidth;
            var cancelButtonRect = new CGRect(xCurr, _yMargin, _buttonWidth, _buttonHeight);

            _cancelButton        = ControlsFactory.NewCancelButton(cancelButtonRect);
            _cancelButton.Title  = "Close";
            _cancelButton.Action = new ObjCRuntime.Selector("CancelGotoScreening:");
            View.AddSubview(_cancelButton);

            // Create the website button.
            xCurr -= _imageButtonWidth;
            NSButton websiteButton = ControlsFactory.NewVisitWebsiteButton(xCurr, _yMargin, _film);

            websiteButton.Enabled = true;
            View.AddSubview(websiteButton);
        }