mirror of
https://github.com/xenia-project/dockpanelsuite.git
synced 2026-01-31 01:25:23 +01:00
Merge branch 'master' into development_3.0
Conflicts: .nuget/DockPanelSuite.nuspec DockSample/Customization/DockHelper.cs DockSample/Customization/VS2003AutoHideStrip.cs DockSample/Customization/VS2003DockPaneCaption.cs DockSample/Customization/VS2003DockPaneStrip.cs DockSample/DummyDoc.cs WinFormsUI.Docking.vs2010.sln WinFormsUI/Docking/AutoHideStripBase.cs WinFormsUI/Docking/DockAreasEditor.cs WinFormsUI/Docking/DockContent.cs WinFormsUI/Docking/DockContentEventArgs.cs WinFormsUI/Docking/DockContentHandler.cs WinFormsUI/Docking/DockPaneCaptionBase.cs WinFormsUI/Docking/DockPaneStripBase.cs WinFormsUI/Docking/DockPanel.Appearance.cs WinFormsUI/Docking/DockPanel.DockDragHandler.cs WinFormsUI/Docking/DockPanel.Persistor.cs WinFormsUI/Docking/DockPanel.cs WinFormsUI/Docking/DockPanelExtender.cs WinFormsUI/Docking/DockWindow.cs WinFormsUI/Docking/DockWindowCollection.cs WinFormsUI/Docking/FloatWindow.cs WinFormsUI/Docking/Interfaces.cs WinFormsUI/Docking/Measures.cs WinFormsUI/Docking/NestedPaneCollection.cs WinFormsUI/Docking/SplitterBase.cs WinFormsUI/Docking/Strings.Designer.cs WinFormsUI/Docking/Strings.resx WinFormsUI/Docking/VS2005DockPaneCaption.cs WinFormsUI/Docking/VisibleNestedPaneCollection.cs WinFormsUI/Docking/Win32/Enums.cs WinFormsUI/Properties/AssemblyInfo.cs all.bat
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
<?xml version="1.0"?>
|
||||
<package xmlns="http://schemas.microsoft.com/packaging/2011/10/nuspec.xsd">
|
||||
<metadata>
|
||||
<version>3.0.0-alpha8</version>
|
||||
<version>2.9.0.0</version>
|
||||
<authors>Weifen Luo and other contributors</authors>
|
||||
<owners>Weifen Luo and other contributors</owners>
|
||||
<licenseUrl>http://www.opensource.org/licenses/mit-license.php</licenseUrl>
|
||||
|
||||
@@ -185,6 +185,11 @@
|
||||
<None Include="Images\XmlFile.ico" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<EmbeddedResource Include="Customization\Resources.resx">
|
||||
<Generator>ResXFileCodeGenerator</Generator>
|
||||
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
|
||||
<SubType>Designer</SubType>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Resources\DockPanel.xml" />
|
||||
<EmbeddedResource Include="ToolWindow.resx">
|
||||
<SubType>Designer</SubType>
|
||||
|
||||
@@ -91,13 +91,9 @@ namespace DockSample
|
||||
}
|
||||
else
|
||||
{
|
||||
for (int index = dockPanel.Contents.Count - 1; index >= 0; index--)
|
||||
foreach (IDockContent document in dockPanel.DocumentsToArray())
|
||||
{
|
||||
if (dockPanel.Contents[index] is IDockContent)
|
||||
{
|
||||
IDockContent content = (IDockContent)dockPanel.Contents[index];
|
||||
content.DockHandler.Close();
|
||||
}
|
||||
document.DockHandler.Close();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -366,12 +362,15 @@ namespace DockSample
|
||||
{
|
||||
if (dockPanel.DocumentStyle == DocumentStyle.SystemMdi)
|
||||
{
|
||||
menuItemClose.Enabled = menuItemCloseAll.Enabled = (ActiveMdiChild != null);
|
||||
menuItemClose.Enabled =
|
||||
menuItemCloseAll.Enabled =
|
||||
menuItemCloseAllButThisOne.Enabled = (ActiveMdiChild != null);
|
||||
}
|
||||
else
|
||||
{
|
||||
menuItemClose.Enabled = (dockPanel.ActiveDocument != null);
|
||||
menuItemCloseAll.Enabled = (dockPanel.DocumentsCount > 0);
|
||||
menuItemCloseAll.Enabled =
|
||||
menuItemCloseAllButThisOne.Enabled = (dockPanel.DocumentsCount > 0);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Binary file not shown.
6
README.md
Normal file
6
README.md
Normal file
@@ -0,0 +1,6 @@
|
||||
dockpanelsuite
|
||||
==============
|
||||
|
||||
DockPanel Suite - The Visual Studio inspired docking library for .NET WinForms
|
||||
|
||||
For all the details, check out [http://dockpanelsuite.com](http://dockpanelsuite.com).
|
||||
@@ -1,28 +0,0 @@
|
||||
Microsoft Visual Studio Solution File, Format Version 11.00
|
||||
# Visual Studio 2010
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WinFormsUI", "WinFormsUI\WinFormsUI.csproj", "{C75532C4-765B-418E-B09B-46D36B2ABDB1}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DockSample", "DockSample\DockSample.csproj", "{40793A27-478B-4357-B4C3-FC8943131F3D}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Any CPU = Debug|Any CPU
|
||||
Release|Any CPU = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{C75532C4-765B-418E-B09B-46D36B2ABDB1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{C75532C4-765B-418E-B09B-46D36B2ABDB1}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{C75532C4-765B-418E-B09B-46D36B2ABDB1}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{C75532C4-765B-418E-B09B-46D36B2ABDB1}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{40793A27-478B-4357-B4C3-FC8943131F3D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{40793A27-478B-4357-B4C3-FC8943131F3D}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{40793A27-478B-4357-B4C3-FC8943131F3D}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{40793A27-478B-4357-B4C3-FC8943131F3D}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(MonoDevelopProperties) = preSolution
|
||||
StartupItem = DockSample\DockSample.csproj
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
EndGlobal
|
||||
@@ -1,25 +0,0 @@
|
||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio 2012
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WinFormsUI", "WinFormsUI\WinFormsUI.csproj", "{C75532C4-765B-418E-B09B-46D36B2ABDB1}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DockSample", "DockSample\DockSample.csproj", "{40793A27-478B-4357-B4C3-FC8943131F3D}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Any CPU = Debug|Any CPU
|
||||
Release|Any CPU = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{C75532C4-765B-418E-B09B-46D36B2ABDB1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{C75532C4-765B-418E-B09B-46D36B2ABDB1}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{C75532C4-765B-418E-B09B-46D36B2ABDB1}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{C75532C4-765B-418E-B09B-46D36B2ABDB1}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{40793A27-478B-4357-B4C3-FC8943131F3D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{40793A27-478B-4357-B4C3-FC8943131F3D}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{40793A27-478B-4357-B4C3-FC8943131F3D}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{40793A27-478B-4357-B4C3-FC8943131F3D}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
EndGlobal
|
||||
@@ -119,8 +119,7 @@ namespace WeifenLuo.WinFormsUI.Docking
|
||||
return;
|
||||
|
||||
m_closeButton = value;
|
||||
if (Pane != null)
|
||||
if (Pane.ActiveContent.DockHandler == this)
|
||||
if (IsActiveContentHandler)
|
||||
Pane.RefreshChanges();
|
||||
}
|
||||
}
|
||||
@@ -132,7 +131,20 @@ namespace WeifenLuo.WinFormsUI.Docking
|
||||
public bool CloseButtonVisible
|
||||
{
|
||||
get { return m_closeButtonVisible; }
|
||||
set { m_closeButtonVisible = value; }
|
||||
set
|
||||
{
|
||||
if (m_closeButtonVisible == value)
|
||||
return;
|
||||
|
||||
m_closeButtonVisible = value;
|
||||
if (IsActiveContentHandler)
|
||||
Pane.RefreshChanges();
|
||||
}
|
||||
}
|
||||
|
||||
private bool IsActiveContentHandler
|
||||
{
|
||||
get { return Pane != null && Pane.ActiveContent != null && Pane.ActiveContent.DockHandler == this; }
|
||||
}
|
||||
|
||||
private DockState DefaultDockState
|
||||
@@ -825,6 +837,8 @@ namespace WeifenLuo.WinFormsUI.Docking
|
||||
|
||||
if (DockState == DockState.Unknown)
|
||||
Show(dockPanel, DefaultShowState);
|
||||
else if (DockPanel != dockPanel)
|
||||
Show(dockPanel, DockState == DockState.Hidden ? m_visibleState : DockState);
|
||||
else
|
||||
Activate();
|
||||
}
|
||||
@@ -841,15 +855,21 @@ namespace WeifenLuo.WinFormsUI.Docking
|
||||
|
||||
DockPanel = dockPanel;
|
||||
|
||||
if (dockState == DockState.Float && FloatPane == null)
|
||||
if (dockState == DockState.Float)
|
||||
{
|
||||
if (FloatPane == null)
|
||||
Pane = DockPanel.DockPaneFactory.CreateDockPane(Content, DockState.Float, true);
|
||||
}
|
||||
else if (PanelPane == null)
|
||||
{
|
||||
DockPane paneExisting = null;
|
||||
foreach (DockPane pane in DockPanel.Panes)
|
||||
if (pane.DockState == dockState)
|
||||
{
|
||||
if (paneExisting == null || pane.IsActivated)
|
||||
paneExisting = pane;
|
||||
|
||||
if (pane.IsActivated)
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
@@ -1315,5 +1315,33 @@ namespace WeifenLuo.WinFormsUI.Docking
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region cachedLayoutArgs leak workaround
|
||||
|
||||
/// <summary>
|
||||
/// There's a bug in the WinForms layout engine
|
||||
/// that can result in a deferred layout to not
|
||||
/// properly clear out the cached layout args after
|
||||
/// the layout operation is performed.
|
||||
/// Specifically, this bug is hit when the bounds of
|
||||
/// the Pane change, initiating a layout on the parent
|
||||
/// (DockWindow) which is where the bug hits.
|
||||
/// To work around it, when a pane loses the DockWindow
|
||||
/// as its parent, that parent DockWindow needs to
|
||||
/// perform a layout to flush the cached args, if they exist.
|
||||
/// </summary>
|
||||
private DockWindow _lastParentWindow;
|
||||
protected override void OnParentChanged(EventArgs e)
|
||||
{
|
||||
base.OnParentChanged(e);
|
||||
var newParent = Parent as DockWindow;
|
||||
if (newParent != _lastParentWindow)
|
||||
{
|
||||
if (_lastParentWindow != null)
|
||||
_lastParentWindow.PerformLayout();
|
||||
_lastParentWindow = newParent;
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using System;
|
||||
using System;
|
||||
|
||||
namespace WeifenLuo.WinFormsUI.Docking
|
||||
{
|
||||
|
||||
@@ -304,7 +304,7 @@ namespace WeifenLuo.WinFormsUI.Docking
|
||||
return false;
|
||||
}
|
||||
|
||||
private int m_countSuspendFocusTracking = 0;
|
||||
private uint m_countSuspendFocusTracking = 0;
|
||||
public void SuspendFocusTracking()
|
||||
{
|
||||
m_countSuspendFocusTracking++;
|
||||
@@ -314,10 +314,10 @@ namespace WeifenLuo.WinFormsUI.Docking
|
||||
|
||||
public void ResumeFocusTracking()
|
||||
{
|
||||
if (m_countSuspendFocusTracking > 0)
|
||||
m_countSuspendFocusTracking--;
|
||||
|
||||
if (m_countSuspendFocusTracking == 0)
|
||||
return;
|
||||
|
||||
if (--m_countSuspendFocusTracking == 0)
|
||||
{
|
||||
if (ContentActivating != null)
|
||||
{
|
||||
|
||||
@@ -232,9 +232,7 @@ namespace WeifenLuo.WinFormsUI.Docking
|
||||
|
||||
public static void SaveAsXml(DockPanel dockPanel, Stream stream, Encoding encoding, bool upstream)
|
||||
{
|
||||
using (var xmlOut = new XmlTextWriter(stream, encoding))
|
||||
{
|
||||
xmlOut.Formatting = Formatting.Indented;
|
||||
XmlWriter xmlOut = XmlWriter.Create(stream, new XmlWriterSettings() { Encoding = encoding, Indent = true });
|
||||
|
||||
if (!upstream)
|
||||
xmlOut.WriteStartDocument();
|
||||
|
||||
@@ -9,7 +9,7 @@ using System.Diagnostics.CodeAnalysis;
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyCompany("Weifen Luo")]
|
||||
[assembly: AssemblyProduct("DockPanel Suite")]
|
||||
[assembly: AssemblyCopyright("Copyright © 2007-2013 Weifen Luo and other contributors 2007-2012")]
|
||||
[assembly: AssemblyCopyright("Copyright © Weifen Luo and other contributors 2007-2013")]
|
||||
[assembly: AssemblyTrademark("")]
|
||||
[assembly: AssemblyCulture("")]
|
||||
[assembly: CLSCompliant(true)]
|
||||
@@ -18,8 +18,8 @@ using System.Diagnostics.CodeAnalysis;
|
||||
|
||||
[assembly: Guid("9d690ef9-ce19-4c69-874c-e24d8eb36aff")]
|
||||
|
||||
[assembly: AssemblyVersion("3.0.0.0")]
|
||||
[assembly: AssemblyFileVersion("3.0.0.0")]
|
||||
[assembly: AssemblyVersion("2.9.0.0")]
|
||||
[assembly: AssemblyFileVersion("2.9.0.0")]
|
||||
|
||||
[module: SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", Scope = "namespace", Target = "WeifenLuo.WinFormsUI.Docking", MessageId = "Weifen")]
|
||||
[module: SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", Scope = "namespace", Target = "WeifenLuo.WinFormsUI.Docking", MessageId = "Luo")]
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
set msBuildDir=%WINDIR%\Microsoft.NET\Framework\v4.0.30319
|
||||
call %MSBuildDir%\msbuild WinFormsUI.Docking.vs2010.sln /t:clean
|
||||
call %MSBuildDir%\msbuild WinFormsUI.Docking.vs2010.sln /t:clean /p:Configuration=Release
|
||||
call %MSBuildDir%\msbuild WinFormsUI.Docking.sln /t:clean
|
||||
call %MSBuildDir%\msbuild WinFormsUI.Docking.sln /t:clean /p:Configuration=Release
|
||||
@IF %ERRORLEVEL% NEQ 0 PAUSE
|
||||
@@ -1,3 +1,3 @@
|
||||
set msBuildDir=%WINDIR%\Microsoft.NET\Framework\v4.0.30319
|
||||
call %MSBuildDir%\msbuild WinFormsUI.Docking.vs2010.sln /t:build /p:Configuration="Debug"
|
||||
call %MSBuildDir%\msbuild WinFormsUI.Docking.sln /t:build /p:Configuration="Debug"
|
||||
@IF %ERRORLEVEL% NEQ 0 PAUSE
|
||||
@@ -1,3 +1,3 @@
|
||||
set msBuildDir=%WINDIR%\Microsoft.NET\Framework\v4.0.30319
|
||||
call %MSBuildDir%\msbuild WinFormsUI.Docking.vs2010.sln /t:build /p:Configuration=Release /p:TargetFrameworkVersion=v2.0 /p:OutputPath=..\bin\net20\
|
||||
call %MSBuildDir%\msbuild WinFormsUI.Docking.sln /t:build /p:Configuration=Release /p:TargetFrameworkVersion=v2.0 /p:OutputPath=..\bin\net20\
|
||||
@IF %ERRORLEVEL% NEQ 0 PAUSE
|
||||
@@ -1,3 +1,3 @@
|
||||
set msBuildDir=%WINDIR%\Microsoft.NET\Framework\v4.0.30319
|
||||
call %MSBuildDir%\msbuild WinFormsUI.Docking.vs2010.sln /t:build /p:Configuration=Release /p:TargetFrameworkVersion=v4.0 /p:OutputPath=..\bin\net40\
|
||||
call %MSBuildDir%\msbuild WinFormsUI.Docking.sln /t:build /p:Configuration=Release /p:TargetFrameworkVersion=v4.0 /p:OutputPath=..\bin\net40\
|
||||
@IF %ERRORLEVEL% NEQ 0 PAUSE
|
||||
Reference in New Issue
Block a user