资源简介

仿VS2010窗体属性浮动Dock布局代码 支持

资源截图

代码片段和文件信息

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using WeifenLuo.WinFormsUI.Docking;

namespace TestDock
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }

        private int index = 1;

        private void Form1_Load(object sender EventArgs e)
        {
            //this.WindowState = FormWindowState.Maximized;
            new TestForm().Show(this.dockPanel1 DockState.DockBottomAutoHide);
            new MainForm().Show(this.dockPanel1 DockState.DockRightAutoHide);
            new TestForm().Show(this.dockPanel1 DockState.DockBottomAutoHide);
            new MainForm().Show(this.dockPanel1 DockState.DockRightAutoHide);

            MainForm main = new MainForm();
            main.Text = “浮动窗体“;
            main.Show(this.dockPanel1 DockState.Float);
        }

        private void 新建ToolStripMenuItem_Click(object sender EventArgs e)
        {
            TestDocument tstDoc = new TestDocument();
            tstDoc.Text = “下载于51aspx.com“ + index.ToString();
            tstDoc.Show(this.dockPanel1 DockState.Document);
            tstDoc.TabPageContextMenuStrip = contextMenuStrip1;
            index++;
        }

        private void closeToolStripMenuItem_Click(object sender EventArgs e)
        {
            this.dockPanel1.ActiveContent.DockHandler.Close();
        }

        private void 全部关闭ToolStripMenuItem_Click(object sender EventArgs e)
        {
            DockContentCollection contents = this.dockPanel1.Contents;
            int num = 0;
            while (num < contents.Count)
            {
                if (contents[num].DockHandler.DockState == DockState.Document)
                {
                    contents[num].DockHandler.Close();
                }
                else
                {
                    num++;
                }
            }

        }

        private void 关闭其它页ToolStripMenuItem_Click(object sender EventArgs e)
        {
            DockContentCollection contents = this.dockPanel1.Contents;
            int num = 0;
            while (num < contents.Count)
            {
                if (contents[num].DockHandler.DockState == DockState.Document && this.dockPanel1.ActiveContent != contents[num])
                {
                    contents[num].DockHandler.Close();
                }
                else
                {
                    num++;
                }
            }
        }
    }
}

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----

    .......      1938  2012-07-10 10:07  仿VS2010窗体Dock布局代码\51Aspx源码必读 .txt

    .......     14336  2012-07-10 10:07  仿VS2010窗体Dock布局代码\bin\Debug\TestDock.exe

    .......     34304  2012-07-10 10:07  仿VS2010窗体Dock布局代码\bin\Debug\TestDock.pdb

    .......     14328  2012-07-10 10:07  仿VS2010窗体Dock布局代码\bin\Debug\TestDock.vshost.exe

    .......       490  2012-07-10 10:07  仿VS2010窗体Dock布局代码\bin\Debug\TestDock.vshost.exe.manifest

    .......    430080  2012-07-10 10:07  仿VS2010窗体Dock布局代码\bin\Debug\WeifenLuo.WinFormsUI.Docking.dll

    .......      2705  2012-07-10 10:07  仿VS2010窗体Dock布局代码\Form1.cs

    .......     13186  2012-07-10 10:07  仿VS2010窗体Dock布局代码\Form1.Designer.cs

    .......      6218  2012-07-10 10:07  仿VS2010窗体Dock布局代码\Form1.resx

    .......    430080  2012-07-10 10:07  仿VS2010窗体Dock布局代码\Lib\WeifenLuo.WinFormsUI.Docking.dll

    .......       383  2012-07-10 10:07  仿VS2010窗体Dock布局代码\MainForm.cs

    .......      1483  2012-07-10 10:07  仿VS2010窗体Dock布局代码\MainForm.Designer.cs

    .......      5814  2012-07-10 10:07  仿VS2010窗体Dock布局代码\MainForm.resx

    .......      5112  2012-07-10 10:07  仿VS2010窗体Dock布局代码\obj\Debug\ResolveAssemblyReference.cache

    .......      4608  2012-07-10 10:07  仿VS2010窗体Dock布局代码\obj\Debug\TempPE\Properties.Resources.Designer.cs.dll

    .......      1028  2012-07-10 10:07  仿VS2010窗体Dock布局代码\obj\Debug\TestDock.csproj.FileListAbsolute.txt

    .......       774  2012-07-10 10:07  仿VS2010窗体Dock布局代码\obj\Debug\TestDock.csproj.GenerateResource.Cache

    .......     14336  2012-07-10 10:07  仿VS2010窗体Dock布局代码\obj\Debug\TestDock.exe

    .......       180  2012-07-10 10:07  仿VS2010窗体Dock布局代码\obj\Debug\TestDock.Form1.resources

    .......       180  2012-07-10 10:07  仿VS2010窗体Dock布局代码\obj\Debug\TestDock.MainForm.resources

    .......     34304  2012-07-10 10:07  仿VS2010窗体Dock布局代码\obj\Debug\TestDock.pdb

    .......       180  2012-07-10 10:07  仿VS2010窗体Dock布局代码\obj\Debug\TestDock.Properties.Resources.resources

    .......       180  2012-07-10 10:07  仿VS2010窗体Dock布局代码\obj\Debug\TestDock.TestDocument.resources

    .......       180  2012-07-10 10:07  仿VS2010窗体Dock布局代码\obj\Debug\TestDock.TestForm.resources

    .......       440  2012-07-10 10:07  仿VS2010窗体Dock布局代码\obj\TestDock.csproj.FileList.txt

    .......       932  2012-07-10 10:07  仿VS2010窗体Dock布局代码\obj\TestDock.csproj.FileListAbsolute.txt

    .......       467  2012-07-10 10:07  仿VS2010窗体Dock布局代码\Program.cs

    .......      1204  2012-07-10 10:07  仿VS2010窗体Dock布局代码\Properties\AssemblyInfo.cs

    .......      2840  2012-07-10 10:07  仿VS2010窗体Dock布局代码\Properties\Resources.Designer.cs

    .......      5612  2012-07-10 10:07  仿VS2010窗体Dock布局代码\Properties\Resources.resx

............此处省略22个文件信息

评论

共有 条评论