Inheritance: Panel, IPanel
            /// <summary>
            /// Sets up the panel that shows the error details
            /// </summary>
            private void SetFullDetailsPanel()
            {
                _fullDetailPanel                = new PanelVWG();
                _fullDetailPanel.Text           = "Error Detail";
                _fullDetailPanel.Height         = FULL_DETAIL_HEIGHT;
                _fullDetailPanel.Visible        = false;
                _errorDetails                   = new TextBoxVWG();
                _errorDetails.Text              = ExceptionUtilities.GetExceptionString(_exception, 0, false);
                _errorDetails.Multiline         = true;
                _errorDetails.ScrollBars        = Gizmox.WebGUI.Forms.ScrollBars.Both;
                _showStackTrace                 = new CheckBoxVWG();
                _showStackTrace.Text            = "&Show stack trace";
                _showStackTrace.CheckedChanged += ShowStackTraceClicked;
                BorderLayoutManager detailsManager = new BorderLayoutManagerVWG(_fullDetailPanel, GlobalUIRegistry.ControlFactory);

                detailsManager.AddControl(_errorDetails, BorderLayoutManager.Position.Centre);
                detailsManager.AddControl(_showStackTrace, BorderLayoutManager.Position.South);
            }
            /// <summary>
            /// Constructor that sets up the error message form
            /// </summary>
            public CollapsibleExceptionNotifyForm(Exception ex, string furtherMessage, string title)
            {
                _exception = ex;

                _summaryPanel        = new PanelVWG();
                _summaryPanel.Text   = title;
                _summaryPanel.Height = SUMMARY_HEIGHT;
                ITextBox            messageTextBox = GetSimpleMessage(ex.Message);
                ILabel              messageLabel   = GetErrorLabel(furtherMessage);
                BorderLayoutManager summaryManager = new BorderLayoutManagerVWG(_summaryPanel, GlobalUIRegistry.ControlFactory);

                summaryManager.AddControl(messageLabel, BorderLayoutManager.Position.North);
                summaryManager.AddControl(messageTextBox, BorderLayoutManager.Position.Centre);

                IButtonGroupControl buttonsOK = GlobalUIRegistry.ControlFactory.CreateButtonGroupControl();

                buttonsOK.AddButton("&OK", OKButtonClickHandler);
                buttonsOK.Height = BUTTONS_HEIGHT;

                IButtonGroupControl buttonsDetail = GlobalUIRegistry.ControlFactory.CreateButtonGroupControl();

                buttonsDetail.AddButton("Email Error", EmailErrorClickHandler);
                _moreDetailButton    = buttonsDetail.AddButton("More Detail »", MoreDetailClickHandler);
                buttonsDetail.Height = BUTTONS_HEIGHT;
                buttonsDetail.Width  = 2 * (_moreDetailButton.Width + 9);

                SetFullDetailsPanel();

                BorderLayoutManager manager = //new BorderLayoutManagerVWG(this, GlobalUIRegistry.ControlFactory);
                                              GlobalUIRegistry.ControlFactory.CreateBorderLayoutManager(this);

                manager.AddControl(_summaryPanel, BorderLayoutManager.Position.North);
                manager.AddControl(buttonsDetail, BorderLayoutManager.Position.West);
                manager.AddControl(buttonsOK, BorderLayoutManager.Position.East);
                manager.AddControl(_fullDetailPanel, BorderLayoutManager.Position.South);


                Text          = title;
                Width         = 600;
                Height        = SUMMARY_HEIGHT + BUTTONS_HEIGHT + 16;
                StartPosition = FormStartPosition.Manual;
                Location      = new Point(50, 50);
                Resize       += ResizeForm;
            }
