Browse Source

Fixed SD2-463: Visibility of undocked panels.

git-svn-id: svn://svn.sharpdevelop.net/sharpdevelop/trunk@952 1ccf3a8d-04fe-1044-b7c0-cef0b8235c61
shortcuts
Daniel Grunwald 20 years ago
parent
commit
b41e5513ed
  1. 40
      src/Main/Base/Project/Src/Gui/Workbench/Layouts/SdiWorkspaceLayout.cs
  2. 66
      src/Main/StartUp/Project/Dialogs/AddInTreeSettingsHandler.cs
  3. 1
      src/Main/StartUp/Project/StartUp.csproj

40
src/Main/Base/Project/Src/Gui/Workbench/Layouts/SdiWorkspaceLayout.cs

@ -80,24 +80,6 @@ namespace ICSharpCode.SharpDevelop.Gui @@ -80,24 +80,6 @@ namespace ICSharpCode.SharpDevelop.Gui
toolStripContainer.SuspendLayout();
toolStripContainer.Dock = DockStyle.Fill;
// RaftingContainer topRaftingContainer = new System.Windows.Forms.RaftingContainer();
// RaftingContainer leftRaftingContainer = new System.Windows.Forms.RaftingContainer();
// RaftingContainer rightRaftingContainer = new System.Windows.Forms.RaftingContainer();
// RaftingContainer bottomRaftingContainer = new System.Windows.Forms.RaftingContainer();
//
// ((System.ComponentModel.ISupportInitialize)(leftRaftingContainer)).BeginInit();
// ((System.ComponentModel.ISupportInitialize)(rightRaftingContainer)).BeginInit();
// ((System.ComponentModel.ISupportInitialize)(topRaftingContainer)).BeginInit();
// topRaftingContainer.SuspendLayout();
// ((System.ComponentModel.ISupportInitialize)(bottomRaftingContainer)).BeginInit();
// bottomRaftingContainer.SuspendLayout();
// leftRaftingContainer.Dock = System.Windows.Forms.DockStyle.Left;
// rightRaftingContainer.Dock = System.Windows.Forms.DockStyle.Right;
// topRaftingContainer.Dock = System.Windows.Forms.DockStyle.Top;
// bottomRaftingContainer.Controls.Add(StatusBarService.Control);
// bottomRaftingContainer.Dock = System.Windows.Forms.DockStyle.Bottom;
dockPanel = new WeifenLuo.WinFormsUI.DockPanel();
toolStripContainer.ContentPanel.Controls.Add(this.dockPanel);
@ -110,6 +92,12 @@ namespace ICSharpCode.SharpDevelop.Gui @@ -110,6 +92,12 @@ namespace ICSharpCode.SharpDevelop.Gui
statusStripContainer = new AutoHideStatusStripContainer((StatusStrip)StatusBarService.Control);
statusStripContainer.Dock = DockStyle.Bottom;
toolStripContainer.ContentPanel.Controls.Add(mainMenuContainer);
toolStripContainer.ContentPanel.Controls.Add(statusStripContainer);
wbForm.Controls.Add(toolStripContainer);
// dock panel has to be added to the form before LoadLayoutConfiguration is called to fix SD2-463
LoadLayoutConfiguration();
ShowPads();
@ -121,22 +109,6 @@ namespace ICSharpCode.SharpDevelop.Gui @@ -121,22 +109,6 @@ namespace ICSharpCode.SharpDevelop.Gui
dockPanel.ActiveContentChanged += new EventHandler(ActiveContentChanged);
ActiveMdiChanged(this, EventArgs.Empty);
// wbForm.Controls.Add(this.dockPanel);
toolStripContainer.ContentPanel.Controls.Add(mainMenuContainer);
toolStripContainer.ContentPanel.Controls.Add(statusStripContainer);
wbForm.Controls.Add(toolStripContainer);
// ((System.ComponentModel.ISupportInitialize)(leftRaftingContainer)).EndInit();
// ((System.ComponentModel.ISupportInitialize)(rightRaftingContainer)).EndInit();
// ((System.ComponentModel.ISupportInitialize)(topRaftingContainer)).EndInit();
// topRaftingContainer.ResumeLayout(false);
// topRaftingContainer.PerformLayout();
// ((System.ComponentModel.ISupportInitialize)(bottomRaftingContainer)).EndInit();
// bottomRaftingContainer.ResumeLayout(false);
// bottomRaftingContainer.PerformLayout();
toolStripContainer.ResumeLayout(false);
wbForm.ResumeLayout(false);

66
src/Main/StartUp/Project/Dialogs/AddInTreeSettingsHandler.cs

@ -1,66 +0,0 @@ @@ -1,66 +0,0 @@
// <file>
// <copyright see="prj:///doc/copyright.txt"/>
// <license see="prj:///doc/license.txt"/>
// <owner name="Mike Krüger" email="mike@icsharpcode.net"/>
// <version>$Revision$</version>
// </file>
using System;
using System.Configuration;
using System.Collections;
using System.Xml;
namespace ICSharpCode.SharpDevelop
{
public class AddInSettingsHandler : System.Configuration.IConfigurationSectionHandler
{
public AddInSettingsHandler()
{
}
public object Create(object parent, object configContext, System.Xml.XmlNode section)
{
ArrayList addInDirectories = new ArrayList();
XmlNode attr = section.Attributes.GetNamedItem("ignoreDefaultPath");
if (attr != null) {
try {
addInDirectories.Add(Convert.ToBoolean(attr.Value));
} catch (InvalidCastException) {
addInDirectories.Add(false);
}
} else {
addInDirectories.Add(false);
}
XmlNodeList addInDirList = section.SelectNodes("AddInDirectory");
foreach (XmlNode addInDir in addInDirList) {
XmlNode path = addInDir.Attributes.GetNamedItem("path");
if (path != null) {
addInDirectories.Add(path.Value);
}
}
return addInDirectories;
}
public static string[] GetAddInDirectories(out bool ignoreDefaultPath)
{
// TODO: Convert to .NET 2:
// ArrayList addInDirs = System.Configuration.ConfigurationSettings.GetConfig("AddInDirectories") as ArrayList;
// if (addInDirs != null) {
// int count = addInDirs.Count;
// if (count <= 1) {
// ignoreDefaultPath = false;
// return null;
// }
// ignoreDefaultPath = (bool) addInDirs[0];
// string [] directories = new string[count-1];
// for (int i = 0; i < count - 1; i++) {
// directories[i] = addInDirs[i+1] as string;
// }
// return directories;
// }
ignoreDefaultPath = false;
return null;
}
}
}

1
src/Main/StartUp/Project/StartUp.csproj

@ -45,7 +45,6 @@ @@ -45,7 +45,6 @@
<Compile Include="Dialogs\ExceptionBox.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="Dialogs\AddInTreeSettingsHandler.cs" />
<EmbeddedResource Include="Resources\BitmapResources.resources" />
<None Include="Resources\StartUp.snk" />
<None Include="SharpDevelop.exe.manifest">

Loading…
Cancel
Save