home *** CD-ROM | disk | FTP | other *** search
- using System;
- using System.Drawing;
- using System.Collections;
- using System.ComponentModel;
- using System.Windows.Forms;
- using System.Data;
- using NETXP.Controls.Docking;
-
- namespace Docking
- {
- /// <summary>
- /// Summary description for Form1.
- /// </summary>
- public class Form1 : System.Windows.Forms.Form
- {
- private NETXP.Controls.Docking.DockingManagerExtender dockingManagerExtender1;
- private System.Windows.Forms.Panel panelSettings;
- private System.Windows.Forms.PropertyGrid propertyGrid1;
- private System.Windows.Forms.Label label1;
- private System.Windows.Forms.ImageList imageList1;
- private System.Windows.Forms.Panel panel1;
- private NETXP.Controls.Docking.TabbedGroups tabbedGroups1;
- private System.Windows.Forms.TreeView treeView2;
- private System.Windows.Forms.RadioButton radioButton1;
- private System.Windows.Forms.RadioButton radioButton2;
- private System.Windows.Forms.RadioButton radioButton3;
- private System.ComponentModel.IContainer components;
-
- public Form1()
- {
- //
- // Required for Windows Form Designer support
- //
- InitializeComponent();
- }
-
- /// <summary>
- /// Clean up any resources being used.
- /// </summary>
- protected override void Dispose( bool disposing )
- {
- if( disposing )
- {
- if (components != null)
- {
- components.Dispose();
- }
- }
- base.Dispose( disposing );
- }
-
- #region Windows Form Designer generated code
- /// <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();
- System.Resources.ResourceManager resources = new System.Resources.ResourceManager(typeof(Form1));
- this.dockingManagerExtender1 = new NETXP.Controls.Docking.DockingManagerExtender(this.components);
- this.panel1 = new System.Windows.Forms.Panel();
- this.tabbedGroups1 = new NETXP.Controls.Docking.TabbedGroups();
- this.label1 = new System.Windows.Forms.Label();
- this.panelSettings = new System.Windows.Forms.Panel();
- this.radioButton3 = new System.Windows.Forms.RadioButton();
- this.radioButton2 = new System.Windows.Forms.RadioButton();
- this.radioButton1 = new System.Windows.Forms.RadioButton();
- this.propertyGrid1 = new System.Windows.Forms.PropertyGrid();
- this.treeView2 = new System.Windows.Forms.TreeView();
- this.imageList1 = new System.Windows.Forms.ImageList(this.components);
- this.panel1.SuspendLayout();
- ((System.ComponentModel.ISupportInitialize)(this.tabbedGroups1)).BeginInit();
- this.panelSettings.SuspendLayout();
- this.SuspendLayout();
- //
- // dockingManagerExtender1
- //
- this.dockingManagerExtender1.ContainerControl = this;
- this.dockingManagerExtender1.InnerControl = this.panel1;
- this.dockingManagerExtender1.OuterControl = this.label1;
- //
- // panel1
- //
- this.panel1.Controls.Add(this.tabbedGroups1);
- this.panel1.Dock = System.Windows.Forms.DockStyle.Fill;
- this.dockingManagerExtender1.SetFullTitle(this.panel1, "panel1");
- this.panel1.Location = new System.Drawing.Point(144, 0);
- this.panel1.Name = "panel1";
- this.panel1.Size = new System.Drawing.Size(280, 390);
- this.panel1.TabIndex = 8;
- this.dockingManagerExtender1.SetTitle(this.panel1, "panel1");
- //
- // tabbedGroups1
- //
- this.tabbedGroups1.ActiveNode = null;
- this.tabbedGroups1.AllowDrop = true;
- this.tabbedGroups1.AtLeastOneNode = false;
- this.tabbedGroups1.CloseShortcut = System.Windows.Forms.Shortcut.CtrlShiftC;
- this.tabbedGroups1.Dirty = true;
- this.tabbedGroups1.Dock = System.Windows.Forms.DockStyle.Fill;
- this.tabbedGroups1.Location = new System.Drawing.Point(0, 0);
- this.tabbedGroups1.MoveNextShortcut = System.Windows.Forms.Shortcut.CtrlShiftN;
- this.tabbedGroups1.MovePreviousShortcut = System.Windows.Forms.Shortcut.CtrlShiftP;
- this.tabbedGroups1.Name = "tabbedGroups1";
- this.tabbedGroups1.ProportionalResizeShortcut = System.Windows.Forms.Shortcut.CtrlShiftR;
- this.tabbedGroups1.SelectedNode = null;
- this.tabbedGroups1.SelectedShortcut = System.Windows.Forms.Shortcut.CtrlShiftT;
- this.tabbedGroups1.Size = new System.Drawing.Size(280, 390);
- this.tabbedGroups1.SplitHorizontalShortcut = System.Windows.Forms.Shortcut.CtrlShiftH;
- this.tabbedGroups1.SplitVerticalShortcut = System.Windows.Forms.Shortcut.CtrlShiftV;
- this.tabbedGroups1.TabIndex = 0;
- //
- // label1
- //
- this.label1.Dock = System.Windows.Forms.DockStyle.Bottom;
- this.label1.Location = new System.Drawing.Point(0, 390);
- this.label1.Name = "label1";
- this.label1.Size = new System.Drawing.Size(592, 0);
- this.label1.TabIndex = 7;
- this.label1.Text = "label1";
- //
- // panelSettings
- //
- this.dockingManagerExtender1.SetAllowDocking(this.panelSettings, true);
- this.panelSettings.Controls.Add(this.radioButton3);
- this.panelSettings.Controls.Add(this.radioButton2);
- this.panelSettings.Controls.Add(this.radioButton1);
- this.panelSettings.Dock = System.Windows.Forms.DockStyle.Left;
- this.dockingManagerExtender1.SetFullTitle(this.panelSettings, "Settings");
- this.dockingManagerExtender1.SetIcon(this.panelSettings, ((System.Drawing.Image)(resources.GetObject("panelSettings.Icon"))));
- this.panelSettings.Location = new System.Drawing.Point(0, 0);
- this.dockingManagerExtender1.SetMinimumSize(this.panelSettings, 80);
- this.panelSettings.Name = "panelSettings";
- this.panelSettings.Size = new System.Drawing.Size(144, 390);
- this.panelSettings.TabIndex = 4;
- this.dockingManagerExtender1.SetTitle(this.panelSettings, "Settings");
- //
- // radioButton3
- //
- this.radioButton3.Location = new System.Drawing.Point(16, 64);
- this.radioButton3.Name = "radioButton3";
- this.radioButton3.Size = new System.Drawing.Size(112, 24);
- this.radioButton3.TabIndex = 2;
- this.radioButton3.Text = "Windows Default";
- this.radioButton3.CheckedChanged += new System.EventHandler(this.radioButton3_CheckedChanged);
- //
- // radioButton2
- //
- this.radioButton2.Location = new System.Drawing.Point(16, 40);
- this.radioButton2.Name = "radioButton2";
- this.radioButton2.Size = new System.Drawing.Size(112, 24);
- this.radioButton2.TabIndex = 1;
- this.radioButton2.Text = "Office XP";
- this.radioButton2.CheckedChanged += new System.EventHandler(this.radioButton2_CheckedChanged);
- //
- // radioButton1
- //
- this.radioButton1.Checked = true;
- this.radioButton1.Location = new System.Drawing.Point(16, 16);
- this.radioButton1.Name = "radioButton1";
- this.radioButton1.Size = new System.Drawing.Size(112, 24);
- this.radioButton1.TabIndex = 0;
- this.radioButton1.TabStop = true;
- this.radioButton1.Text = "Office 2003";
- this.radioButton1.CheckedChanged += new System.EventHandler(this.radioButton1_CheckedChanged);
- //
- // propertyGrid1
- //
- this.dockingManagerExtender1.SetAllowDocking(this.propertyGrid1, true);
- this.propertyGrid1.CommandsVisibleIfAvailable = true;
- this.propertyGrid1.Dock = System.Windows.Forms.DockStyle.Right;
- this.dockingManagerExtender1.SetFullTitle(this.propertyGrid1, "Properties");
- this.dockingManagerExtender1.SetIcon(this.propertyGrid1, ((System.Drawing.Image)(resources.GetObject("propertyGrid1.Icon"))));
- this.propertyGrid1.LargeButtons = false;
- this.propertyGrid1.LineColor = System.Drawing.SystemColors.ScrollBar;
- this.propertyGrid1.Location = new System.Drawing.Point(424, 0);
- this.dockingManagerExtender1.SetMinimumSize(this.propertyGrid1, 80);
- this.propertyGrid1.Name = "propertyGrid1";
- this.propertyGrid1.Size = new System.Drawing.Size(168, 390);
- this.propertyGrid1.TabIndex = 5;
- this.propertyGrid1.Text = "propertyGrid1";
- this.dockingManagerExtender1.SetTitle(this.propertyGrid1, "Properties");
- this.propertyGrid1.ViewBackColor = System.Drawing.SystemColors.Window;
- this.propertyGrid1.ViewForeColor = System.Drawing.SystemColors.WindowText;
- //
- // treeView2
- //
- this.dockingManagerExtender1.SetAllowDocking(this.treeView2, true);
- this.treeView2.Dock = System.Windows.Forms.DockStyle.Bottom;
- this.dockingManagerExtender1.SetFullTitle(this.treeView2, "Tree View");
- this.dockingManagerExtender1.SetIcon(this.treeView2, ((System.Drawing.Image)(resources.GetObject("treeView2.Icon"))));
- this.treeView2.ImageIndex = -1;
- this.treeView2.Location = new System.Drawing.Point(144, 238);
- this.dockingManagerExtender1.SetMinimumSize(this.treeView2, 100);
- this.treeView2.Name = "treeView2";
- this.treeView2.SelectedImageIndex = -1;
- this.treeView2.Size = new System.Drawing.Size(280, 152);
- this.treeView2.TabIndex = 9;
- this.dockingManagerExtender1.SetTitle(this.treeView2, "Tree View");
- //
- // imageList1
- //
- this.imageList1.ColorDepth = System.Windows.Forms.ColorDepth.Depth32Bit;
- this.imageList1.ImageSize = new System.Drawing.Size(16, 16);
- this.imageList1.ImageStream = ((System.Windows.Forms.ImageListStreamer)(resources.GetObject("imageList1.ImageStream")));
- this.imageList1.TransparentColor = System.Drawing.Color.Transparent;
- //
- // Form1
- //
- this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);
- this.ClientSize = new System.Drawing.Size(592, 390);
- this.Controls.Add(this.treeView2);
- this.Controls.Add(this.panel1);
- this.Controls.Add(this.propertyGrid1);
- this.Controls.Add(this.panelSettings);
- this.Controls.Add(this.label1);
- this.Name = "Form1";
- this.Text = "Form1";
- this.Load += new System.EventHandler(this.Form1_Load);
- this.panel1.ResumeLayout(false);
- ((System.ComponentModel.ISupportInitialize)(this.tabbedGroups1)).EndInit();
- this.panelSettings.ResumeLayout(false);
- this.ResumeLayout(false);
-
- }
- #endregion
-
- /// <summary>
- /// The main entry point for the application.
- /// </summary>
- [STAThread]
- static void Main()
- {
- Application.Run(new Form1());
- }
-
- private void Form1_Load(object sender, System.EventArgs e)
- {
- TabGroupNode tn = this.tabbedGroups1.RootSequence.AddNewNode();
- tn.TabPages.Add(new NETXP.Controls.Docking.TabPage("Test 1"));
- tn.TabPages.Add(new NETXP.Controls.Docking.TabPage("Test 2"));
- tn = this.tabbedGroups1.RootSequence.AddNewNode();
- tn.TabPages.Add(new NETXP.Controls.Docking.TabPage("Test 3"));
- }
-
- private void radioButton1_CheckedChanged(object sender, System.EventArgs e)
- {
- if(radioButton1.Checked)
- {
- this.dockingManagerExtender1.DockingManager.Renderer = new NETXP.Controls.Docking.Renderers.Office2003();
- this.tabbedGroups1.Renderer = new NETXP.Controls.Docking.Renderers.Office2003();
- }
- }
-
- private void radioButton2_CheckedChanged(object sender, System.EventArgs e)
- {
- if(radioButton2.Checked)
- {
- this.dockingManagerExtender1.DockingManager.Renderer = new NETXP.Controls.Docking.Renderers.OfficeXP();
- this.tabbedGroups1.Renderer = new NETXP.Controls.Docking.Renderers.OfficeXP();
- }
- }
-
- private void radioButton3_CheckedChanged(object sender, System.EventArgs e)
- {
- if(radioButton3.Checked)
- {
- this.dockingManagerExtender1.DockingManager.Renderer = new NETXP.Controls.Docking.Renderers.WindowsDefault();
- this.tabbedGroups1.Renderer = new NETXP.Controls.Docking.Renderers.WindowsDefault();
- }
- }
- }
- }
-