Exemplo n.º 3
0
        ///<summary>
        /// Constructor for the <see cref="MultiSelectorVWG{T}"/>
        ///</summary>
        ///<param name="controlFactory"></param>
        public MultiSelectorVWG(IControlFactory controlFactory)
        {
//            _controlFactory = controlFactory;
            InitializeComponent();
            _gridLayoutManager = new GridLayoutManager(this, controlFactory);
            PanelVWG optionsPanel = new PanelVWG();

            _availableOptionsGroupBox.Dock = Gizmox.WebGUI.Forms.DockStyle.Fill;
            optionsPanel.Controls.Add(_availableOptionsGroupBox);
            PanelVWG          buttonPanel        = new PanelVWG();
            GridLayoutManager buttonPanelManager = new GridLayoutManager(buttonPanel, controlFactory);

            buttonPanelManager.SetGridSize(6, 1);
            buttonPanelManager.AddControl(null);
            buttonPanelManager.AddControl(_btnSelect);
            buttonPanelManager.AddControl(_btnSelectAll);
            buttonPanelManager.AddControl(_btnDeselectAll);
            buttonPanelManager.AddControl(_btnDeselect);
            buttonPanelManager.AddControl(null);
            buttonPanelManager.FixRow(0, 25);
            buttonPanelManager.FixRow(1, 25);
            buttonPanelManager.FixRow(2, 25);
            buttonPanelManager.FixRow(3, 25);
            buttonPanelManager.FixRow(4, 25);
            buttonPanelManager.FixRow(5, 25);
            buttonPanelManager.FixColumnBasedOnContents(0);
            PanelVWG selectionsPanel = new PanelVWG();

            _selectionsGroupBox.Dock = Gizmox.WebGUI.Forms.DockStyle.Fill;
            selectionsPanel.Controls.Add(_selectionsGroupBox);
            _gridLayoutManager.SetGridSize(1, 3);
            _gridLayoutManager.FixColumn(1, 100);
            _gridLayoutManager.AddControl(optionsPanel);
            _gridLayoutManager.AddControl(buttonPanel);
            _gridLayoutManager.AddControl(selectionsPanel);
            _manager = new MultiSelectorManager <T>(this);
        }
            /// <summary>
            /// Constructor that sets up the error message form
            /// </summary>
            public CollapsibleExceptionNotifyForm(Exception ex, string furtherMessage, string title)
            {
                _exception = ex;

                _summaryPanel = new PanelVWG();
                _summaryPanel.Text = title;
                _summaryPanel.Height = SUMMARY_HEIGHT;
                ITextBox messageTextBox = GetSimpleMessage(ex.Message);
                ILabel messageLabel = GetErrorLabel(furtherMessage);
                BorderLayoutManager summaryManager = new BorderLayoutManagerVWG(_summaryPanel, GlobalUIRegistry.ControlFactory);
                summaryManager.AddControl(messageLabel, BorderLayoutManager.Position.North);
                summaryManager.AddControl(messageTextBox, BorderLayoutManager.Position.Centre);

                IButtonGroupControl buttonsOK = GlobalUIRegistry.ControlFactory.CreateButtonGroupControl();
                buttonsOK.AddButton("&OK", OKButtonClickHandler);
                buttonsOK.Height = BUTTONS_HEIGHT;

                IButtonGroupControl buttonsDetail = GlobalUIRegistry.ControlFactory.CreateButtonGroupControl();
                buttonsDetail.AddButton("Email Error", EmailErrorClickHandler);
                _moreDetailButton = buttonsDetail.AddButton("More Detail »", MoreDetailClickHandler);
                buttonsDetail.Height = BUTTONS_HEIGHT;
                buttonsDetail.Width = 2 * (_moreDetailButton.Width + 9);

                SetFullDetailsPanel();

                BorderLayoutManager manager = //new BorderLayoutManagerVWG(this, GlobalUIRegistry.ControlFactory);
                    GlobalUIRegistry.ControlFactory.CreateBorderLayoutManager(this);
                manager.AddControl(_summaryPanel, BorderLayoutManager.Position.North);
                manager.AddControl(buttonsDetail, BorderLayoutManager.Position.West);
                manager.AddControl(buttonsOK, BorderLayoutManager.Position.East);
                manager.AddControl(_fullDetailPanel, BorderLayoutManager.Position.South);


                Text = title;
                Width = 600;
                Height = SUMMARY_HEIGHT + BUTTONS_HEIGHT + 16;
                StartPosition = FormStartPosition.Manual;
                Location = new Point(50, 50);
                Resize += ResizeForm;
            }
 /// <summary>
 /// Sets up the panel that shows the error details
 /// </summary>
 private void SetFullDetailsPanel()
 {
     _fullDetailPanel = new PanelVWG();
     _fullDetailPanel.Text = "Error Detail";
     _fullDetailPanel.Height = FULL_DETAIL_HEIGHT;
     _fullDetailPanel.Visible = false;
     _errorDetails = new TextBoxVWG();
     _errorDetails.Text = ExceptionUtilities.GetExceptionString(_exception, 0, false);
     _errorDetails.Multiline = true;
     _errorDetails.ScrollBars = Gizmox.WebGUI.Forms.ScrollBars.Both;
     _showStackTrace = new CheckBoxVWG();
     _showStackTrace.Text = "&Show stack trace";
     _showStackTrace.CheckedChanged += ShowStackTraceClicked;
     BorderLayoutManager detailsManager = new BorderLayoutManagerVWG(_fullDetailPanel, GlobalUIRegistry.ControlFactory);
     detailsManager.AddControl(_errorDetails, BorderLayoutManager.Position.Centre);
     detailsManager.AddControl(_showStackTrace, BorderLayoutManager.Position.South);
 }