*.[新增]新增变量设置。
*.[新增]Publish.set的copy方法支持变量。
This commit is contained in:
parent
ae89a4aa1d
commit
37fda16352
Binary file not shown.
|
@ -958,6 +958,13 @@
|
||||||
<param name="str"></param>
|
<param name="str"></param>
|
||||||
<returns></returns>
|
<returns></returns>
|
||||||
</member>
|
</member>
|
||||||
|
<member name="M:ryCommon.Strings.IsEng(System.String)">
|
||||||
|
<summary>
|
||||||
|
判断字符串是否只包含英文
|
||||||
|
</summary>
|
||||||
|
<param name="str"></param>
|
||||||
|
<returns></returns>
|
||||||
|
</member>
|
||||||
<member name="M:ryCommon.Strings.IsMatchStr(System.String,System.String)">
|
<member name="M:ryCommon.Strings.IsMatchStr(System.String,System.String)">
|
||||||
<summary>
|
<summary>
|
||||||
判断字符串是否匹配,支持?*通配符
|
判断字符串是否匹配,支持?*通配符
|
||||||
|
@ -1091,6 +1098,13 @@
|
||||||
<param name="input"></param>
|
<param name="input"></param>
|
||||||
<returns></returns>
|
<returns></returns>
|
||||||
</member>
|
</member>
|
||||||
|
<member name="M:ryCommon.VarExtension.IsEng(System.String)">
|
||||||
|
<summary>
|
||||||
|
判断字符串是否是英文
|
||||||
|
</summary>
|
||||||
|
<param name="input"></param>
|
||||||
|
<returns></returns>
|
||||||
|
</member>
|
||||||
<member name="M:ryCommon.VarExtension.IsInRange(System.Decimal,System.Decimal,System.Decimal)">
|
<member name="M:ryCommon.VarExtension.IsInRange(System.Decimal,System.Decimal,System.Decimal)">
|
||||||
<summary>
|
<summary>
|
||||||
是否在指定范围内
|
是否在指定范围内
|
||||||
|
|
Binary file not shown.
File diff suppressed because it is too large
Load Diff
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
@ -1,4 +1,9 @@
|
||||||
### 2020-12-09更新
|
### 2020-12-10更新
|
||||||
|
------
|
||||||
|
#### SuperDesign V2.0.2012.1001
|
||||||
|
- *.[新增]新增变量设置。
|
||||||
|
- *.[新增]Publish.set的copy方法支持变量。
|
||||||
|
### 2020-12-09更新
|
||||||
------
|
------
|
||||||
##### SuperDesign V2.0.2012.0901
|
##### SuperDesign V2.0.2012.0901
|
||||||
- *.[新增]网页抓取工具和Json工具里支持代码折叠功能。
|
- *.[新增]网页抓取工具和Json工具里支持代码折叠功能。
|
||||||
|
|
Binary file not shown.
|
@ -48,7 +48,7 @@ namespace JackWangCUMT.WinForm
|
||||||
list.Add(new FoldMarker(document, start, document.GetLineSegment(start).Length, i, 57, FoldType.Region, "..."));
|
list.Add(new FoldMarker(document, start, document.GetLineSegment(start).Length, i, 57, FoldType.Region, "..."));
|
||||||
}
|
}
|
||||||
//支持嵌套 {}
|
//支持嵌套 {}
|
||||||
if (text_trim.StartsWith("{")) // Look for method starts
|
if (text_trim.StartsWith("{") || text_trim.EndsWith("{")) // Look for method starts
|
||||||
{
|
{
|
||||||
startLines.Push(i);
|
startLines.Push(i);
|
||||||
}
|
}
|
||||||
|
|
188
Source/开发辅助工具/Manager/FrmAddVar.Designer.cs
generated
Normal file
188
Source/开发辅助工具/Manager/FrmAddVar.Designer.cs
generated
Normal file
|
@ -0,0 +1,188 @@
|
||||||
|
|
||||||
|
namespace SuperDesign.Manager
|
||||||
|
{
|
||||||
|
partial class FrmAddVar
|
||||||
|
{
|
||||||
|
/// <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.TxtVar = new ryControls.TextBoxEx2();
|
||||||
|
this.label2 = new System.Windows.Forms.Label();
|
||||||
|
this.TxtVarValue = new ryControls.TextBoxEx2();
|
||||||
|
this.label3 = new System.Windows.Forms.Label();
|
||||||
|
this.TxtDes = new ryControls.TextBoxEx2();
|
||||||
|
this.BtnCancel = new ryControls.ButtonEx();
|
||||||
|
this.BtnOK = new ryControls.ButtonEx();
|
||||||
|
this.SuspendLayout();
|
||||||
|
//
|
||||||
|
// label1
|
||||||
|
//
|
||||||
|
this.label1.AutoSize = true;
|
||||||
|
this.label1.Location = new System.Drawing.Point(12, 20);
|
||||||
|
this.label1.Name = "label1";
|
||||||
|
this.label1.Size = new System.Drawing.Size(41, 12);
|
||||||
|
this.label1.TabIndex = 9;
|
||||||
|
this.label1.Text = "变量名";
|
||||||
|
//
|
||||||
|
// TxtVar
|
||||||
|
//
|
||||||
|
this.TxtVar.BackColor = System.Drawing.Color.White;
|
||||||
|
this.TxtVar.EmptyText = "";
|
||||||
|
this.TxtVar.Location = new System.Drawing.Point(59, 12);
|
||||||
|
this.TxtVar.MaxLength = 999999999;
|
||||||
|
this.TxtVar.Multiline = false;
|
||||||
|
this.TxtVar.Name = "TxtVar";
|
||||||
|
this.TxtVar.OnlyNumeric = false;
|
||||||
|
this.TxtVar.PasswordChar = '\0';
|
||||||
|
this.TxtVar.ReadOnly = false;
|
||||||
|
this.TxtVar.SelectedText = "";
|
||||||
|
this.TxtVar.SelectionLength = 0;
|
||||||
|
this.TxtVar.SelectionStart = 0;
|
||||||
|
this.TxtVar.Size = new System.Drawing.Size(125, 25);
|
||||||
|
this.TxtVar.TabIndex = 8;
|
||||||
|
this.TxtVar.TextAlign = System.Windows.Forms.HorizontalAlignment.Left;
|
||||||
|
this.TxtVar.ToolTip = "";
|
||||||
|
this.TxtVar.WordWrap = true;
|
||||||
|
//
|
||||||
|
// label2
|
||||||
|
//
|
||||||
|
this.label2.AutoSize = true;
|
||||||
|
this.label2.Location = new System.Drawing.Point(12, 51);
|
||||||
|
this.label2.Name = "label2";
|
||||||
|
this.label2.Size = new System.Drawing.Size(29, 12);
|
||||||
|
this.label2.TabIndex = 11;
|
||||||
|
this.label2.Text = "路径";
|
||||||
|
//
|
||||||
|
// TxtVarValue
|
||||||
|
//
|
||||||
|
this.TxtVarValue.BackColor = System.Drawing.Color.White;
|
||||||
|
this.TxtVarValue.EmptyText = "";
|
||||||
|
this.TxtVarValue.Location = new System.Drawing.Point(59, 43);
|
||||||
|
this.TxtVarValue.MaxLength = 999999999;
|
||||||
|
this.TxtVarValue.Multiline = false;
|
||||||
|
this.TxtVarValue.Name = "TxtVarValue";
|
||||||
|
this.TxtVarValue.OnlyNumeric = false;
|
||||||
|
this.TxtVarValue.PasswordChar = '\0';
|
||||||
|
this.TxtVarValue.ReadOnly = false;
|
||||||
|
this.TxtVarValue.SelectedText = "";
|
||||||
|
this.TxtVarValue.SelectionLength = 0;
|
||||||
|
this.TxtVarValue.SelectionStart = 0;
|
||||||
|
this.TxtVarValue.Size = new System.Drawing.Size(324, 25);
|
||||||
|
this.TxtVarValue.TabIndex = 10;
|
||||||
|
this.TxtVarValue.TextAlign = System.Windows.Forms.HorizontalAlignment.Left;
|
||||||
|
this.TxtVarValue.ToolTip = "";
|
||||||
|
this.TxtVarValue.WordWrap = true;
|
||||||
|
//
|
||||||
|
// label3
|
||||||
|
//
|
||||||
|
this.label3.AutoSize = true;
|
||||||
|
this.label3.Location = new System.Drawing.Point(12, 82);
|
||||||
|
this.label3.Name = "label3";
|
||||||
|
this.label3.Size = new System.Drawing.Size(29, 12);
|
||||||
|
this.label3.TabIndex = 13;
|
||||||
|
this.label3.Text = "说明";
|
||||||
|
//
|
||||||
|
// TxtDes
|
||||||
|
//
|
||||||
|
this.TxtDes.BackColor = System.Drawing.Color.White;
|
||||||
|
this.TxtDes.EmptyText = "";
|
||||||
|
this.TxtDes.Location = new System.Drawing.Point(59, 74);
|
||||||
|
this.TxtDes.MaxLength = 999999999;
|
||||||
|
this.TxtDes.Multiline = false;
|
||||||
|
this.TxtDes.Name = "TxtDes";
|
||||||
|
this.TxtDes.OnlyNumeric = false;
|
||||||
|
this.TxtDes.PasswordChar = '\0';
|
||||||
|
this.TxtDes.ReadOnly = false;
|
||||||
|
this.TxtDes.SelectedText = "";
|
||||||
|
this.TxtDes.SelectionLength = 0;
|
||||||
|
this.TxtDes.SelectionStart = 0;
|
||||||
|
this.TxtDes.Size = new System.Drawing.Size(324, 25);
|
||||||
|
this.TxtDes.TabIndex = 12;
|
||||||
|
this.TxtDes.TextAlign = System.Windows.Forms.HorizontalAlignment.Left;
|
||||||
|
this.TxtDes.ToolTip = "";
|
||||||
|
this.TxtDes.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(316, 105);
|
||||||
|
this.BtnCancel.Name = "BtnCancel";
|
||||||
|
this.BtnCancel.Size = new System.Drawing.Size(65, 27);
|
||||||
|
this.BtnCancel.TabIndex = 15;
|
||||||
|
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(245, 105);
|
||||||
|
this.BtnOK.Name = "BtnOK";
|
||||||
|
this.BtnOK.Size = new System.Drawing.Size(65, 27);
|
||||||
|
this.BtnOK.TabIndex = 14;
|
||||||
|
this.BtnOK.Text = "确定";
|
||||||
|
this.BtnOK.UseVisualStyleBackColor = true;
|
||||||
|
this.BtnOK.Click += new System.EventHandler(this.BtnOK_Click);
|
||||||
|
//
|
||||||
|
// FrmAddVar
|
||||||
|
//
|
||||||
|
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
|
||||||
|
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||||
|
this.ClientSize = new System.Drawing.Size(395, 141);
|
||||||
|
this.Controls.Add(this.BtnCancel);
|
||||||
|
this.Controls.Add(this.BtnOK);
|
||||||
|
this.Controls.Add(this.label3);
|
||||||
|
this.Controls.Add(this.TxtDes);
|
||||||
|
this.Controls.Add(this.label2);
|
||||||
|
this.Controls.Add(this.TxtVarValue);
|
||||||
|
this.Controls.Add(this.label1);
|
||||||
|
this.Controls.Add(this.TxtVar);
|
||||||
|
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;
|
||||||
|
this.MaximizeBox = false;
|
||||||
|
this.MinimizeBox = false;
|
||||||
|
this.Name = "FrmAddVar";
|
||||||
|
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
|
||||||
|
this.Text = "添加变量";
|
||||||
|
this.ResumeLayout(false);
|
||||||
|
this.PerformLayout();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
private System.Windows.Forms.Label label1;
|
||||||
|
private ryControls.TextBoxEx2 TxtVar;
|
||||||
|
private System.Windows.Forms.Label label2;
|
||||||
|
private ryControls.TextBoxEx2 TxtVarValue;
|
||||||
|
private System.Windows.Forms.Label label3;
|
||||||
|
private ryControls.TextBoxEx2 TxtDes;
|
||||||
|
private ryControls.ButtonEx BtnCancel;
|
||||||
|
private ryControls.ButtonEx BtnOK;
|
||||||
|
}
|
||||||
|
}
|
97
Source/开发辅助工具/Manager/FrmAddVar.cs
Normal file
97
Source/开发辅助工具/Manager/FrmAddVar.cs
Normal file
|
@ -0,0 +1,97 @@
|
||||||
|
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.Windows.Forms;
|
||||||
|
using 开发辅助工具.Manager;
|
||||||
|
|
||||||
|
namespace SuperDesign.Manager
|
||||||
|
{
|
||||||
|
public partial class FrmAddVar : Form
|
||||||
|
{
|
||||||
|
public int isAdd = 1;
|
||||||
|
public string selectId = "-1";
|
||||||
|
|
||||||
|
public FrmAddVar()
|
||||||
|
{
|
||||||
|
InitializeComponent();
|
||||||
|
}
|
||||||
|
#region 需要修改
|
||||||
|
public void GetInfo(string id)
|
||||||
|
{
|
||||||
|
selectId = id;
|
||||||
|
DataProvider mydb = new DataProvider();
|
||||||
|
IDbInterface db = Itrycn_Db.CreateDataProvider(Itrycn_Db.dataType);
|
||||||
|
if (db.ConnDb(Itrycn_Db.User_SQLConn) == 1)
|
||||||
|
{
|
||||||
|
DataSet ds = db.ReadData("VarInfo", id);
|
||||||
|
if (mydb.HaveData(ds))
|
||||||
|
{
|
||||||
|
DataRow reader = ds.Tables[0].Rows[0];
|
||||||
|
#region 读取信息
|
||||||
|
TxtVar.Text = reader["VarName"].ToString();
|
||||||
|
TxtVarValue.Text = reader["VarValue"].ToString();
|
||||||
|
TxtDes.Text = reader["Des"].ToString();
|
||||||
|
#endregion
|
||||||
|
}
|
||||||
|
}
|
||||||
|
db.Free();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void BtnOK_Click(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
if (TxtVar.Text.Length==0)
|
||||||
|
{
|
||||||
|
MessageBox.Show("变量名不能为空。", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (!TxtVar.Text.Length.IsInRange(2,10))
|
||||||
|
{
|
||||||
|
MessageBox.Show("变量名太短或太长。", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (!TxtVar.Text.IsEng())
|
||||||
|
{
|
||||||
|
MessageBox.Show("变量名必须为英文。", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (TxtVarValue.Text.Contains("|"))
|
||||||
|
{
|
||||||
|
MessageBox.Show("变量值不得包含|", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
RyQuickSQL mySQL = new RyQuickSQL("VarInfo");
|
||||||
|
mySQL.AddField("VarName", TxtVar.Text);
|
||||||
|
mySQL.AddField("VarValue", TxtVarValue.Text);
|
||||||
|
mySQL.AddField("Des", TxtDes.Text);
|
||||||
|
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(),mySQL);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
mySQL.AddField("editTime", DateTime.Now);
|
||||||
|
db.ExecuteNonQuery(mySQL.GetUpdateSQL() + " where id=" + selectId, mySQL);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
db.Free();
|
||||||
|
DialogResult = DialogResult.OK;
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
private void BtnCancel_Click(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
DialogResult = DialogResult.Cancel;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
120
Source/开发辅助工具/Manager/FrmAddVar.resx
Normal file
120
Source/开发辅助工具/Manager/FrmAddVar.resx
Normal file
|
@ -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>
|
172
Source/开发辅助工具/Manager/FrmSetting.Designer.cs
generated
172
Source/开发辅助工具/Manager/FrmSetting.Designer.cs
generated
|
@ -42,16 +42,30 @@
|
||||||
this.BtnChapeBasePath = new ryControls.ButtonEx();
|
this.BtnChapeBasePath = new ryControls.ButtonEx();
|
||||||
this.TxtCshapeBasePath = new ryControls.TextBoxEx2();
|
this.TxtCshapeBasePath = new ryControls.TextBoxEx2();
|
||||||
this.label1 = new System.Windows.Forms.Label();
|
this.label1 = new System.Windows.Forms.Label();
|
||||||
|
this.tabPage2 = new System.Windows.Forms.TabPage();
|
||||||
|
this.ChkAss_Folder = new System.Windows.Forms.CheckBox();
|
||||||
|
this.ChkAss_Ryp = new System.Windows.Forms.CheckBox();
|
||||||
|
this.tabPage3 = new System.Windows.Forms.TabPage();
|
||||||
this.BtnOK = new ryControls.ButtonEx();
|
this.BtnOK = new ryControls.ButtonEx();
|
||||||
this.BtnCancel = new ryControls.ButtonEx();
|
this.BtnCancel = new ryControls.ButtonEx();
|
||||||
this.folderBrowserDialog1 = new System.Windows.Forms.FolderBrowserDialog();
|
this.folderBrowserDialog1 = new System.Windows.Forms.FolderBrowserDialog();
|
||||||
this.toolTip1 = new System.Windows.Forms.ToolTip(this.components);
|
this.toolTip1 = new System.Windows.Forms.ToolTip(this.components);
|
||||||
this.tabPage2 = new System.Windows.Forms.TabPage();
|
this.table1 = new XPTable.Models.Table();
|
||||||
this.ChkAss_Ryp = new System.Windows.Forms.CheckBox();
|
this.columnModel1 = new XPTable.Models.ColumnModel();
|
||||||
this.ChkAss_Folder = new System.Windows.Forms.CheckBox();
|
this.tableModel1 = new XPTable.Models.TableModel();
|
||||||
|
this.ColVariable = new XPTable.Models.TextColumn();
|
||||||
|
this.ColPath = new XPTable.Models.TextColumn();
|
||||||
|
this.ColDes = new XPTable.Models.TextColumn();
|
||||||
|
this.contextMenuStrip1 = new System.Windows.Forms.ContextMenuStrip(this.components);
|
||||||
|
this.新增变量ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||||
|
this.修改变量ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||||
|
this.删除变量ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||||
this.tabControl1.SuspendLayout();
|
this.tabControl1.SuspendLayout();
|
||||||
this.tabPage1.SuspendLayout();
|
this.tabPage1.SuspendLayout();
|
||||||
this.tabPage2.SuspendLayout();
|
this.tabPage2.SuspendLayout();
|
||||||
|
this.tabPage3.SuspendLayout();
|
||||||
|
((System.ComponentModel.ISupportInitialize)(this.table1)).BeginInit();
|
||||||
|
this.contextMenuStrip1.SuspendLayout();
|
||||||
this.SuspendLayout();
|
this.SuspendLayout();
|
||||||
//
|
//
|
||||||
// tabControl1
|
// tabControl1
|
||||||
|
@ -61,6 +75,7 @@
|
||||||
| System.Windows.Forms.AnchorStyles.Right)));
|
| System.Windows.Forms.AnchorStyles.Right)));
|
||||||
this.tabControl1.Controls.Add(this.tabPage1);
|
this.tabControl1.Controls.Add(this.tabPage1);
|
||||||
this.tabControl1.Controls.Add(this.tabPage2);
|
this.tabControl1.Controls.Add(this.tabPage2);
|
||||||
|
this.tabControl1.Controls.Add(this.tabPage3);
|
||||||
this.tabControl1.Location = new System.Drawing.Point(3, 2);
|
this.tabControl1.Location = new System.Drawing.Point(3, 2);
|
||||||
this.tabControl1.Name = "tabControl1";
|
this.tabControl1.Name = "tabControl1";
|
||||||
this.tabControl1.SelectedIndex = 0;
|
this.tabControl1.SelectedIndex = 0;
|
||||||
|
@ -241,6 +256,49 @@
|
||||||
this.label1.TabIndex = 0;
|
this.label1.TabIndex = 0;
|
||||||
this.label1.Text = "C# 基准项目路径";
|
this.label1.Text = "C# 基准项目路径";
|
||||||
//
|
//
|
||||||
|
// tabPage2
|
||||||
|
//
|
||||||
|
this.tabPage2.Controls.Add(this.ChkAss_Folder);
|
||||||
|
this.tabPage2.Controls.Add(this.ChkAss_Ryp);
|
||||||
|
this.tabPage2.Location = new System.Drawing.Point(4, 22);
|
||||||
|
this.tabPage2.Name = "tabPage2";
|
||||||
|
this.tabPage2.Padding = new System.Windows.Forms.Padding(3);
|
||||||
|
this.tabPage2.Size = new System.Drawing.Size(598, 373);
|
||||||
|
this.tabPage2.TabIndex = 1;
|
||||||
|
this.tabPage2.Text = "文件关联";
|
||||||
|
this.tabPage2.UseVisualStyleBackColor = true;
|
||||||
|
//
|
||||||
|
// ChkAss_Folder
|
||||||
|
//
|
||||||
|
this.ChkAss_Folder.AutoSize = true;
|
||||||
|
this.ChkAss_Folder.Location = new System.Drawing.Point(29, 40);
|
||||||
|
this.ChkAss_Folder.Name = "ChkAss_Folder";
|
||||||
|
this.ChkAss_Folder.Size = new System.Drawing.Size(132, 16);
|
||||||
|
this.ChkAss_Folder.TabIndex = 1;
|
||||||
|
this.ChkAss_Folder.Text = "关联文件夹右键菜单";
|
||||||
|
this.ChkAss_Folder.UseVisualStyleBackColor = true;
|
||||||
|
//
|
||||||
|
// ChkAss_Ryp
|
||||||
|
//
|
||||||
|
this.ChkAss_Ryp.AutoSize = true;
|
||||||
|
this.ChkAss_Ryp.Location = new System.Drawing.Point(29, 18);
|
||||||
|
this.ChkAss_Ryp.Name = "ChkAss_Ryp";
|
||||||
|
this.ChkAss_Ryp.Size = new System.Drawing.Size(114, 16);
|
||||||
|
this.ChkAss_Ryp.TabIndex = 0;
|
||||||
|
this.ChkAss_Ryp.Text = "关联ryp文件格式";
|
||||||
|
this.ChkAss_Ryp.UseVisualStyleBackColor = true;
|
||||||
|
//
|
||||||
|
// tabPage3
|
||||||
|
//
|
||||||
|
this.tabPage3.Controls.Add(this.table1);
|
||||||
|
this.tabPage3.Location = new System.Drawing.Point(4, 22);
|
||||||
|
this.tabPage3.Name = "tabPage3";
|
||||||
|
this.tabPage3.Padding = new System.Windows.Forms.Padding(3);
|
||||||
|
this.tabPage3.Size = new System.Drawing.Size(598, 373);
|
||||||
|
this.tabPage3.TabIndex = 2;
|
||||||
|
this.tabPage3.Text = "相对路径";
|
||||||
|
this.tabPage3.UseVisualStyleBackColor = true;
|
||||||
|
//
|
||||||
// BtnOK
|
// BtnOK
|
||||||
//
|
//
|
||||||
this.BtnOK.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
|
this.BtnOK.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
|
||||||
|
@ -265,37 +323,79 @@
|
||||||
this.BtnCancel.UseVisualStyleBackColor = true;
|
this.BtnCancel.UseVisualStyleBackColor = true;
|
||||||
this.BtnCancel.Click += new System.EventHandler(this.BtnCancel_Click);
|
this.BtnCancel.Click += new System.EventHandler(this.BtnCancel_Click);
|
||||||
//
|
//
|
||||||
// tabPage2
|
// table1
|
||||||
//
|
//
|
||||||
this.tabPage2.Controls.Add(this.ChkAss_Folder);
|
this.table1.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
|
||||||
this.tabPage2.Controls.Add(this.ChkAss_Ryp);
|
| System.Windows.Forms.AnchorStyles.Left)
|
||||||
this.tabPage2.Location = new System.Drawing.Point(4, 22);
|
| System.Windows.Forms.AnchorStyles.Right)));
|
||||||
this.tabPage2.Name = "tabPage2";
|
this.table1.ColumnModel = this.columnModel1;
|
||||||
this.tabPage2.Padding = new System.Windows.Forms.Padding(3);
|
this.table1.ContextMenuStrip = this.contextMenuStrip1;
|
||||||
this.tabPage2.Size = new System.Drawing.Size(598, 373);
|
this.table1.FullRowSelect = true;
|
||||||
this.tabPage2.TabIndex = 1;
|
this.table1.Location = new System.Drawing.Point(6, 3);
|
||||||
this.tabPage2.Text = "基本";
|
this.table1.Name = "table1";
|
||||||
this.tabPage2.UseVisualStyleBackColor = true;
|
this.table1.NoItemsText = "当前列表没有任何项";
|
||||||
|
this.table1.Size = new System.Drawing.Size(589, 367);
|
||||||
|
this.table1.TabIndex = 0;
|
||||||
|
this.table1.TableModel = this.tableModel1;
|
||||||
|
this.table1.Text = "table1";
|
||||||
//
|
//
|
||||||
// ChkAss_Ryp
|
// columnModel1
|
||||||
//
|
//
|
||||||
this.ChkAss_Ryp.AutoSize = true;
|
this.columnModel1.Columns.AddRange(new XPTable.Models.Column[] {
|
||||||
this.ChkAss_Ryp.Location = new System.Drawing.Point(29, 18);
|
this.ColVariable,
|
||||||
this.ChkAss_Ryp.Name = "ChkAss_Ryp";
|
this.ColPath,
|
||||||
this.ChkAss_Ryp.Size = new System.Drawing.Size(114, 16);
|
this.ColDes});
|
||||||
this.ChkAss_Ryp.TabIndex = 0;
|
|
||||||
this.ChkAss_Ryp.Text = "关联ryp文件格式";
|
|
||||||
this.ChkAss_Ryp.UseVisualStyleBackColor = true;
|
|
||||||
//
|
//
|
||||||
// ChkAss_Folder
|
// ColVariable
|
||||||
//
|
//
|
||||||
this.ChkAss_Folder.AutoSize = true;
|
this.ColVariable.Editable = false;
|
||||||
this.ChkAss_Folder.Location = new System.Drawing.Point(29, 40);
|
this.ColVariable.Tag = null;
|
||||||
this.ChkAss_Folder.Name = "ChkAss_Folder";
|
this.ColVariable.Text = "变量名";
|
||||||
this.ChkAss_Folder.Size = new System.Drawing.Size(132, 16);
|
this.ColVariable.Width = 80;
|
||||||
this.ChkAss_Folder.TabIndex = 1;
|
//
|
||||||
this.ChkAss_Folder.Text = "关联文件夹右键菜单";
|
// ColPath
|
||||||
this.ChkAss_Folder.UseVisualStyleBackColor = true;
|
//
|
||||||
|
this.ColPath.Editable = false;
|
||||||
|
this.ColPath.Tag = null;
|
||||||
|
this.ColPath.Text = "路径";
|
||||||
|
this.ColPath.Width = 320;
|
||||||
|
//
|
||||||
|
// ColDes
|
||||||
|
//
|
||||||
|
this.ColDes.Editable = false;
|
||||||
|
this.ColDes.Tag = null;
|
||||||
|
this.ColDes.Text = "说明";
|
||||||
|
this.ColDes.Width = 150;
|
||||||
|
//
|
||||||
|
// contextMenuStrip1
|
||||||
|
//
|
||||||
|
this.contextMenuStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||||
|
this.新增变量ToolStripMenuItem,
|
||||||
|
this.修改变量ToolStripMenuItem,
|
||||||
|
this.删除变量ToolStripMenuItem});
|
||||||
|
this.contextMenuStrip1.Name = "contextMenuStrip1";
|
||||||
|
this.contextMenuStrip1.Size = new System.Drawing.Size(181, 92);
|
||||||
|
//
|
||||||
|
// 新增变量ToolStripMenuItem
|
||||||
|
//
|
||||||
|
this.新增变量ToolStripMenuItem.Name = "新增变量ToolStripMenuItem";
|
||||||
|
this.新增变量ToolStripMenuItem.Size = new System.Drawing.Size(180, 22);
|
||||||
|
this.新增变量ToolStripMenuItem.Text = "新增变量";
|
||||||
|
this.新增变量ToolStripMenuItem.Click += new System.EventHandler(this.新增变量ToolStripMenuItem_Click);
|
||||||
|
//
|
||||||
|
// 修改变量ToolStripMenuItem
|
||||||
|
//
|
||||||
|
this.修改变量ToolStripMenuItem.Name = "修改变量ToolStripMenuItem";
|
||||||
|
this.修改变量ToolStripMenuItem.Size = new System.Drawing.Size(180, 22);
|
||||||
|
this.修改变量ToolStripMenuItem.Text = "修改变量";
|
||||||
|
this.修改变量ToolStripMenuItem.Click += new System.EventHandler(this.修改变量ToolStripMenuItem_Click);
|
||||||
|
//
|
||||||
|
// 删除变量ToolStripMenuItem
|
||||||
|
//
|
||||||
|
this.删除变量ToolStripMenuItem.Name = "删除变量ToolStripMenuItem";
|
||||||
|
this.删除变量ToolStripMenuItem.Size = new System.Drawing.Size(180, 22);
|
||||||
|
this.删除变量ToolStripMenuItem.Text = "删除变量";
|
||||||
|
this.删除变量ToolStripMenuItem.Click += new System.EventHandler(this.删除变量ToolStripMenuItem_Click);
|
||||||
//
|
//
|
||||||
// FrmSetting
|
// FrmSetting
|
||||||
//
|
//
|
||||||
|
@ -314,6 +414,9 @@
|
||||||
this.tabPage1.PerformLayout();
|
this.tabPage1.PerformLayout();
|
||||||
this.tabPage2.ResumeLayout(false);
|
this.tabPage2.ResumeLayout(false);
|
||||||
this.tabPage2.PerformLayout();
|
this.tabPage2.PerformLayout();
|
||||||
|
this.tabPage3.ResumeLayout(false);
|
||||||
|
((System.ComponentModel.ISupportInitialize)(this.table1)).EndInit();
|
||||||
|
this.contextMenuStrip1.ResumeLayout(false);
|
||||||
this.ResumeLayout(false);
|
this.ResumeLayout(false);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -340,5 +443,16 @@
|
||||||
private System.Windows.Forms.TabPage tabPage2;
|
private System.Windows.Forms.TabPage tabPage2;
|
||||||
private System.Windows.Forms.CheckBox ChkAss_Folder;
|
private System.Windows.Forms.CheckBox ChkAss_Folder;
|
||||||
private System.Windows.Forms.CheckBox ChkAss_Ryp;
|
private System.Windows.Forms.CheckBox ChkAss_Ryp;
|
||||||
|
private System.Windows.Forms.TabPage tabPage3;
|
||||||
|
private XPTable.Models.Table table1;
|
||||||
|
private XPTable.Models.ColumnModel columnModel1;
|
||||||
|
private XPTable.Models.TextColumn ColVariable;
|
||||||
|
private XPTable.Models.TextColumn ColPath;
|
||||||
|
private XPTable.Models.TableModel tableModel1;
|
||||||
|
private XPTable.Models.TextColumn ColDes;
|
||||||
|
private System.Windows.Forms.ContextMenuStrip contextMenuStrip1;
|
||||||
|
private System.Windows.Forms.ToolStripMenuItem 新增变量ToolStripMenuItem;
|
||||||
|
private System.Windows.Forms.ToolStripMenuItem 修改变量ToolStripMenuItem;
|
||||||
|
private System.Windows.Forms.ToolStripMenuItem 删除变量ToolStripMenuItem;
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -174,8 +174,35 @@ namespace 开发辅助工具.Manager
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
db.Free();
|
db.Free();
|
||||||
|
LoadVarData();
|
||||||
|
}
|
||||||
|
private void LoadVarData()
|
||||||
|
{
|
||||||
|
#region 重新载入数据
|
||||||
|
tableModel1.Rows.Clear();
|
||||||
|
tableModel1.Selections.Clear();
|
||||||
|
DataProvider mydb = new DataProvider();
|
||||||
|
IDbInterface db = Itrycn_Db.CreateDataProvider(Itrycn_Db.dataType);
|
||||||
|
if (db.ConnDb(Itrycn_Db.User_SQLConn) == 1)
|
||||||
|
{
|
||||||
|
DataSet ds = db.ReadData("select * from VarInfo");
|
||||||
|
for (int i = 0; i < ds.Tables[0].Rows.Count; i++)
|
||||||
|
{
|
||||||
|
DataRow row = ds.Tables[0].Rows[i];
|
||||||
|
XPTable.Models.Row itemList = new XPTable.Models.Row()
|
||||||
|
{
|
||||||
|
Tag = row["id"].ToString()
|
||||||
|
};
|
||||||
|
//需要修改此处
|
||||||
|
itemList.Cells.Add(new XPTable.Models.Cell(row["VarName"].ToString()));//示例
|
||||||
|
itemList.Cells.Add(new XPTable.Models.Cell(row["VarValue"].ToString()));
|
||||||
|
itemList.Cells.Add(new XPTable.Models.Cell(row["Des"].ToString()));
|
||||||
|
tableModel1.Rows.Add(itemList);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
db.Free();
|
||||||
|
#endregion
|
||||||
}
|
}
|
||||||
|
|
||||||
private void BtnReactorPath_Click(object sender, EventArgs e)
|
private void BtnReactorPath_Click(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
folderBrowserDialog1.SelectedPath = TxtReactorPath.Text;
|
folderBrowserDialog1.SelectedPath = TxtReactorPath.Text;
|
||||||
|
@ -193,5 +220,96 @@ namespace 开发辅助工具.Manager
|
||||||
TxtWinRARPath.Text = folderBrowserDialog1.SelectedPath;
|
TxtWinRARPath.Text = folderBrowserDialog1.SelectedPath;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
private void GetVarRow(string id, int index)
|
||||||
|
{
|
||||||
|
#region 重新载入数据
|
||||||
|
DataProvider mydb = new DataProvider();
|
||||||
|
IDbInterface db = Itrycn_Db.CreateDataProvider(Itrycn_Db.dataType);
|
||||||
|
if (db.ConnDb(Itrycn_Db.User_SQLConn) == 1)
|
||||||
|
{
|
||||||
|
DataSet ds = db.ReadData("select * from VarInfo where id=" + id);
|
||||||
|
if (mydb.HaveData(ds))
|
||||||
|
{
|
||||||
|
DataRow row = ds.Tables[0].Rows[0];
|
||||||
|
XPTable.Models.Row itemList = tableModel1.Rows[index];
|
||||||
|
//需要修改此处
|
||||||
|
itemList.Cells[ColVariable.Index].Text = row["VarName"].ToString();
|
||||||
|
itemList.Cells[ColPath.Index].Text = row["VarValue"].ToString();
|
||||||
|
itemList.Cells[ColDes.Index].Text = row["Des"].ToString();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
db.Free();
|
||||||
|
#endregion
|
||||||
|
}
|
||||||
|
private void 新增变量ToolStripMenuItem_Click(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
SuperDesign.Manager.FrmAddVar frm = new SuperDesign.Manager.FrmAddVar()
|
||||||
|
{
|
||||||
|
Text = "添加变量",
|
||||||
|
Icon = Icon,
|
||||||
|
isAdd = 1
|
||||||
|
};
|
||||||
|
if(frm.ShowDialog()==DialogResult.OK)
|
||||||
|
{
|
||||||
|
#region 获取最后一条记录
|
||||||
|
DataProvider mydb = new DataProvider();
|
||||||
|
IDbInterface db = Itrycn_Db.CreateDataProvider(Itrycn_Db.dataType);
|
||||||
|
if (db.ConnDb(Itrycn_Db.User_SQLConn) == 1)
|
||||||
|
{
|
||||||
|
DataSet ds = db.ReadData("select * from VarInfo order by id desc limit 1");
|
||||||
|
for (int i = 0; i < ds.Tables[0].Rows.Count; i++)
|
||||||
|
{
|
||||||
|
DataRow row = ds.Tables[0].Rows[i];
|
||||||
|
XPTable.Models.Row itemList = new XPTable.Models.Row()
|
||||||
|
{
|
||||||
|
Tag = row["id"].ToString()
|
||||||
|
};
|
||||||
|
//需要修改此处
|
||||||
|
itemList.Cells.Add(new XPTable.Models.Cell(row["VarName"].ToString()));//示例
|
||||||
|
itemList.Cells.Add(new XPTable.Models.Cell(row["VarValue"].ToString()));
|
||||||
|
itemList.Cells.Add(new XPTable.Models.Cell(row["Des"].ToString()));
|
||||||
|
tableModel1.Rows.Add(itemList);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
db.Free();
|
||||||
|
#endregion
|
||||||
|
}
|
||||||
|
frm.Dispose();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void 修改变量ToolStripMenuItem_Click(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
if (table1.SelectedItems.Length == 0) { return; }
|
||||||
|
string selectId = table1.SelectedItems[0].Tag.ToString();
|
||||||
|
int index = table1.SelectedItems[0].Index;
|
||||||
|
var frm = new SuperDesign.Manager.FrmAddVar()
|
||||||
|
{
|
||||||
|
Text = "修改变量",
|
||||||
|
Icon = Icon,
|
||||||
|
isAdd = 0
|
||||||
|
};
|
||||||
|
frm.GetInfo(selectId);
|
||||||
|
if (frm.ShowDialog() == DialogResult.OK)
|
||||||
|
{
|
||||||
|
GetVarRow(selectId, index);
|
||||||
|
}
|
||||||
|
frm.Dispose();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void 删除变量ToolStripMenuItem_Click(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
if (table1.SelectedItems.Length == 0) { MessageBox.Show("请先选择要删除的项。", "提示", MessageBoxButtons.OK, MessageBoxIcon.Warning); return; }
|
||||||
|
string selectId = table1.SelectedItems[0].Tag.ToString();
|
||||||
|
if (MessageBox.Show("确定要删除该项吗?一旦删除将不可恢复。", "提示", MessageBoxButtons.YesNo, MessageBoxIcon.Information) == DialogResult.No)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
IDbInterface db = Itrycn_Db.CreateDataProvider(Itrycn_Db.dataType);
|
||||||
|
if (db.ConnDb(Itrycn_Db.User_SQLConn) == 1)
|
||||||
|
{
|
||||||
|
db.DelById("VarInfo", selectId);
|
||||||
|
tableModel1.Rows.RemoveAt(table1.SelectedItems[0].Index);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -117,10 +117,22 @@
|
||||||
<resheader name="writer">
|
<resheader name="writer">
|
||||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
</resheader>
|
</resheader>
|
||||||
|
<metadata name="columnModel1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||||
|
<value>298, 17</value>
|
||||||
|
</metadata>
|
||||||
|
<metadata name="contextMenuStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||||
|
<value>566, 17</value>
|
||||||
|
</metadata>
|
||||||
|
<metadata name="tableModel1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||||
|
<value>439, 17</value>
|
||||||
|
</metadata>
|
||||||
<metadata name="toolTip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
<metadata name="toolTip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||||
<value>197, 17</value>
|
<value>197, 17</value>
|
||||||
</metadata>
|
</metadata>
|
||||||
<metadata name="folderBrowserDialog1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
<metadata name="folderBrowserDialog1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||||
<value>17, 17</value>
|
<value>17, 17</value>
|
||||||
</metadata>
|
</metadata>
|
||||||
|
<metadata name="toolTip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||||
|
<value>197, 17</value>
|
||||||
|
</metadata>
|
||||||
</root>
|
</root>
|
|
@ -95,6 +95,16 @@ namespace 开发辅助工具.Manager
|
||||||
mySQL.AddField("addTime", DateTime.Now);
|
mySQL.AddField("addTime", DateTime.Now);
|
||||||
db.CreateDb(mySQL);
|
db.CreateDb(mySQL);
|
||||||
#endregion
|
#endregion
|
||||||
|
#region 变量表
|
||||||
|
mySQL.Clear();
|
||||||
|
mySQL.TableName = "VarInfo"; ;
|
||||||
|
mySQL.AddField("VarName", "");
|
||||||
|
mySQL.AddField("VarValue", "");
|
||||||
|
mySQL.AddField("Des", "");//备注
|
||||||
|
mySQL.AddField("editTime", DateTime.Now);
|
||||||
|
mySQL.AddField("addTime", DateTime.Now);
|
||||||
|
db.CreateDb(mySQL);
|
||||||
|
#endregion
|
||||||
#region 设置表
|
#region 设置表
|
||||||
mySQL.Clear();
|
mySQL.Clear();
|
||||||
mySQL.TableName = "Settings"; ;
|
mySQL.TableName = "Settings"; ;
|
||||||
|
|
|
@ -3,6 +3,7 @@ using ryCommonDb;
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.ComponentModel;
|
using System.ComponentModel;
|
||||||
|
using System.Data;
|
||||||
using System.Diagnostics;
|
using System.Diagnostics;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
|
@ -500,7 +501,24 @@ namespace 开发辅助工具.Manager
|
||||||
}
|
}
|
||||||
else if (line.IndexOfEx("copy:") == 0)
|
else if (line.IndexOfEx("copy:") == 0)
|
||||||
{
|
{
|
||||||
var from_to = line.Substring(5).Replace("->", "|").Split('|');
|
var item = line.Substring(5);
|
||||||
|
if(item.Contains("<") && item.Contains(">"))
|
||||||
|
{
|
||||||
|
DataSet ds_var = db.ReadData("select * from VarInfo");
|
||||||
|
if (mydb.HaveData(ds_var))
|
||||||
|
{
|
||||||
|
for (int n = 0; n < ds_var.Tables[0].Rows.Count; n++)
|
||||||
|
{
|
||||||
|
DataRow row_var = ds_var.Tables[0].Rows[n];
|
||||||
|
item = item.Replace("<" + row_var["VarName"].ToString() + ">", row_var["VarValue"].ToString());
|
||||||
|
if (!item.Contains("<") || !item.Contains(">"))
|
||||||
|
{
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
var from_to = item.Replace("->", "|").Split('|');
|
||||||
if (from_to.Length == 2)
|
if (from_to.Length == 2)
|
||||||
{
|
{
|
||||||
var from_path = from_to[0];
|
var from_path = from_to[0];
|
||||||
|
|
|
@ -31,5 +31,5 @@ using System.Runtime.InteropServices;
|
||||||
// 可以指定所有值,也可以使用以下所示的 "*" 预置版本号和修订号
|
// 可以指定所有值,也可以使用以下所示的 "*" 预置版本号和修订号
|
||||||
// 方法是按如下所示使用“*”: :
|
// 方法是按如下所示使用“*”: :
|
||||||
// [assembly: AssemblyVersion("1.0.*")]
|
// [assembly: AssemblyVersion("1.0.*")]
|
||||||
[assembly: AssemblyVersion("2.0.2012.0901")]
|
[assembly: AssemblyVersion("2.0.2012.1001")]
|
||||||
[assembly: AssemblyFileVersion("2.0.2012.0901")]
|
[assembly: AssemblyFileVersion("2.0.2012.1001")]
|
|
@ -143,6 +143,12 @@
|
||||||
<DependentUpon>FrmMessageBox.cs</DependentUpon>
|
<DependentUpon>FrmMessageBox.cs</DependentUpon>
|
||||||
</Compile>
|
</Compile>
|
||||||
<Compile Include="Globals.cs" />
|
<Compile Include="Globals.cs" />
|
||||||
|
<Compile Include="Manager\FrmAddVar.cs">
|
||||||
|
<SubType>Form</SubType>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="Manager\FrmAddVar.Designer.cs">
|
||||||
|
<DependentUpon>FrmAddVar.cs</DependentUpon>
|
||||||
|
</Compile>
|
||||||
<Compile Include="Manager\FrmSetting.cs">
|
<Compile Include="Manager\FrmSetting.cs">
|
||||||
<SubType>Form</SubType>
|
<SubType>Form</SubType>
|
||||||
</Compile>
|
</Compile>
|
||||||
|
@ -294,6 +300,9 @@
|
||||||
<EmbeddedResource Include="Manager\FrmAddTools.resx">
|
<EmbeddedResource Include="Manager\FrmAddTools.resx">
|
||||||
<DependentUpon>FrmAddTools.cs</DependentUpon>
|
<DependentUpon>FrmAddTools.cs</DependentUpon>
|
||||||
</EmbeddedResource>
|
</EmbeddedResource>
|
||||||
|
<EmbeddedResource Include="Manager\FrmAddVar.resx">
|
||||||
|
<DependentUpon>FrmAddVar.cs</DependentUpon>
|
||||||
|
</EmbeddedResource>
|
||||||
<EmbeddedResource Include="Manager\FrmSetting.resx">
|
<EmbeddedResource Include="Manager\FrmSetting.resx">
|
||||||
<DependentUpon>FrmSetting.cs</DependentUpon>
|
<DependentUpon>FrmSetting.cs</DependentUpon>
|
||||||
</EmbeddedResource>
|
</EmbeddedResource>
|
||||||
|
|
Loading…
Reference in New Issue
Block a user