xueyu.liu
3 years ago
6 changed files with 372 additions and 2 deletions
@ -0,0 +1,164 @@ |
|||
namespace Stone.WinModule.BasicData |
|||
{ |
|||
partial class frmErrTypeLevelDetail |
|||
{ |
|||
/// <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 Windows 窗体设计器生成的代码
|
|||
|
|||
/// <summary>
|
|||
/// 设计器支持所需的方法 - 不要
|
|||
/// 使用代码编辑器修改此方法的内容。
|
|||
/// </summary>
|
|||
private void InitializeComponent() |
|||
{ |
|||
this.txtMemo = new System.Windows.Forms.TextBox(); |
|||
this.label3 = new System.Windows.Forms.Label(); |
|||
this.txtName = new System.Windows.Forms.TextBox(); |
|||
this.txtCode = new System.Windows.Forms.TextBox(); |
|||
this.label2 = new System.Windows.Forms.Label(); |
|||
this.label1 = new System.Windows.Forms.Label(); |
|||
this.colorDialog1 = new System.Windows.Forms.ColorDialog(); |
|||
this.label4 = new System.Windows.Forms.Label(); |
|||
this.txtemail = new System.Windows.Forms.TextBox(); |
|||
this.SuspendLayout(); |
|||
//
|
|||
// btnAddNewLine
|
|||
//
|
|||
this.btnAddNewLine.Location = new System.Drawing.Point(41, 191); |
|||
//
|
|||
// btnClose
|
|||
//
|
|||
this.btnClose.Location = new System.Drawing.Point(254, 191); |
|||
//
|
|||
// btnOK
|
|||
//
|
|||
this.btnOK.Location = new System.Drawing.Point(167, 191); |
|||
//
|
|||
// txtMemo
|
|||
//
|
|||
this.txtMemo.Location = new System.Drawing.Point(113, 100); |
|||
this.txtMemo.MaxLength = 200; |
|||
this.txtMemo.Name = "txtMemo"; |
|||
this.txtMemo.Size = new System.Drawing.Size(222, 21); |
|||
this.txtMemo.TabIndex = 2; |
|||
//
|
|||
// label3
|
|||
//
|
|||
this.label3.AutoSize = true; |
|||
this.label3.Location = new System.Drawing.Point(23, 103); |
|||
this.label3.Name = "label3"; |
|||
this.label3.Size = new System.Drawing.Size(41, 12); |
|||
this.label3.TabIndex = 111; |
|||
this.label3.Text = "级别:"; |
|||
//
|
|||
// txtName
|
|||
//
|
|||
this.txtName.Location = new System.Drawing.Point(113, 71); |
|||
this.txtName.MaxLength = 100; |
|||
this.txtName.Name = "txtName"; |
|||
this.txtName.Size = new System.Drawing.Size(222, 21); |
|||
this.txtName.TabIndex = 1; |
|||
//
|
|||
// txtCode
|
|||
//
|
|||
this.txtCode.Location = new System.Drawing.Point(113, 40); |
|||
this.txtCode.MaxLength = 10; |
|||
this.txtCode.Name = "txtCode"; |
|||
this.txtCode.Size = new System.Drawing.Size(222, 21); |
|||
this.txtCode.TabIndex = 0; |
|||
//
|
|||
// label2
|
|||
//
|
|||
this.label2.AutoSize = true; |
|||
this.label2.Location = new System.Drawing.Point(23, 74); |
|||
this.label2.Name = "label2"; |
|||
this.label2.Size = new System.Drawing.Size(65, 12); |
|||
this.label2.TabIndex = 109; |
|||
this.label2.Text = "预警类型:"; |
|||
//
|
|||
// label1
|
|||
//
|
|||
this.label1.AutoSize = true; |
|||
this.label1.Location = new System.Drawing.Point(23, 44); |
|||
this.label1.Name = "label1"; |
|||
this.label1.Size = new System.Drawing.Size(65, 12); |
|||
this.label1.TabIndex = 108; |
|||
this.label1.Text = "类型编码:"; |
|||
//
|
|||
// label4
|
|||
//
|
|||
this.label4.AutoSize = true; |
|||
this.label4.Location = new System.Drawing.Point(23, 140); |
|||
this.label4.Name = "label4"; |
|||
this.label4.Size = new System.Drawing.Size(77, 12); |
|||
this.label4.TabIndex = 111; |
|||
this.label4.Text = "邮件通知人:"; |
|||
//
|
|||
// txtemail
|
|||
//
|
|||
this.txtemail.Location = new System.Drawing.Point(113, 137); |
|||
this.txtemail.MaxLength = 200; |
|||
this.txtemail.Name = "txtemail"; |
|||
this.txtemail.Size = new System.Drawing.Size(222, 21); |
|||
this.txtemail.TabIndex = 2; |
|||
//
|
|||
// frmErrTypeLevelDetail
|
|||
//
|
|||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); |
|||
this.ClientSize = new System.Drawing.Size(381, 277); |
|||
this.Controls.Add(this.txtemail); |
|||
this.Controls.Add(this.txtMemo); |
|||
this.Controls.Add(this.label4); |
|||
this.Controls.Add(this.label3); |
|||
this.Controls.Add(this.txtName); |
|||
this.Controls.Add(this.txtCode); |
|||
this.Controls.Add(this.label2); |
|||
this.Controls.Add(this.label1); |
|||
this.Name = "frmErrTypeLevelDetail"; |
|||
this.Load += new System.EventHandler(this.frmColorDetail_Load); |
|||
this.Controls.SetChildIndex(this.btnOK, 0); |
|||
this.Controls.SetChildIndex(this.btnClose, 0); |
|||
this.Controls.SetChildIndex(this.btnAddNewLine, 0); |
|||
this.Controls.SetChildIndex(this.label1, 0); |
|||
this.Controls.SetChildIndex(this.label2, 0); |
|||
this.Controls.SetChildIndex(this.txtCode, 0); |
|||
this.Controls.SetChildIndex(this.txtName, 0); |
|||
this.Controls.SetChildIndex(this.label3, 0); |
|||
this.Controls.SetChildIndex(this.label4, 0); |
|||
this.Controls.SetChildIndex(this.txtMemo, 0); |
|||
this.Controls.SetChildIndex(this.txtemail, 0); |
|||
this.ResumeLayout(false); |
|||
this.PerformLayout(); |
|||
|
|||
} |
|||
|
|||
#endregion
|
|||
|
|||
private System.Windows.Forms.TextBox txtMemo; |
|||
private System.Windows.Forms.Label label3; |
|||
private System.Windows.Forms.TextBox txtName; |
|||
private System.Windows.Forms.TextBox txtCode; |
|||
private System.Windows.Forms.Label label2; |
|||
private System.Windows.Forms.Label label1; |
|||
private System.Windows.Forms.ColorDialog colorDialog1; |
|||
private System.Windows.Forms.Label label4; |
|||
private System.Windows.Forms.TextBox txtemail; |
|||
} |
|||
} |
@ -0,0 +1,66 @@ |
|||
using System; |
|||
using System.Collections.Generic; |
|||
using System.ComponentModel; |
|||
using System.Data; |
|||
using System.Drawing; |
|||
using System.Text; |
|||
using System.Windows.Forms; |
|||
using Stone.Common; |
|||
|
|||
namespace Stone.WinModule.BasicData |
|||
{ |
|||
public partial class frmErrTypeLevelDetail : Stone.WinModule.BasicData.frmBaseMainDetail |
|||
{ |
|||
public frmErrTypeLevelDetail() |
|||
{ |
|||
InitializeComponent(); |
|||
} |
|||
|
|||
private void frmColorDetail_Load(object sender, EventArgs e) |
|||
{ |
|||
|
|||
} |
|||
|
|||
public override bool GetData() |
|||
{ |
|||
if (!MyValidator.IsEmpty(this.txtCode, "")) return false; |
|||
if (!MyValidator.IsEmpty(this.txtName, "")) return false; |
|||
if (!MyValidator.IsEmpty(this.txtMemo, "")) return false; |
|||
if (!MyValidator.IsEmpty(this.txtemail, "")) return false; |
|||
base.GetData(); |
|||
drData["Code"] = MyStrings.GetString(this.txtCode.Text.Trim()); |
|||
drData["ErrTypeDesc"] = MyStrings.GetString(this.txtName.Text.Trim()); |
|||
drData["Errlevel"] = MyStrings.GetString(this.txtMemo.Text.Trim()); |
|||
drData["ToPerson"] = MyStrings.GetString(this.txtemail.Text.Trim()); |
|||
|
|||
return true; |
|||
} |
|||
|
|||
public override bool SetData() |
|||
{ |
|||
if (type == 2) |
|||
{ |
|||
this.txtCode.ReadOnly = true; |
|||
} |
|||
|
|||
if (base.SetData()) |
|||
{ |
|||
this.txtCode.Text = drData["Code"].ToString(); |
|||
this.txtName.Text = drData["Name"].ToString(); |
|||
this.txtMemo.Text = drData["Memo"].ToString(); |
|||
} |
|||
|
|||
return false; |
|||
} |
|||
|
|||
public override void Clear() |
|||
{ |
|||
base.Clear(); |
|||
this.txtCode.Text = ""; |
|||
this.txtName.Text = ""; |
|||
this.txtMemo.Text = ""; |
|||
this.txtCode.Focus(); |
|||
} |
|||
|
|||
} |
|||
} |
@ -0,0 +1,123 @@ |
|||
<?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="colorDialog1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> |
|||
<value>17, 17</value> |
|||
</metadata> |
|||
</root> |
Loading…
Reference in new issue