Skip to content
Browse files

Normalize line endings

No functional changes included in this checkin, this is simply to
normalize the line endings so that git diffs are useful again. This
appears to be a relatively new change from github requiring the addition
of the .gitattributes file.
  • Loading branch information...
1 parent 1e0b82c commit 216e0de36ef8faba35f2b097be798437b2df546e Ryan Rastedt committed Mar 10, 2013
Showing with 6,018 additions and 5,996 deletions.
  1. +22 −0 .gitattributes
  2. +117 −117 DockSample/AboutDialog.Designer.cs
  3. +25 −25 DockSample/AboutDialog.cs
  4. +119 −119 DockSample/AboutDialog.resx
  5. +113 −113 DockSample/Customization/DockHelper.cs
  6. +55 −55 DockSample/Customization/Extender.cs
  7. +618 −618 DockSample/Customization/InertButton.cs
  8. +133 −133 DockSample/Customization/Resources.Designer.cs
  9. +150 −150 DockSample/Customization/Resources.resx
  10. +108 −108 DockSample/Customization/Strings.Designer.cs
  11. +134 −134 DockSample/Customization/Strings.resx
  12. +507 −507 DockSample/Customization/VS2003AutoHideStrip.cs
  13. +359 −359 DockSample/Customization/VS2003DockPaneCaption.cs
  14. +1,085 −1,085 DockSample/Customization/VS2003DockPaneStrip.cs
  15. +323 −323 DockSample/DockSample.csproj
  16. +146 −146 DockSample/DummyDoc.Designer.cs
  17. +84 −84 DockSample/DummyDoc.cs
  18. +139 −139 DockSample/DummyDoc.resx
  19. +82 −82 DockSample/DummyOutputWindow.Designer.cs
  20. +18 −18 DockSample/DummyOutputWindow.cs
  21. +166 −166 DockSample/DummyOutputWindow.resx
  22. +94 −94 DockSample/DummyPropertyWindow.Designer.cs
  23. +20 −20 DockSample/DummyPropertyWindow.cs
  24. +140 −140 DockSample/DummyPropertyWindow.resx
  25. +461 −461 DockSample/DummySolutionExplorer.Designer.cs
  26. +23 −23 DockSample/DummySolutionExplorer.cs
  27. +219 −219 DockSample/DummySolutionExplorer.resx
  28. +110 −110 DockSample/DummyTaskList.Designer.cs
  29. +18 −18 DockSample/DummyTaskList.cs
  30. +137 −137 DockSample/DummyTaskList.resx
  31. +95 −95 DockSample/DummyToolbox.Designer.cs
  32. +18 −18 DockSample/DummyToolbox.cs
  33. +180 −180 DockSample/DummyToolbox.resx
