private void HideShowPanel_Click(object sender, EventArgs e) { ImageListButton button = (ImageListButton)sender; if (_edtAnnotation.Visible) { _edtAnnotation.Visible = false; _boxAnnotation.Tag = _boxAnnotation.Height; _boxAnnotation.Height = CollapsedPanelHeight; _lblHideShowAnnotationText.Text = "Show"; // temporarily let us shrink however we want, then update this info. // this.MinimumSize = new Size( this.MinimumSize.Width, 100 ); int delta = (int)_boxAnnotation.Tag - CollapsedPanelHeight; _panelAnnotation.Height = _panelAnnotation.Height - delta; // Form parent = FindForm(); // parent.Size = new Size( Width, Height - delta ); _boxAnnotation.Top += delta; } else { // If at least one panel is expanded, no reason to control // the maximal size. // MaximumSize = new Size( 1000, 1000 ); // Form parent = FindForm(); int delta = (int)_boxAnnotation.Tag - CollapsedPanelHeight; _boxAnnotation.Height = (int)_boxAnnotation.Tag; // parent.Size = new Size( Width, Height + delta ); _lblHideShowAnnotationText.Text = "Hide"; _edtAnnotation.Visible = true; _panelAnnotation.Height = _panelAnnotation.Height + delta; _boxAnnotation.Top -= delta; } // Update the state in our INI file. string section = GetType().FullName; Core.SettingStore.WriteBool(section, "FragmentDialogOpen", _edtAnnotation.Visible); // Change the state of our graphical buttons button.NormalImageIndex = 1 - button.NormalImageIndex; button.PressedImageIndex = 1 - button.NormalImageIndex; button.HotImageIndex = button.NormalImageIndex + 2; // AdjustMinimalSize(); }
/// <summary> /// Required method for Designer support - do not modify /// the contents of this method with the code editor. /// </summary> private void InitializeComponent() { this.components = new System.ComponentModel.Container(); _toolTip = new System.Windows.Forms.ToolTip(this.components); System.Resources.ResourceManager resources = new System.Resources.ResourceManager(typeof(LinksBar)); this._btnExpand = new ImageListButton(); _contactThumb = new Panel(); this._iconImages = new System.Windows.Forms.ImageList(this.components); this.SuspendLayout(); // // _btnExpand // this._btnExpand.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); this._btnExpand.BackColor = Color.Transparent; this._btnExpand.ImageList = this._iconImages; this._btnExpand.Location = new System.Drawing.Point(134, 3); this._btnExpand.Name = "_chkExpand"; this._btnExpand.Size = new System.Drawing.Size(16, 16); this._btnExpand.TabIndex = 0; this._btnExpand.TabStop = false; this._btnExpand.Click += new EventHandler(_btnExpand_OnClick); // // _contactThumb // _contactThumb.BorderStyle = BorderStyle.Fixed3D; _contactThumb.Location = new Point(4, 4); _contactThumb.Name = "_contactThumb"; _contactThumb.Size = new Size(48, 48); _contactThumb.Anchor = AnchorStyles.Left | AnchorStyles.Top; _contactThumb.BackColor = Color.FromArgb(0, DefaultBackColor); // // _iconImages // this._iconImages.ImageSize = new System.Drawing.Size(16, 16); this._iconImages.ImageStream = ((System.Windows.Forms.ImageListStreamer)(resources.GetObject("_iconImages.ImageStream"))); this._iconImages.TransparentColor = System.Drawing.Color.Transparent; // // LinksBar // this.Controls.Add(this._btnExpand); this.Controls.Add(_contactThumb); this.Name = "LinksBar"; this.Size = new System.Drawing.Size(150, 20); this.ResumeLayout(false); }
private void InitializeComponentSelf() { components = new Container(); using (new LayoutSuspender(this)) { // // _chevronToolbar // _btnChevron = new ImageListButton(); _btnChevron.Location = new Point(124, 2); _btnChevron.Name = "_btnChevron"; _btnChevron.TabStop = false; _btnChevron.Visible = false; _btnChevron.Click += new EventHandler(OnChevronClick); _btnChevron.AddIcon(LoadChevronIcon(false), ImageListButton.ButtonState.Normal); _btnChevron.AddIcon(LoadChevronIcon(true), ImageListButton.ButtonState.Hot); _btnChevron.BackColor = BackColor; // // _menuOnChevron // _menuOnChevron = new ContextMenu(); // // ChevronBar // Controls.Add(_btnChevron); Name = "ChevronBar"; Size = OptimalSize; SetStyle(ControlStyles.AllPaintingInWmPaint | ControlStyles.CacheText | ControlStyles.ContainerControl | ControlStyles.UserPaint | ControlStyles.Opaque , true); SetStyle(ControlStyles.DoubleBuffer | ControlStyles.ResizeRedraw | ControlStyles.Selectable , false); } }
/// <summary> /// Required method for Designer support - do not modify /// the contents of this method with the code editor. /// </summary> private void InitializeComponent() { this.components = new System.ComponentModel.Container(); this._contentPane = new System.Windows.Forms.Panel(); this._lblBody = new JetBrains.Omea.GUIControls.JetLinkLabel(); this._resourceIconBox = new JetBrains.Omea.GUIControls.ImageListPictureBox(); this._lblSubject = new System.Windows.Forms.Label(); this._lblFrom = new System.Windows.Forms.Label(); _btnDelete = new ImageListButton(); _btnClose = new ImageListButton(); this._fadeInTimer = new System.Windows.Forms.Timer(this.components); this._visibleTimer = new System.Windows.Forms.Timer(this.components); this._fadeOutTimer = new System.Windows.Forms.Timer(this.components); this._balloonLeaveTimer = new System.Windows.Forms.Timer(this.components); _toolTipReason = new ToolTip(components); _toolTipReason.ShowAlways = true; this._contentPane.SuspendLayout(); this.SuspendLayout(); // // _contentPane // this._contentPane.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right))); this._contentPane.BackColor = System.Drawing.Color.FromArgb(((System.Byte)(192)), ((System.Byte)(192)), ((System.Byte)(255))); this._contentPane.Controls.Add(_btnClose); this._contentPane.Controls.Add(this._lblBody); this._contentPane.Controls.Add(this._resourceIconBox); this._contentPane.Controls.Add(this._btnDelete); this._contentPane.Controls.Add(this._lblSubject); this._contentPane.Controls.Add(this._lblFrom); this._contentPane.Location = new System.Drawing.Point(2, 2); this._contentPane.Name = "_contentPane"; this._contentPane.Size = new System.Drawing.Size(296, 68); this._contentPane.TabIndex = 0; // // _lblBody // this._lblBody.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right))); this._lblBody.AutoSize = false; this._lblBody.Cursor = System.Windows.Forms.Cursors.Hand; this._lblBody.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((System.Byte)(204))); this._lblBody.ForeColor = System.Drawing.Color.Blue; this._lblBody.Location = new System.Drawing.Point(28, 36); this._lblBody.Name = "_lblBody"; this._lblBody.Size = new System.Drawing.Size(264, 28); this._lblBody.TabIndex = 3; this._lblBody.WordWrap = true; this._lblBody.Click += new System.EventHandler(this._lblBody_Click); this._lblBody.MouseEnter += new System.EventHandler(this.OnBalloonMouseEnter); this._lblBody.MouseLeave += new System.EventHandler(this.OnBalloonMouseLeave); // // _resourceIconBox // this._resourceIconBox.ImageIndex = 0; this._resourceIconBox.ImageLeftTopPoint = new System.Drawing.Point(0, 0); this._resourceIconBox.Location = new System.Drawing.Point(8, 2); this._resourceIconBox.Name = "_resourceIconBox"; this._resourceIconBox.Size = new System.Drawing.Size(16, 16); this._resourceIconBox.TabIndex = 2; this._resourceIconBox.TabStop = false; this._resourceIconBox.MouseEnter += new System.EventHandler(this.OnBalloonMouseEnter); this._resourceIconBox.MouseLeave += new System.EventHandler(this.OnBalloonMouseLeave); // // _btnDelete // this._btnDelete.Anchor = (AnchorStyles.Top | AnchorStyles.Right); this._btnDelete.Name = "_btnDelete"; this._btnDelete.Size = new System.Drawing.Size(16, 16); this._btnDelete.Location = new System.Drawing.Point(8, 20); this._btnDelete.TabIndex = 3; this._btnDelete.Click += new EventHandler(_btnDelete_Click); this._btnDelete.NormalImageIndex = 0; this._btnDelete.HotImageIndex = 1; this._btnDelete.PressedImageIndex = 2; this._btnDelete.ImageList = _delImageList; this._btnDelete.MouseEnter += new System.EventHandler(this.OnBalloonMouseEnter); this._btnDelete.MouseLeave += new System.EventHandler(this.OnBalloonMouseLeave); // // _btnClose // this._btnClose.Name = "_btnClose"; this._btnClose.Size = new System.Drawing.Size(16, 16); this._btnClose.Location = new System.Drawing.Point(280, 2); this._btnClose.TabIndex = 3; this._btnClose.NormalImageIndex = 0; this._btnClose.HotImageIndex = 1; this._btnClose.PressedImageIndex = 2; this._btnClose.ImageList = _closeImageList; this._btnClose.MouseEnter += new System.EventHandler(this.OnBalloonMouseEnter); this._btnClose.MouseLeave += new System.EventHandler(this.OnBalloonMouseLeave); this._btnClose.Click += new EventHandler(_btnClose_Click); // // _lblSubject // this._lblSubject.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right))); this._lblSubject.FlatStyle = System.Windows.Forms.FlatStyle.System; this._lblSubject.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((System.Byte)(204))); this._lblSubject.Location = new System.Drawing.Point(28, 20); this._lblSubject.Name = "_lblSubject"; this._lblSubject.Size = new System.Drawing.Size(264, 14); this._lblSubject.TabIndex = 1; this._lblSubject.Text = "<no subject>"; this._lblSubject.UseMnemonic = false; this._lblSubject.MouseEnter += new System.EventHandler(this.OnBalloonMouseEnter); this._lblSubject.MouseLeave += new System.EventHandler(this.OnBalloonMouseLeave); // // _lblFrom // this._lblFrom.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right))); this._lblFrom.FlatStyle = System.Windows.Forms.FlatStyle.System; this._lblFrom.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((System.Byte)(204))); this._lblFrom.Location = new System.Drawing.Point(28, 4); this._lblFrom.Name = "_lblFrom"; this._lblFrom.Size = new System.Drawing.Size(264, 16); this._lblFrom.TabIndex = 0; this._lblFrom.Text = "From:"; this._lblFrom.UseMnemonic = false; this._lblFrom.MouseEnter += new System.EventHandler(this.OnBalloonMouseEnter); this._lblFrom.MouseLeave += new System.EventHandler(this.OnBalloonMouseLeave); // // _fadeInTimer // this._fadeInTimer.Interval = 100; this._fadeInTimer.Tick += new System.EventHandler(this._fadeInTimer_Tick); // // _visibleTimer // this._visibleTimer.Interval = _visibilityInterval; this._visibleTimer.Tick += new System.EventHandler(this._visibleTimer_Tick); // // _fadeOutTimer // this._fadeOutTimer.Interval = 100; this._fadeOutTimer.Tick += new System.EventHandler(this._fadeOutTimer_Tick); // // _balloonLeaveTimer // this._balloonLeaveTimer.Interval = 150; this._balloonLeaveTimer.Tick += new System.EventHandler(this._balloonLeaveTimer_Tick); // // BalloonForm // this.AutoScaleBaseSize = new System.Drawing.Size(5, 13); this.BackColor = System.Drawing.SystemColors.ControlDarkDark; this.ClientSize = new System.Drawing.Size(300, 72); this.Controls.Add(this._contentPane); this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None; this.Name = "BalloonForm"; this.Opacity = 0; this.ShowInTaskbar = false; this.StartPosition = System.Windows.Forms.FormStartPosition.Manual; this.Text = "BalloonForm"; this.TopMost = true; this._contentPane.ResumeLayout(false); this.ResumeLayout(false); }
/// <summary> /// Required method for Designer support - do not modify /// the contents of this method with the code editor. /// </summary> private void InitializeComponent() { this._edtAnnotation = new JetTextBox(); this._edtName = new JetTextBox(); this._lblName = new System.Windows.Forms.Label(); this._richTextBox = new JetRichTextBox(); this._panelContent = new System.Windows.Forms.Panel(); this._panelAnnotation = new System.Windows.Forms.Panel(); this._panelTop = new System.Windows.Forms.Panel(); this._selector = new CategoriesSelector(); this._openOptionsPanel = new Panel(); this._chkOpenAfterSave = new CheckBox(); _boxAnnotation = new System.Windows.Forms.GroupBox(); _lblAnnotation = new System.Windows.Forms.Label(); _btnHideShowAnnotation = new ImageListButton(); _lblHideShowAnnotationText = new JetLinkLabel(); this._panelTop.SuspendLayout(); this._panelContent.SuspendLayout(); this._panelAnnotation.SuspendLayout(); this.SuspendLayout(); // // _panelTop // this._panelTop.Controls.Add(this._lblName); this._panelTop.Controls.Add(this._edtName); this._panelTop.Dock = System.Windows.Forms.DockStyle.Top; this._panelTop.Location = new System.Drawing.Point(0, 0); this._panelTop.Name = "_panelTop"; this._panelTop.Size = new System.Drawing.Size(700, 28); this._panelTop.TabIndex = 0; // // lblName // this._lblName.FlatStyle = System.Windows.Forms.FlatStyle.System; this._lblName.Location = new System.Drawing.Point(4, 8); this._lblName.Name = "_lblName"; this._lblName.Size = new System.Drawing.Size(36, 16); this._lblName.TabIndex = 0; this._lblName.Text = "&Name:"; // // _edtName // this._edtName.Anchor = (AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right); this._edtName.Location = new System.Drawing.Point(44, 4); this._edtName.Name = "_edtName"; this._edtName.Size = new System.Drawing.Size(648, 21); this._edtName.TabIndex = 1; this._edtName.Text = ""; // // _panelContent // this._panelContent.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D; this._panelContent.Controls.Add(this._richTextBox); this._panelContent.Dock = System.Windows.Forms.DockStyle.Fill; this._panelContent.Location = new System.Drawing.Point(0, 28); this._panelContent.Name = "_panelContent"; this._panelContent.Size = new System.Drawing.Size(700, 70); this._panelContent.TabIndex = 1; // // _richTextBox // this._richTextBox.BorderStyle = System.Windows.Forms.BorderStyle.None; this._richTextBox.Dock = System.Windows.Forms.DockStyle.Fill; this._richTextBox.Location = new System.Drawing.Point(4, 0); this._richTextBox.Name = "_richTextBox"; this._richTextBox.ReadOnly = true; this._richTextBox.Size = new System.Drawing.Size(692, 60); this._richTextBox.TabIndex = 0; this._richTextBox.Text = ""; // // _panelAnnotation // this._panelAnnotation.Dock = System.Windows.Forms.DockStyle.Bottom; this._panelAnnotation.Size = new System.Drawing.Size(340, 176); this._panelAnnotation.Location = new System.Drawing.Point(0, 168); this._panelAnnotation.Name = "_panelAnnotation"; this._panelAnnotation.TabIndex = 3; this._panelAnnotation.Controls.Add(_boxAnnotation); this._panelAnnotation.Controls.Add(_selector); // // _boxAnnotation // _boxAnnotation.Location = new System.Drawing.Point(8, 4); _boxAnnotation.Anchor = (AnchorStyles.Bottom | AnchorStyles.Left | AnchorStyles.Right); _boxAnnotation.Name = "_boxAnnotation"; _boxAnnotation.Size = new System.Drawing.Size(324, 132); _boxAnnotation.FlatStyle = FlatStyle.System; _boxAnnotation.TabStop = false; _boxAnnotation.Controls.Add(_lblAnnotation); _boxAnnotation.Controls.Add(_btnHideShowAnnotation); _boxAnnotation.Controls.Add(_lblHideShowAnnotationText); _boxAnnotation.Controls.Add(_edtAnnotation); // // _edtAnnotation // this._edtAnnotation.Anchor = AnchorStyles.Top | AnchorStyles.Bottom | AnchorStyles.Left | AnchorStyles.Right; this._edtAnnotation.Location = new System.Drawing.Point(8, 28); this._edtAnnotation.Multiline = true; this._edtAnnotation.Name = "_edtAnnotation"; this._edtAnnotation.ScrollBars = System.Windows.Forms.ScrollBars.Vertical; this._edtAnnotation.Size = new System.Drawing.Size(308, 95); this._edtAnnotation.TabIndex = 1; this._edtAnnotation.Text = ""; // // labelAnnotation // _lblAnnotation.FlatStyle = System.Windows.Forms.FlatStyle.System; _lblAnnotation.Location = new System.Drawing.Point(10, 10); _lblAnnotation.Name = "labelExceptions"; _lblAnnotation.Size = new System.Drawing.Size(64, 16); _lblAnnotation.TabStop = false; _lblAnnotation.TextAlign = ContentAlignment.MiddleLeft; _lblAnnotation.Text = "Annotation"; // // labelHideShowAnnotationText // _lblHideShowAnnotationText.Anchor = (AnchorStyles.Top | AnchorStyles.Right); _lblHideShowAnnotationText.Location = new System.Drawing.Point(270, 10); _lblHideShowAnnotationText.Name = "labelHideShowExceptionsText"; _lblHideShowAnnotationText.Size = new System.Drawing.Size(28, 16); _lblHideShowAnnotationText.TabStop = false; _lblHideShowAnnotationText.TextAlign = ContentAlignment.MiddleLeft; _lblHideShowAnnotationText.Text = "Hide"; _lblHideShowAnnotationText.Tag = _btnHideShowAnnotation; _lblHideShowAnnotationText.Click += new EventHandler(labelHideShowPanel_Click); // // buttonHideShowAnnotation // _btnHideShowAnnotation.Location = new System.Drawing.Point(300, 9); _btnHideShowAnnotation.Anchor = (AnchorStyles.Top | AnchorStyles.Right); _btnHideShowAnnotation.Name = "_btnHideShowAnnotation"; _btnHideShowAnnotation.Size = new System.Drawing.Size(16, 16); _btnHideShowAnnotation.TabIndex = 9; _btnHideShowAnnotation.Click += new EventHandler(HideShowPanel_Click); _btnHideShowAnnotation.Cursor = System.Windows.Forms.Cursors.Hand; _btnHideShowAnnotation.AddIcon(Utils.TryGetEmbeddedResourceIconFromAssembly("GUIControls", "GUIControls.Icons.CollapsePanel.ico"), ImageListButton.ButtonState.Normal); _btnHideShowAnnotation.AddIcon(Utils.TryGetEmbeddedResourceIconFromAssembly("GUIControls", "GUIControls.Icons.ExpandPanel.ico"), ImageListButton.ButtonState.Normal); _btnHideShowAnnotation.AddIcon(Utils.TryGetEmbeddedResourceIconFromAssembly("GUIControls", "GUIControls.Icons.CollapsePanelHover.ico"), ImageListButton.ButtonState.Hot); _btnHideShowAnnotation.AddIcon(Utils.TryGetEmbeddedResourceIconFromAssembly("GUIControls", "GUIControls.Icons.ExpandPanelHover.ico"), ImageListButton.ButtonState.Hot); // // _selector // this._selector.Anchor = (AnchorStyles.Left | AnchorStyles.Right | AnchorStyles.Bottom); this._selector.Location = new System.Drawing.Point(8, 140); this._selector.Name = "_selector"; this._selector.Size = new System.Drawing.Size(324, 40); this._selector.TabIndex = 3; // // _openOptionsPanel // this._openOptionsPanel.Dock = DockStyle.Bottom; this._openOptionsPanel.Name = "_openOptionsPanel"; this._openOptionsPanel.Size = new Size(200, 24); this._openOptionsPanel.Controls.Add(_chkOpenAfterSave); // // _chkOpenAfterSave // this._chkOpenAfterSave.FlatStyle = FlatStyle.System; this._chkOpenAfterSave.Location = new Point(10, 4); this._chkOpenAfterSave.Size = new Size(150, 20); this._chkOpenAfterSave.Text = "Open clipping after save"; // // FragmentEditPane // this.Controls.Add(this._panelContent); this.Controls.Add(this._panelAnnotation); this.Controls.Add(this._panelTop); this.Controls.Add(this._openOptionsPanel); this.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((System.Byte)(204))); this.Name = "FragmentEditPane"; this.Size = new System.Drawing.Size(700, 428); this.Load += new System.EventHandler(this.OnLoad); this.VisibleChanged += new EventHandler(OnFormVisibleChanged); this._panelContent.ResumeLayout(false); this._panelAnnotation.ResumeLayout(false); this._panelTop.ResumeLayout(false); this.ResumeLayout(false); }