Commit 62e9eed8 HZH

添加思维导图

1 个父辈 93c93fa9
// ***********************************************************************
// Assembly : HZH_Controls
// Created : 2019-09-11
//
// ***********************************************************************
// <copyright file="MindMappingItemEntity.cs">
// Copyright by Huang Zhenghui(黄正辉) All, QQ group:568015492 QQ:623128629 Email:623128629@qq.com
// </copyright>
//
// Blog: https://www.cnblogs.com/bfyx
// GitHub:https://github.com/kwwwvagaa/NetWinformControl
// gitee:https://gitee.com/kwwwvagaa/net_winform_custom_control.git
//
// If you use this code, please keep this note.
// ***********************************************************************
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Drawing;
namespace HZH_Controls.Controls
{
/// <summary>
/// Class MindMappingItemEntity.
/// </summary>
public class MindMappingItemEntity
{
/// <summary>
/// Gets or sets the identifier.
/// </summary>
/// <value>The identifier.</value>
public string ID { get; set; }
private string _text;
/// <summary>
/// Gets or sets the text.
/// </summary>
/// <value>The text.</value>
public string Text
{
get { return _text; }
set
{
_text = value;
ResetSize();
}
}
/// <summary>
/// Gets or sets the data source.
/// </summary>
/// <value>The data source.</value>
public object DataSource { get; set; }
/// <summary>
/// The childrens
/// </summary>
private MindMappingItemEntity[] _Childrens;
/// <summary>
/// Gets or sets the childrens.
/// </summary>
/// <value>The childrens.</value>
public MindMappingItemEntity[] Childrens
{
get { return _Childrens; }
set
{
_Childrens = value;
if (value != null && value.Length > 0)
{
value.ToList().ForEach(p => { if (p != null) { p.ParentItem = this; } });
}
}
}
/// <summary>
/// The back color
/// </summary>
private Color backColor = Color.Transparent;
/// <summary>
/// Gets or sets the color of the back.
/// </summary>
/// <value>The color of the back.</value>
public Color BackColor
{
get { return backColor; }
set { backColor = value; }
}
private Font font = new Font("微软雅黑", 10);
public Font Font
{
get { return font; }
set
{
font = value;
ResetSize();
}
}
/// <summary>
/// The fore color
/// </summary>
private Color foreColor = Color.Black;
/// <summary>
/// Gets or sets the color of the fore.
/// </summary>
/// <value>The color of the fore.</value>
public Color ForeColor
{
get { return foreColor; }
set { foreColor = value; }
}
private bool _IsExpansion = false;
/// <summary>
/// Gets or sets a value indicating whether the instance is expanded.
/// </summary>
/// <value><c>true</c> if this instance is expansion; otherwise, <c>false</c>.</value>
public bool IsExpansion
{
get
{
return _IsExpansion;
}
set
{
if (value == _IsExpansion)
return;
_IsExpansion = value;
if (!value)
{
_Childrens.ToList().ForEach(p => { if (p != null) { p.IsExpansion = false; } });
}
}
}
/// <summary>
/// Gets the parent item.
/// </summary>
/// <value>The parent item.</value>
public MindMappingItemEntity ParentItem { get; private set; }
/// <summary>
/// Gets all childrens maximum show count.
/// </summary>
/// <value>All childrens maximum show count.</value>
public int AllChildrensMaxShowHeight { get { return GetAllChildrensMaxShowHeight(); } }
/// <summary>
/// Gets the maximum level.
/// </summary>
/// <value>The maximum level.</value>
public int AllChildrensMaxShowWidth { get { return GetAllChildrensMaxShowWidth(); } }
/// <summary>
/// Gets all childrens maximum show count.
/// </summary>
/// <returns>System.Int32.</returns>
private int GetAllChildrensMaxShowHeight()
{
if (!_IsExpansion || _Childrens == null || _Childrens.Length <= 0)
return ItemHeight + 10;
else
{
return _Childrens.Sum(p => p == null ? 0 : p.AllChildrensMaxShowHeight);
}
}
/// <summary>
/// Gets the maximum level.
/// </summary>
/// <returns>System.Int32.</returns>
private int GetAllChildrensMaxShowWidth()
{
if (!_IsExpansion || _Childrens == null || _Childrens.Length <= 0)
return ItemWidth + 50;
else
{
return 1 + _Childrens.Max(p => p == null ? 0 : p.AllChildrensMaxShowWidth);
}
}
/// <summary>
/// Gets or sets the working rectangle.
/// </summary>
/// <value>The working rectangle.</value>
internal RectangleF WorkingRectangle { get; set; }
/// <summary>
/// Gets or sets the draw rectangle.
/// </summary>
/// <value>The draw rectangle.</value>
internal RectangleF DrawRectangle { get; set; }
/// <summary>
/// Gets or sets the expansion rectangle.
/// </summary>
/// <value>The expansion rectangle.</value>
internal RectangleF ExpansionRectangle { get; set; }
/// <summary>
/// Gets the height of the item.
/// </summary>
/// <value>The height of the item.</value>
private int ItemHeight { private get; private set; }
/// <summary>
/// Gets the width of the item.
/// </summary>
/// <value>The width of the item.</value>
private int ItemWidth { private get; private set; }
/// <summary>
/// Resets the size.
/// </summary>
private void ResetSize()
{
string _t = _text;
if (string.IsNullOrEmpty(_t))
{
_t = "aaaa";
}
Bitmap bit = new Bitmap(1, 1);
var g = Graphics.FromImage(bit);
var size = g.MeasureString(_t, font);
g.Dispose();
bit.Dispose();
ItemHeight = (int)size.Height;
ItemWidth = (int)size.Width;
}
}
}
namespace HZH_Controls.Controls
{
partial class UCMindMappingPanel
{
/// <summary>
/// 必需的设计器变量。
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// 清理所有正在使用的资源。
/// </summary>
/// <param name="disposing">如果应释放托管资源,为 true;否则为 false。</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region 组件设计器生成的代码
/// <summary>
/// 设计器支持所需的方法 - 不要
/// 使用代码编辑器修改此方法的内容。
/// </summary>
private void InitializeComponent()
{
this.ucMindMapping1 = new HZH_Controls.Controls.UCMindMapping();
this.SuspendLayout();
//
// ucMindMapping1
//
this.ucMindMapping1.Location = new System.Drawing.Point(0, 0);
this.ucMindMapping1.Name = "ucMindMapping1";
this.ucMindMapping1.Size = new System.Drawing.Size(200, 200);
this.ucMindMapping1.TabIndex = 0;
//
// UCMindMappingPanel
//
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None;
this.AutoScroll = true;
this.BackColor = System.Drawing.Color.White;
this.Controls.Add(this.ucMindMapping1);
this.Name = "UCMindMappingPanel";
this.Size = new System.Drawing.Size(200, 200);
this.ResumeLayout(false);
}
#endregion
private UCMindMapping ucMindMapping1;
}
}
// ***********************************************************************
// Assembly : HZH_Controls
// Created : 2019-09-11
//
// ***********************************************************************
// <copyright file="UCMindMappingPanel.cs">
// Copyright by Huang Zhenghui(黄正辉) All, QQ group:568015492 QQ:623128629 Email:623128629@qq.com
// </copyright>
//
// Blog: https://www.cnblogs.com/bfyx
// GitHub:https://github.com/kwwwvagaa/NetWinformControl
// gitee:https://gitee.com/kwwwvagaa/net_winform_custom_control.git
//
// If you use this code, please keep this note.
// ***********************************************************************
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Linq;
using System.Text;
using System.Windows.Forms;
namespace HZH_Controls.Controls
{
/// <summary>
/// Class UCMindMappingPanel.
/// Implements the <see cref="System.Windows.Forms.UserControl" />
/// </summary>
/// <seealso cref="System.Windows.Forms.UserControl" />
public partial class UCMindMappingPanel : UserControl
{
/// <summary>
/// The data source
/// </summary>
private MindMappingItemEntity dataSource;
/// <summary>
/// Gets or sets the data source.
/// </summary>
/// <value>The data source.</value>
[Description("数据源"), Category("自定义")]
public MindMappingItemEntity DataSource
{
get { return dataSource; }
set
{
dataSource = value;
this.ucMindMapping1.DataSource = value;
}
}
/// <summary>
/// Gets or sets the data source.
/// </summary>
/// <value>The data source.</value>
[Description("数据源"), Category("自定义")]
public event EventHandler ItemClicked;
/// <summary>
/// The line color
/// </summary>
private Color lineColor = Color.Black;
/// <summary>
/// Gets or sets the color of the line.
/// </summary>
/// <value>The color of the line.</value>
[Description("线条颜色"), Category("自定义")]
public Color LineColor
{
get { return lineColor; }
set
{
lineColor = value;
this.ucMindMapping1.LineColor = value;
}
}
/// <summary>
/// Initializes a new instance of the <see cref="UCMindMappingPanel"/> class.
/// </summary>
public UCMindMappingPanel()
{
this.SetStyle(ControlStyles.AllPaintingInWmPaint, true);
this.SetStyle(ControlStyles.DoubleBuffer, true);
this.SetStyle(ControlStyles.ResizeRedraw, true);
this.SetStyle(ControlStyles.Selectable, true);
this.SetStyle(ControlStyles.SupportsTransparentBackColor, true);
this.SetStyle(ControlStyles.UserPaint, true);
InitializeComponent();
ucMindMapping1.ItemClicked += ucMindMapping1_ItemClicked;
}
void ucMindMapping1_ItemClicked(object sender, EventArgs e)
{
if (ItemClicked != null)
{
ItemClicked(sender, e);
}
}
}
}
<?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>
\ No newline at end of file
......@@ -323,6 +323,7 @@ namespace HZH_Controls.Controls
string strValue = ((double)m_value / (double)m_maxValue).ToString("0.%");
System.Drawing.SizeF sizeF = e.Graphics.MeasureString(strValue, Font);
e.Graphics.DrawString(strValue, Font, new SolidBrush(ForeColor), new PointF((this.Width - sizeF.Width) / 2, (this.Height - sizeF.Height) / 2 + 1));
}
}
}
......@@ -112,6 +112,16 @@
<Compile Include="Controls\FactoryControls\Lamp\UCSignalLamp.cs">
<SubType>UserControl</SubType>
</Compile>
<Compile Include="Controls\FactoryControls\MindMapping\MindMappingItemEntity.cs" />
<Compile Include="Controls\FactoryControls\MindMapping\UCMindMapping.cs">
<SubType>UserControl</SubType>
</Compile>
<Compile Include="Controls\FactoryControls\MindMapping\UCMindMappingPanel.cs">
<SubType>UserControl</SubType>
</Compile>
<Compile Include="Controls\FactoryControls\MindMapping\UCMindMappingPanel.Designer.cs">
<DependentUpon>UCMindMappingPanel.cs</DependentUpon>
</Compile>
<Compile Include="Controls\FactoryControls\Pond\UCPond.cs">
<SubType>UserControl</SubType>
</Compile>
......@@ -538,6 +548,9 @@
<EmbeddedResource Include="Controls\DateTime\UCTimePanel.resx">
<DependentUpon>UCTimePanel.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Controls\FactoryControls\MindMapping\UCMindMappingPanel.resx">
<DependentUpon>UCMindMappingPanel.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Controls\KeyBord\UCKeyBorderAll.resx">
<DependentUpon>UCKeyBorderAll.cs</DependentUpon>
</EmbeddedResource>
......
......@@ -769,7 +769,7 @@ namespace HZH_Controls
/// <param name="rect">The rect.</param>
/// <param name="cornerRadius">The corner radius.</param>
/// <returns>GraphicsPath.</returns>
public static GraphicsPath CreateRoundedRectanglePath(Rectangle rect, int cornerRadius)
public static GraphicsPath CreateRoundedRectanglePath(this Rectangle rect, int cornerRadius)
{
GraphicsPath roundedRect = new GraphicsPath();
roundedRect.AddArc(rect.X, rect.Y, cornerRadius * 2, cornerRadius * 2, 180, 90);
......@@ -790,7 +790,7 @@ namespace HZH_Controls
/// <param name="rect">The rect.</param>
/// <param name="cornerRadius">The corner radius.</param>
/// <returns>GraphicsPath.</returns>
public static GraphicsPath CreateRoundedRectanglePath(RectangleF rect, int cornerRadius)
public static GraphicsPath CreateRoundedRectanglePath(this RectangleF rect, int cornerRadius)
{
GraphicsPath roundedRect = new GraphicsPath();
roundedRect.AddArc(rect.X, rect.Y, cornerRadius * 2, cornerRadius * 2, 180, 90);
......
......@@ -98,6 +98,7 @@
this.ucSplitLine_H1 = new HZH_Controls.Controls.UCSplitLine_H();
this.button11 = new System.Windows.Forms.Button();
this.button12 = new System.Windows.Forms.Button();
this.button13 = new System.Windows.Forms.Button();
this.groupBox1.SuspendLayout();
this.groupBox9.SuspendLayout();
this.groupBox7.SuspendLayout();
......@@ -1228,6 +1229,16 @@
this.button12.UseVisualStyleBackColor = true;
this.button12.Click += new System.EventHandler(this.button12_Click);
//
// button13
//
this.button13.Location = new System.Drawing.Point(332, 50);
this.button13.Name = "button13";
this.button13.Size = new System.Drawing.Size(62, 23);
this.button13.TabIndex = 0;
this.button13.Text = "思维导图";
this.button13.UseVisualStyleBackColor = true;
this.button13.Click += new System.EventHandler(this.button13_Click);
//
// Form1
//
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None;
......@@ -1244,6 +1255,7 @@
this.Controls.Add(this.button4);
this.Controls.Add(this.button3);
this.Controls.Add(this.button2);
this.Controls.Add(this.button13);
this.Controls.Add(this.button12);
this.Controls.Add(this.button11);
this.Controls.Add(this.button9);
......@@ -1344,6 +1356,7 @@
private HZH_Controls.Controls.UCListExt ucListExt1;
private System.Windows.Forms.Button button11;
private System.Windows.Forms.Button button12;
private System.Windows.Forms.Button button13;
}
}
......@@ -233,5 +233,10 @@ namespace Test
new Form4().Show();
}
private void button13_Click(object sender, EventArgs e)
{
new Form5().Show();
}
}
}
namespace Test
{
partial class Form5
{
/// <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.ucMindMappingPanel1 = new HZH_Controls.Controls.UCMindMappingPanel();
this.SuspendLayout();
//
// ucMindMappingPanel1
//
this.ucMindMappingPanel1.AutoScroll = true;
this.ucMindMappingPanel1.BackColor = System.Drawing.Color.White;
this.ucMindMappingPanel1.DataSource = null;
this.ucMindMappingPanel1.Dock = System.Windows.Forms.DockStyle.Fill;
this.ucMindMappingPanel1.Location = new System.Drawing.Point(0, 0);
this.ucMindMappingPanel1.Name = "ucMindMappingPanel1";
this.ucMindMappingPanel1.Size = new System.Drawing.Size(654, 566);
this.ucMindMappingPanel1.TabIndex = 0;
//
// Form5
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(654, 566);
this.Controls.Add(this.ucMindMappingPanel1);
this.Name = "Form5";
this.Text = "Form5";
this.Load += new System.EventHandler(this.Form5_Load);
this.ResumeLayout(false);
}
#endregion
private HZH_Controls.Controls.UCMindMappingPanel ucMindMappingPanel1;
}
}
\ No newline at end of file
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using HZH_Controls.Controls;
namespace Test
{
public partial class Form5 : Form
{
public Form5()
{
InitializeComponent();
}
private void Form5_Load(object sender, EventArgs e)
{
try
{
MindMappingItemEntity entity = new MindMappingItemEntity()
{
ID = "1",
Text = "根节点超长占位符超长占位符超长占位符超长占位符\n节点1",
BackColor = Color.Red,
ForeColor = Color.White,
IsExpansion = true
};
MindMappingItemEntity[] cs1 = new MindMappingItemEntity[5];
for (int i = 0; i < 5; i++)
{
cs1[i] = new MindMappingItemEntity()
{
ID = "1_" + i,
Text = "子节点\n节点1_" + i + ((i % 2) == 0 ? "超长占位符超长占位符" : "超长占位符超长占位符超长占位符超长占位符"),
BackColor = Color.Red,
ForeColor = Color.White,
IsExpansion = (i % 2) == 0
};
MindMappingItemEntity[] cs2 = new MindMappingItemEntity[5];
for (int j = 0; j < 5; j++)
{
cs2[j] = new MindMappingItemEntity()
{
ID = "1_" + i + "_" + j,
Text = "孙节点\n节点1_" + i + "_" + j + ((j % 2) == 0 ? "超长占位符超长占位符" : "超长占位符超长占位符超长占位符超长占位符"),
BackColor = Color.Red,
ForeColor = Color.White
};
}
cs1[i].Childrens = cs2;
}
entity.Childrens = cs1;
this.ucMindMappingPanel1.DataSource = entity;
}
catch (Exception exc)
{
MessageBox.Show(exc.ToString(), "错误");
}
}
}
}
<?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>
\ No newline at end of file
......@@ -38,6 +38,7 @@
this.tabPage4 = new System.Windows.Forms.TabPage();
this.tabPage5 = new System.Windows.Forms.TabPage();
this.tabPage6 = new System.Windows.Forms.TabPage();
this.tabPage1 = new System.Windows.Forms.TabPage();
this.panel3.SuspendLayout();
this.tabControlExt1.SuspendLayout();
this.SuspendLayout();
......@@ -49,20 +50,20 @@
//
// tabControlExt1
//
this.tabControlExt1.Controls.Add(this.tabPage7);
this.tabControlExt1.Controls.Add(this.tabPage8);
this.tabControlExt1.Controls.Add(this.tabPage9);
this.tabControlExt1.Controls.Add(this.tabPage10);
this.tabControlExt1.Controls.Add(this.tabPage1);
this.tabControlExt1.Controls.Add(this.tabPage2);
this.tabControlExt1.Controls.Add(this.tabPage3);
this.tabControlExt1.Controls.Add(this.tabPage4);
this.tabControlExt1.Controls.Add(this.tabPage5);
this.tabControlExt1.Controls.Add(this.tabPage6);
this.tabControlExt1.Controls.Add(this.tabPage7);
this.tabControlExt1.Controls.Add(this.tabPage8);
this.tabControlExt1.Controls.Add(this.tabPage9);
this.tabControlExt1.Controls.Add(this.tabPage10);
this.tabControlExt1.Dock = System.Windows.Forms.DockStyle.Fill;
this.tabControlExt1.IsShowCloseBtn = true;
this.tabControlExt1.ItemSize = new System.Drawing.Size(142, 50);
this.tabControlExt1.Location = new System.Drawing.Point(0, 0);
this.tabControlExt1.Multiline = true;
this.tabControlExt1.Name = "tabControlExt1";
this.tabControlExt1.SelectedIndex = 0;
this.tabControlExt1.Size = new System.Drawing.Size(528, 321);
......@@ -72,10 +73,10 @@
//
// tabPage7
//
this.tabPage7.Location = new System.Drawing.Point(4, 104);
this.tabPage7.Location = new System.Drawing.Point(4, 54);
this.tabPage7.Name = "tabPage7";
this.tabPage7.Padding = new System.Windows.Forms.Padding(3);
this.tabPage7.Size = new System.Drawing.Size(520, 213);
this.tabPage7.Size = new System.Drawing.Size(520, 263);
this.tabPage7.TabIndex = 6;
this.tabPage7.Text = "tabPage7";
this.tabPage7.UseVisualStyleBackColor = true;
......@@ -102,10 +103,10 @@
//
// tabPage10
//
this.tabPage10.Location = new System.Drawing.Point(4, 104);
this.tabPage10.Location = new System.Drawing.Point(4, 54);
this.tabPage10.Name = "tabPage10";
this.tabPage10.Padding = new System.Windows.Forms.Padding(3);
this.tabPage10.Size = new System.Drawing.Size(520, 213);
this.tabPage10.Size = new System.Drawing.Size(520, 263);
this.tabPage10.TabIndex = 9;
this.tabPage10.Text = "tabPage10";
this.tabPage10.UseVisualStyleBackColor = true;
......@@ -142,24 +143,33 @@
//
// tabPage5
//
this.tabPage5.Location = new System.Drawing.Point(4, 104);
this.tabPage5.Location = new System.Drawing.Point(4, 54);
this.tabPage5.Name = "tabPage5";
this.tabPage5.Padding = new System.Windows.Forms.Padding(3);
this.tabPage5.Size = new System.Drawing.Size(520, 213);
this.tabPage5.Size = new System.Drawing.Size(520, 263);
this.tabPage5.TabIndex = 14;
this.tabPage5.Text = "tabPage5";
this.tabPage5.UseVisualStyleBackColor = true;
//
// tabPage6
//
this.tabPage6.Location = new System.Drawing.Point(4, 104);
this.tabPage6.Location = new System.Drawing.Point(4, 54);
this.tabPage6.Name = "tabPage6";
this.tabPage6.Padding = new System.Windows.Forms.Padding(3);
this.tabPage6.Size = new System.Drawing.Size(520, 213);
this.tabPage6.Size = new System.Drawing.Size(520, 263);
this.tabPage6.TabIndex = 15;
this.tabPage6.Text = "tabPage6";
this.tabPage6.UseVisualStyleBackColor = true;
//
// tabPage1
//
this.tabPage1.Location = new System.Drawing.Point(4, 54);
this.tabPage1.Name = "tabPage1";
this.tabPage1.Size = new System.Drawing.Size(520, 263);
this.tabPage1.TabIndex = 16;
this.tabPage1.Text = "tabPage1";
this.tabPage1.UseVisualStyleBackColor = true;
//
// FrmOKCancel1Test
//
this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 17F);
......@@ -186,5 +196,6 @@
private System.Windows.Forms.TabPage tabPage4;
private System.Windows.Forms.TabPage tabPage5;
private System.Windows.Forms.TabPage tabPage6;
private System.Windows.Forms.TabPage tabPage1;
}
}
\ No newline at end of file
......@@ -68,6 +68,12 @@
<Compile Include="Form4.Designer.cs">
<DependentUpon>Form4.cs</DependentUpon>
</Compile>
<Compile Include="Form5.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="Form5.Designer.cs">
<DependentUpon>Form5.cs</DependentUpon>
</Compile>
<Compile Include="FrmOKCancel1Test.cs">
<SubType>Form</SubType>
</Compile>
......@@ -112,6 +118,9 @@
<EmbeddedResource Include="Form4.resx">
<DependentUpon>Form4.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Form5.resx">
<DependentUpon>Form5.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="FrmOKCancel1Test.resx">
<DependentUpon>FrmOKCancel1Test.cs</DependentUpon>
</EmbeddedResource>
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!