Sorry, we could not display the entire diff because it was too big.
View
22 .gitattributes
@@ -0,0 +1,22 @@
+# Auto detect text files and perform LF normalization
+* text=auto
+
+# Custom for Visual Studio
+*.cs diff=csharp
+*.sln merge=union
+*.csproj merge=union
+*.vbproj merge=union
+*.fsproj merge=union
+*.dbproj merge=union
+
+# Standard to msysgit
+*.doc diff=astextplain
+*.DOC diff=astextplain
+*.docx diff=astextplain
+*.DOCX diff=astextplain
+*.dot diff=astextplain
+*.DOT diff=astextplain
+*.pdf diff=astextplain
+*.PDF diff=astextplain
+*.rtf diff=astextplain
+*.RTF diff=astextplain
View
234 DockSample/AboutDialog.Designer.cs
@@ -1,118 +1,118 @@
-namespace DockSample
-{
- partial class AboutDialog
- {
- /// <summary>
- /// Required designer variable.
- /// </summary>
- private System.ComponentModel.IContainer components = null;
-
- /// <summary>
- /// Clean up any resources being used.
- /// </summary>
- /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
- protected override void Dispose(bool disposing)
- {
- if (disposing && (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.buttonOK = new System.Windows.Forms.Button();
- this.label1 = new System.Windows.Forms.Label();
- this.label2 = new System.Windows.Forms.Label();
- this.label3 = new System.Windows.Forms.Label();
- this.labelLibVersion = new System.Windows.Forms.Label();
- this.labelAppVersion = new System.Windows.Forms.Label();
- this.SuspendLayout();
- //
- // buttonOK
- //
- this.buttonOK.DialogResult = System.Windows.Forms.DialogResult.Cancel;
- this.buttonOK.Location = new System.Drawing.Point(240, 184);
- this.buttonOK.Name = "buttonOK";
- this.buttonOK.Size = new System.Drawing.Size(75, 23);
- this.buttonOK.TabIndex = 0;
- this.buttonOK.Text = "OK";
- //
- // label1
- //
- this.label1.Location = new System.Drawing.Point(24, 59);
- this.label1.Name = "label1";
- this.label1.Size = new System.Drawing.Size(109, 16);
- this.label1.TabIndex = 1;
- this.label1.Text = "DockSample Version:";
- //
- // label2
- //
- this.label2.Location = new System.Drawing.Point(24, 119);
- this.label2.Name = "label2";
- this.label2.Size = new System.Drawing.Size(272, 32);
- this.label2.TabIndex = 2;
- this.label2.Text = "Copyright 2007, Weifen Luo";
- //
- // label3
- //
- this.label3.AutoSize = true;
- this.label3.Location = new System.Drawing.Point(24, 81);
- this.label3.Name = "label3";
- this.label3.Size = new System.Drawing.Size(128, 13);
- this.label3.TabIndex = 3;
- this.label3.Text = "DockPanel Suite Version:";
- //
- // labelLibVersion
- //
- this.labelLibVersion.Location = new System.Drawing.Point(148, 81);
- this.labelLibVersion.Name = "labelLibVersion";
- this.labelLibVersion.Size = new System.Drawing.Size(97, 13);
- this.labelLibVersion.TabIndex = 4;
- //
- // labelAppVersion
- //
- this.labelAppVersion.Location = new System.Drawing.Point(129, 59);
- this.labelAppVersion.Name = "labelAppVersion";
- this.labelAppVersion.Size = new System.Drawing.Size(97, 13);
- this.labelAppVersion.TabIndex = 5;
- //
- // AboutDialog
- //
- this.AcceptButton = this.buttonOK;
- this.CancelButton = this.buttonOK;
- this.ClientSize = new System.Drawing.Size(322, 215);
- this.Controls.Add(this.labelAppVersion);
- this.Controls.Add(this.labelLibVersion);
- this.Controls.Add(this.label3);
- this.Controls.Add(this.label2);
- this.Controls.Add(this.label1);
- this.Controls.Add(this.buttonOK);
- this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;
- this.MaximizeBox = false;
- this.MinimizeBox = false;
- this.Name = "AboutDialog";
- this.ShowInTaskbar = false;
- this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
- this.Text = "About";
- this.Load += new System.EventHandler(this.AboutDialog_Load);
- this.ResumeLayout(false);
- this.PerformLayout();
-
- }
- #endregion
-
- private System.Windows.Forms.Label label2;
- private System.Windows.Forms.Label label1;
- private System.Windows.Forms.Button buttonOK;
- private System.Windows.Forms.Label label3;
- private System.Windows.Forms.Label labelLibVersion;
- private System.Windows.Forms.Label labelAppVersion;
- }
+namespace DockSample
+{
+ partial class AboutDialog
+ {
+ /// <summary>
+ /// Required designer variable.
+ /// </summary>
+ private System.ComponentModel.IContainer components = null;
+
+ /// <summary>
+ /// Clean up any resources being used.
+ /// </summary>
+ /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
+ protected override void Dispose(bool disposing)
+ {
+ if (disposing && (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.buttonOK = new System.Windows.Forms.Button();
+ this.label1 = new System.Windows.Forms.Label();
+ this.label2 = new System.Windows.Forms.Label();
+ this.label3 = new System.Windows.Forms.Label();
+ this.labelLibVersion = new System.Windows.Forms.Label();
+ this.labelAppVersion = new System.Windows.Forms.Label();
+ this.SuspendLayout();
+ //
+ // buttonOK
+ //
+ this.buttonOK.DialogResult = System.Windows.Forms.DialogResult.Cancel;
+ this.buttonOK.Location = new System.Drawing.Point(240, 184);
+ this.buttonOK.Name = "buttonOK";
+ this.buttonOK.Size = new System.Drawing.Size(75, 23);
+ this.buttonOK.TabIndex = 0;
+ this.buttonOK.Text = "OK";
+ //
+ // label1
+ //
+ this.label1.Location = new System.Drawing.Point(24, 59);
+ this.label1.Name = "label1";
+ this.label1.Size = new System.Drawing.Size(109, 16);
+ this.label1.TabIndex = 1;
+ this.label1.Text = "DockSample Version:";
+ //
+ // label2
+ //
+ this.label2.Location = new System.Drawing.Point(24, 119);
+ this.label2.Name = "label2";
+ this.label2.Size = new System.Drawing.Size(272, 32);
+ this.label2.TabIndex = 2;
+ this.label2.Text = "Copyright 2007, Weifen Luo";
+ //
+ // label3
+ //
+ this.label3.AutoSize = true;
+ this.label3.Location = new System.Drawing.Point(24, 81);
+ this.label3.Name = "label3";
+ this.label3.Size = new System.Drawing.Size(128, 13);
+ this.label3.TabIndex = 3;
+ this.label3.Text = "DockPanel Suite Version:";
+ //
+ // labelLibVersion
+ //
+ this.labelLibVersion.Location = new System.Drawing.Point(148, 81);
+ this.labelLibVersion.Name = "labelLibVersion";
+ this.labelLibVersion.Size = new System.Drawing.Size(97, 13);
+ this.labelLibVersion.TabIndex = 4;
+ //
+ // labelAppVersion
+ //
+ this.labelAppVersion.Location = new System.Drawing.Point(129, 59);
+ this.labelAppVersion.Name = "labelAppVersion";
+ this.labelAppVersion.Size = new System.Drawing.Size(97, 13);
+ this.labelAppVersion.TabIndex = 5;
+ //
+ // AboutDialog
+ //
+ this.AcceptButton = this.buttonOK;
+ this.CancelButton = this.buttonOK;
+ this.ClientSize = new System.Drawing.Size(322, 215);
+ this.Controls.Add(this.labelAppVersion);
+ this.Controls.Add(this.labelLibVersion);
+ this.Controls.Add(this.label3);
+ this.Controls.Add(this.label2);
+ this.Controls.Add(this.label1);
+ this.Controls.Add(this.buttonOK);
+ this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;
+ this.MaximizeBox = false;
+ this.MinimizeBox = false;
+ this.Name = "AboutDialog";
+ this.ShowInTaskbar = false;
+ this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
+ this.Text = "About";
+ this.Load += new System.EventHandler(this.AboutDialog_Load);
+ this.ResumeLayout(false);
+ this.PerformLayout();
+
+ }
+ #endregion
+
+ private System.Windows.Forms.Label label2;
+ private System.Windows.Forms.Label label1;
+ private System.Windows.Forms.Button buttonOK;
+ private System.Windows.Forms.Label label3;
+ private System.Windows.Forms.Label labelLibVersion;
+ private System.Windows.Forms.Label labelAppVersion;
+ }
}
View
50 DockSample/AboutDialog.cs
@@ -1,26 +1,26 @@
-using System;
-using System.Collections.Generic;
-using System.ComponentModel;
-using System.Data;
-using System.Drawing;
-using System.Text;
-using System.Windows.Forms;
-using System.Reflection;
-using WeifenLuo.WinFormsUI.Docking;
-
-namespace DockSample
-{
- public partial class AboutDialog : Form
- {
- public AboutDialog()
- {
- InitializeComponent();
- }
-
- private void AboutDialog_Load(object sender, EventArgs e)
- {
- labelAppVersion.Text = typeof(MainForm).Assembly.GetName().Version.ToString();
- labelLibVersion.Text = typeof(DockPanel).Assembly.GetName().Version.ToString();
- }
- }
+using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Data;
+using System.Drawing;
+using System.Text;
+using System.Windows.Forms;
+using System.Reflection;
+using WeifenLuo.WinFormsUI.Docking;
+
+namespace DockSample
+{
+ public partial class AboutDialog : Form
+ {
+ public AboutDialog()
+ {
+ InitializeComponent();
+ }
+
+ private void AboutDialog_Load(object sender, EventArgs e)
+ {
+ labelAppVersion.Text = typeof(MainForm).Assembly.GetName().Version.ToString();
+ labelLibVersion.Text = typeof(DockPanel).Assembly.GetName().Version.ToString();
+ }
+ }
}
View
238 DockSample/AboutDialog.resx
@@ -1,120 +1,120 @@
-<?xml version="1.0" encoding="utf-8"?>
-<root>
- <!--
- Microsoft ResX Schema
-
- Version 2.0
-
- The primary goals of this format is to allow a simple XML format
- that is mostly human readable. The generation and parsing of the
- various data types are done through the TypeConverter classes
- associated with the data types.
-
- Example:
-
- ... ado.net/XML headers & schema ...
- <resheader name="resmimetype">text/microsoft-resx</resheader>
- <resheader name="version">2.0</resheader>
- <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
- <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
- <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
- <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
- <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
- <value>[base64 mime encoded serialized .NET Framework object]</value>
- </data>
- <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
- <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
- <comment>This is a comment</comment>
- </data>
-
- There are any number of "resheader" rows that contain simple
- name/value pairs.
-
- Each data row contains a name, and value. The row also contains a
- type or mimetype. Type corresponds to a .NET class that support
- text/value conversion through the TypeConverter architecture.
- Classes that don't support this are serialized and stored with the
- mimetype set.
-
- The mimetype is used for serialized objects, and tells the
- ResXResourceReader how to depersist the object. This is currently not
- extensible. For a given mimetype the value must be set accordingly:
-
- Note - application/x-microsoft.net.object.binary.base64 is the format
- that the ResXResourceWriter will generate, however the reader can
- read any of the formats listed below.
-
- mimetype: application/x-microsoft.net.object.binary.base64
- value : The object must be serialized with
- : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
- : and then encoded with base64 encoding.
-
- mimetype: application/x-microsoft.net.object.soap.base64
- value : The object must be serialized with
- : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
- : and then encoded with base64 encoding.
-
- mimetype: application/x-microsoft.net.object.bytearray.base64
- value : The object must be serialized into a byte array
- : using a System.ComponentModel.TypeConverter
- : and then encoded with base64 encoding.
- -->
- <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
- <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
- <xsd:element name="root" msdata:IsDataSet="true">
- <xsd:complexType>
- <xsd:choice maxOccurs="unbounded">
- <xsd:element name="metadata">
- <xsd:complexType>
- <xsd:sequence>
- <xsd:element name="value" type="xsd:string" minOccurs="0" />
- </xsd:sequence>
- <xsd:attribute name="name" use="required" type="xsd:string" />
- <xsd:attribute name="type" type="xsd:string" />
- <xsd:attribute name="mimetype" type="xsd:string" />
- <xsd:attribute ref="xml:space" />
- </xsd:complexType>
- </xsd:element>
- <xsd:element name="assembly">
- <xsd:complexType>
- <xsd:attribute name="alias" type="xsd:string" />
- <xsd:attribute name="name" type="xsd:string" />
- </xsd:complexType>
- </xsd:element>
- <xsd:element name="data">
- <xsd:complexType>
- <xsd:sequence>
- <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
- <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
- </xsd:sequence>
- <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
- <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
- <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
- <xsd:attribute ref="xml:space" />
- </xsd:complexType>
- </xsd:element>
- <xsd:element name="resheader">
- <xsd:complexType>
- <xsd:sequence>
- <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
- </xsd:sequence>
- <xsd:attribute name="name" type="xsd:string" use="required" />
- </xsd:complexType>
- </xsd:element>
- </xsd:choice>
- </xsd:complexType>
- </xsd:element>
- </xsd:schema>
- <resheader name="resmimetype">
- <value>text/microsoft-resx</value>
- </resheader>
- <resheader name="version">
- <value>2.0</value>
- </resheader>
- <resheader name="reader">
- <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
- </resheader>
- <resheader name="writer">
- <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
- </resheader>
+<?xml version="1.0" encoding="utf-8"?>
+<root>
+ <!--
+ Microsoft ResX Schema
+
+ Version 2.0
+
+ The primary goals of this format is to allow a simple XML format
+ that is mostly human readable. The generation and parsing of the
+ various data types are done through the TypeConverter classes
+ associated with the data types.
+
+ Example:
+
+ ... ado.net/XML headers & schema ...
+ <resheader name="resmimetype">text/microsoft-resx</resheader>
+ <resheader name="version">2.0</resheader>
+ <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
+ <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
+ <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
+ <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
+ <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
+ <value>[base64 mime encoded serialized .NET Framework object]</value>
+ </data>
+ <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+ <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
+ <comment>This is a comment</comment>
+ </data>
+
+ There are any number of "resheader" rows that contain simple
+ name/value pairs.
+
+ Each data row contains a name, and value. The row also contains a
+ type or mimetype. Type corresponds to a .NET class that support
+ text/value conversion through the TypeConverter architecture.
+ Classes that don't support this are serialized and stored with the
+ mimetype set.
+
+ The mimetype is used for serialized objects, and tells the
+ ResXResourceReader how to depersist the object. This is currently not
+ extensible. For a given mimetype the value must be set accordingly:
+
+ Note - application/x-microsoft.net.object.binary.base64 is the format
+ that the ResXResourceWriter will generate, however the reader can
+ read any of the formats listed below.
+
+ mimetype: application/x-microsoft.net.object.binary.base64
+ value : The object must be serialized with
+ : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
+ : and then encoded with base64 encoding.
+
+ mimetype: application/x-microsoft.net.object.soap.base64
+ value : The object must be serialized with
+ : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
+ : and then encoded with base64 encoding.
+
+ mimetype: application/x-microsoft.net.object.bytearray.base64
+ value : The object must be serialized into a byte array
+ : using a System.ComponentModel.TypeConverter
+ : and then encoded with base64 encoding.
+ -->
+ <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
+ <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
+ <xsd:element name="root" msdata:IsDataSet="true">
+ <xsd:complexType>
+ <xsd:choice maxOccurs="unbounded">
+ <xsd:element name="metadata">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="value" type="xsd:string" minOccurs="0" />
+ </xsd:sequence>
+ <xsd:attribute name="name" use="required" type="xsd:string" />
+ <xsd:attribute name="type" type="xsd:string" />
+ <xsd:attribute name="mimetype" type="xsd:string" />
+ <xsd:attribute ref="xml:space" />
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="assembly">
+ <xsd:complexType>
+ <xsd:attribute name="alias" type="xsd:string" />
+ <xsd:attribute name="name" type="xsd:string" />
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="data">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+ <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
+ </xsd:sequence>
+ <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
+ <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
+ <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
+ <xsd:attribute ref="xml:space" />
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="resheader">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+ </xsd:sequence>
+ <xsd:attribute name="name" type="xsd:string" use="required" />
+ </xsd:complexType>
+ </xsd:element>
+ </xsd:choice>
+ </xsd:complexType>
+ </xsd:element>
+ </xsd:schema>
+ <resheader name="resmimetype">
+ <value>text/microsoft-resx</value>
+ </resheader>
+ <resheader name="version">
+ <value>2.0</value>
+ </resheader>
+ <resheader name="reader">
+ <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+ </resheader>
+ <resheader name="writer">
+ <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+ </resheader>
</root>
View
226 DockSample/Customization/DockHelper.cs
@@ -1,113 +1,113 @@
-using System;
-using System.Drawing;
-using System.Windows.Forms;
-using WeifenLuo.WinFormsUI.Docking;
-
-namespace DockSample.Customization
-{
- internal class DockHelper
- {
- public static bool IsDockStateAutoHide(DockState dockState)
- {
- if (dockState == DockState.DockLeftAutoHide ||
- dockState == DockState.DockRightAutoHide ||
- dockState == DockState.DockTopAutoHide ||
- dockState == DockState.DockBottomAutoHide)
- return true;
- else
- return false;
- }
-
- public static bool IsDockStateDocked(DockState dockState)
- {
- return (dockState == DockState.DockLeft ||
- dockState == DockState.DockRight ||
- dockState == DockState.DockTop ||
- dockState == DockState.DockBottom);
- }
-
- public static bool IsDockBottom(DockState dockState)
- {
- return (dockState == DockState.DockBottom || dockState == DockState.DockBottomAutoHide) ? true : false;
- }
-
- public static bool IsDockLeft(DockState dockState)
- {
- return (dockState == DockState.DockLeft || dockState == DockState.DockLeftAutoHide) ? true : false;
- }
-
- public static bool IsDockRight(DockState dockState)
- {
- return (dockState == DockState.DockRight || dockState == DockState.DockRightAutoHide) ? true : false;
- }
-
- public static bool IsDockTop(DockState dockState)
- {
- return (dockState == DockState.DockTop || dockState == DockState.DockTopAutoHide ) ? true : false;
- }
-
- public static bool IsDockStateValid(DockState dockState, DockAreas dockableAreas)
- {
- if (((dockableAreas & DockAreas.Float) == 0) &&
- (dockState == DockState.Float))
- return false;
- else if (((dockableAreas & DockAreas.Document) == 0) &&
- (dockState == DockState.Document))
- return false;
- else if (((dockableAreas & DockAreas.DockLeft) == 0) &&
- (dockState == DockState.DockLeft || dockState == DockState.DockLeftAutoHide))
- return false;
- else if (((dockableAreas & DockAreas.DockRight) == 0) &&
- (dockState == DockState.DockRight || dockState == DockState.DockRightAutoHide))
- return false;
- else if (((dockableAreas & DockAreas.DockTop) == 0) &&
- (dockState == DockState.DockTop || dockState == DockState.DockTopAutoHide))
- return false;
- else if (((dockableAreas & DockAreas.DockBottom) == 0) &&
- (dockState == DockState.DockBottom || dockState == DockState.DockBottomAutoHide))
- return false;
- else
- return true;
- }
-
- public static bool IsDockWindowState(DockState state)
- {
- if (state == DockState.DockTop || state == DockState.DockBottom || state == DockState.DockLeft ||
- state == DockState.DockRight || state == DockState.Document)
- return true;
- else
- return false;
- }
-
- public static bool IsValidRestoreState(DockState state)
- {
- if (state == DockState.DockLeft || state == DockState.DockRight || state == DockState.DockTop ||
- state == DockState.DockBottom || state == DockState.Document)
- return true;
- else
- return false;
- }
-
- public static DockState ToggleAutoHideState(DockState state)
- {
- if (state == DockState.DockLeft)
- return DockState.DockLeftAutoHide;
- else if (state == DockState.DockRight)
- return DockState.DockRightAutoHide;
- else if (state == DockState.DockTop)
- return DockState.DockTopAutoHide;
- else if (state == DockState.DockBottom)
- return DockState.DockBottomAutoHide;
- else if (state == DockState.DockLeftAutoHide)
- return DockState.DockLeft;
- else if (state == DockState.DockRightAutoHide)
- return DockState.DockRight;
- else if (state == DockState.DockTopAutoHide)
- return DockState.DockTop;
- else if (state == DockState.DockBottomAutoHide)
- return DockState.DockBottom;
- else
- return state;
- }
- }
-}
+using System;
+using System.Drawing;
+using System.Windows.Forms;
+using WeifenLuo.WinFormsUI.Docking;
+
+namespace DockSample.Customization
+{
+ internal class DockHelper
+ {
+ public static bool IsDockStateAutoHide(DockState dockState)
+ {
+ if (dockState == DockState.DockLeftAutoHide ||
+ dockState == DockState.DockRightAutoHide ||
+ dockState == DockState.DockTopAutoHide ||
+ dockState == DockState.DockBottomAutoHide)
+ return true;
+ else
+ return false;
+ }
+
+ public static bool IsDockStateDocked(DockState dockState)
+ {
+ return (dockState == DockState.DockLeft ||
+ dockState == DockState.DockRight ||
+ dockState == DockState.DockTop ||
+ dockState == DockState.DockBottom);
+ }
+
+ public static bool IsDockBottom(DockState dockState)
+ {
+ return (dockState == DockState.DockBottom || dockState == DockState.DockBottomAutoHide) ? true : false;
+ }
+
+ public static bool IsDockLeft(DockState dockState)
+ {
+ return (dockState == DockState.DockLeft || dockState == DockState.DockLeftAutoHide) ? true : false;
+ }
+
+ public static bool IsDockRight(DockState dockState)
+ {
+ return (dockState == DockState.DockRight || dockState == DockState.DockRightAutoHide) ? true : false;
+ }
+
+ public static bool IsDockTop(DockState dockState)
+ {
+ return (dockState == DockState.DockTop || dockState == DockState.DockTopAutoHide ) ? true : false;
+ }
+
+ public static bool IsDockStateValid(DockState dockState, DockAreas dockableAreas)
+ {
+ if (((dockableAreas & DockAreas.Float) == 0) &&
+ (dockState == DockState.Float))
+ return false;
+ else if (((dockableAreas & DockAreas.Document) == 0) &&
+ (dockState == DockState.Document))
+ return false;
+ else if (((dockableAreas & DockAreas.DockLeft) == 0) &&
+ (dockState == DockState.DockLeft || dockState == DockState.DockLeftAutoHide))
+ return false;
+ else if (((dockableAreas & DockAreas.DockRight) == 0) &&
+ (dockState == DockState.DockRight || dockState == DockState.DockRightAutoHide))
+ return false;
+ else if (((dockableAreas & DockAreas.DockTop) == 0) &&
+ (dockState == DockState.DockTop || dockState == DockState.DockTopAutoHide))
+ return false;
+ else if (((dockableAreas & DockAreas.DockBottom) == 0) &&
+ (dockState == DockState.DockBottom || dockState == DockState.DockBottomAutoHide))
+ return false;
+ else
+ return true;
+ }
+
+ public static bool IsDockWindowState(DockState state)
+ {
+ if (state == DockState.DockTop || state == DockState.DockBottom || state == DockState.DockLeft ||
+ state == DockState.DockRight || state == DockState.Document)
+ return true;
+ else
+ return false;
+ }
+
+ public static bool IsValidRestoreState(DockState state)
+ {
+ if (state == DockState.DockLeft || state == DockState.DockRight || state == DockState.DockTop ||
+ state == DockState.DockBottom || state == DockState.Document)
+ return true;
+ else
+ return false;
+ }
+
+ public static DockState ToggleAutoHideState(DockState state)
+ {
+ if (state == DockState.DockLeft)
+ return DockState.DockLeftAutoHide;
+ else if (state == DockState.DockRight)
+ return DockState.DockRightAutoHide;
+ else if (state == DockState.DockTop)
+ return DockState.DockTopAutoHide;
+ else if (state == DockState.DockBottom)
+ return DockState.DockBottomAutoHide;
+ else if (state == DockState.DockLeftAutoHide)
+ return DockState.DockLeft;
+ else if (state == DockState.DockRightAutoHide)
+ return DockState.DockRight;
+ else if (state == DockState.DockTopAutoHide)
+ return DockState.DockTop;
+ else if (state == DockState.DockBottomAutoHide)
+ return DockState.DockBottom;
+ else
+ return state;
+ }
+ }
+}
View
110 DockSample/Customization/Extender.cs
@@ -1,55 +1,55 @@
-using System;
-using System.Drawing;
-using WeifenLuo.WinFormsUI.Docking;
-
-namespace DockSample.Customization
-{
- public class Extender
- {
- public enum Schema
- {
- VS2005,
- VS2003
- }
-
- private class VS2003DockPaneStripFactory : DockPanelExtender.IDockPaneStripFactory
- {
- public DockPaneStripBase CreateDockPaneStrip(DockPane pane)
- {
- return new VS2003DockPaneStrip(pane);
- }
- }
-
- private class VS2003AutoHideStripFactory : DockPanelExtender.IAutoHideStripFactory
- {
- public AutoHideStripBase CreateAutoHideStrip(DockPanel panel)
- {
- return new VS2003AutoHideStrip(panel);
- }
- }
-
- private class VS2003DockPaneCaptionFactory : DockPanelExtender.IDockPaneCaptionFactory
- {
- public DockPaneCaptionBase CreateDockPaneCaption(DockPane pane)
- {
- return new VS2003DockPaneCaption(pane);
- }
- }
-
- public static void SetSchema(DockPanel dockPanel, Extender.Schema schema)
- {
- if (schema == Extender.Schema.VS2005)
- {
- dockPanel.Extender.AutoHideStripFactory = null;
- dockPanel.Extender.DockPaneCaptionFactory = null;
- dockPanel.Extender.DockPaneStripFactory = null;
- }
- else if (schema == Extender.Schema.VS2003)
- {
- dockPanel.Extender.DockPaneCaptionFactory = new VS2003DockPaneCaptionFactory();
- dockPanel.Extender.AutoHideStripFactory = new VS2003AutoHideStripFactory();
- dockPanel.Extender.DockPaneStripFactory = new VS2003DockPaneStripFactory();
- }
- }
- }
-}
+using System;
+using System.Drawing;
+using WeifenLuo.WinFormsUI.Docking;
+
+namespace DockSample.Customization
+{
+ public class Extender
+ {
+ public enum Schema
+ {
+ VS2005,
+ VS2003
+ }
+
+ private class VS2003DockPaneStripFactory : DockPanelExtender.IDockPaneStripFactory
+ {
+ public DockPaneStripBase CreateDockPaneStrip(DockPane pane)
+ {
+ return new VS2003DockPaneStrip(pane);
+ }
+ }
+
+ private class VS2003AutoHideStripFactory : DockPanelExtender.IAutoHideStripFactory
+ {
+ public AutoHideStripBase CreateAutoHideStrip(DockPanel panel)
+ {
+ return new VS2003AutoHideStrip(panel);
+ }
+ }
+
+ private class VS2003DockPaneCaptionFactory : DockPanelExtender.IDockPaneCaptionFactory
+ {
+ public DockPaneCaptionBase CreateDockPaneCaption(DockPane pane)
+ {
+ return new VS2003DockPaneCaption(pane);
+ }
+ }
+
+ public static void SetSchema(DockPanel dockPanel, Extender.Schema schema)
+ {
+ if (schema == Extender.Schema.VS2005)
+ {
+ dockPanel.Extender.AutoHideStripFactory = null;
+ dockPanel.Extender.DockPaneCaptionFactory = null;
+ dockPanel.Extender.DockPaneStripFactory = null;
+ }
+ else if (schema == Extender.Schema.VS2003)
+ {
+ dockPanel.Extender.DockPaneCaptionFactory = new VS2003DockPaneCaptionFactory();
+ dockPanel.Extender.AutoHideStripFactory = new VS2003AutoHideStripFactory();
+ dockPanel.Extender.DockPaneStripFactory = new VS2003DockPaneStripFactory();
+ }
+ }
+ }
+}
View
1,236 DockSample/Customization/InertButton.cs
@@ -1,619 +1,619 @@
-using System;
-using System.Drawing;
-using System.Drawing.Imaging;
-using System.Windows.Forms;
-using System.ComponentModel;
-
-namespace DockSample.Customization
-{
- internal class InertButton : Button
- {
- private enum RepeatClickStatus
- {
- Disabled,
- Started,
- Repeating,
- Stopped
- }
-
- private class RepeatClickEventArgs : EventArgs
- {
- private static RepeatClickEventArgs _empty;
-
- static RepeatClickEventArgs()
- {
- _empty = new RepeatClickEventArgs();
- }
-
- public new static RepeatClickEventArgs Empty
- {
- get { return _empty; }
- }
- }
-
- private IContainer components = new Container();
- private int m_borderWidth = 1;
- private bool m_mouseOver = false;
- private bool m_mouseCapture = false;
- private bool m_isPopup = false;
- private Image m_imageEnabled = null;
- private Image m_imageDisabled = null;
- private int m_imageIndexEnabled = -1;
- private int m_imageIndexDisabled = -1;
- private bool m_monochrom = true;
- private ToolTip m_toolTip = null;
- private string m_toolTipText = "";
- private Color m_borderColor = Color.Empty;
-
- public InertButton()
- {
- InternalConstruct(null, null);
- }
-
- public InertButton(Image imageEnabled)
- {
- InternalConstruct(imageEnabled, null);
- }
-
- public InertButton(Image imageEnabled, Image imageDisabled)
- {
- InternalConstruct(imageEnabled, imageDisabled);
- }
-
- private void InternalConstruct(Image imageEnabled, Image imageDisabled)
- {
- // Remember parameters
- ImageEnabled = imageEnabled;
- ImageDisabled = imageDisabled;
-
- // Prevent drawing flicker by blitting from memory in WM_PAINT
- SetStyle(ControlStyles.ResizeRedraw, true);
- SetStyle(ControlStyles.UserPaint, true);
- SetStyle(ControlStyles.AllPaintingInWmPaint, true);
-
- // Prevent base class from trying to generate double click events and
- // so testing clicks against the double click time and rectangle. Getting
- // rid of this allows the user to press then release button very quickly.
- //SetStyle(ControlStyles.StandardDoubleClick, false);
-
- // Should not be allowed to select this control
- SetStyle(ControlStyles.Selectable, false);
-
- m_timer = new Timer();
- m_timer.Enabled = false;
- m_timer.Tick += new EventHandler(Timer_Tick);
- }
-
- protected override void Dispose(bool disposing)
- {
- if (disposing)
- {
- if (components != null)
- components.Dispose();
- }
- base.Dispose(disposing);
- }
-
- public Color BorderColor
- {
- get { return m_borderColor; }
- set
- {
- if (m_borderColor != value)
- {
- m_borderColor = value;
- Invalidate();
- }
- }
- }
-
- private bool ShouldSerializeBorderColor()
- {
- return (m_borderColor != Color.Empty);
- }
-
- public int BorderWidth
- {
- get { return m_borderWidth; }
-
- set
- {
- if (value < 1)
- value = 1;
- if (m_borderWidth != value)
- {
- m_borderWidth = value;
- Invalidate();
- }
- }
- }
-
- public Image ImageEnabled
- {
- get
- {
- if (m_imageEnabled != null)
- return m_imageEnabled;
-
- try
- {
- if (ImageList == null || ImageIndexEnabled == -1)
- return null;
- else
- return ImageList.Images[m_imageIndexEnabled];
- }
- catch
- {
- return null;
- }
- }
-
- set
- {
- if (m_imageEnabled != value)
- {
- m_imageEnabled = value;
- Invalidate();
- }
- }
- }
-
- private bool ShouldSerializeImageEnabled()
- {
- return (m_imageEnabled != null);
- }
-
- public Image ImageDisabled
- {
- get
- {
- if (m_imageDisabled != null)
- return m_imageDisabled;
-
- try
- {
- if (ImageList == null || ImageIndexDisabled == -1)
- return null;
- else
- return ImageList.Images[m_imageIndexDisabled];
- }
- catch
- {
- return null;
- }
- }
-
- set
- {
- if (m_imageDisabled != value)
- {
- m_imageDisabled = value;
- Invalidate();
- }
- }
- }
-
- public int ImageIndexEnabled
- {
- get { return m_imageIndexEnabled; }
- set
- {
- if (m_imageIndexEnabled != value)
- {
- m_imageIndexEnabled = value;
- Invalidate();
- }
- }
- }
-
- public int ImageIndexDisabled
- {
- get { return m_imageIndexDisabled; }
- set
- {
- if (m_imageIndexDisabled != value)
- {
- m_imageIndexDisabled = value;
- Invalidate();
- }
- }
- }
-
- public bool IsPopup
- {
- get { return m_isPopup; }
-
- set
- {
- if (m_isPopup != value)
- {
- m_isPopup = value;
- Invalidate();
- }
- }
- }
-
- public bool Monochrome
- {
- get { return m_monochrom; }
- set
- {
- if (value != m_monochrom)
- {
- m_monochrom = value;
- Invalidate();
- }
- }
- }
-
- public bool RepeatClick
- {
- get { return (ClickStatus != RepeatClickStatus.Disabled); }
- set { ClickStatus = RepeatClickStatus.Stopped; }
- }
-
- private RepeatClickStatus m_clickStatus = RepeatClickStatus.Disabled;
- private RepeatClickStatus ClickStatus
- {
- get { return m_clickStatus; }
- set
- {
- if (m_clickStatus == value)
- return;
-
- m_clickStatus = value;
- if (ClickStatus == RepeatClickStatus.Started)
- {
- Timer.Interval = RepeatClickDelay;
- Timer.Enabled = true;
- }
- else if (ClickStatus == RepeatClickStatus.Repeating)
- Timer.Interval = RepeatClickInterval;
- else
- Timer.Enabled = false;
- }
- }
-
- private int m_repeatClickDelay = 500;
- public int RepeatClickDelay
- {
- get { return m_repeatClickDelay; }
- set { m_repeatClickDelay = value; }
- }
-
- private int m_repeatClickInterval = 100;
- public int RepeatClickInterval
- {
- get { return m_repeatClickInterval; }
- set { m_repeatClickInterval = value; }
- }
-
- private Timer m_timer;
- private Timer Timer
- {
- get { return m_timer; }
- }
-
- public string ToolTipText
- {
- get { return m_toolTipText; }
- set
- {
- if (m_toolTipText != value)
- {
- if (m_toolTip == null)
- m_toolTip = new ToolTip(this.components);
- m_toolTipText = value;
- m_toolTip.SetToolTip(this, value);
- }
- }
- }
-
- private void Timer_Tick(object sender, EventArgs e)
- {
- if (m_mouseCapture && m_mouseOver)
- OnClick(RepeatClickEventArgs.Empty);
- if (ClickStatus == RepeatClickStatus.Started)
- ClickStatus = RepeatClickStatus.Repeating;
- }
-
- /// <exclude/>
- protected override void OnMouseDown(MouseEventArgs e)
- {
- base.OnMouseDown(e);
-
- if (e.Button != MouseButtons.Left)
- return;
-
- if (m_mouseCapture == false || m_mouseOver == false)
- {
- m_mouseCapture = true;
- m_mouseOver = true;
-
- //Redraw to show button state
- Invalidate();
- }
-
- if (RepeatClick)
- {
- OnClick(RepeatClickEventArgs.Empty);
- ClickStatus = RepeatClickStatus.Started;
- }
- }
-
- /// <exclude/>
- protected override void OnClick(EventArgs e)
- {
- if (RepeatClick && !(e is RepeatClickEventArgs))
- return;
-
- base.OnClick (e);
- }
-
- /// <exclude/>
- protected override void OnMouseUp(MouseEventArgs e)
- {
- base.OnMouseUp(e);
-
- if (e.Button != MouseButtons.Left)
- return;
-
- if (m_mouseOver == true || m_mouseCapture == true)
- {
- m_mouseOver = false;
- m_mouseCapture = false;
-
- // Redraw to show button state
- Invalidate();
- }
-
- if (RepeatClick)
- ClickStatus = RepeatClickStatus.Stopped;
- }
-
- /// <exclude/>
- protected override void OnMouseMove(MouseEventArgs e)
- {
- base.OnMouseMove(e);
-
- // Is mouse point inside our client rectangle
- bool over = this.ClientRectangle.Contains(new Point(e.X, e.Y));
-
- // If entering the button area or leaving the button area...
- if (over != m_mouseOver)
- {
- // Update state
- m_mouseOver = over;
-
- // Redraw to show button state
- Invalidate();
- }
- }
-
- /// <exclude/>
- protected override void OnMouseEnter(EventArgs e)
- {
- // Update state to reflect mouse over the button area
- if (!m_mouseOver)
- {
- m_mouseOver = true;
-
- // Redraw to show button state
- Invalidate();
- }
-
- base.OnMouseEnter(e);
- }
-
- /// <exclude/>
- protected override void OnMouseLeave(EventArgs e)
- {
- // Update state to reflect mouse not over the button area
- if (m_mouseOver)
- {
- m_mouseOver = false;
-
- // Redraw to show button state
- Invalidate();
- }
-
- base.OnMouseLeave(e);
- }
-
- /// <exclude/>
- protected override void OnPaint(PaintEventArgs e)
- {
- base.OnPaint(e);
- DrawBackground(e.Graphics);
- DrawImage(e.Graphics);
- DrawText(e.Graphics);
- DrawBorder(e.Graphics);
- }
-
- private void DrawBackground(Graphics g)
- {
- using (SolidBrush brush = new SolidBrush(BackColor))
- {
- g.FillRectangle(brush, ClientRectangle);
- }
- }
-
- private void DrawImage(Graphics g)
- {
- Image image = this.Enabled ? ImageEnabled : ((ImageDisabled != null) ? ImageDisabled : ImageEnabled);
- ImageAttributes imageAttr = null;
-
- if (null == image)
- return;
-
- if (m_monochrom)
- {
- imageAttr = new ImageAttributes();
-
- // transform the monochrom image
- // white -> BackColor
- // black -> ForeColor
- ColorMap[] colorMap = new ColorMap[2];
- colorMap[0] = new ColorMap();
- colorMap[0].OldColor = Color.White;
- colorMap[0].NewColor = this.BackColor;
- colorMap[1] = new ColorMap();
- colorMap[1].OldColor = Color.Black;
- colorMap[1].NewColor = this.ForeColor;
- imageAttr.SetRemapTable(colorMap);
- }
-
- Rectangle rect = new Rectangle(0, 0, image.Width, image.Height);
-
- if ((!Enabled) && (null == ImageDisabled))
- {
- using (Bitmap bitmapMono = new Bitmap(image, ClientRectangle.Size))
- {
- if (imageAttr != null)
- {
- using (Graphics gMono = Graphics.FromImage(bitmapMono))
- {
- gMono.DrawImage(image, new Point[3] { new Point(0, 0), new Point(image.Width - 1, 0), new Point(0, image.Height - 1) }, rect, GraphicsUnit.Pixel, imageAttr);
- }
- }
- ControlPaint.DrawImageDisabled(g, bitmapMono, 0, 0, this.BackColor);
- }
- }
- else
- {
- // Three points provided are upper-left, upper-right and
- // lower-left of the destination parallelogram.
- Point[] pts = new Point[3];
- pts[0].X = (Enabled && m_mouseOver && m_mouseCapture) ? 1 : 0;
- pts[0].Y = (Enabled && m_mouseOver && m_mouseCapture) ? 1 : 0;
- pts[1].X = pts[0].X + ClientRectangle.Width;
- pts[1].Y = pts[0].Y;
- pts[2].X = pts[0].X;
- pts[2].Y = pts[1].Y + ClientRectangle.Height;
-
- if (imageAttr == null)
- g.DrawImage(image, pts, rect, GraphicsUnit.Pixel);
- else
- g.DrawImage(image, pts, rect, GraphicsUnit.Pixel, imageAttr);
- }
- }
-
- private void DrawText(Graphics g)
- {
- if (Text == string.Empty)
- return;
-
- Rectangle rect = ClientRectangle;
-
- rect.X += BorderWidth;
- rect.Y += BorderWidth;
- rect.Width -= 2 * BorderWidth;
- rect.Height -= 2 * BorderWidth;
-
- StringFormat stringFormat = new StringFormat();
-
- if (TextAlign == ContentAlignment.TopLeft)
- {
- stringFormat.Alignment = StringAlignment.Near;
- stringFormat.LineAlignment = StringAlignment.Near;
- }
- else if (TextAlign == ContentAlignment.TopCenter)
- {
- stringFormat.Alignment = StringAlignment.Center;
- stringFormat.LineAlignment = StringAlignment.Near;
- }
- else if (TextAlign == ContentAlignment.TopRight)
- {
- stringFormat.Alignment = StringAlignment.Far;
- stringFormat.LineAlignment = StringAlignment.Near;
- }
- else if (TextAlign == ContentAlignment.MiddleLeft)
- {
- stringFormat.Alignment = StringAlignment.Near;
- stringFormat.LineAlignment = StringAlignment.Center;
- }
- else if (TextAlign == ContentAlignment.MiddleCenter)
- {
- stringFormat.Alignment = StringAlignment.Center;
- stringFormat.LineAlignment = StringAlignment.Center;
- }
- else if (TextAlign == ContentAlignment.MiddleRight)
- {
- stringFormat.Alignment = StringAlignment.Far;
- stringFormat.LineAlignment = StringAlignment.Center;
- }
- else if (TextAlign == ContentAlignment.BottomLeft)
- {
- stringFormat.Alignment = StringAlignment.Near;
- stringFormat.LineAlignment = StringAlignment.Far;
- }
- else if (TextAlign == ContentAlignment.BottomCenter)
- {
- stringFormat.Alignment = StringAlignment.Center;
- stringFormat.LineAlignment = StringAlignment.Far;
- }
- else if (TextAlign == ContentAlignment.BottomRight)
- {
- stringFormat.Alignment = StringAlignment.Far;
- stringFormat.LineAlignment = StringAlignment.Far;
- }
-
- using (Brush brush = new SolidBrush(ForeColor))
- {
- g.DrawString(Text, Font, brush, rect, stringFormat);
- }
- }
-
- private void DrawBorder(Graphics g)
- {
- ButtonBorderStyle bs;
-
- // Decide on the type of border to draw around image
- if (!this.Enabled)
- bs = IsPopup ? ButtonBorderStyle.Outset : ButtonBorderStyle.Solid;
- else if (m_mouseOver && m_mouseCapture)
- bs = ButtonBorderStyle.Inset;
- else if (IsPopup || m_mouseOver)
- bs = ButtonBorderStyle.Outset;
- else
- bs = ButtonBorderStyle.Solid;
-
- Color colorLeftTop;
- Color colorRightBottom;
- if (bs == ButtonBorderStyle.Solid)
- {
- colorLeftTop = this.BackColor;
- colorRightBottom = this.BackColor;
- }
- else if (bs == ButtonBorderStyle.Outset)
- {
- colorLeftTop = m_borderColor.IsEmpty ? this.BackColor : m_borderColor;
- colorRightBottom = this.BackColor;
- }
- else
- {
- colorLeftTop = this.BackColor;
- colorRightBottom = m_borderColor.IsEmpty ? this.BackColor : m_borderColor;
- }
- ControlPaint.DrawBorder(g, this.ClientRectangle,
- colorLeftTop, m_borderWidth, bs,
- colorLeftTop, m_borderWidth, bs,
- colorRightBottom, m_borderWidth, bs,
- colorRightBottom, m_borderWidth, bs);
- }
-
- /// <exclude/>
- protected override void OnEnabledChanged(EventArgs e)
- {
- base.OnEnabledChanged(e);
- if (Enabled == false)
- {
- m_mouseOver = false;
- m_mouseCapture = false;
- if (RepeatClick && ClickStatus != RepeatClickStatus.Stopped)
- ClickStatus = RepeatClickStatus.Stopped;
- }
- Invalidate();
- }
- }
+using System;
+using System.Drawing;
+using System.Drawing.Imaging;
+using System.Windows.Forms;
+using System.ComponentModel;
+
+namespace DockSample.Customization
+{
+ internal class InertButton : Button
+ {
+ private enum RepeatClickStatus
+ {
+ Disabled,
+ Started,
+ Repeating,
+ Stopped
+ }
+
+ private class RepeatClickEventArgs : EventArgs
+ {
+ private static RepeatClickEventArgs _empty;
+
+ static RepeatClickEventArgs()
+ {
+ _empty = new RepeatClickEventArgs();
+ }
+
+ public new static RepeatClickEventArgs Empty
+ {
+ get { return _empty; }
+ }
+ }
+
+ private IContainer components = new Container();
+ private int m_borderWidth = 1;
+ private bool m_mouseOver = false;
+ private bool m_mouseCapture = false;
+ private bool m_isPopup = false;
+ private Image m_imageEnabled = null;
+ private Image m_imageDisabled = null;
+ private int m_imageIndexEnabled = -1;
+ private int m_imageIndexDisabled = -1;
+ private bool m_monochrom = true;
+ private ToolTip m_toolTip = null;
+ private string m_toolTipText = "";
+ private Color m_borderColor = Color.Empty;
+
+ public InertButton()
+ {
+ InternalConstruct(null, null);
+ }
+
+ public InertButton(Image imageEnabled)
+ {
+ InternalConstruct(imageEnabled, null);
+ }
+
+ public InertButton(Image imageEnabled, Image imageDisabled)
+ {
+ InternalConstruct(imageEnabled, imageDisabled);
+ }
+
+ private void InternalConstruct(Image imageEnabled, Image imageDisabled)
+ {
+ // Remember parameters
+ ImageEnabled = imageEnabled;
+ ImageDisabled = imageDisabled;
+
+ // Prevent drawing flicker by blitting from memory in WM_PAINT
+ SetStyle(ControlStyles.ResizeRedraw, true);
+ SetStyle(ControlStyles.UserPaint, true);
+ SetStyle(ControlStyles.AllPaintingInWmPaint, true);
+
+ // Prevent base class from trying to generate double click events and
+ // so testing clicks against the double click time and rectangle. Getting
+ // rid of this allows the user to press then release button very quickly.
+ //SetStyle(ControlStyles.StandardDoubleClick, false);
+
+ // Should not be allowed to select this control
+ SetStyle(ControlStyles.Selectable, false);
+
+ m_timer = new Timer();
+ m_timer.Enabled = false;
+ m_timer.Tick += new EventHandler(Timer_Tick);
+ }
+
+ protected override void Dispose(bool disposing)
+ {
+ if (disposing)
+ {
+ if (components != null)
+ components.Dispose();
+ }
+ base.Dispose(disposing);
+ }
+
+ public Color BorderColor
+ {
+ get { return m_borderColor; }
+ set
+ {
+ if (m_borderColor != value)
+ {
+ m_borderColor = value;
+ Invalidate();
+ }
+ }
+ }
+
+ private bool ShouldSerializeBorderColor()
+ {
+ return (m_borderColor != Color.Empty);
+ }
+
+ public int BorderWidth
+ {
+ get { return m_borderWidth; }
+
+ set
+ {
+ if (value < 1)
+ value = 1;
+ if (m_borderWidth != value)
+ {
+ m_borderWidth = value;
+ Invalidate();
+ }
+ }
+ }
+
+ public Image ImageEnabled
+ {
+ get
+ {
+ if (m_imageEnabled != null)
+ return m_imageEnabled;
+
+ try
+ {
+ if (ImageList == null || ImageIndexEnabled == -1)
+ return null;
+ else
+ return ImageList.Images[m_imageIndexEnabled];
+ }
+ catch
+ {
+ return null;
+ }
+ }
+
+ set
+ {
+ if (m_imageEnabled != value)
+ {
+ m_imageEnabled = value;
+ Invalidate();
+ }
+ }
+ }
+
+ private bool ShouldSerializeImageEnabled()
+ {
+ return (m_imageEnabled != null);
+ }
+
+ public Image ImageDisabled
+ {
+ get
+ {
+ if (m_imageDisabled != null)
+ return m_imageDisabled;
+
+ try
+ {
+ if (ImageList == null || ImageIndexDisabled == -1)
+ return null;
+ else
+ return ImageList.Images[m_imageIndexDisabled];
+ }
+ catch
+ {
+ return null;
+ }
+ }
+
+ set
+ {
+ if (m_imageDisabled != value)
+ {
+ m_imageDisabled = value;
+ Invalidate();
+ }
+ }
+ }
+
+ public int ImageIndexEnabled
+ {
+ get { return m_imageIndexEnabled; }
+ set
+ {
+ if (m_imageIndexEnabled != value)
+ {
+ m_imageIndexEnabled = value;
+ Invalidate();
+ }
+ }
+ }
+
+ public int ImageIndexDisabled
+ {
+ get { return m_imageIndexDisabled; }
+ set
+ {
+ if (m_imageIndexDisabled != value)
+ {
+ m_imageIndexDisabled = value;
+ Invalidate();
+ }
+ }
+ }
+
+ public bool IsPopup
+ {
+ get { return m_isPopup; }
+
+ set
+ {
+ if (m_isPopup != value)
+ {
+ m_isPopup = value;
+ Invalidate();
+ }
+ }
+ }
+
+ public bool Monochrome
+ {
+ get { return m_monochrom; }
+ set
+ {
+ if (value != m_monochrom)
+ {
+ m_monochrom = value;
+ Invalidate();
+ }
+ }
+ }
+
+ public bool RepeatClick
+ {
+ get { return (ClickStatus != RepeatClickStatus.Disabled); }
+ set { ClickStatus = RepeatClickStatus.Stopped; }
+ }
+
+ private RepeatClickStatus m_clickStatus = RepeatClickStatus.Disabled;
+ private RepeatClickStatus ClickStatus
+ {
+ get { return m_clickStatus; }
+ set
+ {
+ if (m_clickStatus == value)
+ return;
+
+ m_clickStatus = value;
+ if (ClickStatus == RepeatClickStatus.Started)
+ {
+ Timer.Interval = RepeatClickDelay;
+ Timer.Enabled = true;
+ }
+ else if (ClickStatus == RepeatClickStatus.Repeating)
+ Timer.Interval = RepeatClickInterval;
+ else
+ Timer.Enabled = false;
+ }
+ }
+
+ private int m_repeatClickDelay = 500;
+ public int RepeatClickDelay
+ {
+ get { return m_repeatClickDelay; }
+ set { m_repeatClickDelay = value; }
+ }
+
+ private int m_repeatClickInterval = 100;
+ public int RepeatClickInterval
+ {
+ get { return m_repeatClickInterval; }
+ set { m_repeatClickInterval = value; }
+ }
+
+ private Timer m_timer;
+ private Timer Timer
+ {
+ get { return m_timer; }
+ }
+
+ public string ToolTipText
+ {
+ get { return m_toolTipText; }
+ set
+ {
+ if (m_toolTipText != value)
+ {
+ if (m_toolTip == null)
+ m_toolTip = new ToolTip(this.components);
+ m_toolTipText = value;
+ m_toolTip.SetToolTip(this, value);
+ }
+ }
+ }
+
+ private void Timer_Tick(object sender, EventArgs e)
+ {
+ if (m_mouseCapture && m_mouseOver)
+ OnClick(RepeatClickEventArgs.Empty);
+ if (ClickStatus == RepeatClickStatus.Started)
+ ClickStatus = RepeatClickStatus.Repeating;
+ }
+
+ /// <exclude/>
+ protected override void OnMouseDown(MouseEventArgs e)
+ {
+ base.OnMouseDown(e);
+
+ if (e.Button != MouseButtons.Left)
+ return;
+
+ if (m_mouseCapture == false || m_mouseOver == false)
+ {
+ m_mouseCapture = true;
+ m_mouseOver = true;
+
+ //Redraw to show button state
+ Invalidate();
+ }
+
+ if (RepeatClick)
+ {
+ OnClick(RepeatClickEventArgs.Empty);
+ ClickStatus = RepeatClickStatus.Started;
+ }
+ }
+
+ /// <exclude/>
+ protected override void OnClick(EventArgs e)
+ {
+ if (RepeatClick && !(e is RepeatClickEventArgs))
+ return;
+
+ base.OnClick (e);
+ }
+
+ /// <exclude/>
+ protected override void OnMouseUp(MouseEventArgs e)
+ {
+ base.OnMouseUp(e);
+
+ if (e.Button != MouseButtons.Left)
+ return;
+
+ if (m_mouseOver == true || m_mouseCapture == true)
+ {
+ m_mouseOver = false;
+ m_mouseCapture = false;
+
+ // Redraw to show button state
+ Invalidate();
+ }
+
+ if (RepeatClick)
+ ClickStatus = RepeatClickStatus.Stopped;
+ }
+
+ /// <exclude/>
+ protected override void OnMouseMove(MouseEventArgs e)
+ {
+ base.OnMouseMove(e);
+
+ // Is mouse point inside our client rectangle
+ bool over = this.ClientRectangle.Contains(new Point(e.X, e.Y));
+
+ // If entering the button area or leaving the button area...
+ if (over != m_mouseOver)
+ {
+ // Update state
+ m_mouseOver = over;
+
+ // Redraw to show button state
+ Invalidate();
+ }
+ }
+
+ /// <exclude/>
+ protected override void OnMouseEnter(EventArgs e)
+ {
+ // Update state to reflect mouse over the button area
+ if (!m_mouseOver)
+ {
+ m_mouseOver = true;
+
+ // Redraw to show button state
+ Invalidate();
+ }
+
+ base.OnMouseEnter(e);
+ }
+
+ /// <exclude/>
+ protected override void OnMouseLeave(EventArgs e)
+ {
+ // Update state to reflect mouse not over the button area
+ if (m_mouseOver)
+ {
+ m_mouseOver = false;
+
+ // Redraw to show button state
+ Invalidate();
+ }
+
+ base.OnMouseLeave(e);
+ }
+
+ /// <exclude/>
+ protected override void OnPaint(PaintEventArgs e)
+ {
+ base.OnPaint(e);
+ DrawBackground(e.Graphics);
+ DrawImage(e.Graphics);
+ DrawText(e.Graphics);
+ DrawBorder(e.Graphics);
+ }
+
+ private void DrawBackground(Graphics g)
+ {
+ using (SolidBrush brush = new SolidBrush(BackColor))
+ {
+ g.FillRectangle(brush, ClientRectangle);
+ }
+ }
+
+ private void DrawImage(Graphics g)
+ {
+ Image image = this.Enabled ? ImageEnabled : ((ImageDisabled != null) ? ImageDisabled : ImageEnabled);
+ ImageAttributes imageAttr = null;
+
+ if (null == image)
+ return;
+
+ if (m_monochrom)
+ {
+ imageAttr = new ImageAttributes();
+
+ // transform the monochrom image
+ // white -> BackColor
+ // black -> ForeColor
+ ColorMap[] colorMap = new ColorMap[2];
+ colorMap[0] = new ColorMap();
+ colorMap[0].OldColor = Color.White;
+ colorMap[0].NewColor = this.BackColor;
+ colorMap[1] = new ColorMap();
+ colorMap[1].OldColor = Color.Black;
+ colorMap[1].NewColor = this.ForeColor;
+ imageAttr.SetRemapTable(colorMap);
+ }
+
+ Rectangle rect = new Rectangle(0, 0, image.Width, image.Height);
+
+ if ((!Enabled) && (null == ImageDisabled))
+ {
+ using (Bitmap bitmapMono = new Bitmap(image, ClientRectangle.Size))
+ {
+ if (imageAttr != null)
+ {
+ using (Graphics gMono = Graphics.FromImage(bitmapMono))
+ {
+ gMono.DrawImage(image, new Point[3] { new Point(0, 0), new Point(image.Width - 1, 0), new Point(0, image.Height - 1) }, rect, GraphicsUnit.Pixel, imageAttr);
+ }
+ }
+ ControlPaint.DrawImageDisabled(g, bitmapMono, 0, 0, this.BackColor);
+ }
+ }
+ else
+ {
+ // Three points provided are upper-left, upper-right and
+ // lower-left of the destination parallelogram.
+ Point[] pts = new Point[3];
+ pts[0].X = (Enabled && m_mouseOver && m_mouseCapture) ? 1 : 0;
+ pts[0].Y = (Enabled && m_mouseOver && m_mouseCapture) ? 1 : 0;
+ pts[1].X = pts[0].X + ClientRectangle.Width;
+ pts[1].Y = pts[0].Y;
+ pts[2].X = pts[0].X;
+ pts[2].Y = pts[1].Y + ClientRectangle.Height;
+
+ if (imageAttr == null)
+ g.DrawImage(image, pts, rect, GraphicsUnit.Pixel);
+ else
+ g.DrawImage(image, pts, rect, GraphicsUnit.Pixel, imageAttr);
+ }
+ }
+
+ private void DrawText(Graphics g)
+ {
+ if (Text == string.Empty)
+ return;
+
+ Rectangle rect = ClientRectangle;
+
+ rect.X += BorderWidth;
+ rect.Y += BorderWidth;
+ rect.Width -= 2 * BorderWidth;
+ rect.Height -= 2 * BorderWidth;
+
+ StringFormat stringFormat = new StringFormat();
+
+ if (TextAlign == ContentAlignment.TopLeft)
+ {
+ stringFormat.Alignment = StringAlignment.Near;
+ stringFormat.LineAlignment = StringAlignment.Near;
+ }
+ else if (TextAlign == ContentAlignment.TopCenter)
+ {
+ stringFormat.Alignment = StringAlignment.Center;
+ stringFormat.LineAlignment = StringAlignment.Near;
+ }
+ else if (TextAlign == ContentAlignment.TopRight)
+ {
+ stringFormat.Alignment = StringAlignment.Far;
+ stringFormat.LineAlignment = StringAlignment.Near;
+ }
+ else if (TextAlign == ContentAlignment.MiddleLeft)
+ {
+ stringFormat.Alignment = StringAlignment.Near;
+ stringFormat.LineAlignment = StringAlignment.Center;
+ }
+ else if (TextAlign == ContentAlignment.MiddleCenter)
+ {
+ stringFormat.Alignment = StringAlignment.Center;
+ stringFormat.LineAlignment = StringAlignment.Center;
+ }
+ else if (TextAlign == ContentAlignment.MiddleRight)
+ {
+ stringFormat.Alignment = StringAlignment.Far;
+ stringFormat.LineAlignment = StringAlignment.Center;
+ }
+ else if (TextAlign == ContentAlignment.BottomLeft)
+ {
+ stringFormat.Alignment = StringAlignment.Near;
+ stringFormat.LineAlignment = StringAlignment.Far;
+ }
+ else if (TextAlign == ContentAlignment.BottomCenter)
+ {
+ stringFormat.Alignment = StringAlignment.Center;
+ stringFormat.LineAlignment = StringAlignment.Far;
+ }
+ else if (TextAlign == ContentAlignment.BottomRight)
+ {
+ stringFormat.Alignment = StringAlignment.Far;
+ stringFormat.LineAlignment = StringAlignment.Far;
+ }
+
+ using (Brush brush = new SolidBrush(ForeColor))
+ {
+ g.DrawString(Text, Font, brush, rect, stringFormat);
+ }
+ }
+
+ private void DrawBorder(Graphics g)
+ {
+ ButtonBorderStyle bs;
+
+ // Decide on the type of border to draw around image
+ if (!this.Enabled)
+ bs = IsPopup ? ButtonBorderStyle.Outset : ButtonBorderStyle.Solid;
+ else if (m_mouseOver && m_mouseCapture)
+ bs = ButtonBorderStyle.Inset;
+ else if (IsPopup || m_mouseOver)
+ bs = ButtonBorderStyle.Outset;
+ else
+ bs = ButtonBorderStyle.Solid;
+
+ Color colorLeftTop;
+ Color colorRightBottom;
+ if (bs == ButtonBorderStyle.Solid)
+ {
+ colorLeftTop = this.BackColor;
+ colorRightBottom = this.BackColor;
+ }
+ else if (bs == ButtonBorderStyle.Outset)
+ {
+ colorLeftTop = m_borderColor.IsEmpty ? this.BackColor : m_borderColor;
+ colorRightBottom = this.BackColor;
+ }
+ else
+ {
+ colorLeftTop = this.BackColor;
+ colorRightBottom = m_borderColor.IsEmpty ? this.BackColor : m_borderColor;
+ }
+ ControlPaint.DrawBorder(g, this.ClientRectangle,
+ colorLeftTop, m_borderWidth, bs,
+ colorLeftTop, m_borderWidth, bs,
+ colorRightBottom, m_borderWidth, bs,
+ colorRightBottom, m_borderWidth, bs);
+ }
+
+ /// <exclude/>
+ protected override void OnEnabledChanged(EventArgs e)
+ {
+ base.OnEnabledChanged(e);
+ if (Enabled == false)
+ {
+ m_mouseOver = false;
+ m_mouseCapture = false;
+ if (RepeatClick && ClickStatus != RepeatClickStatus.Stopped)
+ ClickStatus = RepeatClickStatus.Stopped;
+ }
+ Invalidate();
+ }
+ }
}
View
266 DockSample/Customization/Resources.Designer.cs
@@ -1,133 +1,133 @@
-//------------------------------------------------------------------------------
-// <auto-generated>
-// This code was generated by a tool.
-// Runtime Version:2.0.50727.4952
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated.
-// </auto-generated>
-//------------------------------------------------------------------------------
-
-namespace DockSample.Customization {
- using System;
-
-
- /// <summary>
- /// A strongly-typed resource class, for looking up localized strings, etc.
- /// </summary>
- // This class was auto-generated by the StronglyTypedResourceBuilder
- // class via a tool like ResGen or Visual Studio.
- // To add or remove a member, edit your .ResX file then rerun ResGen
- // with the /str option, or rebuild your VS project.
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "2.0.0.0")]
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
- internal class Resources {
-
- private static global::System.Resources.ResourceManager resourceMan;
-
- private static global::System.Globalization.CultureInfo resourceCulture;
-
- [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
- internal Resources() {
- }
-
- /// <summary>
- /// Returns the cached ResourceManager instance used by this class.
- /// </summary>
- [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
- internal static global::System.Resources.ResourceManager ResourceManager {
- get {
- if (object.ReferenceEquals(resourceMan, null)) {
- global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("DockSample.Customization.Resources", typeof(Resources).Assembly);
- resourceMan = temp;
- }
- return resourceMan;
- }
- }
-
- /// <summary>
- /// Overrides the current thread's CurrentUICulture property for all
- /// resource lookups using this strongly typed resource class.
- /// </summary>
- [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
- internal static global::System.Globalization.CultureInfo Culture {
- get {
- return resourceCulture;
- }
- set {
- resourceCulture = value;
- }
- }
-
- internal static System.Drawing.Bitmap DockPaneCaption_AutoHideNo {
- get {
- object obj = ResourceManager.GetObject("DockPaneCaption_AutoHideNo", resourceCulture);
- return ((System.Drawing.Bitmap)(obj));
- }
- }
-
- internal static System.Drawing.Bitmap DockPaneCaption_AutoHideYes {
- get {
- object obj = ResourceManager.GetObject("DockPaneCaption_AutoHideYes", resourceCulture);
- return ((System.Drawing.Bitmap)(obj));
- }
- }
-
- internal static System.Drawing.Bitmap DockPaneCaption_CloseDisabled {
- get {
- object obj = ResourceManager.GetObject("DockPaneCaption_CloseDisabled", resourceCulture);
- return ((System.Drawing.Bitmap)(obj));
- }
- }
-
- internal static System.Drawing.Bitmap DockPaneCaption_CloseEnabled {
- get {
- object obj = ResourceManager.GetObject("DockPaneCaption_CloseEnabled", resourceCulture);
- return ((System.Drawing.Bitmap)(obj));
- }
- }
-
- internal static System.Drawing.Bitmap DockPaneStrip_CloseDisabled {
- get {
- object obj = ResourceManager.GetObject("DockPaneStrip_CloseDisabled", resourceCulture);
- return ((System.Drawing.Bitmap)(obj));
- }
- }
-
- internal static System.Drawing.Bitmap DockPaneStrip_CloseEnabled {
- get {
- object obj = ResourceManager.GetObject("DockPaneStrip_CloseEnabled", resourceCulture);
- return ((System.Drawing.Bitmap)(obj));
- }
- }
-
- internal static System.Drawing.Bitmap DockPaneStrip_ScrollLeftDisabled {
- get {
- object obj = ResourceManager.GetObject("DockPaneStrip_ScrollLeftDisabled", resourceCulture);
- return ((System.Drawing.Bitmap)(obj));
- }
- }
-
- internal static System.Drawing.Bitmap DockPaneStrip_ScrollLeftEnabled {
- get {
- object obj = ResourceManager.GetObject("DockPaneStrip_ScrollLeftEnabled", resourceCulture);
- return ((System.Drawing.Bitmap)(obj));
- }
- }
-
- internal static System.Drawing.Bitmap DockPaneStrip_ScrollRightDisabled {
- get {
- object obj = ResourceManager.GetObject("DockPaneStrip_ScrollRightDisabled", resourceCulture);
- return ((System.Drawing.Bitmap)(obj));
- }
- }
-
- internal static System.Drawing.Bitmap DockPaneStrip_ScrollRightEnabled {
- get {
- object obj = ResourceManager.GetObject("DockPaneStrip_ScrollRightEnabled", resourceCulture);
- return ((System.Drawing.Bitmap)(obj));
- }
- }
- }
-}
+//------------------------------------------------------------------------------
+// <auto-generated>
+// This code was generated by a tool.
+// Runtime Version:2.0.50727.4952
+//
+// Changes to this file may cause incorrect behavior and will be lost if
+// the code is regenerated.
+// </auto-generated>
+//------------------------------------------------------------------------------
+
+namespace DockSample.Customization {
+ using System;
+
+
+ /// <summary>
+ /// A strongly-typed resource class, for looking up localized strings, etc.
+ /// </summary>
+ // This class was auto-generated by the StronglyTypedResourceBuilder
+ // class via a tool like ResGen or Visual Studio.
+ // To add or remove a member, edit your .ResX file then rerun ResGen
+ // with the /str option, or rebuild your VS project.
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "2.0.0.0")]
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
+ internal class Resources {
+
+ private static global::System.Resources.ResourceManager resourceMan;
+
+ private static global::System.Globalization.CultureInfo resourceCulture;
+
+ [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
+ internal Resources() {
+ }
+
+ /// <summary>
+ /// Returns the cached ResourceManager instance used by this class.
+ /// </summary>
+ [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
+ internal static global::System.Resources.ResourceManager ResourceManager {
+ get {
+ if (object.ReferenceEquals(resourceMan, null)) {
+ global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("DockSample.Customization.Resources", typeof(Resources).Assembly);
+ resourceMan = temp;
+ }
+ return resourceMan;
+ }
+ }
+
+ /// <summary>
+ /// Overrides the current thread's CurrentUICulture property for all
+ /// resource lookups using this strongly typed resource class.
+ /// </summary>
+ [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
+ internal static global::System.Globalization.CultureInfo Culture {
+ get {
+ return resourceCulture;
+ }
+ set {
+ resourceCulture = value;
+ }
+ }
+
+ internal static System.Drawing.Bitmap DockPaneCaption_AutoHideNo {
+ get {
+ object obj = ResourceManager.GetObject("DockPaneCaption_AutoHideNo", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+
+ internal static System.Drawing.Bitmap DockPaneCaption_AutoHideYes {
+ get {
+ object obj = ResourceManager.GetObject("DockPaneCaption_AutoHideYes", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+
+ internal static System.Drawing.Bitmap DockPaneCaption_CloseDisabled {
+ get {
+ object obj = ResourceManager.GetObject("DockPaneCaption_CloseDisabled", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+
+ internal static System.Drawing.Bitmap DockPaneCaption_CloseEnabled {
+ get {
+ object obj = ResourceManager.GetObject("DockPaneCaption_CloseEnabled", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+
+ internal static System.Drawing.Bitmap DockPaneStrip_CloseDisabled {
+ get {
+ object obj = ResourceManager.GetObject("DockPaneStrip_CloseDisabled", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+
+ internal static System.Drawing.Bitmap DockPaneStrip_CloseEnabled {
+ get {
+ object obj = ResourceManager.GetObject("DockPaneStrip_CloseEnabled", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+
+ internal static System.Drawing.Bitmap DockPaneStrip_ScrollLeftDisabled {
+ get {
+ object obj = ResourceManager.GetObject("DockPaneStrip_ScrollLeftDisabled", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+
+ internal static System.Drawing.Bitmap DockPaneStrip_ScrollLeftEnabled {
+ get {
+ object obj = ResourceManager.GetObject("DockPaneStrip_ScrollLeftEnabled", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+
+ internal static System.Drawing.Bitmap DockPaneStrip_ScrollRightDisabled {
+ get {
+ object obj = ResourceManager.GetObject("DockPaneStrip_ScrollRightDisabled", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+
+ internal static System.Drawing.Bitmap DockPaneStrip_ScrollRightEnabled {
+ get {
+ object obj = ResourceManager.GetObject("DockPaneStrip_ScrollRightEnabled", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+ }
+}
View
300 DockSample/Customization/Resources.resx
@@ -1,151 +1,151 @@
-<?xml version="1.0" encoding="utf-8"?>
-<root>
- <!--
- Microsoft ResX Schema
-
- Version 2.0
-
- The primary goals of this format is to allow a simple XML format
- that is mostly human readable. The generation and parsing of the
- various data types are done through the TypeConverter classes
- associated with the data types.
-
- Example:
-
- ... ado.net/XML headers & schema ...
- <resheader name="resmimetype">text/microsoft-resx</resheader>
- <resheader name="version">2.0</resheader>
- <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
- <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
- <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
- <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
- <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
- <value>[base64 mime encoded serialized .NET Framework object]</value>
- </data>
- <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
- <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
- <comment>This is a comment</comment>
- </data>
-
- There are any number of "resheader" rows that contain simple
- name/value pairs.
-
- Each data row contains a name, and value. The row also contains a
- type or mimetype. Type corresponds to a .NET class that support
- text/value conversion through the TypeConverter architecture.
- Classes that don't support this are serialized and stored with the
- mimetype set.
-
- The mimetype is used for serialized objects, and tells the
- ResXResourceReader how to depersist the object. This is currently not
- extensible. For a given mimetype the value must be set accordingly:
-
- Note - application/x-microsoft.net.object.binary.base64 is the format
- that the ResXResourceWriter will generate, however the reader can
- read any of the formats listed below.
-
- mimetype: application/x-microsoft.net.object.binary.base64
- value : The object must be serialized with
- : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
- : and then encoded with base64 encoding.
-
- mimetype: application/x-microsoft.net.object.soap.base64
- value : The object must be serialized with
- : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
- : and then encoded with base64 encoding.
-
- mimetype: application/x-microsoft.net.object.bytearray.base64
- value : The object must be serialized into a byte array
- : using a System.ComponentModel.TypeConverter
- : and then encoded with base64 encoding.
- -->
- <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
- <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
- <xsd:element name="root" msdata:IsDataSet="true">
- <xsd:complexType>
- <xsd:choice maxOccurs="unbounded">
- <xsd:element name="metadata">
- <xsd:complexType>
- <xsd:sequence>
- <xsd:element name="value