### 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
@@ -0,0 +1,154 @@
|
||||
namespace 开发辅助工具.Tools.SmartEditor
|
||||
{
|
||||
partial class FrmFavFile
|
||||
{
|
||||
/// <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()
|
||||
{
|
||||
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(FrmFavFile));
|
||||
this.TxtFavName = new ryControls.TextBoxEx2();
|
||||
this.label1 = new System.Windows.Forms.Label();
|
||||
this.BtnCancel = new ryControls.ButtonEx();
|
||||
this.BtnOK = new ryControls.ButtonEx();
|
||||
this.label2 = new System.Windows.Forms.Label();
|
||||
this.TxtFind = new ryControls.TextBoxEx2();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// TxtFavName
|
||||
//
|
||||
this.TxtFavName.BackColor = System.Drawing.Color.White;
|
||||
this.TxtFavName.EmptyText = "";
|
||||
this.TxtFavName.Location = new System.Drawing.Point(12, 33);
|
||||
this.TxtFavName.MaxLength = 999999999;
|
||||
this.TxtFavName.Multiline = false;
|
||||
this.TxtFavName.Name = "TxtFavName";
|
||||
this.TxtFavName.OnlyNumeric = false;
|
||||
this.TxtFavName.PasswordChar = '\0';
|
||||
this.TxtFavName.ReadOnly = false;
|
||||
this.TxtFavName.SelectedText = "";
|
||||
this.TxtFavName.SelectionLength = 0;
|
||||
this.TxtFavName.SelectionStart = 0;
|
||||
this.TxtFavName.Size = new System.Drawing.Size(274, 27);
|
||||
this.TxtFavName.TabIndex = 0;
|
||||
this.TxtFavName.TextAlign = System.Windows.Forms.HorizontalAlignment.Left;
|
||||
this.TxtFavName.ToolTip = "";
|
||||
this.TxtFavName.WordWrap = true;
|
||||
//
|
||||
// label1
|
||||
//
|
||||
this.label1.AutoSize = true;
|
||||
this.label1.Location = new System.Drawing.Point(12, 17);
|
||||
this.label1.Name = "label1";
|
||||
this.label1.Size = new System.Drawing.Size(101, 12);
|
||||
this.label1.TabIndex = 1;
|
||||
this.label1.Text = "请输入收藏的名称";
|
||||
//
|
||||
// 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(211, 125);
|
||||
this.BtnCancel.Name = "BtnCancel";
|
||||
this.BtnCancel.Size = new System.Drawing.Size(75, 30);
|
||||
this.BtnCancel.TabIndex = 4;
|
||||
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(130, 125);
|
||||
this.BtnOK.Name = "BtnOK";
|
||||
this.BtnOK.Size = new System.Drawing.Size(75, 30);
|
||||
this.BtnOK.TabIndex = 3;
|
||||
this.BtnOK.Text = "确定";
|
||||
this.BtnOK.UseVisualStyleBackColor = true;
|
||||
this.BtnOK.Click += new System.EventHandler(this.BtnOK_Click);
|
||||
//
|
||||
// label2
|
||||
//
|
||||
this.label2.AutoSize = true;
|
||||
this.label2.Location = new System.Drawing.Point(12, 62);
|
||||
this.label2.Name = "label2";
|
||||
this.label2.Size = new System.Drawing.Size(77, 12);
|
||||
this.label2.TabIndex = 6;
|
||||
this.label2.Text = "并且查找内容";
|
||||
//
|
||||
// TxtFind
|
||||
//
|
||||
this.TxtFind.BackColor = System.Drawing.Color.White;
|
||||
this.TxtFind.EmptyText = "";
|
||||
this.TxtFind.Location = new System.Drawing.Point(12, 78);
|
||||
this.TxtFind.MaxLength = 999999999;
|
||||
this.TxtFind.Multiline = false;
|
||||
this.TxtFind.Name = "TxtFind";
|
||||
this.TxtFind.OnlyNumeric = false;
|
||||
this.TxtFind.PasswordChar = '\0';
|
||||
this.TxtFind.ReadOnly = false;
|
||||
this.TxtFind.SelectedText = "";
|
||||
this.TxtFind.SelectionLength = 0;
|
||||
this.TxtFind.SelectionStart = 0;
|
||||
this.TxtFind.Size = new System.Drawing.Size(274, 27);
|
||||
this.TxtFind.TabIndex = 5;
|
||||
this.TxtFind.TextAlign = System.Windows.Forms.HorizontalAlignment.Left;
|
||||
this.TxtFind.ToolTip = "";
|
||||
this.TxtFind.WordWrap = true;
|
||||
//
|
||||
// FrmFavFile
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.ClientSize = new System.Drawing.Size(298, 163);
|
||||
this.Controls.Add(this.label2);
|
||||
this.Controls.Add(this.TxtFind);
|
||||
this.Controls.Add(this.BtnCancel);
|
||||
this.Controls.Add(this.BtnOK);
|
||||
this.Controls.Add(this.label1);
|
||||
this.Controls.Add(this.TxtFavName);
|
||||
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;
|
||||
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
|
||||
this.MaximizeBox = false;
|
||||
this.MinimizeBox = false;
|
||||
this.Name = "FrmFavFile";
|
||||
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
|
||||
this.Text = "收藏文件";
|
||||
this.TopMost = true;
|
||||
this.ResumeLayout(false);
|
||||
this.PerformLayout();
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
private System.Windows.Forms.Label label1;
|
||||
private ryControls.ButtonEx BtnCancel;
|
||||
private ryControls.ButtonEx BtnOK;
|
||||
public ryControls.TextBoxEx2 TxtFavName;
|
||||
private System.Windows.Forms.Label label2;
|
||||
public ryControls.TextBoxEx2 TxtFind;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,55 @@
|
||||
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 System.Xml.Linq;
|
||||
using 开发辅助工具.Manager;
|
||||
|
||||
namespace 开发辅助工具.Tools.SmartEditor
|
||||
{
|
||||
public partial class FrmFavFile : Form
|
||||
{
|
||||
public FrmFavFile()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
private void BtnCancel_Click(object sender, EventArgs e)
|
||||
{
|
||||
DialogResult= DialogResult.Cancel;
|
||||
}
|
||||
public int SelectedId = 0;
|
||||
public int GroupId = 0;
|
||||
public string FilePath { get; set; } = "";
|
||||
private void BtnOK_Click(object sender, EventArgs e)
|
||||
{
|
||||
RyQuickSQL mySQL = new RyQuickSQL("FavFiles");
|
||||
mySQL.AddField("name", TxtFavName.Text);
|
||||
mySQL.AddField("FilePath", FilePath);
|
||||
mySQL.AddField("FindText", TxtFind.Text);
|
||||
mySQL.AddField("GroupId", GroupId);
|
||||
IDbInterface db = Itrycn_Db.CreateDataProvider(Itrycn_Db.dataType);
|
||||
if (db.ConnDb(Itrycn_Db.User_SQLConn) == 1)
|
||||
{
|
||||
mySQL.AddField("editTime", DateTime.Now);
|
||||
if(SelectedId==0)
|
||||
{
|
||||
mySQL.AddField("addTime", DateTime.Now);
|
||||
db.ExecuteNonQuery(mySQL.GetInsertSQL(), db.GetParameter(mySQL));
|
||||
}
|
||||
else
|
||||
{
|
||||
db.ExecuteNonQuery(mySQL.GetUpdateSQL() + " where id=" + SelectedId, mySQL);
|
||||
}
|
||||
}
|
||||
db.Free();
|
||||
DialogResult = DialogResult.OK;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,141 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||
<data name="$this.Icon" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
AAABAAEAICAAAAAAIACPAwAAFgAAAIlQTkcNChoKAAAADUlIRFIAAAAgAAAAIAgGAAAAc3p69AAAAARn
|
||||
QU1BAACxjwv8YQUAAANGSURBVFhH1VfLS1RRHD5SjQxq49iL3ovKMizxASFCf0CrlkGrFrWIVi5aFbRo
|
||||
U4seho4TiWZYamW+IoPUqUYFddKSwgw1e5sUBhVKwa/vnPubMzN6mu6oI/TBB/ee8/2+73fvPefeGfHf
|
||||
gkpFFkiKXpHDw4sHhJ7TDXhECQ8vDhC+CcFTYXdgmi6LdJ6OP3DFJzl4QtFq5AJPxxdULJIR9k2FNq7w
|
||||
ge3cwHc042JZ/ICrP6YCvWKSxnLfg+9wPsljZ1gWP6CBzyqsLvUhTRSQYn1qmxorFV9ZFh8g/LAK8oif
|
||||
NJz9WjcwnD2K8R/cRCHLFx4wf6tCbrtCVx9knSu4FsZZPndQmVgHo3xc6QHwOI6LwWYO+E2Du4dmNTCU
|
||||
NajmLI3UFqta6SG94Mn2kcDC2QPBeQjrcNyL4+C2MrM25dGs8CDlnKkmRLlte1WWlVkgb6tJaNGb8IYq
|
||||
E310x9VCbRtaqW9HrzE4nE+2B6h1fQceSRdddQzAY9zozZQN1OiB5pXt1LO1g8byRozm8+FI9ifq3tKj
|
||||
MkIN1FiPoVRc04P17najwUKwwe3TOchU4UHg2ZTpSbmiTQbz4a3lofWBLI6NBCY9WlSb4jMazYU3Ux5r
|
||||
X2RwnBlYmRe1+EbS31e8XVYn+7UfvDkmOiA+q4uqnH6jsR1ed3ZoH3iyvT3gOZ3WxY1p3caAaLy7qknX
|
||||
w4ttYwOK+5VBlbPTGBKN8s5ZDfSxXexA8bQyubc69rXQsuYBNzDFdrGBrog0NiAKbOs3hkRjIL1L15cI
|
||||
N9vaBwr3aoPR3I/GkGgcy7O+nBbz2dY+UHRUFXsTPhgDBjKeU/myPsWBnQGjxpsQbOIQ29oH9uwlVVzh
|
||||
iDR/lvGSyh3P2DjEikQ/vciM/FhVOoLbMLYtKIGi+6q4wW0tQBlc5QywoUWPkAHhbzm5+lvRiNV0Y1pw
|
||||
ITaxrX2gSP7MIurc7MfbLLSgJD3iFfb2fpZK7T6cP43QVCe1kR+1ln6YpfZAp8TSCLMQJxF0hGWzgKCD
|
||||
0FiNz2StWMKyfwMhuwwmJ3g6KmQQtIXgl7BaeRcyWWIPYcVFVCQSedg2+Hel/Kb8kj48bB+4C2vxL2gj
|
||||
n84Z8MmRXnw6A0L8AczNmfchKD2pAAAAAElFTkSuQmCC
|
||||
</value>
|
||||
</data>
|
||||
</root>
|
||||
@@ -0,0 +1,119 @@
|
||||
namespace 开发辅助工具.Tools.SmartEditor
|
||||
{
|
||||
partial class FrmFavGroup
|
||||
{
|
||||
/// <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()
|
||||
{
|
||||
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(FrmFavGroup));
|
||||
this.TxtFavName = new ryControls.TextBoxEx2();
|
||||
this.label1 = new System.Windows.Forms.Label();
|
||||
this.BtnCancel = new ryControls.ButtonEx();
|
||||
this.BtnOK = new ryControls.ButtonEx();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// TxtFavName
|
||||
//
|
||||
this.TxtFavName.BackColor = System.Drawing.Color.White;
|
||||
this.TxtFavName.EmptyText = "";
|
||||
this.TxtFavName.Location = new System.Drawing.Point(12, 33);
|
||||
this.TxtFavName.MaxLength = 999999999;
|
||||
this.TxtFavName.Multiline = false;
|
||||
this.TxtFavName.Name = "TxtFavName";
|
||||
this.TxtFavName.OnlyNumeric = false;
|
||||
this.TxtFavName.PasswordChar = '\0';
|
||||
this.TxtFavName.ReadOnly = false;
|
||||
this.TxtFavName.SelectedText = "";
|
||||
this.TxtFavName.SelectionLength = 0;
|
||||
this.TxtFavName.SelectionStart = 0;
|
||||
this.TxtFavName.Size = new System.Drawing.Size(274, 27);
|
||||
this.TxtFavName.TabIndex = 0;
|
||||
this.TxtFavName.TextAlign = System.Windows.Forms.HorizontalAlignment.Left;
|
||||
this.TxtFavName.ToolTip = "";
|
||||
this.TxtFavName.WordWrap = true;
|
||||
//
|
||||
// label1
|
||||
//
|
||||
this.label1.AutoSize = true;
|
||||
this.label1.Location = new System.Drawing.Point(12, 17);
|
||||
this.label1.Name = "label1";
|
||||
this.label1.Size = new System.Drawing.Size(77, 12);
|
||||
this.label1.TabIndex = 1;
|
||||
this.label1.Text = "请输入组名称";
|
||||
//
|
||||
// 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(211, 72);
|
||||
this.BtnCancel.Name = "BtnCancel";
|
||||
this.BtnCancel.Size = new System.Drawing.Size(75, 30);
|
||||
this.BtnCancel.TabIndex = 4;
|
||||
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(130, 72);
|
||||
this.BtnOK.Name = "BtnOK";
|
||||
this.BtnOK.Size = new System.Drawing.Size(75, 30);
|
||||
this.BtnOK.TabIndex = 3;
|
||||
this.BtnOK.Text = "确定";
|
||||
this.BtnOK.UseVisualStyleBackColor = true;
|
||||
this.BtnOK.Click += new System.EventHandler(this.BtnOK_Click);
|
||||
//
|
||||
// FrmFavGroup
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.ClientSize = new System.Drawing.Size(298, 110);
|
||||
this.Controls.Add(this.BtnCancel);
|
||||
this.Controls.Add(this.BtnOK);
|
||||
this.Controls.Add(this.label1);
|
||||
this.Controls.Add(this.TxtFavName);
|
||||
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;
|
||||
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
|
||||
this.MaximizeBox = false;
|
||||
this.MinimizeBox = false;
|
||||
this.Name = "FrmFavGroup";
|
||||
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
|
||||
this.Text = "收藏组";
|
||||
this.TopMost = true;
|
||||
this.ResumeLayout(false);
|
||||
this.PerformLayout();
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
private System.Windows.Forms.Label label1;
|
||||
private ryControls.ButtonEx BtnCancel;
|
||||
private ryControls.ButtonEx BtnOK;
|
||||
public ryControls.TextBoxEx2 TxtFavName;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,50 @@
|
||||
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 System.Xml.Linq;
|
||||
using 开发辅助工具.Manager;
|
||||
|
||||
namespace 开发辅助工具.Tools.SmartEditor
|
||||
{
|
||||
public partial class FrmFavGroup : Form
|
||||
{
|
||||
public FrmFavGroup()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
private void BtnCancel_Click(object sender, EventArgs e)
|
||||
{
|
||||
DialogResult= DialogResult.Cancel;
|
||||
}
|
||||
public int SelectedId = 0;
|
||||
private void BtnOK_Click(object sender, EventArgs e)
|
||||
{
|
||||
RyQuickSQL mySQL = new RyQuickSQL("FavGroup");
|
||||
mySQL.AddField("name", TxtFavName.Text);
|
||||
IDbInterface db = Itrycn_Db.CreateDataProvider(Itrycn_Db.dataType);
|
||||
if (db.ConnDb(Itrycn_Db.User_SQLConn) == 1)
|
||||
{
|
||||
mySQL.AddField("editTime", DateTime.Now);
|
||||
if (SelectedId==0)
|
||||
{
|
||||
mySQL.AddField("addTime", DateTime.Now);
|
||||
db.ExecuteNonQuery(mySQL.GetInsertSQL(), mySQL);
|
||||
}
|
||||
else
|
||||
{
|
||||
db.ExecuteNonQuery(mySQL.GetUpdateSQL() + " where id="+ SelectedId, mySQL);
|
||||
}
|
||||
}
|
||||
db.Free();
|
||||
DialogResult = DialogResult.OK;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,141 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||
<data name="$this.Icon" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
AAABAAEAICAAAAAAIACPAwAAFgAAAIlQTkcNChoKAAAADUlIRFIAAAAgAAAAIAgGAAAAc3p69AAAAARn
|
||||
QU1BAACxjwv8YQUAAANGSURBVFhH1VfLS1RRHD5SjQxq49iL3ovKMizxASFCf0CrlkGrFrWIVi5aFbRo
|
||||
U4seho4TiWZYamW+IoPUqUYFddKSwgw1e5sUBhVKwa/vnPubMzN6mu6oI/TBB/ee8/2+73fvPefeGfHf
|
||||
gkpFFkiKXpHDw4sHhJ7TDXhECQ8vDhC+CcFTYXdgmi6LdJ6OP3DFJzl4QtFq5AJPxxdULJIR9k2FNq7w
|
||||
ge3cwHc042JZ/ICrP6YCvWKSxnLfg+9wPsljZ1gWP6CBzyqsLvUhTRSQYn1qmxorFV9ZFh8g/LAK8oif
|
||||
NJz9WjcwnD2K8R/cRCHLFx4wf6tCbrtCVx9knSu4FsZZPndQmVgHo3xc6QHwOI6LwWYO+E2Du4dmNTCU
|
||||
NajmLI3UFqta6SG94Mn2kcDC2QPBeQjrcNyL4+C2MrM25dGs8CDlnKkmRLlte1WWlVkgb6tJaNGb8IYq
|
||||
E310x9VCbRtaqW9HrzE4nE+2B6h1fQceSRdddQzAY9zozZQN1OiB5pXt1LO1g8byRozm8+FI9ifq3tKj
|
||||
MkIN1FiPoVRc04P17najwUKwwe3TOchU4UHg2ZTpSbmiTQbz4a3lofWBLI6NBCY9WlSb4jMazYU3Ux5r
|
||||
X2RwnBlYmRe1+EbS31e8XVYn+7UfvDkmOiA+q4uqnH6jsR1ed3ZoH3iyvT3gOZ3WxY1p3caAaLy7qknX
|
||||
w4ttYwOK+5VBlbPTGBKN8s5ZDfSxXexA8bQyubc69rXQsuYBNzDFdrGBrog0NiAKbOs3hkRjIL1L15cI
|
||||
N9vaBwr3aoPR3I/GkGgcy7O+nBbz2dY+UHRUFXsTPhgDBjKeU/myPsWBnQGjxpsQbOIQ29oH9uwlVVzh
|
||||
iDR/lvGSyh3P2DjEikQ/vciM/FhVOoLbMLYtKIGi+6q4wW0tQBlc5QywoUWPkAHhbzm5+lvRiNV0Y1pw
|
||||
ITaxrX2gSP7MIurc7MfbLLSgJD3iFfb2fpZK7T6cP43QVCe1kR+1ln6YpfZAp8TSCLMQJxF0hGWzgKCD
|
||||
0FiNz2StWMKyfwMhuwwmJ3g6KmQQtIXgl7BaeRcyWWIPYcVFVCQSedg2+Hel/Kb8kj48bB+4C2vxL2gj
|
||||
n84Z8MmRXnw6A0L8AczNmfchKD2pAAAAAElFTkSuQmCC
|
||||
</value>
|
||||
</data>
|
||||
</root>
|
||||
@@ -0,0 +1,306 @@
|
||||
namespace GameBackup3H3.DbOp
|
||||
{
|
||||
partial class FrmFavView
|
||||
{
|
||||
/// <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.components = new System.ComponentModel.Container();
|
||||
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(FrmFavView));
|
||||
this.rySearch1 = new ryControls.rySearch();
|
||||
this.MenuFav = new System.Windows.Forms.ContextMenuStrip(this.components);
|
||||
this.修改数据ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.删除数据ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.ctlMyPage1 = new MyPage.ctlMyPage();
|
||||
this.btnDel = new ryControls.ButtonEx();
|
||||
this.btnEdit = new ryControls.ButtonEx();
|
||||
this.LvCbResult = new BrightIdeasSoftware.FastObjectListView();
|
||||
this.OlvName = ((BrightIdeasSoftware.OLVColumn)(new BrightIdeasSoftware.OLVColumn()));
|
||||
this.OlvFilePath = ((BrightIdeasSoftware.OLVColumn)(new BrightIdeasSoftware.OLVColumn()));
|
||||
this.OlvAddTime = ((BrightIdeasSoftware.OLVColumn)(new BrightIdeasSoftware.OLVColumn()));
|
||||
this.LvGroup = new BrightIdeasSoftware.FastObjectListView();
|
||||
this.OlvGroupName = ((BrightIdeasSoftware.OLVColumn)(new BrightIdeasSoftware.OLVColumn()));
|
||||
this.MenuFavGroup = 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.toolStripMenuItem1 = new System.Windows.Forms.ToolStripSeparator();
|
||||
this.打开本分组到编辑器ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.MenuFav.SuspendLayout();
|
||||
((System.ComponentModel.ISupportInitialize)(this.LvCbResult)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.LvGroup)).BeginInit();
|
||||
this.MenuFavGroup.SuspendLayout();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// rySearch1
|
||||
//
|
||||
this.rySearch1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(236)))), ((int)(((byte)(239)))), ((int)(((byte)(244)))));
|
||||
this.rySearch1.ButtonRoundBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(236)))), ((int)(((byte)(239)))), ((int)(((byte)(244)))));
|
||||
this.rySearch1.EmptyText = "请输入搜索内容";
|
||||
this.rySearch1.Location = new System.Drawing.Point(12, 5);
|
||||
this.rySearch1.Name = "rySearch1";
|
||||
this.rySearch1.Size = new System.Drawing.Size(329, 24);
|
||||
this.rySearch1.TabIndex = 28;
|
||||
this.rySearch1.OnSearch += new System.EventHandler(this.RySearch1_OnSearch);
|
||||
//
|
||||
// MenuFav
|
||||
//
|
||||
this.MenuFav.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||
this.修改数据ToolStripMenuItem,
|
||||
this.删除数据ToolStripMenuItem});
|
||||
this.MenuFav.Name = "contextMenuStrip1";
|
||||
this.MenuFav.Size = new System.Drawing.Size(125, 48);
|
||||
//
|
||||
// 修改数据ToolStripMenuItem
|
||||
//
|
||||
this.修改数据ToolStripMenuItem.Name = "修改数据ToolStripMenuItem";
|
||||
this.修改数据ToolStripMenuItem.Size = new System.Drawing.Size(124, 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(124, 22);
|
||||
this.删除数据ToolStripMenuItem.Text = "删除数据";
|
||||
this.删除数据ToolStripMenuItem.Click += new System.EventHandler(this.删除数据ToolStripMenuItem_Click);
|
||||
//
|
||||
// ctlMyPage1
|
||||
//
|
||||
this.ctlMyPage1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
|
||||
this.ctlMyPage1.CountSQL = "";
|
||||
this.ctlMyPage1.db = null;
|
||||
this.ctlMyPage1.Location = new System.Drawing.Point(12, 644);
|
||||
this.ctlMyPage1.Multithreading = false;
|
||||
this.ctlMyPage1.Name = "ctlMyPage1";
|
||||
this.ctlMyPage1.PageSize = 50;
|
||||
this.ctlMyPage1.RecordCount = 0;
|
||||
this.ctlMyPage1.Size = new System.Drawing.Size(506, 26);
|
||||
this.ctlMyPage1.SQLText = "";
|
||||
this.ctlMyPage1.SQLText2 = "";
|
||||
this.ctlMyPage1.T_FirstCaption = "首页";
|
||||
this.ctlMyPage1.T_LastCaption = "末页";
|
||||
this.ctlMyPage1.T_NextCaption = "下一页";
|
||||
this.ctlMyPage1.T_Parameters = null;
|
||||
this.ctlMyPage1.T_PreCaption = "上一页";
|
||||
this.ctlMyPage1.T_SkipCaption = "跳到";
|
||||
this.ctlMyPage1.T_TipCaption = "{pageindex}/{pagecount} 页,共 {recordcount} 条记录,每页 {pagesize} 条";
|
||||
this.ctlMyPage1.TabIndex = 30;
|
||||
this.ctlMyPage1.OnPageChange += new System.EventHandler(this.CtlMyPage1_OnPageChange);
|
||||
//
|
||||
// btnDel
|
||||
//
|
||||
this.btnDel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.btnDel.BaseColor = System.Drawing.Color.FromArgb(((int)(((byte)(51)))), ((int)(((byte)(76)))), ((int)(((byte)(95)))));
|
||||
this.btnDel.Location = new System.Drawing.Point(977, 5);
|
||||
this.btnDel.Name = "btnDel";
|
||||
this.btnDel.Size = new System.Drawing.Size(62, 24);
|
||||
this.btnDel.TabIndex = 40;
|
||||
this.btnDel.Text = "删除";
|
||||
this.btnDel.UseVisualStyleBackColor = true;
|
||||
this.btnDel.Click += new System.EventHandler(this.BtnDel_Click);
|
||||
//
|
||||
// btnEdit
|
||||
//
|
||||
this.btnEdit.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.btnEdit.BaseColor = System.Drawing.Color.FromArgb(((int)(((byte)(51)))), ((int)(((byte)(76)))), ((int)(((byte)(95)))));
|
||||
this.btnEdit.Location = new System.Drawing.Point(909, 5);
|
||||
this.btnEdit.Name = "btnEdit";
|
||||
this.btnEdit.Size = new System.Drawing.Size(62, 24);
|
||||
this.btnEdit.TabIndex = 39;
|
||||
this.btnEdit.Text = "修改";
|
||||
this.btnEdit.UseVisualStyleBackColor = true;
|
||||
this.btnEdit.Click += new System.EventHandler(this.BtnEdit_Click);
|
||||
//
|
||||
// LvCbResult
|
||||
//
|
||||
this.LvCbResult.AllColumns.Add(this.OlvName);
|
||||
this.LvCbResult.AllColumns.Add(this.OlvFilePath);
|
||||
this.LvCbResult.AllColumns.Add(this.OlvAddTime);
|
||||
this.LvCbResult.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.LvCbResult.CellEditUseWholeCell = false;
|
||||
this.LvCbResult.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] {
|
||||
this.OlvName,
|
||||
this.OlvFilePath,
|
||||
this.OlvAddTime});
|
||||
this.LvCbResult.ContextMenuStrip = this.MenuFav;
|
||||
this.LvCbResult.Cursor = System.Windows.Forms.Cursors.Default;
|
||||
this.LvCbResult.EmptyListMsg = "当前列表没有任何项";
|
||||
this.LvCbResult.FullRowSelect = true;
|
||||
this.LvCbResult.HideSelection = false;
|
||||
this.LvCbResult.Location = new System.Drawing.Point(191, 35);
|
||||
this.LvCbResult.Name = "LvCbResult";
|
||||
this.LvCbResult.ShowGroups = false;
|
||||
this.LvCbResult.ShowItemToolTips = true;
|
||||
this.LvCbResult.Size = new System.Drawing.Size(848, 607);
|
||||
this.LvCbResult.TabIndex = 85;
|
||||
this.LvCbResult.UseCompatibleStateImageBehavior = false;
|
||||
this.LvCbResult.UseFiltering = true;
|
||||
this.LvCbResult.View = System.Windows.Forms.View.Details;
|
||||
this.LvCbResult.VirtualMode = true;
|
||||
this.LvCbResult.DoubleClick += new System.EventHandler(this.LvCbResult_DoubleClick);
|
||||
//
|
||||
// OlvName
|
||||
//
|
||||
this.OlvName.Text = "名称";
|
||||
this.OlvName.Width = 200;
|
||||
//
|
||||
// OlvFilePath
|
||||
//
|
||||
this.OlvFilePath.Text = "路径";
|
||||
this.OlvFilePath.Width = 450;
|
||||
//
|
||||
// OlvAddTime
|
||||
//
|
||||
this.OlvAddTime.Text = "时间";
|
||||
this.OlvAddTime.Width = 180;
|
||||
//
|
||||
// LvGroup
|
||||
//
|
||||
this.LvGroup.AllColumns.Add(this.OlvGroupName);
|
||||
this.LvGroup.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
|
||||
| System.Windows.Forms.AnchorStyles.Left)));
|
||||
this.LvGroup.CellEditUseWholeCell = false;
|
||||
this.LvGroup.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] {
|
||||
this.OlvGroupName});
|
||||
this.LvGroup.ContextMenuStrip = this.MenuFavGroup;
|
||||
this.LvGroup.Cursor = System.Windows.Forms.Cursors.Default;
|
||||
this.LvGroup.EmptyListMsg = "当前列表没有任何项";
|
||||
this.LvGroup.FullRowSelect = true;
|
||||
this.LvGroup.HeaderStyle = System.Windows.Forms.ColumnHeaderStyle.Nonclickable;
|
||||
this.LvGroup.HideSelection = false;
|
||||
this.LvGroup.Location = new System.Drawing.Point(12, 35);
|
||||
this.LvGroup.MultiSelect = false;
|
||||
this.LvGroup.Name = "LvGroup";
|
||||
this.LvGroup.ShowGroups = false;
|
||||
this.LvGroup.ShowItemToolTips = true;
|
||||
this.LvGroup.Size = new System.Drawing.Size(173, 607);
|
||||
this.LvGroup.TabIndex = 86;
|
||||
this.LvGroup.UnfocusedSelectedBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(128)))), ((int)(((byte)(128)))), ((int)(((byte)(255)))));
|
||||
this.LvGroup.UseCompatibleStateImageBehavior = false;
|
||||
this.LvGroup.UseFiltering = true;
|
||||
this.LvGroup.View = System.Windows.Forms.View.Details;
|
||||
this.LvGroup.VirtualMode = true;
|
||||
this.LvGroup.SelectionChanged += new System.EventHandler(this.LvGroup_SelectionChanged);
|
||||
//
|
||||
// OlvGroupName
|
||||
//
|
||||
this.OlvGroupName.Text = "组名称";
|
||||
this.OlvGroupName.Width = 160;
|
||||
//
|
||||
// MenuFavGroup
|
||||
//
|
||||
this.MenuFavGroup.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||
this.添加组ToolStripMenuItem,
|
||||
this.修改组ToolStripMenuItem,
|
||||
this.删除组ToolStripMenuItem,
|
||||
this.toolStripMenuItem1,
|
||||
this.打开本分组到编辑器ToolStripMenuItem});
|
||||
this.MenuFavGroup.Name = "MenuFavGroup";
|
||||
this.MenuFavGroup.Size = new System.Drawing.Size(185, 98);
|
||||
//
|
||||
// 添加组ToolStripMenuItem
|
||||
//
|
||||
this.添加组ToolStripMenuItem.Name = "添加组ToolStripMenuItem";
|
||||
this.添加组ToolStripMenuItem.Size = new System.Drawing.Size(184, 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(184, 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(184, 22);
|
||||
this.删除组ToolStripMenuItem.Text = "删除组";
|
||||
this.删除组ToolStripMenuItem.Click += new System.EventHandler(this.删除组ToolStripMenuItem_Click);
|
||||
//
|
||||
// toolStripMenuItem1
|
||||
//
|
||||
this.toolStripMenuItem1.Name = "toolStripMenuItem1";
|
||||
this.toolStripMenuItem1.Size = new System.Drawing.Size(181, 6);
|
||||
//
|
||||
// 打开本分组到编辑器ToolStripMenuItem
|
||||
//
|
||||
this.打开本分组到编辑器ToolStripMenuItem.Name = "打开本分组到编辑器ToolStripMenuItem";
|
||||
this.打开本分组到编辑器ToolStripMenuItem.Size = new System.Drawing.Size(184, 22);
|
||||
this.打开本分组到编辑器ToolStripMenuItem.Text = "打开本分组到编辑器";
|
||||
this.打开本分组到编辑器ToolStripMenuItem.Click += new System.EventHandler(this.打开本分组到编辑器ToolStripMenuItem_Click);
|
||||
//
|
||||
// FrmFavView
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.ClientSize = new System.Drawing.Size(1051, 674);
|
||||
this.Controls.Add(this.LvGroup);
|
||||
this.Controls.Add(this.LvCbResult);
|
||||
this.Controls.Add(this.btnDel);
|
||||
this.Controls.Add(this.btnEdit);
|
||||
this.Controls.Add(this.ctlMyPage1);
|
||||
this.Controls.Add(this.rySearch1);
|
||||
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
|
||||
this.Name = "FrmFavView";
|
||||
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
|
||||
this.Text = "浏览";
|
||||
this.Load += new System.EventHandler(this.FrmView_Load);
|
||||
this.MenuFav.ResumeLayout(false);
|
||||
((System.ComponentModel.ISupportInitialize)(this.LvCbResult)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.LvGroup)).EndInit();
|
||||
this.MenuFavGroup.ResumeLayout(false);
|
||||
this.ResumeLayout(false);
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private ryControls.rySearch rySearch1;
|
||||
private MyPage.ctlMyPage ctlMyPage1;
|
||||
private ryControls.ButtonEx btnDel;
|
||||
private ryControls.ButtonEx btnEdit;
|
||||
private System.Windows.Forms.ContextMenuStrip MenuFav;
|
||||
private System.Windows.Forms.ToolStripMenuItem 修改数据ToolStripMenuItem;
|
||||
private System.Windows.Forms.ToolStripMenuItem 删除数据ToolStripMenuItem;
|
||||
private BrightIdeasSoftware.FastObjectListView LvCbResult;
|
||||
private BrightIdeasSoftware.OLVColumn OlvName;
|
||||
private BrightIdeasSoftware.OLVColumn OlvAddTime;
|
||||
private BrightIdeasSoftware.OLVColumn OlvFilePath;
|
||||
private BrightIdeasSoftware.FastObjectListView LvGroup;
|
||||
private BrightIdeasSoftware.OLVColumn OlvGroupName;
|
||||
private System.Windows.Forms.ContextMenuStrip MenuFavGroup;
|
||||
private System.Windows.Forms.ToolStripMenuItem 添加组ToolStripMenuItem;
|
||||
private System.Windows.Forms.ToolStripMenuItem 修改组ToolStripMenuItem;
|
||||
private System.Windows.Forms.ToolStripMenuItem 删除组ToolStripMenuItem;
|
||||
private System.Windows.Forms.ToolStripSeparator toolStripMenuItem1;
|
||||
private System.Windows.Forms.ToolStripMenuItem 打开本分组到编辑器ToolStripMenuItem;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,409 @@
|
||||
using ryCommon;
|
||||
using ryCommonDb;
|
||||
using 开发辅助工具.Tools.SmartEditor;
|
||||
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;
|
||||
using ryControls;
|
||||
using System.Runtime.InteropServices;
|
||||
using BrightIdeasSoftware;
|
||||
using SuperDesign.Tools.SmartEditor;
|
||||
|
||||
namespace GameBackup3H3.DbOp
|
||||
{
|
||||
public partial class FrmFavView : Form
|
||||
{
|
||||
readonly string orderSQL = "order by addTime desc";
|
||||
readonly string tableName = "FavFiles";
|
||||
readonly string titleName = "收藏管理";
|
||||
public FrmFavView()
|
||||
{
|
||||
InitializeComponent();
|
||||
OlvGroupName.AspectGetter = delegate (object x) { return ((FavInfo)x).Name; };
|
||||
OlvName.AspectGetter = delegate (object x) { return ((FavInfo)x).Name; };
|
||||
OlvFilePath.AspectGetter = delegate (object x) { return ((FavInfo)x).FilePath; };
|
||||
OlvAddTime.AspectGetter = delegate (object x) { return ((FavInfo)x).AddTimeStr; };
|
||||
LoadGroup();
|
||||
SetupDragAndDrop();
|
||||
}
|
||||
private void SetupDragAndDrop()
|
||||
{
|
||||
|
||||
// Make each listview capable of dragging rows out
|
||||
this.LvGroup.DragSource = new SimpleDragSource();
|
||||
this.LvCbResult.DragSource = new SimpleDragSource();
|
||||
SimpleDropSink dropSink = new SimpleDropSink();
|
||||
dropSink.CanDropOnItem = true;
|
||||
//dropSink.CanDropOnSubItem = true;
|
||||
dropSink.FeedbackColor = Color.IndianRed; // just to be different
|
||||
this.LvGroup.DropSink = dropSink;
|
||||
|
||||
// For our purpose here, we will make it that if you drop one or more person
|
||||
// onto someone, they all become married.
|
||||
dropSink.ModelCanDrop += delegate (object sender, ModelDropEventArgs e) {
|
||||
FavInfo item = e.TargetModel as FavInfo;
|
||||
if (item == null)
|
||||
e.Effect = DragDropEffects.None;
|
||||
else
|
||||
{
|
||||
if (item.Id<0)
|
||||
{
|
||||
e.Effect = DragDropEffects.None;
|
||||
e.InfoMessage = "不能拖放到此处";
|
||||
}
|
||||
else
|
||||
e.Effect = DragDropEffects.Link;
|
||||
}
|
||||
};
|
||||
|
||||
dropSink.ModelDropped += delegate (object sender, ModelDropEventArgs e) {
|
||||
if (e.TargetModel == null)
|
||||
return;
|
||||
var item = (FavInfo)e.TargetModel;
|
||||
var from_list = e.SourceModels;
|
||||
var del_list = new List<FavInfo>();
|
||||
IDbInterface db = Itrycn_Db.CreateDataProvider(Itrycn_Db.dataType);
|
||||
if (db.ConnDb(Itrycn_Db.User_SQLConn) == 1)
|
||||
{
|
||||
for (int i = 0; i < from_list.Count; i++)
|
||||
{
|
||||
var from_item = (FavInfo)from_list[i];
|
||||
if (from_item.GroupId != item.Id)
|
||||
{
|
||||
del_list.Add(from_item);
|
||||
db.ExecuteNonQuery("update FavFiles set GroupId=" + item.Id + " where id=" + from_item.Id);
|
||||
}
|
||||
}
|
||||
}
|
||||
var selected_group = (FavInfo)LvGroup.SelectedObject;
|
||||
if (selected_group != null && selected_group.GroupId >= 0)
|
||||
{
|
||||
LvCbResult.RemoveObjects(del_list);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
#region 需要修改的内容
|
||||
private void RySearch1_OnSearch(object sender, EventArgs e)
|
||||
{
|
||||
//需要修改此处
|
||||
LoadDb("(name like @SearchText or FilePath like @SearchText)");
|
||||
}
|
||||
private void LoadGroup()
|
||||
{
|
||||
LvGroup.ClearObjects();
|
||||
List<FavInfo> list = new List<FavInfo>
|
||||
{
|
||||
new FavInfo()
|
||||
{
|
||||
Id =-1,
|
||||
Name = "全部收藏",
|
||||
AddTime = DateTime.Now
|
||||
},
|
||||
new FavInfo()
|
||||
{
|
||||
Id = 0,
|
||||
Name = "未分组",
|
||||
AddTime = DateTime.Now
|
||||
},
|
||||
};
|
||||
IDbInterface db = Itrycn_Db.CreateDataProvider(Itrycn_Db.dataType);
|
||||
if (db.ConnDb(Itrycn_Db.User_SQLConn) == 1)
|
||||
{
|
||||
DataSet ds = db.ReadData("select * from FavGroup");
|
||||
for (int i = 0; i < ds.Tables[0].Rows.Count; i++)
|
||||
{
|
||||
DataRow row = ds.Tables[0].Rows[i];
|
||||
list.Add(new FavInfo()
|
||||
{
|
||||
Id = row["id"].ToInt(),
|
||||
Name = row["name"].ToString(),
|
||||
AddTime = row["AddTime"].ToDateTime()
|
||||
});
|
||||
}
|
||||
}
|
||||
db.Free();
|
||||
LvGroup.AddObjects(list);
|
||||
}
|
||||
private void CtlMyPage1_OnPageChange(object sender, EventArgs e)
|
||||
{
|
||||
#region 重新载入数据
|
||||
LvCbResult.ClearObjects();
|
||||
List<FavInfo> list = new List<FavInfo>();
|
||||
IDbInterface db = Itrycn_Db.CreateDataProvider(Itrycn_Db.dataType);
|
||||
if (db.ConnDb(Itrycn_Db.User_SQLConn) == 1)
|
||||
{
|
||||
DataSet ds = db.ReadData(ctlMyPage1.GetSQLText, ctlMyPage1.T_Parameters);
|
||||
for (int i = 0; i < ds.Tables[0].Rows.Count; i++)
|
||||
{
|
||||
DataRow row = ds.Tables[0].Rows[i];
|
||||
list.Add(new FavInfo()
|
||||
{
|
||||
Id=row["id"].ToInt(),
|
||||
Name = row["name"].ToString(),
|
||||
FilePath = row["FilePath"].ToString(),
|
||||
FindText = row["FindText"].ToString(),
|
||||
GroupId = row["GroupId"].ToInt(),
|
||||
AddTime = row["AddTime"].ToDateTime()
|
||||
}) ;
|
||||
}
|
||||
}
|
||||
db.Free();
|
||||
LvCbResult.AddObjects(list);
|
||||
#endregion
|
||||
}
|
||||
private void GetRow(int 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 " + tableName + " where id=" + id);
|
||||
if (mydb.HaveData(ds))
|
||||
{
|
||||
DataRow row = ds.Tables[0].Rows[0];
|
||||
var item=(FavInfo) LvCbResult.GetModelObject(index);
|
||||
item.Name = row["name"].ToString();
|
||||
item.FindText = row["FindText"].ToString();
|
||||
item.FilePath = row["FilePath"].ToString();
|
||||
item.GroupId = row["GroupId"].ToInt();
|
||||
//添加剩余的项目
|
||||
//添加完毕
|
||||
LvCbResult.UpdateObject(item);
|
||||
}
|
||||
}
|
||||
db.Free();
|
||||
#endregion
|
||||
}
|
||||
#endregion
|
||||
public void LoadDb(string whereSQL)
|
||||
{
|
||||
string _whereSQL = whereSQL;
|
||||
IDbInterface db = Itrycn_Db.CreateDataProvider(Itrycn_Db.dataType);
|
||||
if (db.ConnDb(Itrycn_Db.User_SQLConn) == 1)
|
||||
{
|
||||
#region 重新载入数据
|
||||
var group =(FavInfo) LvGroup.SelectedObject;
|
||||
if(group!=null && group.Id>=0)
|
||||
{
|
||||
_whereSQL += " and GroupId="+group.Id;
|
||||
}
|
||||
db.AddParameter("SearchText", "%" + rySearch1.Text + "%");
|
||||
ctlMyPage1.RecordCount = db.GetCount(tableName, _whereSQL);
|
||||
ctlMyPage1.T_Parameters = db.GetParameter();
|
||||
ctlMyPage1.SQLText= db.GetPageSQL(tableName, _whereSQL, orderSQL);
|
||||
ctlMyPage1.SQLText2 = db.GetPageSQL2(tableName, _whereSQL, orderSQL);
|
||||
ctlMyPage1.GotoPageIndex(1);
|
||||
#endregion
|
||||
}
|
||||
db.Free();
|
||||
}
|
||||
private void BtnEdit_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (LvCbResult.SelectedObject == null) { return; }
|
||||
var item = (FavInfo)LvCbResult.SelectedObject;
|
||||
var selectId = item.Id;
|
||||
FrmFavFile frm = new FrmFavFile
|
||||
{
|
||||
Text = "修改" + titleName,
|
||||
Icon = Icon,
|
||||
GroupId = item.GroupId,
|
||||
SelectedId = item.Id,
|
||||
FilePath = item.FilePath
|
||||
};
|
||||
frm.TxtFavName.Text = item.Name;
|
||||
frm.TxtFind.Text = item.FindText;
|
||||
if(frm.ShowDialog()==DialogResult.OK)
|
||||
{
|
||||
GetRow(selectId, LvCbResult.SelectedIndex);
|
||||
}
|
||||
frm.Dispose();
|
||||
}
|
||||
|
||||
private void BtnDel_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (LvCbResult.SelectedObjects.Count == 0) { MessageBox.Show("请先选择要删除的项。", "提示", MessageBoxButtons.OK, MessageBoxIcon.Warning); return; }
|
||||
switch (MessageBox.Show("确定要删除选定的项吗?一旦删除将不可恢复。", "询问", MessageBoxButtons.YesNo, MessageBoxIcon.Question, MessageBoxDefaultButton.Button2))
|
||||
{
|
||||
case DialogResult.No:
|
||||
return;
|
||||
}
|
||||
//DataProvider mydb = new DataProvider();
|
||||
IDbInterface db = Itrycn_Db.CreateDataProvider(Itrycn_Db.dataType);
|
||||
if (db.ConnDb(Itrycn_Db.User_SQLConn) == 1)
|
||||
{
|
||||
for (int i = 0; i < LvCbResult.SelectedObjects.Count; i++)
|
||||
{
|
||||
var item = (FavInfo)LvCbResult.SelectedObjects[i];
|
||||
var selectId = item.Id;
|
||||
db.DelById(tableName, selectId.ToString());
|
||||
}
|
||||
LvCbResult.RemoveObjects(LvCbResult.SelectedObjects);
|
||||
}
|
||||
}
|
||||
|
||||
private void FrmView_Load(object sender, EventArgs e)
|
||||
{
|
||||
Text = "浏览"+ titleName;
|
||||
修改数据ToolStripMenuItem.Text = "修改" + titleName;
|
||||
删除数据ToolStripMenuItem.Text = "删除" + titleName;
|
||||
rySearch1.PerformClick();
|
||||
}
|
||||
private void 修改数据ToolStripMenuItem_Click(object sender, EventArgs e)
|
||||
{
|
||||
btnEdit.PerformClick();
|
||||
}
|
||||
|
||||
private void 删除数据ToolStripMenuItem_Click(object sender, EventArgs e)
|
||||
{
|
||||
btnDel.PerformClick();
|
||||
}
|
||||
public bool SelectModeOn { get; set; } = false;
|
||||
public FavInfo SelectedItem { get; set; }
|
||||
private void LvCbResult_DoubleClick(object sender, EventArgs e)
|
||||
{
|
||||
if(SelectModeOn)
|
||||
{
|
||||
if (LvCbResult.SelectedObject == null) { return; }
|
||||
SelectedItem = (FavInfo)LvCbResult.SelectedObject;
|
||||
DialogResult=DialogResult.OK;
|
||||
}
|
||||
}
|
||||
|
||||
private void LvGroup_SelectionChanged(object sender, EventArgs e)
|
||||
{
|
||||
rySearch1.PerformClick();
|
||||
}
|
||||
|
||||
private void 添加组ToolStripMenuItem_Click(object sender, EventArgs e)
|
||||
{
|
||||
FrmFavGroup frm = new FrmFavGroup
|
||||
{
|
||||
Text = "添加组",
|
||||
Icon = Icon,
|
||||
SelectedId = 0
|
||||
};
|
||||
if (frm.ShowDialog() == DialogResult.OK)
|
||||
{
|
||||
LoadGroup();
|
||||
}
|
||||
frm.Dispose();
|
||||
}
|
||||
|
||||
private void 修改组ToolStripMenuItem_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (LvGroup.SelectedObject == null) { return; }
|
||||
var item = (FavInfo)LvGroup.SelectedObject;
|
||||
FrmFavGroup frm = new FrmFavGroup
|
||||
{
|
||||
Text = "修改组",
|
||||
Icon = Icon,
|
||||
SelectedId = item.Id
|
||||
};
|
||||
frm.TxtFavName.Text = item.Name;
|
||||
if (frm.ShowDialog() == DialogResult.OK)
|
||||
{
|
||||
item.Name = frm.TxtFavName.Text;
|
||||
LvGroup.RefreshObject(item);
|
||||
}
|
||||
frm.Dispose();
|
||||
}
|
||||
|
||||
private void 删除组ToolStripMenuItem_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (LvGroup.SelectedObject == null) { MessageBox.Show("请先选择要删除的项。", "提示", MessageBoxButtons.OK, MessageBoxIcon.Warning); return; }
|
||||
var item = (FavInfo)LvGroup.SelectedObject;
|
||||
switch (MessageBox.Show("确定要删除该项吗?一旦删除将不可恢复。", "询问", MessageBoxButtons.YesNo, MessageBoxIcon.Question, MessageBoxDefaultButton.Button2))
|
||||
{
|
||||
case DialogResult.No:
|
||||
return;
|
||||
}
|
||||
//DataProvider mydb = new DataProvider();
|
||||
IDbInterface db = Itrycn_Db.CreateDataProvider(Itrycn_Db.dataType);
|
||||
if (db.ConnDb(Itrycn_Db.User_SQLConn) == 1)
|
||||
{
|
||||
var ds = db.ReadData("select * from FavFiles where GroupId="+ item.Id+" limit 1");
|
||||
if(ds.HaveData())
|
||||
{
|
||||
MessageBox.Show("当前组内还有收藏,请删除收藏后再删除组", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
|
||||
ds.Dispose();
|
||||
return;
|
||||
}
|
||||
ds.Dispose();
|
||||
db.DelById("FavGroup", item.Id.ToString());
|
||||
LvGroup.RemoveObject(item);
|
||||
}
|
||||
}
|
||||
|
||||
private void 打开本分组到编辑器ToolStripMenuItem_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (LvGroup.SelectedObject == null) { MessageBox.Show("请先选择要打开的组。", "提示", MessageBoxButtons.OK, MessageBoxIcon.Warning); return; }
|
||||
var item = (FavInfo)LvGroup.SelectedObject;
|
||||
IDbInterface db = Itrycn_Db.CreateDataProvider(Itrycn_Db.dataType);
|
||||
if (db.ConnDb(Itrycn_Db.User_SQLConn) == 1)
|
||||
{
|
||||
var ds = db.ReadData("select * from FavFiles where GroupId=" + item.Id);
|
||||
List<string> list=new List<string>();
|
||||
if (ds.HaveData())
|
||||
{
|
||||
for (int i = 0; i < ds.Tables[0].Rows.Count; i++)
|
||||
{
|
||||
var row = ds.GetRow(i);
|
||||
list.Add(row["FilePath"].ToString());
|
||||
}
|
||||
}
|
||||
ds.Dispose();
|
||||
if(list.Count>0)
|
||||
{
|
||||
FrmMainEditor.MainEditor.OpenFileList(list);
|
||||
DialogResult= DialogResult.Yes;
|
||||
}
|
||||
else
|
||||
{
|
||||
MessageBox.Show("该组没有任何数据", "警告", MessageBoxButtons.OK, MessageBoxIcon.Warning);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
public class FavInfo
|
||||
{
|
||||
/// <summary>
|
||||
/// id
|
||||
/// </summary>
|
||||
public int Id{ get; set; }
|
||||
/// <summary>
|
||||
/// 名称
|
||||
/// </summary>
|
||||
public string Name { get; set; }
|
||||
/// <summary>
|
||||
/// FilePath
|
||||
/// </summary>
|
||||
public string FilePath { get; set; }
|
||||
/// <summary>
|
||||
/// FindText
|
||||
/// </summary>
|
||||
public string FindText { get; set; }
|
||||
/// <summary>
|
||||
/// 组id
|
||||
/// </summary>
|
||||
public int GroupId { get; set; }
|
||||
/// <summary>
|
||||
/// 添加时间
|
||||
/// </summary>
|
||||
public DateTime AddTime { get; set; }
|
||||
/// <summary>
|
||||
/// 添加时间字符串
|
||||
/// </summary>
|
||||
public string AddTimeStr
|
||||
{
|
||||
get { return AddTime.ToString("yyyy-MM-dd dddd HH:mm:ss"); }
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,147 @@
|
||||
<?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="MenuFav.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>35, 21</value>
|
||||
</metadata>
|
||||
<metadata name="MenuFavGroup.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>141, 21</value>
|
||||
</metadata>
|
||||
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||
<data name="$this.Icon" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
AAABAAEAICAAAAAAIACPAwAAFgAAAIlQTkcNChoKAAAADUlIRFIAAAAgAAAAIAgGAAAAc3p69AAAAARn
|
||||
QU1BAACxjwv8YQUAAANGSURBVFhH1VfLS1RRHD5SjQxq49iL3ovKMizxASFCf0CrlkGrFrWIVi5aFbRo
|
||||
U4seho4TiWZYamW+IoPUqUYFddKSwgw1e5sUBhVKwa/vnPubMzN6mu6oI/TBB/ee8/2+73fvPefeGfHf
|
||||
gkpFFkiKXpHDw4sHhJ7TDXhECQ8vDhC+CcFTYXdgmi6LdJ6OP3DFJzl4QtFq5AJPxxdULJIR9k2FNq7w
|
||||
ge3cwHc042JZ/ICrP6YCvWKSxnLfg+9wPsljZ1gWP6CBzyqsLvUhTRSQYn1qmxorFV9ZFh8g/LAK8oif
|
||||
NJz9WjcwnD2K8R/cRCHLFx4wf6tCbrtCVx9knSu4FsZZPndQmVgHo3xc6QHwOI6LwWYO+E2Du4dmNTCU
|
||||
NajmLI3UFqta6SG94Mn2kcDC2QPBeQjrcNyL4+C2MrM25dGs8CDlnKkmRLlte1WWlVkgb6tJaNGb8IYq
|
||||
E310x9VCbRtaqW9HrzE4nE+2B6h1fQceSRdddQzAY9zozZQN1OiB5pXt1LO1g8byRozm8+FI9ifq3tKj
|
||||
MkIN1FiPoVRc04P17najwUKwwe3TOchU4UHg2ZTpSbmiTQbz4a3lofWBLI6NBCY9WlSb4jMazYU3Ux5r
|
||||
X2RwnBlYmRe1+EbS31e8XVYn+7UfvDkmOiA+q4uqnH6jsR1ed3ZoH3iyvT3gOZ3WxY1p3caAaLy7qknX
|
||||
w4ttYwOK+5VBlbPTGBKN8s5ZDfSxXexA8bQyubc69rXQsuYBNzDFdrGBrog0NiAKbOs3hkRjIL1L15cI
|
||||
N9vaBwr3aoPR3I/GkGgcy7O+nBbz2dY+UHRUFXsTPhgDBjKeU/myPsWBnQGjxpsQbOIQ29oH9uwlVVzh
|
||||
iDR/lvGSyh3P2DjEikQ/vciM/FhVOoLbMLYtKIGi+6q4wW0tQBlc5QywoUWPkAHhbzm5+lvRiNV0Y1pw
|
||||
ITaxrX2gSP7MIurc7MfbLLSgJD3iFfb2fpZK7T6cP43QVCe1kR+1ln6YpfZAp8TSCLMQJxF0hGWzgKCD
|
||||
0FiNz2StWMKyfwMhuwwmJ3g6KmQQtIXgl7BaeRcyWWIPYcVFVCQSedg2+Hel/Kb8kj48bB+4C2vxL2gj
|
||||
n84Z8MmRXnw6A0L8AczNmfchKD2pAAAAAElFTkSuQmCC
|
||||
</value>
|
||||
</data>
|
||||
</root>
|
||||
Reference in new issue
Block a user