### 2024-12-20 星期五更新
------ #### SuperDesign V3.0.2412.2001 - *.[新增]新增程序更新日志设置和自动发布功能。 - *.[修复]修复Post数据格式不正确时双击文本框会导致软件闪退的BUG。
This commit is contained in:
1 parent
03bcb8c5fd
commit
993f1ca1a9
349 files changed
+81977
-13873
No files matched your search
+247
@@ -0,0 +1,247 @@
|
||||
namespace 开发辅助工具.Manager.Site
|
||||
{
|
||||
partial class FrmAddSite
|
||||
{
|
||||
/// <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.label1 = new System.Windows.Forms.Label();
|
||||
this.TxtName = new ryControls.TextBoxEx2();
|
||||
this.label2 = new System.Windows.Forms.Label();
|
||||
this.TxtLocalPath = new ryControls.TextBoxEx2();
|
||||
this.label3 = new System.Windows.Forms.Label();
|
||||
this.DtFtp = new ryControls.DoubleText();
|
||||
this.BtnBrowserFolder = new ryControls.ButtonEx();
|
||||
this.label4 = new System.Windows.Forms.Label();
|
||||
this.TxtFtpDir = new ryControls.TextBoxEx2();
|
||||
this.BtnCancel = new ryControls.ButtonEx();
|
||||
this.BtnOK = new ryControls.ButtonEx();
|
||||
this.folderBrowserDialog1 = new System.Windows.Forms.FolderBrowserDialog();
|
||||
this.BtnClearFtp = new ryControls.ButtonEx();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// label1
|
||||
//
|
||||
this.label1.AutoSize = true;
|
||||
this.label1.Location = new System.Drawing.Point(9, 9);
|
||||
this.label1.Name = "label1";
|
||||
this.label1.Size = new System.Drawing.Size(29, 12);
|
||||
this.label1.TabIndex = 32;
|
||||
this.label1.Text = "名称";
|
||||
//
|
||||
// TxtName
|
||||
//
|
||||
this.TxtName.BackColor = System.Drawing.Color.White;
|
||||
this.TxtName.EmptyText = "";
|
||||
this.TxtName.Location = new System.Drawing.Point(11, 24);
|
||||
this.TxtName.MaxLength = 999999999;
|
||||
this.TxtName.Multiline = false;
|
||||
this.TxtName.Name = "TxtName";
|
||||
this.TxtName.OnlyNumeric = false;
|
||||
this.TxtName.PasswordChar = '\0';
|
||||
this.TxtName.ReadOnly = false;
|
||||
this.TxtName.SelectedText = "";
|
||||
this.TxtName.SelectionLength = 0;
|
||||
this.TxtName.SelectionStart = 0;
|
||||
this.TxtName.Size = new System.Drawing.Size(264, 25);
|
||||
this.TxtName.TabIndex = 31;
|
||||
this.TxtName.TextAlign = System.Windows.Forms.HorizontalAlignment.Left;
|
||||
this.TxtName.ToolTip = "";
|
||||
this.TxtName.WordWrap = true;
|
||||
//
|
||||
// label2
|
||||
//
|
||||
this.label2.AutoSize = true;
|
||||
this.label2.Location = new System.Drawing.Point(9, 56);
|
||||
this.label2.Name = "label2";
|
||||
this.label2.Size = new System.Drawing.Size(29, 12);
|
||||
this.label2.TabIndex = 34;
|
||||
this.label2.Text = "路径";
|
||||
//
|
||||
// TxtLocalPath
|
||||
//
|
||||
this.TxtLocalPath.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
|
||||
| System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.TxtLocalPath.BackColor = System.Drawing.Color.White;
|
||||
this.TxtLocalPath.EmptyText = "";
|
||||
this.TxtLocalPath.Location = new System.Drawing.Point(11, 75);
|
||||
this.TxtLocalPath.MaxLength = 999999999;
|
||||
this.TxtLocalPath.Multiline = false;
|
||||
this.TxtLocalPath.Name = "TxtLocalPath";
|
||||
this.TxtLocalPath.OnlyNumeric = false;
|
||||
this.TxtLocalPath.PasswordChar = '\0';
|
||||
this.TxtLocalPath.ReadOnly = false;
|
||||
this.TxtLocalPath.SelectedText = "";
|
||||
this.TxtLocalPath.SelectionLength = 0;
|
||||
this.TxtLocalPath.SelectionStart = 0;
|
||||
this.TxtLocalPath.Size = new System.Drawing.Size(379, 25);
|
||||
this.TxtLocalPath.TabIndex = 33;
|
||||
this.TxtLocalPath.TextAlign = System.Windows.Forms.HorizontalAlignment.Left;
|
||||
this.TxtLocalPath.ToolTip = "";
|
||||
this.TxtLocalPath.WordWrap = true;
|
||||
//
|
||||
// label3
|
||||
//
|
||||
this.label3.AutoSize = true;
|
||||
this.label3.Location = new System.Drawing.Point(9, 107);
|
||||
this.label3.Name = "label3";
|
||||
this.label3.Size = new System.Drawing.Size(47, 12);
|
||||
this.label3.TabIndex = 35;
|
||||
this.label3.Text = "对应FTP";
|
||||
//
|
||||
// DtFtp
|
||||
//
|
||||
this.DtFtp.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(236)))), ((int)(((byte)(239)))), ((int)(((byte)(244)))));
|
||||
this.DtFtp.Location = new System.Drawing.Point(11, 126);
|
||||
this.DtFtp.Name = "DtFtp";
|
||||
this.DtFtp.SelectName = "无";
|
||||
this.DtFtp.Size = new System.Drawing.Size(164, 25);
|
||||
this.DtFtp.TabIndex = 36;
|
||||
this.DtFtp.OnSelected += new System.EventHandler(this.DtFtp_OnSelected);
|
||||
//
|
||||
// BtnBrowserFolder
|
||||
//
|
||||
this.BtnBrowserFolder.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.BtnBrowserFolder.BaseColor = System.Drawing.Color.FromArgb(((int)(((byte)(51)))), ((int)(((byte)(76)))), ((int)(((byte)(95)))));
|
||||
this.BtnBrowserFolder.Location = new System.Drawing.Point(396, 75);
|
||||
this.BtnBrowserFolder.Name = "BtnBrowserFolder";
|
||||
this.BtnBrowserFolder.Size = new System.Drawing.Size(34, 25);
|
||||
this.BtnBrowserFolder.TabIndex = 37;
|
||||
this.BtnBrowserFolder.Text = "...";
|
||||
this.BtnBrowserFolder.UseVisualStyleBackColor = true;
|
||||
this.BtnBrowserFolder.Click += new System.EventHandler(this.BtnBrowserFolder_Click);
|
||||
//
|
||||
// label4
|
||||
//
|
||||
this.label4.AutoSize = true;
|
||||
this.label4.Location = new System.Drawing.Point(219, 107);
|
||||
this.label4.Name = "label4";
|
||||
this.label4.Size = new System.Drawing.Size(83, 12);
|
||||
this.label4.TabIndex = 38;
|
||||
this.label4.Text = "FTP站点根路径";
|
||||
//
|
||||
// TxtFtpDir
|
||||
//
|
||||
this.TxtFtpDir.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
|
||||
| System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.TxtFtpDir.BackColor = System.Drawing.Color.White;
|
||||
this.TxtFtpDir.EmptyText = "";
|
||||
this.TxtFtpDir.Location = new System.Drawing.Point(221, 126);
|
||||
this.TxtFtpDir.MaxLength = 999999999;
|
||||
this.TxtFtpDir.Multiline = false;
|
||||
this.TxtFtpDir.Name = "TxtFtpDir";
|
||||
this.TxtFtpDir.OnlyNumeric = false;
|
||||
this.TxtFtpDir.PasswordChar = '\0';
|
||||
this.TxtFtpDir.ReadOnly = false;
|
||||
this.TxtFtpDir.SelectedText = "";
|
||||
this.TxtFtpDir.SelectionLength = 0;
|
||||
this.TxtFtpDir.SelectionStart = 0;
|
||||
this.TxtFtpDir.Size = new System.Drawing.Size(209, 25);
|
||||
this.TxtFtpDir.TabIndex = 39;
|
||||
this.TxtFtpDir.TextAlign = System.Windows.Forms.HorizontalAlignment.Left;
|
||||
this.TxtFtpDir.ToolTip = "";
|
||||
this.TxtFtpDir.WordWrap = true;
|
||||
//
|
||||
// BtnCancel
|
||||
//
|
||||
this.BtnCancel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.BtnCancel.BaseColor = System.Drawing.Color.FromArgb(((int)(((byte)(51)))), ((int)(((byte)(76)))), ((int)(((byte)(95)))));
|
||||
this.BtnCancel.Location = new System.Drawing.Point(364, 164);
|
||||
this.BtnCancel.Name = "BtnCancel";
|
||||
this.BtnCancel.Size = new System.Drawing.Size(65, 27);
|
||||
this.BtnCancel.TabIndex = 41;
|
||||
this.BtnCancel.Text = "取消";
|
||||
this.BtnCancel.UseVisualStyleBackColor = true;
|
||||
this.BtnCancel.Click += new System.EventHandler(this.BtnCancel_Click);
|
||||
//
|
||||
// BtnOK
|
||||
//
|
||||
this.BtnOK.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.BtnOK.BaseColor = System.Drawing.Color.FromArgb(((int)(((byte)(51)))), ((int)(((byte)(76)))), ((int)(((byte)(95)))));
|
||||
this.BtnOK.Location = new System.Drawing.Point(293, 164);
|
||||
this.BtnOK.Name = "BtnOK";
|
||||
this.BtnOK.Size = new System.Drawing.Size(65, 27);
|
||||
this.BtnOK.TabIndex = 40;
|
||||
this.BtnOK.Text = "确定";
|
||||
this.BtnOK.UseVisualStyleBackColor = true;
|
||||
this.BtnOK.Click += new System.EventHandler(this.BtnOK_Click);
|
||||
//
|
||||
// BtnClearFtp
|
||||
//
|
||||
this.BtnClearFtp.BaseColor = System.Drawing.Color.FromArgb(((int)(((byte)(51)))), ((int)(((byte)(76)))), ((int)(((byte)(95)))));
|
||||
this.BtnClearFtp.Location = new System.Drawing.Point(181, 126);
|
||||
this.BtnClearFtp.Name = "BtnClearFtp";
|
||||
this.BtnClearFtp.Size = new System.Drawing.Size(36, 25);
|
||||
this.BtnClearFtp.TabIndex = 42;
|
||||
this.BtnClearFtp.Text = "清除";
|
||||
this.BtnClearFtp.UseVisualStyleBackColor = true;
|
||||
this.BtnClearFtp.Click += new System.EventHandler(this.BtnClearFtp_Click);
|
||||
//
|
||||
// FrmAddSite
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.ClientSize = new System.Drawing.Size(442, 203);
|
||||
this.Controls.Add(this.BtnClearFtp);
|
||||
this.Controls.Add(this.BtnCancel);
|
||||
this.Controls.Add(this.BtnOK);
|
||||
this.Controls.Add(this.TxtFtpDir);
|
||||
this.Controls.Add(this.label4);
|
||||
this.Controls.Add(this.BtnBrowserFolder);
|
||||
this.Controls.Add(this.DtFtp);
|
||||
this.Controls.Add(this.label3);
|
||||
this.Controls.Add(this.label2);
|
||||
this.Controls.Add(this.TxtLocalPath);
|
||||
this.Controls.Add(this.label1);
|
||||
this.Controls.Add(this.TxtName);
|
||||
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;
|
||||
this.MaximizeBox = false;
|
||||
this.MinimizeBox = false;
|
||||
this.Name = "FrmAddSite";
|
||||
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
|
||||
this.Text = "添加站点";
|
||||
this.ResumeLayout(false);
|
||||
this.PerformLayout();
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private System.Windows.Forms.Label label1;
|
||||
private ryControls.TextBoxEx2 TxtName;
|
||||
private System.Windows.Forms.Label label2;
|
||||
private ryControls.TextBoxEx2 TxtLocalPath;
|
||||
private System.Windows.Forms.Label label3;
|
||||
private ryControls.DoubleText DtFtp;
|
||||
private ryControls.ButtonEx BtnBrowserFolder;
|
||||
private System.Windows.Forms.Label label4;
|
||||
private ryControls.TextBoxEx2 TxtFtpDir;
|
||||
private ryControls.ButtonEx BtnCancel;
|
||||
private ryControls.ButtonEx BtnOK;
|
||||
private System.Windows.Forms.FolderBrowserDialog folderBrowserDialog1;
|
||||
private ryControls.ButtonEx BtnClearFtp;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,125 @@
|
||||
using GameBackup3H3.DbOp;
|
||||
using ryCommon;
|
||||
using ryCommonDb;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Data;
|
||||
using System.Drawing;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Forms;
|
||||
using 开发辅助工具.Manager;
|
||||
|
||||
namespace 开发辅助工具.Manager.Site
|
||||
{
|
||||
public partial class FrmAddSite : Form
|
||||
{
|
||||
public string tableName = "Site";
|
||||
public int isAdd = 1;
|
||||
public string selectId = "-1";
|
||||
public FrmAddSite()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
public void GetInfo(string id)
|
||||
{
|
||||
selectId = id;
|
||||
IDbInterface db = Itrycn_Db.CreateDataProvider(Itrycn_Db.dataType);
|
||||
if (db.ConnDb(Itrycn_Db.User_SQLConn) == 1)
|
||||
{
|
||||
DataSet ds = db.ReadData(tableName, id);
|
||||
if (ds.HaveData())
|
||||
{
|
||||
DataRow reader = ds.Tables[0].Rows[0];
|
||||
#region 读取信息
|
||||
var ftpid = reader["ftpId"].ToInt();
|
||||
var ds_ftp = db.ReadData("select * from Ftp where id="+ftpid);
|
||||
if (ds_ftp.HaveData()) { DtFtp.Text = ds_ftp.GetRow(0)["name"].ToString(); }
|
||||
else
|
||||
{
|
||||
DtFtp.Text = "无";
|
||||
}
|
||||
TxtName.Text = reader["name"].ToString();
|
||||
TxtLocalPath.Text = reader["localPath"].ToString();
|
||||
DtFtp.selectId = reader["ftpId"].ToString();
|
||||
TxtFtpDir.Text = reader["ftpDir"].ToString();
|
||||
#endregion
|
||||
}
|
||||
ds.Dispose();
|
||||
}
|
||||
db.Free();
|
||||
}
|
||||
|
||||
private void BtnOK_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (TxtName.Text == "")
|
||||
{
|
||||
MessageBox.Show("名称不能为空。", "提示", MessageBoxButtons.OK, MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
if (!System.IO.Directory.Exists(TxtLocalPath.Text))
|
||||
{
|
||||
MessageBox.Show("本地路径不存在。", "提示", MessageBoxButtons.OK, MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
|
||||
RyQuickSQL mySQL = new RyQuickSQL(tableName);
|
||||
mySQL.AddField("name", TxtName.Text);
|
||||
mySQL.AddField("localPath", TxtLocalPath.Text.Trim('\\'));
|
||||
mySQL.AddField("ftpId",DtFtp.selectId.ToInt());
|
||||
mySQL.AddField("ftpDir", TxtFtpDir.Text);
|
||||
//DataProvider mydb = new DataProvider();
|
||||
IDbInterface db = Itrycn_Db.CreateDataProvider(Itrycn_Db.dataType);
|
||||
if (db.ConnDb(Itrycn_Db.User_SQLConn) == 1)
|
||||
{
|
||||
if (isAdd >= 1)
|
||||
{
|
||||
mySQL.AddField("addTime", DateTime.Now);
|
||||
mySQL.AddField("editTime", DateTime.Now);
|
||||
db.ExecuteNonQuery(mySQL.GetInsertSQL(), db.GetParameter(mySQL));
|
||||
}
|
||||
else
|
||||
{
|
||||
mySQL.AddField("editTime", DateTime.Now);
|
||||
db.ExecuteNonQuery(mySQL.GetUpdateSQL() + " where id=" + selectId, db.GetParameter(mySQL));
|
||||
}
|
||||
}
|
||||
db.Free();
|
||||
DialogResult = DialogResult.OK;
|
||||
}
|
||||
|
||||
private void BtnCancel_Click(object sender, EventArgs e)
|
||||
{
|
||||
DialogResult = DialogResult.Cancel;
|
||||
}
|
||||
|
||||
private void BtnBrowserFolder_Click(object sender, EventArgs e)
|
||||
{
|
||||
if(folderBrowserDialog1.ShowDialog()==DialogResult.OK)
|
||||
{
|
||||
TxtLocalPath.Text = folderBrowserDialog1.SelectedPath;
|
||||
}
|
||||
}
|
||||
|
||||
private void DtFtp_OnSelected(object sender, EventArgs e)
|
||||
{
|
||||
FrmFTPView frm = new FrmFTPView
|
||||
{
|
||||
SelectModeOn = true
|
||||
};
|
||||
if (frm.ShowDialog()==DialogResult.OK)
|
||||
{
|
||||
DtFtp.selectId = frm.SelectedItem.Id.ToString();
|
||||
DtFtp.Text = frm.SelectedItem.Name;
|
||||
}
|
||||
}
|
||||
|
||||
private void BtnClearFtp_Click(object sender, EventArgs e)
|
||||
{
|
||||
DtFtp.selectId = "-1";
|
||||
DtFtp.Text ="无";
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -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="folderBrowserDialog1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>17, 17</value>
|
||||
</metadata>
|
||||
</root>
|
||||
+100
@@ -0,0 +1,100 @@
|
||||
namespace SuperDesign.Manager.Site
|
||||
{
|
||||
partial class FrmSiteSelect
|
||||
{
|
||||
/// <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.objectListView1 = new BrightIdeasSoftware.ObjectListView();
|
||||
this.OlvName = ((BrightIdeasSoftware.OLVColumn)(new BrightIdeasSoftware.OLVColumn()));
|
||||
this.BtnOK = new ryControls.ButtonEx();
|
||||
((System.ComponentModel.ISupportInitialize)(this.objectListView1)).BeginInit();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// objectListView1
|
||||
//
|
||||
this.objectListView1.AllColumns.Add(this.OlvName);
|
||||
this.objectListView1.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
|
||||
| System.Windows.Forms.AnchorStyles.Left)
|
||||
| System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.objectListView1.CellEditUseWholeCell = false;
|
||||
this.objectListView1.CheckBoxes = true;
|
||||
this.objectListView1.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] {
|
||||
this.OlvName});
|
||||
this.objectListView1.Cursor = System.Windows.Forms.Cursors.Default;
|
||||
this.objectListView1.FullRowSelect = true;
|
||||
this.objectListView1.HideSelection = false;
|
||||
this.objectListView1.Location = new System.Drawing.Point(12, 12);
|
||||
this.objectListView1.Name = "objectListView1";
|
||||
this.objectListView1.Size = new System.Drawing.Size(276, 199);
|
||||
this.objectListView1.TabIndex = 0;
|
||||
this.objectListView1.UseCompatibleStateImageBehavior = false;
|
||||
this.objectListView1.View = System.Windows.Forms.View.Details;
|
||||
this.objectListView1.SelectionChanged += new System.EventHandler(this.ObjectListView1_SelectionChanged);
|
||||
this.objectListView1.Click += new System.EventHandler(this.ObjectListView1_Click);
|
||||
this.objectListView1.DoubleClick += new System.EventHandler(this.ObjectListView1_DoubleClick);
|
||||
//
|
||||
// OlvName
|
||||
//
|
||||
this.OlvName.Text = "名称";
|
||||
this.OlvName.Width = 250;
|
||||
//
|
||||
// BtnOK
|
||||
//
|
||||
this.BtnOK.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.BtnOK.BaseColor = System.Drawing.Color.FromArgb(((int)(((byte)(51)))), ((int)(((byte)(76)))), ((int)(((byte)(95)))));
|
||||
this.BtnOK.Location = new System.Drawing.Point(213, 217);
|
||||
this.BtnOK.Name = "BtnOK";
|
||||
this.BtnOK.Size = new System.Drawing.Size(75, 30);
|
||||
this.BtnOK.TabIndex = 1;
|
||||
this.BtnOK.Text = "选择";
|
||||
this.BtnOK.UseVisualStyleBackColor = true;
|
||||
this.BtnOK.Click += new System.EventHandler(this.BtnOK_Click);
|
||||
//
|
||||
// FrmSiteSelect
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.ClientSize = new System.Drawing.Size(300, 252);
|
||||
this.Controls.Add(this.BtnOK);
|
||||
this.Controls.Add(this.objectListView1);
|
||||
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;
|
||||
this.MaximizeBox = false;
|
||||
this.MinimizeBox = false;
|
||||
this.Name = "FrmSiteSelect";
|
||||
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
|
||||
this.Text = "选择站点";
|
||||
((System.ComponentModel.ISupportInitialize)(this.objectListView1)).EndInit();
|
||||
this.ResumeLayout(false);
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
private BrightIdeasSoftware.OLVColumn OlvName;
|
||||
private ryControls.ButtonEx BtnOK;
|
||||
public BrightIdeasSoftware.ObjectListView objectListView1;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,58 @@
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Data;
|
||||
using System.Drawing;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Forms;
|
||||
using 开发辅助工具.Manager;
|
||||
|
||||
namespace SuperDesign.Manager.Site
|
||||
{
|
||||
public partial class FrmSiteSelect : Form
|
||||
{
|
||||
public FrmSiteSelect()
|
||||
{
|
||||
InitializeComponent();
|
||||
OlvName.AspectGetter = delegate (object x) { return ((SiteInfo)x).Name; };
|
||||
}
|
||||
|
||||
private void BtnOK_Click(object sender, EventArgs e)
|
||||
{
|
||||
if(objectListView1.CheckedObjects.Count==0)
|
||||
{
|
||||
MessageBox.Show("请选择站点。", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
|
||||
return;
|
||||
}
|
||||
SelectedList = objectListView1.CheckedObjects;
|
||||
DialogResult = DialogResult.OK;
|
||||
}
|
||||
public IList SelectedList { get; set; }
|
||||
private void ObjectListView1_SelectionChanged(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
private void ObjectListView1_Click(object sender, EventArgs e)
|
||||
{
|
||||
var item = (SiteInfo)objectListView1.SelectedObject;
|
||||
if (item == null) { return; }
|
||||
if (objectListView1.IsChecked(item)) { objectListView1.UncheckObject(item); }
|
||||
else { objectListView1.CheckObject(item); }
|
||||
}
|
||||
|
||||
private void ObjectListView1_DoubleClick(object sender, EventArgs e)
|
||||
{
|
||||
var item = (SiteInfo)objectListView1.SelectedObject;
|
||||
if (item == null) { return; }
|
||||
SelectedList = new List<SiteInfo>
|
||||
{
|
||||
item
|
||||
};
|
||||
DialogResult = DialogResult.OK;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -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>
|
||||
Reference in new issue
Block a user