Ejemplo n.º 1
0
        protected override void OnContentsResized(ContentsResizedEventArgs e)
        {
            HeaderPanel headerPanel = Parent as HeaderPanel;

            Debug.Assert(headerPanel != null,
                         "HeaderLabel should be placed inside of a HeaderPanel.");
            headerPanel.RequestNewHeight(this, e.NewRectangle.Height);
            base.OnContentsResized(e);
        }
        void IDeviceSpecificDesigner.InitHeader(int mergingContext)
        {
            HeaderPanel panel = new HeaderPanel();
            HeaderLabel lblDescription = new HeaderLabel();

            lblDescription.TabIndex = 0;
            lblDescription.Text = SR.GetString(SR.MobileControl_SettingGenericChoiceDescription);
            
            panel.Height = lblDescription.Height;
            panel.Width = lblDescription.Width;
            panel.Controls.Add(lblDescription);
            _header = panel;
        }
        private void InitializeComponent()
        {
            this._pnlHeader = new HeaderPanel();
            this._lblHeader = new HeaderLabel();
            this._glAttributes = new GroupLabel();
            this._glType = new GroupLabel();
            this._txtType = new System.Windows.Forms.TextBox();
            this._pnlMain = new System.Windows.Forms.Panel();
            this._filterList = new EditableTreeList();
            this._rbCompare = new System.Windows.Forms.RadioButton();
            this._lblCompare = new System.Windows.Forms.Label();
            this._dialogButtons = new DefaultDialogButtons();
            this._lblType = new System.Windows.Forms.Label();
            this._txtMethod = new System.Windows.Forms.TextBox();
            this._txtArgument = new System.Windows.Forms.TextBox();
            this._pnlRight = new System.Windows.Forms.Panel();
            this._lblMethod = new System.Windows.Forms.Label();
            this._rbDelegate = new System.Windows.Forms.RadioButton();
            this._pnlCompare = new System.Windows.Forms.Panel();
            this._cbCompare = new System.Windows.Forms.ComboBox();
            this._lblArgument = new System.Windows.Forms.Label();
            this._pnlDelegate = new System.Windows.Forms.Panel();
            this._txtType.Location = new System.Drawing.Point(0, 20);
            this._txtType.Size = new System.Drawing.Size(211, 20);

            this._lblHeader.Location = new System.Drawing.Point(0, 0);
            this._lblHeader.Size = new System.Drawing.Size(434, 16);
            this._lblHeader.Anchor = (System.Windows.Forms.AnchorStyles.Top
                | System.Windows.Forms.AnchorStyles.Left);
            this._pnlHeader.Controls.AddRange(new System.Windows.Forms.Control[] {
                this._lblHeader
            });
            this._pnlHeader.Location = new System.Drawing.Point(6, 5);
            this._pnlHeader.Size = new System.Drawing.Size(434, 16);
            this._pnlHeader.Anchor = (System.Windows.Forms.AnchorStyles.Top
                | System.Windows.Forms.AnchorStyles.Left);
            this._pnlMain.Controls.AddRange(new System.Windows.Forms.Control[] {this._dialogButtons,
                                                                                  this._pnlRight,
                                                                                  this._filterList});
            this._pnlMain.Location = new System.Drawing.Point(6, 27);
            this._pnlMain.Size = new System.Drawing.Size(434, 253);
            this._pnlMain.Anchor = (System.Windows.Forms.AnchorStyles.Bottom
                | System.Windows.Forms.AnchorStyles.Left);
            this._filterList.Size = new System.Drawing.Size(198, 224);
            this._filterList.Location = new System.Drawing.Point(0, 0);
            this._rbCompare.Location = new System.Drawing.Point(8, 21);
            this._rbCompare.Size = new System.Drawing.Size(211, 17);
            this._lblCompare.Location = new System.Drawing.Point(0, 4);
            this._lblCompare.Size = new System.Drawing.Size(211, 16);
            this._dialogButtons.Location = new System.Drawing.Point(197, 230);
            this._dialogButtons.Size = new System.Drawing.Size(237, 23);
            this._lblType.Location = new System.Drawing.Point(0, 4);
            this._lblType.Size = new System.Drawing.Size(211, 16);
            this._txtMethod.Location = new System.Drawing.Point(0, 64);
            this._txtMethod.Size = new System.Drawing.Size(211, 20);
            this._txtArgument.Location = new System.Drawing.Point(0, 64);
            this._txtArgument.Size = new System.Drawing.Size(211, 20);
            this._pnlRight.Controls.AddRange(new System.Windows.Forms.Control[] {this._pnlCompare,
                                                                                 this._pnlDelegate,
                                                                                 this._glAttributes,
                                                                                 this._glType,
                                                                                 this._rbDelegate,
                                                                                 this._rbCompare});
            this._pnlRight.Location = new System.Drawing.Point(215, 0);
            this._pnlRight.Size = new System.Drawing.Size(219, 226);
            this._lblMethod.Location = new System.Drawing.Point(0, 48);
            this._lblMethod.Size = new System.Drawing.Size(211, 16);
            this._glAttributes.Location = new System.Drawing.Point(0, 73);
            this._glAttributes.Size = new System.Drawing.Size(216, 16);
            this._rbDelegate.Location = new System.Drawing.Point(8, 46);
            this._rbDelegate.Size = new System.Drawing.Size(211, 17);
            this._glType.Size = new System.Drawing.Size(216, 16);
            this._pnlCompare.Controls.AddRange(new System.Windows.Forms.Control[] {this._txtArgument,
                                                                                     this._lblArgument,
                                                                                     this._cbCompare,
                                                                                     this._lblCompare});
            this._pnlCompare.Location = new System.Drawing.Point(8, 90);
            this._pnlCompare.Size = new System.Drawing.Size(211, 136);
            this._cbCompare.DropDownWidth = 211;
            this._cbCompare.Location = new System.Drawing.Point(0, 20);
            this._cbCompare.Size = new System.Drawing.Size(211, 21);
            this._cbCompare.Sorted = true;
            this._lblArgument.Location = new System.Drawing.Point(0, 48);
            this._lblArgument.Size = new System.Drawing.Size(211, 16);
            this._pnlDelegate.Controls.AddRange(new System.Windows.Forms.Control[] {this._txtType,
                                                                                      this._txtMethod,
                                                                                      this._lblMethod,
                                                                                      this._lblType});
            this._pnlDelegate.Location = new System.Drawing.Point(8, 90);
            this._pnlDelegate.Size = new System.Drawing.Size(211, 136);
            this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
            this.ClientSize = new System.Drawing.Size(448, 289);
            this.AcceptButton = _dialogButtons.CmdOK;
            this.CancelButton = _dialogButtons.CmdCancel;
            this.Controls.AddRange(new System.Windows.Forms.Control[] {this._pnlHeader, this._pnlMain});
        }
        void IDeviceSpecificDesigner.InitHeader(int mergingContext)
        {
            HeaderPanel panel = new HeaderPanel();
            HeaderLabel lblDescription = new HeaderLabel();

            lblDescription.TabIndex = 0;
            lblDescription.Height = 24;
            lblDescription.Width = 204;
            panel.Height = 28;
            panel.Width = 204;
            panel.Controls.Add(lblDescription);

            switch (mergingContext)
            {
                case MobileControlDesigner.MergingContextTemplates:
                {
                    lblDescription.Text = SR.GetString(SR.TemplateableDesigner_SettingTemplatingChoiceDescription);
                    break;
                }

                default:
                {
                    lblDescription.Text = SR.GetString(SR.TemplateableDesigner_SettingGenericChoiceDescription);
                    break;
                }
            }

            _header = panel;
        }