From 2a1ab5312cb100387181e309186e69e8b182757f Mon Sep 17 00:00:00 2001 From: Justin Dearing Date: Thu, 31 Jul 2008 02:38:58 +0000 Subject: [PATCH] Fixed button position of DebugeeExceptionForm. The position of the splitter in DebugeeExceptionForm remains consistent between calls to it. git-svn-id: svn://svn.sharpdevelop.net/sharpdevelop/trunk@3265 1ccf3a8d-04fe-1044-b7c0-cef0b8235c61 --- .../Project/Src/Options/DebuggingOptions.cs | 1 + .../Src/Service/DebugeeExceptionForm.Designer.cs | 12 ++++++++++++ .../Project/Src/Service/DebugeeExceptionForm.cs | 15 ++++++++++++--- .../Src/Service/DebuggerEventForm.Designer.cs | 12 +++++++++--- 4 files changed, 34 insertions(+), 6 deletions(-) diff --git a/src/AddIns/Misc/Debugger/Debugger.AddIn/Project/Src/Options/DebuggingOptions.cs b/src/AddIns/Misc/Debugger/Debugger.AddIn/Project/Src/Options/DebuggingOptions.cs index 12d22ae6d2..f4729c677b 100644 --- a/src/AddIns/Misc/Debugger/Debugger.AddIn/Project/Src/Options/DebuggingOptions.cs +++ b/src/AddIns/Misc/Debugger/Debugger.AddIn/Project/Src/Options/DebuggingOptions.cs @@ -37,6 +37,7 @@ namespace ICSharpCode.SharpDevelop.Services // Properties for the DebuggeeExceptionForm public FormWindowState DebuggeeExceptionWindowState = FormWindowState.Normal; public Size DebuggeeExceptionWindowSize = new Size(646,431); + public int DebugeeExceptionSplitterDistance = 163; public bool ShowExceptionDetails; } } diff --git a/src/AddIns/Misc/Debugger/Debugger.AddIn/Project/Src/Service/DebugeeExceptionForm.Designer.cs b/src/AddIns/Misc/Debugger/Debugger.AddIn/Project/Src/Service/DebugeeExceptionForm.Designer.cs index ad1b6fa3ec..2c19961d4a 100644 --- a/src/AddIns/Misc/Debugger/Debugger.AddIn/Project/Src/Service/DebugeeExceptionForm.Designer.cs +++ b/src/AddIns/Misc/Debugger/Debugger.AddIn/Project/Src/Service/DebugeeExceptionForm.Designer.cs @@ -61,6 +61,18 @@ namespace ICSharpCode.SharpDevelop.Services this.splitContainer.SuspendLayout(); this.SuspendLayout(); // + // buttonBreak + // + this.buttonBreak.Location = new System.Drawing.Point(176, 349); + // + // buttonContinue + // + this.buttonContinue.Location = new System.Drawing.Point(274, 349); + // + // buttonTerminate + // + this.buttonTerminate.Location = new System.Drawing.Point(372, 349); + // // textBox // this.textBox.Size = new System.Drawing.Size(542, 139); diff --git a/src/AddIns/Misc/Debugger/Debugger.AddIn/Project/Src/Service/DebugeeExceptionForm.cs b/src/AddIns/Misc/Debugger/Debugger.AddIn/Project/Src/Service/DebugeeExceptionForm.cs index e2b1009479..d7c43398f6 100644 --- a/src/AddIns/Misc/Debugger/Debugger.AddIn/Project/Src/Service/DebugeeExceptionForm.cs +++ b/src/AddIns/Misc/Debugger/Debugger.AddIn/Project/Src/Service/DebugeeExceptionForm.cs @@ -73,14 +73,18 @@ namespace ICSharpCode.SharpDevelop.Services WindowState = DebuggingOptions.Instance.DebuggeeExceptionWindowState; Size = DebuggingOptions.Instance.DebuggeeExceptionWindowSize; - - InitializeexceptionDetails(); + + splitContainer.SplitterDistance = DebuggingOptions.Instance.DebugeeExceptionSplitterDistance; + // Set this here so it doesnt fire on startup replacing the saved value with a default. + this.splitContainer.SplitterMoved += new System.Windows.Forms.SplitterEventHandler(this.splitContainerMoved); + + InitializeExceptionDetails(); } /// /// Setup the columns for the exceptionDetails. /// - private void InitializeexceptionDetails() { + private void InitializeExceptionDetails() { NodeIcon iconControl = new ItemIcon(); NodeTextBox nameControl = new ItemName(); NodeTextBox textControl = new ItemText(); @@ -152,5 +156,10 @@ namespace ICSharpCode.SharpDevelop.Services ? StringParser.Parse("${res:MainWindow.Windows.Debug.ExceptionForm.ShowExceptionDetails}") : StringParser.Parse("${res:MainWindow.Windows.Debug.ExceptionForm.HideExceptionDetails}"); } + + void splitContainerMoved(object sender, System.EventArgs e) + { + DebuggingOptions.Instance.DebugeeExceptionSplitterDistance = splitContainer.SplitterDistance; + } } } diff --git a/src/AddIns/Misc/Debugger/Debugger.AddIn/Project/Src/Service/DebuggerEventForm.Designer.cs b/src/AddIns/Misc/Debugger/Debugger.AddIn/Project/Src/Service/DebuggerEventForm.Designer.cs index 0f38c439c0..fa7048ec7d 100644 --- a/src/AddIns/Misc/Debugger/Debugger.AddIn/Project/Src/Service/DebuggerEventForm.Designer.cs +++ b/src/AddIns/Misc/Debugger/Debugger.AddIn/Project/Src/Service/DebuggerEventForm.Designer.cs @@ -65,6 +65,8 @@ namespace ICSharpCode.SharpDevelop.Services this.buttonBreak.Anchor = System.Windows.Forms.AnchorStyles.Bottom; this.buttonBreak.DialogResult = System.Windows.Forms.DialogResult.Cancel; this.buttonBreak.Location = new System.Drawing.Point(176, 160); + this.buttonBreak.MaximumSize = new System.Drawing.Size(91, 32); + this.buttonBreak.MinimumSize = new System.Drawing.Size(91, 32); this.buttonBreak.Name = "buttonBreak"; this.buttonBreak.Size = new System.Drawing.Size(91, 32); this.buttonBreak.TabIndex = 0; @@ -85,6 +87,8 @@ namespace ICSharpCode.SharpDevelop.Services this.buttonTerminate.Anchor = System.Windows.Forms.AnchorStyles.Bottom; this.buttonTerminate.DialogResult = System.Windows.Forms.DialogResult.Cancel; this.buttonTerminate.Location = new System.Drawing.Point(372, 160); + this.buttonTerminate.MaximumSize = new System.Drawing.Size(91, 32); + this.buttonTerminate.MinimumSize = new System.Drawing.Size(91, 32); this.buttonTerminate.Name = "buttonTerminate"; this.buttonTerminate.Size = new System.Drawing.Size(91, 32); this.buttonTerminate.TabIndex = 2; @@ -95,6 +99,8 @@ namespace ICSharpCode.SharpDevelop.Services // this.buttonContinue.Anchor = System.Windows.Forms.AnchorStyles.Bottom; this.buttonContinue.Location = new System.Drawing.Point(274, 160); + this.buttonContinue.MaximumSize = new System.Drawing.Size(91, 32); + this.buttonContinue.MinimumSize = new System.Drawing.Size(91, 32); this.buttonContinue.Name = "buttonContinue"; this.buttonContinue.Size = new System.Drawing.Size(91, 32); this.buttonContinue.TabIndex = 1; @@ -119,11 +125,11 @@ namespace ICSharpCode.SharpDevelop.Services // this.CancelButton = this.buttonBreak; this.ClientSize = new System.Drawing.Size(638, 203); - this.Controls.Add(this.textBox); - this.Controls.Add(this.pictureBox); this.Controls.Add(this.buttonTerminate); this.Controls.Add(this.buttonContinue); this.Controls.Add(this.buttonBreak); + this.Controls.Add(this.textBox); + this.Controls.Add(this.pictureBox); this.MinimizeBox = false; this.Name = "DebuggerEventForm"; this.ShowInTaskbar = false; @@ -141,4 +147,4 @@ namespace ICSharpCode.SharpDevelop.Services protected System.Windows.Forms.Button buttonContinue; protected System.Windows.Forms.Button buttonTerminate; } -} \ No newline at end of file +}