@ -0,0 +1,330 @@ |
|||
## Ignore Visual Studio temporary files, build results, and |
|||
## files generated by popular Visual Studio add-ons. |
|||
## |
|||
## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore |
|||
|
|||
# User-specific files |
|||
*.suo |
|||
*.user |
|||
*.userosscache |
|||
*.sln.docstates |
|||
|
|||
# User-specific files (MonoDevelop/Xamarin Studio) |
|||
*.userprefs |
|||
|
|||
# Build results |
|||
[Dd]ebug/ |
|||
[Dd]ebugPublic/ |
|||
[Rr]elease/ |
|||
[Rr]eleases/ |
|||
x64/ |
|||
x86/ |
|||
bld/ |
|||
[Bb]in/ |
|||
[Oo]bj/ |
|||
[Ll]og/ |
|||
|
|||
# Visual Studio 2015/2017 cache/options directory |
|||
.vs/ |
|||
# Uncomment if you have tasks that create the project's static files in wwwroot |
|||
#wwwroot/ |
|||
|
|||
# Visual Studio 2017 auto generated files |
|||
Generated\ Files/ |
|||
|
|||
# MSTest test Results |
|||
[Tt]est[Rr]esult*/ |
|||
[Bb]uild[Ll]og.* |
|||
|
|||
# NUNIT |
|||
*.VisualState.xml |
|||
TestResult.xml |
|||
|
|||
# Build Results of an ATL Project |
|||
[Dd]ebugPS/ |
|||
[Rr]eleasePS/ |
|||
dlldata.c |
|||
|
|||
# Benchmark Results |
|||
BenchmarkDotNet.Artifacts/ |
|||
|
|||
# .NET Core |
|||
project.lock.json |
|||
project.fragment.lock.json |
|||
artifacts/ |
|||
**/Properties/launchSettings.json |
|||
|
|||
# StyleCop |
|||
StyleCopReport.xml |
|||
|
|||
# Files built by Visual Studio |
|||
*_i.c |
|||
*_p.c |
|||
*_i.h |
|||
*.ilk |
|||
*.meta |
|||
*.obj |
|||
*.iobj |
|||
*.pch |
|||
*.pdb |
|||
*.ipdb |
|||
*.pgc |
|||
*.pgd |
|||
*.rsp |
|||
*.sbr |
|||
*.tlb |
|||
*.tli |
|||
*.tlh |
|||
*.tmp |
|||
*.tmp_proj |
|||
*.log |
|||
*.vspscc |
|||
*.vssscc |
|||
.builds |
|||
*.pidb |
|||
*.svclog |
|||
*.scc |
|||
|
|||
# Chutzpah Test files |
|||
_Chutzpah* |
|||
|
|||
# Visual C++ cache files |
|||
ipch/ |
|||
*.aps |
|||
*.ncb |
|||
*.opendb |
|||
*.opensdf |
|||
*.sdf |
|||
*.cachefile |
|||
*.VC.db |
|||
*.VC.VC.opendb |
|||
|
|||
# Visual Studio profiler |
|||
*.psess |
|||
*.vsp |
|||
*.vspx |
|||
*.sap |
|||
|
|||
# Visual Studio Trace Files |
|||
*.e2e |
|||
|
|||
# TFS 2012 Local Workspace |
|||
$tf/ |
|||
|
|||
# Guidance Automation Toolkit |
|||
*.gpState |
|||
|
|||
# ReSharper is a .NET coding add-in |
|||
_ReSharper*/ |
|||
*.[Rr]e[Ss]harper |
|||
*.DotSettings.user |
|||
|
|||
# JustCode is a .NET coding add-in |
|||
.JustCode |
|||
|
|||
# TeamCity is a build add-in |
|||
_TeamCity* |
|||
|
|||
# DotCover is a Code Coverage Tool |
|||
*.dotCover |
|||
|
|||
# AxoCover is a Code Coverage Tool |
|||
.axoCover/* |
|||
!.axoCover/settings.json |
|||
|
|||
# Visual Studio code coverage results |
|||
*.coverage |
|||
*.coveragexml |
|||
|
|||
# NCrunch |
|||
_NCrunch_* |
|||
.*crunch*.local.xml |
|||
nCrunchTemp_* |
|||
|
|||
# MightyMoose |
|||
*.mm.* |
|||
AutoTest.Net/ |
|||
|
|||
# Web workbench (sass) |
|||
.sass-cache/ |
|||
|
|||
# Installshield output folder |
|||
[Ee]xpress/ |
|||
|
|||
# DocProject is a documentation generator add-in |
|||
DocProject/buildhelp/ |
|||
DocProject/Help/*.HxT |
|||
DocProject/Help/*.HxC |
|||
DocProject/Help/*.hhc |
|||
DocProject/Help/*.hhk |
|||
DocProject/Help/*.hhp |
|||
DocProject/Help/Html2 |
|||
DocProject/Help/html |
|||
|
|||
# Click-Once directory |
|||
publish/ |
|||
|
|||
# Publish Web Output |
|||
*.[Pp]ublish.xml |
|||
*.azurePubxml |
|||
# Note: Comment the next line if you want to checkin your web deploy settings, |
|||
# but database connection strings (with potential passwords) will be unencrypted |
|||
*.pubxml |
|||
*.publishproj |
|||
|
|||
# Microsoft Azure Web App publish settings. Comment the next line if you want to |
|||
# checkin your Azure Web App publish settings, but sensitive information contained |
|||
# in these scripts will be unencrypted |
|||
PublishScripts/ |
|||
|
|||
# NuGet Packages |
|||
*.nupkg |
|||
# The packages folder can be ignored because of Package Restore |
|||
**/[Pp]ackages/* |
|||
# except build/, which is used as an MSBuild target. |
|||
!**/[Pp]ackages/build/ |
|||
# Uncomment if necessary however generally it will be regenerated when needed |
|||
#!**/[Pp]ackages/repositories.config |
|||
# NuGet v3's project.json files produces more ignorable files |
|||
*.nuget.props |
|||
*.nuget.targets |
|||
|
|||
# Microsoft Azure Build Output |
|||
csx/ |
|||
*.build.csdef |
|||
|
|||
# Microsoft Azure Emulator |
|||
ecf/ |
|||
rcf/ |
|||
|
|||
# Windows Store app package directories and files |
|||
AppPackages/ |
|||
BundleArtifacts/ |
|||
Package.StoreAssociation.xml |
|||
_pkginfo.txt |
|||
*.appx |
|||
|
|||
# Visual Studio cache files |
|||
# files ending in .cache can be ignored |
|||
*.[Cc]ache |
|||
# but keep track of directories ending in .cache |
|||
!*.[Cc]ache/ |
|||
|
|||
# Others |
|||
ClientBin/ |
|||
~$* |
|||
*~ |
|||
*.dbmdl |
|||
*.dbproj.schemaview |
|||
*.jfm |
|||
*.pfx |
|||
*.publishsettings |
|||
orleans.codegen.cs |
|||
|
|||
# Including strong name files can present a security risk |
|||
# (https://github.com/github/gitignore/pull/2483#issue-259490424) |
|||
#*.snk |
|||
|
|||
# Since there are multiple workflows, uncomment next line to ignore bower_components |
|||
# (https://github.com/github/gitignore/pull/1529#issuecomment-104372622) |
|||
#bower_components/ |
|||
|
|||
# RIA/Silverlight projects |
|||
Generated_Code/ |
|||
|
|||
# Backup & report files from converting an old project file |
|||
# to a newer Visual Studio version. Backup files are not needed, |
|||
# because we have git ;-) |
|||
_UpgradeReport_Files/ |
|||
Backup*/ |
|||
UpgradeLog*.XML |
|||
UpgradeLog*.htm |
|||
ServiceFabricBackup/ |
|||
*.rptproj.bak |
|||
|
|||
# SQL Server files |
|||
*.mdf |
|||
*.ldf |
|||
*.ndf |
|||
|
|||
# Business Intelligence projects |
|||
*.rdl.data |
|||
*.bim.layout |
|||
*.bim_*.settings |
|||
*.rptproj.rsuser |
|||
|
|||
# Microsoft Fakes |
|||
FakesAssemblies/ |
|||
|
|||
# GhostDoc plugin setting file |
|||
*.GhostDoc.xml |
|||
|
|||
# Node.js Tools for Visual Studio |
|||
.ntvs_analysis.dat |
|||
node_modules/ |
|||
|
|||
# Visual Studio 6 build log |
|||
*.plg |
|||
|
|||
# Visual Studio 6 workspace options file |
|||
*.opt |
|||
|
|||
# Visual Studio 6 auto-generated workspace file (contains which files were open etc.) |
|||
*.vbw |
|||
|
|||
# Visual Studio LightSwitch build output |
|||
**/*.HTMLClient/GeneratedArtifacts |
|||
**/*.DesktopClient/GeneratedArtifacts |
|||
**/*.DesktopClient/ModelManifest.xml |
|||
**/*.Server/GeneratedArtifacts |
|||
**/*.Server/ModelManifest.xml |
|||
_Pvt_Extensions |
|||
|
|||
# Paket dependency manager |
|||
.paket/paket.exe |
|||
paket-files/ |
|||
|
|||
# FAKE - F# Make |
|||
.fake/ |
|||
|
|||
# JetBrains Rider |
|||
.idea/ |
|||
*.sln.iml |
|||
|
|||
# CodeRush |
|||
.cr/ |
|||
|
|||
# Python Tools for Visual Studio (PTVS) |
|||
__pycache__/ |
|||
*.pyc |
|||
|
|||
# Cake - Uncomment if you are using it |
|||
# tools/** |
|||
# !tools/packages.config |
|||
|
|||
# Tabs Studio |
|||
*.tss |
|||
|
|||
# Telerik's JustMock configuration file |
|||
*.jmconfig |
|||
|
|||
# BizTalk build output |
|||
*.btp.cs |
|||
*.btm.cs |
|||
*.odx.cs |
|||
*.xsd.cs |
|||
|
|||
# OpenCover UI analysis results |
|||
OpenCover/ |
|||
|
|||
# Azure Stream Analytics local run output |
|||
ASALocalRun/ |
|||
|
|||
# MSBuild Binary and Structured Log |
|||
*.binlog |
|||
|
|||
# NVidia Nsight GPU debugger configuration file |
|||
*.nvuser |
|||
|
|||
# MFractors (Xamarin productivity tool) working folder |
|||
.mfractor/ |
|||
@ -0,0 +1,58 @@ |
|||
namespace Smart.FormDesigner.Demo |
|||
{ |
|||
partial class CustomForm |
|||
{ |
|||
/// <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.defaultDesignerLoader1 = new Smart.FormDesigner.Serialization.DefaultDesignerLoader(); |
|||
this.designer1 = new Smart.FormDesigner.Designer(); |
|||
this.SuspendLayout(); |
|||
//
|
|||
// designer1
|
|||
//
|
|||
this.designer1.DesignedForm = this; |
|||
this.designer1.DesignerLoader = this.defaultDesignerLoader1; |
|||
this.designer1.GridSize = new System.Drawing.Size(8, 8); |
|||
//
|
|||
// CustomForm
|
|||
//
|
|||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); |
|||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; |
|||
this.ClientSize = new System.Drawing.Size(420, 267); |
|||
this.KeyPreview = true; |
|||
this.Name = "CustomForm"; |
|||
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; |
|||
this.Text = "自定义表单"; |
|||
this.ResumeLayout(false); |
|||
|
|||
} |
|||
|
|||
#endregion
|
|||
private Serialization.DefaultDesignerLoader defaultDesignerLoader1; |
|||
private Designer designer1; |
|||
} |
|||
} |
|||
@ -0,0 +1,32 @@ |
|||
using System; |
|||
using System.ComponentModel; |
|||
using System.Windows.Forms; |
|||
|
|||
namespace Smart.FormDesigner.Demo |
|||
{ |
|||
public partial class CustomForm : Form |
|||
{ |
|||
[Browsable(false)] |
|||
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)] |
|||
public string LayoutXml |
|||
{ |
|||
get { return this.designer1.LayoutXML; } |
|||
set { this.designer1.LayoutXML = value; } |
|||
} |
|||
|
|||
public CustomForm() |
|||
{ |
|||
InitializeComponent(); |
|||
} |
|||
|
|||
// public 设计时事件可选
|
|||
public void button1_Click(object sender, EventArgs e) |
|||
{ |
|||
MessageBox.Show("Click1"); |
|||
} |
|||
public void button1_Click2(object sender, EventArgs e) |
|||
{ |
|||
MessageBox.Show("Click2"); |
|||
} |
|||
} |
|||
} |
|||
@ -0,0 +1,126 @@ |
|||
<?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=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> |
|||
</resheader> |
|||
<resheader name="writer"> |
|||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> |
|||
</resheader> |
|||
<metadata name="defaultDesignerLoader1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> |
|||
<value>17, 17</value> |
|||
</metadata> |
|||
<metadata name="designer1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> |
|||
<value>211, 17</value> |
|||
</metadata> |
|||
</root> |
|||
@ -0,0 +1,78 @@ |
|||
using System; |
|||
using System.Windows.Forms; |
|||
using WeifenLuo.WinFormsUI.Docking; |
|||
|
|||
namespace Smart.FormDesigner.Demo |
|||
{ |
|||
public class DesignerDocument : DockContent |
|||
{ |
|||
public DesignerControl DesignerControl { get; private set; } |
|||
public Designer Designer { get { return this.DesignerControl.Designer; } } |
|||
public Type RootComponentType { get; } |
|||
|
|||
public DesignerDocument(string text, Type rootType) |
|||
{ |
|||
this.Text = text; |
|||
this.RootComponentType = rootType; |
|||
InitializeDesigner(); |
|||
} |
|||
|
|||
private void InitializeDesigner() |
|||
{ |
|||
var root = (Control)Activator.CreateInstance(RootComponentType); |
|||
root.Name = RootComponentType.Name; |
|||
this.DesignerControl = new DesignerControl(root) { Dock = DockStyle.Fill }; |
|||
this.DesignerControl.Designer.KeyDown += DesignedForm_KeyDown; |
|||
this.Controls.Add(DesignerControl); |
|||
} |
|||
|
|||
public void Preview() |
|||
{ |
|||
var form = new CustomForm(); |
|||
form.LayoutXml = this.DesignerControl.Designer.LayoutXML; |
|||
form.ShowDialog(); |
|||
} |
|||
|
|||
private void Form_FormClosing(object sender, FormClosingEventArgs e) |
|||
{ |
|||
e.Cancel = true; |
|||
(sender as Form).Hide(); |
|||
} |
|||
|
|||
private void DesignedForm_KeyDown(object sender, KeyEventArgs e) |
|||
{ |
|||
if (e.KeyCode == Keys.Delete) |
|||
this.Designer.DeleteSelected(); |
|||
else if (e.KeyCode == Keys.F5) |
|||
this.Preview(); |
|||
else if (e.Control == true && e.KeyCode == Keys.A) |
|||
this.Designer.SelectAll(); |
|||
else if (e.Control == true && e.KeyCode == Keys.C) |
|||
this.Designer.CopyControls(); |
|||
else if (e.Control == true && e.KeyCode == Keys.V) |
|||
this.Designer.PasteControls(); |
|||
else if (e.Control == true && e.KeyCode == Keys.Z) |
|||
this.Designer.Undo(); |
|||
else if (e.Control == true && e.KeyCode == Keys.Y) |
|||
this.Designer.Redo(); |
|||
} |
|||
|
|||
protected override void OnFormClosed(FormClosedEventArgs e) |
|||
{ |
|||
this.Designer.KeyDown -= DesignedForm_KeyDown; |
|||
base.OnFormClosed(e); |
|||
} |
|||
|
|||
private void InitializeComponent() |
|||
{ |
|||
this.SuspendLayout(); |
|||
//
|
|||
// DesignerDocument
|
|||
//
|
|||
this.ClientSize = new System.Drawing.Size(284, 261); |
|||
this.Name = "DesignerDocument"; |
|||
this.ResumeLayout(false); |
|||
|
|||
} |
|||
} |
|||
} |
|||
@ -0,0 +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=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> |
|||
</resheader> |
|||
<resheader name="writer"> |
|||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> |
|||
</resheader> |
|||
</root> |
|||
@ -0,0 +1,21 @@ |
|||
MIT License |
|||
|
|||
Copyright (c) 2018 ljf |
|||
|
|||
Permission is hereby granted, free of charge, to any person obtaining a copy |
|||
of this software and associated documentation files (the "Software"), to deal |
|||
in the Software without restriction, including without limitation the rights |
|||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell |
|||
copies of the Software, and to permit persons to whom the Software is |
|||
furnished to do so, subject to the following conditions: |
|||
|
|||
The above copyright notice and this permission notice shall be included in all |
|||
copies or substantial portions of the Software. |
|||
|
|||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR |
|||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, |
|||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE |
|||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER |
|||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, |
|||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE |
|||
SOFTWARE. |
|||
|
After Width: | Height: | Size: 4.2 KiB |
|
After Width: | Height: | Size: 17 KiB |
|
After Width: | Height: | Size: 25 KiB |
|
After Width: | Height: | Size: 231 KiB |
|
After Width: | Height: | Size: 59 KiB |
@ -0,0 +1,938 @@ |
|||
using System; |
|||
using System.ComponentModel; |
|||
using System.ComponentModel.Design; |
|||
using System.IO; |
|||
using System.Windows.Forms; |
|||
using WeifenLuo.WinFormsUI.Docking; |
|||
|
|||
namespace Smart.FormDesigner.Demo |
|||
{ |
|||
public class MainForm : Form |
|||
{ |
|||
private ToolboxWindow toolboxWindow; |
|||
private PropertyWindow propertyWindow; |
|||
private ToolStripSeparator toolStripSeparator3; |
|||
private ToolStripButton tbPreview; |
|||
private ToolStripButton tbDelete; |
|||
private Designer activeDesigner; |
|||
|
|||
public MainForm() |
|||
{ |
|||
InitializeComponent(); |
|||
|
|||
this.toolboxWindow = new ToolboxWindow(); |
|||
this.toolboxWindow.Show(this.dockPanel, DockState.DockLeft); |
|||
|
|||
this.propertyWindow = new PropertyWindow(); |
|||
this.propertyWindow.Show(this.dockPanel, DockState.DockRight); |
|||
|
|||
EnableUndoRedo(); |
|||
} |
|||
|
|||
private void dockPanel_ActiveDocumentChanged(object sender, EventArgs e) |
|||
{ |
|||
if (this.dockPanel.ActiveDocument is DesignerDocument doc) |
|||
{ |
|||
this.activeDesigner = doc.Designer; |
|||
this.SelectionChanged(this.activeDesigner.SelectionService, EventArgs.Empty); |
|||
|
|||
this.toolboxWindow.Toolbox.Designer = this.activeDesigner; |
|||
|
|||
this.propertyWindow.Propertybox.SetComponents(this.activeDesigner.DesignerHost.Container.Components); |
|||
|
|||
this.EnableUndoRedo(); |
|||
|
|||
this.tbPreview.Enabled = true; |
|||
this.tbSaveForm.Enabled = true; |
|||
} |
|||
else |
|||
{ |
|||
this.tbPreview.Enabled = false; |
|||
this.tbSaveForm.Enabled = false; |
|||
} |
|||
} |
|||
|
|||
private bool DesignEvents_AddingVerb(IComponent primarySelection, DesignerVerb verb) |
|||
{ |
|||
return true; |
|||
} |
|||
private void SelectionChanged(object sender, EventArgs e) |
|||
{ |
|||
var selectionService = (ISelectionService)sender; |
|||
int selectionCount = selectionService.SelectionCount; |
|||
|
|||
EnableAlignResize(selectionCount > 1); |
|||
if (selectionCount >= 1) |
|||
{ |
|||
this.miDeleteSelection.Enabled = true; |
|||
this.miCopy.Enabled = true; |
|||
this.tbDelete.Enabled = true; |
|||
} |
|||
else |
|||
{ |
|||
this.miDeleteSelection.Enabled = false; |
|||
this.miCopy.Enabled = false; |
|||
this.tbDelete.Enabled = false; |
|||
} |
|||
|
|||
this.propertyWindow.Propertybox.Designer = this.activeDesigner; |
|||
if (selectionCount == 0) |
|||
{ |
|||
this.propertyWindow.Propertybox.SetSelectedObjects(this.activeDesigner.DesignedForm); |
|||
} |
|||
else |
|||
{ |
|||
var selected = new object[selectionCount]; |
|||
selectionService.GetSelectedComponents().CopyTo(selected, 0); |
|||
this.propertyWindow.Propertybox.SetSelectedObjects(selected); |
|||
} |
|||
} |
|||
private void ComponentAdded(object sender, ComponentEventArgs e) |
|||
{ |
|||
this.propertyWindow.Propertybox.SetComponents(this.activeDesigner.DesignerHost.Container.Components); |
|||
|
|||
EnableUndoRedo(); |
|||
} |
|||
private void ComponentRemoved(object sender, ComponentEventArgs e) |
|||
{ |
|||
this.propertyWindow.Propertybox.SetComponents(this.activeDesigner.DesignerHost.Container.Components); |
|||
|
|||
EnableUndoRedo(); |
|||
} |
|||
private void ComponentChanged(object sender, ComponentChangedEventArgs e) |
|||
{ |
|||
EnableUndoRedo(); |
|||
} |
|||
|
|||
private void NewDesignedForm() |
|||
{ |
|||
string name = "from " + (this.dockPanel.DocumentsCount + 1); |
|||
var rootType = typeof(CustomForm); |
|||
|
|||
var doc = new DesignerDocument(name, rootType); |
|||
this.activeDesigner = doc.Designer; |
|||
doc.FormClosing += (s, e) => |
|||
{ |
|||
EndDesign(doc.Designer); |
|||
}; |
|||
doc.Designer.DesignEvents.AddingVerb += DesignEvents_AddingVerb; |
|||
doc.Designer.SelectionService.SelectionChanged += SelectionChanged; |
|||
doc.Designer.ComponentChangeService.ComponentAdded += ComponentAdded; |
|||
doc.Designer.ComponentChangeService.ComponentRemoved += ComponentRemoved; |
|||
doc.Designer.ComponentChangeService.ComponentChanged += ComponentChanged; |
|||
doc.Show(dockPanel); |
|||
tbSaveForm.Enabled = true; |
|||
} |
|||
private void OpenDesignedForm() |
|||
{ |
|||
var openFileName = new OpenFileDialog(); |
|||
|
|||
openFileName.Filter = "XML text format (*.xml)|*.xml|Proprietary text format (*.*)|*.*"; |
|||
openFileName.FilterIndex = 1; |
|||
openFileName.RestoreDirectory = true; |
|||
|
|||
if (openFileName.ShowDialog() == DialogResult.OK) |
|||
{ |
|||
this.NewDesignedForm(); |
|||
|
|||
if (openFileName.FilterIndex == 1) |
|||
{ |
|||
var txtReader = new StreamReader(openFileName.FileName); |
|||
string layoutString = txtReader.ReadToEnd(); |
|||
txtReader.Close(); |
|||
|
|||
this.activeDesigner.LayoutXML = layoutString; |
|||
} |
|||
else |
|||
{ |
|||
this.activeDesigner.LoadFromFile(openFileName.FileName); |
|||
} |
|||
tbSaveForm.Enabled = true; |
|||
} |
|||
} |
|||
private void SaveDesignedForm() |
|||
{ |
|||
var saveFileName = new SaveFileDialog(); |
|||
saveFileName.Filter = "XML Form (*.xml)|*.xml"; |
|||
saveFileName.FilterIndex = 1; |
|||
saveFileName.RestoreDirectory = true; |
|||
|
|||
if (saveFileName.ShowDialog() == DialogResult.OK) |
|||
{ |
|||
string test = this.activeDesigner.LayoutXML; |
|||
|
|||
TextWriter txtWriter = new StreamWriter(saveFileName.FileName); |
|||
txtWriter.Write(test); |
|||
txtWriter.Close(); |
|||
} |
|||
} |
|||
private void CheckDesignedForm() |
|||
{ |
|||
if (this.activeDesigner.IsDirty == true) |
|||
{ |
|||
if (MessageBox.Show("是否保存对表单的修改?", "确认提示", |
|||
MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes) |
|||
{ |
|||
SaveDesignedForm(); |
|||
} |
|||
} |
|||
} |
|||
private void EndDesign(Designer designer) |
|||
{ |
|||
if (designer == null) return; |
|||
|
|||
designer.SelectionService.SelectionChanged -= SelectionChanged; |
|||
designer.ComponentChangeService.ComponentAdded -= ComponentAdded; |
|||
designer.ComponentChangeService.ComponentRemoved -= ComponentRemoved; |
|||
designer.ComponentChangeService.ComponentChanged -= ComponentChanged; |
|||
CheckDesignedForm(); |
|||
designer.Active = false; |
|||
designer.DesignContainer = null; |
|||
} |
|||
|
|||
private void EnableAlignResize(bool enable) |
|||
{ |
|||
this.miAlignBottom.Enabled = enable; |
|||
this.miAlignMiddle.Enabled = enable; |
|||
this.miAlignTop.Enabled = enable; |
|||
this.miAlignCenter.Enabled = enable; |
|||
this.miAlignRight.Enabled = enable; |
|||
this.miAlignLeft.Enabled = enable; |
|||
|
|||
this.tbAlignBottom.Enabled = enable; |
|||
this.tbAlignMiddle.Enabled = enable; |
|||
this.tbAlignTop.Enabled = enable; |
|||
this.tbAlignCenter.Enabled = enable; |
|||
this.tbAlignLeft.Enabled = enable; |
|||
this.tbAlignRight.Enabled = enable; |
|||
|
|||
this.miSameBoth.Enabled = enable; |
|||
this.miSameWidth.Enabled = enable; |
|||
this.miSameHeight.Enabled = enable; |
|||
|
|||
this.tbSameBoth.Enabled = enable; |
|||
this.tbSameWidth.Enabled = enable; |
|||
this.tbSameHeight.Enabled = enable; |
|||
} |
|||
private void EnableUndoRedo() |
|||
{ |
|||
miUndo.Enabled = (this.activeDesigner?.UndoCount > 0); |
|||
miRedo.Enabled = (this.activeDesigner?.RedoCount > 0); |
|||
|
|||
tbUndo.Enabled = (this.activeDesigner?.UndoCount > 0); |
|||
tbRedo.Enabled = (this.activeDesigner?.RedoCount > 0); |
|||
} |
|||
|
|||
#region 菜单事件
|
|||
|
|||
private void miNewForm_Click(object sender, EventArgs e) |
|||
{ |
|||
NewDesignedForm(); |
|||
} |
|||
private void miOpenForm_Click(object sender, System.EventArgs e) |
|||
{ |
|||
OpenDesignedForm(); |
|||
} |
|||
private void miSaveForm_Click(object sender, System.EventArgs e) |
|||
{ |
|||
SaveDesignedForm(); |
|||
} |
|||
private void miExitDesigner_Click(object sender, EventArgs e) |
|||
{ |
|||
Close(); |
|||
} |
|||
private void tbPreview_Click(object sender, EventArgs e) |
|||
{ |
|||
if (this.dockPanel.ActiveDocument is DesignerDocument doc) |
|||
{ |
|||
doc.Preview(); |
|||
} |
|||
} |
|||
private void tbDelete_Click(object sender, EventArgs e) |
|||
{ |
|||
if (this.dockPanel.ActiveDocument is DesignerDocument doc) |
|||
{ |
|||
doc.Designer.DeleteSelected(); |
|||
} |
|||
} |
|||
private void miAlignTop_Click(object sender, System.EventArgs e) |
|||
{ |
|||
this.activeDesigner.Align(AlignType.Top); |
|||
} |
|||
private void miAlignMiddle_Click(object sender, System.EventArgs e) |
|||
{ |
|||
this.activeDesigner.Align(AlignType.Middle); |
|||
} |
|||
private void miAlignBottom_Click(object sender, System.EventArgs e) |
|||
{ |
|||
this.activeDesigner.Align(AlignType.Bottom); |
|||
} |
|||
private void miAlignLeft_Click(object sender, System.EventArgs e) |
|||
{ |
|||
this.activeDesigner.Align(AlignType.Left); |
|||
} |
|||
private void miAlignCenter_Click(object sender, System.EventArgs e) |
|||
{ |
|||
this.activeDesigner.Align(AlignType.Center); |
|||
} |
|||
private void miAlignRight_Click(object sender, System.EventArgs e) |
|||
{ |
|||
this.activeDesigner.Align(AlignType.Right); |
|||
} |
|||
|
|||
private void miSameHeight_Click(object sender, System.EventArgs e) |
|||
{ |
|||
this.activeDesigner.MakeSameSize(ResizeType.SameHeight); |
|||
} |
|||
private void miSameWidth_Click(object sender, System.EventArgs e) |
|||
{ |
|||
this.activeDesigner.MakeSameSize(ResizeType.SameWidth); |
|||
} |
|||
private void miSameBoth_Click(object sender, System.EventArgs e) |
|||
{ |
|||
this.activeDesigner.MakeSameSize(ResizeType.SameHeight | ResizeType.SameWidth); |
|||
} |
|||
private void miUndo_Click(object sender, System.EventArgs e) |
|||
{ |
|||
this.activeDesigner.Undo(); |
|||
miUndo.Enabled = (this.activeDesigner.UndoCount != 0); |
|||
miRedo.Enabled = (this.activeDesigner.RedoCount != 0); |
|||
} |
|||
private void miRedo_Click(object sender, System.EventArgs e) |
|||
{ |
|||
this.activeDesigner.Redo(); |
|||
miUndo.Enabled = (this.activeDesigner.UndoCount != 0); |
|||
miRedo.Enabled = (this.activeDesigner.RedoCount != 0); |
|||
} |
|||
private void miDeleteSelection_Click(object sender, System.EventArgs e) |
|||
{ |
|||
this.activeDesigner.DeleteSelected(); |
|||
} |
|||
|
|||
private void miCopy_Click(object sender, System.EventArgs e) |
|||
{ |
|||
this.activeDesigner.CopyControls(); |
|||
} |
|||
private void miPaste_Click(object sender, System.EventArgs e) |
|||
{ |
|||
this.activeDesigner.PasteControls(); |
|||
} |
|||
|
|||
private void miAbout_Click(object sender, System.EventArgs e) |
|||
{ |
|||
MessageBox.Show("Smart Form Designer" + Environment.NewLine + |
|||
"Copyright © 2018 SmallAnts", |
|||
"关于", |
|||
MessageBoxButtons.OK); |
|||
} |
|||
#endregion
|
|||
|
|||
protected override void Dispose(bool disposing) |
|||
{ |
|||
this.toolboxWindow.Dispose(); |
|||
this.propertyWindow.Dispose(); |
|||
|
|||
if (disposing) |
|||
{ |
|||
if (components != null) |
|||
{ |
|||
components.Dispose(); |
|||
} |
|||
} |
|||
base.Dispose(disposing); |
|||
} |
|||
|
|||
#region Windows Form Designer generated code
|
|||
|
|||
private void InitializeComponent() |
|||
{ |
|||
this.components = new System.ComponentModel.Container(); |
|||
this.mainMenu = new System.Windows.Forms.MainMenu(this.components); |
|||
this.menuItem1 = new System.Windows.Forms.MenuItem(); |
|||
this.miNewForm = new System.Windows.Forms.MenuItem(); |
|||
this.miOpenForm = new System.Windows.Forms.MenuItem(); |
|||
this.miSaveForm = new System.Windows.Forms.MenuItem(); |
|||
this.menuItem6 = new System.Windows.Forms.MenuItem(); |
|||
this.miExitDesigner = new System.Windows.Forms.MenuItem(); |
|||
this.menuItem2 = new System.Windows.Forms.MenuItem(); |
|||
this.miUndo = new System.Windows.Forms.MenuItem(); |
|||
this.miRedo = new System.Windows.Forms.MenuItem(); |
|||
this.menuItem11 = new System.Windows.Forms.MenuItem(); |
|||
this.menuItem8 = new System.Windows.Forms.MenuItem(); |
|||
this.miAlignTop = new System.Windows.Forms.MenuItem(); |
|||
this.miAlignMiddle = new System.Windows.Forms.MenuItem(); |
|||
this.miAlignBottom = new System.Windows.Forms.MenuItem(); |
|||
this.menuItem12 = new System.Windows.Forms.MenuItem(); |
|||
this.miAlignLeft = new System.Windows.Forms.MenuItem(); |
|||
this.miAlignCenter = new System.Windows.Forms.MenuItem(); |
|||
this.miAlignRight = new System.Windows.Forms.MenuItem(); |
|||
this.menuItem9 = new System.Windows.Forms.MenuItem(); |
|||
this.miSameHeight = new System.Windows.Forms.MenuItem(); |
|||
this.miSameWidth = new System.Windows.Forms.MenuItem(); |
|||
this.menuItem13 = new System.Windows.Forms.MenuItem(); |
|||
this.miSameBoth = new System.Windows.Forms.MenuItem(); |
|||
this.menuItem14 = new System.Windows.Forms.MenuItem(); |
|||
this.miCopy = new System.Windows.Forms.MenuItem(); |
|||
this.miPaste = new System.Windows.Forms.MenuItem(); |
|||
this.miDeleteSelection = new System.Windows.Forms.MenuItem(); |
|||
this.menuItem4 = new System.Windows.Forms.MenuItem(); |
|||
this.miAbout = new System.Windows.Forms.MenuItem(); |
|||
this.toolStrip = new System.Windows.Forms.ToolStrip(); |
|||
this.tbNewForm = new System.Windows.Forms.ToolStripButton(); |
|||
this.tbOpenForm = new System.Windows.Forms.ToolStripButton(); |
|||
this.tbSaveForm = new System.Windows.Forms.ToolStripButton(); |
|||
this.toolStripSeparator3 = new System.Windows.Forms.ToolStripSeparator(); |
|||
this.tbPreview = new System.Windows.Forms.ToolStripButton(); |
|||
this.toolStripSeparator2 = new System.Windows.Forms.ToolStripSeparator(); |
|||
this.tbUndo = new System.Windows.Forms.ToolStripButton(); |
|||
this.tbRedo = new System.Windows.Forms.ToolStripButton(); |
|||
this.toolStripSeparator1 = new System.Windows.Forms.ToolStripSeparator(); |
|||
this.tbDelete = new System.Windows.Forms.ToolStripButton(); |
|||
this.tbAlignLeft = new System.Windows.Forms.ToolStripButton(); |
|||
this.tbAlignCenter = new System.Windows.Forms.ToolStripButton(); |
|||
this.tbAlignRight = new System.Windows.Forms.ToolStripButton(); |
|||
this.tbAlignTop = new System.Windows.Forms.ToolStripButton(); |
|||
this.tbAlignMiddle = new System.Windows.Forms.ToolStripButton(); |
|||
this.tbAlignBottom = new System.Windows.Forms.ToolStripButton(); |
|||
this.toolStripSeparator4 = new System.Windows.Forms.ToolStripSeparator(); |
|||
this.tbSameWidth = new System.Windows.Forms.ToolStripButton(); |
|||
this.tbSameHeight = new System.Windows.Forms.ToolStripButton(); |
|||
this.tbSameBoth = new System.Windows.Forms.ToolStripButton(); |
|||
this.dockPanel = new WeifenLuo.WinFormsUI.Docking.DockPanel(); |
|||
this.vS2015LightTheme1 = new WeifenLuo.WinFormsUI.Docking.VS2015LightTheme(); |
|||
this.toolStrip.SuspendLayout(); |
|||
this.SuspendLayout(); |
|||
//
|
|||
// mainMenu
|
|||
//
|
|||
this.mainMenu.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] { |
|||
this.menuItem1, |
|||
this.menuItem2, |
|||
this.menuItem4}); |
|||
//
|
|||
// menuItem1
|
|||
//
|
|||
this.menuItem1.Index = 0; |
|||
this.menuItem1.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] { |
|||
this.miNewForm, |
|||
this.miOpenForm, |
|||
this.miSaveForm, |
|||
this.menuItem6, |
|||
this.miExitDesigner}); |
|||
this.menuItem1.Text = "文件(&F)"; |
|||
//
|
|||
// miNewForm
|
|||
//
|
|||
this.miNewForm.Index = 0; |
|||
this.miNewForm.Shortcut = System.Windows.Forms.Shortcut.CtrlN; |
|||
this.miNewForm.Text = "新建(&N)"; |
|||
this.miNewForm.Click += new System.EventHandler(this.miNewForm_Click); |
|||
//
|
|||
// miOpenForm
|
|||
//
|
|||
this.miOpenForm.Index = 1; |
|||
this.miOpenForm.Shortcut = System.Windows.Forms.Shortcut.CtrlO; |
|||
this.miOpenForm.Text = "打开(&O)"; |
|||
this.miOpenForm.Click += new System.EventHandler(this.miOpenForm_Click); |
|||
//
|
|||
// miSaveForm
|
|||
//
|
|||
this.miSaveForm.Index = 2; |
|||
this.miSaveForm.Shortcut = System.Windows.Forms.Shortcut.CtrlS; |
|||
this.miSaveForm.Text = "保存(&S)"; |
|||
this.miSaveForm.Click += new System.EventHandler(this.miSaveForm_Click); |
|||
//
|
|||
// menuItem6
|
|||
//
|
|||
this.menuItem6.Index = 3; |
|||
this.menuItem6.Text = "-"; |
|||
//
|
|||
// miExitDesigner
|
|||
//
|
|||
this.miExitDesigner.Index = 4; |
|||
this.miExitDesigner.Text = "退出(&X)"; |
|||
this.miExitDesigner.Click += new System.EventHandler(this.miExitDesigner_Click); |
|||
//
|
|||
// menuItem2
|
|||
//
|
|||
this.menuItem2.Index = 1; |
|||
this.menuItem2.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] { |
|||
this.miUndo, |
|||
this.miRedo, |
|||
this.menuItem11, |
|||
this.menuItem8, |
|||
this.menuItem9, |
|||
this.menuItem14, |
|||
this.miCopy, |
|||
this.miPaste, |
|||
this.miDeleteSelection}); |
|||
this.menuItem2.Text = "编辑(&E)"; |
|||
//
|
|||
// miUndo
|
|||
//
|
|||
this.miUndo.Index = 0; |
|||
this.miUndo.Shortcut = System.Windows.Forms.Shortcut.CtrlZ; |
|||
this.miUndo.Text = "撤销(&U)"; |
|||
this.miUndo.Click += new System.EventHandler(this.miUndo_Click); |
|||
//
|
|||
// miRedo
|
|||
//
|
|||
this.miRedo.Index = 1; |
|||
this.miRedo.Shortcut = System.Windows.Forms.Shortcut.CtrlY; |
|||
this.miRedo.Text = "重做(&R)"; |
|||
this.miRedo.Click += new System.EventHandler(this.miRedo_Click); |
|||
//
|
|||
// menuItem11
|
|||
//
|
|||
this.menuItem11.Index = 2; |
|||
this.menuItem11.Text = "-"; |
|||
//
|
|||
// menuItem8
|
|||
//
|
|||
this.menuItem8.Index = 3; |
|||
this.menuItem8.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] { |
|||
this.miAlignTop, |
|||
this.miAlignMiddle, |
|||
this.miAlignBottom, |
|||
this.menuItem12, |
|||
this.miAlignLeft, |
|||
this.miAlignCenter, |
|||
this.miAlignRight}); |
|||
this.menuItem8.Text = "对齐(&A)"; |
|||
//
|
|||
// miAlignTop
|
|||
//
|
|||
this.miAlignTop.Index = 0; |
|||
this.miAlignTop.Text = "&Top"; |
|||
this.miAlignTop.Click += new System.EventHandler(this.miAlignTop_Click); |
|||
//
|
|||
// miAlignMiddle
|
|||
//
|
|||
this.miAlignMiddle.Index = 1; |
|||
this.miAlignMiddle.Text = "&Middle"; |
|||
this.miAlignMiddle.Click += new System.EventHandler(this.miAlignMiddle_Click); |
|||
//
|
|||
// miAlignBottom
|
|||
//
|
|||
this.miAlignBottom.Index = 2; |
|||
this.miAlignBottom.Text = "&Bottom"; |
|||
this.miAlignBottom.Click += new System.EventHandler(this.miAlignBottom_Click); |
|||
//
|
|||
// menuItem12
|
|||
//
|
|||
this.menuItem12.Index = 3; |
|||
this.menuItem12.Text = "-"; |
|||
//
|
|||
// miAlignLeft
|
|||
//
|
|||
this.miAlignLeft.Index = 4; |
|||
this.miAlignLeft.Text = "&Left"; |
|||
this.miAlignLeft.Click += new System.EventHandler(this.miAlignLeft_Click); |
|||
//
|
|||
// miAlignCenter
|
|||
//
|
|||
this.miAlignCenter.Index = 5; |
|||
this.miAlignCenter.Text = "&Center"; |
|||
this.miAlignCenter.Click += new System.EventHandler(this.miAlignCenter_Click); |
|||
//
|
|||
// miAlignRight
|
|||
//
|
|||
this.miAlignRight.Index = 6; |
|||
this.miAlignRight.Text = "&Right"; |
|||
this.miAlignRight.Click += new System.EventHandler(this.miAlignRight_Click); |
|||
//
|
|||
// menuItem9
|
|||
//
|
|||
this.menuItem9.Index = 4; |
|||
this.menuItem9.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] { |
|||
this.miSameHeight, |
|||
this.miSameWidth, |
|||
this.menuItem13, |
|||
this.miSameBoth}); |
|||
this.menuItem9.Text = "使用相同(&M)"; |
|||
//
|
|||
// miSameHeight
|
|||
//
|
|||
this.miSameHeight.Index = 0; |
|||
this.miSameHeight.Text = "Same &Height"; |
|||
this.miSameHeight.Click += new System.EventHandler(this.miSameHeight_Click); |
|||
//
|
|||
// miSameWidth
|
|||
//
|
|||
this.miSameWidth.Index = 1; |
|||
this.miSameWidth.Text = "Same &Width"; |
|||
this.miSameWidth.Click += new System.EventHandler(this.miSameWidth_Click); |
|||
//
|
|||
// menuItem13
|
|||
//
|
|||
this.menuItem13.Index = 2; |
|||
this.menuItem13.Text = "-"; |
|||
//
|
|||
// miSameBoth
|
|||
//
|
|||
this.miSameBoth.Index = 3; |
|||
this.miSameBoth.Text = "Same &Both"; |
|||
this.miSameBoth.Click += new System.EventHandler(this.miSameBoth_Click); |
|||
//
|
|||
// menuItem14
|
|||
//
|
|||
this.menuItem14.Index = 5; |
|||
this.menuItem14.Text = "-"; |
|||
//
|
|||
// miCopy
|
|||
//
|
|||
this.miCopy.Index = 6; |
|||
this.miCopy.Shortcut = System.Windows.Forms.Shortcut.CtrlC; |
|||
this.miCopy.Text = "复制(&C)"; |
|||
this.miCopy.Click += new System.EventHandler(this.miCopy_Click); |
|||
//
|
|||
// miPaste
|
|||
//
|
|||
this.miPaste.Index = 7; |
|||
this.miPaste.Shortcut = System.Windows.Forms.Shortcut.CtrlV; |
|||
this.miPaste.Text = "粘贴(&P)"; |
|||
this.miPaste.Click += new System.EventHandler(this.miPaste_Click); |
|||
//
|
|||
// miDeleteSelection
|
|||
//
|
|||
this.miDeleteSelection.Index = 8; |
|||
this.miDeleteSelection.Shortcut = System.Windows.Forms.Shortcut.Del; |
|||
this.miDeleteSelection.Text = "删除(&D)"; |
|||
this.miDeleteSelection.Click += new System.EventHandler(this.miDeleteSelection_Click); |
|||
//
|
|||
// menuItem4
|
|||
//
|
|||
this.menuItem4.Index = 2; |
|||
this.menuItem4.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] { |
|||
this.miAbout}); |
|||
this.menuItem4.Text = "帮助(&H)"; |
|||
//
|
|||
// miAbout
|
|||
//
|
|||
this.miAbout.Index = 0; |
|||
this.miAbout.Text = "关于(&A)"; |
|||
this.miAbout.Click += new System.EventHandler(this.miAbout_Click); |
|||
//
|
|||
// toolStrip
|
|||
//
|
|||
this.toolStrip.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { |
|||
this.tbNewForm, |
|||
this.tbOpenForm, |
|||
this.tbSaveForm, |
|||
this.toolStripSeparator3, |
|||
this.tbPreview, |
|||
this.toolStripSeparator2, |
|||
this.tbUndo, |
|||
this.tbRedo, |
|||
this.toolStripSeparator1, |
|||
this.tbDelete, |
|||
this.tbAlignLeft, |
|||
this.tbAlignCenter, |
|||
this.tbAlignRight, |
|||
this.tbAlignTop, |
|||
this.tbAlignMiddle, |
|||
this.tbAlignBottom, |
|||
this.toolStripSeparator4, |
|||
this.tbSameWidth, |
|||
this.tbSameHeight, |
|||
this.tbSameBoth}); |
|||
this.toolStrip.Location = new System.Drawing.Point(0, 0); |
|||
this.toolStrip.Name = "toolStrip"; |
|||
this.toolStrip.Size = new System.Drawing.Size(1008, 25); |
|||
this.toolStrip.TabIndex = 7; |
|||
this.toolStrip.Text = "toolStrip1"; |
|||
//
|
|||
// tbNewForm
|
|||
//
|
|||
this.tbNewForm.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image; |
|||
this.tbNewForm.Image = global::Smart.FormDesigner.Demo.Properties.Resources.new_from_16x; |
|||
this.tbNewForm.ImageTransparentColor = System.Drawing.Color.Magenta; |
|||
this.tbNewForm.Name = "tbNewForm"; |
|||
this.tbNewForm.Size = new System.Drawing.Size(23, 22); |
|||
this.tbNewForm.Text = "新建表单"; |
|||
this.tbNewForm.ToolTipText = "新建表单 (Ctrl + N)"; |
|||
this.tbNewForm.Click += new System.EventHandler(this.miNewForm_Click); |
|||
//
|
|||
// tbOpenForm
|
|||
//
|
|||
this.tbOpenForm.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image; |
|||
this.tbOpenForm.Image = global::Smart.FormDesigner.Demo.Properties.Resources.open_file_16x; |
|||
this.tbOpenForm.ImageTransparentColor = System.Drawing.Color.Magenta; |
|||
this.tbOpenForm.Name = "tbOpenForm"; |
|||
this.tbOpenForm.Size = new System.Drawing.Size(23, 22); |
|||
this.tbOpenForm.Text = "打开文件"; |
|||
this.tbOpenForm.ToolTipText = "打开文件 (Ctrl + O)"; |
|||
this.tbOpenForm.Click += new System.EventHandler(this.miOpenForm_Click); |
|||
//
|
|||
// tbSaveForm
|
|||
//
|
|||
this.tbSaveForm.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image; |
|||
this.tbSaveForm.Enabled = false; |
|||
this.tbSaveForm.Image = global::Smart.FormDesigner.Demo.Properties.Resources.save_16x; |
|||
this.tbSaveForm.ImageTransparentColor = System.Drawing.Color.Magenta; |
|||
this.tbSaveForm.Name = "tbSaveForm"; |
|||
this.tbSaveForm.Size = new System.Drawing.Size(23, 22); |
|||
this.tbSaveForm.Text = "保存表单"; |
|||
this.tbSaveForm.ToolTipText = "保存表单 (Ctrl + S)"; |
|||
this.tbSaveForm.Click += new System.EventHandler(this.miSaveForm_Click); |
|||
//
|
|||
// toolStripSeparator3
|
|||
//
|
|||
this.toolStripSeparator3.Name = "toolStripSeparator3"; |
|||
this.toolStripSeparator3.Size = new System.Drawing.Size(6, 25); |
|||
//
|
|||
// tbPreview
|
|||
//
|
|||
this.tbPreview.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image; |
|||
this.tbPreview.Enabled = false; |
|||
this.tbPreview.Image = global::Smart.FormDesigner.Demo.Properties.Resources.preview_16x; |
|||
this.tbPreview.ImageTransparentColor = System.Drawing.Color.Magenta; |
|||
this.tbPreview.Name = "tbPreview"; |
|||
this.tbPreview.Size = new System.Drawing.Size(23, 22); |
|||
this.tbPreview.Text = "预览"; |
|||
this.tbPreview.ToolTipText = "预览 (F5)"; |
|||
this.tbPreview.Click += new System.EventHandler(this.tbPreview_Click); |
|||
//
|
|||
// toolStripSeparator2
|
|||
//
|
|||
this.toolStripSeparator2.Name = "toolStripSeparator2"; |
|||
this.toolStripSeparator2.Size = new System.Drawing.Size(6, 25); |
|||
//
|
|||
// tbUndo
|
|||
//
|
|||
this.tbUndo.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image; |
|||
this.tbUndo.Enabled = false; |
|||
this.tbUndo.Image = global::Smart.FormDesigner.Demo.Properties.Resources.undo_16x; |
|||
this.tbUndo.ImageTransparentColor = System.Drawing.Color.Magenta; |
|||
this.tbUndo.Name = "tbUndo"; |
|||
this.tbUndo.Size = new System.Drawing.Size(23, 22); |
|||
this.tbUndo.Text = "撤销(Ctrl+Z)"; |
|||
this.tbUndo.Click += new System.EventHandler(this.miUndo_Click); |
|||
//
|
|||
// tbRedo
|
|||
//
|
|||
this.tbRedo.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image; |
|||
this.tbRedo.Enabled = false; |
|||
this.tbRedo.Image = global::Smart.FormDesigner.Demo.Properties.Resources.redo_16x; |
|||
this.tbRedo.ImageTransparentColor = System.Drawing.Color.Magenta; |
|||
this.tbRedo.Name = "tbRedo"; |
|||
this.tbRedo.Size = new System.Drawing.Size(23, 22); |
|||
this.tbRedo.Text = "重做(Ctrl+Y)"; |
|||
this.tbRedo.Click += new System.EventHandler(this.miRedo_Click); |
|||
//
|
|||
// toolStripSeparator1
|
|||
//
|
|||
this.toolStripSeparator1.Name = "toolStripSeparator1"; |
|||
this.toolStripSeparator1.Size = new System.Drawing.Size(6, 25); |
|||
//
|
|||
// tbDelete
|
|||
//
|
|||
this.tbDelete.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image; |
|||
this.tbDelete.Enabled = false; |
|||
this.tbDelete.Image = global::Smart.FormDesigner.Demo.Properties.Resources.delete_16x; |
|||
this.tbDelete.ImageTransparentColor = System.Drawing.Color.Magenta; |
|||
this.tbDelete.Name = "tbDelete"; |
|||
this.tbDelete.Size = new System.Drawing.Size(23, 22); |
|||
this.tbDelete.Text = "删除选中项"; |
|||
this.tbDelete.Click += new System.EventHandler(this.tbDelete_Click); |
|||
//
|
|||
// tbAlignLeft
|
|||
//
|
|||
this.tbAlignLeft.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image; |
|||
this.tbAlignLeft.Enabled = false; |
|||
this.tbAlignLeft.Image = global::Smart.FormDesigner.Demo.Properties.Resources.align_left_16x; |
|||
this.tbAlignLeft.ImageTransparentColor = System.Drawing.Color.Magenta; |
|||
this.tbAlignLeft.Name = "tbAlignLeft"; |
|||
this.tbAlignLeft.Size = new System.Drawing.Size(23, 22); |
|||
this.tbAlignLeft.Text = "左对齐"; |
|||
this.tbAlignLeft.Click += new System.EventHandler(this.miAlignLeft_Click); |
|||
//
|
|||
// tbAlignCenter
|
|||
//
|
|||
this.tbAlignCenter.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image; |
|||
this.tbAlignCenter.Enabled = false; |
|||
this.tbAlignCenter.Image = global::Smart.FormDesigner.Demo.Properties.Resources.align_center_16x; |
|||
this.tbAlignCenter.ImageTransparentColor = System.Drawing.Color.Magenta; |
|||
this.tbAlignCenter.Name = "tbAlignCenter"; |
|||
this.tbAlignCenter.Size = new System.Drawing.Size(23, 22); |
|||
this.tbAlignCenter.Text = "居中对齐"; |
|||
this.tbAlignCenter.Click += new System.EventHandler(this.miAlignCenter_Click); |
|||
//
|
|||
// tbAlignRight
|
|||
//
|
|||
this.tbAlignRight.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image; |
|||
this.tbAlignRight.Enabled = false; |
|||
this.tbAlignRight.Image = global::Smart.FormDesigner.Demo.Properties.Resources.align_right_16x; |
|||
this.tbAlignRight.ImageTransparentColor = System.Drawing.Color.Magenta; |
|||
this.tbAlignRight.Name = "tbAlignRight"; |
|||
this.tbAlignRight.Size = new System.Drawing.Size(23, 22); |
|||
this.tbAlignRight.Text = "右对齐"; |
|||
this.tbAlignRight.Click += new System.EventHandler(this.miAlignRight_Click); |
|||
//
|
|||
// tbAlignTop
|
|||
//
|
|||
this.tbAlignTop.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image; |
|||
this.tbAlignTop.Enabled = false; |
|||
this.tbAlignTop.Image = global::Smart.FormDesigner.Demo.Properties.Resources.align_top_16x; |
|||
this.tbAlignTop.ImageTransparentColor = System.Drawing.Color.Magenta; |
|||
this.tbAlignTop.Name = "tbAlignTop"; |
|||
this.tbAlignTop.Size = new System.Drawing.Size(23, 22); |
|||
this.tbAlignTop.Text = "顶端对齐"; |
|||
this.tbAlignTop.Click += new System.EventHandler(this.miAlignTop_Click); |
|||
//
|
|||
// tbAlignMiddle
|
|||
//
|
|||
this.tbAlignMiddle.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image; |
|||
this.tbAlignMiddle.Enabled = false; |
|||
this.tbAlignMiddle.Image = global::Smart.FormDesigner.Demo.Properties.Resources.align_middlle_16x; |
|||
this.tbAlignMiddle.ImageTransparentColor = System.Drawing.Color.Magenta; |
|||
this.tbAlignMiddle.Name = "tbAlignMiddle"; |
|||
this.tbAlignMiddle.Size = new System.Drawing.Size(23, 22); |
|||
this.tbAlignMiddle.Text = "中间对齐"; |
|||
this.tbAlignMiddle.Click += new System.EventHandler(this.miAlignMiddle_Click); |
|||
//
|
|||
// tbAlignBottom
|
|||
//
|
|||
this.tbAlignBottom.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image; |
|||
this.tbAlignBottom.Enabled = false; |
|||
this.tbAlignBottom.Image = global::Smart.FormDesigner.Demo.Properties.Resources.align_bottom_16x; |
|||
this.tbAlignBottom.ImageTransparentColor = System.Drawing.Color.Magenta; |
|||
this.tbAlignBottom.Name = "tbAlignBottom"; |
|||
this.tbAlignBottom.Size = new System.Drawing.Size(23, 22); |
|||
this.tbAlignBottom.Text = "底端对齐"; |
|||
this.tbAlignBottom.Click += new System.EventHandler(this.miAlignBottom_Click); |
|||
//
|
|||
// toolStripSeparator4
|
|||
//
|
|||
this.toolStripSeparator4.Name = "toolStripSeparator4"; |
|||
this.toolStripSeparator4.Size = new System.Drawing.Size(6, 25); |
|||
//
|
|||
// tbSameWidth
|
|||
//
|
|||
this.tbSameWidth.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image; |
|||
this.tbSameWidth.Enabled = false; |
|||
this.tbSameWidth.Image = global::Smart.FormDesigner.Demo.Properties.Resources.same_width_16x; |
|||
this.tbSameWidth.ImageTransparentColor = System.Drawing.Color.Magenta; |
|||
this.tbSameWidth.Name = "tbSameWidth"; |
|||
this.tbSameWidth.Size = new System.Drawing.Size(23, 22); |
|||
this.tbSameWidth.Text = "使宽度相同"; |
|||
this.tbSameWidth.Click += new System.EventHandler(this.miSameWidth_Click); |
|||
//
|
|||
// tbSameHeight
|
|||
//
|
|||
this.tbSameHeight.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image; |
|||
this.tbSameHeight.Enabled = false; |
|||
this.tbSameHeight.Image = global::Smart.FormDesigner.Demo.Properties.Resources.same_height_16x; |
|||
this.tbSameHeight.ImageTransparentColor = System.Drawing.Color.Magenta; |
|||
this.tbSameHeight.Name = "tbSameHeight"; |
|||
this.tbSameHeight.Size = new System.Drawing.Size(23, 22); |
|||
this.tbSameHeight.Text = "使高度相同"; |
|||
this.tbSameHeight.Click += new System.EventHandler(this.miSameHeight_Click); |
|||
//
|
|||
// tbSameBoth
|
|||
//
|
|||
this.tbSameBoth.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image; |
|||
this.tbSameBoth.Enabled = false; |
|||
this.tbSameBoth.Image = global::Smart.FormDesigner.Demo.Properties.Resources.same_size_16x; |
|||
this.tbSameBoth.ImageScaling = System.Windows.Forms.ToolStripItemImageScaling.None; |
|||
this.tbSameBoth.ImageTransparentColor = System.Drawing.Color.Magenta; |
|||
this.tbSameBoth.Name = "tbSameBoth"; |
|||
this.tbSameBoth.Size = new System.Drawing.Size(23, 22); |
|||
this.tbSameBoth.Text = "使大小相同"; |
|||
this.tbSameBoth.Click += new System.EventHandler(this.miSameBoth_Click); |
|||
//
|
|||
// dockPanel
|
|||
//
|
|||
this.dockPanel.AllowEndUserDocking = false; |
|||
this.dockPanel.AllowEndUserNestedDocking = false; |
|||
this.dockPanel.Dock = System.Windows.Forms.DockStyle.Fill; |
|||
this.dockPanel.DockBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(238)))), ((int)(((byte)(238)))), ((int)(((byte)(242))))); |
|||
this.dockPanel.DocumentStyle = WeifenLuo.WinFormsUI.Docking.DocumentStyle.DockingWindow; |
|||
this.dockPanel.Location = new System.Drawing.Point(0, 25); |
|||
this.dockPanel.Name = "dockPanel"; |
|||
this.dockPanel.Padding = new System.Windows.Forms.Padding(6); |
|||
this.dockPanel.ShowAutoHideContentOnHover = false; |
|||
this.dockPanel.ShowDocumentIcon = true; |
|||
this.dockPanel.Size = new System.Drawing.Size(1008, 552); |
|||
this.dockPanel.TabIndex = 8; |
|||
this.dockPanel.Theme = this.vS2015LightTheme1; |
|||
this.dockPanel.ActiveDocumentChanged += new System.EventHandler(this.dockPanel_ActiveDocumentChanged); |
|||
//
|
|||
// MainForm
|
|||
//
|
|||
this.AutoScaleBaseSize = new System.Drawing.Size(5, 13); |
|||
this.ClientSize = new System.Drawing.Size(1008, 577); |
|||
this.Controls.Add(this.dockPanel); |
|||
this.Controls.Add(this.toolStrip); |
|||
this.Font = new System.Drawing.Font("Tahoma", 8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(204))); |
|||
this.Menu = this.mainMenu; |
|||
this.Name = "MainForm"; |
|||
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; |
|||
this.Text = "表单设计器"; |
|||
this.toolStrip.ResumeLayout(false); |
|||
this.toolStrip.PerformLayout(); |
|||
this.ResumeLayout(false); |
|||
this.PerformLayout(); |
|||
|
|||
} |
|||
|
|||
private IContainer components; |
|||
|
|||
private MainMenu mainMenu; |
|||
private MenuItem miNewForm; |
|||
private MenuItem miOpenForm; |
|||
private MenuItem miSaveForm; |
|||
private MenuItem miExitDesigner; |
|||
private MenuItem miCopy; |
|||
private MenuItem miPaste; |
|||
private MenuItem miUndo; |
|||
private MenuItem miRedo; |
|||
private MenuItem miAlignTop; |
|||
private MenuItem miAlignMiddle; |
|||
private MenuItem miAlignBottom; |
|||
private MenuItem miAlignLeft; |
|||
private MenuItem miAlignCenter; |
|||
private MenuItem miAlignRight; |
|||
private MenuItem miSameHeight; |
|||
private MenuItem miSameWidth; |
|||
private MenuItem miSameBoth; |
|||
private MenuItem miDeleteSelection; |
|||
private MenuItem miAbout; |
|||
private MenuItem menuItem1; |
|||
private MenuItem menuItem2; |
|||
private MenuItem menuItem4; |
|||
private MenuItem menuItem6; |
|||
private MenuItem menuItem8; |
|||
private MenuItem menuItem9; |
|||
private MenuItem menuItem11; |
|||
private MenuItem menuItem12; |
|||
private MenuItem menuItem13; |
|||
private MenuItem menuItem14; |
|||
|
|||
private ToolStrip toolStrip; |
|||
private ToolStripButton tbNewForm; |
|||
private ToolStripButton tbOpenForm; |
|||
private ToolStripButton tbSaveForm; |
|||
private ToolStripButton tbUndo; |
|||
private ToolStripButton tbRedo; |
|||
private ToolStripButton tbAlignLeft; |
|||
private ToolStripButton tbAlignCenter; |
|||
private ToolStripButton tbAlignRight; |
|||
private ToolStripButton tbAlignTop; |
|||
private ToolStripButton tbAlignMiddle; |
|||
private ToolStripButton tbAlignBottom; |
|||
private ToolStripButton tbSameWidth; |
|||
private ToolStripButton tbSameHeight; |
|||
private ToolStripButton tbSameBoth; |
|||
private ToolStripSeparator toolStripSeparator1; |
|||
private ToolStripSeparator toolStripSeparator2; |
|||
private ToolStripSeparator toolStripSeparator4; |
|||
|
|||
private DockPanel dockPanel; |
|||
private VS2015LightTheme vS2015LightTheme1; |
|||
|
|||
#endregion
|
|||
|
|||
|
|||
} |
|||
} |
|||
@ -0,0 +1,132 @@ |
|||
<?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=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> |
|||
</resheader> |
|||
<resheader name="writer"> |
|||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> |
|||
</resheader> |
|||
<metadata name="mainMenu.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> |
|||
<value>13, 10</value> |
|||
</metadata> |
|||
<metadata name="toolStrip.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> |
|||
<value>116, 11</value> |
|||
</metadata> |
|||
<metadata name="vS2015LightTheme1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> |
|||
<value>219, 11</value> |
|||
</metadata> |
|||
<metadata name="$this.TrayHeight" type="System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> |
|||
<value>47</value> |
|||
</metadata> |
|||
</root> |
|||
@ -0,0 +1,19 @@ |
|||
using System; |
|||
using System.Windows.Forms; |
|||
|
|||
namespace Smart.FormDesigner.Demo |
|||
{ |
|||
static class Program |
|||
{ |
|||
/// <summary>
|
|||
/// 应用程序的主入口点。
|
|||
/// </summary>
|
|||
[STAThread] |
|||
static void Main() |
|||
{ |
|||
Application.EnableVisualStyles(); |
|||
Application.SetCompatibleTextRenderingDefault(false); |
|||
Application.Run(new MainForm()); |
|||
} |
|||
} |
|||
} |
|||
@ -0,0 +1,36 @@ |
|||
using System.Reflection; |
|||
using System.Runtime.CompilerServices; |
|||
using System.Runtime.InteropServices; |
|||
|
|||
// 有关程序集的一般信息由以下
|
|||
// 控制。更改这些特性值可修改
|
|||
// 与程序集关联的信息。
|
|||
[assembly: AssemblyTitle("Smart.FormDesigner.Demo")] |
|||
[assembly: AssemblyDescription("")] |
|||
[assembly: AssemblyConfiguration("")] |
|||
[assembly: AssemblyCompany("")] |
|||
[assembly: AssemblyProduct("Smart.FormDesigner.Demo")] |
|||
[assembly: AssemblyCopyright("Copyright © 2018")] |
|||
[assembly: AssemblyTrademark("")] |
|||
[assembly: AssemblyCulture("")] |
|||
|
|||
// 将 ComVisible 设置为 false 会使此程序集中的类型
|
|||
//对 COM 组件不可见。如果需要从 COM 访问此程序集中的类型
|
|||
//请将此类型的 ComVisible 特性设置为 true。
|
|||
[assembly: ComVisible(false)] |
|||
|
|||
// 如果此项目向 COM 公开,则下列 GUID 用于类型库的 ID
|
|||
[assembly: Guid("f0c044e1-0530-424e-be99-d182c9f5de99")] |
|||
|
|||
// 程序集的版本信息由下列四个值组成:
|
|||
//
|
|||
// 主版本
|
|||
// 次版本
|
|||
// 生成号
|
|||
// 修订号
|
|||
//
|
|||
// 可以指定所有值,也可以使用以下所示的 "*" 预置版本号和修订号
|
|||
// 方法是按如下所示使用“*”: :
|
|||
// [assembly: AssemblyVersion("1.0.*")]
|
|||
[assembly: AssemblyVersion("1.0.0.0")] |
|||
[assembly: AssemblyFileVersion("1.0.0.0")] |
|||
@ -0,0 +1,233 @@ |
|||
//------------------------------------------------------------------------------
|
|||
// <auto-generated>
|
|||
// 此代码由工具生成。
|
|||
// 运行时版本:4.0.30319.42000
|
|||
//
|
|||
// 对此文件的更改可能会导致不正确的行为,并且如果
|
|||
// 重新生成代码,这些更改将会丢失。
|
|||
// </auto-generated>
|
|||
//------------------------------------------------------------------------------
|
|||
|
|||
namespace Smart.FormDesigner.Demo.Properties { |
|||
using System; |
|||
|
|||
|
|||
/// <summary>
|
|||
/// 一个强类型的资源类,用于查找本地化的字符串等。
|
|||
/// </summary>
|
|||
// 此类是由 StronglyTypedResourceBuilder
|
|||
// 类通过类似于 ResGen 或 Visual Studio 的工具自动生成的。
|
|||
// 若要添加或移除成员,请编辑 .ResX 文件,然后重新运行 ResGen
|
|||
// (以 /str 作为命令选项),或重新生成 VS 项目。
|
|||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "17.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>
|
|||
/// 返回此类使用的缓存的 ResourceManager 实例。
|
|||
/// </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("Smart.FormDesigner.Demo.Properties.Resources", typeof(Resources).Assembly); |
|||
resourceMan = temp; |
|||
} |
|||
return resourceMan; |
|||
} |
|||
} |
|||
|
|||
/// <summary>
|
|||
/// 重写当前线程的 CurrentUICulture 属性,对
|
|||
/// 使用此强类型资源类的所有资源查找执行重写。
|
|||
/// </summary>
|
|||
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] |
|||
internal static global::System.Globalization.CultureInfo Culture { |
|||
get { |
|||
return resourceCulture; |
|||
} |
|||
set { |
|||
resourceCulture = value; |
|||
} |
|||
} |
|||
|
|||
/// <summary>
|
|||
/// 查找 System.Drawing.Bitmap 类型的本地化资源。
|
|||
/// </summary>
|
|||
internal static System.Drawing.Bitmap align_bottom_16x { |
|||
get { |
|||
object obj = ResourceManager.GetObject("align_bottom_16x", resourceCulture); |
|||
return ((System.Drawing.Bitmap)(obj)); |
|||
} |
|||
} |
|||
|
|||
/// <summary>
|
|||
/// 查找 System.Drawing.Bitmap 类型的本地化资源。
|
|||
/// </summary>
|
|||
internal static System.Drawing.Bitmap align_center_16x { |
|||
get { |
|||
object obj = ResourceManager.GetObject("align_center_16x", resourceCulture); |
|||
return ((System.Drawing.Bitmap)(obj)); |
|||
} |
|||
} |
|||
|
|||
/// <summary>
|
|||
/// 查找 System.Drawing.Bitmap 类型的本地化资源。
|
|||
/// </summary>
|
|||
internal static System.Drawing.Bitmap align_left_16x { |
|||
get { |
|||
object obj = ResourceManager.GetObject("align_left_16x", resourceCulture); |
|||
return ((System.Drawing.Bitmap)(obj)); |
|||
} |
|||
} |
|||
|
|||
/// <summary>
|
|||
/// 查找 System.Drawing.Bitmap 类型的本地化资源。
|
|||
/// </summary>
|
|||
internal static System.Drawing.Bitmap align_middlle_16x { |
|||
get { |
|||
object obj = ResourceManager.GetObject("align_middlle_16x", resourceCulture); |
|||
return ((System.Drawing.Bitmap)(obj)); |
|||
} |
|||
} |
|||
|
|||
/// <summary>
|
|||
/// 查找 System.Drawing.Bitmap 类型的本地化资源。
|
|||
/// </summary>
|
|||
internal static System.Drawing.Bitmap align_right_16x { |
|||
get { |
|||
object obj = ResourceManager.GetObject("align_right_16x", resourceCulture); |
|||
return ((System.Drawing.Bitmap)(obj)); |
|||
} |
|||
} |
|||
|
|||
/// <summary>
|
|||
/// 查找 System.Drawing.Bitmap 类型的本地化资源。
|
|||
/// </summary>
|
|||
internal static System.Drawing.Bitmap align_top_16x { |
|||
get { |
|||
object obj = ResourceManager.GetObject("align_top_16x", resourceCulture); |
|||
return ((System.Drawing.Bitmap)(obj)); |
|||
} |
|||
} |
|||
|
|||
/// <summary>
|
|||
/// 查找 System.Drawing.Bitmap 类型的本地化资源。
|
|||
/// </summary>
|
|||
internal static System.Drawing.Bitmap delete_16x { |
|||
get { |
|||
object obj = ResourceManager.GetObject("delete_16x", resourceCulture); |
|||
return ((System.Drawing.Bitmap)(obj)); |
|||
} |
|||
} |
|||
|
|||
/// <summary>
|
|||
/// 查找 System.Drawing.Bitmap 类型的本地化资源。
|
|||
/// </summary>
|
|||
internal static System.Drawing.Bitmap new_from_16x { |
|||
get { |
|||
object obj = ResourceManager.GetObject("new_from_16x", resourceCulture); |
|||
return ((System.Drawing.Bitmap)(obj)); |
|||
} |
|||
} |
|||
|
|||
/// <summary>
|
|||
/// 查找 System.Drawing.Bitmap 类型的本地化资源。
|
|||
/// </summary>
|
|||
internal static System.Drawing.Bitmap open_file_16x { |
|||
get { |
|||
object obj = ResourceManager.GetObject("open_file_16x", resourceCulture); |
|||
return ((System.Drawing.Bitmap)(obj)); |
|||
} |
|||
} |
|||
|
|||
/// <summary>
|
|||
/// 查找 System.Drawing.Bitmap 类型的本地化资源。
|
|||
/// </summary>
|
|||
internal static System.Drawing.Bitmap preview_16x { |
|||
get { |
|||
object obj = ResourceManager.GetObject("preview_16x", resourceCulture); |
|||
return ((System.Drawing.Bitmap)(obj)); |
|||
} |
|||
} |
|||
|
|||
/// <summary>
|
|||
/// 查找 System.Drawing.Bitmap 类型的本地化资源。
|
|||
/// </summary>
|
|||
internal static System.Drawing.Bitmap redo_16x { |
|||
get { |
|||
object obj = ResourceManager.GetObject("redo_16x", resourceCulture); |
|||
return ((System.Drawing.Bitmap)(obj)); |
|||
} |
|||
} |
|||
|
|||
/// <summary>
|
|||
/// 查找 System.Drawing.Bitmap 类型的本地化资源。
|
|||
/// </summary>
|
|||
internal static System.Drawing.Bitmap same_height_16x { |
|||
get { |
|||
object obj = ResourceManager.GetObject("same_height_16x", resourceCulture); |
|||
return ((System.Drawing.Bitmap)(obj)); |
|||
} |
|||
} |
|||
|
|||
/// <summary>
|
|||
/// 查找 System.Drawing.Bitmap 类型的本地化资源。
|
|||
/// </summary>
|
|||
internal static System.Drawing.Bitmap same_size_16x { |
|||
get { |
|||
object obj = ResourceManager.GetObject("same_size_16x", resourceCulture); |
|||
return ((System.Drawing.Bitmap)(obj)); |
|||
} |
|||
} |
|||
|
|||
/// <summary>
|
|||
/// 查找 System.Drawing.Bitmap 类型的本地化资源。
|
|||
/// </summary>
|
|||
internal static System.Drawing.Bitmap same_width_16x { |
|||
get { |
|||
object obj = ResourceManager.GetObject("same_width_16x", resourceCulture); |
|||
return ((System.Drawing.Bitmap)(obj)); |
|||
} |
|||
} |
|||
|
|||
/// <summary>
|
|||
/// 查找 System.Drawing.Bitmap 类型的本地化资源。
|
|||
/// </summary>
|
|||
internal static System.Drawing.Bitmap save_16x { |
|||
get { |
|||
object obj = ResourceManager.GetObject("save_16x", resourceCulture); |
|||
return ((System.Drawing.Bitmap)(obj)); |
|||
} |
|||
} |
|||
|
|||
/// <summary>
|
|||
/// 查找 System.Drawing.Bitmap 类型的本地化资源。
|
|||
/// </summary>
|
|||
internal static System.Drawing.Bitmap save_all_16x { |
|||
get { |
|||
object obj = ResourceManager.GetObject("save_all_16x", resourceCulture); |
|||
return ((System.Drawing.Bitmap)(obj)); |
|||
} |
|||
} |
|||
|
|||
/// <summary>
|
|||
/// 查找 System.Drawing.Bitmap 类型的本地化资源。
|
|||
/// </summary>
|
|||
internal static System.Drawing.Bitmap undo_16x { |
|||
get { |
|||
object obj = ResourceManager.GetObject("undo_16x", resourceCulture); |
|||
return ((System.Drawing.Bitmap)(obj)); |
|||
} |
|||
} |
|||
} |
|||
} |
|||
@ -0,0 +1,172 @@ |
|||
<?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=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> |
|||
</resheader> |
|||
<resheader name="writer"> |
|||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> |
|||
</resheader> |
|||
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" /> |
|||
<data name="align_top_16x" type="System.Resources.ResXFileRef, System.Windows.Forms"> |
|||
<value>..\images\align_top_16x.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> |
|||
</data> |
|||
<data name="save_all_16x" type="System.Resources.ResXFileRef, System.Windows.Forms"> |
|||
<value>..\images\save_all_16x.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> |
|||
</data> |
|||
<data name="undo_16x" type="System.Resources.ResXFileRef, System.Windows.Forms"> |
|||
<value>..\images\undo_16x.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> |
|||
</data> |
|||
<data name="align_center_16x" type="System.Resources.ResXFileRef, System.Windows.Forms"> |
|||
<value>..\images\align_center_16x.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> |
|||
</data> |
|||
<data name="align_bottom_16x" type="System.Resources.ResXFileRef, System.Windows.Forms"> |
|||
<value>..\images\align_bottom_16x.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> |
|||
</data> |
|||
<data name="align_left_16x" type="System.Resources.ResXFileRef, System.Windows.Forms"> |
|||
<value>..\images\align_left_16x.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> |
|||
</data> |
|||
<data name="same_height_16x" type="System.Resources.ResXFileRef, System.Windows.Forms"> |
|||
<value>..\images\same_height_16x.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> |
|||
</data> |
|||
<data name="preview_16x" type="System.Resources.ResXFileRef, System.Windows.Forms"> |
|||
<value>..\images\preview_16x.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> |
|||
</data> |
|||
<data name="align_middlle_16x" type="System.Resources.ResXFileRef, System.Windows.Forms"> |
|||
<value>..\images\align_middlle_16x.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> |
|||
</data> |
|||
<data name="redo_16x" type="System.Resources.ResXFileRef, System.Windows.Forms"> |
|||
<value>..\images\redo_16x.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> |
|||
</data> |
|||
<data name="save_16x" type="System.Resources.ResXFileRef, System.Windows.Forms"> |
|||
<value>..\images\save_16x.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> |
|||
</data> |
|||
<data name="align_right_16x" type="System.Resources.ResXFileRef, System.Windows.Forms"> |
|||
<value>..\images\align_right_16x.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> |
|||
</data> |
|||
<data name="new_from_16x" type="System.Resources.ResXFileRef, System.Windows.Forms"> |
|||
<value>..\images\new_form_16x.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> |
|||
</data> |
|||
<data name="same_size_16x" type="System.Resources.ResXFileRef, System.Windows.Forms"> |
|||
<value>..\images\same_size_16x.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> |
|||
</data> |
|||
<data name="same_width_16x" type="System.Resources.ResXFileRef, System.Windows.Forms"> |
|||
<value>..\images\same_width_16x.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> |
|||
</data> |
|||
<data name="open_file_16x" type="System.Resources.ResXFileRef, System.Windows.Forms"> |
|||
<value>..\images\open_file_16x.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> |
|||
</data> |
|||
<data name="delete_16x" type="System.Resources.ResXFileRef, System.Windows.Forms"> |
|||
<value>..\images\delete_16x.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> |
|||
</data> |
|||
</root> |
|||
@ -0,0 +1,26 @@ |
|||
//------------------------------------------------------------------------------
|
|||
// <auto-generated>
|
|||
// 此代码由工具生成。
|
|||
// 运行时版本:4.0.30319.42000
|
|||
//
|
|||
// 对此文件的更改可能会导致不正确的行为,并且如果
|
|||
// 重新生成代码,这些更改将会丢失。
|
|||
// </auto-generated>
|
|||
//------------------------------------------------------------------------------
|
|||
|
|||
namespace Smart.FormDesigner.Demo.Properties { |
|||
|
|||
|
|||
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] |
|||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "17.9.0.0")] |
|||
internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase { |
|||
|
|||
private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); |
|||
|
|||
public static Settings Default { |
|||
get { |
|||
return defaultInstance; |
|||
} |
|||
} |
|||
} |
|||
} |
|||
@ -0,0 +1,7 @@ |
|||
<?xml version='1.0' encoding='utf-8'?> |
|||
<SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)"> |
|||
<Profiles> |
|||
<Profile Name="(Default)" /> |
|||
</Profiles> |
|||
<Settings /> |
|||
</SettingsFile> |
|||
@ -0,0 +1,58 @@ |
|||
namespace Smart.FormDesigner.Demo |
|||
{ |
|||
partial class PropertyWindow |
|||
{ |
|||
/// <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.Propertybox = new Smart.FormDesigner.Demo.PropertyboxControl(); |
|||
this.SuspendLayout(); |
|||
//
|
|||
// Propertybox
|
|||
//
|
|||
this.Propertybox.Dock = System.Windows.Forms.DockStyle.Fill; |
|||
this.Propertybox.Location = new System.Drawing.Point(0, 0); |
|||
this.Propertybox.Name = "Propertybox"; |
|||
this.Propertybox.Size = new System.Drawing.Size(204, 461); |
|||
this.Propertybox.TabIndex = 0; |
|||
//
|
|||
// PropertyWindow
|
|||
//
|
|||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); |
|||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; |
|||
this.ClientSize = new System.Drawing.Size(204, 461); |
|||
this.Controls.Add(this.Propertybox); |
|||
this.Name = "PropertyWindow"; |
|||
this.Text = "属性"; |
|||
this.ResumeLayout(false); |
|||
|
|||
} |
|||
|
|||
#endregion
|
|||
|
|||
internal PropertyboxControl Propertybox; |
|||
} |
|||
} |
|||
@ -0,0 +1,15 @@ |
|||
using System.Windows.Forms; |
|||
using WeifenLuo.WinFormsUI.Docking; |
|||
|
|||
namespace Smart.FormDesigner.Demo |
|||
{ |
|||
public partial class PropertyWindow : DockContent |
|||
{ |
|||
public PropertyWindow() |
|||
{ |
|||
InitializeComponent(); |
|||
this.Propertybox.ShowEventTab = true; |
|||
} |
|||
|
|||
} |
|||
} |
|||
@ -0,0 +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=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> |
|||
</resheader> |
|||
<resheader name="writer"> |
|||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> |
|||
</resheader> |
|||
</root> |
|||
@ -0,0 +1,145 @@ |
|||
<?xml version="1.0" encoding="utf-8"?> |
|||
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> |
|||
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" /> |
|||
<PropertyGroup> |
|||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> |
|||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> |
|||
<ProjectGuid>{F0C044E1-0530-424E-BE99-D182C9F5DE99}</ProjectGuid> |
|||
<OutputType>WinExe</OutputType> |
|||
<RootNamespace>Smart.FormDesigner.Demo</RootNamespace> |
|||
<AssemblyName>Smart.FormDesigner.Demo</AssemblyName> |
|||
<TargetFrameworkVersion>v4.6.2</TargetFrameworkVersion> |
|||
<FileAlignment>512</FileAlignment> |
|||
<Deterministic>true</Deterministic> |
|||
<TargetFrameworkProfile /> |
|||
</PropertyGroup> |
|||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> |
|||
<PlatformTarget>AnyCPU</PlatformTarget> |
|||
<DebugSymbols>true</DebugSymbols> |
|||
<DebugType>full</DebugType> |
|||
<Optimize>false</Optimize> |
|||
<OutputPath>bin\Debug\</OutputPath> |
|||
<DefineConstants>DEBUG;TRACE</DefineConstants> |
|||
<ErrorReport>prompt</ErrorReport> |
|||
<WarningLevel>4</WarningLevel> |
|||
<Prefer32Bit>false</Prefer32Bit> |
|||
</PropertyGroup> |
|||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> |
|||
<PlatformTarget>AnyCPU</PlatformTarget> |
|||
<DebugType>pdbonly</DebugType> |
|||
<Optimize>true</Optimize> |
|||
<OutputPath>bin\Release\</OutputPath> |
|||
<DefineConstants>TRACE</DefineConstants> |
|||
<ErrorReport>prompt</ErrorReport> |
|||
<WarningLevel>4</WarningLevel> |
|||
<Prefer32Bit>false</Prefer32Bit> |
|||
</PropertyGroup> |
|||
<ItemGroup> |
|||
<Reference Include="Smart.FormDesigner, Version=1.2.0.0, Culture=neutral, processorArchitecture=MSIL"> |
|||
<HintPath>packages\Smart.FormDesigner.1.2.0\lib\net40\Smart.FormDesigner.dll</HintPath> |
|||
</Reference> |
|||
<Reference Include="System" /> |
|||
<Reference Include="System.ComponentModel.DataAnnotations" /> |
|||
<Reference Include="System.Core" /> |
|||
<Reference Include="System.Data.Linq" /> |
|||
<Reference Include="System.Xml.Linq" /> |
|||
<Reference Include="System.Data.DataSetExtensions" /> |
|||
<Reference Include="Microsoft.CSharp" /> |
|||
<Reference Include="System.Data" /> |
|||
<Reference Include="System.Deployment" /> |
|||
<Reference Include="System.Drawing" /> |
|||
<Reference Include="System.Windows.Forms" /> |
|||
<Reference Include="System.Xml" /> |
|||
<Reference Include="WeifenLuo.WinFormsUI.Docking, Version=3.0.6.0, Culture=neutral, PublicKeyToken=5cded1a1a0a7b481, processorArchitecture=MSIL"> |
|||
<HintPath>packages\DockPanelSuite.3.0.6\lib\net40\WeifenLuo.WinFormsUI.Docking.dll</HintPath> |
|||
</Reference> |
|||
<Reference Include="WeifenLuo.WinFormsUI.Docking.ThemeVS2015, Version=3.0.6.0, Culture=neutral, PublicKeyToken=5cded1a1a0a7b481, processorArchitecture=MSIL"> |
|||
<HintPath>packages\DockPanelSuite.ThemeVS2015.3.0.6\lib\net40\WeifenLuo.WinFormsUI.Docking.ThemeVS2015.dll</HintPath> |
|||
</Reference> |
|||
</ItemGroup> |
|||
<ItemGroup> |
|||
<Compile Include="MainForm.cs"> |
|||
<SubType>Form</SubType> |
|||
</Compile> |
|||
<Compile Include="DesignerDocument.cs"> |
|||
<SubType>Form</SubType> |
|||
</Compile> |
|||
<Compile Include="CustomForm.cs"> |
|||
<SubType>Form</SubType> |
|||
</Compile> |
|||
<Compile Include="CustomForm.Designer.cs"> |
|||
<DependentUpon>CustomForm.cs</DependentUpon> |
|||
</Compile> |
|||
<Compile Include="Program.cs" /> |
|||
<Compile Include="Properties\AssemblyInfo.cs" /> |
|||
<Compile Include="PropertyWindow.cs"> |
|||
<SubType>Form</SubType> |
|||
</Compile> |
|||
<Compile Include="PropertyWindow.Designer.cs"> |
|||
<DependentUpon>PropertyWindow.cs</DependentUpon> |
|||
</Compile> |
|||
<Compile Include="ToolboxWindow.cs"> |
|||
<SubType>Form</SubType> |
|||
</Compile> |
|||
<Compile Include="ToolboxWindow.Designer.cs"> |
|||
<DependentUpon>ToolboxWindow.cs</DependentUpon> |
|||
</Compile> |
|||
<EmbeddedResource Include="DesignerDocument.resx"> |
|||
<DependentUpon>DesignerDocument.cs</DependentUpon> |
|||
</EmbeddedResource> |
|||
<EmbeddedResource Include="MainForm.resx"> |
|||
<DependentUpon>MainForm.cs</DependentUpon> |
|||
<SubType>Designer</SubType> |
|||
</EmbeddedResource> |
|||
<EmbeddedResource Include="CustomForm.resx"> |
|||
<DependentUpon>CustomForm.cs</DependentUpon> |
|||
</EmbeddedResource> |
|||
<EmbeddedResource Include="Properties\Resources.resx"> |
|||
<Generator>ResXFileCodeGenerator</Generator> |
|||
<LastGenOutput>Resources.Designer.cs</LastGenOutput> |
|||
<SubType>Designer</SubType> |
|||
</EmbeddedResource> |
|||
<Compile Include="Properties\Resources.Designer.cs"> |
|||
<AutoGen>True</AutoGen> |
|||
<DependentUpon>Resources.resx</DependentUpon> |
|||
<DesignTime>True</DesignTime> |
|||
</Compile> |
|||
<EmbeddedResource Include="PropertyWindow.resx"> |
|||
<DependentUpon>PropertyWindow.cs</DependentUpon> |
|||
</EmbeddedResource> |
|||
<EmbeddedResource Include="ToolboxWindow.resx"> |
|||
<DependentUpon>ToolboxWindow.cs</DependentUpon> |
|||
</EmbeddedResource> |
|||
<None Include="app.config" /> |
|||
<None Include="packages.config" /> |
|||
<None Include="Properties\Settings.settings"> |
|||
<Generator>SettingsSingleFileGenerator</Generator> |
|||
<LastGenOutput>Settings.Designer.cs</LastGenOutput> |
|||
</None> |
|||
<Compile Include="Properties\Settings.Designer.cs"> |
|||
<AutoGen>True</AutoGen> |
|||
<DependentUpon>Settings.settings</DependentUpon> |
|||
<DesignTimeSharedInput>True</DesignTimeSharedInput> |
|||
</Compile> |
|||
</ItemGroup> |
|||
<ItemGroup> |
|||
<Content Include="images\align_bottom_16x.png" /> |
|||
<Content Include="images\align_left_16x.png" /> |
|||
<Content Include="images\align_right_16x.png" /> |
|||
<Content Include="images\align_top_16x.png" /> |
|||
<Content Include="images\align_center_16x.png" /> |
|||
<Content Include="images\align_middlle_16x.png" /> |
|||
<Content Include="images\delete_16x.png" /> |
|||
<Content Include="images\preview_16x.png" /> |
|||
<Content Include="images\new_form_16x.png" /> |
|||
<Content Include="images\open_file_16x.png" /> |
|||
<Content Include="images\redo_16x.png" /> |
|||
<Content Include="images\same_height_16x.png" /> |
|||
<Content Include="images\same_width_16x.png" /> |
|||
<Content Include="images\save_all_16x.png" /> |
|||
<Content Include="images\same_size_16x.png" /> |
|||
<Content Include="images\save_16x.png" /> |
|||
<Content Include="images\undo_16x.png" /> |
|||
</ItemGroup> |
|||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> |
|||
</Project> |
|||
@ -0,0 +1,25 @@ |
|||
|
|||
Microsoft Visual Studio Solution File, Format Version 12.00 |
|||
# Visual Studio 15 |
|||
VisualStudioVersion = 15.0.28010.2036 |
|||
MinimumVisualStudioVersion = 10.0.40219.1 |
|||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Smart.FormDesigner.Demo", "Smart.FormDesigner.Demo.csproj", "{F0C044E1-0530-424E-BE99-D182C9F5DE99}" |
|||
EndProject |
|||
Global |
|||
GlobalSection(SolutionConfigurationPlatforms) = preSolution |
|||
Debug|Any CPU = Debug|Any CPU |
|||
Release|Any CPU = Release|Any CPU |
|||
EndGlobalSection |
|||
GlobalSection(ProjectConfigurationPlatforms) = postSolution |
|||
{F0C044E1-0530-424E-BE99-D182C9F5DE99}.Debug|Any CPU.ActiveCfg = Debug|Any CPU |
|||
{F0C044E1-0530-424E-BE99-D182C9F5DE99}.Debug|Any CPU.Build.0 = Debug|Any CPU |
|||
{F0C044E1-0530-424E-BE99-D182C9F5DE99}.Release|Any CPU.ActiveCfg = Release|Any CPU |
|||
{F0C044E1-0530-424E-BE99-D182C9F5DE99}.Release|Any CPU.Build.0 = Release|Any CPU |
|||
EndGlobalSection |
|||
GlobalSection(SolutionProperties) = preSolution |
|||
HideSolutionNode = FALSE |
|||
EndGlobalSection |
|||
GlobalSection(ExtensibilityGlobals) = postSolution |
|||
SolutionGuid = {D7F8BA1B-659E-4E01-BE4F-CA4CB452875D} |
|||
EndGlobalSection |
|||
EndGlobal |
|||
@ -0,0 +1,60 @@ |
|||
namespace Smart.FormDesigner.Demo |
|||
{ |
|||
partial class ToolboxWindow |
|||
{ |
|||
/// <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.Toolbox = new Smart.FormDesigner.ToolboxControl(); |
|||
this.SuspendLayout(); |
|||
//
|
|||
// Toolbox
|
|||
//
|
|||
this.Toolbox.BackColor = System.Drawing.SystemColors.GradientActiveCaption; |
|||
this.Toolbox.Designer = null; |
|||
this.Toolbox.Dock = System.Windows.Forms.DockStyle.Fill; |
|||
this.Toolbox.Location = new System.Drawing.Point(0, 0); |
|||
this.Toolbox.Name = "Toolbox"; |
|||
this.Toolbox.Size = new System.Drawing.Size(184, 461); |
|||
this.Toolbox.TabIndex = 0; |
|||
//
|
|||
// ToolboxWindow
|
|||
//
|
|||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); |
|||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; |
|||
this.ClientSize = new System.Drawing.Size(184, 461); |
|||
this.Controls.Add(this.Toolbox); |
|||
this.Name = "ToolboxWindow"; |
|||
this.Text = "工具箱"; |
|||
this.ResumeLayout(false); |
|||
|
|||
} |
|||
|
|||
#endregion
|
|||
|
|||
internal ToolboxControl Toolbox; |
|||
} |
|||
} |
|||
@ -0,0 +1,68 @@ |
|||
using System.ComponentModel; |
|||
using System.Windows.Forms; |
|||
using WeifenLuo.WinFormsUI.Docking; |
|||
|
|||
namespace Smart.FormDesigner.Demo |
|||
{ |
|||
public partial class ToolboxWindow : DockContent |
|||
{ |
|||
public ToolboxWindow() |
|||
{ |
|||
InitializeComponent(); |
|||
InitToolbox(); |
|||
} |
|||
|
|||
private void InitToolbox() |
|||
{ |
|||
string groupName = "公共控件"; |
|||
this.Toolbox.AddToolboxItem(typeof(Button), groupName); |
|||
this.Toolbox.AddToolboxItem(typeof(CheckBox), groupName); |
|||
this.Toolbox.AddToolboxItem(typeof(CheckedListBox), groupName); |
|||
this.Toolbox.AddToolboxItem(typeof(ComboBox), groupName); |
|||
this.Toolbox.AddToolboxItem(typeof(DateTimePicker), groupName); |
|||
this.Toolbox.AddToolboxItem(typeof(Label), groupName); |
|||
this.Toolbox.AddToolboxItem(typeof(LinkLabel), groupName); |
|||
this.Toolbox.AddToolboxItem(typeof(ListBox), groupName); |
|||
this.Toolbox.AddToolboxItem(typeof(ListView), groupName); |
|||
this.Toolbox.AddToolboxItem(typeof(MaskedTextBox), groupName); |
|||
this.Toolbox.AddToolboxItem(typeof(MonthCalendar), groupName); |
|||
this.Toolbox.AddToolboxItem(typeof(NotifyIcon), groupName); |
|||
this.Toolbox.AddToolboxItem(typeof(NumericUpDown), groupName); |
|||
this.Toolbox.AddToolboxItem(typeof(PictureBox), groupName); |
|||
this.Toolbox.AddToolboxItem(typeof(ProgressBar), groupName); |
|||
this.Toolbox.AddToolboxItem(typeof(RadioButton), groupName); |
|||
this.Toolbox.AddToolboxItem(typeof(RichTextBox), groupName); |
|||
this.Toolbox.AddToolboxItem(typeof(TextBox), groupName); |
|||
this.Toolbox.AddToolboxItem(typeof(ToolTip), groupName); |
|||
this.Toolbox.AddToolboxItem(typeof(TreeView), groupName); |
|||
this.Toolbox.AddToolboxItem(typeof(WebBrowser), groupName); |
|||
|
|||
groupName = "容器"; |
|||
this.Toolbox.AddToolboxItem(typeof(FlowLayoutPanel), groupName); |
|||
this.Toolbox.AddToolboxItem(typeof(GroupBox), groupName); |
|||
this.Toolbox.AddToolboxItem(typeof(Panel), groupName); |
|||
this.Toolbox.AddToolboxItem(typeof(SplitContainer), groupName); |
|||
this.Toolbox.AddToolboxItem(typeof(TabControl), groupName); |
|||
this.Toolbox.AddToolboxItem(typeof(TableLayoutPanel), groupName); |
|||
|
|||
|
|||
groupName = "菜单和工具栏"; |
|||
this.Toolbox.AddToolboxItem(typeof(ContextMenuStrip), groupName); |
|||
this.Toolbox.AddToolboxItem(typeof(MenuStrip), groupName); |
|||
this.Toolbox.AddToolboxItem(typeof(StatusStrip), groupName); |
|||
this.Toolbox.AddToolboxItem(typeof(ToolStrip), groupName); |
|||
this.Toolbox.AddToolboxItem(typeof(ToolStripContainer), groupName); |
|||
|
|||
groupName = "数据"; |
|||
this.Toolbox.AddToolboxItem(typeof(BindingNavigator), groupName); |
|||
this.Toolbox.AddToolboxItem(typeof(BindingSource), groupName); |
|||
this.Toolbox.AddToolboxItem(typeof(DataGridView), groupName); |
|||
|
|||
groupName = "组件"; |
|||
this.Toolbox.AddToolboxItem(typeof(BackgroundWorker), groupName); |
|||
this.Toolbox.AddToolboxItem(typeof(ErrorProvider), groupName); |
|||
this.Toolbox.AddToolboxItem(typeof(Timer), groupName); |
|||
|
|||
} |
|||
} |
|||
} |
|||
@ -0,0 +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=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> |
|||
</resheader> |
|||
<resheader name="writer"> |
|||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> |
|||
</resheader> |
|||
</root> |
|||
@ -0,0 +1,3 @@ |
|||
<?xml version="1.0" encoding="utf-8"?> |
|||
<configuration> |
|||
<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.2"/></startup></configuration> |
|||
|
After Width: | Height: | Size: 178 B |
|
After Width: | Height: | Size: 178 B |
|
After Width: | Height: | Size: 177 B |
|
After Width: | Height: | Size: 195 B |
|
After Width: | Height: | Size: 170 B |
|
After Width: | Height: | Size: 198 B |
|
After Width: | Height: | Size: 200 B |
|
After Width: | Height: | Size: 178 B |
|
After Width: | Height: | Size: 150 B |
|
After Width: | Height: | Size: 379 B |
|
After Width: | Height: | Size: 523 B |
|
After Width: | Height: | Size: 66 KiB |
|
After Width: | Height: | Size: 310 B |
|
After Width: | Height: | Size: 360 B |
|
After Width: | Height: | Size: 290 B |
|
After Width: | Height: | Size: 450 B |
|
After Width: | Height: | Size: 180 B |
|
After Width: | Height: | Size: 209 B |
|
After Width: | Height: | Size: 280 B |
|
After Width: | Height: | Size: 204 B |
|
After Width: | Height: | Size: 236 B |
|
After Width: | Height: | Size: 478 B |
@ -0,0 +1,6 @@ |
|||
<?xml version="1.0" encoding="utf-8"?> |
|||
<packages> |
|||
<package id="DockPanelSuite" version="3.0.6" targetFramework="net40" /> |
|||
<package id="DockPanelSuite.ThemeVS2015" version="3.0.6" targetFramework="net40" /> |
|||
<package id="Smart.FormDesigner" version="1.2.0" targetFramework="net40" /> |
|||
</packages> |
|||
|
After Width: | Height: | Size: 17 KiB |