初始备份。

This commit is contained in:
如果当时 committed 2020-11-28 16:15:24 +08:00
commit 59677e1a85
152 files changed
+54611

No files matched your search

@@ -0,0 +1,42 @@
namespace ryProcessManager.hezuo
{
partial class ContextMenuStripHighlightText
{
/// <summary>
/// 必需的设计器变量。
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// 清理所有正在使用的资源。
/// </summary>
/// <param name="disposing">如果应释放托管资源,为 true;否则为 false。</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region 组件设计器生成的代码
/// <summary>
/// 设计器支持所需的方法 - 不要修改
/// 使用代码编辑器修改此方法的内容。
/// </summary>
private void InitializeComponent()
{
this.SuspendLayout();
//
// ContextMenuStripRichText
//
this.Opening += new System.ComponentModel.CancelEventHandler(this.ContextMenuStripRichText_Opening);
this.ResumeLayout(false);
}
#endregion
}
}
@@ -0,0 +1,142 @@
using ICSharpCode.TextEditor;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Diagnostics;
using System.Linq;
using System.Text;
using System.Threading;
using System.Windows.Forms;
using XmlPad;
namespace ryProcessManager.hezuo
{
public partial class ContextMenuStripHighlightText : ContextMenuStrip
{
public ContextMenuStripHighlightText()
{
InitializeComponent();
AddMenu("撤销", "undo").Click += Undo_Click;
AddMenu("重做", "redo").Click += Redo_Click;
AddSeparatorMenu();
AddMenu("剪切", "cut").Click += Cut_Click;
AddMenu("复制", "copy").Click += Copy_Click;
AddMenu("粘贴", "paste").Click += Paste_Click;
AddMenu("删除", "del").Click += Del_Click;
AddMenu("全选", "selectall").Click += SelectAll_Click;
AddMenu("查找", "find").Click += Find_Click;
}
private void Find_Click(object sender, EventArgs e)
{
if (!(base.SourceControl is ICSharpCode.TextEditor.TextEditorControl)) { return; }
var rich_txt = (ICSharpCode.TextEditor.TextEditorControl)base.SourceControl;
FindAndReplaceForm _findForm = new FindAndReplaceForm();
TextEditorControl editor = rich_txt;
if (editor == null) return;
_findForm.ShowFor(editor, false);
_findForm.ReplaceMode = false;
}
private void SelectAll_Click(object sender, EventArgs e)
{
if (!(base.SourceControl is ICSharpCode.TextEditor.TextEditorControl)) { return; }
//var rich_txt = (ICSharpCode.TextEditor.TextEditorControl)base.SourceControl;
Thread th = new Thread(sendkey);
th.Start();
void sendkey()
{
Thread.Sleep(100);
this.Invoke(new Action(() =>
{
SendKeys.SendWait("^a");
}));
}
}
private void Undo_Click(object sender, EventArgs e)
{
if(!(base.SourceControl is ICSharpCode.TextEditor.TextEditorControl)) { return; }
var rich_txt = (ICSharpCode.TextEditor.TextEditorControl)base.SourceControl;
rich_txt.Undo();
}
private void Redo_Click(object sender, EventArgs e)
{
if (!(base.SourceControl is ICSharpCode.TextEditor.TextEditorControl)) { return; }
var rich_txt = (ICSharpCode.TextEditor.TextEditorControl)base.SourceControl;
rich_txt.Redo();
}
private void Cut_Click(object sender, EventArgs e)
{
if (!(base.SourceControl is ICSharpCode.TextEditor.TextEditorControl)) { return; }
var rich_txt = (ICSharpCode.TextEditor.TextEditorControl)base.SourceControl;
ryCommon.RyFiles.CopyToClip(rich_txt.ActiveTextAreaControl.SelectionManager.SelectedText);
rich_txt.ActiveTextAreaControl.TextArea.InsertString("");
}
private void Copy_Click(object sender, EventArgs e)
{
if (!(base.SourceControl is ICSharpCode.TextEditor.TextEditorControl)) { return; }
var rich_txt = (ICSharpCode.TextEditor.TextEditorControl)base.SourceControl;
ryCommon.RyFiles.CopyToClip(rich_txt.ActiveTextAreaControl.SelectionManager.SelectedText);
}
private void Paste_Click(object sender, EventArgs e)
{
if (!(base.SourceControl is ICSharpCode.TextEditor.TextEditorControl)) { return; }
var rich_txt = (ICSharpCode.TextEditor.TextEditorControl)base.SourceControl;
rich_txt.ActiveTextAreaControl.TextArea.InsertString(Clipboard.GetText().Replace("\r\n", "\r").Replace("\r", "\r\n"));
}
private void Del_Click(object sender, EventArgs e)
{
if (!(base.SourceControl is ICSharpCode.TextEditor.TextEditorControl)) { return; }
var rich_txt = (ICSharpCode.TextEditor.TextEditorControl)base.SourceControl;
rich_txt.ActiveTextAreaControl.TextArea.InsertString("");
}
public ToolStripSeparator AddSeparatorMenu()
{
ToolStripSeparator item = new ToolStripSeparator();
base.Items.Add(item);
return item;
}
public ToolStripMenuItem AddMenu(string name, string tag)
{
ToolStripMenuItem item = new ToolStripMenuItem(name)
{
Tag = tag
};
base.Items.Add(item);
return item;
}
private void ContextMenuStripRichText_Opening(object sender, CancelEventArgs e)
{
if (!(base.SourceControl is ICSharpCode.TextEditor.TextEditorControl)) { return; }
var rich_txt = (ICSharpCode.TextEditor.TextEditorControl)base.SourceControl;
for (int i = 0; i < base.Items.Count; i++)
{
var item = base.Items[i];
if (item.Tag == null) { continue; }
switch(item.Tag.ToString())
{
case "undo":
item.Enabled = rich_txt.EnableUndo;
break;
case "redo":
item.Enabled = rich_txt.EnableRedo;
break;
case "cut":
item.Enabled = (rich_txt.ActiveTextAreaControl.SelectionManager.SelectedText != "" && !rich_txt.IsReadOnly) ? true : false;
break;
case "copy":
item.Enabled = rich_txt.ActiveTextAreaControl.SelectionManager.SelectedText != "" ? true : false;
break;
case "paste":
item.Enabled = !rich_txt.IsReadOnly;
break;
case "del":
item.Enabled =(rich_txt.ActiveTextAreaControl.SelectionManager.SelectedText != "" && !rich_txt.IsReadOnly) ? true : false;
break;
case "selectall":
item.Enabled = rich_txt.ActiveTextAreaControl.SelectionManager.SelectedText != rich_txt.Text ? true : false;
break;
}
}
}
}
}
@@ -0,0 +1,123 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<metadata name="$this.TrayLargeIcon" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>False</value>
</metadata>
</root>
@@ -0,0 +1,42 @@
namespace ryProcessManager.hezuo
{
partial class ContextMenuStripRichText
{
/// <summary>
/// 必需的设计器变量。
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// 清理所有正在使用的资源。
/// </summary>
/// <param name="disposing">如果应释放托管资源,为 true;否则为 false。</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region 组件设计器生成的代码
/// <summary>
/// 设计器支持所需的方法 - 不要修改
/// 使用代码编辑器修改此方法的内容。
/// </summary>
private void InitializeComponent()
{
this.SuspendLayout();
//
// ContextMenuStripRichText
//
this.Opening += new System.ComponentModel.CancelEventHandler(this.ContextMenuStripRichText_Opening);
this.ResumeLayout(false);
}
#endregion
}
}
@@ -0,0 +1,118 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Diagnostics;
using System.Linq;
using System.Text;
using System.Windows.Forms;
namespace ryProcessManager.hezuo
{
public partial class ContextMenuStripRichText : ContextMenuStrip
{
public ContextMenuStripRichText()
{
InitializeComponent();
AddMenu("撤销", "undo").Click += Undo_Click;
AddMenu("重做", "redo").Click += Redo_Click;
AddSeparatorMenu();
AddMenu("剪切", "cut").Click += Cut_Click;
AddMenu("复制", "copy").Click += Copy_Click;
AddMenu("粘贴", "paste").Click += Paste_Click;
AddMenu("删除", "del").Click += Del_Click;
AddMenu("全选", "selectall").Click += SelectAll_Click;
}
private void SelectAll_Click(object sender, EventArgs e)
{
if (!(base.SourceControl is RichTextBox)) { return; }
var rich_txt = (RichTextBox)base.SourceControl;
rich_txt.SelectAll();
}
private void Undo_Click(object sender, EventArgs e)
{
if(!(base.SourceControl is RichTextBox)) { return; }
var rich_txt = (RichTextBox)base.SourceControl;
rich_txt.Undo();
}
private void Redo_Click(object sender, EventArgs e)
{
if (!(base.SourceControl is RichTextBox)) { return; }
var rich_txt = (RichTextBox)base.SourceControl;
rich_txt.Redo();
}
private void Cut_Click(object sender, EventArgs e)
{
if (!(base.SourceControl is RichTextBox)) { return; }
var rich_txt = (RichTextBox)base.SourceControl;
rich_txt.Cut();
}
private void Copy_Click(object sender, EventArgs e)
{
if (!(base.SourceControl is RichTextBox)) { return; }
var rich_txt = (RichTextBox)base.SourceControl;
rich_txt.Copy();
}
private void Paste_Click(object sender, EventArgs e)
{
if (!(base.SourceControl is RichTextBox)) { return; }
var rich_txt = (RichTextBox)base.SourceControl;
rich_txt.Paste();
}
private void Del_Click(object sender, EventArgs e)
{
if (!(base.SourceControl is RichTextBox)) { return; }
var rich_txt = (RichTextBox)base.SourceControl;
rich_txt.SelectedText="";
}
private ToolStripSeparator AddSeparatorMenu()
{
ToolStripSeparator item = new ToolStripSeparator();
base.Items.Add(item);
return item;
}
private ToolStripMenuItem AddMenu(string name, string tag)
{
ToolStripMenuItem item = new ToolStripMenuItem(name)
{
Tag = tag
};
base.Items.Add(item);
return item;
}
private void ContextMenuStripRichText_Opening(object sender, CancelEventArgs e)
{
if (!(base.SourceControl is RichTextBox)) { return; }
var rich_txt = (RichTextBox)base.SourceControl;
for (int i = 0; i < base.Items.Count; i++)
{
var item = base.Items[i];
if (item.Tag == null) { continue; }
switch(item.Tag.ToString())
{
case "undo":
item.Enabled = rich_txt.CanUndo;
break;
case "redo":
item.Enabled = rich_txt.CanRedo;
break;
case "cut":
item.Enabled = (rich_txt.SelectedText != "" && !rich_txt.ReadOnly) ? true : false;
break;
case "copy":
item.Enabled = rich_txt.SelectedText != "" ? true : false;
break;
case "paste":
item.Enabled = rich_txt.CanPaste(DataFormats.GetFormat(DataFormats.Text));
break;
case "del":
item.Enabled =(rich_txt.SelectedText != "" && !rich_txt.ReadOnly) ? true : false;
break;
case "selectall":
item.Enabled = rich_txt.SelectedText != rich_txt.Text ? true : false;
break;
}
}
}
}
}
@@ -0,0 +1,123 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<metadata name="$this.TrayLargeIcon" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>False</value>
</metadata>
</root>
@@ -0,0 +1,520 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using ICSharpCode.TextEditor.Document;
using ICSharpCode.TextEditor;
using System.Diagnostics;
using System.IO;
namespace XmlPad
{
public partial class FindAndReplaceForm : Form
{
public FindAndReplaceForm()
{
InitializeComponent();
_search = new TextEditorSearcher();
}
TextEditorSearcher _search;
TextEditorControl _editor;
TextEditorControl Editor
{
get { return _editor; }
set
{
_editor = value;
_search.Document = _editor.Document;
UpdateTitleBar();
}
}
private void UpdateTitleBar()
{
string text = ReplaceMode ? "查找和替换" : "查找";
if (_editor != null && _editor.FileName != null)
text += " - " + Path.GetFileName(_editor.FileName);
if (_search.HasScanRegion)
text += " (只可选)";
this.Text = text;
}
public void ShowFor(TextEditorControl editor, bool replaceMode)
{
Editor = editor;
_search.ClearScanRegion();
SelectionManager sm = editor.ActiveTextAreaControl.SelectionManager;
if (sm.HasSomethingSelected && sm.SelectionCollection.Count == 1)
{
ISelection sel = sm.SelectionCollection[0];
if (sel.StartPosition.Y == sel.EndPosition.Y)
txtLookFor.Text = sm.SelectedText;
else
_search.SetScanRegion(sel);
}
else
{
// Get the current word that the caret is on
Caret caret = editor.ActiveTextAreaControl.Caret;
int start = TextUtilities.FindWordStart(editor.Document, caret.Offset);
int endAt = TextUtilities.FindWordEnd(editor.Document, caret.Offset);
txtLookFor.Text = editor.Document.GetText(start, endAt - start);
}
ReplaceMode = replaceMode;
this.Owner = (Form)editor.TopLevelControl;
this.Show();
txtLookFor.SelectAll();
txtLookFor.Focus();
}
public bool ReplaceMode
{
get { return txtReplaceWith.Visible; }
set
{
btnReplace.Visible = btnReplaceAll.Visible = value;
lblReplaceWith.Visible = txtReplaceWith.Visible = value;
btnFindAllHighlightAll.Visible = !value;
this.AcceptButton = value ? btnReplace : btnFindNext;
UpdateTitleBar();
}
}
private void BtnFindPrevious_Click(object sender, EventArgs e)
{
FindNext(false, true, "内容没有找到!");
}
private void BtnFindNext_Click(object sender, EventArgs e)
{
FindNext(false, false, "内容没有找到");
}
public bool _lastSearchWasBackward = false;
public bool _lastSearchLoopedAround;
public TextRange FindNext(bool viaF3, bool searchBackward, string messageIfNotFound)
{
if (string.IsNullOrEmpty(txtLookFor.Text))
{
MessageBox.Show("没有指定要查找的内容!", "提示");
return null;
}
_lastSearchWasBackward = searchBackward;
_search.LookFor = txtLookFor.Text;
_search.MatchCase = chkMatchCase.Checked;
_search.MatchWholeWordOnly = chkMatchWholeWord.Checked;
Caret caret = _editor.ActiveTextAreaControl.Caret;
if (viaF3 && _search.HasScanRegion && !Globals.IsInRange(caret.Offset, _search.BeginOffset, _search.EndOffset))
{
// user moved outside of the originally selected region
_search.ClearScanRegion();
UpdateTitleBar();
}
int startFrom = caret.Offset - (searchBackward ? 1 : 0);
TextRange range = _search.FindNext(startFrom, searchBackward, out _lastSearchLoopedAround);
if (range != null)
SelectResult(range);
else if (messageIfNotFound != null)
MessageBox.Show(messageIfNotFound, "提示");
return range;
}
private void SelectResult(TextRange range)
{
TextLocation p1 = _editor.Document.OffsetToPosition(range.Offset);
TextLocation p2 = _editor.Document.OffsetToPosition(range.Offset + range.Length);
_editor.ActiveTextAreaControl.SelectionManager.SetSelection(p1, p2);
//_editor.ActiveTextAreaControl.ScrollTo(p1.Line, p1.Column);
// Also move the caret to the end of the selection, because when the user
// presses F3, the caret is where we start searching next time.
_editor.ActiveTextAreaControl.Caret.Position =
_editor.Document.OffsetToPosition(range.Offset + range.Length);
}
Dictionary<TextEditorControl, HighlightGroup> _highlightGroups = new Dictionary<TextEditorControl, HighlightGroup>();
private void btnHighlightAll_Click(object sender, EventArgs e)
{
if (!_highlightGroups.ContainsKey(_editor))
_highlightGroups[_editor] = new HighlightGroup(_editor);
HighlightGroup group = _highlightGroups[_editor];
if (string.IsNullOrEmpty(LookFor))
// Clear highlights
group.ClearMarkers();
else
{
_search.LookFor = txtLookFor.Text;
_search.MatchCase = chkMatchCase.Checked;
_search.MatchWholeWordOnly = chkMatchWholeWord.Checked;
bool looped = false;
int offset = 0, count = 0;
for (; ; )
{
TextRange range = _search.FindNext(offset, false, out looped);
if (range == null || looped)
break;
offset = range.Offset + range.Length;
count++;
TextMarker m = new TextMarker(range.Offset, range.Length,
TextMarkerType.SolidBlock, Color.Yellow, Color.Black);
group.AddMarker(m);
}
if (count == 0)
MessageBox.Show("没有找到你要查找的内容", "提示");
else
Close();
}
}
private void FindAndReplaceForm_FormClosing(object sender, FormClosingEventArgs e)
{ // Prevent dispose, as this form can be re-used
if (e.CloseReason != CloseReason.FormOwnerClosing)
{
if (this.Owner != null)
this.Owner.Select(); // prevent another app from being activated instead
e.Cancel = true;
Hide();
// Discard search region
_search.ClearScanRegion();
_editor.Refresh(); // must repaint manually
}
}
private void btnCancel_Click(object sender, EventArgs e)
{
Close();
}
private void btnReplace_Click(object sender, EventArgs e)
{
SelectionManager sm = _editor.ActiveTextAreaControl.SelectionManager;
if (string.Equals(sm.SelectedText, txtLookFor.Text, StringComparison.OrdinalIgnoreCase))
InsertText(txtReplaceWith.Text);
FindNext(false, _lastSearchWasBackward, "内容没有找到!");
}
private void btnReplaceAll_Click(object sender, EventArgs e)
{
int count = 0;
// BUG FIX: if the replacement string contains the original search string
// (e.g. replace "red" with "very red") we must avoid looping around and
// replacing forever! To fix, start replacing at beginning of region (by
// moving the caret) and stop as soon as we loop around.
_editor.ActiveTextAreaControl.Caret.Position =
_editor.Document.OffsetToPosition(_search.BeginOffset);
//_editor.Document.UndoStack.StartUndoGroup();
//try
//{
lock (_editor.Document.UndoStack)
{
while (FindNext(false, false, null) != null)
{
if (_lastSearchLoopedAround)
break;
// Replace
count++;
InsertText(txtReplaceWith.Text);
}
}
//}
//finally
//{
// _editor.Document.UndoStack.EndUndoGroup();
//}
if (count == 0)
MessageBox.Show(string.Format("没有找到目标内容: {0}!", txtLookFor.Text), "提示");
else
{
MessageBox.Show(string.Format("替换了 {0} 处内容!", count), "提示");
Close();
}
}
private void InsertText(string text)
{
TextArea textArea = _editor.ActiveTextAreaControl.TextArea;
//textArea.Document.UndoStack.StartUndoGroup();
//try
//{
lock (textArea.Document.UndoStack)
{
if (textArea.SelectionManager.HasSomethingSelected)
{
textArea.Caret.Position = textArea.SelectionManager.SelectionCollection[0].StartPosition;
textArea.SelectionManager.RemoveSelectedText();
}
textArea.InsertString(text);
}
//}
//finally
//{
// textArea.Document.UndoStack.EndUndoGroup();
//}
}
public string LookFor { get { return txtLookFor.Text; } }
}
public class TextRange : AbstractSegment
{
IDocument _document;
public TextRange(IDocument document, int offset, int length)
{
_document = document;
this.offset = offset;
this.length = length;
}
}
/// <summary>This class finds occurrances of a search string in a text
/// editor's IDocument... it's like Find box without a GUI.</summary>
public class TextEditorSearcher : IDisposable
{
IDocument _document;
public IDocument Document
{
get { return _document; }
set
{
if (_document != value)
{
ClearScanRegion();
_document = value;
}
}
}
// I would have used the TextAnchor class to represent the beginning and
// end of the region to scan while automatically adjusting to changes in
// the document--but for some reason it is sealed and its constructor is
// internal. Instead I use a TextMarker, which is perhaps even better as
// it gives me the opportunity to highlight the region. Note that all the
// markers and coloring information is associated with the text document,
// not the editor control, so TextEditorSearcher doesn't need a reference
// to the TextEditorControl. After adding the marker to the document, we
// must remember to remove it when it is no longer needed.
TextMarker _region = null;
/// <summary>Sets the region to search. The region is updated
/// automatically as the document changes.</summary>
public void SetScanRegion(ISelection sel)
{
SetScanRegion(sel.Offset, sel.Length);
}
/// <summary>Sets the region to search. The region is updated
/// automatically as the document changes.</summary>
public void SetScanRegion(int offset, int length)
{
Color bkgColor = _document.HighlightingStrategy.GetColorFor("Default").BackgroundColor;
_region = new TextMarker(offset, length, TextMarkerType.SolidBlock,
Globals.HalfMix(bkgColor, Color.FromArgb(160, 160, 160)));
_document.MarkerStrategy.AddMarker(_region);
}
public bool HasScanRegion
{
get { return _region != null; }
}
public void ClearScanRegion()
{
if (_region != null)
{
_document.MarkerStrategy.RemoveMarker(_region);
_region = null;
}
}
public void Dispose() { ClearScanRegion(); GC.SuppressFinalize(this); }
~TextEditorSearcher() { Dispose(); }
/// <summary>Begins the start offset for searching</summary>
public int BeginOffset
{
get
{
if (_region != null)
return _region.Offset;
else
return 0;
}
}
/// <summary>Begins the end offset for searching</summary>
public int EndOffset
{
get
{
if (_region != null)
return _region.EndOffset;
else
return _document.TextLength;
}
}
public bool MatchCase;
public bool MatchWholeWordOnly;
string _lookFor;
string _lookFor2; // uppercase in case-insensitive mode
public string LookFor
{
get { return _lookFor; }
set { _lookFor = value; }
}
/// <summary>Finds next instance of LookFor, according to the search rules
/// (MatchCase, MatchWholeWordOnly).</summary>
/// <param name="beginAtOffset">Offset in Document at which to begin the search</param>
/// <remarks>If there is a match at beginAtOffset precisely, it will be returned.</remarks>
/// <returns>Region of document that matches the search string</returns>
public TextRange FindNext(int beginAtOffset, bool searchBackward, out bool loopedAround)
{
Debug.Assert(!string.IsNullOrEmpty(_lookFor));
loopedAround = false;
int startAt = BeginOffset, endAt = EndOffset;
int curOffs = Globals.InRange(beginAtOffset, startAt, endAt);
_lookFor2 = MatchCase ? _lookFor : _lookFor.ToUpperInvariant();
TextRange result;
if (searchBackward)
{
result = FindNextIn(startAt, curOffs, true);
if (result == null)
{
loopedAround = true;
result = FindNextIn(curOffs, endAt, true);
}
}
else
{
result = FindNextIn(curOffs, endAt, false);
if (result == null)
{
loopedAround = true;
result = FindNextIn(startAt, curOffs, false);
}
}
return result;
}
public delegate TResult Func<T1, T2, TResult>(T1 arg1, T2 arg2);
public delegate TResult Func<T, TResult>(T arg);
private TextRange FindNextIn(int offset1, int offset2, bool searchBackward)
{
Debug.Assert(offset2 >= offset1);
offset2 -= _lookFor.Length;
// Make behavior decisions before starting search loop
Func<char, char, bool> matchFirstCh;
Func<int, bool> matchWord;
if (MatchCase)
matchFirstCh = delegate(char lookFor, char c)
{
return lookFor == c;
};
else
matchFirstCh = delegate(char lookFor, char c)
{
return lookFor == Char.ToUpperInvariant(c);
};
if (MatchWholeWordOnly)
matchWord = IsWholeWordMatch;
else
matchWord = IsPartWordMatch;
// Search
char lookForCh = _lookFor2[0];
if (searchBackward)
{
for (int offset = offset2; offset >= offset1; offset--)
{
if (matchFirstCh(lookForCh, _document.GetCharAt(offset))
&& matchWord(offset))
return new TextRange(_document, offset, _lookFor.Length);
}
}
else
{
for (int offset = offset1; offset <= offset2; offset++)
{
if (matchFirstCh(lookForCh, _document.GetCharAt(offset))
&& matchWord(offset))
return new TextRange(_document, offset, _lookFor.Length);
}
}
return null;
}
private bool IsWholeWordMatch(int offset)
{
if (IsWordBoundary(offset) && IsWordBoundary(offset + _lookFor.Length))
return IsPartWordMatch(offset);
else
return false;
}
private bool IsWordBoundary(int offset)
{
return offset <= 0 || offset >= _document.TextLength ||
!IsAlphaNumeric(offset - 1) || !IsAlphaNumeric(offset);
}
private bool IsAlphaNumeric(int offset)
{
char c = _document.GetCharAt(offset);
return Char.IsLetterOrDigit(c) || c == '_';
}
private bool IsPartWordMatch(int offset)
{
string substr = _document.GetText(offset, _lookFor.Length);
if (!MatchCase)
substr = substr.ToUpperInvariant();
return substr == _lookFor2;
}
}
/// <summary>Bundles a group of markers together so that they can be cleared
/// together.</summary>
public class HighlightGroup : IDisposable
{
List<TextMarker> _markers = new List<TextMarker>();
TextEditorControl _editor;
IDocument _document;
public HighlightGroup(TextEditorControl editor)
{
_editor = editor;
_document = editor.Document;
}
public void AddMarker(TextMarker marker)
{
_markers.Add(marker);
_document.MarkerStrategy.AddMarker(marker);
}
public void ClearMarkers()
{
foreach (TextMarker m in _markers)
_document.MarkerStrategy.RemoveMarker(m);
_markers.Clear();
_editor.Refresh();
}
public void Dispose() { ClearMarkers(); GC.SuppressFinalize(this); }
~HighlightGroup() { Dispose(); }
public IList<TextMarker> Markers { get { return _markers.AsReadOnly(); } }
}
}
@@ -0,0 +1,235 @@
namespace XmlPad
{
partial class FindAndReplaceForm
{
/// <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.lblReplaceWith = new System.Windows.Forms.Label();
this.txtLookFor = new System.Windows.Forms.TextBox();
this.txtReplaceWith = new System.Windows.Forms.TextBox();
this.btnFindNext = new System.Windows.Forms.Button();
this.btnReplace = new System.Windows.Forms.Button();
this.btnReplaceAll = new System.Windows.Forms.Button();
this.chkMatchWholeWord = new System.Windows.Forms.CheckBox();
this.chkMatchCase = new System.Windows.Forms.CheckBox();
this.btnFindAllHighlightAll = new System.Windows.Forms.Button();
this.btnCancel = new System.Windows.Forms.Button();
this.btnFindPrevious = new System.Windows.Forms.Button();
this.groupBox1 = new System.Windows.Forms.GroupBox();
this.groupBox1.SuspendLayout();
this.SuspendLayout();
//
// label1
//
this.label1.AutoSize = true;
this.label1.Location = new System.Drawing.Point(12, 9);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(77, 12);
this.label1.TabIndex = 0;
this.label1.Text = "查找内容(&N):";
//
// lblReplaceWith
//
this.lblReplaceWith.AutoSize = true;
this.lblReplaceWith.Location = new System.Drawing.Point(12, 36);
this.lblReplaceWith.Name = "lblReplaceWith";
this.lblReplaceWith.Size = new System.Drawing.Size(65, 12);
this.lblReplaceWith.TabIndex = 2;
this.lblReplaceWith.Text = "替换为(&P):";
//
// txtLookFor
//
this.txtLookFor.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.txtLookFor.Location = new System.Drawing.Point(95, 6);
this.txtLookFor.Name = "txtLookFor";
this.txtLookFor.Size = new System.Drawing.Size(232, 21);
this.txtLookFor.TabIndex = 1;
//
// txtReplaceWith
//
this.txtReplaceWith.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.txtReplaceWith.Location = new System.Drawing.Point(95, 33);
this.txtReplaceWith.Name = "txtReplaceWith";
this.txtReplaceWith.Size = new System.Drawing.Size(232, 21);
this.txtReplaceWith.TabIndex = 3;
//
// btnFindNext
//
this.btnFindNext.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.btnFindNext.Location = new System.Drawing.Point(228, 137);
this.btnFindNext.Name = "btnFindNext";
this.btnFindNext.Size = new System.Drawing.Size(100, 30);
this.btnFindNext.TabIndex = 6;
this.btnFindNext.Text = "查找下一个(&F)";
this.btnFindNext.UseVisualStyleBackColor = true;
this.btnFindNext.Click += new System.EventHandler(this.BtnFindNext_Click);
//
// btnReplace
//
this.btnReplace.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.btnReplace.Location = new System.Drawing.Point(12, 174);
this.btnReplace.Name = "btnReplace";
this.btnReplace.Size = new System.Drawing.Size(100, 30);
this.btnReplace.TabIndex = 7;
this.btnReplace.Text = "替换(&R)";
this.btnReplace.UseVisualStyleBackColor = true;
this.btnReplace.Click += new System.EventHandler(this.btnReplace_Click);
//
// btnReplaceAll
//
this.btnReplaceAll.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.btnReplaceAll.Location = new System.Drawing.Point(119, 174);
this.btnReplaceAll.Name = "btnReplaceAll";
this.btnReplaceAll.Size = new System.Drawing.Size(100, 30);
this.btnReplaceAll.TabIndex = 9;
this.btnReplaceAll.Text = "全部替换(&A)";
this.btnReplaceAll.UseVisualStyleBackColor = true;
this.btnReplaceAll.Click += new System.EventHandler(this.btnReplaceAll_Click);
//
// chkMatchWholeWord
//
this.chkMatchWholeWord.AutoSize = true;
this.chkMatchWholeWord.Location = new System.Drawing.Point(145, 27);
this.chkMatchWholeWord.Name = "chkMatchWholeWord";
this.chkMatchWholeWord.Size = new System.Drawing.Size(90, 16);
this.chkMatchWholeWord.TabIndex = 5;
this.chkMatchWholeWord.Text = "全字匹配(&W)";
this.chkMatchWholeWord.UseVisualStyleBackColor = true;
//
// chkMatchCase
//
this.chkMatchCase.AutoSize = true;
this.chkMatchCase.Location = new System.Drawing.Point(22, 27);
this.chkMatchCase.Name = "chkMatchCase";
this.chkMatchCase.Size = new System.Drawing.Size(102, 16);
this.chkMatchCase.TabIndex = 4;
this.chkMatchCase.Text = "大小写匹配(&C)";
this.chkMatchCase.UseVisualStyleBackColor = true;
//
// btnFindAllHighlightAll
//
this.btnFindAllHighlightAll.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.btnFindAllHighlightAll.Location = new System.Drawing.Point(66, 174);
this.btnFindAllHighlightAll.Name = "btnFindAllHighlightAll";
this.btnFindAllHighlightAll.Size = new System.Drawing.Size(150, 30);
this.btnFindAllHighlightAll.TabIndex = 8;
this.btnFindAllHighlightAll.Text = "查找全部并高亮显示(&H)";
this.btnFindAllHighlightAll.UseVisualStyleBackColor = true;
this.btnFindAllHighlightAll.Visible = false;
this.btnFindAllHighlightAll.Click += new System.EventHandler(this.btnHighlightAll_Click);
//
// btnCancel
//
this.btnCancel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.btnCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel;
this.btnCancel.Location = new System.Drawing.Point(228, 173);
this.btnCancel.Name = "btnCancel";
this.btnCancel.Size = new System.Drawing.Size(100, 30);
this.btnCancel.TabIndex = 6;
this.btnCancel.Text = "取消(&C)";
this.btnCancel.UseVisualStyleBackColor = true;
this.btnCancel.Click += new System.EventHandler(this.btnCancel_Click);
//
// btnFindPrevious
//
this.btnFindPrevious.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.btnFindPrevious.Location = new System.Drawing.Point(118, 138);
this.btnFindPrevious.Name = "btnFindPrevious";
this.btnFindPrevious.Size = new System.Drawing.Size(100, 30);
this.btnFindPrevious.TabIndex = 6;
this.btnFindPrevious.Text = "查找上一个(&P)";
this.btnFindPrevious.UseVisualStyleBackColor = true;
this.btnFindPrevious.Click += new System.EventHandler(this.BtnFindPrevious_Click);
//
// groupBox1
//
this.groupBox1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.groupBox1.Controls.Add(this.chkMatchCase);
this.groupBox1.Controls.Add(this.chkMatchWholeWord);
this.groupBox1.Location = new System.Drawing.Point(14, 64);
this.groupBox1.Name = "groupBox1";
this.groupBox1.Size = new System.Drawing.Size(313, 63);
this.groupBox1.TabIndex = 10;
this.groupBox1.TabStop = false;
this.groupBox1.Text = "查找选项";
//
// FindAndReplaceForm
//
this.AcceptButton = this.btnReplace;
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.CancelButton = this.btnCancel;
this.ClientSize = new System.Drawing.Size(339, 215);
this.Controls.Add(this.groupBox1);
this.Controls.Add(this.btnReplaceAll);
this.Controls.Add(this.btnReplace);
this.Controls.Add(this.btnFindAllHighlightAll);
this.Controls.Add(this.btnCancel);
this.Controls.Add(this.btnFindPrevious);
this.Controls.Add(this.btnFindNext);
this.Controls.Add(this.txtReplaceWith);
this.Controls.Add(this.txtLookFor);
this.Controls.Add(this.lblReplaceWith);
this.Controls.Add(this.label1);
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
this.MaximizeBox = false;
this.MinimizeBox = false;
this.Name = "FindAndReplaceForm";
this.ShowIcon = false;
this.ShowInTaskbar = false;
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
this.Text = "查找和替换";
this.TopMost = true;
this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.FindAndReplaceForm_FormClosing);
this.groupBox1.ResumeLayout(false);
this.groupBox1.PerformLayout();
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
private System.Windows.Forms.Label label1;
private System.Windows.Forms.Label lblReplaceWith;
private System.Windows.Forms.TextBox txtLookFor;
private System.Windows.Forms.TextBox txtReplaceWith;
private System.Windows.Forms.Button btnFindNext;
private System.Windows.Forms.Button btnReplace;
private System.Windows.Forms.Button btnReplaceAll;
private System.Windows.Forms.CheckBox chkMatchWholeWord;
private System.Windows.Forms.CheckBox chkMatchCase;
private System.Windows.Forms.Button btnFindAllHighlightAll;
private System.Windows.Forms.Button btnCancel;
private System.Windows.Forms.Button btnFindPrevious;
private System.Windows.Forms.GroupBox groupBox1;
}
}
@@ -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>
@@ -0,0 +1,78 @@
namespace SuperDesign.Controls
{
partial class FrmInsertUnixTime
{
/// <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.dateTimePickerEX1 = new ryControls.DateTimePickerEX();
this.BtnOK = new ryControls.ButtonEx();
this.SuspendLayout();
//
// dateTimePickerEX1
//
this.dateTimePickerEX1.CustomFormat = "yyyy年MM月dd日 dddd HH:mm:ss";
this.dateTimePickerEX1.Font = new System.Drawing.Font("宋体", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.dateTimePickerEX1.Format = System.Windows.Forms.DateTimePickerFormat.Custom;
this.dateTimePickerEX1.Location = new System.Drawing.Point(12, 25);
this.dateTimePickerEX1.Name = "dateTimePickerEX1";
this.dateTimePickerEX1.Size = new System.Drawing.Size(277, 23);
this.dateTimePickerEX1.TabIndex = 6;
//
// BtnOK
//
this.BtnOK.BaseColor = System.Drawing.Color.FromArgb(((int)(((byte)(51)))), ((int)(((byte)(76)))), ((int)(((byte)(95)))));
this.BtnOK.Location = new System.Drawing.Point(222, 80);
this.BtnOK.Name = "BtnOK";
this.BtnOK.Size = new System.Drawing.Size(67, 26);
this.BtnOK.TabIndex = 113;
this.BtnOK.Text = "确定";
this.BtnOK.UseVisualStyleBackColor = true;
this.BtnOK.Click += new System.EventHandler(this.BtnOK_Click);
//
// FrmInsertUnixTime
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(303, 112);
this.Controls.Add(this.BtnOK);
this.Controls.Add(this.dateTimePickerEX1);
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;
this.MaximizeBox = false;
this.MinimizeBox = false;
this.Name = "FrmInsertUnixTime";
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
this.Text = "插入时间戳";
this.ResumeLayout(false);
}
#endregion
private ryControls.ButtonEx BtnOK;
public ryControls.DateTimePickerEX dateTimePickerEX1;
}
}
@@ -0,0 +1,24 @@
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;
namespace SuperDesign.Controls
{
public partial class FrmInsertUnixTime : Form
{
public FrmInsertUnixTime()
{
InitializeComponent();
}
private void BtnOK_Click(object sender, EventArgs e)
{
DialogResult = DialogResult.OK;
}
}
}
@@ -0,0 +1,120 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>
+103
View File
@@ -0,0 +1,103 @@
namespace 开发辅助工具.Controls
{
partial class FrmText
{
/// <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.panelEx1 = new ryControls.PanelEx();
this.BtnSave = new ryControls.ButtonEx();
this.richTextBox1 = new System.Windows.Forms.RichTextBox();
this.contextMenuStripRichText1 = new ryProcessManager.hezuo.ContextMenuStripRichText();
this.panelEx1.SuspendLayout();
this.SuspendLayout();
//
// panelEx1
//
this.panelEx1.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.panelEx1.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(213)))), ((int)(((byte)(216)))), ((int)(((byte)(223)))));
this.panelEx1.Controls.Add(this.richTextBox1);
this.panelEx1.Location = new System.Drawing.Point(12, 36);
this.panelEx1.Name = "panelEx1";
this.panelEx1.RoundeStyle = ryControls.RoundStyle.None;
this.panelEx1.Size = new System.Drawing.Size(725, 467);
this.panelEx1.TabIndex = 0;
this.panelEx1.TileBackColor = System.Drawing.Color.White;
//
// BtnSave
//
this.BtnSave.ForeColor = System.Drawing.Color.White;
this.BtnSave.Location = new System.Drawing.Point(12, 6);
this.BtnSave.Name = "BtnSave";
this.BtnSave.Size = new System.Drawing.Size(65, 26);
this.BtnSave.TabIndex = 1;
this.BtnSave.Text = "保存";
this.BtnSave.UseVisualStyleBackColor = true;
this.BtnSave.Click += new System.EventHandler(this.BtnSave_Click);
//
// richTextBox1
//
this.richTextBox1.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.richTextBox1.BorderStyle = System.Windows.Forms.BorderStyle.None;
this.richTextBox1.ContextMenuStrip = this.contextMenuStripRichText1;
this.richTextBox1.Location = new System.Drawing.Point(3, 7);
this.richTextBox1.Name = "richTextBox1";
this.richTextBox1.Size = new System.Drawing.Size(719, 455);
this.richTextBox1.TabIndex = 0;
this.richTextBox1.Text = "";
//
// contextMenuStripRichText1
//
this.contextMenuStripRichText1.Name = "contextMenuStripRichText1";
this.contextMenuStripRichText1.Size = new System.Drawing.Size(101, 164);
//
// FrmText
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(749, 515);
this.Controls.Add(this.BtnSave);
this.Controls.Add(this.panelEx1);
this.Name = "FrmText";
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
this.Text = "文本编辑 ";
this.panelEx1.ResumeLayout(false);
this.ResumeLayout(false);
}
#endregion
private ryControls.PanelEx panelEx1;
private ryControls.ButtonEx BtnSave;
private ryProcessManager.hezuo.ContextMenuStripRichText contextMenuStripRichText1;
public System.Windows.Forms.RichTextBox richTextBox1;
}
}
@@ -0,0 +1,24 @@
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;
namespace 开发辅助工具.Controls
{
public partial class FrmText : Form
{
public FrmText()
{
InitializeComponent();
}
private void BtnSave_Click(object sender, EventArgs e)
{
DialogResult = DialogResult.OK;
}
}
}
@@ -0,0 +1,123 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<metadata name="contextMenuStripRichText1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value>
</metadata>
</root>
+91
View File
@@ -0,0 +1,91 @@
namespace SuperDesign.Controls
{
partial class FrmTitle
{
/// <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.TxtTitle = new ryControls.TextBoxEx2();
this.BtnOK = new ryControls.ButtonEx();
this.SuspendLayout();
//
// TxtTitle
//
this.TxtTitle.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.TxtTitle.BackColor = System.Drawing.Color.White;
this.TxtTitle.EmptyText = "请输入标题";
this.TxtTitle.ImeMode = System.Windows.Forms.ImeMode.Close;
this.TxtTitle.Location = new System.Drawing.Point(12, 23);
this.TxtTitle.MaxLength = 999999999;
this.TxtTitle.Multiline = false;
this.TxtTitle.Name = "TxtTitle";
this.TxtTitle.OnlyNumeric = false;
this.TxtTitle.PasswordChar = '\0';
this.TxtTitle.ReadOnly = false;
this.TxtTitle.SelectedText = "";
this.TxtTitle.SelectionLength = 0;
this.TxtTitle.SelectionStart = 0;
this.TxtTitle.Size = new System.Drawing.Size(363, 23);
this.TxtTitle.TabIndex = 111;
this.TxtTitle.TextAlign = System.Windows.Forms.HorizontalAlignment.Left;
this.TxtTitle.ToolTip = "";
this.TxtTitle.WordWrap = true;
//
// BtnOK
//
this.BtnOK.BaseColor = System.Drawing.Color.FromArgb(((int)(((byte)(51)))), ((int)(((byte)(76)))), ((int)(((byte)(95)))));
this.BtnOK.Location = new System.Drawing.Point(292, 78);
this.BtnOK.Name = "BtnOK";
this.BtnOK.Size = new System.Drawing.Size(82, 26);
this.BtnOK.TabIndex = 112;
this.BtnOK.Text = "确定";
this.BtnOK.UseVisualStyleBackColor = true;
this.BtnOK.Click += new System.EventHandler(this.BtnOK_Click);
//
// FrmTitle
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(383, 116);
this.Controls.Add(this.BtnOK);
this.Controls.Add(this.TxtTitle);
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;
this.MaximizeBox = false;
this.MinimizeBox = false;
this.Name = "FrmTitle";
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
this.Text = "请输入标题";
this.ResumeLayout(false);
}
#endregion
private ryControls.ButtonEx BtnOK;
public ryControls.TextBoxEx2 TxtTitle;
}
}
@@ -0,0 +1,29 @@
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;
namespace SuperDesign.Controls
{
public partial class FrmTitle : Form
{
public FrmTitle()
{
InitializeComponent();
}
private void BtnOK_Click(object sender, EventArgs e)
{
if(TxtTitle.Text.Length<2)
{
MessageBox.Show("标题输入太短。", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
return;
}
DialogResult = DialogResult.OK;
}
}
}
@@ -0,0 +1,120 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>
+36
View File
@@ -0,0 +1,36 @@
namespace ryPaiban.Model
{
partial class MenuRight
{
/// <summary>
/// 必需的设计器变量。
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// 清理所有正在使用的资源。
/// </summary>
/// <param name="disposing">如果应释放托管资源,为 true;否则为 false。</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region 组件设计器生成的代码
/// <summary>
/// 设计器支持所需的方法 - 不要修改
/// 使用代码编辑器修改此方法的内容。
/// </summary>
private void InitializeComponent()
{
components = new System.ComponentModel.Container();
}
#endregion
}
}
@@ -0,0 +1,161 @@
using ryCommonDb;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Diagnostics;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using WeifenLuo.WinFormsUI.Docking;
using 开发辅助工具.Manager;
namespace ryPaiban.Model
{
[Description("子标签右键菜单")]
public partial class MenuRight : System.Windows.Forms.ContextMenuStrip
{
public MenuRight()
{
InitializeComponent();
LoadMenu();
}
private DockContent _SourceContent = null;
[Description("菜单所属的子窗体")]
public DockContent SourceContent
{
get { return _SourceContent; }
set
{
if (_SourceContent != value)
{
if (_SourceContent != null)
{
_SourceContent.FormClosing -= _SourceContent_FormClosing;
}
_SourceContent = value;
if (value != null)
{
_SourceContent.FormClosing += _SourceContent_FormClosing;
_SourceContent.TabPageContextMenuStrip = this;
}
}
}
}
private void _SourceContent_FormClosing(object sender, FormClosingEventArgs e)
{
if (Itrycn_Db.IsCloseConfirm)
{
switch (MessageBox.Show("是否确定要关闭?", "提示", MessageBoxButtons.OKCancel, MessageBoxIcon.Question))
{
case DialogResult.Cancel:
e.Cancel = true;
break;
}
}
}
ToolStripMenuItem menu_start = null;
private void LoadMenu()
{
base.Items.Add("关闭本标签").Click += OnClose_Click;
base.Items.Add("除此之外全部关闭").Click += OnCloseAllNoMe_Click;
base.Items.Add("临时重命名").Click += OnRename_Click;
menu_start = (ToolStripMenuItem)base.Items.Add("软件启动时自动打开");
menu_start.Click += OnStart_Click;
base.Opening += MenuRight_Opening;
}
private void MenuRight_Opening(object sender, CancelEventArgs e)
{
DataProvider mydb = new DataProvider();
IDbInterface db = Itrycn_Db.CreateDataProvider(Itrycn_Db.dataType);
if (db.ConnDb(Itrycn_Db.User_SQLConn) == 1)
{
RyQuickSQL mySQL = new RyQuickSQL("Starts");
mySQL.AddField("Addr", SourceContent.GetType().ToString());
DataSet ds = db.ReadData("select * from Starts where Addr=@Addr", mySQL);
menu_start.Checked = mydb.HaveData(ds);
}
db.Free();
}
private void OnStart_Click(object sender, EventArgs e)
{
if (SourceContent == null) { return; }
ToolStripMenuItem item = (ToolStripMenuItem)sender;
item.Checked = !item.Checked;
DataProvider mydb = new DataProvider();
IDbInterface db = Itrycn_Db.CreateDataProvider(Itrycn_Db.dataType);
if (db.ConnDb(Itrycn_Db.User_SQLConn) == 1)
{
RyQuickSQL mySQL = new RyQuickSQL("Starts");
mySQL.AddField("Name", SourceContent.Text);
mySQL.AddField("Addr", SourceContent.GetType().ToString());
mySQL.AddField("EditTime", DateTime.Now);
if (item.Checked)
{
DataSet ds = db.ReadData("select * from Starts where Addr=@Addr", mySQL);
if (!mydb.HaveData(ds))
{
mySQL.AddField("AddTime", DateTime.Now);
db.ExecuteNonQuery(mySQL.GetInsertSQL(),mySQL);
}
}
else
{
db.ExecuteNonQuery("delete from Starts where Addr=@Addr", mySQL);
}
}
db.Free();
}
private void OnClose_Click(object sender, EventArgs e)
{
if (SourceContent == null) { return; }
SourceContent.Close();
}
private void OnCloseAllNoMe_Click(object sender, EventArgs e)
{
if (SourceContent == null) { return; }
switch (MessageBox.Show("是否确定要关闭?", "提示", MessageBoxButtons.OKCancel, MessageBoxIcon.Question))
{
case DialogResult.Cancel:
return;
}
Itrycn_Db.IsCloseConfirm = false;
DockContentCollection contents = SourceContent.DockPanel.Contents;
int num = 0;
while (num < contents.Count)
{
if (contents[num].DockHandler.DockState == DockState.Document && SourceContent.DockPanel.ActiveContent != contents[num])
{
contents[num].DockHandler.Close();
}
else
{
num++;
}
}
Itrycn_Db.IsCloseConfirm = true;
}
private void OnRename_Click(object sender, EventArgs e)
{
if (SourceContent == null) { return; }
SuperDesign.Controls.FrmTitle frm = new SuperDesign.Controls.FrmTitle();
frm.TxtTitle.Text = SourceContent.Text;
frm.Icon = SourceContent.Icon;
if(frm.ShowDialog()==DialogResult.OK)
{
SourceContent.Text = frm.TxtTitle.Text;
}
frm.Dispose();
}
public MenuRight(IContainer container)
{
container.Add(this);
InitializeComponent();
LoadMenu();
}
}
}
+203
View File
@@ -0,0 +1,203 @@
namespace 开发辅助工具
{
partial class Form1
{
/// <summary>
/// 必需的设计器变量。
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// 清理所有正在使用的资源。
/// </summary>
/// <param name="disposing">如果应释放托管资源,为 true;否则为 false。</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows 窗体设计器生成的代码
/// <summary>
/// 设计器支持所需的方法 - 不要修改
/// 使用代码编辑器修改此方法的内容。
/// </summary>
private void InitializeComponent()
{
this.components = new System.ComponentModel.Container();
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Form1));
this.toolTip1 = new System.Windows.Forms.ToolTip(this.components);
this.vS2015LightTheme1 = new WeifenLuo.WinFormsUI.Docking.VS2015LightTheme();
this.dockPanel1 = new WeifenLuo.WinFormsUI.Docking.DockPanel();
this.panel1 = new System.Windows.Forms.Panel();
this.BtnCreateProject = new ryControls.ButtonEx();
this.BtnSetting = new ryControls.ButtonEx();
this.BtnTools = new ryControls.ButtonEx();
this.rySearch1 = new ryControls.rySearch();
this.table1 = new XPTable.Models.Table();
this.columnModel1 = new XPTable.Models.ColumnModel();
this.textColumn4 = new XPTable.Models.TextColumn();
this.textColumn5 = new XPTable.Models.TextColumn();
this.tableModel1 = new XPTable.Models.TableModel();
this.panel1.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.table1)).BeginInit();
this.SuspendLayout();
//
// dockPanel1
//
this.dockPanel1.BackColor = System.Drawing.Color.White;
this.dockPanel1.DefaultFloatWindowSize = new System.Drawing.Size(970, 700);
this.dockPanel1.Dock = System.Windows.Forms.DockStyle.Fill;
this.dockPanel1.DockBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(238)))), ((int)(((byte)(238)))), ((int)(((byte)(242)))));
this.dockPanel1.Location = new System.Drawing.Point(0, 30);
this.dockPanel1.Name = "dockPanel1";
this.dockPanel1.Padding = new System.Windows.Forms.Padding(6);
this.dockPanel1.ShowAutoHideContentOnHover = false;
this.dockPanel1.ShowDocumentIcon = true;
this.dockPanel1.Size = new System.Drawing.Size(964, 675);
this.dockPanel1.TabIndex = 12;
this.dockPanel1.Theme = this.vS2015LightTheme1;
this.dockPanel1.Enter += new System.EventHandler(this.DockPanel1_Enter);
//
// panel1
//
this.panel1.Controls.Add(this.BtnCreateProject);
this.panel1.Controls.Add(this.BtnSetting);
this.panel1.Controls.Add(this.BtnTools);
this.panel1.Controls.Add(this.rySearch1);
this.panel1.Dock = System.Windows.Forms.DockStyle.Top;
this.panel1.Location = new System.Drawing.Point(0, 0);
this.panel1.Name = "panel1";
this.panel1.Size = new System.Drawing.Size(964, 30);
this.panel1.TabIndex = 15;
this.panel1.Click += new System.EventHandler(this.Panel1_Click);
//
// BtnCreateProject
//
this.BtnCreateProject.BaseColor = System.Drawing.Color.FromArgb(((int)(((byte)(51)))), ((int)(((byte)(76)))), ((int)(((byte)(95)))));
this.BtnCreateProject.Location = new System.Drawing.Point(533, 3);
this.BtnCreateProject.Name = "BtnCreateProject";
this.BtnCreateProject.Size = new System.Drawing.Size(59, 25);
this.BtnCreateProject.TabIndex = 3;
this.BtnCreateProject.Text = "创建项目";
this.BtnCreateProject.UseVisualStyleBackColor = true;
this.BtnCreateProject.Click += new System.EventHandler(this.BtnCreateProject_Click);
//
// BtnSetting
//
this.BtnSetting.BaseColor = System.Drawing.Color.FromArgb(((int)(((byte)(51)))), ((int)(((byte)(76)))), ((int)(((byte)(95)))));
this.BtnSetting.Location = new System.Drawing.Point(468, 3);
this.BtnSetting.Name = "BtnSetting";
this.BtnSetting.Size = new System.Drawing.Size(59, 25);
this.BtnSetting.TabIndex = 2;
this.BtnSetting.Text = "设置";
this.BtnSetting.UseVisualStyleBackColor = true;
this.BtnSetting.Click += new System.EventHandler(this.BtnSetting_Click);
//
// BtnTools
//
this.BtnTools.BaseColor = System.Drawing.Color.FromArgb(((int)(((byte)(51)))), ((int)(((byte)(76)))), ((int)(((byte)(95)))));
this.BtnTools.Location = new System.Drawing.Point(403, 3);
this.BtnTools.Name = "BtnTools";
this.BtnTools.Size = new System.Drawing.Size(59, 25);
this.BtnTools.TabIndex = 1;
this.BtnTools.Text = "工具管理";
this.BtnTools.UseVisualStyleBackColor = true;
this.BtnTools.Click += new System.EventHandler(this.BtnTools_Click);
//
// rySearch1
//
this.rySearch1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(236)))), ((int)(((byte)(239)))), ((int)(((byte)(244)))));
this.rySearch1.BaseColor = System.Drawing.Color.FromArgb(((int)(((byte)(51)))), ((int)(((byte)(76)))), ((int)(((byte)(95)))));
this.rySearch1.EmptyText = "请输入工具名称、名称拼音首字母、工具描述进行搜索";
this.rySearch1.ImeMode = System.Windows.Forms.ImeMode.Close;
this.rySearch1.Location = new System.Drawing.Point(9, 3);
this.rySearch1.Name = "rySearch1";
this.rySearch1.Size = new System.Drawing.Size(388, 25);
this.rySearch1.TabIndex = 0;
this.rySearch1.OnTextChanged += new System.EventHandler(this.RySearch1_OnTextChanged);
this.rySearch1.KeyDown += new System.Windows.Forms.KeyEventHandler(this.RySearch1_KeyDown);
this.rySearch1.Leave += new System.EventHandler(this.RySearch1_Leave);
//
// table1
//
this.table1.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.table1.ColumnModel = this.columnModel1;
this.table1.EnableToolTips = true;
this.table1.FullRowSelect = true;
this.table1.Location = new System.Drawing.Point(9, 30);
this.table1.Name = "table1";
this.table1.NoItemsText = "当前列表没有任何项";
this.table1.Size = new System.Drawing.Size(442, 347);
this.table1.TabIndex = 19;
this.table1.TableModel = this.tableModel1;
this.table1.Text = "table1";
this.table1.Visible = false;
this.table1.Click += new System.EventHandler(this.Table1_Click);
this.table1.KeyDown += new System.Windows.Forms.KeyEventHandler(this.Table1_KeyDown);
this.table1.Leave += new System.EventHandler(this.Table1_Leave);
//
// columnModel1
//
this.columnModel1.Columns.AddRange(new XPTable.Models.Column[] {
this.textColumn4,
this.textColumn5});
//
// textColumn4
//
this.textColumn4.Editable = false;
this.textColumn4.Tag = null;
this.textColumn4.Text = "工具名称";
this.textColumn4.Width = 180;
//
// textColumn5
//
this.textColumn5.Editable = false;
this.textColumn5.Tag = null;
this.textColumn5.Text = "备注";
this.textColumn5.Width = 230;
//
// Form1
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(964, 705);
this.Controls.Add(this.table1);
this.Controls.Add(this.dockPanel1);
this.Controls.Add(this.panel1);
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
this.IsMdiContainer = true;
this.Name = "Form1";
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
this.Text = "睿元开发辅助工具";
this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.Form1_FormClosing);
this.Load += new System.EventHandler(this.Form1_Load);
this.panel1.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.table1)).EndInit();
this.ResumeLayout(false);
}
#endregion
private System.Windows.Forms.ToolTip toolTip1;
private WeifenLuo.WinFormsUI.Docking.VS2015LightTheme vS2015LightTheme1;
private WeifenLuo.WinFormsUI.Docking.DockPanel dockPanel1;
private System.Windows.Forms.Panel panel1;
private ryControls.rySearch rySearch1;
private ryControls.ButtonEx BtnTools;
private XPTable.Models.Table table1;
private XPTable.Models.ColumnModel columnModel1;
private XPTable.Models.TextColumn textColumn4;
private XPTable.Models.TextColumn textColumn5;
private XPTable.Models.TableModel tableModel1;
private ryControls.ButtonEx BtnSetting;
private ryControls.ButtonEx BtnCreateProject;
}
}
+280
View File
@@ -0,0 +1,280 @@
using DotNet4.Utilities;
using HtmlAgilityPack;
using ICSharpCode.TextEditor.Document;
using Microsoft.Win32;
using ryCommon;
using ryCommonDb;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.IO;
using System.Linq;
using System.Text;
using System.Text.RegularExpressions;
using System.Threading;
using System.Windows.Forms;
using System.Xml;
using WeifenLuo.WinFormsUI.Docking;
using 开发辅助工具.Manager;
using 开发辅助工具.Tools;
namespace 开发辅助工具
{
public partial class Form1 : Form
{
string _ProjectPath = "";
public Form1(string ProjectPath,string mode)
{
_ProjectPath = ProjectPath;
InitializeComponent();
if(ProjectPath!="")
{
if (mode == "get")
{
FrmProject frm = new FrmProject(ProjectPath);
frm.Show(dockPanel1);
}
else if (mode == "open")
{
FrmPathInfo frm = new FrmPathInfo(ProjectPath);
frm.Show(dockPanel1);
}
}
Manager.Itrycn_Db.CreateSysTable();
Manager.Itrycn_Db.CreateUserTable();
LoadBaseTools();
}
public void HideDownList()
{
table1.Visible = false;
}
private void LoadBaseTools()
{
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 Starts order by ClickCount desc,editTime desc");
if(mydb.HaveData(ds))
{
for (int i = 0; i < ds.Tables[0].Rows.Count; i++)
{
DataRow row = ds.Tables[0].Rows[i];
Type type = Type.GetType(row["Addr"].ToString());
if (type == null) { continue; }
ShowForm(type);
}
}
else
{
ShowForm(typeof(FrmWebGet));
ShowForm(typeof(FrmXpath));
ShowForm(typeof(FrmRegex));
ShowForm(typeof(FrmEncode));
}
}
db.Free();
//ShowForm(Type.GetType("开发辅助工具.Tools.FrmWebGet"));
//ShowForm(typeof(FrmToolsBox));
//FrmProject frm = new FrmProject(ProjectPath);
//frm.Show(dockPanel1);
}
private void ShowForm(Type type)
{
DockContent frm = (DockContent)Activator.CreateInstance(type);
frm.Click += Frm_Click;
frm.Show(dockPanel1);
}
private void Frm_Click(object sender, EventArgs e)
{
HideDownList();
}
private void Form1_Load(object sender, EventArgs e)
{
Text = "开发辅助工具 V"+ryCommon.RySoft.VersionStr;
bool test_mode = false;
if (System.IO.File.Exists(Application.StartupPath + "\\测试.txt")){test_mode = true;}
BtnTools.Visible = test_mode;
BtnSetting.Visible = test_mode;
BtnCreateProject.Visible = test_mode;
DataProvider mydb = new DataProvider();
IDbInterface db = Itrycn_Db.CreateDataProvider(Itrycn_Db.dataType);
if (db.ConnDb(Itrycn_Db.User_SQLConn) == 1)
{
RyQuickSQL mySQL = new RyQuickSQL("Urls");
mySQL.AddField("editTime",DateTime.Now.AddDays(-10));
db.ExecuteNonQuery("DELETE FROM Urls WHERE id IN (SELECT id FROM Urls ORDER BY ClickCount desc,editTime desc LIMIT 1000,50) and editTime<=@editTime", mySQL);
}
db.Free();
}
private void BtnTools_Click(object sender, EventArgs e)
{
FrmToolsSearch frm = new FrmToolsSearch();
frm.ShowDialog();
}
private void RySearch1_OnTextChanged(object sender, EventArgs e)
{
string sql_where = "";
if (rySearch1.Text != ""){ sql_where = " where (Name like @SearchText or Des like @SearchText or Keys like @SearchText or PY like @SearchText)"; }
#region 重新载入数据
tableModel1.Rows.Clear();
tableModel1.Selections.Clear();
DataProvider mydb = new DataProvider();
IDbInterface db = Itrycn_Db.CreateDataProvider(Itrycn_Db.dataType);
if (db.ConnDb(Itrycn_Db.Sys_SQLConn) == 1)
{
db.AddParameter("SearchText", "%" + rySearch1.Text + "%");
DataSet ds = db.ReadData("select * from Tools"+ sql_where+ " order by sort desc, addTime desc", db.GetParameter());
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["Addr"].ToString()
};
//需要修改此处
itemList.Cells.Add(new XPTable.Models.Cell(row["Name"].ToString()));//示例
var cell = new XPTable.Models.Cell(row["Des"].ToString());
cell.ForeColor = Color.Gray;
itemList.Cells.Add(cell);
tableModel1.Rows.Add(itemList);
}
db.Free();
textColumn4.Text = "工具名称("+ tableModel1.Rows.Count+ ")";
table1.Visible = tableModel1.Rows.Count!=0;
}
#endregion
}
private void RySearch1_KeyDown(object sender, KeyEventArgs e)
{
if(e.KeyCode==Keys.Down)
{
if (table1.Visible)
{
table1.TableModel.Selections.Clear();
table1.TableModel.Selections.AddCells(0, 0, 0, columnModel1.Columns.Count - 1);
table1.Focus();
}
}
}
private void Table1_KeyDown(object sender, KeyEventArgs e)
{
if (e.KeyCode == Keys.Up)
{
if (table1.SelectedItems.Length>0 && table1.SelectedItems[0].Index==0)
{
table1.TableModel.Selections.Clear();
rySearch1.Select();
}
}
else if(e.KeyCode==Keys.Enter)
{
ClickItem();
}
}
private void DockPanel1_Enter(object sender, EventArgs e)
{
table1.Visible = false;
}
private void Panel1_Click(object sender, EventArgs e)
{
table1.Visible = false;
}
private void ClickItem()
{
if (table1.SelectedItems.Length > 0)
{
table1.Visible = false;
Application.DoEvents();
string addr = table1.SelectedItems[0].Tag.ToString();
Type type = Type.GetType("开发辅助工具." + addr);
if (type == null)
{
MessageBox.Show("无法找到工具", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
}
else
{
ShowForm(type);
}
}
}
private void Table1_Click(object sender, EventArgs e)
{
ClickItem();
}
private const int WM_COPYDATA = 0x004A;
protected override void WndProc(ref Message m)
{
//Console.WriteLine(m.Msg);
const int WM_SYSCOMMAND = 0x0112;
const int SC_CLOSE = 0xF060;
#region 关闭软件时
if (m.Msg == WM_SYSCOMMAND && (int)m.WParam == SC_CLOSE)
{
//捕捉关闭窗体消息
//用户点击关闭窗体控制按钮 注释为最小化窗体
//this.WindowState = FormWindowState.Minimized;
if (Itrycn_Db.IsCloseConfirm)
{
switch (MessageBox.Show("是否确定要关闭所有窗口?", "提示", MessageBoxButtons.OKCancel, MessageBoxIcon.Question))
{
case DialogResult.Cancel:
RyForm.SetActiveWindow(Handle);
return;
case DialogResult.OK:
Itrycn_Db.IsCloseConfirm = false;
break;
}
}
}
#endregion
base.WndProc(ref m);
}
private void Form1_FormClosing(object sender, FormClosingEventArgs e)
{
Itrycn_Db.IsCloseConfirm = false;
}
private void RySearch1_Leave(object sender, EventArgs e)
{
if (!table1.Focused)
{
table1.Visible = false;
}
}
private void Table1_Leave(object sender, EventArgs e)
{
if (!rySearch1.Focused)
{
table1.Visible = false;
}
}
private void BtnSetting_Click(object sender, EventArgs e)
{
FrmSetting frm = new FrmSetting();
frm.Icon = Icon;
frm.ShowDialog();
}
private void BtnCreateProject_Click(object sender, EventArgs e)
{
FrmCreateProject frm = new FrmCreateProject();
frm.Icon = Icon;
frm.StartPosition = FormStartPosition.CenterParent;
frm.ShowDialog();
}
}
}
+209
View File
@@ -0,0 +1,209 @@
<?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="toolTip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value>
</metadata>
<metadata name="vS2015LightTheme1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>130, 32</value>
</metadata>
<metadata name="columnModel1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>428, 32</value>
</metadata>
<metadata name="tableModel1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>301, 32</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>
AAABAAEAICAAAAEAIACoEAAAFgAAACgAAAAgAAAAQAAAAAEAIAAAAAAAABAAABILAAASCwAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAKAAAAGgAAABAAAAADBBIdAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA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AERpEGDF/GQhpw2YM9jujIc7j2+KDa//+f4f//ddv//0LV//872v//P9///0Ll//880e77GGqLlgAA
ADcLM0pvNYqoyWLU7Ptc6f//Q+T//0Dg//892v//NdH//yzD//88s/z/J4LcpgAwgw0CSp8ABDyAAAAA
AAAAAAAABkuaAARGkgAPZ9YAav3/AAA6nhMsbcpaa6Hmxq7X+v6p4///atf//zjT//862f//PNz//0ji
//9GweLzK4Wp0lG83PFc4v3/R+P//z3e//872v//N9T//zHM//8owP//Iaz+/xaD5cgEUKkjCWDCAAhe
xQAAAAAAAAAAAAAAAAAAAAAAAR81AAJLngAANWIABUyoAFGR9AAAN6EZUYrZlZTJ+PuA1///Ps7//zXU
//842P//Q9r//2zi//9z4v//ZuP//0Db//831///NdL//zDM//8rxP//ML7//yeu//8WhuvZCVq6OBJ1
6ACO//8AAS1NAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACQ4kA////AA5TtQAAF38MPIHbome9
/P8+x///Mc///zbV//821f//P9b//0nY//881P//MtD//y7K//8tw///QcP//2bK//9qwP7/J4nr3Qda
vkYblf8AACBAAAE/dQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHP2wADljFAA5W
vgADRaomKofo1C23//8uyv//M9L//zPT//8y0v//MdD//y/N//8pxf//M73//2bI//+h2v//ns38/0qN
58wIU70+LbT/AAAuYwACQX0AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAADK1QAAAgNACCc/wALW8RuH5/4/SvF//8wzv//MdD//zHQ//8vzv//KMX//ym4//9Wvf//i8r//4O1
9/U/fN6gAEO2IxZRrwAADR0AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAEP4MACVG9AARGqz8slPLzQcf//y3J//8uzf//L87//yzL//8kvv//K6z+/0Sc
8vs5ds3cDjuKgAAACS4AAA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f/gAAH/4AAD//AAB//wAA//8AAP//A
AD//wAA//8AAP//AAD//4AA//+AAf//wAH8=
</value>
</data>
</root>
+566
View File
@@ -0,0 +1,566 @@
namespace 开发辅助工具
{
partial class FrmMessageBox
{
/// <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.groupBox1 = new System.Windows.Forms.GroupBox();
this.RbIconError = new System.Windows.Forms.RadioButton();
this.RbIconWarning = new System.Windows.Forms.RadioButton();
this.RbIconQuestion = new System.Windows.Forms.RadioButton();
this.RbIconInformation = new System.Windows.Forms.RadioButton();
this.RbIconNone = new System.Windows.Forms.RadioButton();
this.groupBox2 = new System.Windows.Forms.GroupBox();
this.ChkTitleIsPram = new System.Windows.Forms.CheckBox();
this.CbbTitle = new ryControls.RyComboBox();
this.groupBox3 = new System.Windows.Forms.GroupBox();
this.TxtContent = new ryControls.TextBoxEx2();
this.ChkContentIsPram = new System.Windows.Forms.CheckBox();
this.groupBox4 = new System.Windows.Forms.GroupBox();
this.RbBtnAbortRetryIgnore = new System.Windows.Forms.RadioButton();
this.RbBtnRetryCancel = new System.Windows.Forms.RadioButton();
this.RbBtnYesNoCancel = new System.Windows.Forms.RadioButton();
this.RbBtnYesNo = new System.Windows.Forms.RadioButton();
this.RbBtnOKCancel = new System.Windows.Forms.RadioButton();
this.RbBtnOK = new System.Windows.Forms.RadioButton();
this.GroupResult = new System.Windows.Forms.GroupBox();
this.ChkResultNo = new System.Windows.Forms.CheckBox();
this.ChkResultYes = new System.Windows.Forms.CheckBox();
this.ChkResultIgnore = new System.Windows.Forms.CheckBox();
this.ChkResultRetry = new System.Windows.Forms.CheckBox();
this.ChkResultAbort = new System.Windows.Forms.CheckBox();
this.ChkResultCancel = new System.Windows.Forms.CheckBox();
this.ChkResultOK = new System.Windows.Forms.CheckBox();
this.groupBox6 = new System.Windows.Forms.GroupBox();
this.ChkTopMost = new System.Windows.Forms.CheckBox();
this.groupBox7 = new System.Windows.Forms.GroupBox();
this.RbDefaultButton3 = new System.Windows.Forms.RadioButton();
this.RbDefaultButton2 = new System.Windows.Forms.RadioButton();
this.RbDefaultButton1 = new System.Windows.Forms.RadioButton();
this.BtnCreate = new ryControls.ButtonEx();
this.groupBox5 = new System.Windows.Forms.GroupBox();
this.radioButton6 = new System.Windows.Forms.RadioButton();
this.groupBox1.SuspendLayout();
this.groupBox2.SuspendLayout();
this.groupBox3.SuspendLayout();
this.groupBox4.SuspendLayout();
this.GroupResult.SuspendLayout();
this.groupBox6.SuspendLayout();
this.groupBox7.SuspendLayout();
this.groupBox5.SuspendLayout();
this.SuspendLayout();
//
// groupBox1
//
this.groupBox1.Controls.Add(this.RbIconError);
this.groupBox1.Controls.Add(this.RbIconWarning);
this.groupBox1.Controls.Add(this.RbIconQuestion);
this.groupBox1.Controls.Add(this.RbIconInformation);
this.groupBox1.Controls.Add(this.RbIconNone);
this.groupBox1.Location = new System.Drawing.Point(12, 12);
this.groupBox1.Name = "groupBox1";
this.groupBox1.Size = new System.Drawing.Size(111, 215);
this.groupBox1.TabIndex = 0;
this.groupBox1.TabStop = false;
this.groupBox1.Text = "显示图标";
//
// RbIconError
//
this.RbIconError.AutoSize = true;
this.RbIconError.Location = new System.Drawing.Point(18, 174);
this.RbIconError.Name = "RbIconError";
this.RbIconError.Size = new System.Drawing.Size(47, 16);
this.RbIconError.TabIndex = 4;
this.RbIconError.Text = "错误";
this.RbIconError.UseVisualStyleBackColor = true;
//
// RbIconWarning
//
this.RbIconWarning.AutoSize = true;
this.RbIconWarning.Location = new System.Drawing.Point(18, 137);
this.RbIconWarning.Name = "RbIconWarning";
this.RbIconWarning.Size = new System.Drawing.Size(47, 16);
this.RbIconWarning.TabIndex = 3;
this.RbIconWarning.Text = "警告";
this.RbIconWarning.UseVisualStyleBackColor = true;
//
// RbIconQuestion
//
this.RbIconQuestion.AutoSize = true;
this.RbIconQuestion.Location = new System.Drawing.Point(18, 100);
this.RbIconQuestion.Name = "RbIconQuestion";
this.RbIconQuestion.Size = new System.Drawing.Size(47, 16);
this.RbIconQuestion.TabIndex = 2;
this.RbIconQuestion.Text = "询问";
this.RbIconQuestion.UseVisualStyleBackColor = true;
//
// RbIconInformation
//
this.RbIconInformation.AutoSize = true;
this.RbIconInformation.Checked = true;
this.RbIconInformation.Location = new System.Drawing.Point(18, 63);
this.RbIconInformation.Name = "RbIconInformation";
this.RbIconInformation.Size = new System.Drawing.Size(47, 16);
this.RbIconInformation.TabIndex = 1;
this.RbIconInformation.TabStop = true;
this.RbIconInformation.Text = "提示";
this.RbIconInformation.UseVisualStyleBackColor = true;
//
// RbIconNone
//
this.RbIconNone.AutoSize = true;
this.RbIconNone.Location = new System.Drawing.Point(18, 26);
this.RbIconNone.Name = "RbIconNone";
this.RbIconNone.Size = new System.Drawing.Size(35, 16);
this.RbIconNone.TabIndex = 0;
this.RbIconNone.Text = "无";
this.RbIconNone.UseVisualStyleBackColor = true;
//
// groupBox2
//
this.groupBox2.Controls.Add(this.ChkTitleIsPram);
this.groupBox2.Controls.Add(this.CbbTitle);
this.groupBox2.Location = new System.Drawing.Point(129, 12);
this.groupBox2.Name = "groupBox2";
this.groupBox2.Size = new System.Drawing.Size(424, 71);
this.groupBox2.TabIndex = 1;
this.groupBox2.TabStop = false;
this.groupBox2.Text = "对话框标题";
//
// ChkTitleIsPram
//
this.ChkTitleIsPram.AutoSize = true;
this.ChkTitleIsPram.Location = new System.Drawing.Point(6, 48);
this.ChkTitleIsPram.Name = "ChkTitleIsPram";
this.ChkTitleIsPram.Size = new System.Drawing.Size(96, 16);
this.ChkTitleIsPram.TabIndex = 1;
this.ChkTitleIsPram.Text = "标题为变量名";
this.ChkTitleIsPram.UseVisualStyleBackColor = true;
//
// CbbTitle
//
this.CbbTitle.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed;
this.CbbTitle.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.CbbTitle.FormattingEnabled = true;
this.CbbTitle.Location = new System.Drawing.Point(6, 20);
this.CbbTitle.Name = "CbbTitle";
this.CbbTitle.Size = new System.Drawing.Size(412, 22);
this.CbbTitle.TabIndex = 0;
//
// groupBox3
//
this.groupBox3.Controls.Add(this.TxtContent);
this.groupBox3.Controls.Add(this.ChkContentIsPram);
this.groupBox3.Location = new System.Drawing.Point(129, 89);
this.groupBox3.Name = "groupBox3";
this.groupBox3.Size = new System.Drawing.Size(424, 138);
this.groupBox3.TabIndex = 2;
this.groupBox3.TabStop = false;
this.groupBox3.Text = "文本信息";
//
// TxtContent
//
this.TxtContent.BackColor = System.Drawing.Color.White;
this.TxtContent.EmptyText = "";
this.TxtContent.Location = new System.Drawing.Point(6, 20);
this.TxtContent.MaxLength = 999999999;
this.TxtContent.Multiline = true;
this.TxtContent.Name = "TxtContent";
this.TxtContent.OnlyNumeric = false;
this.TxtContent.PasswordChar = '\0';
this.TxtContent.ReadOnly = false;
this.TxtContent.SelectedText = "";
this.TxtContent.SelectionLength = 0;
this.TxtContent.SelectionStart = 0;
this.TxtContent.Size = new System.Drawing.Size(412, 90);
this.TxtContent.TabIndex = 2;
this.TxtContent.TextAlign = System.Windows.Forms.HorizontalAlignment.Left;
this.TxtContent.ToolTip = "";
//
// ChkContentIsPram
//
this.ChkContentIsPram.AutoSize = true;
this.ChkContentIsPram.Location = new System.Drawing.Point(6, 116);
this.ChkContentIsPram.Name = "ChkContentIsPram";
this.ChkContentIsPram.Size = new System.Drawing.Size(120, 16);
this.ChkContentIsPram.TabIndex = 1;
this.ChkContentIsPram.Text = "文本信息为变量名";
this.ChkContentIsPram.UseVisualStyleBackColor = true;
//
// groupBox4
//
this.groupBox4.Controls.Add(this.RbBtnAbortRetryIgnore);
this.groupBox4.Controls.Add(this.RbBtnRetryCancel);
this.groupBox4.Controls.Add(this.RbBtnYesNoCancel);
this.groupBox4.Controls.Add(this.RbBtnYesNo);
this.groupBox4.Controls.Add(this.RbBtnOKCancel);
this.groupBox4.Controls.Add(this.RbBtnOK);
this.groupBox4.Location = new System.Drawing.Point(129, 233);
this.groupBox4.Name = "groupBox4";
this.groupBox4.Size = new System.Drawing.Size(147, 177);
this.groupBox4.TabIndex = 3;
this.groupBox4.TabStop = false;
this.groupBox4.Text = "对话框按钮";
//
// RbBtnAbortRetryIgnore
//
this.RbBtnAbortRetryIgnore.AutoSize = true;
this.RbBtnAbortRetryIgnore.Location = new System.Drawing.Point(15, 134);
this.RbBtnAbortRetryIgnore.Name = "RbBtnAbortRetryIgnore";
this.RbBtnAbortRetryIgnore.Size = new System.Drawing.Size(107, 16);
this.RbBtnAbortRetryIgnore.TabIndex = 5;
this.RbBtnAbortRetryIgnore.Text = "终止/重试/忽略";
this.RbBtnAbortRetryIgnore.UseVisualStyleBackColor = true;
this.RbBtnAbortRetryIgnore.CheckedChanged += new System.EventHandler(this.RbBtnAbortRetryIgnore_CheckedChanged);
//
// RbBtnRetryCancel
//
this.RbBtnRetryCancel.AutoSize = true;
this.RbBtnRetryCancel.Location = new System.Drawing.Point(15, 112);
this.RbBtnRetryCancel.Name = "RbBtnRetryCancel";
this.RbBtnRetryCancel.Size = new System.Drawing.Size(77, 16);
this.RbBtnRetryCancel.TabIndex = 4;
this.RbBtnRetryCancel.Text = "重试/取消";
this.RbBtnRetryCancel.UseVisualStyleBackColor = true;
this.RbBtnRetryCancel.CheckedChanged += new System.EventHandler(this.RbBtnRetryCancel_CheckedChanged);
//
// RbBtnYesNoCancel
//
this.RbBtnYesNoCancel.AutoSize = true;
this.RbBtnYesNoCancel.Location = new System.Drawing.Point(15, 90);
this.RbBtnYesNoCancel.Name = "RbBtnYesNoCancel";
this.RbBtnYesNoCancel.Size = new System.Drawing.Size(83, 16);
this.RbBtnYesNoCancel.TabIndex = 3;
this.RbBtnYesNoCancel.Text = "是/否/取消";
this.RbBtnYesNoCancel.UseVisualStyleBackColor = true;
this.RbBtnYesNoCancel.CheckedChanged += new System.EventHandler(this.RbBtnYesNoCancel_CheckedChanged);
//
// RbBtnYesNo
//
this.RbBtnYesNo.AutoSize = true;
this.RbBtnYesNo.Location = new System.Drawing.Point(15, 68);
this.RbBtnYesNo.Name = "RbBtnYesNo";
this.RbBtnYesNo.Size = new System.Drawing.Size(53, 16);
this.RbBtnYesNo.TabIndex = 2;
this.RbBtnYesNo.Text = "是/否";
this.RbBtnYesNo.UseVisualStyleBackColor = true;
this.RbBtnYesNo.CheckedChanged += new System.EventHandler(this.RbBtnYesNo_CheckedChanged);
//
// RbBtnOKCancel
//
this.RbBtnOKCancel.AutoSize = true;
this.RbBtnOKCancel.Location = new System.Drawing.Point(15, 46);
this.RbBtnOKCancel.Name = "RbBtnOKCancel";
this.RbBtnOKCancel.Size = new System.Drawing.Size(77, 16);
this.RbBtnOKCancel.TabIndex = 1;
this.RbBtnOKCancel.Text = "确定/取消";
this.RbBtnOKCancel.UseVisualStyleBackColor = true;
this.RbBtnOKCancel.CheckedChanged += new System.EventHandler(this.RbBtnOKCancel_CheckedChanged);
//
// RbBtnOK
//
this.RbBtnOK.AutoSize = true;
this.RbBtnOK.Checked = true;
this.RbBtnOK.Location = new System.Drawing.Point(15, 24);
this.RbBtnOK.Name = "RbBtnOK";
this.RbBtnOK.Size = new System.Drawing.Size(47, 16);
this.RbBtnOK.TabIndex = 0;
this.RbBtnOK.TabStop = true;
this.RbBtnOK.Text = "确定";
this.RbBtnOK.UseVisualStyleBackColor = true;
this.RbBtnOK.CheckedChanged += new System.EventHandler(this.RbBtnOK_CheckedChanged);
//
// GroupResult
//
this.GroupResult.Controls.Add(this.ChkResultNo);
this.GroupResult.Controls.Add(this.ChkResultYes);
this.GroupResult.Controls.Add(this.ChkResultIgnore);
this.GroupResult.Controls.Add(this.ChkResultRetry);
this.GroupResult.Controls.Add(this.ChkResultAbort);
this.GroupResult.Controls.Add(this.ChkResultCancel);
this.GroupResult.Controls.Add(this.ChkResultOK);
this.GroupResult.Location = new System.Drawing.Point(284, 233);
this.GroupResult.Name = "GroupResult";
this.GroupResult.Size = new System.Drawing.Size(115, 177);
this.GroupResult.TabIndex = 4;
this.GroupResult.TabStop = false;
this.GroupResult.Text = "函数返回值";
//
// ChkResultNo
//
this.ChkResultNo.AutoSize = true;
this.ChkResultNo.Enabled = false;
this.ChkResultNo.Location = new System.Drawing.Point(11, 155);
this.ChkResultNo.Name = "ChkResultNo";
this.ChkResultNo.Size = new System.Drawing.Size(36, 16);
this.ChkResultNo.TabIndex = 6;
this.ChkResultNo.Text = "否";
this.ChkResultNo.UseVisualStyleBackColor = true;
//
// ChkResultYes
//
this.ChkResultYes.AutoSize = true;
this.ChkResultYes.Enabled = false;
this.ChkResultYes.Location = new System.Drawing.Point(11, 133);
this.ChkResultYes.Name = "ChkResultYes";
this.ChkResultYes.Size = new System.Drawing.Size(36, 16);
this.ChkResultYes.TabIndex = 5;
this.ChkResultYes.Text = "是";
this.ChkResultYes.UseVisualStyleBackColor = true;
//
// ChkResultIgnore
//
this.ChkResultIgnore.AutoSize = true;
this.ChkResultIgnore.Enabled = false;
this.ChkResultIgnore.Location = new System.Drawing.Point(11, 111);
this.ChkResultIgnore.Name = "ChkResultIgnore";
this.ChkResultIgnore.Size = new System.Drawing.Size(48, 16);
this.ChkResultIgnore.TabIndex = 4;
this.ChkResultIgnore.Text = "忽略";
this.ChkResultIgnore.UseVisualStyleBackColor = true;
//
// ChkResultRetry
//
this.ChkResultRetry.AutoSize = true;
this.ChkResultRetry.Enabled = false;
this.ChkResultRetry.Location = new System.Drawing.Point(11, 89);
this.ChkResultRetry.Name = "ChkResultRetry";
this.ChkResultRetry.Size = new System.Drawing.Size(48, 16);
this.ChkResultRetry.TabIndex = 3;
this.ChkResultRetry.Text = "重试";
this.ChkResultRetry.UseVisualStyleBackColor = true;
//
// ChkResultAbort
//
this.ChkResultAbort.AutoSize = true;
this.ChkResultAbort.Enabled = false;
this.ChkResultAbort.Location = new System.Drawing.Point(11, 67);
this.ChkResultAbort.Name = "ChkResultAbort";
this.ChkResultAbort.Size = new System.Drawing.Size(48, 16);
this.ChkResultAbort.TabIndex = 2;
this.ChkResultAbort.Text = "终止";
this.ChkResultAbort.UseVisualStyleBackColor = true;
//
// ChkResultCancel
//
this.ChkResultCancel.AutoSize = true;
this.ChkResultCancel.Enabled = false;
this.ChkResultCancel.Location = new System.Drawing.Point(11, 45);
this.ChkResultCancel.Name = "ChkResultCancel";
this.ChkResultCancel.Size = new System.Drawing.Size(48, 16);
this.ChkResultCancel.TabIndex = 1;
this.ChkResultCancel.Text = "取消";
this.ChkResultCancel.UseVisualStyleBackColor = true;
//
// ChkResultOK
//
this.ChkResultOK.AutoSize = true;
this.ChkResultOK.Enabled = false;
this.ChkResultOK.Location = new System.Drawing.Point(11, 23);
this.ChkResultOK.Name = "ChkResultOK";
this.ChkResultOK.Size = new System.Drawing.Size(48, 16);
this.ChkResultOK.TabIndex = 0;
this.ChkResultOK.Text = "确定";
this.ChkResultOK.UseVisualStyleBackColor = true;
//
// groupBox6
//
this.groupBox6.Controls.Add(this.ChkTopMost);
this.groupBox6.Location = new System.Drawing.Point(12, 233);
this.groupBox6.Name = "groupBox6";
this.groupBox6.Size = new System.Drawing.Size(111, 52);
this.groupBox6.TabIndex = 5;
this.groupBox6.TabStop = false;
this.groupBox6.Text = "扩展风格";
//
// ChkTopMost
//
this.ChkTopMost.AutoSize = true;
this.ChkTopMost.Location = new System.Drawing.Point(11, 21);
this.ChkTopMost.Name = "ChkTopMost";
this.ChkTopMost.Size = new System.Drawing.Size(72, 16);
this.ChkTopMost.TabIndex = 0;
this.ChkTopMost.Text = "窗口置顶";
this.ChkTopMost.UseVisualStyleBackColor = true;
//
// groupBox7
//
this.groupBox7.Controls.Add(this.RbDefaultButton3);
this.groupBox7.Controls.Add(this.RbDefaultButton2);
this.groupBox7.Controls.Add(this.RbDefaultButton1);
this.groupBox7.Location = new System.Drawing.Point(12, 291);
this.groupBox7.Name = "groupBox7";
this.groupBox7.Size = new System.Drawing.Size(111, 119);
this.groupBox7.TabIndex = 6;
this.groupBox7.TabStop = false;
this.groupBox7.Text = "默认按钮";
//
// RbDefaultButton3
//
this.RbDefaultButton3.AutoSize = true;
this.RbDefaultButton3.Location = new System.Drawing.Point(15, 87);
this.RbDefaultButton3.Name = "RbDefaultButton3";
this.RbDefaultButton3.Size = new System.Drawing.Size(59, 16);
this.RbDefaultButton3.TabIndex = 2;
this.RbDefaultButton3.Text = "第三个";
this.RbDefaultButton3.UseVisualStyleBackColor = true;
//
// RbDefaultButton2
//
this.RbDefaultButton2.AutoSize = true;
this.RbDefaultButton2.Location = new System.Drawing.Point(15, 54);
this.RbDefaultButton2.Name = "RbDefaultButton2";
this.RbDefaultButton2.Size = new System.Drawing.Size(59, 16);
this.RbDefaultButton2.TabIndex = 1;
this.RbDefaultButton2.Text = "第二个";
this.RbDefaultButton2.UseVisualStyleBackColor = true;
//
// RbDefaultButton1
//
this.RbDefaultButton1.AutoSize = true;
this.RbDefaultButton1.Checked = true;
this.RbDefaultButton1.Location = new System.Drawing.Point(15, 21);
this.RbDefaultButton1.Name = "RbDefaultButton1";
this.RbDefaultButton1.Size = new System.Drawing.Size(59, 16);
this.RbDefaultButton1.TabIndex = 0;
this.RbDefaultButton1.TabStop = true;
this.RbDefaultButton1.Text = "第一个";
this.RbDefaultButton1.UseVisualStyleBackColor = true;
//
// BtnCreate
//
this.BtnCreate.ForeColor = System.Drawing.Color.White;
this.BtnCreate.Location = new System.Drawing.Point(472, 431);
this.BtnCreate.Name = "BtnCreate";
this.BtnCreate.Size = new System.Drawing.Size(81, 33);
this.BtnCreate.TabIndex = 7;
this.BtnCreate.Text = "生成";
this.BtnCreate.UseVisualStyleBackColor = true;
this.BtnCreate.Click += new System.EventHandler(this.BtnCreate_Click);
//
// groupBox5
//
this.groupBox5.Controls.Add(this.radioButton6);
this.groupBox5.Location = new System.Drawing.Point(405, 233);
this.groupBox5.Name = "groupBox5";
this.groupBox5.Size = new System.Drawing.Size(148, 177);
this.groupBox5.TabIndex = 8;
this.groupBox5.TabStop = false;
this.groupBox5.Text = "对话框风格";
//
// radioButton6
//
this.radioButton6.AutoSize = true;
this.radioButton6.Checked = true;
this.radioButton6.Location = new System.Drawing.Point(15, 24);
this.radioButton6.Name = "radioButton6";
this.radioButton6.Size = new System.Drawing.Size(71, 16);
this.radioButton6.TabIndex = 0;
this.radioButton6.TabStop = true;
this.radioButton6.Text = "系统默认";
this.radioButton6.UseVisualStyleBackColor = true;
//
// FrmMessageBox
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(565, 476);
this.Controls.Add(this.groupBox5);
this.Controls.Add(this.BtnCreate);
this.Controls.Add(this.groupBox7);
this.Controls.Add(this.groupBox6);
this.Controls.Add(this.GroupResult);
this.Controls.Add(this.groupBox4);
this.Controls.Add(this.groupBox3);
this.Controls.Add(this.groupBox2);
this.Controls.Add(this.groupBox1);
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;
this.MaximizeBox = false;
this.Name = "FrmMessageBox";
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
this.Text = "对话框生成";
this.Load += new System.EventHandler(this.FrmMessageBox_Load);
this.groupBox1.ResumeLayout(false);
this.groupBox1.PerformLayout();
this.groupBox2.ResumeLayout(false);
this.groupBox2.PerformLayout();
this.groupBox3.ResumeLayout(false);
this.groupBox3.PerformLayout();
this.groupBox4.ResumeLayout(false);
this.groupBox4.PerformLayout();
this.GroupResult.ResumeLayout(false);
this.GroupResult.PerformLayout();
this.groupBox6.ResumeLayout(false);
this.groupBox6.PerformLayout();
this.groupBox7.ResumeLayout(false);
this.groupBox7.PerformLayout();
this.groupBox5.ResumeLayout(false);
this.groupBox5.PerformLayout();
this.ResumeLayout(false);
}
#endregion
private System.Windows.Forms.GroupBox groupBox1;
private System.Windows.Forms.RadioButton RbIconError;
private System.Windows.Forms.RadioButton RbIconWarning;
private System.Windows.Forms.RadioButton RbIconQuestion;
private System.Windows.Forms.RadioButton RbIconInformation;
private System.Windows.Forms.RadioButton RbIconNone;
private System.Windows.Forms.GroupBox groupBox2;
private System.Windows.Forms.CheckBox ChkTitleIsPram;
private ryControls.RyComboBox CbbTitle;
private System.Windows.Forms.GroupBox groupBox3;
private ryControls.TextBoxEx2 TxtContent;
private System.Windows.Forms.CheckBox ChkContentIsPram;
private System.Windows.Forms.GroupBox groupBox4;
private System.Windows.Forms.RadioButton RbBtnAbortRetryIgnore;
private System.Windows.Forms.RadioButton RbBtnRetryCancel;
private System.Windows.Forms.RadioButton RbBtnYesNoCancel;
private System.Windows.Forms.RadioButton RbBtnYesNo;
private System.Windows.Forms.RadioButton RbBtnOKCancel;
private System.Windows.Forms.RadioButton RbBtnOK;
private System.Windows.Forms.GroupBox GroupResult;
private System.Windows.Forms.GroupBox groupBox6;
private System.Windows.Forms.CheckBox ChkTopMost;
private System.Windows.Forms.GroupBox groupBox7;
private System.Windows.Forms.RadioButton RbDefaultButton3;
private System.Windows.Forms.RadioButton RbDefaultButton2;
private System.Windows.Forms.RadioButton RbDefaultButton1;
private ryControls.ButtonEx BtnCreate;
private System.Windows.Forms.CheckBox ChkResultNo;
private System.Windows.Forms.CheckBox ChkResultYes;
private System.Windows.Forms.CheckBox ChkResultIgnore;
private System.Windows.Forms.CheckBox ChkResultRetry;
private System.Windows.Forms.CheckBox ChkResultAbort;
private System.Windows.Forms.CheckBox ChkResultCancel;
private System.Windows.Forms.CheckBox ChkResultOK;
private System.Windows.Forms.GroupBox groupBox5;
private System.Windows.Forms.RadioButton radioButton6;
}
}
+238
View File
@@ -0,0 +1,238 @@
using ryCommon;
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;
namespace 开发辅助工具
{
public partial class FrmMessageBox : Form
{
public FrmMessageBox()
{
InitializeComponent();
}
private void LoadPram()
{
ryCommon.Storage Stor = new ryCommon.Storage();
Stor.LoadFromFile(Application.StartupPath+ "\\UserDb\\MessageBox.xml");
Stor.SelectNodeBySet();
CbbTitle.Text = Stor.GetAttrValue("Title");
TxtContent.Text= Stor.GetAttrValue("Content");
switch(Stor.GetAttrValue("Icon"))
{
case "MessageBoxIcon.None":
RbIconNone.Checked = true;
break;
case "MessageBoxIcon.Error":
RbIconError.Checked = true;
break;
case "MessageBoxIcon.Information":
RbIconInformation.Checked = true;
break;
case "MessageBoxIcon.Question":
RbIconQuestion.Checked = true;
break;
case "MessageBoxIcon.Warning":
RbIconWarning.Checked = true;
break;
}
switch (Stor.GetAttrValue("Btn"))
{
case "MessageBoxButtons.OK":
RbBtnOK.Checked = true;
break;
case "MessageBoxButtons.OKCancel":
RbBtnOKCancel.Checked = true;
break;
case "MessageBoxButtons.RetryCancel":
RbBtnRetryCancel.Checked = true;
break;
case "MessageBoxButtons.AbortRetryIgnore":
RbBtnAbortRetryIgnore.Checked = true;
break;
case "MessageBoxButtons.YesNo":
RbBtnYesNo.Checked = true;
break;
case "MessageBoxButtons.YesNoCancel":
RbBtnYesNoCancel.Checked = true;
break;
}
switch (Stor.GetAttrValue("Default_Btn"))
{
case "MessageBoxDefaultButton.Button1":
RbDefaultButton1.Checked = true;
break;
case "MessageBoxDefaultButton.Button2":
RbDefaultButton2.Checked = true;
break;
case "MessageBoxDefaultButton.Button3":
RbDefaultButton3.Checked = true;
break;
}
ChkTopMost.Checked = Stor.GetAttrValue("TopMost",false);
}
private void BtnCreate_Click(object sender, EventArgs e)
{
string title = CbbTitle.Text.Replace("\r","").Replace("\n", "");
string content = TxtContent.Text.Replace("\r", "\\r").Replace("\n", "\\n").Replace("\"", "\\\"");
if(ChkTitleIsPram.Checked)
{
if (title == "") { MessageBox.Show("标题变量不能为空", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);return; }
if (!Strings.IsEngOrNum(title.Replace("_","")) || title.Substring(0,1).IsInt()) { MessageBox.Show("变量只能是英文、下横杠或数字,并且不能以数字开头", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information); return; }
}
if (ChkContentIsPram.Checked)
{
if (content == "") { MessageBox.Show("文本信息变量不能为空", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information); return; }
if (!Strings.IsEngOrNum(content.Replace("_", "")) || content.Substring(0, 1).IsInt()) { MessageBox.Show("文本信息只能是英文、下横杠或数字,并且不能以数字开头", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information); return; }
}
MessageBoxButtons btn = MessageBoxButtons.OK;
MessageBoxIcon icon = MessageBoxIcon.None;
MessageBoxDefaultButton default_btn = MessageBoxDefaultButton.Button1;
MessageBoxOptions option = MessageBoxOptions.DefaultDesktopOnly;
List<DialogResult> dg = new List<DialogResult>() ;
string MessageBoxButtons_str = "";
string MessageBoxIcon_str = "";
string MessageBoxDefaultButton_str = "";
string option_str = "";
List<string> DialogResult_str =new List<string>();
#region 对话框图标设置
if (RbIconError.Checked) { icon = MessageBoxIcon.Error; MessageBoxIcon_str = "MessageBoxIcon.Error"; }
else if (RbIconInformation.Checked) { icon = MessageBoxIcon.Information; MessageBoxIcon_str = "MessageBoxIcon.Information"; }
else if (RbIconNone.Checked) { icon = MessageBoxIcon.None; MessageBoxIcon_str = "MessageBoxIcon.None"; }
else if (RbIconQuestion.Checked) { icon = MessageBoxIcon.Question; MessageBoxIcon_str = "MessageBoxIcon.Question"; }
else if (RbIconWarning.Checked) { icon = MessageBoxIcon.Warning; MessageBoxIcon_str = "MessageBoxIcon.Warning"; }
#endregion
#region 对话框按钮生成
if (RbBtnOK.Checked) { btn = MessageBoxButtons.OK; MessageBoxButtons_str = "MessageBoxButtons.OK"; }
else if (RbBtnOKCancel.Checked) { btn = MessageBoxButtons.OKCancel; MessageBoxButtons_str = "MessageBoxButtons.OKCancel"; }
else if (RbBtnRetryCancel.Checked) { btn = MessageBoxButtons.RetryCancel; MessageBoxButtons_str = "MessageBoxButtons.RetryCancel"; }
else if (RbBtnAbortRetryIgnore.Checked) { btn = MessageBoxButtons.AbortRetryIgnore; MessageBoxButtons_str = "MessageBoxButtons.AbortRetryIgnore"; }
else if (RbBtnYesNo.Checked) { btn = MessageBoxButtons.YesNo; MessageBoxButtons_str = "MessageBoxButtons.YesNo"; }
else if (RbBtnYesNoCancel.Checked) { btn = MessageBoxButtons.YesNoCancel; MessageBoxButtons_str = "MessageBoxButtons.YesNoCancel"; }
#endregion
#region 返回值
if (ChkResultAbort.Checked && ChkResultAbort.Enabled) { dg.Add(DialogResult.Abort); DialogResult_str.Add("DialogResult.Abort"); }
if (ChkResultCancel.Checked && ChkResultCancel.Enabled) { dg.Add(DialogResult.Cancel); DialogResult_str.Add("DialogResult.Cancel"); }
if (ChkResultIgnore.Checked && ChkResultIgnore.Enabled) { dg.Add(DialogResult.Ignore); DialogResult_str.Add("DialogResult.Ignore"); }
if (ChkResultNo.Checked && ChkResultNo.Enabled) { dg.Add(DialogResult.No); DialogResult_str.Add("DialogResult.No"); }
if (ChkResultOK.Checked && ChkResultOK.Enabled) { dg.Add(DialogResult.OK); DialogResult_str.Add("DialogResult.OK"); }
if (ChkResultRetry.Checked && ChkResultRetry.Enabled) { dg.Add(DialogResult.Retry); DialogResult_str.Add("DialogResult.Retry"); }
if (ChkResultYes.Checked && ChkResultYes.Enabled) { dg.Add(DialogResult.Yes); DialogResult_str.Add("DialogResult.Yes"); }
#endregion
#region 默认按钮
if (RbDefaultButton1.Checked) { default_btn = MessageBoxDefaultButton.Button1; MessageBoxDefaultButton_str = "MessageBoxDefaultButton.Button1"; }
else if (RbDefaultButton2.Checked) { default_btn = MessageBoxDefaultButton.Button2; MessageBoxDefaultButton_str = "MessageBoxDefaultButton.Button2"; }
else if (RbDefaultButton3.Checked) { default_btn = MessageBoxDefaultButton.Button3; MessageBoxDefaultButton_str = "MessageBoxDefaultButton.Button3"; }
#endregion
if (ChkTopMost.Checked) { option = MessageBoxOptions.DefaultDesktopOnly;option_str = "MessageBoxOptions.DefaultDesktopOnly"; }
MessageBox.Show(content.Replace("\\r","\r").Replace("\\n", "\n"), title, btn, icon, default_btn, option);
string create_str = "MessageBox.Show(\""+ content + "\",\""+ title + "\"";
if (ChkTitleIsPram.Checked && !ChkContentIsPram.Checked)
{
create_str = "MessageBox.Show(\"" + content + "\"," + title;
}
else if (!ChkTitleIsPram.Checked && ChkContentIsPram.Checked)
{
create_str = "MessageBox.Show(" + content + ",\"" + title + "\"";
}
else if (ChkTitleIsPram.Checked && ChkContentIsPram.Checked)
{
create_str = "MessageBox.Show(" + content + "," + title;
}
if(option_str != "")
{ create_str += "," + MessageBoxButtons_str + "," + MessageBoxIcon_str + "," + MessageBoxDefaultButton_str + "," + option_str + ")"; }
else if (MessageBoxDefaultButton_str != "MessageBoxDefaultButton.Button1" && option_str == "")
{ create_str += "," + MessageBoxButtons_str + "," + MessageBoxIcon_str + "," + MessageBoxDefaultButton_str + ")"; }
else if (MessageBoxDefaultButton_str == "MessageBoxDefaultButton.Button1" && option_str == "")
{ create_str += "," + MessageBoxButtons_str + "," + MessageBoxIcon_str + ")"; }
else if (MessageBoxButtons_str == "MessageBoxButtons.OK" && MessageBoxIcon_str == "MessageBoxIcon.None" && MessageBoxDefaultButton_str == "MessageBoxDefaultButton.Button1" && option_str == "")
{ create_str += ")"; }
else
{
{ create_str += ")"; }
}
if (dg.Count == 0) { create_str += ";"; }
else
{
create_str = "switch(" + create_str + ")";
create_str += "\r\n{";
for (int i = 0; i < DialogResult_str.Count; i++)
{
create_str += "\r\n case "+ DialogResult_str[i]+ ":\r\n break;";
}
create_str += "\r\n}";
}
ryCommon.RyFiles.CopyToClip(create_str);
ryCommon.Storage Stor = new ryCommon.Storage();
Stor.LoadFromFile(Application.StartupPath + "\\UserDb\\MessageBox.xml");
Stor.SelectNodeBySet();
Stor.SetAttrValue("Title", CbbTitle.Text);
Stor.SetAttrValue("Content", TxtContent.Text);
Stor.SetAttrValue("Icon",MessageBoxIcon_str);
Stor.SetAttrValue("Btn", MessageBoxButtons_str);
Stor.SetAttrValue("Default_Btn", MessageBoxDefaultButton_str);
Stor.SetAttrValue("TopMost", ChkTopMost.Checked);
Stor.SaveToFile(Application.StartupPath + "\\UserDb\\MessageBox.xml");
this.DialogResult=DialogResult.OK;
}
private void InitResult()
{
for (int i = 0; i < GroupResult.Controls.Count; i++)
{
if (GroupResult.Controls[i] is CheckBox)
{
GroupResult.Controls[i].Enabled = false;
}
}
}
private void RbBtnOK_CheckedChanged(object sender, EventArgs e)
{
InitResult();
}
private void RbBtnOKCancel_CheckedChanged(object sender, EventArgs e)
{
InitResult();
RadioButton rb_btn = (RadioButton)sender;
if (rb_btn.Checked) { ChkResultOK.Enabled = true;ChkResultCancel.Enabled = true; }
}
private void RbBtnYesNo_CheckedChanged(object sender, EventArgs e)
{
InitResult();
RadioButton rb_btn = (RadioButton)sender;
if (rb_btn.Checked) { ChkResultYes.Enabled = true; ChkResultNo.Enabled = true; }
}
private void RbBtnYesNoCancel_CheckedChanged(object sender, EventArgs e)
{
InitResult();
RadioButton rb_btn = (RadioButton)sender;
if (rb_btn.Checked) { ChkResultYes.Enabled = true; ChkResultNo.Enabled = true;ChkResultCancel.Enabled = true; }
}
private void RbBtnRetryCancel_CheckedChanged(object sender, EventArgs e)
{
InitResult();
RadioButton rb_btn = (RadioButton)sender;
if (rb_btn.Checked) { ChkResultRetry.Enabled = true; ChkResultCancel.Enabled = true; }
}
private void RbBtnAbortRetryIgnore_CheckedChanged(object sender, EventArgs e)
{
InitResult();
RadioButton rb_btn = (RadioButton)sender;
if (rb_btn.Checked) { ChkResultAbort.Enabled = true; ChkResultRetry.Enabled = true; ChkResultIgnore.Enabled = true; }
}
private void FrmMessageBox_Load(object sender, EventArgs e)
{
LoadPram();
}
}
}
@@ -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>
+29
View File
@@ -0,0 +1,29 @@
using System;
using System.Collections.Generic;
using System.Text;
using System.Diagnostics;
using System.Drawing;
namespace XmlPad
{
public static class Globals
{
public static int InRange(int x, int lo, int hi)
{
Debug.Assert(lo <= hi);
return x < lo ? lo : (x > hi ? hi : x);
}
public static bool IsInRange(int x, int lo, int hi)
{
return (x >= lo) && (x <= hi);
}
public static Color HalfMix(Color one, Color two)
{
return Color.FromArgb(
(one.A + two.A) >> 1,
(one.R + two.R) >> 1,
(one.G + two.G) >> 1,
(one.B + two.B) >> 1);
}
}
}
+497
View File
@@ -0,0 +1,497 @@
using System;
using System.Collections.Generic;
using System.Text;
using System.Text.RegularExpressions;
namespace 开发辅助工具.Manager
{
/// <summary>
/// 汉字转拼音静态类,包括功能全拼和缩写,方法全部是静态的
/// </summary>
public static class Chinese2Spell
{
#region 属性数据定义
/// <summary>
/// 汉字的机内码数组
/// </summary>
private static int[] pyValue = new int[]
{
-20319,-20317,-20304,-20295,-20292,-20283,-20265,-20257,-20242,-20230,-20051,-20036,
-20032,-20026,-20002,-19990,-19986,-19982,-19976,-19805,-19784,-19775,-19774,-19763,
-19756,-19751,-19746,-19741,-19739,-19728,-19725,-19715,-19540,-19531,-19525,-19515,
-19500,-19484,-19479,-19467,-19289,-19288,-19281,-19275,-19270,-19263,-19261,-19249,
-19243,-19242,-19238,-19235,-19227,-19224,-19218,-19212,-19038,-19023,-19018,-19006,
-19003,-18996,-18977,-18961,-18952,-18783,-18774,-18773,-18763,-18756,-18741,-18735,
-18731,-18722,-18710,-18697,-18696,-18526,-18518,-18501,-18490,-18478,-18463,-18448,
-18447,-18446,-18239,-18237,-18231,-18220,-18211,-18201,-18184,-18183, -18181,-18012,
-17997,-17988,-17970,-17964,-17961,-17950,-17947,-17931,-17928,-17922,-17759,-17752,
-17733,-17730,-17721,-17703,-17701,-17697,-17692,-17683,-17676,-17496,-17487,-17482,
-17468,-17454,-17433,-17427,-17417,-17202,-17185,-16983,-16970,-16942,-16915,-16733,
-16708,-16706,-16689,-16664,-16657,-16647,-16474,-16470,-16465,-16459,-16452,-16448,
-16433,-16429,-16427,-16423,-16419,-16412,-16407,-16403,-16401,-16393,-16220,-16216,
-16212,-16205,-16202,-16187,-16180,-16171,-16169,-16158,-16155,-15959,-15958,-15944,
-15933,-15920,-15915,-15903,-15889,-15878,-15707,-15701,-15681,-15667,-15661,-15659,
-15652,-15640,-15631,-15625,-15454,-15448,-15436,-15435,-15419,-15416,-15408,-15394,
-15385,-15377,-15375,-15369,-15363,-15362,-15183,-15180,-15165,-15158,-15153,-15150,
-15149,-15144,-15143,-15141,-15140,-15139,-15128,-15121,-15119,-15117,-15110,-15109,
-14941,-14937,-14933,-14930,-14929,-14928,-14926,-14922,-14921,-14914,-14908,-14902,
-14894,-14889,-14882,-14873,-14871,-14857,-14678,-14674,-14670,-14668,-14663,-14654,
-14645,-14630,-14594,-14429,-14407,-14399,-14384,-14379,-14368,-14355,-14353,-14345,
-14170,-14159,-14151,-14149,-14145,-14140,-14137,-14135,-14125,-14123,-14122,-14112,
-14109,-14099,-14097,-14094,-14092,-14090,-14087,-14083,-13917,-13914,-13910,-13907,
-13906,-13905,-13896,-13894,-13878,-13870,-13859,-13847,-13831,-13658,-13611,-13601,
-13406,-13404,-13400,-13398,-13395,-13391,-13387,-13383,-13367,-13359,-13356,-13343,
-13340,-13329,-13326,-13318,-13147,-13138,-13120,-13107,-13096,-13095,-13091,-13076,
-13068,-13063,-13060,-12888,-12875,-12871,-12860,-12858,-12852,-12849,-12838,-12831,
-12829,-12812,-12802,-12607,-12597,-12594,-12585,-12556,-12359,-12346,-12320,-12300,
-12120,-12099,-12089,-12074,-12067,-12058,-12039,-11867,-11861,-11847,-11831,-11798,
-11781,-11604,-11589,-11536,-11358,-11340,-11339,-11324,-11303,-11097,-11077,-11067,
-11055,-11052,-11045,-11041,-11038,-11024,-11020,-11019,-11018,-11014,-10838,-10832,
-10815,-10800,-10790,-10780,-10764,-10587,-10544,-10533,-10519,-10331,-10329,-10328,
-10322,-10315,-10309,-10307,-10296,-10281,-10274,-10270,-10262,-10260,-10256,-10254
};
/// <summary>
/// 机内码对应的拼音数组
/// </summary>
private static string[] pyName = new string[]
{
"A","Ai","An","Ang","Ao","Ba","Bai","Ban","Bang","Bao","Bei","Ben",
"Beng","Bi","Bian","Biao","Bie","Bin","Bing","Bo","Bu","Ba","Cai","Can",
"Cang","Cao","Ce","Ceng","Cha","Chai","Chan","Chang","Chao","Che","Chen","Cheng",
"Chi","Chong","Chou","Chu","Chuai","Chuan","Chuang","Chui","Chun","Chuo","Ci","Cong",
"Cou","Cu","Cuan","Cui","Cun","Cuo","Da","Dai","Dan","Dang","Dao","De",
"Deng","Di","Dian","Diao","Die","Ding","Diu","Dong","Dou","Du","Duan","Dui",
"Dun","Duo","E","En","Er","Fa","Fan","Fang","Fei","Fen","Feng","Fo",
"Fou","Fu","Ga","Gai","Gan","Gang","Gao","Ge","Gei","Gen","Geng","Gong",
"Gou","Gu","Gua","Guai","Guan","Guang","Gui","Gun","Guo","Ha","Hai","Han",
"Hang","Hao","He","Hei","Hen","Heng","Hong","Hou","Hu","Hua","Huai","Huan",
"Huang","Hui","Hun","Huo","Ji","Jia","Jian","Jiang","Jiao","Jie","Jin","Jing",
"Jiong","Jiu","Ju","Juan","Jue","Jun","Ka","Kai","Kan","Kang","Kao","Ke",
"Ken","Keng","Kong","Kou","Ku","Kua","Kuai","Kuan","Kuang","Kui","Kun","Kuo",
"La","Lai","Lan","Lang","Lao","Le","Lei","Leng","Li","Lia","Lian","Liang",
"Liao","Lie","Lin","Ling","Liu","Long","Lou","Lu","Lv","Luan","Lue","Lun",
"Luo","Ma","Mai","Man","Mang","Mao","Me","Mei","Men","Meng","Mi","Mian",
"Miao","Mie","Min","Ming","Miu","Mo","Mou","Mu","Na","Nai","Nan","Nang",
"Nao","Ne","Nei","Nen","Neng","Ni","Nian","Niang","Niao","Nie","Nin","Ning",
"Niu","Nong","Nu","Nv","Nuan","Nue","Nuo","O","Ou","Pa","Pai","Pan",
"Pang","Pao","Pei","Pen","Peng","Pi","Pian","Piao","Pie","Pin","Ping","Po",
"Pu","Qi","Qia","Qian","Qiang","Qiao","Qie","Qin","Qing","Qiong","Qiu","Qu",
"Quan","Que","Qun","Ran","Rang","Rao","Re","Ren","Reng","Ri","Rong","Rou",
"Ru","Ruan","Rui","Run","Ruo","Sa","Sai","San","Sang","Sao","Se","Sen",
"Seng","Sha","Shai","Shan","Shang","Shao","She","Shen","Sheng","Shi","Shou","Shu",
"Shua","Shuai","Shuan","Shuang","Shui","Shun","Shuo","Si","Song","Sou","Su","Suan",
"Sui","Sun","Suo","Ta","Tai","Tan","Tang","Tao","Te","Teng","Ti","Tian",
"Tiao","Tie","Ting","Tong","Tou","Tu","Tuan","Tui","Tun","Tuo","Wa","Wai",
"Wan","Wang","Wei","Wen","Weng","Wo","Wu","Xi","Xia","Xian","Xiang","Xiao",
"Xie","Xin","Xing","Xiong","Xiu","Xu","Xuan","Xue","Xun","Ya","Yan","Yang",
"Yao","Ye","Yi","Yin","Ying","Yo","Yong","You","Yu","Yuan","Yue","Yun",
"Za", "Zai","Zan","Zang","Zao","Ze","Zei","Zen","Zeng","Zha","Zhai","Zhan",
"Zhang","Zhao","Zhe","Zhen","Zheng","Zhi","Zhong","Zhou","Zhu","Zhua","Zhuai","Zhuan",
"Zhuang","Zhui","Zhun","Zhuo","Zi","Zong","Zou","Zu","Zuan","Zui","Zun","Zuo"
};
#endregion
#region 把汉字转换成拼音(全拼)无间隔符号
/// <summary>
/// 把汉字转换成拼音(全拼)
/// </summary>
/// <param name="hzString">汉字字符串</param>
/// <returns>转换后的拼音(全拼)字符串</returns>
public static string Convert(string hzString)
{
// 匹配中文字符
Regex regex = new Regex("^[\\u4e00-\\u9fa5]$");
byte[] array = new byte[2];
string pyString = "";
int chrAsc = 0;
int i1 = 0;
int i2 = 0;
char[] noWChar = hzString.ToCharArray();
for (int j = 0; j < noWChar.Length; j++)
{
// 中文字符
if (regex.IsMatch(noWChar[j].ToString()))
{
array = System.Text.Encoding.Default.GetBytes(noWChar[j].ToString());
i1 = (short)(array[0]);
i2 = (short)(array[1]);
chrAsc = i1 * 256 + i2 - 65536;
if (chrAsc > 0 && chrAsc < 160)
{
pyString += noWChar[j];
}
else
{
// 修正部分文字
if (chrAsc == -9254) // 修正“圳”字
pyString += "Zhen";
else
{
for (int i = (pyValue.Length - 1); i >= 0; i--)
{
if (pyValue[i] <= chrAsc)
{
pyString += pyName[i];
break;
}
}
}
}
}
// 非中文字符
else
{
pyString += noWChar[j].ToString();
}
}
return pyString;
}
#endregion
#region 把汉字转换成拼音(全拼) 用空格间隔
/// <summary>
/// 把汉字转换成拼音(全拼)
/// </summary>
/// <param name="hzString">汉字字符串</param>
/// <returns>转换后的拼音(全拼)字符串</returns>
public static string ConvertWithBlank(string hzString)
{
// 匹配中文字符
Regex regex = new Regex("^[u4e00-u9fa5]$");
byte[] array = new byte[2];
string pyString = "";
int chrAsc = 0;
int i1 = 0;
int i2 = 0;
char[] noWChar = hzString.ToCharArray();
for (int j = 0; j < noWChar.Length; j++)
{
// 中文字符
if (regex.IsMatch(noWChar[j].ToString()))
{
array = System.Text.Encoding.Default.GetBytes(noWChar[j].ToString());
i1 = (short)(array[0]);
i2 = (short)(array[1]);
chrAsc = i1 * 256 + i2 - 65536;
if (chrAsc > 0 && chrAsc < 160)
{
pyString = pyString + " " + noWChar[j];
}
else
{
// 修正部分文字
if (chrAsc == -9254) // 修正“圳”字
pyString = pyString + " " + "Zhen";
else
{
for (int i = (pyValue.Length - 1); i >= 0; i--)
{
if (pyValue[i] <= chrAsc)
{
pyString = pyString + " " + pyName[i];
break;
}
}
}
}
}
// 非中文字符
else
{
pyString = pyString + " " + noWChar[j].ToString();
}
}
return pyString.Trim();
}
#endregion
#region 把汉字转换成拼音(全拼)无间隔符号
/// <summary>
/// 把汉字转换成拼音(全拼)
/// </summary>
/// <param name="hzString">汉字字符串</param>
/// <returns>转换后的拼音(全拼)字符串</returns>
public static string ConvertFirstPY(string hzString)
{
// 匹配中文字符
Regex regex = new Regex("^[\\u4e00-\\u9fa5]$");
byte[] array = new byte[2];
string pyString = "";
int chrAsc = 0;
int i1 = 0;
int i2 = 0;
char[] noWChar = hzString.ToCharArray();
for (int j = 0; j < noWChar.Length; j++)
{
// 中文字符
if (regex.IsMatch(noWChar[j].ToString()))
{
array = System.Text.Encoding.Default.GetBytes(noWChar[j].ToString());
i1 = (short)(array[0]);
i2 = (short)(array[1]);
chrAsc = i1 * 256 + i2 - 65536;
if (chrAsc > 0 && chrAsc < 160)
{
pyString += noWChar[j];
}
else
{
// 修正部分文字
if (chrAsc == -9254) // 修正“圳”字
pyString += "z";
else
{
for (int i = (pyValue.Length - 1); i >= 0; i--)
{
if (pyValue[i] <= chrAsc)
{
pyString += pyName[i].Substring(0,1);
break;
}
}
}
}
}
// 非中文字符
else
{
pyString += noWChar[j].ToString();
}
}
return pyString;
}
#endregion
#region 把汉字转换成拼音(全拼) 用特定的字符间隔
/// <summary>
/// 把汉字转换成拼音(全拼)
/// </summary>
/// <param name="hzString">汉字字符串</param>
/// <returns>转换后的拼音(全拼)字符串</returns>
public static string ConvertWithSplitChar(string hzString, string splitChar)
{
// 匹配中文字符
Regex regex = new Regex("^[\\u4e00-\\u9fa5]$");
byte[] array = new byte[2];
string pyString = "";
int chrAsc = 0;
int i1 = 0;
int i2 = 0;
char[] noWChar = hzString.ToCharArray();
for (int j = 0; j < noWChar.Length; j++)
{
// 中文字符
if (regex.IsMatch(noWChar[j].ToString()))
{
array = System.Text.Encoding.Default.GetBytes(noWChar[j].ToString());
i1 = (short)(array[0]);
i2 = (short)(array[1]);
chrAsc = i1 * 256 + i2 - 65536;
if (chrAsc > 0 && chrAsc < 160)
{
pyString = pyString + splitChar + noWChar[j];
}
else
{
// 修正部分文字
if (chrAsc == -9254) // 修正“圳”字
pyString = pyString + splitChar + "Zhen";
else
{
for (int i = (pyValue.Length - 1); i >= 0; i--)
{
if (pyValue[i] <= chrAsc)
{
pyString = pyString + splitChar + pyName[i];
break;
}
}
}
}
}
// 非中文字符
else
{
pyString = pyString + splitChar + noWChar[j].ToString();
}
}
char[] trimAChar = splitChar.ToCharArray();
return pyString.TrimStart(trimAChar);
}
#endregion
#region 汉字转拼音缩写 (字符串) (小写)
/// <summary>
/// 汉字转拼音缩写
/// </summary>
/// <param name="str">要转换的汉字字符串</param>
/// <returns>拼音缩写</returns>
public static string GetSpellStringLower(string str)
{
string tempStr = "";
foreach (char c in str)
{
if ((int)c >= 33 && (int)c <= 126)
{
//字母和符号原样保留
tempStr += c.ToString();
}
else
{
//累加拼音声母
tempStr += GetSpellCharLower(c.ToString());
}
}
return tempStr;
}
#endregion
#region 汉字转拼音缩写 (字符串) (小写) (空格间隔)
/// <summary>
/// 汉字转拼音缩写 (字符串) (小写) (空格间隔)
/// </summary>
/// <param name="str">要转换的汉字字符串</param>
/// <returns>拼音缩写</returns>
public static string GetSpellStringLowerSplitWithBlank(string str)
{
string tempStr = "";
foreach (char c in str)
{
if ((int)c >= 33 && (int)c <= 126)
{
//字母和符号原样保留
tempStr = tempStr + " " + c.ToString();
}
else
{
//累加拼音声母
tempStr = tempStr + " " + GetSpellCharLower(c.ToString());
}
}
return tempStr.Trim();
}
#endregion
#region 汉字转拼音缩写 (字符串)(大写)
/// <summary>
/// 汉字转拼音缩写 (大写)
/// </summary>
/// <param name="str">要转换的汉字字符串</param>
/// <returns>拼音缩写</returns>
public static string GetSpellStringSupper(string str)
{
string tempStr = "";
foreach (char c in str)
{
if ((int)c >= 33 && (int)c <= 126)
{
//字母和符号原样保留
tempStr += c.ToString();
}
else
{
//累加拼音声母
tempStr += GetSpellCharSupper(c.ToString());
}
}
return tempStr;
}
#endregion
#region 汉字转拼音缩写 (字符串)(大写)(空格间隔)
/// <summary>
/// 汉字转拼音缩写 (字符串)(大写)(空格间隔)
/// </summary>
/// <param name="str">要转换的汉字字符串</param>
/// <returns>拼音缩写</returns>
public static string GetSpellStringSupperSplitWithBlank(string str)
{
string tempStr = "";
foreach (char c in str)
{
if ((int)c >= 33 && (int)c <= 126)
{
//字母和符号原样保留
tempStr = tempStr + " " + c.ToString();
}
else
{
//累加拼音声母
tempStr = tempStr + " " + GetSpellCharSupper(c.ToString());
}
}
return tempStr.Trim();
}
#endregion
#region 取单个字符的拼音声母(字符)(大写)
/// <summary>
/// 取单个字符的拼音声母
/// </summary>
/// <param name="c">要转换的单个汉字</param>
/// <returns>拼音声母</returns>
public static string GetSpellCharSupper(string c)
{
byte[] array = new byte[2];
array = System.Text.Encoding.Default.GetBytes(c);
int i = (short)(array[0] - '0') * 256 + ((short)(array[1] - '0'));
if (i < 0xB0A1) return c;
if (i < 0xB0C5) return "A";
if (i < 0xB2C1) return "B";
if (i < 0xB4EE) return "C";
if (i < 0xB6EA) return "D";
if (i < 0xB7A2) return "E";
if (i < 0xB8C1) return "F";
if (i < 0xB9FE) return "G";
if (i < 0xBBF7) return "H";
if (i < 0xBFA6) return "J";
if (i < 0xC0AC) return "K";
if (i < 0xC2E8) return "L";
if (i < 0xC4C3) return "M";
if (i < 0xC5B6) return "N";
if (i < 0xC5BE) return "O";
if (i < 0xC6DA) return "P";
if (i < 0xC8BB) return "Q";
if (i < 0xC8F6) return "R";
if (i < 0xCBFA) return "S";
if (i < 0xCDDA) return "T";
if (i < 0xCEF4) return "W";
if (i < 0xD1B9) return "X";
if (i < 0xD4D1) return "Y";
if (i < 0xD7FA) return "Z";
return c;
}
#endregion
#region 取单个字符的拼音声母(字符)(小写)
/// <summary>
/// 取单个字符的拼音声母
/// </summary>
/// <param name="c">要转换的单个汉字</param>
/// <returns>拼音声母</returns>
public static string GetSpellCharLower(string c)
{
byte[] array = new byte[2];
array = System.Text.Encoding.Default.GetBytes(c);
if (array.Length <= 1) { return ""; }
int i = (short)(array[0] - '0') * 256 + ((short)(array[1] - '0'));
if (i < 0xB0A1) return c;
if (i < 0xB0C5) return "a";
if (i < 0xB2C1) return "b";
if (i < 0xB4EE) return "c";
if (i < 0xB6EA) return "d";
if (i < 0xB7A2) return "e";
if (i < 0xB8C1) return "f";
if (i < 0xB9FE) return "g";
if (i < 0xBBF7) return "h";
if (i < 0xBFA6) return "j";
if (i < 0xC0AC) return "k";
if (i < 0xC2E8) return "l";
if (i < 0xC4C3) return "m";
if (i < 0xC5B6) return "n";
if (i < 0xC5BE) return "o";
if (i < 0xC6DA) return "p";
if (i < 0xC8BB) return "q";
if (i < 0xC8F6) return "r";
if (i < 0xCBFA) return "s";
if (i < 0xCDDA) return "t";
if (i < 0xCEF4) return "w";
if (i < 0xD1B9) return "x";
if (i < 0xD4D1) return "y";
if (i < 0xD7FA) return "z";
return c;
}
#endregion
}
}
+245
View File
@@ -0,0 +1,245 @@
namespace 开发辅助工具.Manager
{
partial class FrmAddTools
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.label1 = new System.Windows.Forms.Label();
this.TxtName = new ryControls.TextBoxEx2();
this.TxtToolAddr = new ryControls.TextBoxEx2();
this.label2 = new System.Windows.Forms.Label();
this.TxtToolDes = new ryControls.TextBoxEx2();
this.label3 = new System.Windows.Forms.Label();
this.label4 = new System.Windows.Forms.Label();
this.TxtKeys = new ryControls.TextBoxEx2();
this.btnCancel = new ryControls.ButtonEx();
this.btnOK = new ryControls.ButtonEx();
this.label5 = new System.Windows.Forms.Label();
this.numericUpDownEx1 = new ryControls.NumericUpDownEx();
((System.ComponentModel.ISupportInitialize)(this.numericUpDownEx1)).BeginInit();
this.SuspendLayout();
//
// label1
//
this.label1.AutoSize = true;
this.label1.Location = new System.Drawing.Point(14, 9);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(53, 12);
this.label1.TabIndex = 0;
this.label1.Text = "工具名称";
//
// TxtName
//
this.TxtName.BackColor = System.Drawing.Color.White;
this.TxtName.EmptyText = "";
this.TxtName.Location = new System.Drawing.Point(14, 27);
this.TxtName.MaxLength = 999999999;
this.TxtName.Multiline = false;
this.TxtName.Name = "TxtName";
this.TxtName.OnlyNumeric = false;
this.TxtName.PasswordChar = '\0';
this.TxtName.ReadOnly = false;
this.TxtName.SelectedText = "";
this.TxtName.SelectionLength = 0;
this.TxtName.SelectionStart = 0;
this.TxtName.Size = new System.Drawing.Size(344, 24);
this.TxtName.TabIndex = 1;
this.TxtName.TextAlign = System.Windows.Forms.HorizontalAlignment.Left;
this.TxtName.ToolTip = "";
//
// TxtToolAddr
//
this.TxtToolAddr.BackColor = System.Drawing.Color.White;
this.TxtToolAddr.EmptyText = "";
this.TxtToolAddr.Location = new System.Drawing.Point(16, 74);
this.TxtToolAddr.MaxLength = 999999999;
this.TxtToolAddr.Multiline = false;
this.TxtToolAddr.Name = "TxtToolAddr";
this.TxtToolAddr.OnlyNumeric = false;
this.TxtToolAddr.PasswordChar = '\0';
this.TxtToolAddr.ReadOnly = false;
this.TxtToolAddr.SelectedText = "";
this.TxtToolAddr.SelectionLength = 0;
this.TxtToolAddr.SelectionStart = 0;
this.TxtToolAddr.Size = new System.Drawing.Size(430, 24);
this.TxtToolAddr.TabIndex = 3;
this.TxtToolAddr.TextAlign = System.Windows.Forms.HorizontalAlignment.Left;
this.TxtToolAddr.ToolTip = "";
//
// label2
//
this.label2.AutoSize = true;
this.label2.Location = new System.Drawing.Point(16, 56);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(53, 12);
this.label2.TabIndex = 2;
this.label2.Text = "工具地址";
//
// TxtToolDes
//
this.TxtToolDes.BackColor = System.Drawing.Color.White;
this.TxtToolDes.EmptyText = "";
this.TxtToolDes.Location = new System.Drawing.Point(16, 118);
this.TxtToolDes.MaxLength = 999999999;
this.TxtToolDes.Multiline = false;
this.TxtToolDes.Name = "TxtToolDes";
this.TxtToolDes.OnlyNumeric = false;
this.TxtToolDes.PasswordChar = '\0';
this.TxtToolDes.ReadOnly = false;
this.TxtToolDes.SelectedText = "";
this.TxtToolDes.SelectionLength = 0;
this.TxtToolDes.SelectionStart = 0;
this.TxtToolDes.Size = new System.Drawing.Size(430, 24);
this.TxtToolDes.TabIndex = 5;
this.TxtToolDes.TextAlign = System.Windows.Forms.HorizontalAlignment.Left;
this.TxtToolDes.ToolTip = "";
//
// label3
//
this.label3.AutoSize = true;
this.label3.Location = new System.Drawing.Point(16, 100);
this.label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(53, 12);
this.label3.TabIndex = 4;
this.label3.Text = "工具备注";
//
// label4
//
this.label4.AutoSize = true;
this.label4.Location = new System.Drawing.Point(16, 145);
this.label4.Name = "label4";
this.label4.Size = new System.Drawing.Size(41, 12);
this.label4.TabIndex = 6;
this.label4.Text = "关键词";
//
// TxtKeys
//
this.TxtKeys.BackColor = System.Drawing.Color.White;
this.TxtKeys.EmptyText = "";
this.TxtKeys.Location = new System.Drawing.Point(16, 160);
this.TxtKeys.MaxLength = 999999999;
this.TxtKeys.Multiline = false;
this.TxtKeys.Name = "TxtKeys";
this.TxtKeys.OnlyNumeric = false;
this.TxtKeys.PasswordChar = '\0';
this.TxtKeys.ReadOnly = false;
this.TxtKeys.SelectedText = "";
this.TxtKeys.SelectionLength = 0;
this.TxtKeys.SelectionStart = 0;
this.TxtKeys.Size = new System.Drawing.Size(430, 24);
this.TxtKeys.TabIndex = 7;
this.TxtKeys.TextAlign = System.Windows.Forms.HorizontalAlignment.Left;
this.TxtKeys.ToolTip = "";
//
// btnCancel
//
this.btnCancel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.btnCancel.ForeColor = System.Drawing.Color.White;
this.btnCancel.Location = new System.Drawing.Point(383, 323);
this.btnCancel.Name = "btnCancel";
this.btnCancel.Size = new System.Drawing.Size(65, 27);
this.btnCancel.TabIndex = 9;
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.ForeColor = System.Drawing.Color.White;
this.btnOK.Location = new System.Drawing.Point(312, 323);
this.btnOK.Name = "btnOK";
this.btnOK.Size = new System.Drawing.Size(65, 27);
this.btnOK.TabIndex = 8;
this.btnOK.Text = "确定";
this.btnOK.UseVisualStyleBackColor = true;
this.btnOK.Click += new System.EventHandler(this.BtnOK_Click);
//
// label5
//
this.label5.AutoSize = true;
this.label5.Location = new System.Drawing.Point(362, 9);
this.label5.Name = "label5";
this.label5.Size = new System.Drawing.Size(29, 12);
this.label5.TabIndex = 10;
this.label5.Text = "排序";
//
// numericUpDownEx1
//
this.numericUpDownEx1.BorderStyle = System.Windows.Forms.BorderStyle.None;
this.numericUpDownEx1.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.numericUpDownEx1.Location = new System.Drawing.Point(364, 28);
this.numericUpDownEx1.Maximum = new decimal(new int[] {
100000,
0,
0,
0});
this.numericUpDownEx1.Name = "numericUpDownEx1";
this.numericUpDownEx1.Size = new System.Drawing.Size(81, 22);
this.numericUpDownEx1.TabIndex = 11;
//
// FrmAddTools
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(456, 362);
this.Controls.Add(this.numericUpDownEx1);
this.Controls.Add(this.label5);
this.Controls.Add(this.btnCancel);
this.Controls.Add(this.btnOK);
this.Controls.Add(this.TxtKeys);
this.Controls.Add(this.label4);
this.Controls.Add(this.TxtToolDes);
this.Controls.Add(this.label3);
this.Controls.Add(this.TxtToolAddr);
this.Controls.Add(this.label2);
this.Controls.Add(this.TxtName);
this.Controls.Add(this.label1);
this.Name = "FrmAddTools";
this.Text = "添加工具";
((System.ComponentModel.ISupportInitialize)(this.numericUpDownEx1)).EndInit();
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
private System.Windows.Forms.Label label1;
private ryControls.TextBoxEx2 TxtName;
private ryControls.TextBoxEx2 TxtToolAddr;
private System.Windows.Forms.Label label2;
private ryControls.TextBoxEx2 TxtToolDes;
private System.Windows.Forms.Label label3;
private System.Windows.Forms.Label label4;
private ryControls.TextBoxEx2 TxtKeys;
private ryControls.ButtonEx btnCancel;
private ryControls.ButtonEx btnOK;
private System.Windows.Forms.Label label5;
private ryControls.NumericUpDownEx numericUpDownEx1;
}
}
@@ -0,0 +1,85 @@
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;
namespace 开发辅助工具.Manager
{
public partial class FrmAddTools : Form
{
public FrmAddTools()
{
InitializeComponent();
}
public ModalForm mr = null;
public string tableName = "Tools";
public int isAdd = 1;
public string selectId = "-1";
private void BtnCancel_Click(object sender, EventArgs e)
{
ModalForm.SetDialogResult(this, mr, DialogResult.Cancel);
}
#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.Sys_SQLConn) == 1)
{
DataSet ds = db.ReadData(tableName, id);
if (mydb.HaveData(ds))
{
DataRow reader = ds.Tables[0].Rows[0];
#region 读取信息
TxtName.Text = reader["Name"].ToString();
TxtKeys.Text = reader["Keys"].ToString();
TxtToolAddr.Text = reader["Addr"].ToString();
TxtToolDes.Text = reader["Des"].ToString();
numericUpDownEx1.Value = reader["Sort"].ToDecimal();
#endregion
}
}
db.Free();
}
private void BtnOK_Click(object sender, EventArgs e)
{
if (TxtName.Text == "")
{
MessageBox.Show("名称不能为空。", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
return;
}
RyQuickSQL mySQL = new RyQuickSQL(tableName);
mySQL.AddField("Name", TxtName.Text);
mySQL.AddField("Keys", TxtKeys.Text);
mySQL.AddField("Addr", TxtToolAddr.Text);
mySQL.AddField("Des", TxtToolDes.Text);
mySQL.AddField("Sort", numericUpDownEx1.Value.ToInt());
mySQL.AddField("PY", Chinese2Spell.Convert(TxtName.Text + "\n" + TxtKeys.Text)+"\n"+ Chinese2Spell.ConvertFirstPY(TxtName.Text + "\n" + TxtKeys.Text));
DataProvider mydb = new DataProvider();
IDbInterface db = Itrycn_Db.CreateDataProvider(Itrycn_Db.dataType);
if (db.ConnDb(Itrycn_Db.Sys_SQLConn) == 1)
{
if (isAdd >= 1)
{
db.ExecuteNonQuery(mySQL.GetInsertSQL(), db.GetParameter(mySQL));
}
else
{
db.ExecuteNonQuery(mySQL.GetUpdateSQL() + " where id=" + selectId, db.GetParameter(mySQL));
}
}
ModalForm.SetDialogResult(this, mr, DialogResult.OK);
}
#endregion
}
}
@@ -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>
+344
View File
@@ -0,0 +1,344 @@
namespace 开发辅助工具.Manager
{
partial class FrmSetting
{
/// <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();
this.tabControl1 = new System.Windows.Forms.TabControl();
this.tabPage1 = new System.Windows.Forms.TabPage();
this.BtnWinRARPath = new ryControls.ButtonEx();
this.TxtWinRARPath = new ryControls.TextBoxEx2();
this.label4 = new System.Windows.Forms.Label();
this.BtnReactorPath = new ryControls.ButtonEx();
this.TxtReactorPath = new ryControls.TextBoxEx2();
this.label3 = new System.Windows.Forms.Label();
this.TxtReferenceDll = new ryControls.TextBoxEx2();
this.label2 = new System.Windows.Forms.Label();
this.BtnChapeBasePath = new ryControls.ButtonEx();
this.TxtCshapeBasePath = new ryControls.TextBoxEx2();
this.label1 = new System.Windows.Forms.Label();
this.BtnOK = new ryControls.ButtonEx();
this.BtnCancel = new ryControls.ButtonEx();
this.folderBrowserDialog1 = new System.Windows.Forms.FolderBrowserDialog();
this.toolTip1 = new System.Windows.Forms.ToolTip(this.components);
this.tabPage2 = new System.Windows.Forms.TabPage();
this.ChkAss_Ryp = new System.Windows.Forms.CheckBox();
this.ChkAss_Folder = new System.Windows.Forms.CheckBox();
this.tabControl1.SuspendLayout();
this.tabPage1.SuspendLayout();
this.tabPage2.SuspendLayout();
this.SuspendLayout();
//
// tabControl1
//
this.tabControl1.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.tabControl1.Controls.Add(this.tabPage1);
this.tabControl1.Controls.Add(this.tabPage2);
this.tabControl1.Location = new System.Drawing.Point(3, 2);
this.tabControl1.Name = "tabControl1";
this.tabControl1.SelectedIndex = 0;
this.tabControl1.Size = new System.Drawing.Size(606, 399);
this.tabControl1.TabIndex = 0;
//
// tabPage1
//
this.tabPage1.Controls.Add(this.BtnWinRARPath);
this.tabPage1.Controls.Add(this.TxtWinRARPath);
this.tabPage1.Controls.Add(this.label4);
this.tabPage1.Controls.Add(this.BtnReactorPath);
this.tabPage1.Controls.Add(this.TxtReactorPath);
this.tabPage1.Controls.Add(this.label3);
this.tabPage1.Controls.Add(this.TxtReferenceDll);
this.tabPage1.Controls.Add(this.label2);
this.tabPage1.Controls.Add(this.BtnChapeBasePath);
this.tabPage1.Controls.Add(this.TxtCshapeBasePath);
this.tabPage1.Controls.Add(this.label1);
this.tabPage1.Location = new System.Drawing.Point(4, 22);
this.tabPage1.Name = "tabPage1";
this.tabPage1.Padding = new System.Windows.Forms.Padding(3);
this.tabPage1.Size = new System.Drawing.Size(598, 373);
this.tabPage1.TabIndex = 0;
this.tabPage1.Text = "路径";
this.tabPage1.UseVisualStyleBackColor = true;
//
// BtnWinRARPath
//
this.BtnWinRARPath.BaseColor = System.Drawing.Color.FromArgb(((int)(((byte)(51)))), ((int)(((byte)(76)))), ((int)(((byte)(95)))));
this.BtnWinRARPath.Location = new System.Drawing.Point(515, 321);
this.BtnWinRARPath.Name = "BtnWinRARPath";
this.BtnWinRARPath.Size = new System.Drawing.Size(69, 27);
this.BtnWinRARPath.TabIndex = 10;
this.BtnWinRARPath.Text = "浏览";
this.BtnWinRARPath.UseVisualStyleBackColor = true;
this.BtnWinRARPath.Click += new System.EventHandler(this.BtnWinRARPath_Click);
//
// TxtWinRARPath
//
this.TxtWinRARPath.BackColor = System.Drawing.Color.White;
this.TxtWinRARPath.EmptyText = "";
this.TxtWinRARPath.Location = new System.Drawing.Point(14, 321);
this.TxtWinRARPath.MaxLength = 999999999;
this.TxtWinRARPath.Multiline = false;
this.TxtWinRARPath.Name = "TxtWinRARPath";
this.TxtWinRARPath.OnlyNumeric = false;
this.TxtWinRARPath.PasswordChar = '\0';
this.TxtWinRARPath.ReadOnly = false;
this.TxtWinRARPath.SelectedText = "";
this.TxtWinRARPath.SelectionLength = 0;
this.TxtWinRARPath.SelectionStart = 0;
this.TxtWinRARPath.Size = new System.Drawing.Size(495, 27);
this.TxtWinRARPath.TabIndex = 9;
this.TxtWinRARPath.TextAlign = System.Windows.Forms.HorizontalAlignment.Left;
this.TxtWinRARPath.ToolTip = "";
this.toolTip1.SetToolTip(this.TxtWinRARPath, ".NET Reactor 主程序exe的具体路径");
this.TxtWinRARPath.WordWrap = true;
//
// label4
//
this.label4.AutoSize = true;
this.label4.Location = new System.Drawing.Point(12, 306);
this.label4.Name = "label4";
this.label4.Size = new System.Drawing.Size(101, 12);
this.label4.TabIndex = 8;
this.label4.Text = "WinRAR主程序路径";
//
// BtnReactorPath
//
this.BtnReactorPath.BaseColor = System.Drawing.Color.FromArgb(((int)(((byte)(51)))), ((int)(((byte)(76)))), ((int)(((byte)(95)))));
this.BtnReactorPath.Location = new System.Drawing.Point(515, 272);
this.BtnReactorPath.Name = "BtnReactorPath";
this.BtnReactorPath.Size = new System.Drawing.Size(69, 27);
this.BtnReactorPath.TabIndex = 7;
this.BtnReactorPath.Text = "浏览";
this.BtnReactorPath.UseVisualStyleBackColor = true;
this.BtnReactorPath.Click += new System.EventHandler(this.BtnReactorPath_Click);
//
// TxtReactorPath
//
this.TxtReactorPath.BackColor = System.Drawing.Color.White;
this.TxtReactorPath.EmptyText = "";
this.TxtReactorPath.Location = new System.Drawing.Point(14, 272);
this.TxtReactorPath.MaxLength = 999999999;
this.TxtReactorPath.Multiline = false;
this.TxtReactorPath.Name = "TxtReactorPath";
this.TxtReactorPath.OnlyNumeric = false;
this.TxtReactorPath.PasswordChar = '\0';
this.TxtReactorPath.ReadOnly = false;
this.TxtReactorPath.SelectedText = "";
this.TxtReactorPath.SelectionLength = 0;
this.TxtReactorPath.SelectionStart = 0;
this.TxtReactorPath.Size = new System.Drawing.Size(495, 27);
this.TxtReactorPath.TabIndex = 6;
this.TxtReactorPath.TextAlign = System.Windows.Forms.HorizontalAlignment.Left;
this.TxtReactorPath.ToolTip = "";
this.toolTip1.SetToolTip(this.TxtReactorPath, ".NET Reactor 主程序exe的具体路径");
this.TxtReactorPath.WordWrap = true;
//
// label3
//
this.label3.AutoSize = true;
this.label3.Location = new System.Drawing.Point(12, 257);
this.label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(143, 12);
this.label3.TabIndex = 5;
this.label3.Text = ".NET Reactor 主程序路径";
//
// TxtReferenceDll
//
this.TxtReferenceDll.BackColor = System.Drawing.Color.White;
this.TxtReferenceDll.EmptyText = "";
this.TxtReferenceDll.Location = new System.Drawing.Point(14, 69);
this.TxtReferenceDll.MaxLength = 999999999;
this.TxtReferenceDll.Multiline = true;
this.TxtReferenceDll.Name = "TxtReferenceDll";
this.TxtReferenceDll.OnlyNumeric = false;
this.TxtReferenceDll.PasswordChar = '\0';
this.TxtReferenceDll.ReadOnly = false;
this.TxtReferenceDll.SelectedText = "";
this.TxtReferenceDll.SelectionLength = 0;
this.TxtReferenceDll.SelectionStart = 0;
this.TxtReferenceDll.Size = new System.Drawing.Size(570, 181);
this.TxtReferenceDll.TabIndex = 4;
this.TxtReferenceDll.TextAlign = System.Windows.Forms.HorizontalAlignment.Left;
this.TxtReferenceDll.ToolTip = "";
this.toolTip1.SetToolTip(this.TxtReferenceDll, "每行一个路径,软件将自动从上往下搜索");
this.TxtReferenceDll.WordWrap = true;
//
// label2
//
this.label2.AutoSize = true;
this.label2.Location = new System.Drawing.Point(12, 54);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(89, 12);
this.label2.TabIndex = 3;
this.label2.Text = "C# 引用dll路径";
//
// BtnChapeBasePath
//
this.BtnChapeBasePath.BaseColor = System.Drawing.Color.FromArgb(((int)(((byte)(51)))), ((int)(((byte)(76)))), ((int)(((byte)(95)))));
this.BtnChapeBasePath.Location = new System.Drawing.Point(515, 22);
this.BtnChapeBasePath.Name = "BtnChapeBasePath";
this.BtnChapeBasePath.Size = new System.Drawing.Size(69, 27);
this.BtnChapeBasePath.TabIndex = 2;
this.BtnChapeBasePath.Text = "浏览";
this.BtnChapeBasePath.UseVisualStyleBackColor = true;
this.BtnChapeBasePath.Click += new System.EventHandler(this.BtnChapeBasePath_Click);
//
// TxtCshapeBasePath
//
this.TxtCshapeBasePath.BackColor = System.Drawing.Color.White;
this.TxtCshapeBasePath.EmptyText = "";
this.TxtCshapeBasePath.Location = new System.Drawing.Point(14, 22);
this.TxtCshapeBasePath.MaxLength = 999999999;
this.TxtCshapeBasePath.Multiline = false;
this.TxtCshapeBasePath.Name = "TxtCshapeBasePath";
this.TxtCshapeBasePath.OnlyNumeric = false;
this.TxtCshapeBasePath.PasswordChar = '\0';
this.TxtCshapeBasePath.ReadOnly = false;
this.TxtCshapeBasePath.SelectedText = "";
this.TxtCshapeBasePath.SelectionLength = 0;
this.TxtCshapeBasePath.SelectionStart = 0;
this.TxtCshapeBasePath.Size = new System.Drawing.Size(495, 27);
this.TxtCshapeBasePath.TabIndex = 1;
this.TxtCshapeBasePath.TextAlign = System.Windows.Forms.HorizontalAlignment.Left;
this.TxtCshapeBasePath.ToolTip = "";
this.toolTip1.SetToolTip(this.TxtCshapeBasePath, "以该项目为基准,自动生成符合毕方项目标准的项目。");
this.TxtCshapeBasePath.WordWrap = true;
//
// label1
//
this.label1.AutoSize = true;
this.label1.Location = new System.Drawing.Point(12, 7);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(95, 12);
this.label1.TabIndex = 0;
this.label1.Text = "C# 基准项目路径";
//
// 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(449, 403);
this.BtnOK.Name = "BtnOK";
this.BtnOK.Size = new System.Drawing.Size(75, 30);
this.BtnOK.TabIndex = 1;
this.BtnOK.Text = "确定";
this.BtnOK.UseVisualStyleBackColor = true;
this.BtnOK.Click += new System.EventHandler(this.BtnOK_Click);
//
// 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(530, 403);
this.BtnCancel.Name = "BtnCancel";
this.BtnCancel.Size = new System.Drawing.Size(75, 30);
this.BtnCancel.TabIndex = 2;
this.BtnCancel.Text = "取消";
this.BtnCancel.UseVisualStyleBackColor = true;
this.BtnCancel.Click += new System.EventHandler(this.BtnCancel_Click);
//
// 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_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;
//
// 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;
//
// FrmSetting
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(612, 440);
this.Controls.Add(this.BtnCancel);
this.Controls.Add(this.BtnOK);
this.Controls.Add(this.tabControl1);
this.Name = "FrmSetting";
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
this.Text = "设置";
this.Load += new System.EventHandler(this.FrmSetting_Load);
this.tabControl1.ResumeLayout(false);
this.tabPage1.ResumeLayout(false);
this.tabPage1.PerformLayout();
this.tabPage2.ResumeLayout(false);
this.tabPage2.PerformLayout();
this.ResumeLayout(false);
}
#endregion
private System.Windows.Forms.TabControl tabControl1;
private System.Windows.Forms.TabPage tabPage1;
private ryControls.ButtonEx BtnChapeBasePath;
private ryControls.TextBoxEx2 TxtCshapeBasePath;
private System.Windows.Forms.Label label1;
private ryControls.ButtonEx BtnOK;
private ryControls.ButtonEx BtnCancel;
private System.Windows.Forms.FolderBrowserDialog folderBrowserDialog1;
private System.Windows.Forms.ToolTip toolTip1;
private ryControls.TextBoxEx2 TxtReferenceDll;
private System.Windows.Forms.Label label2;
private ryControls.ButtonEx BtnReactorPath;
private ryControls.TextBoxEx2 TxtReactorPath;
private System.Windows.Forms.Label label3;
private ryControls.ButtonEx BtnWinRARPath;
private ryControls.TextBoxEx2 TxtWinRARPath;
private System.Windows.Forms.Label label4;
private System.Windows.Forms.TabPage tabPage2;
private System.Windows.Forms.CheckBox ChkAss_Folder;
private System.Windows.Forms.CheckBox ChkAss_Ryp;
}
}
@@ -0,0 +1,197 @@
using Microsoft.Win32;
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;
namespace 开发辅助工具.Manager
{
public partial class FrmSetting : Form
{
public FrmSetting()
{
InitializeComponent();
}
private void BtnChapeBasePath_Click(object sender, EventArgs e)
{
folderBrowserDialog1.SelectedPath = TxtCshapeBasePath.Text;
if (folderBrowserDialog1.ShowDialog()==DialogResult.OK)
{
TxtCshapeBasePath.Text = folderBrowserDialog1.SelectedPath;
}
}
private void BtnCancel_Click(object sender, EventArgs e)
{
DialogResult = DialogResult.Cancel;
}
private void BtnOK_Click(object sender, EventArgs e)
{
if(ChkAss_Ryp.Checked)
{
SetFileAssociation(".ryp", "ryUSQ", "用睿元开发助手打开", Application.ExecutablePath);
}
else { DelFileAssociation(".ryp", "ryUSQ"); }
if(ChkAss_Folder.Checked)
{
SetFileAssociation("folder", "ryUSQ", "用睿元开发助手打开", Application.ExecutablePath);
}
else { DelFileAssociation("folder", "ryUSQ"); }
ryCommon.Storage mStor = new ryCommon.Storage();
mStor.SelectNodeBySet();
mStor.SetAttrValue("CshapeBasePath", TxtCshapeBasePath.Text);
mStor.SetAttrValue("ReferenceDll", TxtReferenceDll.Text);
mStor.SetAttrValue("ReactorPath", TxtReactorPath.Text);
mStor.SetAttrValue("WinRARPath", TxtWinRARPath.Text);
DataProvider mydb = new DataProvider();
IDbInterface db = Itrycn_Db.CreateDataProvider(Itrycn_Db.dataType);
if (db.ConnDb(Itrycn_Db.User_SQLConn) == 1)
{
RyQuickSQL mySQL = new RyQuickSQL("Settings");
mySQL.AddField("name","Setting");
mySQL.AddField("value", mStor.XMLText);
if(db.ExecuteNonQuery(mySQL.GetUpdateSQL()+ " where name='Setting'",mySQL)==0)
{
db.ExecuteNonQuery(mySQL.GetInsertSQL(),mySQL);
}
}
db.Free();
DialogResult = DialogResult.OK;
}
/// <summary>
/// 设置文件关联
/// </summary>
/// <returns></returns>
public bool SetFileAssociation(string ExtName, string sName, string AssDes,string filePath)
{
try
{
RegistryKey LRoot = RegistryKey.OpenBaseKey(RegistryHive.ClassesRoot,RegistryView.Registry32);
RegistryKey softwareRun = LRoot.OpenSubKey(ExtName + @"\shell\"+sName, true);
if (softwareRun == null) { softwareRun = LRoot.CreateSubKey(ExtName + @"\shell\" + sName); }
softwareRun.SetValue("", AssDes, RegistryValueKind.String);
var Command= softwareRun.OpenSubKey("command",true);
if (Command == null) { Command = softwareRun.CreateSubKey("command"); }
Command.SetValue("","\""+ filePath+"\" open \"%1\"");
Command.Close();
softwareRun.Close();
LRoot.Close();
return true;
}
catch
{
return false;
}
}
/// <summary>
/// 判断文件关联是否存在
/// </summary>
/// <param name="ExtName"></param>
/// <param name="sName"></param>
/// <returns></returns>
public bool GetFileAssociation(string ExtName, string sName)
{
try
{
var result = false;
RegistryKey LRoot = RegistryKey.OpenBaseKey(RegistryHive.ClassesRoot, RegistryView.Registry32);
RegistryKey softwareRun = LRoot.OpenSubKey(ExtName + @"\shell\"+sName, false);
if (softwareRun != null)
{
softwareRun.Close();
result = true;
}
LRoot.Close();
return result;
}
catch
{
return false;
}
}
/// <summary>
/// 删除文件关联
/// </summary>
/// <param name="ExtName"></param>
/// <param name="sName"></param>
/// <returns></returns>
public bool DelFileAssociation(string ExtName, string sName)
{
try
{
RegistryKey LRoot = RegistryKey.OpenBaseKey(RegistryHive.ClassesRoot, RegistryView.Registry32);
RegistryKey softwareRun = LRoot.OpenSubKey(ExtName + @"\shell", false);
if(softwareRun!=null)
{
var shell_name = softwareRun.OpenSubKey(sName,false);
if(shell_name!=null)
{
shell_name.Close();
softwareRun.DeleteSubKeyTree(sName);
}
softwareRun.Close();
}
LRoot.Close();
return true;
}
catch
{
return false;
}
}
private void FrmSetting_Load(object sender, EventArgs e)
{
ChkAss_Ryp.Checked = GetFileAssociation(".ryp", "ryUSQ");
ChkAss_Folder.Checked = GetFileAssociation("folder", "ryUSQ");
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 Settings where name='Setting'");
if(mydb.HaveData(ds))
{
var row = mydb.GetData(ds);
ryCommon.Storage mStor = new ryCommon.Storage(row["value"].ToString());
mStor.SelectNodeBySet();
TxtCshapeBasePath.Text = mStor.GetAttrValue("CshapeBasePath");
TxtReferenceDll.Text = mStor.GetAttrValue("ReferenceDll");
TxtReactorPath.Text = mStor.GetAttrValue("ReactorPath");
TxtWinRARPath.Text = mStor.GetAttrValue("WinRARPath");
if(TxtWinRARPath.Text=="")
{
if(System.IO.File.Exists(@"C:\Program Files\WinRAR\WinRAR.exe"))
{
TxtWinRARPath.Text = @"C:\Program Files\WinRAR\WinRAR.exe";
}
}
}
}
db.Free();
}
private void BtnReactorPath_Click(object sender, EventArgs e)
{
folderBrowserDialog1.SelectedPath = TxtReactorPath.Text;
if (folderBrowserDialog1.ShowDialog() == DialogResult.OK)
{
TxtReactorPath.Text = folderBrowserDialog1.SelectedPath;
}
}
private void BtnWinRARPath_Click(object sender, EventArgs e)
{
folderBrowserDialog1.SelectedPath = TxtWinRARPath.Text;
if (folderBrowserDialog1.ShowDialog() == DialogResult.OK)
{
TxtWinRARPath.Text = folderBrowserDialog1.SelectedPath;
}
}
}
}
@@ -0,0 +1,126 @@
<?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="toolTip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>197, 17</value>
</metadata>
<metadata name="folderBrowserDialog1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value>
</metadata>
</root>
@@ -0,0 +1,190 @@
namespace 开发辅助工具.Tools
{
partial class FrmToolsSearch
{
/// <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();
this.rySearch1 = new ryControls.rySearch();
this.tableModel1 = new XPTable.Models.TableModel();
this.columnModel1 = new XPTable.Models.ColumnModel();
this.ColToolName = new XPTable.Models.TextColumn();
this.ColKeys = new XPTable.Models.TextColumn();
this.ColToolDes = new XPTable.Models.TextColumn();
this.table1 = new XPTable.Models.Table();
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.ctlMyPage1 = new MyPage.ctlMyPage();
((System.ComponentModel.ISupportInitialize)(this.table1)).BeginInit();
this.contextMenuStrip1.SuspendLayout();
this.SuspendLayout();
//
// rySearch1
//
this.rySearch1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(236)))), ((int)(((byte)(239)))), ((int)(((byte)(244)))));
this.rySearch1.EmptyText = "请输入工具名称、名称拼音首字母、工具描述进行搜索";
this.rySearch1.ImeMode = System.Windows.Forms.ImeMode.Close;
this.rySearch1.Location = new System.Drawing.Point(12, 12);
this.rySearch1.Name = "rySearch1";
this.rySearch1.Size = new System.Drawing.Size(388, 25);
this.rySearch1.TabIndex = 1;
this.rySearch1.OnSearch += new System.EventHandler(this.RySearch1_OnSearch);
//
// tableModel1
//
this.tableModel1.RowHeight = 25;
//
// columnModel1
//
this.columnModel1.Columns.AddRange(new XPTable.Models.Column[] {
this.ColToolName,
this.ColKeys,
this.ColToolDes});
//
// ColToolName
//
this.ColToolName.Editable = false;
this.ColToolName.Tag = null;
this.ColToolName.Text = "工具名称";
this.ColToolName.Width = 180;
//
// ColKeys
//
this.ColKeys.Editable = false;
this.ColKeys.Tag = null;
this.ColKeys.Text = "关键词";
this.ColKeys.Width = 400;
//
// ColToolDes
//
this.ColToolDes.Editable = false;
this.ColToolDes.Tag = null;
this.ColToolDes.Text = "工具描述";
this.ColToolDes.Width = 400;
//
// table1
//
this.table1.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.table1.ColumnModel = this.columnModel1;
this.table1.ContextMenuStrip = this.contextMenuStrip1;
this.table1.FullRowSelect = true;
this.table1.Location = new System.Drawing.Point(12, 43);
this.table1.Name = "table1";
this.table1.NoItemsText = "当前列表没有任何项";
this.table1.Size = new System.Drawing.Size(1010, 555);
this.table1.TabIndex = 2;
this.table1.TableModel = this.tableModel1;
this.table1.Text = "table1";
//
// 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(125, 70);
//
// 添加工具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);
//
// ctlMyPage1
//
this.ctlMyPage1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.ctlMyPage1.Location = new System.Drawing.Point(12, 604);
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 = 31;
this.ctlMyPage1.OnPageChange += new System.EventHandler(this.CtlMyPage1_OnPageChange);
//
// FrmToolsSearch
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(1034, 633);
this.Controls.Add(this.ctlMyPage1);
this.Controls.Add(this.table1);
this.Controls.Add(this.rySearch1);
this.Name = "FrmToolsSearch";
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
this.Text = "工具管理";
this.Load += new System.EventHandler(this.FrmToolsSearch_Load);
((System.ComponentModel.ISupportInitialize)(this.table1)).EndInit();
this.contextMenuStrip1.ResumeLayout(false);
this.ResumeLayout(false);
}
#endregion
private ryControls.rySearch rySearch1;
private XPTable.Models.TableModel tableModel1;
private XPTable.Models.ColumnModel columnModel1;
private XPTable.Models.TextColumn ColToolName;
private XPTable.Models.TextColumn ColToolDes;
private XPTable.Models.Table table1;
private System.Windows.Forms.ContextMenuStrip contextMenuStrip1;
private System.Windows.Forms.ToolStripMenuItem 添加工具ToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem 修改工具ToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem 删除工具ToolStripMenuItem;
private XPTable.Models.TextColumn ColKeys;
private MyPage.ctlMyPage ctlMyPage1;
}
}
@@ -0,0 +1,155 @@
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 开发辅助工具.Tools
{
public partial class FrmToolsSearch : Form
{
public FrmToolsSearch()
{
InitializeComponent();
}
string orderSQL = "order by sort desc, addTime desc";
string tableName = "Tools";
private void 添加工具ToolStripMenuItem_Click(object sender, EventArgs e)
{
Manager.FrmAddTools frm = new Manager.FrmAddTools()
{
Text = "添加工具",
Icon = Icon,
isAdd = 1
};
frm.mr = new ModalForm(this, frm);
frm.mr.OnDialogResult += new ModalForm.DialogResultHandler((object t, DialogResult dg) => {
if (dg == DialogResult.OK)
{
rySearch1.PerformClick();
}
});
frm.mr.ShowModal();
}
private void GetRow(string id, int index)
{
#region 重新载入数据
DataProvider mydb = new DataProvider();
IDbInterface db = Itrycn_Db.CreateDataProvider(Itrycn_Db.dataType);
if (db.ConnDb(Itrycn_Db.Sys_SQLConn) == 1)
{
DataSet ds = db.ReadData("select * from " + tableName + " where id=" + id);
if (mydb.HaveData(ds))
{
DataRow row = ds.Tables[0].Rows[0];
XPTable.Models.Row itemList = tableModel1.Rows[index];
//需要修改此处
itemList.Cells[ColToolName.Index].Text = row["Name"].ToString();
itemList.Cells[ColToolDes.Index].Text = row["Des"].ToString();
itemList.Cells[ColKeys.Index].Text = row["Keys"].ToString();
}
db.Free();
}
#endregion
}
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;
Manager.FrmAddTools frm = new Manager.FrmAddTools()
{
Text = "修改工具",
Icon = Icon,
isAdd = 0
};
frm.GetInfo(selectId);
frm.mr = new ModalForm(this, frm);
frm.mr.OnDialogResult += new ModalForm.DialogResultHandler((object t, DialogResult dg) => {
if (dg == DialogResult.OK)
{
GetRow(selectId, index);
}
});
frm.mr.ShowModal();
}
private void CtlMyPage1_OnPageChange(object sender, EventArgs e)
{
#region 重新载入数据
tableModel1.Rows.Clear();
tableModel1.Selections.Clear();
DataProvider mydb = new DataProvider();
IDbInterface db = Itrycn_Db.CreateDataProvider(Itrycn_Db.dataType);
if (db.ConnDb(Itrycn_Db.Sys_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];
XPTable.Models.Row itemList = new XPTable.Models.Row()
{
Tag = row["id"].ToString()
};
//需要修改此处
itemList.Cells.Add(new XPTable.Models.Cell(row["Name"].ToString()));//示例
itemList.Cells.Add(new XPTable.Models.Cell(row["Keys"].ToString()));
itemList.Cells.Add(new XPTable.Models.Cell(row["Des"].ToString()));
tableModel1.Rows.Add(itemList);
}
db.Free();
}
#endregion
}
public void LoadDb(string whereSQL)
{
string _whereSQL = whereSQL;
DataProvider mydb = new DataProvider();
IDbInterface db = Itrycn_Db.CreateDataProvider(Itrycn_Db.dataType);
if (db.ConnDb(Itrycn_Db.Sys_SQLConn) == 1)
{
#region 重新载入数据
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);
db.Free();
#endregion
}
}
private void RySearch1_OnSearch(object sender, EventArgs e)
{
LoadDb("(Name like @SearchText or Des like @SearchText or Keys like @SearchText or PY like @SearchText)");
}
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;
}
DataProvider mydb = new DataProvider();
IDbInterface db = Itrycn_Db.CreateDataProvider(Itrycn_Db.dataType);
if (db.ConnDb(Itrycn_Db.Sys_SQLConn) == 1)
{
db.DelById(tableName, selectId);
tableModel1.Rows.RemoveAt(table1.SelectedItems[0].Index);
}
}
private void FrmToolsSearch_Load(object sender, EventArgs e)
{
rySearch1.PerformClick();
}
}
}
@@ -0,0 +1,129 @@
<?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="tableModel1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>15, 18</value>
</metadata>
<metadata name="columnModel1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>133, 16</value>
</metadata>
<metadata name="contextMenuStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>274, 16</value>
</metadata>
</root>
@@ -0,0 +1,109 @@
using ryCommonDb;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using static ryCommonDb.DataProvider;
namespace 开发辅助工具.Manager
{
public class Itrycn_Db
{
public static bool IsCloseConfirm = true;
public static string Sys_SQLConn = "<app>\\SysDb\\Tools.dat|";
public static string User_SQLConn = "<app>\\UserDb\\MyDb.dat|";
public static ryCommonDb.DataProvider.DataProviderType dataType = ryCommonDb.DataProvider.DataProviderType.SQLiteDataProvider;
public static IDbInterface CreateDataProvider(DataProviderType dataProviderType)
{
switch (dataProviderType)
{
//case DataProviderType.OdbcDataProvider:
// return new OdbcDataProvider();
//case DataProviderType.OleDbDataProvider:
// return new OleDbDataProvider();
//case DataProviderType.OracleDataProvider:
// return new OracleDataProvider();
case DataProviderType.SQLiteDataProvider:
return new SQLiteDataProvider();
default:
return null;
}
}
public static void DeleteFiles(string dir, string filter)
{
var files = System.IO.Directory.GetFiles(dir, filter);
for (int i = 0; i < files.Length; i++)
{
ryCommon.RyFiles.DeleteFile(files[i]);
}
ryCommon.RyFiles.DeleteFile(dir + "\\" + filter);
var dirs = System.IO.Directory.GetDirectories(dir);
for (int i = 0; i < dirs.Length; i++)
{
DeleteFiles(dirs[i], filter);
}
}
public static void CreateSysTable()
{
DataProvider mydb = new DataProvider();
IDbInterface db = CreateDataProvider(dataType);
if (db.ConnDb(Sys_SQLConn) == 1)
{
#region 工具表
RyQuickSQL mySQL = new RyQuickSQL("Tools");
mySQL.AddField("Name", "");
mySQL.AddField("Des", "");
mySQL.AddField("Keys", "");
mySQL.AddField("Addr", "");
mySQL.AddField("PY", "");
mySQL.AddField("Sort", 0);
mySQL.AddField("addTime",DateTime.Now);
db.CreateDb(mySQL);
#endregion
//
}
}
public static void CreateUserTable()
{
DataProvider mydb = new DataProvider();
IDbInterface db = CreateDataProvider(dataType);
if (db.ConnDb(User_SQLConn) == 1)
{
#region Url表
RyQuickSQL mySQL = new RyQuickSQL("Urls");
mySQL.AddField("Name", "");
mySQL.AddField("Url", "");
mySQL.AddField("Cookie", "");
mySQL.AddField("Postdata", "");
mySQL.AddField("Method", "");
mySQL.AddField("Header", "");
mySQL.AddField("Referer", "");
mySQL.AddField("ContentType", "");
mySQL.AddField("Encoding", "");
mySQL.AddField("ClickCount", 0);//点击次数
mySQL.AddField("editTime", DateTime.Now);
mySQL.AddField("addTime", DateTime.Now);
db.CreateDb(mySQL);
#endregion
#region 启动表
mySQL.Clear();
mySQL.TableName = "Starts"; ;
mySQL.AddField("Addr", "");
mySQL.AddField("Name", "");
mySQL.AddField("ClickCount", 0);//点击次数
mySQL.AddField("editTime", DateTime.Now);
mySQL.AddField("addTime", DateTime.Now);
db.CreateDb(mySQL);
#endregion
#region 设置表
mySQL.Clear();
mySQL.TableName = "Settings"; ;
mySQL.AddField("Name", "");
mySQL.AddField("Value", "");//值
mySQL.AddField("addTime", DateTime.Now);
db.CreateDb(mySQL);
#endregion
}
}
}
}
+62
View File
@@ -0,0 +1,62 @@
using Newtonsoft.Json;
using Newtonsoft.Json.Linq;
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
namespace 开发辅助工具.Manager
{
public class Json
{
public static string ConvertJsonString(string str)
{
//格式化json字符串
JsonSerializer serializer = new JsonSerializer();
TextReader tr = new StringReader(str);
JsonTextReader jtr = new JsonTextReader(tr);
object obj = serializer.Deserialize(jtr);
if (obj != null)
{
StringWriter textWriter = new StringWriter();
JsonTextWriter jsonWriter = new JsonTextWriter(textWriter)
{
Formatting = Formatting.Indented,
Indentation = 4,
IndentChar = ' '
};
serializer.Serialize(jsonWriter, obj);
return textWriter.ToString();
}
else
{
return str;
}
}
public static bool IsArray(string str)
{
try
{
JArray jar = JArray.Parse(str);
return true;
}
catch { return false; }
}
public static bool IsJson(string str)
{
try
{
var jo= (JObject)JsonConvert.DeserializeObject(str);
return true;
}
catch(Exception ex)
{ return false; }
//if (JsonSplit.IsJson(str))//传入的json串
//{
// return true;
//}
//return false;
}
}
}
@@ -0,0 +1,395 @@
internal class JsonSplit
{
private static bool IsJsonStart(ref string json)
{
if (!string.IsNullOrEmpty(json))
{
json = json.Trim('\r', '\n', ' ');
if (json.Length > 1)
{
char s = json[0];
char e = json[json.Length - 1];
return (s == '{' && e == '}') || (s == '[' && e == ']');
}
}
return false;
}
internal static bool IsJson(string json)
{
int errIndex;
return IsJson(json, out errIndex);
}
internal static bool IsJson(string json, out int errIndex)
{
errIndex = 0;
if (IsJsonStart(ref json))
{
CharState cs = new CharState();
char c;
for (int i = 0; i < json.Length; i++)
{
c = json[i];
if (SetCharState(c, ref cs) && cs.childrenStart)//设置关键符号状态。
{
string item = json.Substring(i);
int err;
int length = GetValueLength(item, true, out err);
cs.childrenStart = false;
if (err > 0)
{
errIndex = i + err;
return false;
}
i = i + length - 1;
}
if (cs.isError)
{
errIndex = i;
return false;
}
}
return !cs.arrayStart && !cs.jsonStart;
}
return false;
}
/// <summary>
/// 获取值的长度(当Json值嵌套以"{"或"["开头时)
/// </summary>
private static int GetValueLength(string json, bool breakOnErr, out int errIndex)
{
errIndex = 0;
int len = 0;
if (!string.IsNullOrEmpty(json))
{
CharState cs = new CharState();
char c;
for (int i = 0; i < json.Length; i++)
{
c = json[i];
if (!SetCharState(c, ref cs))//设置关键符号状态。
{
if (!cs.jsonStart && !cs.arrayStart)//json结束,又不是数组,则退出。
{
break;
}
}
else if (cs.childrenStart)//正常字符,值状态下。
{
int length = GetValueLength(json.Substring(i), breakOnErr, out errIndex);//递归子值,返回一个长度。。。
cs.childrenStart = false;
cs.valueStart = 0;
//cs.state = 0;
i = i + length - 1;
}
if (breakOnErr && cs.isError)
{
errIndex = i;
return i;
}
if (!cs.jsonStart && !cs.arrayStart)//记录当前结束位置。
{
len = i + 1;//长度比索引+1
break;
}
}
}
return len;
}
/// <summary>
/// 字符状态
/// </summary>
private class CharState
{
internal bool jsonStart = false;//以 "{"开始了...
internal bool setDicValue = false;// 可以设置字典值了。
internal bool escapeChar = false;//以"\"转义符号开始了
/// <summary>
/// 数组开始【仅第一开头才算】,值嵌套的以【childrenStart】来标识。
/// </summary>
internal bool arrayStart = false;//以"[" 符号开始了
internal bool childrenStart = false;//子级嵌套开始了。
/// <summary>
/// 【0 初始状态,或 遇到“,”逗号】;【1 遇到“:”冒号】
/// </summary>
internal int state = 0;
/// <summary>
/// 【-1 取值结束】【0 未开始】【1 无引号开始】【2 单引号开始】【3 双引号开始】
/// </summary>
internal int keyStart = 0;
/// <summary>
/// 【-1 取值结束】【0 未开始】【1 无引号开始】【2 单引号开始】【3 双引号开始】
/// </summary>
internal int valueStart = 0;
internal bool isError = false;//是否语法错误。
internal void CheckIsError(char c)//只当成一级处理(因为GetLength会递归到每一个子项处理)
{
if (keyStart > 1 || valueStart > 1)
{
return;
}
//示例 ["aa",{"bbbb":123,"fff","ddd"}]
switch (c)
{
case '{'://[{ "[{A}]":[{"[{B}]":3,"m":"C"}]}]
isError = jsonStart && state == 0;//重复开始错误 同时不是值处理。
break;
case '}':
isError = !jsonStart || (keyStart != 0 && state == 0);//重复结束错误 或者 提前结束{"aa"}。正常的有{}
break;
case '[':
isError = arrayStart && state == 0;//重复开始错误
break;
case ']':
isError = !arrayStart || jsonStart;//重复开始错误 或者 Json 未结束
break;
case '"':
case '\'':
isError = !(jsonStart || arrayStart); //json 或数组开始。
if (!isError)
{
//重复开始 [""",{"" "}]
isError = (state == 0 && keyStart == -1) || (state == 1 && valueStart == -1);
}
if (!isError && arrayStart && !jsonStart && c == '\'')//['aa',{}]
{
isError = true;
}
break;
case ':':
isError = !jsonStart || state == 1;//重复出现。
break;
case ',':
isError = !(jsonStart || arrayStart); //json 或数组开始。
if (!isError)
{
if (jsonStart)
{
isError = state == 0 || (state == 1 && valueStart > 1);//重复出现。
}
else if (arrayStart)//["aa,] [,] [{},{}]
{
isError = keyStart == 0 && !setDicValue;
}
}
break;
case ' ':
case '\r':
case '\n'://[ "a",\r\n{} ]
case '\0':
case '\t':
break;
default: //值开头。。
isError = (!jsonStart && !arrayStart) || (state == 0 && keyStart == -1) || (valueStart == -1 && state == 1);//
break;
}
//if (isError)
//{
//}
}
}
/// <summary>
/// 设置字符状态(返回true则为关键词,返回false则当为普通字符处理)
/// </summary>
private static bool SetCharState(char c, ref CharState cs)
{
cs.CheckIsError(c);
switch (c)
{
case '{'://[{ "[{A}]":[{"[{B}]":3,"m":"C"}]}]
#region 大括号
if (cs.keyStart <= 0 && cs.valueStart <= 0)
{
cs.keyStart = 0;
cs.valueStart = 0;
if (cs.jsonStart && cs.state == 1)
{
cs.childrenStart = true;
}
else
{
cs.state = 0;
}
cs.jsonStart = true;//开始。
return true;
}
#endregion
break;
case '}':
#region 大括号结束
if (cs.keyStart <= 0 && cs.valueStart < 2 && cs.jsonStart)
{
cs.jsonStart = false;//正常结束。
cs.state = 0;
cs.keyStart = 0;
cs.valueStart = 0;
cs.setDicValue = true;
return true;
}
// cs.isError = !cs.jsonStart && cs.state == 0;
#endregion
break;
case '[':
#region 中括号开始
if (!cs.jsonStart)
{
cs.arrayStart = true;
return true;
}
else if (cs.jsonStart && cs.state == 1)
{
cs.childrenStart = true;
return true;
}
#endregion
break;
case ']':
#region 中括号结束
if (cs.arrayStart && !cs.jsonStart && cs.keyStart <= 2 && cs.valueStart <= 0)//[{},333]//这样结束。
{
cs.keyStart = 0;
cs.valueStart = 0;
cs.arrayStart = false;
return true;
}
#endregion
break;
case '"':
case '\'':
#region 引号
if (cs.jsonStart || cs.arrayStart)
{
if (cs.state == 0)//key阶段,有可能是数组["aa",{}]
{
if (cs.keyStart <= 0)
{
cs.keyStart = (c == '"' ? 3 : 2);
return true;
}
else if ((cs.keyStart == 2 && c == '\'') || (cs.keyStart == 3 && c == '"'))
{
if (!cs.escapeChar)
{
cs.keyStart = -1;
return true;
}
else
{
cs.escapeChar = false;
}
}
}
else if (cs.state == 1 && cs.jsonStart)//值阶段必须是Json开始了。
{
if (cs.valueStart <= 0)
{
cs.valueStart = (c == '"' ? 3 : 2);
return true;
}
else if ((cs.valueStart == 2 && c == '\'') || (cs.valueStart == 3 && c == '"'))
{
if (!cs.escapeChar)
{
cs.valueStart = -1;
return true;
}
else
{
cs.escapeChar = false;
}
}
}
}
#endregion
break;
case ':':
#region 冒号
if (cs.jsonStart && cs.keyStart < 2 && cs.valueStart < 2 && cs.state == 0)
{
if (cs.keyStart == 1)
{
cs.keyStart = -1;
}
cs.state = 1;
return true;
}
// cs.isError = !cs.jsonStart || (cs.keyStart < 2 && cs.valueStart < 2 && cs.state == 1);
#endregion
break;
case ',':
#region 逗号 //["aa",{aa:12,}]
if (cs.jsonStart)
{
if (cs.keyStart < 2 && cs.valueStart < 2 && cs.state == 1)
{
cs.state = 0;
cs.keyStart = 0;
cs.valueStart = 0;
//if (cs.valueStart == 1)
//{
// cs.valueStart = 0;
//}
cs.setDicValue = true;
return true;
}
}
else if (cs.arrayStart && cs.keyStart <= 2)
{
cs.keyStart = 0;
//if (cs.keyStart == 1)
//{
// cs.keyStart = -1;
//}
return true;
}
#endregion
break;
case ' ':
case '\r':
case '\n'://[ "a",\r\n{} ]
case '\0':
case '\t':
if (cs.keyStart <= 0 && cs.valueStart <= 0) //cs.jsonStart &&
{
return true;//跳过空格。
}
break;
default: //值开头。。
if (c == '\\') //转义符号
{
if (cs.escapeChar)
{
cs.escapeChar = false;
}
else
{
cs.escapeChar = true;
return true;
}
}
else
{
cs.escapeChar = false;
}
if (cs.jsonStart || cs.arrayStart) // Json 或数组开始了。
{
if (cs.keyStart <= 0 && cs.state == 0)
{
cs.keyStart = 1;//无引号的
}
else if (cs.valueStart <= 0 && cs.state == 1 && cs.jsonStart)//只有Json开始才有值。
{
cs.valueStart = 1;//无引号的
}
}
break;
}
return false;
}
}
@@ -0,0 +1,57 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Xml;
namespace 开发辅助工具.Manager
{
class ReactorXML
{
public ReactorXML()
{
}
private string xml_path = "";
/// <summary>
/// 加载xml
/// </summary>
/// <param name="_xml_path"></param>
public void LoadXML(string _xml_path)
{
xml_path = _xml_path;
}
public void Save(string _xml_path,List<string> files)
{
if (files.Count == 0) { return; }
System.Xml.XmlDocument xml = new System.Xml.XmlDocument();
xml.Load(xml_path);
var list = xml.SelectNodes(@"Reactor_Project/Assembly");
for (int i = 0; i < list.Count; i++)
{
list[i].ParentNode.RemoveChild(list[i]);
}
//var node_Target_File = xml.SelectSingleNode(@"Reactor_Project//General_Settings//Target_File");
//if (node_Target_File != null)
//{
// node_Target_File.InnerText = files[0];
//}
var node = xml.SelectSingleNode(@"Reactor_Project/Main_Assembly");
if (node != null)
{
node.InnerText = files[0];
}
for (int i = 1; i < files.Count; i++)
{
var node2 = xml.SelectSingleNode(@"Reactor_Project");
XmlNode childXmlNode = xml.CreateElement("Assembly");
XmlNode childXmlNode2 = xml.CreateElement("Filename");
childXmlNode2.InnerText = files[i];
childXmlNode.AppendChild(childXmlNode2);
node2.InsertAfter(childXmlNode, node);
//node.AppendChild(childXmlNode);;
}
xml.Save(_xml_path);
}
}
}
@@ -0,0 +1,403 @@
using ryCommon;
using ryCommonDb;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Xml;
namespace 开发辅助工具.Manager
{
class RyProject
{
/// <summary>
/// C#基准项目路径
/// </summary>
public string CshapeBasePath { get; private set; } = "";
/// <summary>
/// 引用dll文件夹列表
/// </summary>
public string ReferenceDllPath { get; private set; } = "";
/// <summary>
/// 是否将dll复制到Bin目录,并修改引用
/// </summary>
public bool CopyDllToBin { get; set; } = false;
/// <summary>
/// Bin目录相对于项目文件所在的位置,可使用相对路径或绝对路径
/// </summary>
public string BinFolder { get; set; } = "..\\..\\Bin";
/// <summary>
/// 是否修改输出路径
/// </summary>
public bool ChangedOutputPath { get; set; } =true;
public RyProject()
{
UpdateSetting();
}
/// <summary>
/// 更新设置
/// </summary>
public void UpdateSetting()
{
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 Settings where name='Setting'");
if (mydb.HaveData(ds))
{
var row = mydb.GetData(ds);
ryCommon.Storage mStor = new ryCommon.Storage(row["value"].ToString());
mStor.SelectNodeBySet();
CshapeBasePath = mStor.GetAttrValue("CshapeBasePath");
ReferenceDllPath = mStor.GetAttrValue("ReferenceDll");
}
}
db.Free();
}
/// <summary>
/// 通过dll名称来寻找dll路径
/// </summary>
/// <param name="_ReferenceDllPath"></param>
/// <param name="dll_name"></param>
/// <returns></returns>
public string GetDllPath(string dll_name)
{
var path_list = ReferenceDllPath.Replace("\r", "").Split('\n');
var find = false;
var result = "";
#region 在引用文件夹查找是否有该dll,有则使用引用文件夹里的dll
for (int m = 0; m < path_list.Length; m++)
{
if (path_list[m].Trim() == "") { continue; }
if (!System.IO.Directory.Exists(path_list[m])) { continue; }
var files = System.IO.Directory.GetFiles(path_list[m]);
for (int z = 0; z < files.Length; z++)
{
if (System.IO.Path.GetFileName(files[z]).ToLower() == dll_name.ToLower())
{
result = files[z];
find = true;
break;
}
}
if (find) { break; }
}
#endregion
return result;
}
/// <summary>
/// 相对路径转绝对路径,相对项目文件的路径
/// </summary>
/// <returns></returns>
public string RelToAbsPath(string project_path,string rel_path)
{
string folder = System.IO.Path.GetDirectoryName(project_path);
var _rel_path = rel_path;
while (true)
{
if (_rel_path.IndexOf("..\\") == 0)
{
folder = System.IO.Path.GetDirectoryName(folder.TrimEnd('\\'));
_rel_path = _rel_path.Substring(3);
}
else { break; }
if (folder == "") { break; }
}
return folder+"\\"+ _rel_path;
}
/// <summary>
/// 绝对路径转相对路径,相对项目文件的路径
/// </summary>
/// <returns></returns>
public string AbsToRelPath(string project_path, string abs_path)
{
string folder = System.IO.Path.GetDirectoryName(project_path);
var _rel_path = "";
var _rel_path2 = "";
while (true)
{
if (abs_path.IndexOfEx(folder) == 0)
{
if (_rel_path2 == "")
{ _rel_path = abs_path.Substring(folder.Length); }
else
{
_rel_path = _rel_path2.TrimEnd('\\') + abs_path.Substring(folder.Length);
}
break;
}
else
{
folder = System.IO.Path.GetDirectoryName(folder.TrimEnd('\\'));
_rel_path2 += "..\\";
}
if (folder == "") { break; }
}
return _rel_path;
}
/// <summary>
/// 更新dll版本,如果全部复制成功,则返回0,否则返回错误个数
/// </summary>
public int UpdateDlls(string folder,out string error_str)
{
error_str = "";
var _error_str = "";
int error = 0;
Updates(folder);
void Updates(string _path)
{
var files = System.IO.Directory.GetFiles(_path, "*.dll");
for (int i = 0; i < files.Length; i++)
{
string filename = System.IO.Path.GetFileName(files[i]);
var dllpath = GetDllPath(filename);
if (dllpath != "")
{
if (RyFiles.CopyFile(dllpath, files[i]) != 0)
{ _error_str += files[i]+ "\r\n"; error++; }
var dll_xml_path = System.IO.Path.GetDirectoryName(dllpath) +"\\"+ System.IO.Path.GetFileNameWithoutExtension(dllpath) + ".xml";
if (System.IO.File.Exists(dll_xml_path))
{
if (RyFiles.CopyFile(dll_xml_path, System.IO.Path.GetDirectoryName(files[i]) + "\\" + System.IO.Path.GetFileNameWithoutExtension(files[i]) + ".xml") != 0)
{ _error_str += files[i] + "\r\n"; error++; }
}
}
}
var dirs = System.IO.Directory.GetDirectories(_path);
for (int i = 0; i < dirs.Length; i++)
{
Updates(dirs[i]);
}
}
error_str = _error_str;
return error;
}
/// <summary>
/// 更新项目引用,定向为本地dll,如果全部复制成功,则返回0,否则返回错误个数
/// </summary>
public int UpdateCSproj(string folder)
{
int error = 0;
Updates(folder);
void Updates(string _path)
{
var files = System.IO.Directory.GetFiles(_path, "*.csproj");
for (int i = 0; i < files.Length; i++)
{
SetCSproj(files[i], "");
}
var dirs = System.IO.Directory.GetDirectories(_path);
for (int i = 0; i < dirs.Length; i++)
{
Updates(dirs[i]);
}
}
return error;
}
/// <summary>
/// 自动设置csproj文件,将dll引用修改为指定区域的dll、修改命名空间
/// </summary>
/// <param name="path">项目文件(*.csproj)</param>
/// <param name="_project_Eng_name">项目英文名</param>
public void SetCSproj(string path, string _project_Eng_name)
{
System.Xml.XmlDocument xml = new System.Xml.XmlDocument();
xml.Load(path);
var xmlnsm = new XmlNamespaceManager(xml.NameTable);
xmlnsm.AddNamespace("d", xml.DocumentElement.NamespaceURI);
//var root = @"d:Project//d:ItemGroup//d:Reference";
if (_project_Eng_name != "")
{
SetValue(@"d:Project//d:PropertyGroup//d:RootNamespace", _project_Eng_name.Replace(" ", ""));//命名空间名
SetValue(@"d:Project//d:PropertyGroup//d:AssemblyName", _project_Eng_name.Replace(" ", ""));//程序集名称
}
var OutputPath = GetValue(@"d:Project//d:PropertyGroup[2]//d:OutputPath").TrimEnd('\\')+"\\";
if (ChangedOutputPath)
{
SetValue(@"d:Project//d:PropertyGroup[2]//d:OutputPath", BinFolder.TrimEnd('\\') + "\\Debug\\"+ (_project_Eng_name==""?"": _project_Eng_name +"\\"));//Debug输出路径
SetValue(@"d:Project//d:PropertyGroup[3]//d:OutputPath", BinFolder.TrimEnd('\\') + "\\Release\\" + (_project_Eng_name == "" ? "" : _project_Eng_name + "\\"));//Release输出路径
}
if (OutputPath == "") { OutputPath = BinFolder.TrimEnd('\\') + "\\Debug\\" + (_project_Eng_name == "" ? "" : _project_Eng_name + "\\"); }
var list = xml.SelectNodes(@"d:Project//d:ItemGroup//d:Reference//d:HintPath", xmlnsm);
for (int i = 0; i < list.Count; i++)
{
var HintPath = list[i].InnerText;
var iPos = HintPath.LastIndexOf("\\");
if (iPos > 0)
{
var Reference_Name = HintPath.Substring(iPos + 1);//引用的dll名称
var dll_path = GetDllPath(Reference_Name);
if (dll_path != "")
{
if (CopyDllToBin)
{
list[i].InnerText = OutputPath + Reference_Name;
RyFiles.CopyFile(dll_path,RelToAbsPath(path, OutputPath + Reference_Name));
}
else
{
list[i].InnerText = dll_path;
}
}
}
}
var ProjectReference_list = xml.SelectNodes(@"d:Project//d:ItemGroup//d:ProjectReference", xmlnsm);//项目引用
for (int i = 0; i < ProjectReference_list.Count; i++)
{
var element = (XmlElement)ProjectReference_list[i];
var IncludePath = element.GetAttribute("Include");
var iPos = IncludePath.LastIndexOf("\\");
if (iPos > 0)
{
var Reference_FileName = IncludePath.Substring(iPos + 1).ToLower();//引用的项目文件名称
string dll_name = "";
if (Reference_FileName == "MyDbV4.csproj".ToLower())
{ dll_name = "MyDb.dll"; }
else if (Reference_FileName == "MyDb_SQLiteV4.csproj".ToLower())
{ dll_name = "MyDb_SQLite.dll"; }
else if (Reference_FileName == "ryControlsV4.csproj".ToLower())
{ dll_name = "ryControls.dll"; }
else if (Reference_FileName == "RyPrint.csproj".ToLower())
{ dll_name = "RyPrint.dll"; }
else if (Reference_FileName == "ryUpdateV4.csproj".ToLower())
{ dll_name = "ryUpdate.dll"; }
if (dll_name != "")
{
var dll_path = GetDllPath(dll_name);
if (dll_path != "")
{
if (CopyDllToBin)
{
MoveReference(System.IO.Path.GetFileNameWithoutExtension(dll_name), OutputPath + dll_name);
RyFiles.CopyFile(dll_path, RelToAbsPath(path, OutputPath + dll_name));
}
else
{
MoveReference(System.IO.Path.GetFileNameWithoutExtension(dll_name), dll_path);
}
}
}
//将项目引用转换为dll引用
void MoveReference(string reference_name, string dll_path)
{
ProjectReference_list[i].ParentNode.RemoveChild(ProjectReference_list[i]);
var node = xml.SelectSingleNode(@"d:Project//d:ItemGroup", xmlnsm);
XmlNode childXmlNode = xml.CreateElement("Reference");
XmlNode childXmlNode2 = xml.CreateElement("HintPath");
childXmlNode2.InnerText = dll_path;
childXmlNode.AppendChild(childXmlNode2);
node.AppendChild(childXmlNode);
XmlElement element2 = (XmlElement)childXmlNode;
element2.SetAttribute("Include", reference_name);
}
}
}
xml.InnerXml = xml.InnerXml.Replace(" xmlns=\"\"", "");
xml.Save(path);
string GetValue(string xpath)
{
var node = xml.SelectSingleNode(xpath, xmlnsm);
if (node != null)
{
return node.InnerText;
}
return "";
}
bool SetValue(string xpath, string value)
{
var node = xml.SelectSingleNode(xpath, xmlnsm);
if (node != null)
{
node.InnerText = value; return true;
}
return false;
}
}
/// <summary>
/// 获取版本号
/// </summary>
/// <param name="path"></param>
/// <returns></returns>
public string GetAssemblyVersion(string path)
{
var AssemblyInfo_Path = System.IO.Path.GetDirectoryName(path) + "\\Properties\\AssemblyInfo.cs";
if (System.IO.File.Exists(AssemblyInfo_Path))
{
var AssemblyInfo = ryCommon.RyFiles.ReadAllLines(AssemblyInfo_Path);
for (int i = 0; i < AssemblyInfo.Length; i++)
{
if (AssemblyInfo[i].StartsWith("//")) { continue; }
if (AssemblyInfo[i].StartsWith("[assembly: AssemblyVersion"))
{
return AssemblyInfo[i].GetStr("AssemblyVersion(\"", "\")");
}
}
return "";
}
else
{
return "";
}
}
/// <summary>
/// 更新版本号
/// </summary>
/// <param name="AssemblyInfo_Path"></param>
public static void UpdateVer(string AssemblyInfo_Path)
{
string AssemblyInfo_path = AssemblyInfo_Path;
if (System.IO.File.Exists(AssemblyInfo_path))
{
string[] AssemblyInfo_list = ryCommon.RyFiles.ReadAllLines(AssemblyInfo_path);
string text = "";
string Revision_Ver = DateTime.Now.ToString("yyMM");
string Build_Ver = DateTime.Now.ToString("dd00");
for (int i = 0; i < AssemblyInfo_list.Length; i++)
{
string item = AssemblyInfo_list[i];
if (item.IndexOf("[assembly: AssemblyVersion(\"") == 0)
{
ChangeVer("[assembly: AssemblyVersion(\"");
}
else if (item.IndexOf("[assembly: AssemblyFileVersion(\"") == 0)
{
ChangeVer("[assembly: AssemblyFileVersion(\"");
}
if (text != "") { text += "\r\n"; }
text += item;
void ChangeVer(string id)
{
string ver = item.GetStr(id, "\")]", 0, out int pos, "");
if (ver != "")
{
string[] ver_list = ver.Split('.');
if (ver_list.Length == 4)
{
if (ver_list[2] != Revision_Ver)
{
ver = ver_list[0] + "." + ver_list[1] + "." + Revision_Ver + "." + (Build_Ver.ToInt() + 1).ToString("0000");
}
else
{
if (ver_list[3].IndexOf(DateTime.Now.ToString("dd")) == 0)
{
ver = ver_list[0] + "." + ver_list[1] + "." + Revision_Ver + "." + (ver_list[3].ToInt() + 1).ToString("0000");
}
else
{
ver = ver_list[0] + "." + ver_list[1] + "." + Revision_Ver + "." + (Build_Ver.ToInt() + 1).ToString("0000");
}
}
item = id + ver + "\")]";
}
}
}
}
ryCommon.RyFiles.WriteAllText(AssemblyInfo_path, text, Encoding.UTF8);
}
}
}
}
@@ -0,0 +1,48 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace 开发辅助工具.Manager
{
class TotalCount
{
/// <summary>
/// 返回字节数
/// </summary>
/// <param name="s"></param>
/// <returns></returns>
public int GetByteLength(string s, out int HanziCount, out int engCount, out int NumCount)
{
int l = 0;
char[] q = s.ToCharArray();
HanziCount = 0;
engCount = 0;
NumCount = 0;
for (int i = 0; i < q.Length; i++)
{
int qInt = (int)q[i];
if (qInt >= 0x4E00 && qInt <= 0x9FA5) // 汉字
{
l += 2;
HanziCount++;
}
else if ((qInt >= 97 && qInt <= 122) || (qInt >= 65 && qInt <= 90)) // 英文
{
l += 1;
engCount++;
}
else if ((qInt >= 48 && qInt <= 57)) // 数字
{
l += 1;
NumCount++;
}
else
{
l += 1;
}
}
return l;
}
}
}
+44
View File
@@ -0,0 +1,44 @@
using ryCommon;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows.Forms;
namespace 开发辅助工具
{
static class Program
{
/// <summary>
/// 应用程序的主入口点。
/// </summary>
[STAThread]
static void Main(string[] args)
{
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
if (args.Length >= 2)
{
if (args[0] == "ver")
{
string ProjectDir = args[1];
Manager.RyProject.UpdateVer(ProjectDir.Trim('"') + "\\Properties\\AssemblyInfo.cs");
}
else if (args[0] == "get")
{
string ProjectPath = args[1];
Application.Run(new Form1(ProjectPath,"get"));
}
else if (args[0] == "open")
{
string ProjectPath = args[1];
Application.Run(new Form1(ProjectPath,"open"));
}
}
else
{
Application.Run(new Form1("",""));
}
}
}
}
@@ -0,0 +1,35 @@
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// 有关程序集的一般信息由以下
// 控制。更改这些特性值可修改
// 与程序集关联的信息。
[assembly: AssemblyTitle("开发辅助工具")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("开发辅助工具")]
[assembly: AssemblyCopyright("Copyright © 2018-2019")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
// 将 ComVisible 设置为 false 会使此程序集中的类型
//对 COM 组件不可见。如果需要从 COM 访问此程序集中的类型
//请将此类型的 ComVisible 特性设置为 true。
[assembly: ComVisible(false)]
// 如果此项目向 COM 公开,则下列 GUID 用于类型库的 ID
[assembly: Guid("8177cfd1-097c-4d4e-919d-8b519289496e")]
// 程序集的版本信息由下列四个值组成:
//
// 主版本
// 次版本
// 生成号
// 修订号
//
// 可以指定所有值,也可以使用以下所示的 "*" 预置版本号和修订号
// 方法是按如下所示使用“*”: :
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("2.0.2011.2801")]
[assembly: AssemblyFileVersion("2.0.2011.2801")]
@@ -0,0 +1,63 @@
//------------------------------------------------------------------------------
// <auto-generated>
// 此代码由工具生成。
// 运行时版本:4.0.30319.42000
//
// 对此文件的更改可能会导致不正确的行为,并且如果
// 重新生成代码,这些更改将会丢失。
// </auto-generated>
//------------------------------------------------------------------------------
namespace SuperDesign.Properties {
using System;
/// <summary>
/// 一个强类型的资源类,用于查找本地化的字符串等。
/// </summary>
// 此类是由 StronglyTypedResourceBuilder
// 类通过类似于 ResGen 或 Visual Studio 的工具自动生成的。
// 若要添加或移除成员,请编辑 .ResX 文件,然后重新运行 ResGen
// (以 /str 作为命令选项),或重新生成 VS 项目。
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "16.0.0.0")]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
internal class Resources {
private static global::System.Resources.ResourceManager resourceMan;
private static global::System.Globalization.CultureInfo resourceCulture;
[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
internal Resources() {
}
/// <summary>
/// 返回此类使用的缓存的 ResourceManager 实例。
/// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
internal static global::System.Resources.ResourceManager ResourceManager {
get {
if (object.ReferenceEquals(resourceMan, null)) {
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("SuperDesign.Properties.Resources", typeof(Resources).Assembly);
resourceMan = temp;
}
return resourceMan;
}
}
/// <summary>
/// 重写当前线程的 CurrentUICulture 属性,对
/// 使用此强类型资源类的所有资源查找执行重写。
/// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
internal static global::System.Globalization.CultureInfo Culture {
get {
return resourceCulture;
}
set {
resourceCulture = value;
}
}
}
}
@@ -0,0 +1,117 @@
<?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.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: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" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
</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" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
</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=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>
@@ -0,0 +1,26 @@
//------------------------------------------------------------------------------
// <auto-generated>
// 此代码由工具生成。
// 运行时版本:4.0.30319.42000
//
// 对此文件的更改可能会导致不正确的行为,并且如果
// 重新生成代码,这些更改将会丢失。
// </auto-generated>
//------------------------------------------------------------------------------
namespace SuperDesign.Properties {
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "16.8.1.0")]
internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {
private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
public static Settings Default {
get {
return defaultInstance;
}
}
}
}
@@ -0,0 +1,7 @@
<?xml version='1.0' encoding='utf-8'?>
<SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)">
<Profiles>
<Profile Name="(Default)" />
</Profiles>
<Settings />
</SettingsFile>
@@ -0,0 +1,378 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{8177CFD1-097C-4D4E-919D-8B519289496E}</ProjectGuid>
<OutputType>WinExe</OutputType>
<RootNamespace>SuperDesign</RootNamespace>
<AssemblyName>SuperDesign</AssemblyName>
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<PlatformTarget>x86</PlatformTarget>
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>..\..\Bin\Debug\SuperDesign\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup>
<ApplicationIcon>gaim_48px_29650_easyicon.net.ico</ApplicationIcon>
</PropertyGroup>
<ItemGroup>
<Reference Include="HtmlAgilityPack">
<HintPath>..\..\Bin\Debug\SupperDesign\HtmlAgilityPack.dll</HintPath>
</Reference>
<Reference Include="ICSharpCode.TextEditor">
<HintPath>..\..\Bin\Debug\SupperDesign\ICSharpCode.TextEditor.dll</HintPath>
</Reference>
<Reference Include="MGdUI">
<HintPath>..\..\Bin\Debug\SupperDesign\MGdUI.dll</HintPath>
</Reference>
<Reference Include="MyDb">
<HintPath>..\..\Bin\Debug\SupperDesign\MyDb.dll</HintPath>
</Reference>
<Reference Include="MyDb_SQLite">
<HintPath>..\..\Bin\Debug\SupperDesign\MyDb_SQLite.dll</HintPath>
</Reference>
<Reference Include="Newtonsoft.Json, Version=6.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\Bin\Debug\SupperDesign\Newtonsoft.Json.dll</HintPath>
</Reference>
<Reference Include="ryControls">
<HintPath>..\..\Bin\Debug\SupperDesign\ryControls.dll</HintPath>
</Reference>
<Reference Include="RyWeb">
<HintPath>..\..\Bin\Debug\SupperDesign\RyWeb.dll</HintPath>
</Reference>
<Reference Include="SCREEN_CAPTURE">
<HintPath>..\..\Bin\Debug\SupperDesign\SCREEN_CAPTURE.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Design" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Data" />
<Reference Include="System.Deployment" />
<Reference Include="System.Drawing" />
<Reference Include="System.Windows.Forms" />
<Reference Include="System.Xml" />
<Reference Include="WeifenLuo.WinFormsUI.Docking">
<HintPath>..\..\Bin\Debug\SupperDesign\WeifenLuo.WinFormsUI.Docking.dll</HintPath>
</Reference>
<Reference Include="WeifenLuo.WinFormsUI.Docking.ThemeVS2015">
<HintPath>..\..\Bin\Debug\SupperDesign\WeifenLuo.WinFormsUI.Docking.ThemeVS2015.dll</HintPath>
</Reference>
<Reference Include="XPTable">
<HintPath>..\..\Bin\Debug\SupperDesign\XPTable.dll</HintPath>
</Reference>
<Reference Include="zxing">
<HintPath>..\..\Bin\Debug\SupperDesign\zxing.dll</HintPath>
</Reference>
</ItemGroup>
<ItemGroup>
<Compile Include="Controls\ContextMenuStripHighlightText.cs">
<SubType>Component</SubType>
</Compile>
<Compile Include="Controls\ContextMenuStripHighlightText.Designer.cs">
<DependentUpon>ContextMenuStripHighlightText.cs</DependentUpon>
</Compile>
<Compile Include="Controls\ContextMenuStripRichText.cs">
<SubType>Component</SubType>
</Compile>
<Compile Include="Controls\ContextMenuStripRichText.Designer.cs">
<DependentUpon>ContextMenuStripRichText.cs</DependentUpon>
</Compile>
<Compile Include="Controls\FindAndReplaceForm.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="Controls\FindAndReplaceForm.designer.cs">
<DependentUpon>FindAndReplaceForm.cs</DependentUpon>
</Compile>
<Compile Include="Controls\FrmInsertUnixTime.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="Controls\FrmInsertUnixTime.Designer.cs">
<DependentUpon>FrmInsertUnixTime.cs</DependentUpon>
</Compile>
<Compile Include="Controls\FrmText.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="Controls\FrmText.Designer.cs">
<DependentUpon>FrmText.cs</DependentUpon>
</Compile>
<Compile Include="Controls\FrmTitle.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="Controls\FrmTitle.Designer.cs">
<DependentUpon>FrmTitle.cs</DependentUpon>
</Compile>
<Compile Include="Controls\MenuRight.cs">
<SubType>Component</SubType>
</Compile>
<Compile Include="Controls\MenuRight.Designer.cs">
<DependentUpon>MenuRight.cs</DependentUpon>
</Compile>
<Compile Include="Form1.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="Form1.Designer.cs">
<DependentUpon>Form1.cs</DependentUpon>
</Compile>
<Compile Include="FrmMessageBox.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="FrmMessageBox.Designer.cs">
<DependentUpon>FrmMessageBox.cs</DependentUpon>
</Compile>
<Compile Include="Globals.cs" />
<Compile Include="Manager\FrmSetting.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="Manager\FrmSetting.Designer.cs">
<DependentUpon>FrmSetting.cs</DependentUpon>
</Compile>
<Compile Include="Manager\JsonSplit.cs" />
<Compile Include="Manager\ClsPY.cs" />
<Compile Include="Manager\FrmAddTools.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="Manager\FrmAddTools.Designer.cs">
<DependentUpon>FrmAddTools.cs</DependentUpon>
</Compile>
<Compile Include="Manager\Itrycn_Info.cs" />
<Compile Include="Manager\Json.cs" />
<Compile Include="Manager\ReactorXML.cs" />
<Compile Include="Manager\RyProject.cs" />
<Compile Include="Manager\TotalCount.cs" />
<Compile Include="Program.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="Tools\FrmColor.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="Tools\FrmColor.Designer.cs">
<DependentUpon>FrmColor.cs</DependentUpon>
</Compile>
<Compile Include="Tools\FrmCreateProject.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="Tools\FrmCreateProject.Designer.cs">
<DependentUpon>FrmCreateProject.cs</DependentUpon>
</Compile>
<Compile Include="Tools\FrmEncode.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="Tools\FrmEncode.Designer.cs">
<DependentUpon>FrmEncode.cs</DependentUpon>
</Compile>
<Compile Include="Tools\FrmJson.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="Tools\FrmJson.Designer.cs">
<DependentUpon>FrmJson.cs</DependentUpon>
</Compile>
<Compile Include="Tools\FrmPathInfo.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="Tools\FrmPathInfo.Designer.cs">
<DependentUpon>FrmPathInfo.cs</DependentUpon>
</Compile>
<Compile Include="Tools\FrmProject.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="Tools\FrmProject.Designer.cs">
<DependentUpon>FrmProject.cs</DependentUpon>
</Compile>
<Compile Include="Tools\FrmProjectSearch.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="Tools\FrmProjectSearch.Designer.cs">
<DependentUpon>FrmProjectSearch.cs</DependentUpon>
</Compile>
<Compile Include="Tools\FrmQrCode.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="Tools\FrmQrCode.Designer.cs">
<DependentUpon>FrmQrCode.cs</DependentUpon>
</Compile>
<Compile Include="Tools\FrmRegex.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="Tools\FrmRegex.Designer.cs">
<DependentUpon>FrmRegex.cs</DependentUpon>
</Compile>
<Compile Include="Tools\FrmSetup.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="Tools\FrmSetup.Designer.cs">
<DependentUpon>FrmSetup.cs</DependentUpon>
</Compile>
<Compile Include="Tools\FrmStrCount.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="Tools\FrmStrCount.Designer.cs">
<DependentUpon>FrmStrCount.cs</DependentUpon>
</Compile>
<Compile Include="Tools\FrmStrToCode.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="Tools\FrmStrToCode.Designer.cs">
<DependentUpon>FrmStrToCode.cs</DependentUpon>
</Compile>
<Compile Include="Tools\FrmTime.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="Tools\FrmTime.Designer.cs">
<DependentUpon>FrmTime.cs</DependentUpon>
</Compile>
<Compile Include="Tools\FrmToolsBox.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="Tools\FrmToolsBox.Designer.cs">
<DependentUpon>FrmToolsBox.cs</DependentUpon>
</Compile>
<Compile Include="Manager\FrmToolsSearch.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="Manager\FrmToolsSearch.Designer.cs">
<DependentUpon>FrmToolsSearch.cs</DependentUpon>
</Compile>
<Compile Include="Tools\FrmWebGet.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="Tools\FrmWebGet.Designer.cs">
<DependentUpon>FrmWebGet.cs</DependentUpon>
</Compile>
<Compile Include="Tools\FrmXpath.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="Tools\FrmXpath.Designer.cs">
<DependentUpon>FrmXpath.cs</DependentUpon>
</Compile>
<EmbeddedResource Include="Controls\ContextMenuStripHighlightText.resx">
<DependentUpon>ContextMenuStripHighlightText.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Controls\ContextMenuStripRichText.resx">
<DependentUpon>ContextMenuStripRichText.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Controls\FindAndReplaceForm.resx">
<DependentUpon>FindAndReplaceForm.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Controls\FrmInsertUnixTime.resx">
<DependentUpon>FrmInsertUnixTime.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Controls\FrmText.resx">
<DependentUpon>FrmText.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Controls\FrmTitle.resx">
<DependentUpon>FrmTitle.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Form1.resx">
<DependentUpon>Form1.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="FrmMessageBox.resx">
<DependentUpon>FrmMessageBox.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Manager\FrmAddTools.resx">
<DependentUpon>FrmAddTools.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Manager\FrmSetting.resx">
<DependentUpon>FrmSetting.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Properties\Resources.resx">
<Generator>ResXFileCodeGenerator</Generator>
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
<SubType>Designer</SubType>
</EmbeddedResource>
<Compile Include="Properties\Resources.Designer.cs">
<AutoGen>True</AutoGen>
<DependentUpon>Resources.resx</DependentUpon>
<DesignTime>True</DesignTime>
</Compile>
<EmbeddedResource Include="Tools\FrmColor.resx">
<DependentUpon>FrmColor.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Tools\FrmCreateProject.resx">
<DependentUpon>FrmCreateProject.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Tools\FrmEncode.resx">
<DependentUpon>FrmEncode.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Tools\FrmJson.resx">
<DependentUpon>FrmJson.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Tools\FrmPathInfo.resx">
<DependentUpon>FrmPathInfo.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Tools\FrmProject.resx">
<DependentUpon>FrmProject.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Tools\FrmProjectSearch.resx">
<DependentUpon>FrmProjectSearch.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Tools\FrmQrCode.resx">
<DependentUpon>FrmQrCode.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Tools\FrmRegex.resx">
<DependentUpon>FrmRegex.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Tools\FrmSetup.resx">
<DependentUpon>FrmSetup.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Tools\FrmStrCount.resx">
<DependentUpon>FrmStrCount.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Tools\FrmStrToCode.resx">
<DependentUpon>FrmStrToCode.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Tools\FrmTime.resx">
<DependentUpon>FrmTime.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Tools\FrmToolsBox.resx">
<DependentUpon>FrmToolsBox.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Manager\FrmToolsSearch.resx">
<DependentUpon>FrmToolsSearch.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Tools\FrmWebGet.resx">
<DependentUpon>FrmWebGet.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Tools\FrmXpath.resx">
<DependentUpon>FrmXpath.cs</DependentUpon>
</EmbeddedResource>
<None Include="Properties\Settings.settings">
<Generator>SettingsSingleFileGenerator</Generator>
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
</None>
<Compile Include="Properties\Settings.Designer.cs">
<AutoGen>True</AutoGen>
<DependentUpon>Settings.settings</DependentUpon>
<DesignTimeSharedInput>True</DesignTimeSharedInput>
</Compile>
</ItemGroup>
<ItemGroup>
<Content Include="gaim_48px_29650_easyicon.net.ico" />
</ItemGroup>
<ItemGroup />
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<PropertyGroup>
<PreBuildEvent>
</PreBuildEvent>
</PropertyGroup>
</Project>
@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|AnyCPU'">
<StartArguments>get "E:\我的代码\网上源码\ProgramCalculator\FRData\FRData.csproj"</StartArguments>
</PropertyGroup>
<PropertyGroup>
<ProjectView>ProjectFiles</ProjectView>
</PropertyGroup>
</Project>
+220
View File
@@ -0,0 +1,220 @@
namespace 开发辅助工具.Tools
{
partial class FrmColor
{
/// <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(FrmColor));
this.superColor1 = new ryControls.SuperColor();
this.label1 = new System.Windows.Forms.Label();
this.toolTip1 = new System.Windows.Forms.ToolTip(this.components);
this.menuRight1 = new ryPaiban.Model.MenuRight(this.components);
this.table1 = new XPTable.Models.Table();
this.columnModel1 = new XPTable.Models.ColumnModel();
this.ColTitle = new XPTable.Models.TextColumn();
this.ColValue = new XPTable.Models.TextColumn();
this.ColDes = new XPTable.Models.TextColumn();
this.tableModel1 = new XPTable.Models.TableModel();
this.label2 = new System.Windows.Forms.Label();
this.TxtType = new ryControls.TextBoxEx2();
this.label3 = new System.Windows.Forms.Label();
this.TxtValue = new ryControls.TextBoxEx2();
((System.ComponentModel.ISupportInitialize)(this.table1)).BeginInit();
this.SuspendLayout();
//
// superColor1
//
this.superColor1.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.superColor1.Cursor = System.Windows.Forms.Cursors.Hand;
this.superColor1.Location = new System.Drawing.Point(68, 10);
this.superColor1.Name = "superColor1";
this.superColor1.Size = new System.Drawing.Size(73, 22);
this.superColor1.TabIndex = 0;
this.superColor1.BackColorChanged += new System.EventHandler(this.SuperColor1_BackColorChanged);
//
// label1
//
this.label1.AutoSize = true;
this.label1.Location = new System.Drawing.Point(9, 15);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(53, 12);
this.label1.TabIndex = 1;
this.label1.Text = "选择颜色";
//
// menuRight1
//
this.menuRight1.Name = "menuRight1";
this.menuRight1.Size = new System.Drawing.Size(185, 70);
this.menuRight1.SourceContent = this;
//
// table1
//
this.table1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.table1.ColumnModel = this.columnModel1;
this.table1.EnableToolTips = true;
this.table1.FullRowSelect = true;
this.table1.HeaderStyle = System.Windows.Forms.ColumnHeaderStyle.Nonclickable;
this.table1.Location = new System.Drawing.Point(11, 38);
this.table1.Name = "table1";
this.table1.NoItemsText = "当前列表没有任何项";
this.table1.Size = new System.Drawing.Size(777, 353);
this.table1.TabIndex = 16;
this.table1.TableModel = this.tableModel1;
this.table1.Text = "table1";
//
// columnModel1
//
this.columnModel1.Columns.AddRange(new XPTable.Models.Column[] {
this.ColTitle,
this.ColValue,
this.ColDes});
//
// ColTitle
//
this.ColTitle.Editable = false;
this.ColTitle.Tag = null;
this.ColTitle.Text = "类型";
this.ColTitle.Width = 130;
//
// ColValue
//
this.ColValue.Editable = false;
this.ColValue.Tag = null;
this.ColValue.Text = "值";
this.ColValue.Width = 220;
//
// ColDes
//
this.ColDes.Editable = false;
this.ColDes.Tag = null;
this.ColDes.Text = "备注";
this.ColDes.Width = 350;
//
// tableModel1
//
this.tableModel1.RowHeight = 25;
this.tableModel1.SelectionChanged += new XPTable.Events.SelectionEventHandler(this.TableModel1_SelectionChanged);
//
// label2
//
this.label2.AutoSize = true;
this.label2.Location = new System.Drawing.Point(12, 405);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(29, 12);
this.label2.TabIndex = 17;
this.label2.Text = "类型";
//
// TxtType
//
this.TxtType.BackColor = System.Drawing.Color.White;
this.TxtType.EmptyText = "";
this.TxtType.Location = new System.Drawing.Point(47, 397);
this.TxtType.MaxLength = 999999999;
this.TxtType.Multiline = false;
this.TxtType.Name = "TxtType";
this.TxtType.OnlyNumeric = false;
this.TxtType.PasswordChar = '\0';
this.TxtType.ReadOnly = true;
this.TxtType.SelectedText = "";
this.TxtType.SelectionLength = 0;
this.TxtType.SelectionStart = 0;
this.TxtType.Size = new System.Drawing.Size(143, 29);
this.TxtType.TabIndex = 18;
this.TxtType.TextAlign = System.Windows.Forms.HorizontalAlignment.Left;
this.TxtType.ToolTip = "";
//
// label3
//
this.label3.AutoSize = true;
this.label3.Location = new System.Drawing.Point(200, 405);
this.label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(17, 12);
this.label3.TabIndex = 19;
this.label3.Text = "值";
//
// TxtValue
//
this.TxtValue.BackColor = System.Drawing.Color.White;
this.TxtValue.EmptyText = "";
this.TxtValue.Location = new System.Drawing.Point(223, 397);
this.TxtValue.MaxLength = 999999999;
this.TxtValue.Multiline = false;
this.TxtValue.Name = "TxtValue";
this.TxtValue.OnlyNumeric = false;
this.TxtValue.PasswordChar = '\0';
this.TxtValue.ReadOnly = true;
this.TxtValue.SelectedText = "";
this.TxtValue.SelectionLength = 0;
this.TxtValue.SelectionStart = 0;
this.TxtValue.Size = new System.Drawing.Size(229, 29);
this.TxtValue.TabIndex = 20;
this.TxtValue.TextAlign = System.Windows.Forms.HorizontalAlignment.Left;
this.TxtValue.ToolTip = "";
//
// FrmColor
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(800, 450);
this.Controls.Add(this.TxtValue);
this.Controls.Add(this.label3);
this.Controls.Add(this.TxtType);
this.Controls.Add(this.label2);
this.Controls.Add(this.table1);
this.Controls.Add(this.label1);
this.Controls.Add(this.superColor1);
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
this.Name = "FrmColor";
this.TabPageContextMenuStrip = this.menuRight1;
this.Text = "颜色转换";
this.Load += new System.EventHandler(this.FrmColor_Load);
((System.ComponentModel.ISupportInitialize)(this.table1)).EndInit();
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
private ryControls.SuperColor superColor1;
private System.Windows.Forms.Label label1;
private System.Windows.Forms.ToolTip toolTip1;
private ryPaiban.Model.MenuRight menuRight1;
private XPTable.Models.Table table1;
private XPTable.Models.ColumnModel columnModel1;
private XPTable.Models.TextColumn ColTitle;
private XPTable.Models.TextColumn ColValue;
private XPTable.Models.TextColumn ColDes;
private XPTable.Models.TableModel tableModel1;
private ryControls.TextBoxEx2 TxtValue;
private System.Windows.Forms.Label label3;
private ryControls.TextBoxEx2 TxtType;
private System.Windows.Forms.Label label2;
}
}
@@ -0,0 +1,70 @@
using ryCommon;
using ryControls;
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 WeifenLuo.WinFormsUI.Docking;
namespace 开发辅助工具.Tools
{
public partial class FrmColor : DockContent
{
public FrmColor()
{
InitializeComponent();
}
private void SuperColor1_BackColorChanged(object sender, EventArgs e)
{
Color color = superColor1.BackColor;
ryControls.ColorRGB RGB =new ryControls.ColorRGB(color.R,color.G,color.B);
var hsl= ryControls.ColorHelper.RgbToHsl(RGB);
var hsv = ryControls.ColorHelper.RgbToHsv(RGB);
tableModel1.Rows.Clear();
AddList("RGB颜色值", "rgb(" + color.R + "," + color.G + "," + color.B + ")","");
AddList("RGBA颜色值", "rgba(" + color.R + "," + color.G + "," + color.B + "," + color.A + ")", "HTML5、CSS3常用");
AddList("ARGB颜色值", String.Format("#{0:X2}{1:X2}{2:X2}{3:X2}", color.A, color.R, color.G, color.B), "android常用");
AddList("16进制颜色值", String.Format("#{0:X2}{1:X2}{2:X2}", color.R, color.G, color.B), "");
AddList("HSL颜色值", "hsl(" + color.GetHue().ToString("0.00") + "," + color.GetSaturation().ToString("0.00%") + "," + (hsl.L / 255m).ToString("0.00%") + ")", "");
AddList("HSV颜色值", "hsv(" + color.GetHue().ToString("0.00") + "," + (hsv.S / 255m).ToString("0.00") + "," + (hsv.V / 255m).ToString("0.00") + ")", "");
ColorHelper.RGB2CMYK(RGB, out var c, out var m, out var y, out var k);
AddList("CMYK", c.ToInt().ToString()+","+m.ToInt().ToString() + "," + y.ToInt().ToString() + "," + k.ToInt().ToString(), "印刷四色模式");
ColorHelper.RGB2XYZ(RGB, out var x, out var y1, out var z);
AddList("XYZ", x.ToString("0.000") + "," + y1.ToString("0.000") + "," + z.ToString("0.000"), "D65/2°");
ColorHelper.RGB2Yxy(RGB, out var Y, out var x2, out var y2);
AddList("Yxy", Y.ToString("0.000") + "," + x2.ToString("0.000") + "," + y2.ToString("0.000"), "D65/2°");
void AddList(string title,string value,string des)
{
XPTable.Models.Row itemList = new XPTable.Models.Row()
{
Tag = ""
};
//需要修改此处
itemList.Cells.Add(new XPTable.Models.Cell(title));//示例
itemList.Cells.Add(new XPTable.Models.Cell(value));//示例
var cell = new XPTable.Models.Cell(des)
{
ForeColor = Color.Gray
};
itemList.Cells.Add(cell);
tableModel1.Rows.Add(itemList);
}
}
private void FrmColor_Load(object sender, EventArgs e)
{
}
private void TableModel1_SelectionChanged(object sender, XPTable.Events.SelectionEventArgs e)
{
if (e.NewSelectedIndicies.Length <= 0) { TxtType.Text = "";TxtValue.Text = ""; return; }
int row = e.NewSelectedIndicies[0];
TxtType.Text = table1.TableModel.Rows[row].Cells[ColTitle.Index].Text;
TxtValue.Text = table1.TableModel.Rows[row].Cells[ColValue.Index].Text;
}
}
}
@@ -0,0 +1,209 @@
<?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="toolTip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value>
</metadata>
<metadata name="menuRight1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>118, 17</value>
</metadata>
<metadata name="columnModel1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>242, 17</value>
</metadata>
<metadata name="tableModel1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>383, 17</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>
AAABAAEAICAAAAEAIACoEAAAFgAAACgAAAAgAAAAQAAAAAEAIAAAAAAAABAAAOgkAADoJAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD6tMMA+rTDAPq0wwD6tMMA+rTDAPq0
wwD6tMMA+rTDAPq0wwD6tMMA+rTDAPq0wwD6tMMA+rTDAPq0wwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADw0n0A8NJ9APDRgADq41YA+7LHEPq0
wzX6tMNe+rTDffq0w4n6tMOK+rTDfvq0w2D6tMM3+bTDEaSE5wB0avsAZGH/AGlk/wAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADw0n0A8NJ9APDSfQDw0n0A8NN6J/PK
kXz5tr7I+rTE8Pq0w/76tMP/+rTD//q0w//6tMP/+rTD//q0w/D7tcPK3KTPf21m/SqIdfIAaWT/AGlk
/wBpZP8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA8NJ9APDSfQDw0n0A8NJ9FPDS
fXvw0n3g8NF+//TFm//6tcD/+rTD//q0w//6tMP/+rTD//q0w//6tMP/+rTD//y1wv/PnNX/bGb+4mlk
/39pZP8WaWT/AGlk/wBpZP8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAPDSfQDw0n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
1/9k5tj/Z+bs/2nm/v9p5v/eaeb/eWnm/xNp5v8Aaeb/AGnm/wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAABk4a8AZOGvAGThrwBk4bEAZOGvJGTlzndk5tfDZObX7WTm1/1k5tf/ZObX/2Tm
1/9k5tf/ZObX/WTm1+5k5tnEZ+byeWnm/yVp5v8Aaeb/AGnm/wBp5v8AAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAZOGvAGThrQBk4bEAZOTEAGTm1w1k5tcxZObXWGTm
13dk5teGZObXh2Tm13dk5tdZZObXMmTm1Q5r5v8Aaeb+AGnm/wBp5v8AAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGTm1wBk5tcAZObXAGTm
1wBk5tcAZObXAGTm1wBk5tcAZObXAGTm1wBk5tcAZObXAGTm1wBk5tcAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAA/wAA//4AAH/4AAAf8AAAD+AAAAfAAAADwAAAA4AAAAGAAAAAAAAAAAAA
AAAAAAAAAAGAAAADwAAAB+AAAA/wAAAP8AAAB+AAAAPAAAABgAAAAAAAAAAAAAAAAACAAAAAgAAAAcAA
AAPAAAAD4AAAB/AAAA/4AAAf/gAAf/+AAf8=
</value>
</data>
</root>
@@ -0,0 +1,287 @@
namespace 开发辅助工具.Tools
{
partial class FrmCreateProject
{
/// <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.TxtFolder = new ryControls.TextBoxEx2();
this.label1 = new System.Windows.Forms.Label();
this.BtnBrowser = new ryControls.ButtonEx();
this.folderBrowserDialog1 = new System.Windows.Forms.FolderBrowserDialog();
this.BtnCreate = new ryControls.ButtonEx();
this.label2 = new System.Windows.Forms.Label();
this.TxtProjectName = new ryControls.TextBoxEx2();
this.TxtProjectEngName = new ryControls.TextBoxEx2();
this.label3 = new System.Windows.Forms.Label();
this.table1 = new XPTable.Models.Table();
this.columnModel1 = new XPTable.Models.ColumnModel();
this.ColName = new XPTable.Models.TextColumn();
this.ColPath = new XPTable.Models.TextColumn();
this.tableModel1 = new XPTable.Models.TableModel();
this.ChkUnCreateProject = new System.Windows.Forms.CheckBox();
this.label4 = new System.Windows.Forms.Label();
this.CbbLang = new ryControls.ComboBoxEx();
((System.ComponentModel.ISupportInitialize)(this.table1)).BeginInit();
this.SuspendLayout();
//
// TxtFolder
//
this.TxtFolder.BackColor = System.Drawing.Color.White;
this.TxtFolder.EmptyText = "";
this.TxtFolder.Location = new System.Drawing.Point(17, 24);
this.TxtFolder.MaxLength = 999999999;
this.TxtFolder.Multiline = false;
this.TxtFolder.Name = "TxtFolder";
this.TxtFolder.OnlyNumeric = false;
this.TxtFolder.PasswordChar = '\0';
this.TxtFolder.ReadOnly = false;
this.TxtFolder.SelectedText = "";
this.TxtFolder.SelectionLength = 0;
this.TxtFolder.SelectionStart = 0;
this.TxtFolder.Size = new System.Drawing.Size(575, 33);
this.TxtFolder.TabIndex = 0;
this.TxtFolder.TextAlign = System.Windows.Forms.HorizontalAlignment.Left;
this.TxtFolder.ToolTip = "";
this.TxtFolder.WordWrap = true;
this.TxtFolder.Click += new System.EventHandler(this.TxtFolder_Click);
this.TxtFolder.Enter += new System.EventHandler(this.TxtFolder_Enter);
this.TxtFolder.KeyDown += new System.Windows.Forms.KeyEventHandler(this.TxtFolder_KeyDown);
this.TxtFolder.Leave += new System.EventHandler(this.TxtFolder_Leave);
//
// label1
//
this.label1.AutoSize = true;
this.label1.Location = new System.Drawing.Point(15, 9);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(65, 12);
this.label1.TabIndex = 1;
this.label1.Text = "选择文件夹";
//
// BtnBrowser
//
this.BtnBrowser.BaseColor = System.Drawing.Color.FromArgb(((int)(((byte)(51)))), ((int)(((byte)(76)))), ((int)(((byte)(95)))));
this.BtnBrowser.Location = new System.Drawing.Point(598, 24);
this.BtnBrowser.Name = "BtnBrowser";
this.BtnBrowser.Size = new System.Drawing.Size(75, 33);
this.BtnBrowser.TabIndex = 2;
this.BtnBrowser.Text = "选择";
this.BtnBrowser.UseVisualStyleBackColor = true;
this.BtnBrowser.Click += new System.EventHandler(this.BtnBrowser_Click);
//
// BtnCreate
//
this.BtnCreate.BaseColor = System.Drawing.Color.FromArgb(((int)(((byte)(51)))), ((int)(((byte)(76)))), ((int)(((byte)(95)))));
this.BtnCreate.Location = new System.Drawing.Point(17, 153);
this.BtnCreate.Name = "BtnCreate";
this.BtnCreate.Size = new System.Drawing.Size(75, 33);
this.BtnCreate.TabIndex = 3;
this.BtnCreate.Text = "生成";
this.BtnCreate.UseVisualStyleBackColor = true;
this.BtnCreate.Click += new System.EventHandler(this.BtnCreate_Click);
//
// label2
//
this.label2.AutoSize = true;
this.label2.Location = new System.Drawing.Point(15, 60);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(89, 12);
this.label2.TabIndex = 4;
this.label2.Text = "项目名称(中文)";
//
// TxtProjectName
//
this.TxtProjectName.BackColor = System.Drawing.Color.White;
this.TxtProjectName.EmptyText = "";
this.TxtProjectName.Location = new System.Drawing.Point(17, 75);
this.TxtProjectName.MaxLength = 999999999;
this.TxtProjectName.Multiline = false;
this.TxtProjectName.Name = "TxtProjectName";
this.TxtProjectName.OnlyNumeric = false;
this.TxtProjectName.PasswordChar = '\0';
this.TxtProjectName.ReadOnly = false;
this.TxtProjectName.SelectedText = "";
this.TxtProjectName.SelectionLength = 0;
this.TxtProjectName.SelectionStart = 0;
this.TxtProjectName.Size = new System.Drawing.Size(256, 33);
this.TxtProjectName.TabIndex = 5;
this.TxtProjectName.TextAlign = System.Windows.Forms.HorizontalAlignment.Left;
this.TxtProjectName.ToolTip = "";
this.TxtProjectName.WordWrap = true;
//
// TxtProjectEngName
//
this.TxtProjectEngName.BackColor = System.Drawing.Color.White;
this.TxtProjectEngName.EmptyText = "";
this.TxtProjectEngName.Location = new System.Drawing.Point(279, 75);
this.TxtProjectEngName.MaxLength = 999999999;
this.TxtProjectEngName.Multiline = false;
this.TxtProjectEngName.Name = "TxtProjectEngName";
this.TxtProjectEngName.OnlyNumeric = false;
this.TxtProjectEngName.PasswordChar = '\0';
this.TxtProjectEngName.ReadOnly = false;
this.TxtProjectEngName.SelectedText = "";
this.TxtProjectEngName.SelectionLength = 0;
this.TxtProjectEngName.SelectionStart = 0;
this.TxtProjectEngName.Size = new System.Drawing.Size(256, 33);
this.TxtProjectEngName.TabIndex = 7;
this.TxtProjectEngName.TextAlign = System.Windows.Forms.HorizontalAlignment.Left;
this.TxtProjectEngName.ToolTip = "";
this.TxtProjectEngName.WordWrap = true;
//
// label3
//
this.label3.AutoSize = true;
this.label3.Location = new System.Drawing.Point(277, 60);
this.label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(89, 12);
this.label3.TabIndex = 6;
this.label3.Text = "项目名称(英文)";
//
// table1
//
this.table1.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.table1.ColumnModel = this.columnModel1;
this.table1.EnableToolTips = true;
this.table1.FullRowSelect = true;
this.table1.HeaderStyle = System.Windows.Forms.ColumnHeaderStyle.Nonclickable;
this.table1.Location = new System.Drawing.Point(20, 247);
this.table1.Name = "table1";
this.table1.NoItemsText = "当前列表没有任何项";
this.table1.Size = new System.Drawing.Size(575, 347);
this.table1.TabIndex = 113;
this.table1.TableModel = this.tableModel1;
this.table1.Text = "table1";
this.table1.Visible = false;
this.table1.CellLostFocus += new XPTable.Events.CellFocusEventHandler(this.table1_CellLostFocus);
this.table1.Click += new System.EventHandler(this.table1_Click);
this.table1.KeyDown += new System.Windows.Forms.KeyEventHandler(this.table1_KeyDown);
this.table1.Leave += new System.EventHandler(this.table1_Leave);
//
// columnModel1
//
this.columnModel1.Columns.AddRange(new XPTable.Models.Column[] {
this.ColName,
this.ColPath});
//
// ColName
//
this.ColName.Editable = false;
this.ColName.Tag = null;
this.ColName.Text = "名称";
this.ColName.Width = 130;
//
// ColPath
//
this.ColPath.Editable = false;
this.ColPath.Tag = null;
this.ColPath.Text = "路径";
this.ColPath.Width = 400;
//
// ChkUnCreateProject
//
this.ChkUnCreateProject.AutoSize = true;
this.ChkUnCreateProject.Location = new System.Drawing.Point(17, 114);
this.ChkUnCreateProject.Name = "ChkUnCreateProject";
this.ChkUnCreateProject.Size = new System.Drawing.Size(108, 16);
this.ChkUnCreateProject.TabIndex = 114;
this.ChkUnCreateProject.Text = "不生成模板项目";
this.ChkUnCreateProject.UseVisualStyleBackColor = true;
//
// label4
//
this.label4.AutoSize = true;
this.label4.Location = new System.Drawing.Point(542, 60);
this.label4.Name = "label4";
this.label4.Size = new System.Drawing.Size(53, 12);
this.label4.TabIndex = 115;
this.label4.Text = "项目语言";
//
// CbbLang
//
this.CbbLang.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed;
this.CbbLang.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.CbbLang.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.CbbLang.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.CbbLang.FormattingEnabled = true;
this.CbbLang.Items.AddRange(new object[] {
"C#",
"Delphi"});
this.CbbLang.Location = new System.Drawing.Point(544, 78);
this.CbbLang.Name = "CbbLang";
this.CbbLang.Size = new System.Drawing.Size(121, 27);
this.CbbLang.TabIndex = 116;
//
// FrmCreateProject
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(688, 450);
this.Controls.Add(this.table1);
this.Controls.Add(this.CbbLang);
this.Controls.Add(this.label4);
this.Controls.Add(this.ChkUnCreateProject);
this.Controls.Add(this.TxtProjectEngName);
this.Controls.Add(this.label3);
this.Controls.Add(this.TxtProjectName);
this.Controls.Add(this.label2);
this.Controls.Add(this.BtnCreate);
this.Controls.Add(this.BtnBrowser);
this.Controls.Add(this.label1);
this.Controls.Add(this.TxtFolder);
this.Name = "FrmCreateProject";
this.Text = "创建项目";
this.Load += new System.EventHandler(this.FrmCreateProject_Load);
this.Shown += new System.EventHandler(this.FrmCreateProject_Shown);
this.Click += new System.EventHandler(this.FrmCreateProject_Click);
((System.ComponentModel.ISupportInitialize)(this.table1)).EndInit();
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
private System.Windows.Forms.Label label1;
private ryControls.ButtonEx BtnBrowser;
private System.Windows.Forms.FolderBrowserDialog folderBrowserDialog1;
private ryControls.ButtonEx BtnCreate;
private System.Windows.Forms.Label label2;
private System.Windows.Forms.Label label3;
private XPTable.Models.Table table1;
private XPTable.Models.ColumnModel columnModel1;
private XPTable.Models.TextColumn ColName;
private XPTable.Models.TextColumn ColPath;
private XPTable.Models.TableModel tableModel1;
private System.Windows.Forms.Label label4;
public ryControls.TextBoxEx2 TxtFolder;
public System.Windows.Forms.CheckBox ChkUnCreateProject;
public ryControls.TextBoxEx2 TxtProjectName;
public ryControls.TextBoxEx2 TxtProjectEngName;
public ryControls.ComboBoxEx CbbLang;
}
}
@@ -0,0 +1,313 @@
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 System.Xml;
using 开发辅助工具.Manager;
namespace 开发辅助工具.Tools
{
public partial class FrmCreateProject : Form
{
public FrmCreateProject()
{
ProcUse = true;
InitializeComponent();
CbbLang.SelectedIndex = 0;
}
bool ProcUse = false;
RyProject project = new RyProject();
private void FrmCreateProject_Load(object sender, EventArgs e)
{
ryCommon.RyFiles.AddDropDrag(TxtFolder.Handle).ElevatedDragDrop += FrmCreateProject_ElevatedDragDrop;
project.CopyDllToBin = true;
var lines = RyFiles.ReadAllLines(Application.StartupPath+"\\SysDb\\Folder.txt");
for (int i = 0; i < lines.Length; i++)
{
var item = lines[i].Split('|');
if(item.Length>=2)
{
if (System.IO.Directory.Exists(item[1]))
{ AddItem(item[0], item[1]); }
}
}
}
private void AddItem(string name,string path)
{
XPTable.Models.Row itemList = new XPTable.Models.Row()
{
Tag = ""
};
//需要修改此处
itemList.Cells.Add(new XPTable.Models.Cell(name));//示例
var cell = new XPTable.Models.Cell(path);
cell.ForeColor = Color.Gray;
itemList.Cells.Add(cell);
tableModel1.Rows.Add(itemList);
}
private void FrmCreateProject_ElevatedDragDrop(object sender, ElevatedDragDropArgs e)
{
TxtFolder.Text = e.Files[0];
table1.Visible = false;
}
private void BtnBrowser_Click(object sender, EventArgs e)
{
if(folderBrowserDialog1.ShowDialog()==DialogResult.OK)
{
TxtFolder.Text = folderBrowserDialog1.SelectedPath;
table1.Visible = false;
}
}
private void BtnCreate_Click(object sender, EventArgs e)
{
var CshapeBasePath = project.CshapeBasePath;
var ReferenceDllPath = project.ReferenceDllPath;
var path = TxtFolder.Text.TrimEnd('\\');
var project_name = TxtProjectName.Text;
var project_Eng_name = TxtProjectEngName.Text;
#region 判断项目是否符合标准
if (!ryCommon.RyFiles.IsValidFileName(project_name))
{
MessageBox.Show("无效的项目名称(中文)", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information); return;
}
if (!ryCommon.RyFiles.IsValidFileName(project_Eng_name) || !project_Eng_name.Replace(" ", "").IsEngOrNum())
{
MessageBox.Show("无效的项目名称(英文)", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information); return;
}
else if (project_Eng_name.Length < 3 || project_Eng_name.Substring(0, 1).IsInt() || project_Eng_name.Substring(0, 1) == " ")
{
MessageBox.Show("无效的项目名称(英文)", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information); return;
}
var full_path = path + "\\" + project_name;
if(System.IO.Directory.Exists(path + "\\Bin") && System.IO.Directory.Exists(path + "\\Source"))
{
full_path = path;
}
ryCommon.RyFiles.CreateDirectory(full_path);
if(!System.IO.Directory.Exists(full_path))
{
MessageBox.Show("创建路径失败。", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);return;
}
#endregion
BtnCreate.Enabled = false;
var prog_lang = "c#";
if (CbbLang.SelectedIndex == 0) { prog_lang = "c#"; }
else if (CbbLang.SelectedIndex == 1) { prog_lang = "delphi"; }
#region 创建项目必备文件夹和文件
ryCommon.RyFiles.CreateDirectory(full_path + "\\Bin\\Debug\\"+project_Eng_name);
ryCommon.RyFiles.CreateDirectory(full_path + "\\Source");
ryCommon.RyFiles.CreateDirectory(full_path + "\\Res");
ryCommon.RyFiles.CreateDirectory(full_path + "\\Res\\ThirdParty");
ryCommon.RyFiles.CreateDirectory(full_path + "\\Res\\Images");
ryCommon.RyFiles.CreateDirectory(full_path + "\\Publish\\Green");
ryCommon.RyFiles.CreateDirectory(full_path + "\\Publish\\Green\\HistoryVer");
ryCommon.RyFiles.CreateDirectory(full_path + "\\Publish\\Install");
ryCommon.RyFiles.CreateDirectory(full_path + "\\Publish\\Install\\HistoryVer");
ryCommon.RyFiles.CreateDirectory(full_path + "\\Publish\\OriginalFiles");
ryCommon.RyFiles.CreateDirectory(full_path + "\\Publish\\UpdateFile");
ryCommon.RyFiles.CreateDirectory(full_path + "\\Help");
if (!System.IO.File.Exists(full_path + "\\CHANGELOG.md"))
{ ryCommon.RyFiles.WriteAllText(full_path + "\\CHANGELOG.md", "", Encoding.UTF8); }
if (!System.IO.File.Exists(full_path + "\\README.md"))
{ ryCommon.RyFiles.WriteAllText(full_path + "\\README.md", "", Encoding.UTF8); }
if (!System.IO.File.Exists(full_path + "\\Publish\\Publish.set"))
{
ryCommon.RyFiles.WriteAllText(full_path + "\\Publish\\Publish.set", "#del表示删除文件;copy表示复制文件;" +
"\r\n#原目录:Bin\\Debug\\或Bin\\Release,目标目录:Publish\\OriginalFiles" +
"\r\ndel:UserDb\r\ndel:Db\r\ncopy:SysDb\\*->SysDb\\", Encoding.UTF8);
}
#endregion
if (prog_lang == "c#")
{
#region 生成混淆信息
ReactorXML xml = new ReactorXML();
xml.LoadXML(Application.StartupPath + "\\SysDb\\混淆.nrproj");
if (!System.IO.File.Exists(full_path + "\\Bin\\混淆_Debug.nrproj"))
{
List<string> files_debug = new List<string>
{
"Debug\\"+project_Eng_name+"\\" + project_Eng_name + ".exe",
"Debug\\"+project_Eng_name+"\\" + "MyDb.dll",
"Debug\\"+project_Eng_name+"\\" + "MyDb_SQLite.dll",
"Debug\\"+project_Eng_name+"\\" + "ryUpdate.dll",
"Debug\\"+project_Eng_name+"\\" + "ryControls.dll"
};
xml.Save(full_path + "\\Bin\\混淆_Debug.nrproj", files_debug);
}
if (!System.IO.File.Exists(full_path + "\\Bin\\混淆_Release.nrproj"))
{
List<string> files_Release = new List<string>
{
"Release\\"+project_Eng_name+"\\" + project_Eng_name + ".exe",
"Release\\"+project_Eng_name+"\\" + "MyDb.dll",
"Release\\"+project_Eng_name+"\\" + "MyDb_SQLite.dll",
"Release\\"+project_Eng_name+"\\" + "ryUpdate.dll",
"Release\\"+project_Eng_name+"\\" + "ryControls.dll"
};
xml.Save(full_path + "\\Bin\\混淆_Release.nrproj", files_Release);
}
#endregion
}
#region 设置项目配置文件
if (!System.IO.File.Exists(full_path + "\\查看项目.ryp"))
{
ryCommon.Ini ini = new ryCommon.Ini(full_path + "\\查看项目.ryp");
ini.WriteIni("project", "name", project_name);//项目名称
ini.WriteIni("project", "engname", project_Eng_name);//英文项目名称
ini.WriteIni("project", "usqver", 2.1);//使用的标准版本,新毕方项目标准基于USQ 2.1
ini.WriteIni("project", "proglang", prog_lang);//项目使用的语言
ini.WriteIni("project", "progID", Guid.NewGuid().ToString("D"));//项目唯一ID,用于区分不同项目
}
if (!System.IO.File.Exists(full_path + "\\.gitignore")) //复制git忽略规则
{
RyFiles.CopyFile(Application.StartupPath+ "\\SysDb\\.gitignore", full_path + "\\.gitignore");
}
#endregion
if (!ChkUnCreateProject.Checked)
{
#region 复制和修改基准项目
if (System.IO.Directory.Exists(CshapeBasePath) && prog_lang == "c#") //存在基准项目
{
var source_folder = full_path + "\\Source\\" + project_Eng_name;
ryCommon.RyFiles.CopyFile(CshapeBasePath + "\\*", source_folder);
ryCommon.RyFiles.DeleteFile(source_folder + "\\Bin");
ryCommon.RyFiles.DeleteFile(source_folder + "\\obj");
if (System.IO.File.Exists(source_folder + "\\Itrycn_Project.csproj"))
{
ryCommon.RyFiles.MoveFile(source_folder + "\\Itrycn_Project.csproj", source_folder + "\\" + project_Eng_name + ".csproj");
ryCommon.RyFiles.MoveFile(source_folder + "\\Itrycn_Project.csproj.user", source_folder + "\\" + project_Eng_name + ".csproj.user");
}
if (System.IO.File.Exists(source_folder + "\\Itrycn_Project2.csproj"))
{
ryCommon.RyFiles.MoveFile(source_folder + "\\Itrycn_Project2.csproj", source_folder + "\\" + project_Eng_name + ".csproj");
ryCommon.RyFiles.MoveFile(source_folder + "\\Itrycn_Project2.csproj.user", source_folder + "\\" + project_Eng_name + ".csproj.user");
}
#region 写入新的版本信息
var AssemblyInfo = ryCommon.RyFiles.ReadAllText(Application.StartupPath + "\\SysDb\\AssemblyInfo.cs");
AssemblyInfo = AssemblyInfo.Replace("@AssemblyTitle", project_Eng_name);
AssemblyInfo = AssemblyInfo.Replace("@AssemblyProduct", project_Eng_name);
AssemblyInfo = AssemblyInfo.Replace("@Copyright", "Copyright 2010-2020");
ryCommon.RyFiles.WriteAllText(source_folder + "\\Properties\\AssemblyInfo.cs", AssemblyInfo, Encoding.UTF8);
#endregion
#region 替换命名空间
//var Resources = ryCommon.RyFiles.ReadAllText(source_folder + "\\Properties\\Resources.Designer.cs");
//Resources = Resources.Replace("Itrycn_Project.Properties", project_Eng_name.Replace(" ", "") + ".Properties");
//Resources = Resources.Replace("Itrycn_Project2.Properties", project_Eng_name.Replace(" ", "") + ".Properties");
//ryCommon.RyFiles.WriteAllText(source_folder + "\\Properties\\Resources.Designer.cs", Resources, Encoding.UTF8);
//var frmmain = ryCommon.RyFiles.ReadAllText(source_folder + "\\frmmain.Designer.cs");
//frmmain = frmmain.Replace("Itrycn_Project.Properties", project_Eng_name.Replace(" ", "") + ".Properties");
//frmmain = frmmain.Replace("Itrycn_Project2.Properties", project_Eng_name.Replace(" ", "") + ".Properties");
//ryCommon.RyFiles.WriteAllText(source_folder + "\\frmmain.Designer.cs", frmmain, Encoding.UTF8);
#endregion
project.SetCSproj(source_folder + "\\" + project_Eng_name + ".csproj", project_Eng_name);
}
#endregion
}
BtnCreate.Enabled = true;
MessageBox.Show("创建成功。", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
RyFiles.OpenFile(full_path);
}
private void TxtFolder_Enter(object sender, EventArgs e)
{
if (ProcUse) { return; }
table1.Location = new Point(TxtFolder.Left,TxtFolder.Top+TxtFolder.Height);
table1.Visible = true;
table1.BringToFront();
}
private void TxtFolder_Leave(object sender, EventArgs e)
{
if (!table1.Focused)
{
table1.Visible = false;
}
}
private void table1_Leave(object sender, EventArgs e)
{
if (!TxtFolder.Focused)
{
table1.Visible = false;
}
}
private void table1_CellLostFocus(object sender, XPTable.Events.CellFocusEventArgs e)
{
if (e.Row == -1) { table1.Visible = false; }
}
private void TxtFolder_KeyDown(object sender, KeyEventArgs e)
{
if (e.KeyCode == Keys.Down)
{
if (table1.Visible)
{
table1.TableModel.Selections.Clear();
table1.TableModel.Selections.AddCells(0, 0, 0, columnModel1.Columns.Count - 1);
table1.Focus();
}
}
}
private void table1_KeyDown(object sender, KeyEventArgs e)
{
if (e.KeyCode == Keys.Up)
{
if (table1.SelectedItems.Length > 0 && table1.SelectedItems[0].Index == 0)
{
table1.TableModel.Selections.Clear();
TxtFolder.Select();
TxtFolder.SelectionLength = 0;
//rySearch1.Select();
}
}
else if (e.KeyCode == Keys.Enter)
{
if (table1.SelectedItems.Length > 0)
{
TxtFolder.Text = table1.SelectedItems[0].Cells[ColPath].Text;
TxtFolder.SelectionLength = 0;
TxtFolder.SelectionStart = 0;
table1.Visible = false;
}
}
}
private void table1_Click(object sender, EventArgs e)
{
if (table1.SelectedItems.Length > 0)
{
TxtFolder.Text = table1.SelectedItems[0].Cells[ColPath].Text;
TxtFolder.SelectionLength = 0;
TxtFolder.SelectionStart = 0;
table1.Visible = false;
}
}
private void FrmCreateProject_Click(object sender, EventArgs e)
{
table1.Visible = false;
}
private void FrmCreateProject_Shown(object sender, EventArgs e)
{
ProcUse = false;
}
private void TxtFolder_Click(object sender, EventArgs e)
{
table1.Location = new Point(TxtFolder.Left, TxtFolder.Top + TxtFolder.Height);
table1.Visible = true;
table1.BringToFront();
}
}
}
@@ -0,0 +1,129 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<metadata name="folderBrowserDialog1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value>
</metadata>
<metadata name="columnModel1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>224, 29</value>
</metadata>
<metadata name="tableModel1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>365, 29</value>
</metadata>
</root>
+313
View File
@@ -0,0 +1,313 @@
namespace 开发辅助工具.Tools
{
partial class FrmEncode
{
/// <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(FrmEncode));
this.RbChsToUnicode = new System.Windows.Forms.RadioButton();
this.RbUnicodeToChs = new System.Windows.Forms.RadioButton();
this.CbbEncodingCode = new ryControls.RyComboBox();
this.RbURLDecode = new System.Windows.Forms.RadioButton();
this.RbURLEncode = new System.Windows.Forms.RadioButton();
this.RbBase64Decode = new System.Windows.Forms.RadioButton();
this.RbBase64Encode = new System.Windows.Forms.RadioButton();
this.TxtResultCode = new ryControls.TextBoxEx2();
this.menuRight1 = new ryPaiban.Model.MenuRight(this.components);
this.RbChsToUTF8 = new System.Windows.Forms.RadioButton();
this.RbUTF8ToChs = new System.Windows.Forms.RadioButton();
this.RbMD5 = new System.Windows.Forms.RadioButton();
this.RbSHA1 = new System.Windows.Forms.RadioButton();
this.RbSHA256 = new System.Windows.Forms.RadioButton();
this.RbSHA224 = new System.Windows.Forms.RadioButton();
this.RbSHA512 = new System.Windows.Forms.RadioButton();
this.TxtFromCode = new ryControls.Controls.RichTextBox2();
this.SuspendLayout();
//
// RbChsToUnicode
//
this.RbChsToUnicode.AutoSize = true;
this.RbChsToUnicode.Location = new System.Drawing.Point(463, 8);
this.RbChsToUnicode.Name = "RbChsToUnicode";
this.RbChsToUnicode.Size = new System.Drawing.Size(101, 16);
this.RbChsToUnicode.TabIndex = 21;
this.RbChsToUnicode.Text = "中文转Unicode";
this.RbChsToUnicode.UseVisualStyleBackColor = true;
this.RbChsToUnicode.CheckedChanged += new System.EventHandler(this.RbUnicodeToChs_CheckedChanged);
//
// RbUnicodeToChs
//
this.RbUnicodeToChs.AutoSize = true;
this.RbUnicodeToChs.Location = new System.Drawing.Point(356, 8);
this.RbUnicodeToChs.Name = "RbUnicodeToChs";
this.RbUnicodeToChs.Size = new System.Drawing.Size(101, 16);
this.RbUnicodeToChs.TabIndex = 20;
this.RbUnicodeToChs.Text = "Unicode转中文";
this.RbUnicodeToChs.UseVisualStyleBackColor = true;
this.RbUnicodeToChs.CheckedChanged += new System.EventHandler(this.RbUnicodeToChs_CheckedChanged);
//
// CbbEncodingCode
//
this.CbbEncodingCode.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.CbbEncodingCode.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed;
this.CbbEncodingCode.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.CbbEncodingCode.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.CbbEncodingCode.FormattingEnabled = true;
this.CbbEncodingCode.Items.AddRange(new object[] {
"UTF8",
"GBK",
"GB2312",
"ASCII",
"Unicode"});
this.CbbEncodingCode.Location = new System.Drawing.Point(817, 2);
this.CbbEncodingCode.Name = "CbbEncodingCode";
this.CbbEncodingCode.Size = new System.Drawing.Size(121, 22);
this.CbbEncodingCode.TabIndex = 19;
this.CbbEncodingCode.SelectedIndexChanged += new System.EventHandler(this.CbbEncodingCode_SelectedIndexChanged);
//
// RbURLDecode
//
this.RbURLDecode.AutoSize = true;
this.RbURLDecode.Location = new System.Drawing.Point(273, 8);
this.RbURLDecode.Name = "RbURLDecode";
this.RbURLDecode.Size = new System.Drawing.Size(77, 16);
this.RbURLDecode.TabIndex = 18;
this.RbURLDecode.Text = "URLDecode";
this.RbURLDecode.UseVisualStyleBackColor = true;
this.RbURLDecode.CheckedChanged += new System.EventHandler(this.RbBase64Encode_CheckedChanged);
//
// RbURLEncode
//
this.RbURLEncode.AutoSize = true;
this.RbURLEncode.Location = new System.Drawing.Point(190, 8);
this.RbURLEncode.Name = "RbURLEncode";
this.RbURLEncode.Size = new System.Drawing.Size(77, 16);
this.RbURLEncode.TabIndex = 17;
this.RbURLEncode.Text = "URLEncode";
this.RbURLEncode.UseVisualStyleBackColor = true;
this.RbURLEncode.CheckedChanged += new System.EventHandler(this.RbBase64Encode_CheckedChanged);
//
// RbBase64Decode
//
this.RbBase64Decode.AutoSize = true;
this.RbBase64Decode.Location = new System.Drawing.Point(101, 8);
this.RbBase64Decode.Name = "RbBase64Decode";
this.RbBase64Decode.Size = new System.Drawing.Size(83, 16);
this.RbBase64Decode.TabIndex = 16;
this.RbBase64Decode.Text = "Base64解码";
this.RbBase64Decode.UseVisualStyleBackColor = true;
this.RbBase64Decode.CheckedChanged += new System.EventHandler(this.RbBase64Encode_CheckedChanged);
//
// RbBase64Encode
//
this.RbBase64Encode.AutoSize = true;
this.RbBase64Encode.Checked = true;
this.RbBase64Encode.Location = new System.Drawing.Point(12, 8);
this.RbBase64Encode.Name = "RbBase64Encode";
this.RbBase64Encode.Size = new System.Drawing.Size(83, 16);
this.RbBase64Encode.TabIndex = 15;
this.RbBase64Encode.TabStop = true;
this.RbBase64Encode.Text = "Base64编码";
this.RbBase64Encode.UseVisualStyleBackColor = true;
this.RbBase64Encode.CheckedChanged += new System.EventHandler(this.RbBase64Encode_CheckedChanged);
//
// TxtResultCode
//
this.TxtResultCode.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.TxtResultCode.BackColor = System.Drawing.Color.White;
this.TxtResultCode.EmptyText = "转换好后的内容";
this.TxtResultCode.Location = new System.Drawing.Point(12, 234);
this.TxtResultCode.MaxLength = 999999999;
this.TxtResultCode.Multiline = true;
this.TxtResultCode.Name = "TxtResultCode";
this.TxtResultCode.OnlyNumeric = false;
this.TxtResultCode.PasswordChar = '\0';
this.TxtResultCode.ReadOnly = true;
this.TxtResultCode.SelectedText = "";
this.TxtResultCode.SelectionLength = 0;
this.TxtResultCode.SelectionStart = 0;
this.TxtResultCode.Size = new System.Drawing.Size(926, 204);
this.TxtResultCode.TabIndex = 14;
this.TxtResultCode.TextAlign = System.Windows.Forms.HorizontalAlignment.Left;
this.TxtResultCode.ToolTip = "";
this.TxtResultCode.WordWrap = true;
//
// menuRight1
//
this.menuRight1.Name = "menuRight1";
this.menuRight1.Size = new System.Drawing.Size(173, 48);
this.menuRight1.SourceContent = this;
//
// RbChsToUTF8
//
this.RbChsToUTF8.AutoSize = true;
this.RbChsToUTF8.Location = new System.Drawing.Point(665, 8);
this.RbChsToUTF8.Name = "RbChsToUTF8";
this.RbChsToUTF8.Size = new System.Drawing.Size(89, 16);
this.RbChsToUTF8.TabIndex = 23;
this.RbChsToUTF8.Text = "中文转UTF-8";
this.RbChsToUTF8.UseVisualStyleBackColor = true;
this.RbChsToUTF8.CheckedChanged += new System.EventHandler(this.RbUnicodeToChs_CheckedChanged);
//
// RbUTF8ToChs
//
this.RbUTF8ToChs.AutoSize = true;
this.RbUTF8ToChs.Location = new System.Drawing.Point(570, 8);
this.RbUTF8ToChs.Name = "RbUTF8ToChs";
this.RbUTF8ToChs.Size = new System.Drawing.Size(89, 16);
this.RbUTF8ToChs.TabIndex = 22;
this.RbUTF8ToChs.Text = "UTF-8转中文";
this.RbUTF8ToChs.UseVisualStyleBackColor = true;
this.RbUTF8ToChs.CheckedChanged += new System.EventHandler(this.RbUnicodeToChs_CheckedChanged);
//
// RbMD5
//
this.RbMD5.AutoSize = true;
this.RbMD5.Location = new System.Drawing.Point(12, 32);
this.RbMD5.Name = "RbMD5";
this.RbMD5.Size = new System.Drawing.Size(41, 16);
this.RbMD5.TabIndex = 24;
this.RbMD5.Text = "MD5";
this.RbMD5.UseVisualStyleBackColor = true;
this.RbMD5.CheckedChanged += new System.EventHandler(this.RbNoEncoding_CheckedChanged);
//
// RbSHA1
//
this.RbSHA1.AutoSize = true;
this.RbSHA1.Location = new System.Drawing.Point(72, 32);
this.RbSHA1.Name = "RbSHA1";
this.RbSHA1.Size = new System.Drawing.Size(47, 16);
this.RbSHA1.TabIndex = 25;
this.RbSHA1.Text = "SHA1";
this.RbSHA1.UseVisualStyleBackColor = true;
this.RbSHA1.CheckedChanged += new System.EventHandler(this.RbNoEncoding_CheckedChanged);
//
// RbSHA256
//
this.RbSHA256.AutoSize = true;
this.RbSHA256.Location = new System.Drawing.Point(224, 32);
this.RbSHA256.Name = "RbSHA256";
this.RbSHA256.Size = new System.Drawing.Size(59, 16);
this.RbSHA256.TabIndex = 26;
this.RbSHA256.Text = "SHA256";
this.RbSHA256.UseVisualStyleBackColor = true;
this.RbSHA256.CheckedChanged += new System.EventHandler(this.RbNoEncoding_CheckedChanged);
//
// RbSHA224
//
this.RbSHA224.AutoSize = true;
this.RbSHA224.Enabled = false;
this.RbSHA224.Location = new System.Drawing.Point(144, 32);
this.RbSHA224.Name = "RbSHA224";
this.RbSHA224.Size = new System.Drawing.Size(59, 16);
this.RbSHA224.TabIndex = 27;
this.RbSHA224.Text = "SHA224";
this.RbSHA224.UseVisualStyleBackColor = true;
this.RbSHA224.CheckedChanged += new System.EventHandler(this.RbNoEncoding_CheckedChanged);
//
// RbSHA512
//
this.RbSHA512.AutoSize = true;
this.RbSHA512.Location = new System.Drawing.Point(304, 32);
this.RbSHA512.Name = "RbSHA512";
this.RbSHA512.Size = new System.Drawing.Size(59, 16);
this.RbSHA512.TabIndex = 28;
this.RbSHA512.Text = "SHA512";
this.RbSHA512.UseVisualStyleBackColor = true;
this.RbSHA512.CheckedChanged += new System.EventHandler(this.RbNoEncoding_CheckedChanged);
//
// TxtFromCode
//
this.TxtFromCode.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.TxtFromCode.BorderStyle = System.Windows.Forms.BorderStyle.None;
this.TxtFromCode.DetectUrls = false;
this.TxtFromCode.EmptyText = "请填写待转换的内容";
this.TxtFromCode.ForeColor = System.Drawing.Color.Black;
this.TxtFromCode.Location = new System.Drawing.Point(12, 54);
this.TxtFromCode.Name = "TxtFromCode";
this.TxtFromCode.OnlyInputText = true;
this.TxtFromCode.Size = new System.Drawing.Size(926, 174);
this.TxtFromCode.TabIndex = 29;
this.TxtFromCode.Text = "";
this.TxtFromCode.TextChanged += new System.EventHandler(this.TxtFromCode_TextChanged);
this.TxtFromCode.DoubleClick += new System.EventHandler(this.TxtFromCode_DoubleClick_1);
//
// FrmEncode
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(950, 450);
this.Controls.Add(this.TxtFromCode);
this.Controls.Add(this.RbSHA512);
this.Controls.Add(this.RbSHA224);
this.Controls.Add(this.RbSHA256);
this.Controls.Add(this.RbSHA1);
this.Controls.Add(this.RbMD5);
this.Controls.Add(this.RbChsToUTF8);
this.Controls.Add(this.RbUTF8ToChs);
this.Controls.Add(this.RbChsToUnicode);
this.Controls.Add(this.RbUnicodeToChs);
this.Controls.Add(this.CbbEncodingCode);
this.Controls.Add(this.RbURLDecode);
this.Controls.Add(this.RbURLEncode);
this.Controls.Add(this.RbBase64Decode);
this.Controls.Add(this.RbBase64Encode);
this.Controls.Add(this.TxtResultCode);
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
this.Name = "FrmEncode";
this.TabPageContextMenuStrip = this.menuRight1;
this.Text = "编码解码";
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
private System.Windows.Forms.RadioButton RbChsToUnicode;
private System.Windows.Forms.RadioButton RbUnicodeToChs;
private ryControls.RyComboBox CbbEncodingCode;
private System.Windows.Forms.RadioButton RbURLDecode;
private System.Windows.Forms.RadioButton RbURLEncode;
private System.Windows.Forms.RadioButton RbBase64Decode;
private System.Windows.Forms.RadioButton RbBase64Encode;
private ryControls.TextBoxEx2 TxtResultCode;
private ryPaiban.Model.MenuRight menuRight1;
private System.Windows.Forms.RadioButton RbChsToUTF8;
private System.Windows.Forms.RadioButton RbUTF8ToChs;
private System.Windows.Forms.RadioButton RbMD5;
private System.Windows.Forms.RadioButton RbSHA1;
private System.Windows.Forms.RadioButton RbSHA256;
private System.Windows.Forms.RadioButton RbSHA224;
private System.Windows.Forms.RadioButton RbSHA512;
private ryControls.Controls.RichTextBox2 TxtFromCode;
}
}
@@ -0,0 +1,258 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Security.Cryptography;
using System.Text;
using System.Text.RegularExpressions;
using System.Windows.Forms;
using WeifenLuo.WinFormsUI.Docking;
namespace 开发辅助工具.Tools
{
public partial class FrmEncode : DockContent
{
public FrmEncode()
{
InitializeComponent();
CbbEncodingCode.SelectedIndex = 0;
}
RyWeb.QuickWeb web = new RyWeb.QuickWeb();
private void AutoCode()
{
string from_text = TxtFromCode.Text;
if (from_text == "") { TxtResultCode.Text = ""; return; }
#region 获取编码
Encoding encoding = Encoding.UTF8;
switch (CbbEncodingCode.SelectedIndex)
{
case 0: encoding = Encoding.UTF8; break;
case 1: encoding = Encoding.GetEncoding("GBK"); break;
case 2: encoding = Encoding.GetEncoding("GB2312"); break;
case 3: encoding = Encoding.ASCII; break;
case 4: encoding = Encoding.Unicode; break;
case 5: encoding = Encoding.BigEndianUnicode; break;
case 6: encoding = Encoding.UTF7; break;
case 7: encoding = Encoding.UTF32; break;
}
#endregion
if (RbBase64Encode.Checked)
{
#region Base64加密
try
{
byte[] bytedata = encoding.GetBytes(from_text);
TxtResultCode.Text = Convert.ToBase64String(bytedata, 0, bytedata.Length);
}
catch
{
TxtResultCode.Text = "";
}
#endregion
}
else if (RbBase64Decode.Checked)
{
#region Base64解密
try
{
byte[] bytes = Convert.FromBase64String(from_text);
TxtResultCode.Text = encoding.GetString(bytes);
}
catch
{
TxtResultCode.Text = "";
}
#endregion
}
else if (RbURLEncode.Checked)
{
TxtResultCode.Text = web.UrlEncode(from_text, encoding);
}
else if (RbURLDecode.Checked)
{
TxtResultCode.Text = RyWeb.WebDecode.UrlDecode(from_text, encoding);
}
else if (RbUnicodeToChs.Checked)
{
#region Unicode转字符串
try
{
TxtResultCode.Text = Regex.Unescape(from_text);
}
catch { TxtResultCode.Text = ""; }
#endregion
}
else if (RbChsToUnicode.Checked)
{
#region 字符串转Unicode码
try
{
TxtResultCode.Text = GetUnicode(from_text);
}
catch { TxtResultCode.Text = ""; }
string GetUnicode(string text)
{
string result = "";
for (int i = 0; i < text.Length; i++)
{
//if ((int)text[i] > 32 && (int)text[i] < 127)
//{
// result += text[i].ToString();
//}
//else
result += string.Format("\\u{0:x4}", (int)text[i]);
}
return result;
}
#endregion
}
else if (RbUTF8ToChs.Checked)
{
#region UTF8转字符串
try
{
TxtResultCode.Text = RyWeb.WebDecode.Unescape(from_text.Replace("&#x","%u").Replace(";", ""));
}
catch { TxtResultCode.Text = ""; }
#endregion
}
else if (RbChsToUTF8.Checked)
{
#region 字符串转UTF8
try
{
TxtResultCode.Text = RyWeb.WebDecode.Escape(from_text);
}
catch { TxtResultCode.Text = ""; }
#endregion
}
else if (RbMD5.Checked)
{
#region 获取MD5
try
{
TxtResultCode.Text = rySafe.MD5Sha1.GetMD5(from_text);
}
catch { TxtResultCode.Text = ""; }
#endregion
}
else if (RbSHA1.Checked)
{
#region 获取SHA1
try
{
TxtResultCode.Text = rySafe.MD5Sha1.GetSHA1(from_text);
}
catch { TxtResultCode.Text = ""; }
#endregion
}
else if (RbSHA224.Checked)
{
#region 获取SHA224
try
{
//TxtResultCode.Text = rySafe.MD5Sha1.GetSHA224(from_text);
}
catch { TxtResultCode.Text = ""; }
#endregion
}
else if (RbSHA256.Checked)
{
#region 获取SHA256
try
{
TxtResultCode.Text = rySafe.MD5Sha1.GetSHA256(from_text);
}
catch { TxtResultCode.Text = ""; }
#endregion
}
else if (RbSHA512.Checked)
{
#region 获取SHA256
try
{
TxtResultCode.Text = rySafe.MD5Sha1.GetSHA512(from_text);
}
catch { TxtResultCode.Text = ""; }
#endregion
}
}
public string get_uft8(string unicodeString)
{
UTF8Encoding utf8 = new UTF8Encoding();
Byte[] encodedBytes = utf8.GetBytes(unicodeString);
String decodedString = utf8.GetString(encodedBytes);
return decodedString;
}
public static string gb2312_utf8(string text)
{
//声明字符集
System.Text.Encoding utf8, gb2312;
//gb2312
gb2312 = System.Text.Encoding.GetEncoding("gb2312");
//utf8
utf8 = System.Text.Encoding.GetEncoding("utf-8");
byte[] gb;
gb = gb2312.GetBytes(text);
gb = System.Text.Encoding.Convert(gb2312, utf8, gb);
//返回转换后的字符
return utf8.GetString(gb);
}
private void CbbEncodingCode_SelectedIndexChanged(object sender, EventArgs e)
{
AutoCode();
}
private void RbBase64Encode_CheckedChanged(object sender, EventArgs e)
{
RadioButton chk = (RadioButton)sender;
if (chk.Checked)
{
CbbEncodingCode.Enabled = true;
}
AutoCode();
}
private void RbUnicodeToChs_CheckedChanged(object sender, EventArgs e)
{
RadioButton chk = (RadioButton)sender;
if (chk.Checked)
{
CbbEncodingCode.Enabled = false;
}
AutoCode();
}
private void RbNoEncoding_CheckedChanged(object sender, EventArgs e)
{
RadioButton chk = (RadioButton)sender;
if (chk.Checked)
{
CbbEncodingCode.Enabled = false;
}
AutoCode();
}
private void TxtFromCode_TextChanged(object sender, EventArgs e)
{
AutoCode();
}
private void TxtFromCode_DoubleClick_1(object sender, EventArgs e)
{
ryControls.Controls.RichTextBox2 txt = (ryControls.Controls.RichTextBox2)sender;
开发辅助工具.Controls.FrmText frm = new Controls.FrmText
{
Icon = Icon
};
frm.richTextBox1.Text = txt.Text;
if (frm.ShowDialog() == DialogResult.OK)
{
txt.Text = frm.richTextBox1.Text;
}
}
}
}
@@ -0,0 +1,200 @@
<?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="menuRight1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</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>
AAABAAEAICAAAAEAIACoEAAAFgAAACgAAAAgAAAAQAAAAAEAIAAAAAAAABAAACUWAAAlFgAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAQAAAAEAAAABAAAAAQAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAEAAAABAAAAAQAAAAEAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAFAAAACAAA
AAgAAAAIAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAIAAAACAAAAAgAAAAFAAAAAQAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAIAAAANAAAAEAAAABAAAAAPAAAABgAAAAAAAAAAAAAAAAAAAAAAAAAGAAAADwAAABAAAAAQAAAADQAA
AAIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAUAAAAVAAAAGQAAABgAAAAWAAAACAAAAAAAAAAAAAAACAAAABYAAAAYAAAAGQAA
ABUAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAA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AAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAA+APAH/gBgB/4AAAf+AAAH/wAAD/+AAB//wAA//+AAf//wAP//4AB//8A
AP/+AAB//AAAP/gAAB/wAAAP4AGAB+ADwAfgB+AH4A/wB+AH4AfgA8AH4AGAB/AAAA/4AAAf/AAAP/4A
AH//AAD//4AB///AA///4Af///////////8=
</value>
</data>
</root>
+249
View File
@@ -0,0 +1,249 @@
namespace 开发辅助工具.Tools
{
partial class FrmJson
{
/// <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(FrmJson));
this.splitContainer1 = new System.Windows.Forms.SplitContainer();
this.textEditorControl1 = new ICSharpCode.TextEditor.TextEditorControl();
this.contextMenuStripHighlightText1 = new ryProcessManager.hezuo.ContextMenuStripHighlightText();
this.treeView1 = new System.Windows.Forms.TreeView();
this.contextMenuStrip1 = new System.Windows.Forms.ContextMenuStrip(this.components);
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.折叠ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.toolStrip1 = new System.Windows.Forms.ToolStrip();
this.BtnFormat = new System.Windows.Forms.ToolStripButton();
this.BtnPasteJson = new System.Windows.Forms.ToolStripButton();
this.BtnCopyJson = new System.Windows.Forms.ToolStripButton();
this.menuRight1 = new ryPaiban.Model.MenuRight(this.components);
this.CopyJsonByCHS = new System.Windows.Forms.ToolStripButton();
((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).BeginInit();
this.splitContainer1.Panel1.SuspendLayout();
this.splitContainer1.Panel2.SuspendLayout();
this.splitContainer1.SuspendLayout();
this.contextMenuStrip1.SuspendLayout();
this.toolStrip1.SuspendLayout();
this.SuspendLayout();
//
// splitContainer1
//
this.splitContainer1.Dock = System.Windows.Forms.DockStyle.Fill;
this.splitContainer1.Location = new System.Drawing.Point(0, 25);
this.splitContainer1.Name = "splitContainer1";
//
// splitContainer1.Panel1
//
this.splitContainer1.Panel1.Controls.Add(this.textEditorControl1);
//
// splitContainer1.Panel2
//
this.splitContainer1.Panel2.Controls.Add(this.treeView1);
this.splitContainer1.Size = new System.Drawing.Size(800, 491);
this.splitContainer1.SplitterDistance = 400;
this.splitContainer1.TabIndex = 0;
//
// textEditorControl1
//
this.textEditorControl1.ContextMenuStrip = this.contextMenuStripHighlightText1;
this.textEditorControl1.Dock = System.Windows.Forms.DockStyle.Fill;
this.textEditorControl1.IsReadOnly = false;
this.textEditorControl1.Location = new System.Drawing.Point(0, 0);
this.textEditorControl1.Name = "textEditorControl1";
this.textEditorControl1.Size = new System.Drawing.Size(400, 491);
this.textEditorControl1.TabIndex = 22;
//
// contextMenuStripHighlightText1
//
this.contextMenuStripHighlightText1.Name = "contextMenuStripHighlightText1";
this.contextMenuStripHighlightText1.Size = new System.Drawing.Size(101, 186);
//
// treeView1
//
this.treeView1.ContextMenuStrip = this.contextMenuStrip1;
this.treeView1.Dock = System.Windows.Forms.DockStyle.Fill;
this.treeView1.FullRowSelect = true;
this.treeView1.HideSelection = false;
this.treeView1.HotTracking = true;
this.treeView1.ItemHeight = 20;
this.treeView1.Location = new System.Drawing.Point(0, 0);
this.treeView1.Name = "treeView1";
this.treeView1.Size = new System.Drawing.Size(396, 491);
this.treeView1.TabIndex = 0;
this.treeView1.MouseDown += new System.Windows.Forms.MouseEventHandler(this.TreeView1_MouseDown);
//
// contextMenuStrip1
//
this.contextMenuStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.复制键名ToolStripMenuItem,
this.复制键值ToolStripMenuItem,
this.toolStripMenuItem1,
this.展开ToolStripMenuItem,
this.折叠ToolStripMenuItem});
this.contextMenuStrip1.Name = "contextMenuStrip1";
this.contextMenuStrip1.Size = new System.Drawing.Size(125, 98);
//
// 复制键名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);
//
// toolStripMenuItem1
//
this.toolStripMenuItem1.Name = "toolStripMenuItem1";
this.toolStripMenuItem1.Size = new System.Drawing.Size(121, 6);
//
// 展开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);
//
// toolStrip1
//
this.toolStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.BtnFormat,
this.BtnPasteJson,
this.BtnCopyJson,
this.CopyJsonByCHS});
this.toolStrip1.Location = new System.Drawing.Point(0, 0);
this.toolStrip1.Name = "toolStrip1";
this.toolStrip1.Size = new System.Drawing.Size(800, 25);
this.toolStrip1.TabIndex = 2;
this.toolStrip1.Text = "toolStrip1";
//
// BtnFormat
//
this.BtnFormat.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Text;
this.BtnFormat.Image = ((System.Drawing.Image)(resources.GetObject("BtnFormat.Image")));
this.BtnFormat.ImageTransparentColor = System.Drawing.Color.Magenta;
this.BtnFormat.Name = "BtnFormat";
this.BtnFormat.Size = new System.Drawing.Size(48, 22);
this.BtnFormat.Text = "格式化";
this.BtnFormat.Click += new System.EventHandler(this.BtnFormat_Click);
//
// BtnPasteJson
//
this.BtnPasteJson.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Text;
this.BtnPasteJson.Image = ((System.Drawing.Image)(resources.GetObject("BtnPasteJson.Image")));
this.BtnPasteJson.ImageTransparentColor = System.Drawing.Color.Magenta;
this.BtnPasteJson.Name = "BtnPasteJson";
this.BtnPasteJson.Size = new System.Drawing.Size(62, 22);
this.BtnPasteJson.Text = "粘贴Json";
this.BtnPasteJson.Click += new System.EventHandler(this.BtnPasteJson_Click);
//
// BtnCopyJson
//
this.BtnCopyJson.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Text;
this.BtnCopyJson.Image = ((System.Drawing.Image)(resources.GetObject("BtnCopyJson.Image")));
this.BtnCopyJson.ImageTransparentColor = System.Drawing.Color.Magenta;
this.BtnCopyJson.Name = "BtnCopyJson";
this.BtnCopyJson.Size = new System.Drawing.Size(62, 22);
this.BtnCopyJson.Text = "复制Json";
this.BtnCopyJson.Click += new System.EventHandler(this.BtnCopyJson_Click);
//
// menuRight1
//
this.menuRight1.Name = "menuRight1";
this.menuRight1.Size = new System.Drawing.Size(173, 48);
this.menuRight1.SourceContent = this;
//
// CopyJsonByCHS
//
this.CopyJsonByCHS.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Text;
this.CopyJsonByCHS.Image = ((System.Drawing.Image)(resources.GetObject("CopyJsonByCHS.Image")));
this.CopyJsonByCHS.ImageTransparentColor = System.Drawing.Color.Magenta;
this.CopyJsonByCHS.Name = "CopyJsonByCHS";
this.CopyJsonByCHS.Size = new System.Drawing.Size(84, 22);
this.CopyJsonByCHS.Text = "中文转义复制";
this.CopyJsonByCHS.Click += new System.EventHandler(this.CopyJsonByCHS_Click);
//
// FrmJson
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(800, 516);
this.Controls.Add(this.splitContainer1);
this.Controls.Add(this.toolStrip1);
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
this.Name = "FrmJson";
this.TabPageContextMenuStrip = this.menuRight1;
this.Text = "Json查看";
this.Load += new System.EventHandler(this.FrmJson_Load);
this.splitContainer1.Panel1.ResumeLayout(false);
this.splitContainer1.Panel2.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).EndInit();
this.splitContainer1.ResumeLayout(false);
this.contextMenuStrip1.ResumeLayout(false);
this.toolStrip1.ResumeLayout(false);
this.toolStrip1.PerformLayout();
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
private System.Windows.Forms.SplitContainer splitContainer1;
private ICSharpCode.TextEditor.TextEditorControl textEditorControl1;
private System.Windows.Forms.TreeView treeView1;
private ryProcessManager.hezuo.ContextMenuStripHighlightText contextMenuStripHighlightText1;
private System.Windows.Forms.ContextMenuStrip contextMenuStrip1;
private System.Windows.Forms.ToolStripMenuItem 复制键名ToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem 复制键值ToolStripMenuItem;
private System.Windows.Forms.ToolStrip toolStrip1;
private System.Windows.Forms.ToolStripButton BtnFormat;
private System.Windows.Forms.ToolStripButton BtnPasteJson;
private System.Windows.Forms.ToolStripButton BtnCopyJson;
private ryPaiban.Model.MenuRight menuRight1;
private System.Windows.Forms.ToolStripSeparator toolStripMenuItem1;
private System.Windows.Forms.ToolStripMenuItem 展开ToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem 折叠ToolStripMenuItem;
private System.Windows.Forms.ToolStripButton CopyJsonByCHS;
}
}
+260
View File
@@ -0,0 +1,260 @@
using ICSharpCode.TextEditor.Document;
using Newtonsoft.Json;
using Newtonsoft.Json.Linq;
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 WeifenLuo.WinFormsUI.Docking;
namespace 开发辅助工具.Tools
{
public partial class FrmJson : DockContent
{
public FrmJson()
{
InitializeComponent();
}
private void LoadTreeList(TreeNodeCollection nodes,JObject jo)
{
foreach (var item in jo)
{
if (item.Value.HasValues)
{
var node = nodes.Add(item.Key.ToString());
node.Tag = new JsonInfo() { name = item.Key.ToString(), value = item.Value.ToString() };
try
{
JArray jar = JArray.Parse(item.Value.ToString());
if (jar != null)
{
for (int i = 0; i < jar.Count; i++)
{
var node1 = node.Nodes.Add(i.ToString());
node.Tag = new JsonInfo() { name = item.Key.ToString(), value = item.Value.ToString() };
LoadTreeList(node1.Nodes, (JObject)JsonConvert.DeserializeObject(jar[i].ToString()));
//TreeNode new_child = new TreeNode();
//new_child.Text = jar[i].ToString();
//node.Nodes.Add(new_child);
}
}
}
catch(Exception)
{ LoadTreeList(node.Nodes, (JObject)JsonConvert.DeserializeObject(item.Value.ToString())); }
//JArray jar = JArray.Parse(item.Value.ToString());
//if (jar.Count != 0)
{
//for (int i = 0; i < jar.Count; i++)
//{
// TreeNode new_child = new TreeNode();
// new_child.Text = jar[i].ToString();
// nodes.Add(new_child);
//}
}
}
else
{
var node = nodes.Add(item.ToString());
node.Tag = new JsonInfo() { name = item.Key.ToString(), value = item.Value.ToString() };
}
}
}
private void BtnFormat_Click(object sender, EventArgs e)
{
string json_text = textEditorControl1.Text;
treeView1.Nodes.Clear();
//if (Manager.Json.IsJson(json_text))
{
try
{
textEditorControl1.Document.TextContent = Manager.Json.ConvertJsonString(json_text);
textEditorControl1.Refresh();
JObject jo = null;
if (Manager.Json.IsArray(json_text))
{
var node2 = treeView1.Nodes.Add("0");
JArray jar = JArray.Parse(json_text);
ScanArray(node2.Nodes, jar);
}
else
{
jo = (JObject)JsonConvert.DeserializeObject(json_text);
Scan(treeView1.Nodes, jo);
}
void Scan(TreeNodeCollection nodes, JObject _jo)
{
IEnumerable<JProperty> properties = _jo.Properties();
foreach (JProperty item in properties)
{
if (item.Value.Type == JTokenType.Array)
{
var node2 = nodes.Add(item.Name);
node2.Tag = new JsonInfo() { name = item.Name, value = item.Value.ToString() };
JArray jar = JArray.Parse(item.Value.ToString());
ScanArray(node2.Nodes, jar);
}
else if (item.Value.Type == JTokenType.Object)
{
var node2 = nodes.Add(item.Name);
node2.Tag = new JsonInfo() { name = item.Name, value = item.Value.ToString() };
Scan(node2.Nodes, (JObject)JsonConvert.DeserializeObject(item.Value.ToString()));
}
else {
var node = nodes.Add(item.Name + ":" + item.Value + "|" + item.Value.Type.ToString());
node.Tag = new JsonInfo() { name = item.Name, value = item.Value.ToString() };
}
//Console.WriteLine(item.Name + ":" + item.Value);
}
//var values = _jo.Values<JProperty>();
//foreach (var item in values)
//{
// var va = item.Value<JProperty>().Children.Children<JProperty>();
// var node = nodes.Add(item.ToString());
// //if(item.HasValues)
// //Scan(node.Nodes,(JObject)JsonConvert.DeserializeObject(item.ToString()));
//}
}
void ScanArray(TreeNodeCollection nodes, JArray jar)
{
if (jar != null)
{
for (int i = 0; i < jar.Count; i++)
{
var node3 = nodes.Add(i.ToString());
if (jar[i].Type == JTokenType.Object)
{
Scan(node3.Nodes, (JObject)jar[i]);
}
else
{
node3.Nodes.Add(jar[i].ToString());
node3.Tag = new JsonInfo() { name = jar[i].ToString() };
}
}
}
}
//if (Manager.Json.IsArray(json_text))
//{
// JArray jar = JArray.Parse(json_text);
// if (jar != null)
// {
// for (int i = 0; i < jar.Count; i++)
// {
// var node1 = treeView1.Nodes.Add(i.ToString());
// LoadTreeList(node1.Nodes, (JObject)JsonConvert.DeserializeObject(jar[i].ToString()));
// //TreeNode new_child = new TreeNode();
// //new_child.Text = jar[i].ToString();
// //node.Nodes.Add(new_child);
// }
// }
//}
//else
//{
// jo = (JObject)JsonConvert.DeserializeObject(json_text);
//}
//LoadTreeList(treeView1.Nodes,jo);
//for (int i = 0; i < jo.Count; i++)
//{
// treeView1.Nodes.Add(jo..ToString());
//}
}
catch(Exception ex)
{
MessageBox.Show(ex.Message, "错误", MessageBoxButtons.OK, MessageBoxIcon.Information);
}
}
//else
//{
// MessageBox.Show("无效的Json内容", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
// textEditorControl1.Document.TextContent = json_text;
// textEditorControl1.Refresh();
//}
}
public void LoadJson(string json_text)
{
textEditorControl1.Document.TextContent = json_text;
textEditorControl1.Refresh();
BtnFormat.PerformClick();
}
private void 复制键名ToolStripMenuItem_Click(object sender, EventArgs e)
{
if (treeView1.SelectedNode == null) { return; }
JsonInfo item = (JsonInfo)treeView1.SelectedNode.Tag;
ryCommon.RyFiles.CopyToClip(item.name);
}
private void 复制键值ToolStripMenuItem_Click(object sender, EventArgs e)
{
if (treeView1.SelectedNode == null) { return; }
if (treeView1.SelectedNode.Tag == null) { return; }
JsonInfo item = (JsonInfo)treeView1.SelectedNode.Tag;
ryCommon.RyFiles.CopyToClip(item.value);
}
private void BtnPasteJson_Click(object sender, EventArgs e)
{
textEditorControl1.BeginUpdate();
textEditorControl1.Document.TextContent = Clipboard.GetText();
textEditorControl1.Refresh();
textEditorControl1.EndUpdate();
BtnFormat.PerformClick();
}
private void BtnCopyJson_Click(object sender, EventArgs e)
{
ryCommon.RyFiles.CopyToClip(textEditorControl1.Text);
}
private void FrmJson_Load(object sender, EventArgs e)
{
textEditorControl1.Document.HighlightingStrategy = HighlightingStrategyFactory.CreateHighlightingStrategy("JSON");
}
private void TreeView1_MouseDown(object sender, MouseEventArgs e)
{
if (e.Button == MouseButtons.Right)//判断你点的是不是右键
{
Point ClickPoint = new Point(e.X, e.Y);
TreeNode CurrentNode = treeView1.GetNodeAt(ClickPoint);
if (CurrentNode != null)//判断你点的是不是一个节点
{
treeView1.SelectedNode = CurrentNode;//选中这个节点
}
}
}
private void 展开ToolStripMenuItem_Click(object sender, EventArgs e)
{
treeView1.ExpandAll();
}
private void 折叠ToolStripMenuItem_Click(object sender, EventArgs e)
{
treeView1.CollapseAll();
}
private void CopyJsonByCHS_Click(object sender, EventArgs e)
{
try
{
JObject jo = (JObject)JsonConvert.DeserializeObject(textEditorControl1.Text);
var aa = Newtonsoft.Json.JsonConvert.SerializeObject(jo, new Newtonsoft.Json.JsonSerializerSettings() { StringEscapeHandling = Newtonsoft.Json.StringEscapeHandling.EscapeNonAscii });
ryCommon.RyFiles.CopyToClip(aa);
}
catch(Exception ex) {
MessageBox.Show(ex.Message, "出错", MessageBoxButtons.OK, MessageBoxIcon.Information);
}
}
}
public class JsonInfo
{
public string name = "";
public string value = "";
}
}
@@ -0,0 +1,269 @@
<?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="contextMenuStripHighlightText1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value>
</metadata>
<metadata name="contextMenuStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>262, 17</value>
</metadata>
<metadata name="toolStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>427, 17</value>
</metadata>
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<data name="BtnFormat.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAIDSURBVDhPpZLrS5NhGMb3j4SWh0oRQVExD4gonkDpg4hG
YKxG6WBogkMZKgPNCEVJFBGdGETEvgwyO9DJE5syZw3PIlPEE9pgBCLZ5XvdMB8Ew8gXbl54nuf63dd9
0OGSnwCahxbPRNPAPMw9Xpg6ZmF46kZZ0xSKzJPIrhpDWsVnpBhGkKx3nAX8Pv7z1zg8OoY/cITdn4fw
bf/C0kYAN3Ma/w3gWfZL5kzTKBxjWyK2DftwI9tyMYCZKXbNHaD91bLYJrDXsYbrWfUKwJrPE9M2M1Oc
VzOOpHI7Jr376Hi9ogHqFIANO0/MmmmbmSmm9a8ze+I4MrNWAdjtoJgWcx+PSzg166yZZ8xM8XvXDix9
c4jIqFYAjoriBV9AhEPv1mH/sonogha0afbZMMZz+yreTGyhpusHwtNNCsA5U1zS4BLxzJIfg299qO32
Ir7UJtZfftyATqeT+8o2D8JSjQrAJblrncYL7ZJ2+bfaFnC/1S1NjL3diRat7qrO7wLRP3HjWsojBeCo
mDEo5mNjuweFGvjWg2EBhCbpkW78htSHHwRyNdmgAFzPEee2iFkzayy2OLXzT4gr6UdUnlXrullsxxQ+
kx0g8BTA3aZlButjSTyjODq/WcQcW/B/Je4OQhLvKQDnzN1mp0nnkvAhR8VuMzNrpm1mpjgkoVwB/v8D
TgDQASA1MVpwzwAAAABJRU5ErkJggg==
</value>
</data>
<data name="BtnPasteJson.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAIDSURBVDhPpZLrS5NhGMb3j4SWh0oRQVExD4gonkDpg4hG
YKxG6WBogkMZKgPNCEVJFBGdGETEvgwyO9DJE5syZw3PIlPEE9pgBCLZ5XvdMB8Ew8gXbl54nuf63dd9
0OGSnwCahxbPRNPAPMw9Xpg6ZmF46kZZ0xSKzJPIrhpDWsVnpBhGkKx3nAX8Pv7z1zg8OoY/cITdn4fw
bf/C0kYAN3Ma/w3gWfZL5kzTKBxjWyK2DftwI9tyMYCZKXbNHaD91bLYJrDXsYbrWfUKwJrPE9M2M1Oc
VzOOpHI7Jr376Hi9ogHqFIANO0/MmmmbmSmm9a8ze+I4MrNWAdjtoJgWcx+PSzg166yZZ8xM8XvXDix9
c4jIqFYAjoriBV9AhEPv1mH/sonogha0afbZMMZz+yreTGyhpusHwtNNCsA5U1zS4BLxzJIfg299qO32
Ir7UJtZfftyATqeT+8o2D8JSjQrAJblrncYL7ZJ2+bfaFnC/1S1NjL3diRat7qrO7wLRP3HjWsojBeCo
mDEo5mNjuweFGvjWg2EBhCbpkW78htSHHwRyNdmgAFzPEee2iFkzayy2OLXzT4gr6UdUnlXrullsxxQ+
kx0g8BTA3aZlButjSTyjODq/WcQcW/B/Je4OQhLvKQDnzN1mp0nnkvAhR8VuMzNrpm1mpjgkoVwB/v8D
TgDQASA1MVpwzwAAAABJRU5ErkJggg==
</value>
</data>
<data name="BtnCopyJson.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAIDSURBVDhPpZLrS5NhGMb3j4SWh0oRQVExD4gonkDpg4hG
YKxG6WBogkMZKgPNCEVJFBGdGETEvgwyO9DJE5syZw3PIlPEE9pgBCLZ5XvdMB8Ew8gXbl54nuf63dd9
0OGSnwCahxbPRNPAPMw9Xpg6ZmF46kZZ0xSKzJPIrhpDWsVnpBhGkKx3nAX8Pv7z1zg8OoY/cITdn4fw
bf/C0kYAN3Ma/w3gWfZL5kzTKBxjWyK2DftwI9tyMYCZKXbNHaD91bLYJrDXsYbrWfUKwJrPE9M2M1Oc
VzOOpHI7Jr376Hi9ogHqFIANO0/MmmmbmSmm9a8ze+I4MrNWAdjtoJgWcx+PSzg166yZZ8xM8XvXDix9
c4jIqFYAjoriBV9AhEPv1mH/sonogha0afbZMMZz+yreTGyhpusHwtNNCsA5U1zS4BLxzJIfg299qO32
Ir7UJtZfftyATqeT+8o2D8JSjQrAJblrncYL7ZJ2+bfaFnC/1S1NjL3diRat7qrO7wLRP3HjWsojBeCo
mDEo5mNjuweFGvjWg2EBhCbpkW78htSHHwRyNdmgAFzPEee2iFkzayy2OLXzT4gr6UdUnlXrullsxxQ+
kx0g8BTA3aZlButjSTyjODq/WcQcW/B/Je4OQhLvKQDnzN1mp0nnkvAhR8VuMzNrpm1mpjgkoVwB/v8D
TgDQASA1MVpwzwAAAABJRU5ErkJggg==
</value>
</data>
<data name="CopyJsonByCHS.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAIDSURBVDhPpZLrS5NhGMb3j4SWh0oRQVExD4gonkDpg4hG
YKxG6WBogkMZKgPNCEVJFBGdGETEvgwyO9DJE5syZw3PIlPEE9pgBCLZ5XvdMB8Ew8gXbl54nuf63dd9
0OGSnwCahxbPRNPAPMw9Xpg6ZmF46kZZ0xSKzJPIrhpDWsVnpBhGkKx3nAX8Pv7z1zg8OoY/cITdn4fw
bf/C0kYAN3Ma/w3gWfZL5kzTKBxjWyK2DftwI9tyMYCZKXbNHaD91bLYJrDXsYbrWfUKwJrPE9M2M1Oc
VzOOpHI7Jr376Hi9ogHqFIANO0/MmmmbmSmm9a8ze+I4MrNWAdjtoJgWcx+PSzg166yZZ8xM8XvXDix9
c4jIqFYAjoriBV9AhEPv1mH/sonogha0afbZMMZz+yreTGyhpusHwtNNCsA5U1zS4BLxzJIfg299qO32
Ir7UJtZfftyATqeT+8o2D8JSjQrAJblrncYL7ZJ2+bfaFnC/1S1NjL3diRat7qrO7wLRP3HjWsojBeCo
mDEo5mNjuweFGvjWg2EBhCbpkW78htSHHwRyNdmgAFzPEee2iFkzayy2OLXzT4gr6UdUnlXrullsxxQ+
kx0g8BTA3aZlButjSTyjODq/WcQcW/B/Je4OQhLvKQDnzN1mp0nnkvAhR8VuMzNrpm1mpjgkoVwB/v8D
TgDQASA1MVpwzwAAAABJRU5ErkJggg==
</value>
</data>
<metadata name="menuRight1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>537, 17</value>
</metadata>
<data name="$this.Icon" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
AAABAAEAICAAAAEAIACoEAAAFgAAACgAAAAgAAAAQAAAAAEAIAAAAAAAABAAABMLAAATCwAAAAAAAAAA
AAAAAAMAAAADAAAAAwAAAAMAAAADAAAAAwAAAAMAAAADAAAAAwAAAAMAAAADAAAAAwAAAAMAAAADAAAA
AwAAAAMAAAADAAAAAwAAAAMAAAADAAAAAwAAAAMAAAADAAAAAwAAAAMAAAADAAAAAwAAAAMAAAADAAAA
AwAAAAMAAAADAAAAAwAAAAMAAAADAAAAAwEAAAMBAAADAgAAAwMAAAMDAAADBAAAAwQAAAMFAAADBQAA
AwYAAAMGAAADBgAAAwYAAAMGAAADBgAAAwYAAAMGAAADBQAAAwUAAAMEAAADBAAAAwMAAAMDAAADAgAA
AwEAAAMBAAADAAAAAwAAAAMAAAADAAAAAwMAAAMMAAADFQAAAxsAAAMfAAACIgAAACIAAAAjAAAAJQAA
ACcAAAAoAAAAKQAAACkAAAAqAAAAKgAAACoAAAAqAAAAKQAAACkAAAAoAAAAJwAAACUAAAAjAAAAIQAA
ACIAAAMfAAADGwAAAxUAAAMMAAADAwAAAwAAAAMAAAADBAAAAxMAAAMhAAADKQAAAi4FBQgzaWlrYZSU
lo+YmJqVmJialpmZmpaampuXmpqbl5qanJeampyYm5ucmJubnJebm5yXm5ucl5ubnJabm5yWm5uclZqa
nJSDg4V2JiYoPAAAAC0AAAMpAAADIQAAAxMAAAMEAAADAAAAAwAAAAMBAAADAwAAAwYAAAIIAAAACLGx
slvFxcboysrL/8zMzf/Ozs//z8/Q/9HR0v/S0tP/09PU/9PT1P/T09T/09PU/9PT1P/T09T/0tLT/9HR
0v/Q0NH/zs7P/8vLzPnAwMKXV1dZEgAAAAgAAAMGAAADAwAAAwEAAAMAAAADAAAAAwAAAAMAAAADAJSU
lgDU1NUIy8vMtszMzf/Ozs//0NDR/9LS0//U1NX/1dXW/9bW1//X19j/2NjZ/9jY2f/Y2Nn/2N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AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAOjp6QDp6uoA5+joAOrr6wHq6+sC6+zsAuvs7ALr7OwC6+zsAuns
6gLr7OwC7OztAuzs7QLq6+sC////AJaXmACPj5AAoKChAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOvs7ADs7O0A6uvrAOvs7ADr7OwA6+zsAOvs
7ADr7OwA6+zsAOzs7QDs7O0A7OztAOvs7ADi4+MAs7O0AMnKygAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAgAAAAcAAAAOAAAABgAAAAYAA
AAGAAAABgAAAAYAAAAGAAAABgAAAAYAAAAGAAAABgAAAAYAAAAGAAAAB8AAAD/AAAA/wAAAP8AAAD/AA
AA/wAAAf8AAAP/AAAH/wAAD/+AAB//wAA/8=
</value>
</data>
</root>
+301
View File
@@ -0,0 +1,301 @@
namespace 开发辅助工具.Tools
{
partial class FrmPathInfo
{
/// <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();
this.table1 = new XPTable.Models.Table();
this.columnModel1 = new XPTable.Models.ColumnModel();
this.ColName = new XPTable.Models.TextColumn();
this.ColPath = new XPTable.Models.TextColumn();
this.ColDes = new XPTable.Models.TextColumn();
this.tableModel1 = new XPTable.Models.TableModel();
this.BtnClean = new ryControls.ButtonEx();
this.BtnBatchZip = new ryControls.ButtonEx();
this.LblState = new System.Windows.Forms.Label();
this.BtnInsertUpdate = new ryControls.ButtonEx();
this.BtnUpdateDll = new ryControls.ButtonEx();
this.toolTip1 = new System.Windows.Forms.ToolTip(this.components);
this.groupBox1 = new System.Windows.Forms.GroupBox();
this.BtnCreateFolder = new ryControls.ButtonEx();
this.label1 = new System.Windows.Forms.Label();
this.TxtFolder = new ryControls.TextBoxEx2();
this.label2 = new System.Windows.Forms.Label();
this.TxtUSQ_Ver = new ryControls.TextBoxEx2();
this.BtnUpdateDllVer = new ryControls.ButtonEx();
((System.ComponentModel.ISupportInitialize)(this.table1)).BeginInit();
this.groupBox1.SuspendLayout();
this.SuspendLayout();
//
// table1
//
this.table1.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.table1.ColumnModel = this.columnModel1;
this.table1.EnableToolTips = true;
this.table1.FullRowSelect = true;
this.table1.HeaderStyle = System.Windows.Forms.ColumnHeaderStyle.Nonclickable;
this.table1.Location = new System.Drawing.Point(12, 142);
this.table1.Name = "table1";
this.table1.NoItemsText = "当前列表没有任何项";
this.table1.Size = new System.Drawing.Size(905, 362);
this.table1.TabIndex = 20;
this.table1.TableModel = this.tableModel1;
this.table1.Text = "table1";
this.table1.DoubleClick += new System.EventHandler(this.table1_DoubleClick);
//
// columnModel1
//
this.columnModel1.Columns.AddRange(new XPTable.Models.Column[] {
this.ColName,
this.ColPath,
this.ColDes});
//
// ColName
//
this.ColName.Editable = false;
this.ColName.Tag = null;
this.ColName.Text = "名称";
this.ColName.Width = 150;
//
// ColPath
//
this.ColPath.Editable = false;
this.ColPath.Tag = null;
this.ColPath.Text = "路径";
this.ColPath.Width = 200;
//
// ColDes
//
this.ColDes.Editable = false;
this.ColDes.Tag = null;
this.ColDes.Text = "备注";
this.ColDes.Width = 400;
//
// BtnClean
//
this.BtnClean.BaseColor = System.Drawing.Color.FromArgb(((int)(((byte)(51)))), ((int)(((byte)(76)))), ((int)(((byte)(95)))));
this.BtnClean.Location = new System.Drawing.Point(216, 20);
this.BtnClean.Name = "BtnClean";
this.BtnClean.Size = new System.Drawing.Size(99, 34);
this.BtnClean.TabIndex = 22;
this.BtnClean.Text = "清理垃圾";
this.toolTip1.SetToolTip(this.BtnClean, "清理debug目录下的pdb文件");
this.BtnClean.UseVisualStyleBackColor = true;
this.BtnClean.Click += new System.EventHandler(this.BtnClean_Click);
//
// BtnBatchZip
//
this.BtnBatchZip.BaseColor = System.Drawing.Color.FromArgb(((int)(((byte)(51)))), ((int)(((byte)(76)))), ((int)(((byte)(95)))));
this.BtnBatchZip.Location = new System.Drawing.Point(531, 20);
this.BtnBatchZip.Name = "BtnBatchZip";
this.BtnBatchZip.Size = new System.Drawing.Size(99, 34);
this.BtnBatchZip.TabIndex = 23;
this.BtnBatchZip.Text = "一键打包";
this.toolTip1.SetToolTip(this.BtnBatchZip, "一键混淆并打包当前项目生成的文件。");
this.BtnBatchZip.UseVisualStyleBackColor = true;
this.BtnBatchZip.Click += new System.EventHandler(this.BtnBatchZip_Click);
//
// LblState
//
this.LblState.AutoSize = true;
this.LblState.Location = new System.Drawing.Point(10, 127);
this.LblState.Name = "LblState";
this.LblState.Size = new System.Drawing.Size(83, 12);
this.LblState.TabIndex = 24;
this.LblState.Text = "状态:准备就绪";
//
// BtnInsertUpdate
//
this.BtnInsertUpdate.BaseColor = System.Drawing.Color.FromArgb(((int)(((byte)(51)))), ((int)(((byte)(76)))), ((int)(((byte)(95)))));
this.BtnInsertUpdate.Location = new System.Drawing.Point(321, 20);
this.BtnInsertUpdate.Name = "BtnInsertUpdate";
this.BtnInsertUpdate.Size = new System.Drawing.Size(99, 34);
this.BtnInsertUpdate.TabIndex = 25;
this.BtnInsertUpdate.Text = "插入更新日志";
this.toolTip1.SetToolTip(this.BtnInsertUpdate, "将当前版本加入更新日志");
this.BtnInsertUpdate.UseVisualStyleBackColor = true;
this.BtnInsertUpdate.Click += new System.EventHandler(this.BtnInsertUpdate_Click);
//
// BtnUpdateDll
//
this.BtnUpdateDll.BaseColor = System.Drawing.Color.FromArgb(((int)(((byte)(51)))), ((int)(((byte)(76)))), ((int)(((byte)(95)))));
this.BtnUpdateDll.Location = new System.Drawing.Point(6, 20);
this.BtnUpdateDll.Name = "BtnUpdateDll";
this.BtnUpdateDll.Size = new System.Drawing.Size(99, 34);
this.BtnUpdateDll.TabIndex = 26;
this.BtnUpdateDll.Text = "更新引用dll";
this.toolTip1.SetToolTip(this.BtnUpdateDll, "将当前输出文件夹里的dll文件更新到最新版\r\n将当前项目文件里的引用dll位置修改至输出目录。");
this.BtnUpdateDll.UseVisualStyleBackColor = true;
this.BtnUpdateDll.Click += new System.EventHandler(this.BtnUpdateDll_Click);
//
// groupBox1
//
this.groupBox1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.groupBox1.Controls.Add(this.BtnUpdateDllVer);
this.groupBox1.Controls.Add(this.BtnCreateFolder);
this.groupBox1.Controls.Add(this.BtnUpdateDll);
this.groupBox1.Controls.Add(this.BtnInsertUpdate);
this.groupBox1.Controls.Add(this.BtnBatchZip);
this.groupBox1.Controls.Add(this.BtnClean);
this.groupBox1.Location = new System.Drawing.Point(12, 62);
this.groupBox1.Name = "groupBox1";
this.groupBox1.Size = new System.Drawing.Size(905, 62);
this.groupBox1.TabIndex = 27;
this.groupBox1.TabStop = false;
this.groupBox1.Text = "项目管理";
//
// BtnCreateFolder
//
this.BtnCreateFolder.BaseColor = System.Drawing.Color.FromArgb(((int)(((byte)(51)))), ((int)(((byte)(76)))), ((int)(((byte)(95)))));
this.BtnCreateFolder.Location = new System.Drawing.Point(426, 20);
this.BtnCreateFolder.Name = "BtnCreateFolder";
this.BtnCreateFolder.Size = new System.Drawing.Size(99, 34);
this.BtnCreateFolder.TabIndex = 27;
this.BtnCreateFolder.Text = "创建毕方文件夹";
this.BtnCreateFolder.UseVisualStyleBackColor = true;
this.BtnCreateFolder.Click += new System.EventHandler(this.BtnCreateFolder_Click);
//
// label1
//
this.label1.AutoSize = true;
this.label1.Location = new System.Drawing.Point(10, 8);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(77, 12);
this.label1.TabIndex = 29;
this.label1.Text = "毕方项目路径";
//
// TxtFolder
//
this.TxtFolder.BackColor = System.Drawing.Color.White;
this.TxtFolder.EmptyText = "";
this.TxtFolder.Location = new System.Drawing.Point(12, 23);
this.TxtFolder.MaxLength = 999999999;
this.TxtFolder.Multiline = false;
this.TxtFolder.Name = "TxtFolder";
this.TxtFolder.OnlyNumeric = false;
this.TxtFolder.PasswordChar = '\0';
this.TxtFolder.ReadOnly = false;
this.TxtFolder.SelectedText = "";
this.TxtFolder.SelectionLength = 0;
this.TxtFolder.SelectionStart = 0;
this.TxtFolder.Size = new System.Drawing.Size(664, 33);
this.TxtFolder.TabIndex = 28;
this.TxtFolder.TextAlign = System.Windows.Forms.HorizontalAlignment.Left;
this.TxtFolder.ToolTip = "";
this.TxtFolder.WordWrap = true;
//
// label2
//
this.label2.AutoSize = true;
this.label2.Location = new System.Drawing.Point(695, 8);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(47, 12);
this.label2.TabIndex = 30;
this.label2.Text = "USQ版本";
//
// TxtUSQ_Ver
//
this.TxtUSQ_Ver.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(255)))), ((int)(((byte)(192)))));
this.TxtUSQ_Ver.EmptyText = "";
this.TxtUSQ_Ver.Location = new System.Drawing.Point(682, 24);
this.TxtUSQ_Ver.MaxLength = 999999999;
this.TxtUSQ_Ver.Multiline = false;
this.TxtUSQ_Ver.Name = "TxtUSQ_Ver";
this.TxtUSQ_Ver.OnlyNumeric = false;
this.TxtUSQ_Ver.PasswordChar = '\0';
this.TxtUSQ_Ver.ReadOnly = false;
this.TxtUSQ_Ver.SelectedText = "";
this.TxtUSQ_Ver.SelectionLength = 0;
this.TxtUSQ_Ver.SelectionStart = 0;
this.TxtUSQ_Ver.Size = new System.Drawing.Size(81, 33);
this.TxtUSQ_Ver.TabIndex = 31;
this.TxtUSQ_Ver.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
this.TxtUSQ_Ver.ToolTip = "";
this.TxtUSQ_Ver.WordWrap = true;
//
// BtnUpdateDllVer
//
this.BtnUpdateDllVer.BaseColor = System.Drawing.Color.FromArgb(((int)(((byte)(51)))), ((int)(((byte)(76)))), ((int)(((byte)(95)))));
this.BtnUpdateDllVer.Location = new System.Drawing.Point(111, 20);
this.BtnUpdateDllVer.Name = "BtnUpdateDllVer";
this.BtnUpdateDllVer.Size = new System.Drawing.Size(99, 34);
this.BtnUpdateDllVer.TabIndex = 28;
this.BtnUpdateDllVer.Text = "更新dll版本";
this.toolTip1.SetToolTip(this.BtnUpdateDllVer, "将当前输出文件夹里的dll文件更新到最新版");
this.BtnUpdateDllVer.UseVisualStyleBackColor = true;
this.BtnUpdateDllVer.Click += new System.EventHandler(this.BtnUpdateDllVer_Click);
//
// FrmPathInfo
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(929, 516);
this.CloseButton = false;
this.CloseButtonVisible = false;
this.Controls.Add(this.TxtUSQ_Ver);
this.Controls.Add(this.label2);
this.Controls.Add(this.label1);
this.Controls.Add(this.TxtFolder);
this.Controls.Add(this.groupBox1);
this.Controls.Add(this.LblState);
this.Controls.Add(this.table1);
this.Name = "FrmPathInfo";
this.Text = "项目";
this.Load += new System.EventHandler(this.FrmPathInfo_Load);
((System.ComponentModel.ISupportInitialize)(this.table1)).EndInit();
this.groupBox1.ResumeLayout(false);
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
private XPTable.Models.Table table1;
private XPTable.Models.ColumnModel columnModel1;
private XPTable.Models.TextColumn ColName;
private XPTable.Models.TextColumn ColPath;
private XPTable.Models.TextColumn ColDes;
private XPTable.Models.TableModel tableModel1;
private ryControls.ButtonEx BtnClean;
private ryControls.ButtonEx BtnBatchZip;
private System.Windows.Forms.Label LblState;
private ryControls.ButtonEx BtnInsertUpdate;
private ryControls.ButtonEx BtnUpdateDll;
private System.Windows.Forms.ToolTip toolTip1;
private System.Windows.Forms.GroupBox groupBox1;
private System.Windows.Forms.Label label1;
private ryControls.TextBoxEx2 TxtFolder;
private ryControls.ButtonEx BtnCreateFolder;
private System.Windows.Forms.Label label2;
private ryControls.TextBoxEx2 TxtUSQ_Ver;
private ryControls.ButtonEx BtnUpdateDllVer;
}
}
@@ -0,0 +1,471 @@
using Microsoft.Win32;
using ryCommon;
using ryCommonDb;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Diagnostics;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading;
using System.Windows.Forms;
using System.Xml;
using WeifenLuo.WinFormsUI.Docking;
using 开发辅助工具.Manager;
namespace 开发辅助工具.Tools
{
public partial class FrmPathInfo : DockContent
{
string SelectPath = "";
public FrmPathInfo(string _Path)
{
SelectPath = _Path;
InitializeComponent();
LoadPath();
}
/// <summary>
/// 获取毕方标准项目根路径
/// </summary>
/// <returns></returns>
private string GetBFFolderPath()
{
var _path = SelectPath;
if(System.IO.Directory.Exists(_path))
{
if (System.IO.File.Exists(_path + "\\查看项目.ryp"))
{
return _path;
}
}
while (true)
{
_path = System.IO.Path.GetDirectoryName(_path.TrimEnd('\\')).TrimEnd('\\');
if (System.IO.File.Exists(_path + "\\查看项目.ryp"))
{
return _path;
}
else
{
if (_path.Length < 4) { break; }
}
}
return "";
}
private void LoadPath()
{
var _path = GetBFFolderPath();
TxtFolder.Text = _path;
if (_path!="")
{
var folder = _path;
ryCommon.Ini ini = new Ini(folder + "\\查看项目.ryp");
TxtUSQ_Ver.Text = ini.ReadIni("project", "usqver");
AddPath(true,"Debug输出目录", "Bin\\Debug","包含调试信息的输出目录");
AddPath(true, "Release输出目录", "Bin\\Release", "不包含调试信息的输出目录");
AddPath(true,"源代码目录", "Source", "含有项目源码");
AddPath(true, "安装包目录", "Publish", "对外发布的安装文件");
AddPath(false, " - 免安装输出包目录", "Publish\\Green", "绿色免安装版本目录,通常为zip压缩包");
AddPath(false, " - 安装输出包目录", "Publish\\Install", "需要安装的版本目录,通常为exe压缩包");
AddPath(false, " - 输出底包目录", "Publish\\OriginalFiles", "输出底包,保留完整的文件结构,绿色版、安装包都以此来制作");
AddPath(false, " - 升级输出包目录", "Publish\\UpdateFile", "升级包目录,通常为zip压缩包,非完整输出包");
AddPath(true, "帮助文件目录", "Help", "帮助文档");
AddPath(true, "外部资源目录", "Res", "项目用到的资源备份,例外图标、图片、第三方项目");
AddPath(false, " - 第三方组件项目", "Res\\ThirdParty", "包含第三方组件的项目");
AddPath(false, " - 图片文件夹", "Res\\Images", "含下载的项目图片");
AddPath(true, "更新日志", "更新日志.txt", "当前项目更新日志文件");
AddPath(true, "更新日志", "更新日志.md", "当前项目更新日志文件");
AddPath(true, "更新日志", "CHANGELOG.md", "当前项目更新日志文件");
AddPath(true, "自述文件", "README.md", "当前项目自述文件");
void AddPath(bool bold,string name,string path,string des)
{
if (System.IO.File.Exists(folder + "\\" + path) || System.IO.Directory.Exists(folder + "\\" + path))
{
XPTable.Models.Row itemList = new XPTable.Models.Row
{
Tag = folder + "\\" + path
};
var cell_name = new XPTable.Models.Cell(name);
if(bold)
cell_name.ForeColor=Color.Blue;
else
{ cell_name.ForeColor = Color.Tomato; }
itemList.Cells.Add(cell_name);
itemList.Cells.Add(new XPTable.Models.Cell(path));
var cell = new XPTable.Models.Cell(des);
cell.ForeColor = Color.Gray;
itemList.Cells.Add(cell);
table1.TableModel.Rows.Add(itemList);
}
}
}
}
private void CloseApp()
{
Itrycn_Db.IsCloseConfirm = false;
this.DockPanel.FindForm().Close();
}
/// <summary>
/// 获取Notepad++路径
/// </summary>
/// <returns></returns>
private string GetNotepadPlusPath()
{
var path = "";
try
{
RegistryKey LMach = RegistryKey.OpenBaseKey(RegistryHive.LocalMachine, RegistryView.Registry64);
RegistryKey softwareRun = LMach.OpenSubKey(@"SOFTWARE\Notepad++", true);
if (softwareRun.GetValue("") != null)
{
string notepad_plus_path = softwareRun.GetValue("").ToString() + "\\notepad++.exe";
if (System.IO.File.Exists(notepad_plus_path))
{
path = notepad_plus_path;
}
}
softwareRun.Close();
LMach.Close();
}
catch
{
}
return path;
}
private void FrmProject_Load(object sender, EventArgs e)
{
}
private void table1_DoubleClick(object sender, EventArgs e)
{
if (table1.SelectedItems.Length == 0) { return; }
var path = table1.SelectedItems[0].Tag.ToString();
if (System.IO.Directory.Exists(path))
{
ryCommon.RyFiles.OpenFile(path);
}
else if (System.IO.File.Exists(path))
{
if (System.IO.Path.GetExtension(path).ToLower() == ".txt")
{
string notepad_plus_path = GetNotepadPlusPath();
if (System.IO.File.Exists(notepad_plus_path))
{
ryCommon.RyFiles.RunFile(notepad_plus_path, "\"" + path + "\"");
}
else
{
ryCommon.RyFiles.OpenFile(path);
}
}
else if (System.IO.Path.GetExtension(path).ToLower() == ".md")
{
ryCommon.RyFiles.OpenFile(path);
}
else
{
ryCommon.RyFiles.OpenFolderGotoFile(path);
}
}
}
private void BtnClean_Click(object sender, EventArgs e)
{
switch (MessageBox.Show("是否要进行清理不必要的文件,例如*.pdb", "提示", MessageBoxButtons.YesNo, MessageBoxIcon.Information))
{
case DialogResult.No:
return;
}
BtnClean.Enabled = false;
var folder = GetBFFolderPath();
if(folder!="")
{
if (System.IO.Directory.Exists(folder + "\\Bin\\Debug"))
{
Itrycn_Db.DeleteFiles(folder + "\\Bin\\Debug", "*.pdb");
Itrycn_Db.DeleteFiles(folder + "\\Bin\\Debug", "*.dcu");
}
if (System.IO.Directory.Exists(folder + "\\Bin\\Release"))
{
Itrycn_Db.DeleteFiles(folder + "\\Bin\\Release", "*.pdb");
Itrycn_Db.DeleteFiles(folder + "\\Bin\\Release", "*.dcu");
}
if (System.IO.Directory.Exists(folder + "\\Source"))
{
Itrycn_Db.DeleteFiles(folder + "\\Source", "*.pdb");
Itrycn_Db.DeleteFiles(folder + "\\Source", "*.dcu");
}
}
BtnClean.Enabled = true;
MessageBox.Show("清理完成。", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
}
/// <summary>
/// 等待进程执行完毕
/// </summary>
/// <param name="cmd_text"></param>
/// <returns></returns>
public static string Read_Prog(string exe,string cmd_text)
{
String cmd = exe;
Process p = new Process
{
StartInfo = new System.Diagnostics.ProcessStartInfo
{
FileName = cmd,//设定程序名
Arguments = cmd_text,
UseShellExecute = false, //关闭shell的使用
RedirectStandardInput = true, //重定向标准输入
RedirectStandardOutput = true, //重定向标准输出
RedirectStandardError = false, //重定向错误输出
CreateNoWindow = true//设置不显示窗口
}
};
p.Start();
string result = p.StandardOutput.ReadToEnd();
p.WaitForExit(20000);
p.Close();
return result;
}
private void BtnBatchZip_Click(object sender, EventArgs e)
{
BtnBatchZip.Enabled = false;
Thread th = new Thread(Start);
th.Start();
void Start()
{
var com_mode = "Debug";
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 Settings where name='Setting'");
if (mydb.HaveData(ds))
{
var row = mydb.GetData(ds);
ryCommon.Storage mStor = new ryCommon.Storage(row["value"].ToString());
mStor.SelectNodeBySet();
var ReactorPath = mStor.GetAttrValue("ReactorPath");
var WinRARPath = mStor.GetAttrValue("WinRARPath");
if (WinRARPath == "")
{
if (System.IO.File.Exists(@"C:\Program Files\WinRAR\WinRAR.exe"))
{
WinRARPath = @"C:\Program Files\WinRAR\WinRAR.exe";
}
}
var bf_folder = GetBFFolderPath();
if (bf_folder != "")
{
ryCommon.Ini ini = new Ini(bf_folder + "\\查看项目.ryp");
var eng_name = ini.ReadIni("project", "engname");
var proglang = ini.ReadIni("project", "proglang");
var ouput_folder = bf_folder + "\\Bin\\" + com_mode + "\\" + eng_name;
var file_ver = "";
if (System.IO.File.Exists(ouput_folder + "\\" + eng_name + ".exe"))
{
FileVersionInfo fileVerInfo = System.Diagnostics.FileVersionInfo.GetVersionInfo(ouput_folder + "\\" + eng_name + ".exe");
file_ver = fileVerInfo.ProductVersion;
}
if (proglang == "c#")
{
ShowState("正在进行混淆...");
if (System.IO.File.Exists(bf_folder + "\\Bin\\混淆_" + com_mode + ".nrproj"))
{
var cmd = Read_Prog(ReactorPath, "-project \"" + bf_folder + "\\Bin\\混淆_" + com_mode + ".nrproj\"");
}
}
ShowState("正在清理不重要的缓存...");
ryCommon.RyFiles.DeleteFile(ouput_folder + "\\Secure\\*.pdb");
ShowState("复制混淆文件到底包目录...");
ryCommon.RyFiles.CopyFile(ouput_folder + "\\Secure\\*", bf_folder + "\\Publish\\OriginalFiles\\");
#region 复制自定义规则文件到底包目录
ShowState("复制自定义规则文件到底包目录...");
var Publish = ryCommon.RyFiles.ReadAllLines(bf_folder + "\\Publish\\Publish.set");
for (int m = 0; m < Publish.Length; m++)
{
var line = Publish[m].Trim();
if (line == "" || line.IndexOf("#") == 0) { continue; }
if (line.IndexOfEx("del:") == 0)
{
ryCommon.RyFiles.DeleteFile(bf_folder + "\\Publish\\OriginalFiles\\" + line.Substring(4));
}
else if (line.IndexOfEx("copy:") == 0)
{
var from_to = line.Substring(5).Replace("->", "|").Split('|');
if (from_to.Length == 2)
{
var from_path = from_to[0];
var to_path = from_to[1];
ryCommon.RyFiles.CopyFile(ouput_folder + "\\" + from_path, bf_folder + "\\Publish\\OriginalFiles\\" + to_path);
}
}
}
#endregion
ShowState("正在打包...");
var cmd2 = Read_Prog(WinRARPath, "-r -ep1 a \"" + bf_folder + "\\Publish\\Green\\" + eng_name + ".zip\" \"" + bf_folder + "\\Publish\\OriginalFiles\\\"");
RyFiles.CopyFile(bf_folder + "\\Publish\\Green\\" + eng_name + ".zip", bf_folder + "\\Publish\\Green\\HistoryVer\\" + eng_name + "_" + file_ver + ".zip");
ShowState("打包完成...");
}
}
}
db.Free();
void ShowState(string text)
{
this.Invoke(new Action(() =>
{
LblState.Text = "状态:" + text;
}));
}
this.Invoke(new Action(() =>
{
BtnBatchZip.Enabled = true;
}));
}
}
private void GetVersBySln(string path)
{
RyProject project = new RyProject();
string update_logs_text = "";
if (System.IO.File.Exists(path))
{
var sln_text = ryCommon.RyFiles.ReadAllLines(path);
for (int i = 0; i < sln_text.Length; i++)
{
if(sln_text[i].StartsWith("Project"))
{
var item = sln_text[i].Replace(" = ",",").Split(',');
if (item.Length>=3)
{
var project_name = item[1].Trim().Trim('"');
var project_path =System.IO.Path.GetDirectoryName(path).TrimEnd('\\')+"\\"+item[2].Trim().Trim('"');
var ver = project.GetAssemblyVersion(project_path);
if (ver != "")
{
if (update_logs_text != "") { update_logs_text += "\r\n"; }
update_logs_text +="#### "+ project_name + " V" + ver+ "\r\n暂无\r\n";
}
}
}
}
}
if (update_logs_text != "")
{
var _path = GetBFFolderPath();
if (_path != "")
{
var update_text = ryCommon.RyFiles.ReadAllText(_path + "\\CHANGELOG.md");
RyFiles.WriteAllText(_path+ "\\CHANGELOG.md", "### " + DateTime.Now.ToString("yyyy-MM-dd") + "更新\r\n------\r\n"+ update_logs_text + update_text, Encoding.UTF8);
RyFiles.OpenFile(_path + "\\CHANGELOG.md");
}
}
}
private void BtnInsertUpdate_Click(object sender, EventArgs e)
{
var _path = GetBFFolderPath();
if (_path != "")
{
var files = System.IO.Directory.GetFiles(_path+"\\Source");
for (int i = 0; i < files.Length; i++)
{
var ext = System.IO.Path.GetExtension(files[i]).ToLower();
if(ext==".sln")
{
GetVersBySln(files[i]);
return;
}
}
var dirs = System.IO.Directory.GetDirectories(_path + "\\Source");
for (int i = 0; i < dirs.Length; i++)
{
var files2 = System.IO.Directory.GetFiles(dirs[i]);
for (int m = 0; m < files2.Length; m++)
{
var ext = System.IO.Path.GetExtension(files2[m]).ToLower();
if (ext == ".sln")
{
GetVersBySln(files2[m]);
return;
}
}
}
var sln_path = _path + "\\CHANGELOG.md";
}
}
private void BtnUpdateDll_Click(object sender, EventArgs e)
{
BtnUpdateDll.Enabled = false;
int error = 0;
RyProject project = new RyProject
{
CopyDllToBin = true,
ChangedOutputPath = false
};
var bf_folder = GetBFFolderPath();
if(bf_folder!="")
{
error+= project.UpdateCSproj(bf_folder+"\\Source");
}
error +=project.UpdateDlls(bf_folder+"\\Bin",out string _error_str);
BtnUpdateDll.Enabled = true;
if (error == 0)
{
MessageBox.Show("更新dll完成。", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
}
else
{
MessageBox.Show("更新dll完成,共失败"+error+ "项。\r\n\r\n" + _error_str, "提示", MessageBoxButtons.OK, MessageBoxIcon.Warning);
}
}
private void FrmPathInfo_Load(object sender, EventArgs e)
{
}
private void BtnCreateFolder_Click(object sender, EventArgs e)
{
ryCommon.Ini ini= new Ini(TxtFolder.Text+ "\\查看项目.ryp");
FrmCreateProject frm = new FrmCreateProject();
frm.TxtFolder.Text = TxtFolder.Text;
frm.ChkUnCreateProject.Checked = true;
frm.TxtProjectEngName.Text = ini.ReadIni("project", "engname");
frm.TxtProjectName.Text = ini.ReadIni("project", "name");
frm.StartPosition = FormStartPosition.CenterParent;
frm.ShowDialog();
}
private void BtnUpdateDllVer_Click(object sender, EventArgs e)
{
BtnUpdateDllVer.Enabled = false;
int error = 0;
RyProject project = new RyProject
{
CopyDllToBin = true,
ChangedOutputPath = false
};
var bf_folder = GetBFFolderPath();
var _error_str = "";
if (bf_folder != "")
{
error += project.UpdateDlls(bf_folder + "\\Bin", out _error_str);
}
BtnUpdateDllVer.Enabled = true;
if (error == 0)
{
MessageBox.Show("更新dll完成。", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
}
else
{
MessageBox.Show("更新dll完成,共失败" + error + "项。\r\n\r\n"+ _error_str, "提示", MessageBoxButtons.OK, MessageBoxIcon.Warning);
}
}
}
}
@@ -0,0 +1,132 @@
<?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="columnModel1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value>
</metadata>
<metadata name="tableModel1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>158, 17</value>
</metadata>
<metadata name="toolTip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>285, 17</value>
</metadata>
<metadata name="toolTip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>285, 17</value>
</metadata>
</root>
+304
View File
@@ -0,0 +1,304 @@
namespace 开发辅助工具.Tools
{
partial class FrmProject
{
/// <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();
this.BtnCustomMessageBox = new ryControls.ButtonEx();
this.BtnCopyCMD = new System.Windows.Forms.Button();
this.BtnOpenOutput = new System.Windows.Forms.Button();
this.BtnMessageBox = new ryControls.ButtonEx();
this.table1 = new XPTable.Models.Table();
this.columnModel1 = new XPTable.Models.ColumnModel();
this.ColName = new XPTable.Models.TextColumn();
this.ColPath = new XPTable.Models.TextColumn();
this.ColDes = new XPTable.Models.TextColumn();
this.tableModel1 = new XPTable.Models.TableModel();
this.BtnClean = new ryControls.ButtonEx();
this.BtnBatchZip = new ryControls.ButtonEx();
this.LblState = new System.Windows.Forms.Label();
this.BtnInsertUpdate = new ryControls.ButtonEx();
this.BtnUpdateDll = new ryControls.ButtonEx();
this.toolTip1 = new System.Windows.Forms.ToolTip(this.components);
this.BtnUpdateVer = new ryControls.ButtonEx();
this.BtnUpdateDllVer = new ryControls.ButtonEx();
this.groupBox1 = new System.Windows.Forms.GroupBox();
this.groupBox2 = new System.Windows.Forms.GroupBox();
((System.ComponentModel.ISupportInitialize)(this.table1)).BeginInit();
this.groupBox1.SuspendLayout();
this.groupBox2.SuspendLayout();
this.SuspendLayout();
//
// BtnCustomMessageBox
//
this.BtnCustomMessageBox.BaseColor = System.Drawing.Color.FromArgb(((int)(((byte)(51)))), ((int)(((byte)(76)))), ((int)(((byte)(95)))));
this.BtnCustomMessageBox.Location = new System.Drawing.Point(111, 19);
this.BtnCustomMessageBox.Name = "BtnCustomMessageBox";
this.BtnCustomMessageBox.Size = new System.Drawing.Size(99, 34);
this.BtnCustomMessageBox.TabIndex = 12;
this.BtnCustomMessageBox.Text = "自定义对话框";
this.BtnCustomMessageBox.UseVisualStyleBackColor = true;
this.BtnCustomMessageBox.Click += new System.EventHandler(this.BtnCustomMessageBox_Click);
//
// BtnCopyCMD
//
this.BtnCopyCMD.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.BtnCopyCMD.Location = new System.Drawing.Point(775, 12);
this.BtnCopyCMD.Name = "BtnCopyCMD";
this.BtnCopyCMD.Size = new System.Drawing.Size(142, 38);
this.BtnCopyCMD.TabIndex = 11;
this.BtnCopyCMD.Text = "设置自动更新版本号";
this.BtnCopyCMD.UseVisualStyleBackColor = true;
this.BtnCopyCMD.Click += new System.EventHandler(this.BtnCopyCMD_Click);
//
// BtnOpenOutput
//
this.BtnOpenOutput.Location = new System.Drawing.Point(12, 12);
this.BtnOpenOutput.Name = "BtnOpenOutput";
this.BtnOpenOutput.Size = new System.Drawing.Size(142, 38);
this.BtnOpenOutput.TabIndex = 9;
this.BtnOpenOutput.Text = "打开输出文件夹";
this.BtnOpenOutput.UseVisualStyleBackColor = true;
this.BtnOpenOutput.Click += new System.EventHandler(this.BtnOpenOutput_Click);
//
// BtnMessageBox
//
this.BtnMessageBox.BaseColor = System.Drawing.Color.FromArgb(((int)(((byte)(51)))), ((int)(((byte)(76)))), ((int)(((byte)(95)))));
this.BtnMessageBox.Location = new System.Drawing.Point(6, 19);
this.BtnMessageBox.Name = "BtnMessageBox";
this.BtnMessageBox.Size = new System.Drawing.Size(99, 34);
this.BtnMessageBox.TabIndex = 8;
this.BtnMessageBox.Text = "对话框代码";
this.BtnMessageBox.UseVisualStyleBackColor = true;
this.BtnMessageBox.Click += new System.EventHandler(this.BtnMessageBox_Click);
//
// table1
//
this.table1.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.table1.ColumnModel = this.columnModel1;
this.table1.EnableToolTips = true;
this.table1.FullRowSelect = true;
this.table1.HeaderStyle = System.Windows.Forms.ColumnHeaderStyle.Nonclickable;
this.table1.Location = new System.Drawing.Point(12, 208);
this.table1.Name = "table1";
this.table1.NoItemsText = "当前列表没有任何项";
this.table1.Size = new System.Drawing.Size(905, 296);
this.table1.TabIndex = 20;
this.table1.TableModel = this.tableModel1;
this.table1.Text = "table1";
this.table1.DoubleClick += new System.EventHandler(this.table1_DoubleClick);
//
// columnModel1
//
this.columnModel1.Columns.AddRange(new XPTable.Models.Column[] {
this.ColName,
this.ColPath,
this.ColDes});
//
// ColName
//
this.ColName.Editable = false;
this.ColName.Tag = null;
this.ColName.Text = "名称";
this.ColName.Width = 150;
//
// ColPath
//
this.ColPath.Editable = false;
this.ColPath.Tag = null;
this.ColPath.Text = "路径";
this.ColPath.Width = 200;
//
// ColDes
//
this.ColDes.Editable = false;
this.ColDes.Tag = null;
this.ColDes.Text = "备注";
this.ColDes.Width = 400;
//
// BtnClean
//
this.BtnClean.BaseColor = System.Drawing.Color.FromArgb(((int)(((byte)(51)))), ((int)(((byte)(76)))), ((int)(((byte)(95)))));
this.BtnClean.Location = new System.Drawing.Point(216, 20);
this.BtnClean.Name = "BtnClean";
this.BtnClean.Size = new System.Drawing.Size(99, 34);
this.BtnClean.TabIndex = 22;
this.BtnClean.Text = "清理垃圾";
this.toolTip1.SetToolTip(this.BtnClean, "清理debug目录下的pdb、dcu文件");
this.BtnClean.UseVisualStyleBackColor = true;
this.BtnClean.Click += new System.EventHandler(this.BtnClean_Click);
//
// BtnBatchZip
//
this.BtnBatchZip.BaseColor = System.Drawing.Color.FromArgb(((int)(((byte)(51)))), ((int)(((byte)(76)))), ((int)(((byte)(95)))));
this.BtnBatchZip.Location = new System.Drawing.Point(531, 20);
this.BtnBatchZip.Name = "BtnBatchZip";
this.BtnBatchZip.Size = new System.Drawing.Size(99, 34);
this.BtnBatchZip.TabIndex = 23;
this.BtnBatchZip.Text = "一键打包";
this.toolTip1.SetToolTip(this.BtnBatchZip, "一键混淆并打包当前项目生成的文件。");
this.BtnBatchZip.UseVisualStyleBackColor = true;
this.BtnBatchZip.Click += new System.EventHandler(this.BtnBatchZip_Click);
//
// LblState
//
this.LblState.AutoSize = true;
this.LblState.Location = new System.Drawing.Point(10, 190);
this.LblState.Name = "LblState";
this.LblState.Size = new System.Drawing.Size(83, 12);
this.LblState.TabIndex = 24;
this.LblState.Text = "状态:准备就绪";
//
// BtnInsertUpdate
//
this.BtnInsertUpdate.BaseColor = System.Drawing.Color.FromArgb(((int)(((byte)(51)))), ((int)(((byte)(76)))), ((int)(((byte)(95)))));
this.BtnInsertUpdate.Location = new System.Drawing.Point(321, 20);
this.BtnInsertUpdate.Name = "BtnInsertUpdate";
this.BtnInsertUpdate.Size = new System.Drawing.Size(99, 34);
this.BtnInsertUpdate.TabIndex = 25;
this.BtnInsertUpdate.Text = "插入更新日志";
this.toolTip1.SetToolTip(this.BtnInsertUpdate, "将当前版本加入更新日志");
this.BtnInsertUpdate.UseVisualStyleBackColor = true;
this.BtnInsertUpdate.Click += new System.EventHandler(this.BtnInsertUpdate_Click);
//
// BtnUpdateDll
//
this.BtnUpdateDll.BaseColor = System.Drawing.Color.FromArgb(((int)(((byte)(51)))), ((int)(((byte)(76)))), ((int)(((byte)(95)))));
this.BtnUpdateDll.Location = new System.Drawing.Point(6, 20);
this.BtnUpdateDll.Name = "BtnUpdateDll";
this.BtnUpdateDll.Size = new System.Drawing.Size(99, 34);
this.BtnUpdateDll.TabIndex = 26;
this.BtnUpdateDll.Text = "更新引用dll";
this.toolTip1.SetToolTip(this.BtnUpdateDll, "将当前输出文件夹里的dll文件更新到最新版\r\n将当前项目文件里的引用dll位置修改至输出目录。");
this.BtnUpdateDll.UseVisualStyleBackColor = true;
this.BtnUpdateDll.Click += new System.EventHandler(this.BtnUpdateDll_Click);
//
// BtnUpdateVer
//
this.BtnUpdateVer.BaseColor = System.Drawing.Color.FromArgb(((int)(((byte)(51)))), ((int)(((byte)(76)))), ((int)(((byte)(95)))));
this.BtnUpdateVer.Location = new System.Drawing.Point(426, 20);
this.BtnUpdateVer.Name = "BtnUpdateVer";
this.BtnUpdateVer.Size = new System.Drawing.Size(99, 34);
this.BtnUpdateVer.TabIndex = 27;
this.BtnUpdateVer.Text = "更新版本号";
this.toolTip1.SetToolTip(this.BtnUpdateVer, "每点一次自动更新一下版本号。");
this.BtnUpdateVer.UseVisualStyleBackColor = true;
this.BtnUpdateVer.Click += new System.EventHandler(this.BtnUpdateVer_Click);
//
// BtnUpdateDllVer
//
this.BtnUpdateDllVer.BaseColor = System.Drawing.Color.FromArgb(((int)(((byte)(51)))), ((int)(((byte)(76)))), ((int)(((byte)(95)))));
this.BtnUpdateDllVer.Location = new System.Drawing.Point(111, 20);
this.BtnUpdateDllVer.Name = "BtnUpdateDllVer";
this.BtnUpdateDllVer.Size = new System.Drawing.Size(99, 34);
this.BtnUpdateDllVer.TabIndex = 29;
this.BtnUpdateDllVer.Text = "更新dll版本";
this.toolTip1.SetToolTip(this.BtnUpdateDllVer, "将当前输出文件夹里的dll文件更新到最新版");
this.BtnUpdateDllVer.UseVisualStyleBackColor = true;
this.BtnUpdateDllVer.Click += new System.EventHandler(this.BtnUpdateDllVer_Click);
//
// groupBox1
//
this.groupBox1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.groupBox1.Controls.Add(this.BtnUpdateDllVer);
this.groupBox1.Controls.Add(this.BtnUpdateVer);
this.groupBox1.Controls.Add(this.BtnUpdateDll);
this.groupBox1.Controls.Add(this.BtnInsertUpdate);
this.groupBox1.Controls.Add(this.BtnBatchZip);
this.groupBox1.Controls.Add(this.BtnClean);
this.groupBox1.Location = new System.Drawing.Point(12, 120);
this.groupBox1.Name = "groupBox1";
this.groupBox1.Size = new System.Drawing.Size(905, 62);
this.groupBox1.TabIndex = 27;
this.groupBox1.TabStop = false;
this.groupBox1.Text = "项目管理";
//
// groupBox2
//
this.groupBox2.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.groupBox2.Controls.Add(this.BtnMessageBox);
this.groupBox2.Controls.Add(this.BtnCustomMessageBox);
this.groupBox2.Location = new System.Drawing.Point(12, 56);
this.groupBox2.Name = "groupBox2";
this.groupBox2.Size = new System.Drawing.Size(905, 60);
this.groupBox2.TabIndex = 28;
this.groupBox2.TabStop = false;
this.groupBox2.Text = "快速代码";
//
// FrmProject
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(929, 516);
this.CloseButton = false;
this.CloseButtonVisible = false;
this.Controls.Add(this.groupBox2);
this.Controls.Add(this.groupBox1);
this.Controls.Add(this.LblState);
this.Controls.Add(this.table1);
this.Controls.Add(this.BtnCopyCMD);
this.Controls.Add(this.BtnOpenOutput);
this.Name = "FrmProject";
this.Text = "项目";
this.Load += new System.EventHandler(this.FrmProject_Load);
((System.ComponentModel.ISupportInitialize)(this.table1)).EndInit();
this.groupBox1.ResumeLayout(false);
this.groupBox2.ResumeLayout(false);
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
private ryControls.ButtonEx BtnCustomMessageBox;
private System.Windows.Forms.Button BtnCopyCMD;
private System.Windows.Forms.Button BtnOpenOutput;
private ryControls.ButtonEx BtnMessageBox;
private XPTable.Models.Table table1;
private XPTable.Models.ColumnModel columnModel1;
private XPTable.Models.TextColumn ColName;
private XPTable.Models.TextColumn ColPath;
private XPTable.Models.TextColumn ColDes;
private XPTable.Models.TableModel tableModel1;
private ryControls.ButtonEx BtnClean;
private ryControls.ButtonEx BtnBatchZip;
private System.Windows.Forms.Label LblState;
private ryControls.ButtonEx BtnInsertUpdate;
private ryControls.ButtonEx BtnUpdateDll;
private System.Windows.Forms.ToolTip toolTip1;
private System.Windows.Forms.GroupBox groupBox1;
private ryControls.ButtonEx BtnUpdateVer;
private System.Windows.Forms.GroupBox groupBox2;
private ryControls.ButtonEx BtnUpdateDllVer;
}
}
@@ -0,0 +1,592 @@
using Microsoft.Win32;
using ryCommon;
using ryCommonDb;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Diagnostics;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading;
using System.Windows.Forms;
using System.Xml;
using WeifenLuo.WinFormsUI.Docking;
using 开发辅助工具.Manager;
namespace 开发辅助工具.Tools
{
public partial class FrmProject : DockContent
{
public FrmProject(string ProjectPath)
{
_ProjectPath = ProjectPath;
InitializeComponent();
try
{
if (_ProjectPath == "") { return; }
System.Xml.XmlDocument xml = new System.Xml.XmlDocument();
xml.Load(_ProjectPath);
var xmlnsm = new XmlNamespaceManager(xml.NameTable);
xmlnsm.AddNamespace("d", xml.DocumentElement.NamespaceURI);
var root = @"d:Project//d:PropertyGroup//d:";
var project_name = GetValue("AssemblyName");
if (project_name != "") { Text = project_name; }
#region 读取图标
var ApplicationIcon = GetValue("ApplicationIcon");
ApplicationIcon = System.IO.Path.GetDirectoryName(_ProjectPath) + "\\" + ApplicationIcon;
if (System.IO.File.Exists(ApplicationIcon))
{
try
{
Icon = new Icon(ApplicationIcon);
}
catch
{
}
}
#endregion
LoadPath();
string GetValue(string name)
{
var node = xml.SelectSingleNode(root + name, xmlnsm);
if (node != null)
{
return node.InnerText;
}
return "";
}
}
catch { }
}
/// <summary>
/// 获取毕方标准项目根路径
/// </summary>
/// <returns></returns>
private string GetBFFolderPath()
{
var _path = _ProjectPath;
while (true)
{
_path = System.IO.Path.GetDirectoryName(_path.TrimEnd('\\')).TrimEnd('\\');
if (System.IO.File.Exists(_path + "\\查看项目.ryp"))
{
return _path;
}
else
{
if (_path.Length < 4) { break; }
}
}
return "";
}
private void LoadPath()
{
var _path = GetBFFolderPath();
if (_path!="")
{
var folder = _path;
AddPath(true,"Debug输出目录", "Bin\\Debug","包含调试信息的输出目录");
AddPath(true, "Release输出目录", "Bin\\Release", "不包含调试信息的输出目录");
AddPath(true,"源代码目录", "Source", "含有项目源码");
AddPath(true, "安装包目录", "Publish", "对外发布的安装文件");
AddPath(false, " - 免安装输出包目录", "Publish\\Green", "绿色免安装版本目录,通常为zip压缩包");
AddPath(false, " - 安装输出包目录", "Publish\\Install", "需要安装的版本目录,通常为exe压缩包");
AddPath(false, " - 输出底包目录", "Publish\\OriginalFiles", "输出底包,保留完整的文件结构,绿色版、安装包都以此来制作");
AddPath(false, " - 升级输出包目录", "Publish\\UpdateFile", "升级包目录,通常为zip压缩包,非完整输出包");
AddPath(true, "帮助文件目录", "Help", "帮助文档");
AddPath(true, "外部资源目录", "Res", "项目用到的资源备份,例外图标、图片、第三方项目");
AddPath(false, " - 第三方组件项目", "Res\\ThirdParty", "包含第三方组件的项目");
AddPath(false, " - 图片文件夹", "Res\\Images", "含下载的项目图片");
AddPath(true, "更新日志", "更新日志.txt", "当前项目更新日志文件");
AddPath(true, "更新日志", "更新日志.md", "当前项目更新日志文件");
AddPath(true, "更新日志", "CHANGELOG.md", "当前项目更新日志文件");
AddPath(true, "自述文件", "README.md", "当前项目自述文件");
void AddPath(bool bold,string name,string path,string des)
{
if (System.IO.File.Exists(folder + "\\" + path) || System.IO.Directory.Exists(folder + "\\" + path))
{
XPTable.Models.Row itemList = new XPTable.Models.Row
{
Tag = folder + "\\" + path
};
var cell_name = new XPTable.Models.Cell(name);
if(bold)
cell_name.ForeColor=Color.Blue;
else
{ cell_name.ForeColor = Color.Tomato; }
itemList.Cells.Add(cell_name);
itemList.Cells.Add(new XPTable.Models.Cell(path));
var cell = new XPTable.Models.Cell(des);
cell.ForeColor = Color.Gray;
itemList.Cells.Add(cell);
table1.TableModel.Rows.Add(itemList);
}
}
}
}
string _ProjectPath = "";
private string GetPath(string _path)
{
string tmp_path = _path;
if (_path.IndexOf("..") == 0)
{
tmp_path = System.IO.Path.GetDirectoryName(System.IO.Path.GetDirectoryName(_ProjectPath).Trim('\\'));
tmp_path = tmp_path + "\\" + _path.Substring(2);
}
else if (_path.IndexOf(".") == 0)
{
tmp_path = System.IO.Path.GetDirectoryName(_ProjectPath);
tmp_path = tmp_path + "\\" + _path.Substring(1);
}
else if (_path.IndexOf(":") < 0)
{
tmp_path = System.IO.Path.GetDirectoryName(_ProjectPath);
tmp_path = tmp_path + "\\" + _path;
}
return tmp_path.Replace("\\\\", "\\");
}
private string GetDebugPath()
{
if (_ProjectPath == "") { return ""; }
System.Xml.XmlDocument xml = new System.Xml.XmlDocument();
xml.Load(_ProjectPath);
var xmlnsm = new XmlNamespaceManager(xml.NameTable);
xmlnsm.AddNamespace("d", xml.DocumentElement.NamespaceURI);
var node = xml.SelectSingleNode(@"d:Project//d:PropertyGroup//d:OutputPath", xmlnsm);
if (node != null)
{
string path = node.InnerText;
path = GetPath(path);
return path;
}
return "";
}
private void BtnCopyCMD_Click(object sender, EventArgs e)
{
ryCommon.RyFiles.CopyToClip("\"" + Application.ExecutablePath + "\" ver \"$(ProjectDir)\"");
if (_ProjectPath == "") { MessageBox.Show("当前项目无效,无法设置", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information); return; }
System.Xml.XmlDocument xml = new System.Xml.XmlDocument();
xml.Load(_ProjectPath);
var xmlnsm = new XmlNamespaceManager(xml.NameTable);
xmlnsm.AddNamespace("d", xml.DocumentElement.NamespaceURI);
var node = xml.SelectSingleNode(@"d:Project//d:PropertyGroup//d:PreBuildEvent", xmlnsm);
if (node != null)
{
if (node.InnerText == "")
{
node.InnerText = "\"" + Application.ExecutablePath + "\" ver \"$(ProjectDir)\"";
xml.Save(_ProjectPath);
}
else
{
MessageBox.Show("当前项目已经存在生成动作,为防止误删,请手工操作。", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
return;
}
}
else
{
XmlElement ww = xml.CreateElement("PropertyGroup", xml.DocumentElement.NamespaceURI);
XmlElement ww2 = xml.CreateElement("PreBuildEvent", xml.DocumentElement.NamespaceURI);
//ww.("xmlns");
ww2.InnerText = "\"" + Application.ExecutablePath + "\" ver \"$(ProjectDir)\"";
xml.DocumentElement.AppendChild(ww);
ww.AppendChild(ww2);
xml.Save(_ProjectPath);
}
MessageBox.Show("写入成功。", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
}
private void CloseApp()
{
Itrycn_Db.IsCloseConfirm = false;
this.DockPanel.FindForm().Close();
}
private void BtnOpenOutput_Click(object sender, EventArgs e)
{
var debug_path = GetDebugPath();
if (System.IO.Directory.Exists(debug_path))
{
ryCommon.RyFiles.OpenFile(debug_path);
CloseApp();
}
else
{
MessageBox.Show("打开输出目录失败。", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
}
}
/// <summary>
/// 获取Notepad++路径
/// </summary>
/// <returns></returns>
private string GetNotepadPlusPath()
{
var path = "";
try
{
RegistryKey LMach = RegistryKey.OpenBaseKey(RegistryHive.LocalMachine, RegistryView.Registry64);
RegistryKey softwareRun = LMach.OpenSubKey(@"SOFTWARE\Notepad++", true);
if (softwareRun.GetValue("") != null)
{
string notepad_plus_path = softwareRun.GetValue("").ToString() + "\\notepad++.exe";
if (System.IO.File.Exists(notepad_plus_path))
{
path = notepad_plus_path;
}
}
softwareRun.Close();
LMach.Close();
}
catch
{
}
return path;
}
private void BtnMessageBox_Click(object sender, EventArgs e)
{
ryCommon.RyFiles.CopyToClip("MessageBox.Show(\"这是一个测试\",\"提示\",MessageBoxButtons.OK,MessageBoxIcon.Information);");
CloseApp();
}
private void BtnCustomMessageBox_Click(object sender, EventArgs e)
{
FrmMessageBox frm = new FrmMessageBox
{
Icon = Icon
};
if (frm.ShowDialog() == DialogResult.OK)
{
CloseApp();
}
}
private void FrmProject_Load(object sender, EventArgs e)
{
}
private void table1_DoubleClick(object sender, EventArgs e)
{
if (table1.SelectedItems.Length == 0) { return; }
var path = table1.SelectedItems[0].Tag.ToString();
if (System.IO.Directory.Exists(path))
{
ryCommon.RyFiles.OpenFile(path);
}
else if (System.IO.File.Exists(path))
{
if (System.IO.Path.GetExtension(path).ToLower() == ".txt")
{
string notepad_plus_path = GetNotepadPlusPath();
if (System.IO.File.Exists(notepad_plus_path))
{
ryCommon.RyFiles.RunFile(notepad_plus_path, "\"" + path + "\"");
}
else
{
ryCommon.RyFiles.OpenFile(path);
}
}
else if (System.IO.Path.GetExtension(path).ToLower() == ".md")
{
ryCommon.RyFiles.OpenFile(path);
}
else
{
ryCommon.RyFiles.OpenFolderGotoFile(path);
}
}
}
private void BtnClean_Click(object sender, EventArgs e)
{
switch (MessageBox.Show("是否要进行清理不必要的文件,例如*.pdb", "提示", MessageBoxButtons.YesNo, MessageBoxIcon.Information))
{
case DialogResult.No:
return;
}
var debug_path = GetDebugPath();
if (System.IO.Directory.Exists(debug_path))
{
Itrycn_Db.DeleteFiles(debug_path, "*.pdb");
Itrycn_Db.DeleteFiles(debug_path, "*.dcu");
}
var folder = GetBFFolderPath();
if(folder!="")
{
if(System.IO.Directory.Exists(folder + "\\Bin\\Release"))
{
Itrycn_Db.DeleteFiles(folder + "\\Bin\\Release", "*.pdb");
Itrycn_Db.DeleteFiles(folder + "\\Bin\\Release", "*.dcu");
}
}
MessageBox.Show("清理完成。", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
}
/// <summary>
/// 等待进程执行完毕
/// </summary>
/// <param name="cmd_text"></param>
/// <returns></returns>
public static string Read_Prog(string exe,string cmd_text)
{
String cmd = exe;
Process p = new Process
{
StartInfo = new System.Diagnostics.ProcessStartInfo
{
FileName = cmd,//设定程序名
Arguments = cmd_text,
UseShellExecute = false, //关闭shell的使用
RedirectStandardInput = true, //重定向标准输入
RedirectStandardOutput = true, //重定向标准输出
RedirectStandardError = false, //重定向错误输出
CreateNoWindow = true//设置不显示窗口
}
};
p.Start();
string result = p.StandardOutput.ReadToEnd();
p.WaitForExit(20000);
p.Close();
return result;
}
private void BtnBatchZip_Click(object sender, EventArgs e)
{
BtnBatchZip.Enabled = false;
Thread th = new Thread(Start);
th.Start();
void Start()
{
var com_mode = "Debug";
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 Settings where name='Setting'");
if (mydb.HaveData(ds))
{
var row = mydb.GetData(ds);
ryCommon.Storage mStor = new ryCommon.Storage(row["value"].ToString());
mStor.SelectNodeBySet();
var ReactorPath = mStor.GetAttrValue("ReactorPath");
var WinRARPath = mStor.GetAttrValue("WinRARPath");
if (WinRARPath == "")
{
if (System.IO.File.Exists(@"C:\Program Files\WinRAR\WinRAR.exe"))
{
WinRARPath = @"C:\Program Files\WinRAR\WinRAR.exe";
}
}
var bf_folder = GetBFFolderPath();
if (bf_folder != "")
{
ryCommon.Ini ini = new Ini(bf_folder+ "\\查看项目.ryp");
var eng_name = ini.ReadIni("project", "engname");
var proglang= ini.ReadIni("project", "proglang");
var ouput_folder = bf_folder + "\\Bin\\" + com_mode + "\\" + eng_name;
var file_ver = "";
if (System.IO.File.Exists(ouput_folder + "\\" + eng_name + ".exe"))
{
FileVersionInfo fileVerInfo = System.Diagnostics.FileVersionInfo.GetVersionInfo(ouput_folder + "\\" + eng_name + ".exe");
file_ver = fileVerInfo.ProductVersion;
}
if (proglang == "c#")
{
ShowState("正在进行混淆...");
if (System.IO.File.Exists(bf_folder + "\\Bin\\混淆_" + com_mode + ".nrproj"))
{
var cmd = Read_Prog(ReactorPath, "-project \"" + bf_folder + "\\Bin\\混淆_" + com_mode + ".nrproj\"");
MessageBox.Show(cmd, "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
}
}
ShowState("正在清理不重要的缓存...");
ryCommon.RyFiles.DeleteFile(ouput_folder + "\\Secure\\*.pdb");
ShowState("复制混淆文件到底包目录...");
ryCommon.RyFiles.CopyFile(ouput_folder + "\\Secure\\*", bf_folder + "\\Publish\\OriginalFiles\\");
#region 复制自定义规则文件到底包目录
ShowState("复制自定义规则文件到底包目录...");
var Publish = ryCommon.RyFiles.ReadAllLines(bf_folder + "\\Publish\\Publish.set");
for (int m = 0; m < Publish.Length; m++)
{
var line = Publish[m].Trim();
if (line == "" || line.IndexOf("#") == 0) { continue; }
if (line.IndexOfEx("del:") == 0)
{
ryCommon.RyFiles.DeleteFile(bf_folder + "\\Publish\\OriginalFiles\\" + line.Substring(4));
}
else if (line.IndexOfEx("copy:") == 0)
{
var from_to = line.Substring(5).Replace("->", "|").Split('|');
if (from_to.Length == 2)
{
var from_path = from_to[0];
var to_path = from_to[1];
ryCommon.RyFiles.CopyFile(ouput_folder + "\\"+ from_path, bf_folder + "\\Publish\\OriginalFiles\\" + to_path);
}
}
}
#endregion
ShowState("正在打包...");
var cmd2 = Read_Prog(WinRARPath, "-r -ep1 a \""+ bf_folder + "\\Publish\\Green\\"+ eng_name + ".zip\" \""+ bf_folder + "\\Publish\\OriginalFiles\\\"");
RyFiles.CopyFile(bf_folder + "\\Publish\\Green\\" + eng_name + ".zip", bf_folder + "\\Publish\\Green\\HistoryVer\\" + eng_name + "_"+file_ver+".zip");
ShowState("打包完成...");
}
}
}
db.Free();
void ShowState(string text)
{
this.Invoke(new Action(() =>
{
LblState.Text = "状态:" + text;
}));
}
this.Invoke(new Action(() =>
{
BtnBatchZip.Enabled = true;
}));
}
}
private void GetVersBySln(string path)
{
var _bf_path = GetBFFolderPath();
RyProject project = new RyProject();
string update_logs_text = "";
if (System.IO.File.Exists(path))
{
ryCommon.Ini ini = new Ini(_bf_path + "\\查看项目.ryp");
var sln_text = ryCommon.RyFiles.ReadAllLines(path);
for (int i = 0; i < sln_text.Length; i++)
{
if(sln_text[i].StartsWith("Project"))
{
var item = sln_text[i].Replace(" = ",",").Split(',');
if (item.Length>=3)
{
var project_name = item[1].Trim().Trim('"');
var project_path =System.IO.Path.GetDirectoryName(path).TrimEnd('\\')+"\\"+item[2].Trim().Trim('"');
var ver = project.GetAssemblyVersion(project_path);
if (ver != "")
{
if(ini.ReadIni("NoVerMD", project_name,0) == 1) { continue; }
if (update_logs_text != "") { update_logs_text += "\r\n"; }
update_logs_text +="#### "+ project_name + " V" + ver+ "\r\n暂无\r\n";
}
}
}
}
}
if (update_logs_text != "")
{
if (_bf_path != "")
{
var update_text = ryCommon.RyFiles.ReadAllText(_bf_path + "\\CHANGELOG.md");
RyFiles.WriteAllText(_bf_path+ "\\CHANGELOG.md", "### " + DateTime.Now.ToString("yyyy-MM-dd") + "更新\r\n------\r\n"+ update_logs_text + update_text, Encoding.UTF8);
RyFiles.OpenFile(_bf_path + "\\CHANGELOG.md");
}
}
}
private void BtnInsertUpdate_Click(object sender, EventArgs e)
{
var _path = GetBFFolderPath();
if (_path != "")
{
var files = System.IO.Directory.GetFiles(_path+"\\Source");
for (int i = 0; i < files.Length; i++)
{
var ext = System.IO.Path.GetExtension(files[i]).ToLower();
if(ext==".sln")
{
GetVersBySln(files[i]);
return;
}
}
var dirs = System.IO.Directory.GetDirectories(_path + "\\Source");
for (int i = 0; i < dirs.Length; i++)
{
var files2 = System.IO.Directory.GetFiles(dirs[i]);
for (int m = 0; m < files2.Length; m++)
{
var ext = System.IO.Path.GetExtension(files2[m]).ToLower();
if (ext == ".sln")
{
GetVersBySln(files2[m]);
return;
}
}
}
//var sln_path = _path + "\\更新日志.md";
}
}
private void BtnUpdateDll_Click(object sender, EventArgs e)
{
BtnUpdateDll.Enabled = false;
var debug_path = GetDebugPath();
int error = 0;
var _error_str = "";
if (System.IO.Directory.Exists(debug_path))
{
RyProject project = new RyProject
{
CopyDllToBin = true,
ChangedOutputPath = false
};
var bf_folder = GetBFFolderPath();
if(bf_folder!="")
{
error+= project.UpdateCSproj(bf_folder+"\\Source");
}
else
{
project.SetCSproj(_ProjectPath, "");
}
error +=project.UpdateDlls(debug_path,out _error_str);
}
BtnUpdateDll.Enabled = true;
if (error == 0)
{
MessageBox.Show("更新dll完成。", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
}
else
{
MessageBox.Show("更新dll完成,共失败"+error+"项。\r\n\r\n"+ _error_str, "提示", MessageBoxButtons.OK, MessageBoxIcon.Warning);
}
}
private void BtnUpdateVer_Click(object sender, EventArgs e)
{
var folder = System.IO.Path.GetDirectoryName(_ProjectPath);
Manager.RyProject.UpdateVer(folder + "\\Properties\\AssemblyInfo.cs");
CloseApp();
}
private void BtnUpdateDllVer_Click(object sender, EventArgs e)
{
BtnUpdateDllVer.Enabled = false;
int error = 0;
RyProject project = new RyProject
{
CopyDllToBin = true,
ChangedOutputPath = false
};
var bf_folder = GetBFFolderPath();
var _error_str = "";
if (bf_folder != "")
{
error += project.UpdateDlls(bf_folder + "\\Bin",out _error_str);
}
BtnUpdateDllVer.Enabled = true;
if (error == 0)
{
MessageBox.Show("更新dll完成。", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
}
else
{
MessageBox.Show("更新dll完成,共失败" + error + "项。\r\n\r\n"+ _error_str, "提示", MessageBoxButtons.OK, MessageBoxIcon.Warning);
}
}
}
}
@@ -0,0 +1,129 @@
<?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="columnModel1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value>
</metadata>
<metadata name="tableModel1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>158, 17</value>
</metadata>
<metadata name="toolTip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>285, 17</value>
</metadata>
</root>
@@ -0,0 +1,153 @@
namespace 开发辅助工具.Tools
{
partial class FrmProjectSearch
{
/// <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.BtnBrowser = new ryControls.ButtonEx();
this.label1 = new System.Windows.Forms.Label();
this.TxtFolder = new ryControls.TextBoxEx2();
this.LblState = new System.Windows.Forms.Label();
this.ChkDealWithVer = new System.Windows.Forms.CheckBox();
this.CbbAutoVer = new ryControls.RyComboBox();
this.BtnScan = new ryControls.ButtonEx();
this.SuspendLayout();
//
// BtnBrowser
//
this.BtnBrowser.BaseColor = System.Drawing.Color.FromArgb(((int)(((byte)(51)))), ((int)(((byte)(76)))), ((int)(((byte)(95)))));
this.BtnBrowser.Location = new System.Drawing.Point(593, 25);
this.BtnBrowser.Name = "BtnBrowser";
this.BtnBrowser.Size = new System.Drawing.Size(75, 33);
this.BtnBrowser.TabIndex = 5;
this.BtnBrowser.Text = "选择";
this.BtnBrowser.UseVisualStyleBackColor = true;
//
// label1
//
this.label1.AutoSize = true;
this.label1.Location = new System.Drawing.Point(10, 10);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(65, 12);
this.label1.TabIndex = 4;
this.label1.Text = "选择文件夹";
//
// TxtFolder
//
this.TxtFolder.BackColor = System.Drawing.Color.White;
this.TxtFolder.EmptyText = "";
this.TxtFolder.Location = new System.Drawing.Point(12, 25);
this.TxtFolder.MaxLength = 999999999;
this.TxtFolder.Multiline = false;
this.TxtFolder.Name = "TxtFolder";
this.TxtFolder.OnlyNumeric = false;
this.TxtFolder.PasswordChar = '\0';
this.TxtFolder.ReadOnly = false;
this.TxtFolder.SelectedText = "";
this.TxtFolder.SelectionLength = 0;
this.TxtFolder.SelectionStart = 0;
this.TxtFolder.Size = new System.Drawing.Size(575, 33);
this.TxtFolder.TabIndex = 3;
this.TxtFolder.TextAlign = System.Windows.Forms.HorizontalAlignment.Left;
this.TxtFolder.ToolTip = "";
this.TxtFolder.WordWrap = true;
//
// LblState
//
this.LblState.AutoSize = true;
this.LblState.Location = new System.Drawing.Point(12, 139);
this.LblState.Name = "LblState";
this.LblState.Size = new System.Drawing.Size(83, 12);
this.LblState.TabIndex = 25;
this.LblState.Text = "状态:准备就绪";
//
// ChkDealWithVer
//
this.ChkDealWithVer.AutoSize = true;
this.ChkDealWithVer.Location = new System.Drawing.Point(12, 67);
this.ChkDealWithVer.Name = "ChkDealWithVer";
this.ChkDealWithVer.Size = new System.Drawing.Size(96, 16);
this.ChkDealWithVer.TabIndex = 26;
this.ChkDealWithVer.Text = "处理版本信息";
this.ChkDealWithVer.UseVisualStyleBackColor = true;
//
// CbbAutoVer
//
this.CbbAutoVer.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed;
this.CbbAutoVer.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.CbbAutoVer.FormattingEnabled = true;
this.CbbAutoVer.Items.AddRange(new object[] {
"不自动更新版本号",
"自动更新版本号"});
this.CbbAutoVer.Location = new System.Drawing.Point(114, 64);
this.CbbAutoVer.Name = "CbbAutoVer";
this.CbbAutoVer.Size = new System.Drawing.Size(136, 22);
this.CbbAutoVer.TabIndex = 27;
//
// BtnScan
//
this.BtnScan.BaseColor = System.Drawing.Color.FromArgb(((int)(((byte)(51)))), ((int)(((byte)(76)))), ((int)(((byte)(95)))));
this.BtnScan.Location = new System.Drawing.Point(674, 25);
this.BtnScan.Name = "BtnScan";
this.BtnScan.Size = new System.Drawing.Size(75, 33);
this.BtnScan.TabIndex = 28;
this.BtnScan.Text = "扫描";
this.BtnScan.UseVisualStyleBackColor = true;
this.BtnScan.Click += new System.EventHandler(this.BtnScan_Click);
//
// FrmProjectSearch
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(771, 438);
this.Controls.Add(this.BtnScan);
this.Controls.Add(this.CbbAutoVer);
this.Controls.Add(this.ChkDealWithVer);
this.Controls.Add(this.LblState);
this.Controls.Add(this.BtnBrowser);
this.Controls.Add(this.label1);
this.Controls.Add(this.TxtFolder);
this.Name = "FrmProjectSearch";
this.StartPosition = System.Windows.Forms.FormStartPosition.Manual;
this.Text = "项目自动更新设置";
this.Load += new System.EventHandler(this.FrmProjectSearch_Load);
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
private ryControls.ButtonEx BtnBrowser;
private System.Windows.Forms.Label label1;
private ryControls.TextBoxEx2 TxtFolder;
private System.Windows.Forms.Label LblState;
private System.Windows.Forms.CheckBox ChkDealWithVer;
private ryControls.RyComboBox CbbAutoVer;
private ryControls.ButtonEx BtnScan;
}
}
@@ -0,0 +1,54 @@
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;
namespace 开发辅助工具.Tools
{
public partial class FrmProjectSearch : Form
{
public FrmProjectSearch()
{
InitializeComponent();
CbbAutoVer.SelectedIndex = 0;
}
private void FrmProjectSearch_Load(object sender, EventArgs e)
{
ryCommon.RyFiles.AddDropDrag(TxtFolder.Handle).ElevatedDragDrop += FrmCreateProject_ElevatedDragDrop;
}
private void FrmCreateProject_ElevatedDragDrop(object sender, ElevatedDragDropArgs e)
{
TxtFolder.Text = e.Files[0];
}
/// <summary>
/// 是否处理版本信息
/// </summary>
bool DealWithVer_ON = false;
/// <summary>
/// 处理版本信息的方式
/// </summary>
int AutoVer = 0;
private void AutoScan(string folder)
{
Manager.RyProject project = new Manager.RyProject();
project.ChangedOutputPath = false;
project.CopyDllToBin = false;
project.UpdateCSproj(folder);
this.Invoke(new Action(() =>
{
MessageBox.Show("更新完成。", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
}));
}
private void BtnScan_Click(object sender, EventArgs e)
{
DealWithVer_ON = ChkDealWithVer.Checked;
AutoVer = CbbAutoVer.SelectedIndex = 0;
}
}
}
@@ -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>
+279
View File
@@ -0,0 +1,279 @@
namespace 开发辅助工具.Tools
{
partial class FrmQrCode
{
/// <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(FrmQrCode));
this.tabControl1 = new System.Windows.Forms.TabControl();
this.tabPage1 = new System.Windows.Forms.TabPage();
this.pictureBox1 = new System.Windows.Forms.PictureBox();
this.BtnCreate = new ryControls.ButtonEx();
this.TxtFromStr = new ryControls.TextBoxEx2();
this.tabPage2 = new System.Windows.Forms.TabPage();
this.BtnCapture = new ryControls.ButtonEx();
this.BtnAnaly = new ryControls.ButtonEx();
this.TxtToResult = new ryControls.TextBoxEx2();
this.pictureBox2 = new System.Windows.Forms.PictureBox();
this.BtnBrowser = new ryControls.ButtonEx();
this.TxtQrCodePath = new ryControls.TextBoxEx2();
this.menuRight1 = new ryPaiban.Model.MenuRight(this.components);
this.openFileDialog1 = new System.Windows.Forms.OpenFileDialog();
this.saveFileDialog1 = new System.Windows.Forms.SaveFileDialog();
this.tabControl1.SuspendLayout();
this.tabPage1.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit();
this.tabPage2.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.pictureBox2)).BeginInit();
this.SuspendLayout();
//
// tabControl1
//
this.tabControl1.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.tabControl1.Controls.Add(this.tabPage1);
this.tabControl1.Controls.Add(this.tabPage2);
this.tabControl1.Location = new System.Drawing.Point(3, 1);
this.tabControl1.Name = "tabControl1";
this.tabControl1.SelectedIndex = 0;
this.tabControl1.Size = new System.Drawing.Size(906, 502);
this.tabControl1.TabIndex = 0;
//
// tabPage1
//
this.tabPage1.Controls.Add(this.pictureBox1);
this.tabPage1.Controls.Add(this.BtnCreate);
this.tabPage1.Controls.Add(this.TxtFromStr);
this.tabPage1.Location = new System.Drawing.Point(4, 22);
this.tabPage1.Name = "tabPage1";
this.tabPage1.Padding = new System.Windows.Forms.Padding(3);
this.tabPage1.Size = new System.Drawing.Size(898, 476);
this.tabPage1.TabIndex = 0;
this.tabPage1.Text = "二维码生成";
this.tabPage1.UseVisualStyleBackColor = true;
//
// pictureBox1
//
this.pictureBox1.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.pictureBox1.Location = new System.Drawing.Point(7, 158);
this.pictureBox1.Name = "pictureBox1";
this.pictureBox1.Size = new System.Drawing.Size(882, 312);
this.pictureBox1.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom;
this.pictureBox1.TabIndex = 2;
this.pictureBox1.TabStop = false;
this.pictureBox1.Click += new System.EventHandler(this.PictureBox1_Click);
//
// BtnCreate
//
this.BtnCreate.ForeColor = System.Drawing.Color.White;
this.BtnCreate.Location = new System.Drawing.Point(7, 6);
this.BtnCreate.Name = "BtnCreate";
this.BtnCreate.Size = new System.Drawing.Size(67, 23);
this.BtnCreate.TabIndex = 1;
this.BtnCreate.Text = "生成";
this.BtnCreate.UseVisualStyleBackColor = true;
this.BtnCreate.Click += new System.EventHandler(this.BtnCreate_Click);
//
// TxtFromStr
//
this.TxtFromStr.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.TxtFromStr.BackColor = System.Drawing.Color.White;
this.TxtFromStr.EmptyText = "";
this.TxtFromStr.Location = new System.Drawing.Point(7, 35);
this.TxtFromStr.MaxLength = 999999999;
this.TxtFromStr.Multiline = true;
this.TxtFromStr.Name = "TxtFromStr";
this.TxtFromStr.OnlyNumeric = false;
this.TxtFromStr.PasswordChar = '\0';
this.TxtFromStr.ReadOnly = false;
this.TxtFromStr.SelectedText = "";
this.TxtFromStr.SelectionLength = 0;
this.TxtFromStr.SelectionStart = 0;
this.TxtFromStr.Size = new System.Drawing.Size(882, 117);
this.TxtFromStr.TabIndex = 0;
this.TxtFromStr.TextAlign = System.Windows.Forms.HorizontalAlignment.Left;
this.TxtFromStr.ToolTip = "";
this.TxtFromStr.DoubleClick += new System.EventHandler(this.TxtFromStr_DoubleClick);
//
// tabPage2
//
this.tabPage2.Controls.Add(this.BtnCapture);
this.tabPage2.Controls.Add(this.BtnAnaly);
this.tabPage2.Controls.Add(this.TxtToResult);
this.tabPage2.Controls.Add(this.pictureBox2);
this.tabPage2.Controls.Add(this.BtnBrowser);
this.tabPage2.Controls.Add(this.TxtQrCodePath);
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(898, 476);
this.tabPage2.TabIndex = 1;
this.tabPage2.Text = "二维码解析";
this.tabPage2.UseVisualStyleBackColor = true;
//
// BtnCapture
//
this.BtnCapture.ForeColor = System.Drawing.Color.White;
this.BtnCapture.Location = new System.Drawing.Point(622, 6);
this.BtnCapture.Name = "BtnCapture";
this.BtnCapture.Size = new System.Drawing.Size(71, 30);
this.BtnCapture.TabIndex = 6;
this.BtnCapture.Text = "截图";
this.BtnCapture.UseVisualStyleBackColor = true;
this.BtnCapture.Click += new System.EventHandler(this.BtnCapture_Click);
//
// BtnAnaly
//
this.BtnAnaly.ForeColor = System.Drawing.Color.White;
this.BtnAnaly.Location = new System.Drawing.Point(699, 6);
this.BtnAnaly.Name = "BtnAnaly";
this.BtnAnaly.Size = new System.Drawing.Size(71, 30);
this.BtnAnaly.TabIndex = 5;
this.BtnAnaly.Text = "解析";
this.BtnAnaly.UseVisualStyleBackColor = true;
this.BtnAnaly.Click += new System.EventHandler(this.BtnAnaly_Click);
//
// TxtToResult
//
this.TxtToResult.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.TxtToResult.BackColor = System.Drawing.Color.White;
this.TxtToResult.EmptyText = "解析出来的内容";
this.TxtToResult.Location = new System.Drawing.Point(6, 42);
this.TxtToResult.MaxLength = 999999999;
this.TxtToResult.Multiline = true;
this.TxtToResult.Name = "TxtToResult";
this.TxtToResult.OnlyNumeric = false;
this.TxtToResult.PasswordChar = '\0';
this.TxtToResult.ReadOnly = false;
this.TxtToResult.SelectedText = "";
this.TxtToResult.SelectionLength = 0;
this.TxtToResult.SelectionStart = 0;
this.TxtToResult.Size = new System.Drawing.Size(882, 117);
this.TxtToResult.TabIndex = 4;
this.TxtToResult.TextAlign = System.Windows.Forms.HorizontalAlignment.Left;
this.TxtToResult.ToolTip = "";
//
// pictureBox2
//
this.pictureBox2.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.pictureBox2.Location = new System.Drawing.Point(8, 165);
this.pictureBox2.Name = "pictureBox2";
this.pictureBox2.Size = new System.Drawing.Size(882, 305);
this.pictureBox2.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom;
this.pictureBox2.TabIndex = 3;
this.pictureBox2.TabStop = false;
//
// BtnBrowser
//
this.BtnBrowser.ForeColor = System.Drawing.Color.White;
this.BtnBrowser.Location = new System.Drawing.Point(541, 6);
this.BtnBrowser.Name = "BtnBrowser";
this.BtnBrowser.Size = new System.Drawing.Size(75, 30);
this.BtnBrowser.TabIndex = 1;
this.BtnBrowser.Text = "浏览";
this.BtnBrowser.UseVisualStyleBackColor = true;
this.BtnBrowser.Click += new System.EventHandler(this.BtnBrowser_Click);
//
// TxtQrCodePath
//
this.TxtQrCodePath.BackColor = System.Drawing.Color.White;
this.TxtQrCodePath.EmptyText = "二维码图片路径";
this.TxtQrCodePath.Location = new System.Drawing.Point(6, 6);
this.TxtQrCodePath.MaxLength = 999999999;
this.TxtQrCodePath.Multiline = false;
this.TxtQrCodePath.Name = "TxtQrCodePath";
this.TxtQrCodePath.OnlyNumeric = false;
this.TxtQrCodePath.PasswordChar = '\0';
this.TxtQrCodePath.ReadOnly = false;
this.TxtQrCodePath.SelectedText = "";
this.TxtQrCodePath.SelectionLength = 0;
this.TxtQrCodePath.SelectionStart = 0;
this.TxtQrCodePath.Size = new System.Drawing.Size(529, 30);
this.TxtQrCodePath.TabIndex = 0;
this.TxtQrCodePath.TextAlign = System.Windows.Forms.HorizontalAlignment.Left;
this.TxtQrCodePath.ToolTip = "";
//
// menuRight1
//
this.menuRight1.Name = "menuRight1";
this.menuRight1.Size = new System.Drawing.Size(173, 48);
this.menuRight1.SourceContent = this;
//
// openFileDialog1
//
this.openFileDialog1.Filter = "图片文件|*.jpg;*.bmp;*.png;*.jpeg;";
//
// saveFileDialog1
//
this.saveFileDialog1.Filter = "图片文件|*.jpg;*.bmp;*.png;*.jpeg;|BMP图片|*.bmp|JPG图片|*.jpg;*.jpeg|PNG图片|*.png";
//
// FrmQrCode
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(907, 509);
this.Controls.Add(this.tabControl1);
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
this.Name = "FrmQrCode";
this.TabPageContextMenuStrip = this.menuRight1;
this.Text = "二维码生成和读取";
this.tabControl1.ResumeLayout(false);
this.tabPage1.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit();
this.tabPage2.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.pictureBox2)).EndInit();
this.ResumeLayout(false);
}
#endregion
private System.Windows.Forms.TabControl tabControl1;
private System.Windows.Forms.TabPage tabPage1;
private ryControls.ButtonEx BtnCreate;
private ryControls.TextBoxEx2 TxtFromStr;
private System.Windows.Forms.TabPage tabPage2;
private System.Windows.Forms.PictureBox pictureBox1;
private ryPaiban.Model.MenuRight menuRight1;
private ryControls.ButtonEx BtnAnaly;
private ryControls.TextBoxEx2 TxtToResult;
private System.Windows.Forms.PictureBox pictureBox2;
private ryControls.ButtonEx BtnBrowser;
private ryControls.TextBoxEx2 TxtQrCodePath;
private System.Windows.Forms.OpenFileDialog openFileDialog1;
private ryControls.ButtonEx BtnCapture;
private System.Windows.Forms.SaveFileDialog saveFileDialog1;
}
}
@@ -0,0 +1,164 @@
using _SCREEN_CAPTURE;
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 WeifenLuo.WinFormsUI.Docking;
using ZXing;
namespace 开发辅助工具.Tools
{
public partial class FrmQrCode : DockContent
{
public FrmQrCode()
{
InitializeComponent();
}
/// <summary>
/// 生成二维码图片
/// </summary>
/// <param name="strMessage">要生成二维码的字符串</param>
/// <param name="width">二维码图片宽度</param>
/// <param name="height">二维码图片高度</param>
/// <returns></returns>
private Bitmap CreateQrCode(String strMessage, Int32 width, Int32 height)
{
Bitmap result = null;
try
{
BarcodeWriter barCodeWriter = new BarcodeWriter
{
Format = BarcodeFormat.QR_CODE
};
barCodeWriter.Options.Hints.Add(EncodeHintType.CHARACTER_SET, "UTF-8");
barCodeWriter.Options.Hints.Add(EncodeHintType.ERROR_CORRECTION, ZXing.QrCode.Internal.ErrorCorrectionLevel.H);
barCodeWriter.Options.Height = height;
barCodeWriter.Options.Width = width;
barCodeWriter.Options.Margin = 0;
ZXing.Common.BitMatrix bm = barCodeWriter.Encode(strMessage);
result = barCodeWriter.Write(bm);
Bitmap qr_bg = (Bitmap)ryCommon.RyFiles.LoadPicFromFile(Application.StartupPath + "\\mod\\qr_bg.jpg");
Graphics g = Graphics.FromImage(qr_bg);
g.DrawImage(result, new Rectangle(25, 25, qr_bg.Width - 50, qr_bg.Height - 50));
result = qr_bg;
}
catch (Exception)
{
//异常输出
}
return result;
}
private void BtnCreate_Click(object sender, EventArgs e)
{
pictureBox1.Image= CreateQrCode(TxtFromStr.Text, 256, 256);
}
private void BtnBrowser_Click(object sender, EventArgs e)
{
if(openFileDialog1.ShowDialog()==DialogResult.OK)
{
TxtQrCodePath.Text = openFileDialog1.FileName;
BtnAnaly.PerformClick();
}
}
private void BtnAnaly_Click(object sender, EventArgs e)
{
string path = TxtQrCodePath.Text;
if (!System.IO.File.Exists(path)) { Init(); return; }
var img = ryCommon.RyFiles.LoadPicFromFile(path);
if (img == null) { Init(); return; }
Bitmap bmap;
try
{
bmap = new Bitmap(img);
}
catch (System.IO.IOException ioe)
{
MessageBox.Show(ioe.ToString(),"提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
return;
}
if (bmap == null)
{
MessageBox.Show("不能解码图片","提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
return;
}
try
{
BarcodeReader reader = new BarcodeReader();
reader.Options.CharacterSet = "UTF-8";
var result = reader.Decode(bmap);
TxtToResult.Text = (result == null) ? "" : result.Text;
pictureBox2.Image = img;
}
catch (Exception)
{
Init();
MessageBox.Show("解析二维码失败。", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
}
void Init()
{
pictureBox2.Image = null; TxtToResult.Text = "";
}
}
private void PictureBox1_Click(object sender, EventArgs e)
{
if(saveFileDialog1.ShowDialog()==DialogResult.OK)
{
try
{
pictureBox1.Image.Save(saveFileDialog1.FileName);
}
catch (Exception ex)
{
MessageBox.Show(ex.Message, "错误", MessageBoxButtons.OK, MessageBoxIcon.Information);
}
}
}
private void BtnCapture_Click(object sender, EventArgs e)
{
ScreenCapture capture = new _SCREEN_CAPTURE.ScreenCapture();
Bitmap m = capture.StartCapture(false);
if (m != null)
{
try
{
BarcodeReader reader = new BarcodeReader();
reader.Options.CharacterSet = "UTF-8";
var result = reader.Decode(m);
TxtToResult.Text = (result == null) ? "" : result.Text;
pictureBox2.Image = m;
}
catch (Exception)
{
Init();
MessageBox.Show("解析二维码失败。", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
}
void Init()
{
pictureBox2.Image = null; TxtToResult.Text = "";
}
}
}
private void TxtFromStr_DoubleClick(object sender, EventArgs e)
{
ryControls.TextBoxEx2 txt = (ryControls.TextBoxEx2)sender;
开发辅助工具.Controls.FrmText frm = new Controls.FrmText
{
Icon = Icon
};
frm.richTextBox1.Text = txt.Text;
if (frm.ShowDialog() == DialogResult.OK)
{
txt.Text = frm.richTextBox1.Text;
}
}
}
}
@@ -0,0 +1,206 @@
<?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="menuRight1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</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>
AAABAAEAICAAAAEAIACoEAAAFgAAACgAAAAgAAAAQAAAAAEAIAAAAAAAABAAAGEPAABhDwAAAAAAAAAA
AAAAAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAOUAAAAkAAAAAAAA
AAAAAAAbAAAA4gAAAOsAAAAkAAAAGwAAAOIAAADqAAAAIQAAABgAAADiAAAA6gAAACEAAAAZAAAA4gAA
AOkAAAAiAAAAAAAAAP8AAAD8AAAA4wAAAN4AAADeAAAA3gAAAN4AAADeAAAA3gAAAOIAAAD9AAAA5QAA
ACQAAAACAAAAHgAAADoAAADIAAAAywAAAB8AAAAXAAAAwwAAAM8AAAA+AAAAOAAAAMgAAADOAAAAPgAA
ADgAAADIAAAAzgAAAD8AAAAiAAAA/wAAAOgAAAA8AAAAGgAAABsAAAAaAAAAGgAAABsAAAAbAAAANwAA
AOQAAADnAAAAIgAAABkAAADMAAAA1QAAADgAAAAWAAAABAAAAAMAAAAVAAAAMwAAANAAAADVAAAANgAA
ADAAAADPAAAA1QAAADkAAAAyAAAAzgAAAOkAAAD/AAAA5QAAACIAAAAAAAAAHgAAACMAAAAjAAAAHwAA
AAEAAAAcAAAA4AAAAOcAAAAiAAAAGAAAAMYAAADPAAAAPgAAAB4AAAAFAAAABAAAAB0AAAA6A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AAAAABgAAAAcAAAAHAAAABkAAAAAAAAAGgAAAN4AAAD/AAAA/wAA
AOkAAABCAAAAIQAAACIAAAAiAAAAIgAAACIAAAAiAAAAPQAAAOUAAADnAAAAJAAAAAIAAAAcAAAAOAAA
AMoAAADMAAAAHwAAABsAAADgAAAA7AAAAEMAAAAhAAAAIgAAACIAAAAiAAAAIgAAACIAAAA8AAAA4wAA
AP8AAAD/AAAA/AAAAOkAAADlAAAA5QAAAOUAAADlAAAA5QAAAOUAAADoAAAA/QAAAOUAAAAiAAAAGQAA
AMoAAADTAAAAOgAAABgAAAACAAAAHQAAAN4AAAD/AAAA6QAAAOUAAADlAAAA5QAAAOUAAADlAAAA5QAA
AOgAAAD8AAAA/wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA5QAA
ACIAAAAcAAAA4wAAAOkAAAAiAAAAAAAAAAAAAAAdAAAA3gAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAA
AP8AAAD/AAAA/wAAAP8AAAD/AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=
</value>
</data>
<metadata name="openFileDialog1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>141, 17</value>
</metadata>
<metadata name="saveFileDialog1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>289, 17</value>
</metadata>
</root>
+290
View File
@@ -0,0 +1,290 @@
namespace 开发辅助工具.Tools
{
partial class FrmRegex
{
/// <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(FrmRegex));
this.tabControl3 = new System.Windows.Forms.TabControl();
this.TabTxtResult = new System.Windows.Forms.TabPage();
this.RichRegexOutput = new System.Windows.Forms.RichTextBox();
this.contextMenuStripRichText1 = new ryProcessManager.hezuo.ContextMenuStripRichText();
this.tabPage10 = new System.Windows.Forms.TabPage();
this.table1 = new XPTable.Models.Table();
this.columnModel1 = new XPTable.Models.ColumnModel();
this.textColumn1 = new XPTable.Models.TextColumn();
this.textColumn2 = new XPTable.Models.TextColumn();
this.textColumn3 = new XPTable.Models.TextColumn();
this.tableModel1 = new XPTable.Models.TableModel();
this.tabPage11 = new System.Windows.Forms.TabPage();
this.LnkRegexHelp = new System.Windows.Forms.LinkLabel();
this.ChkIgnoreCase = new System.Windows.Forms.CheckBox();
this.ChkMultiline = new System.Windows.Forms.CheckBox();
this.RySearchRegex = new ryControls.rySearch();
this.label12 = new System.Windows.Forms.Label();
this.menuRight1 = new ryPaiban.Model.MenuRight(this.components);
this.TxtRegexInput = new ryControls.Controls.RichTextBox2();
this.tabControl3.SuspendLayout();
this.TabTxtResult.SuspendLayout();
this.tabPage10.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.table1)).BeginInit();
this.tabPage11.SuspendLayout();
this.SuspendLayout();
//
// tabControl3
//
this.tabControl3.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.tabControl3.Controls.Add(this.TabTxtResult);
this.tabControl3.Controls.Add(this.tabPage10);
this.tabControl3.Controls.Add(this.tabPage11);
this.tabControl3.Location = new System.Drawing.Point(12, 201);
this.tabControl3.Name = "tabControl3";
this.tabControl3.SelectedIndex = 0;
this.tabControl3.Size = new System.Drawing.Size(825, 294);
this.tabControl3.TabIndex = 13;
//
// TabTxtResult
//
this.TabTxtResult.Controls.Add(this.RichRegexOutput);
this.TabTxtResult.Location = new System.Drawing.Point(4, 22);
this.TabTxtResult.Name = "TabTxtResult";
this.TabTxtResult.Padding = new System.Windows.Forms.Padding(3);
this.TabTxtResult.Size = new System.Drawing.Size(817, 268);
this.TabTxtResult.TabIndex = 0;
this.TabTxtResult.Text = "普通结果";
this.TabTxtResult.UseVisualStyleBackColor = true;
//
// RichRegexOutput
//
this.RichRegexOutput.BackColor = System.Drawing.Color.White;
this.RichRegexOutput.BorderStyle = System.Windows.Forms.BorderStyle.None;
this.RichRegexOutput.ContextMenuStrip = this.contextMenuStripRichText1;
this.RichRegexOutput.Dock = System.Windows.Forms.DockStyle.Fill;
this.RichRegexOutput.Location = new System.Drawing.Point(3, 3);
this.RichRegexOutput.Name = "RichRegexOutput";
this.RichRegexOutput.ReadOnly = true;
this.RichRegexOutput.Size = new System.Drawing.Size(811, 262);
this.RichRegexOutput.TabIndex = 4;
this.RichRegexOutput.Text = "";
this.RichRegexOutput.WordWrap = false;
//
// contextMenuStripRichText1
//
this.contextMenuStripRichText1.Name = "contextMenuStripRichText1";
this.contextMenuStripRichText1.Size = new System.Drawing.Size(101, 164);
//
// tabPage10
//
this.tabPage10.Controls.Add(this.table1);
this.tabPage10.Location = new System.Drawing.Point(4, 22);
this.tabPage10.Name = "tabPage10";
this.tabPage10.Padding = new System.Windows.Forms.Padding(3);
this.tabPage10.Size = new System.Drawing.Size(817, 268);
this.tabPage10.TabIndex = 1;
this.tabPage10.Text = "列表展示";
this.tabPage10.UseVisualStyleBackColor = true;
//
// table1
//
this.table1.ColumnModel = this.columnModel1;
this.table1.Dock = System.Windows.Forms.DockStyle.Fill;
this.table1.FullRowSelect = true;
this.table1.Location = new System.Drawing.Point(3, 3);
this.table1.Name = "table1";
this.table1.NoItemsText = "当前列表没有任何项";
this.table1.Size = new System.Drawing.Size(811, 262);
this.table1.TabIndex = 0;
this.table1.TableModel = this.tableModel1;
this.table1.Text = "table1";
//
// columnModel1
//
this.columnModel1.Columns.AddRange(new XPTable.Models.Column[] {
this.textColumn1,
this.textColumn2,
this.textColumn3});
//
// textColumn1
//
this.textColumn1.Editable = false;
this.textColumn1.Tag = null;
this.textColumn1.Text = "匹配的内容";
this.textColumn1.Width = 550;
//
// textColumn2
//
this.textColumn2.Editable = false;
this.textColumn2.Tag = null;
this.textColumn2.Text = "位置";
//
// textColumn3
//
this.textColumn3.Editable = false;
this.textColumn3.Tag = null;
this.textColumn3.Text = "分组";
this.textColumn3.Width = 150;
//
// tabPage11
//
this.tabPage11.Controls.Add(this.LnkRegexHelp);
this.tabPage11.Location = new System.Drawing.Point(4, 22);
this.tabPage11.Name = "tabPage11";
this.tabPage11.Padding = new System.Windows.Forms.Padding(3);
this.tabPage11.Size = new System.Drawing.Size(817, 268);
this.tabPage11.TabIndex = 2;
this.tabPage11.Text = "正则帮助";
this.tabPage11.UseVisualStyleBackColor = true;
//
// LnkRegexHelp
//
this.LnkRegexHelp.AutoSize = true;
this.LnkRegexHelp.Location = new System.Drawing.Point(13, 10);
this.LnkRegexHelp.Name = "LnkRegexHelp";
this.LnkRegexHelp.Size = new System.Drawing.Size(53, 12);
this.LnkRegexHelp.TabIndex = 0;
this.LnkRegexHelp.TabStop = true;
this.LnkRegexHelp.Text = "访问帮助";
this.LnkRegexHelp.LinkClicked += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(this.LnkRegexHelp_LinkClicked);
//
// ChkIgnoreCase
//
this.ChkIgnoreCase.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.ChkIgnoreCase.AutoSize = true;
this.ChkIgnoreCase.Location = new System.Drawing.Point(616, 12);
this.ChkIgnoreCase.Name = "ChkIgnoreCase";
this.ChkIgnoreCase.Size = new System.Drawing.Size(84, 16);
this.ChkIgnoreCase.TabIndex = 17;
this.ChkIgnoreCase.Text = "忽略大小写";
this.ChkIgnoreCase.UseVisualStyleBackColor = true;
//
// ChkMultiline
//
this.ChkMultiline.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.ChkMultiline.AutoSize = true;
this.ChkMultiline.Location = new System.Drawing.Point(538, 12);
this.ChkMultiline.Name = "ChkMultiline";
this.ChkMultiline.Size = new System.Drawing.Size(72, 16);
this.ChkMultiline.TabIndex = 16;
this.ChkMultiline.Text = "多行模式";
this.ChkMultiline.UseVisualStyleBackColor = true;
//
// RySearchRegex
//
this.RySearchRegex.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.RySearchRegex.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(236)))), ((int)(((byte)(239)))), ((int)(((byte)(244)))));
this.RySearchRegex.BaseColor = System.Drawing.Color.FromArgb(((int)(((byte)(51)))), ((int)(((byte)(76)))), ((int)(((byte)(95)))));
this.RySearchRegex.EmptyText = "";
this.RySearchRegex.Location = new System.Drawing.Point(81, 6);
this.RySearchRegex.Name = "RySearchRegex";
this.RySearchRegex.Size = new System.Drawing.Size(451, 25);
this.RySearchRegex.TabIndex = 14;
this.RySearchRegex.OnSearch += new System.EventHandler(this.RySearchRegex_OnSearch);
//
// label12
//
this.label12.AutoSize = true;
this.label12.Location = new System.Drawing.Point(10, 13);
this.label12.Name = "label12";
this.label12.Size = new System.Drawing.Size(65, 12);
this.label12.TabIndex = 12;
this.label12.Text = "正则表达式";
//
// menuRight1
//
this.menuRight1.Name = "menuRight1";
this.menuRight1.Size = new System.Drawing.Size(185, 70);
this.menuRight1.SourceContent = this;
//
// TxtRegexInput
//
this.TxtRegexInput.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.TxtRegexInput.BorderStyle = System.Windows.Forms.BorderStyle.None;
this.TxtRegexInput.DetectUrls = false;
this.TxtRegexInput.EmptyText = "在此输入待匹配文本";
this.TxtRegexInput.ForeColor = System.Drawing.Color.Black;
this.TxtRegexInput.Location = new System.Drawing.Point(12, 37);
this.TxtRegexInput.Name = "TxtRegexInput";
this.TxtRegexInput.OnlyInputText = true;
this.TxtRegexInput.Size = new System.Drawing.Size(825, 158);
this.TxtRegexInput.TabIndex = 18;
this.TxtRegexInput.Text = "";
this.TxtRegexInput.DoubleClick += new System.EventHandler(this.TxtRegexInput_DoubleClick);
//
// FrmRegex
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(849, 499);
this.Controls.Add(this.TxtRegexInput);
this.Controls.Add(this.tabControl3);
this.Controls.Add(this.ChkIgnoreCase);
this.Controls.Add(this.ChkMultiline);
this.Controls.Add(this.RySearchRegex);
this.Controls.Add(this.label12);
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
this.Name = "FrmRegex";
this.TabPageContextMenuStrip = this.menuRight1;
this.Text = "正则表达式";
this.tabControl3.ResumeLayout(false);
this.TabTxtResult.ResumeLayout(false);
this.tabPage10.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.table1)).EndInit();
this.tabPage11.ResumeLayout(false);
this.tabPage11.PerformLayout();
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
private System.Windows.Forms.TabControl tabControl3;
private System.Windows.Forms.TabPage TabTxtResult;
private System.Windows.Forms.RichTextBox RichRegexOutput;
private System.Windows.Forms.TabPage tabPage10;
private XPTable.Models.Table table1;
private System.Windows.Forms.TabPage tabPage11;
private System.Windows.Forms.LinkLabel LnkRegexHelp;
private System.Windows.Forms.CheckBox ChkIgnoreCase;
private System.Windows.Forms.CheckBox ChkMultiline;
private ryControls.rySearch RySearchRegex;
private System.Windows.Forms.Label label12;
private XPTable.Models.ColumnModel columnModel1;
private XPTable.Models.TableModel tableModel1;
private XPTable.Models.TextColumn textColumn1;
private XPTable.Models.TextColumn textColumn2;
private XPTable.Models.TextColumn textColumn3;
private ryProcessManager.hezuo.ContextMenuStripRichText contextMenuStripRichText1;
private ryPaiban.Model.MenuRight menuRight1;
private ryControls.Controls.RichTextBox2 TxtRegexInput;
}
}
+110
View File
@@ -0,0 +1,110 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Text.RegularExpressions;
using System.Windows.Forms;
using WeifenLuo.WinFormsUI.Docking;
namespace 开发辅助工具.Tools
{
public partial class FrmRegex : DockContent
{
public FrmRegex()
{
InitializeComponent();
}
private void RySearchRegex_OnSearch(object sender, EventArgs e)
{
if (RySearchRegex.Text.Trim() == "")
{
MessageBox.Show("正则表达式不能为空。", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
return;
}
RichRegexOutput.Text = "";
table1.TableModel.Rows.Clear();
tabPage10.Text = "列表展示(" + tableModel1.Rows.Count + ")";
TabTxtResult.Text = "普通结果(正在读取)";
bool IgnoreCase = ChkIgnoreCase.Checked;
bool Multiline = ChkMultiline.Checked;
string RegexText = RySearchRegex.Text;
string RegexInput = TxtRegexInput.Text;
table1.BeginUpdate();
try
{
RegexOptions option = new RegexOptions();
if (IgnoreCase)
{
option = RegexOptions.IgnoreCase;
}
if (Multiline) { option = option | RegexOptions.Multiline; }
Regex reg = new Regex(RegexText, option);
//返回一个结果集
MatchCollection result = reg.Matches(RegexInput);
string[] groups = reg.GetGroupNames();
string txt = "";
//遍历每个结果
for(int n=0;n<result.Count;n++)
{
Match m = result[n];
//输出结果
txt += m.ToString() + "\r\n";
if (m.Groups.Count > 0)
{
for (int i = 0; i < groups.Length; i++)
{
XPTable.Models.Row itemList = new XPTable.Models.Row();
//需要修改此处
itemList.Cells.Add(new XPTable.Models.Cell(m.Groups[groups[i]].Value));//示例
itemList.Cells.Add(new XPTable.Models.Cell(m.Index.ToString()));
itemList.Cells.Add(new XPTable.Models.Cell(groups[i]));
tableModel1.Rows.Add(itemList);
}
}
else
{
XPTable.Models.Row itemList = new XPTable.Models.Row();
//需要修改此处
itemList.Cells.Add(new XPTable.Models.Cell(m.ToString()));//示例
itemList.Cells.Add(new XPTable.Models.Cell(m.Index.ToString()));
itemList.Cells.Add(new XPTable.Models.Cell(""));
tableModel1.Rows.Add(itemList);
}
}
table1.EndUpdate();
RichRegexOutput.Text = txt;
TabTxtResult.Text = "普通结果("+result.Count+")";
tabPage10.Text = "列表展示(" + tableModel1.Rows.Count + ")";
}
catch (Exception ex)
{
TabTxtResult.Text = "普通结果(" + 0 + ")";
tabPage10.Text = "列表展示(" + tableModel1.Rows.Count + ")";
MessageBox.Show(ex.Message, "提示", MessageBoxButtons.OK, MessageBoxIcon.Warning);
}
}
private void LnkRegexHelp_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
{
ryCommon.RyFiles.OpenUrl("http://www.runoob.com/regexp/regexp-metachar.html");
}
private void TxtRegexInput_DoubleClick(object sender, EventArgs e)
{
ryControls.Controls.RichTextBox2 txt = (ryControls.Controls.RichTextBox2)sender;
开发辅助工具.Controls.FrmText frm = new Controls.FrmText
{
Icon = Icon
};
frm.richTextBox1.Text = txt.Text;
if (frm.ShowDialog() == DialogResult.OK)
{
txt.Text = frm.richTextBox1.Text;
}
}
}
}
@@ -0,0 +1,209 @@
<?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="contextMenuStripRichText1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>303, 14</value>
</metadata>
<metadata name="columnModel1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>35, 14</value>
</metadata>
<metadata name="tableModel1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>176, 14</value>
</metadata>
<metadata name="menuRight1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>518, 14</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>
AAABAAEAICAAAAEAIACoEAAAFgAAACgAAAAgAAAAQAAAAAEAIAAAAAAAABAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAJmZmQCKiooAnp6eAI2N
jQaUlJQXlJSUFYaGhgSenp4AeHh4AJmZmQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAmZmZAJ6e
ngCZmZk5pqammK2trb2srKy7paWllpqamjmdnZ0AmZmZAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACZmZkAmZmZAJmZmQCZmZkAmZmZAAAA
AACZmZkAlZWVEqqqqrTLy8v/1NTU/9PT0//Kysr/qampsZSUlA+ZmZkAAAAAAJmZmQCZmZkAmZmZAJmZ
mQCZmZkAAAAAAAAAAAAAAAAAAA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{
partial class FrmSetup
{
/// <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(FrmSetup));
this.BtnCopyExe = new System.Windows.Forms.Button();
this.BtnCopyPram = new System.Windows.Forms.Button();
this.menuRight1 = new ryPaiban.Model.MenuRight(this.components);
this.SuspendLayout();
//
// BtnCopyExe
//
this.BtnCopyExe.Location = new System.Drawing.Point(12, 12);
this.BtnCopyExe.Name = "BtnCopyExe";
this.BtnCopyExe.Size = new System.Drawing.Size(142, 38);
this.BtnCopyExe.TabIndex = 4;
this.BtnCopyExe.Text = "复制命令";
this.BtnCopyExe.UseVisualStyleBackColor = true;
this.BtnCopyExe.Click += new System.EventHandler(this.BtnCopyExe_Click);
//
// BtnCopyPram
//
this.BtnCopyPram.Location = new System.Drawing.Point(160, 12);
this.BtnCopyPram.Name = "BtnCopyPram";
this.BtnCopyPram.Size = new System.Drawing.Size(142, 38);
this.BtnCopyPram.TabIndex = 5;
this.BtnCopyPram.Text = "复制参数";
this.BtnCopyPram.UseVisualStyleBackColor = true;
this.BtnCopyPram.Click += new System.EventHandler(this.BtnCopyPram_Click);
//
// menuRight1
//
this.menuRight1.Name = "menuRight1";
this.menuRight1.Size = new System.Drawing.Size(185, 92);
this.menuRight1.SourceContent = this;
//
// FrmSetup
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(800, 450);
this.Controls.Add(this.BtnCopyExe);
this.Controls.Add(this.BtnCopyPram);
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
this.Name = "FrmSetup";
this.Text = "安装";
this.ResumeLayout(false);
}
#endregion
private System.Windows.Forms.Button BtnCopyExe;
private System.Windows.Forms.Button BtnCopyPram;
private ryPaiban.Model.MenuRight menuRight1;
}
}
@@ -0,0 +1,30 @@
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 WeifenLuo.WinFormsUI.Docking;
namespace 开发辅助工具.Tools
{
public partial class FrmSetup : DockContent
{
public FrmSetup()
{
InitializeComponent();
}
private void BtnCopyExe_Click(object sender, EventArgs e)
{
ryCommon.RyFiles.CopyToClip(Application.ExecutablePath);
}
private void BtnCopyPram_Click(object sender, EventArgs e)
{
ryCommon.RyFiles.CopyToClip("get \"$(ProjectDir)$(ProjectFileName)\"");
}
}
}
@@ -0,0 +1,200 @@
<?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="menuRight1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</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>
AAABAAEAICAAAAEAIACoEAAAFgAAACgAAAAgAAAAQAAAAAEAIAAAAAAAABAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAJmZmQCKiooAnp6eAI2N
jQaUlJQXlJSUFYaGhgSenp4AeHh4AJmZmQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA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8fHAKSkpABqamoAmZmZAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAA/+AH///gB//4IAQf8AAAD+AAAAfAAAADwAAAA8AAAAPAAAADwAAAA+AA
AAcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4AAAB8AAAAPAAAADwAAAA8AA
AAPAAAAD4AAAB/AAAA/4IAQf/+AH///gB/8=
</value>
</data>
</root>
+99
View File
@@ -0,0 +1,99 @@
namespace 开发辅助工具.Tools
{
partial class FrmStrCount
{
/// <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(FrmStrCount));
this.textEditorControl1 = new ICSharpCode.TextEditor.TextEditorControl();
this.contextMenuStripHighlightText1 = new ryProcessManager.hezuo.ContextMenuStripHighlightText();
this.menuRight1 = new ryPaiban.Model.MenuRight(this.components);
this.TxtFromCode = new ryControls.Controls.RichTextBox2();
this.SuspendLayout();
//
// textEditorControl1
//
this.textEditorControl1.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.textEditorControl1.ContextMenuStrip = this.contextMenuStripHighlightText1;
this.textEditorControl1.IsReadOnly = false;
this.textEditorControl1.Location = new System.Drawing.Point(12, 216);
this.textEditorControl1.Name = "textEditorControl1";
this.textEditorControl1.Size = new System.Drawing.Size(812, 267);
this.textEditorControl1.TabIndex = 19;
//
// contextMenuStripHighlightText1
//
this.contextMenuStripHighlightText1.Name = "contextMenuStripHighlightText1";
this.contextMenuStripHighlightText1.Size = new System.Drawing.Size(101, 186);
//
// menuRight1
//
this.menuRight1.Name = "menuRight1";
this.menuRight1.Size = new System.Drawing.Size(173, 48);
this.menuRight1.SourceContent = this;
//
// TxtFromCode
//
this.TxtFromCode.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.TxtFromCode.BorderStyle = System.Windows.Forms.BorderStyle.None;
this.TxtFromCode.DetectUrls = false;
this.TxtFromCode.EmptyText = "请填写待计算的字符串";
this.TxtFromCode.ForeColor = System.Drawing.Color.Black;
this.TxtFromCode.Location = new System.Drawing.Point(12, 3);
this.TxtFromCode.Name = "TxtFromCode";
this.TxtFromCode.OnlyInputText = true;
this.TxtFromCode.Size = new System.Drawing.Size(812, 207);
this.TxtFromCode.TabIndex = 30;
this.TxtFromCode.Text = "";
this.TxtFromCode.TextChanged += new System.EventHandler(this.TxtFromCode_TextChanged);
//
// FrmStrCount
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(836, 495);
this.Controls.Add(this.TxtFromCode);
this.Controls.Add(this.textEditorControl1);
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
this.Name = "FrmStrCount";
this.TabPageContextMenuStrip = this.menuRight1;
this.Text = "字符串统计";
this.ResumeLayout(false);
}
#endregion
private ICSharpCode.TextEditor.TextEditorControl textEditorControl1;
private ryProcessManager.hezuo.ContextMenuStripHighlightText contextMenuStripHighlightText1;
private ryPaiban.Model.MenuRight menuRight1;
private ryControls.Controls.RichTextBox2 TxtFromCode;
}
}
@@ -0,0 +1,36 @@
using ICSharpCode.TextEditor.Document;
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 WeifenLuo.WinFormsUI.Docking;
namespace 开发辅助工具.Tools
{
public partial class FrmStrCount : DockContent
{
public FrmStrCount()
{
InitializeComponent();
textEditorControl1.IsReadOnly = true;
}
private void TxtFromCode_TextChanged(object sender, EventArgs e)
{
Manager.TotalCount totalCount = new Manager.TotalCount();
string fromText = TxtFromCode.Text;
int iCount = totalCount.GetByteLength(fromText, out int HanziCount, out int engCount, out int NumCount);
string resultStr = "";
resultStr = "字节数: " + iCount.ToString() + "个(汉字算两个字符)";
resultStr += "\r\n字数: " + fromText.Length.ToString() + "个(汉字算一个字符)";
resultStr += "\r\n汉字数: " + HanziCount.ToString() + "个(汉字算一个字符)";
resultStr += "\r\n英文数量: " + engCount.ToString() + "个";
resultStr += "\r\n数字数量: " + NumCount.ToString() + "个";
textEditorControl1.Text = resultStr;
}
}
}
@@ -0,0 +1,194 @@
<?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="contextMenuStripHighlightText1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value>
</metadata>
<metadata name="menuRight1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>262, 17</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>
AAABAAEAIBwAAAEAIACYDgAAFgAAACgAAAAgAAAAOAAAAAEAIAAAAAAAAA4AAKdrAACnawAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA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AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFwAAAD/AAAAoQAAAAEAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADQAAAH8AAABXAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAP8H////A////wH///8B
////AP///wD///wAeD/4AHAf8AAwD+AAMAfAABABgAAQAYAACAGAMA4BgDgEAYAIAAGADAABwAwAA/AO
AAf4DgAf/A8AP///AP///4B///+Af///wH///8B////gf///4P8=
</value>
</data>
</root>
+158
View File
@@ -0,0 +1,158 @@
namespace 开发辅助工具.Tools
{
partial class FrmStrToCode
{
/// <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(FrmStrToCode));
this.RbStrToC = new System.Windows.Forms.RadioButton();
this.RbStrToJS = new System.Windows.Forms.RadioButton();
this.RbStrToQuickJS = new System.Windows.Forms.RadioButton();
this.textEditorControl1 = new ICSharpCode.TextEditor.TextEditorControl();
this.contextMenuStripHighlightText1 = new ryProcessManager.hezuo.ContextMenuStripHighlightText();
this.RbStrToASP = new System.Windows.Forms.RadioButton();
this.menuRight1 = new ryPaiban.Model.MenuRight(this.components);
this.TxtFromCode = new ryControls.Controls.RichTextBox2();
this.SuspendLayout();
//
// RbStrToC
//
this.RbStrToC.AutoSize = true;
this.RbStrToC.Checked = true;
this.RbStrToC.Location = new System.Drawing.Point(12, 216);
this.RbStrToC.Name = "RbStrToC";
this.RbStrToC.Size = new System.Drawing.Size(107, 16);
this.RbStrToC.TabIndex = 16;
this.RbStrToC.TabStop = true;
this.RbStrToC.Text = "字符串转C#代码";
this.RbStrToC.UseVisualStyleBackColor = true;
this.RbStrToC.CheckedChanged += new System.EventHandler(this.RbStrToC_CheckedChanged);
//
// RbStrToJS
//
this.RbStrToJS.AutoSize = true;
this.RbStrToJS.Location = new System.Drawing.Point(158, 216);
this.RbStrToJS.Name = "RbStrToJS";
this.RbStrToJS.Size = new System.Drawing.Size(107, 16);
this.RbStrToJS.TabIndex = 17;
this.RbStrToJS.Text = "字符串转JS代码";
this.RbStrToJS.UseVisualStyleBackColor = true;
this.RbStrToJS.CheckedChanged += new System.EventHandler(this.RbStrToJS_CheckedChanged);
//
// RbStrToQuickJS
//
this.RbStrToQuickJS.AutoSize = true;
this.RbStrToQuickJS.Location = new System.Drawing.Point(306, 216);
this.RbStrToQuickJS.Name = "RbStrToQuickJS";
this.RbStrToQuickJS.Size = new System.Drawing.Size(131, 16);
this.RbStrToQuickJS.TabIndex = 18;
this.RbStrToQuickJS.Text = "字符串转极速JS代码";
this.RbStrToQuickJS.UseVisualStyleBackColor = true;
this.RbStrToQuickJS.CheckedChanged += new System.EventHandler(this.RbStrToQuickJS_CheckedChanged);
//
// textEditorControl1
//
this.textEditorControl1.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.textEditorControl1.ContextMenuStrip = this.contextMenuStripHighlightText1;
this.textEditorControl1.IsReadOnly = false;
this.textEditorControl1.Location = new System.Drawing.Point(12, 238);
this.textEditorControl1.Name = "textEditorControl1";
this.textEditorControl1.Size = new System.Drawing.Size(812, 245);
this.textEditorControl1.TabIndex = 19;
//
// contextMenuStripHighlightText1
//
this.contextMenuStripHighlightText1.Name = "contextMenuStripHighlightText1";
this.contextMenuStripHighlightText1.Size = new System.Drawing.Size(101, 186);
//
// RbStrToASP
//
this.RbStrToASP.AutoSize = true;
this.RbStrToASP.Location = new System.Drawing.Point(477, 216);
this.RbStrToASP.Name = "RbStrToASP";
this.RbStrToASP.Size = new System.Drawing.Size(113, 16);
this.RbStrToASP.TabIndex = 21;
this.RbStrToASP.Text = "字符串转Asp代码";
this.RbStrToASP.UseVisualStyleBackColor = true;
//
// menuRight1
//
this.menuRight1.Name = "menuRight1";
this.menuRight1.Size = new System.Drawing.Size(173, 48);
this.menuRight1.SourceContent = this;
//
// TxtFromCode
//
this.TxtFromCode.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.TxtFromCode.BorderStyle = System.Windows.Forms.BorderStyle.None;
this.TxtFromCode.DetectUrls = false;
this.TxtFromCode.EmptyText = "请填写待转换的内容";
this.TxtFromCode.ForeColor = System.Drawing.Color.Black;
this.TxtFromCode.Location = new System.Drawing.Point(12, 3);
this.TxtFromCode.Name = "TxtFromCode";
this.TxtFromCode.OnlyInputText = true;
this.TxtFromCode.Size = new System.Drawing.Size(812, 207);
this.TxtFromCode.TabIndex = 31;
this.TxtFromCode.Text = "";
this.TxtFromCode.TextChanged += new System.EventHandler(this.TxtFromCode_TextChanged);
this.TxtFromCode.DoubleClick += new System.EventHandler(this.TxtFromCode_DoubleClick);
//
// FrmStrToCode
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(836, 495);
this.Controls.Add(this.TxtFromCode);
this.Controls.Add(this.RbStrToASP);
this.Controls.Add(this.textEditorControl1);
this.Controls.Add(this.RbStrToQuickJS);
this.Controls.Add(this.RbStrToJS);
this.Controls.Add(this.RbStrToC);
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
this.Name = "FrmStrToCode";
this.TabPageContextMenuStrip = this.menuRight1;
this.Text = "字符串转代码";
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
private System.Windows.Forms.RadioButton RbStrToC;
private System.Windows.Forms.RadioButton RbStrToJS;
private System.Windows.Forms.RadioButton RbStrToQuickJS;
private ICSharpCode.TextEditor.TextEditorControl textEditorControl1;
private ryProcessManager.hezuo.ContextMenuStripHighlightText contextMenuStripHighlightText1;
private System.Windows.Forms.RadioButton RbStrToASP;
private ryPaiban.Model.MenuRight menuRight1;
private ryControls.Controls.RichTextBox2 TxtFromCode;
}
}
@@ -0,0 +1,87 @@
using ICSharpCode.TextEditor.Document;
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 WeifenLuo.WinFormsUI.Docking;
namespace 开发辅助工具.Tools
{
public partial class FrmStrToCode : DockContent
{
public FrmStrToCode()
{
InitializeComponent();
textEditorControl1.IsReadOnly = true;
}
private void Convert()
{
StringBuilder builder = new StringBuilder();
string format = "C#";
if (RbStrToC.Checked)
{
builder.Append(" StringBuilder sb = new StringBuilder();\r\n");
builder.Append(" sb.Append(\"" + TxtFromCode.Text.Trim().Replace("\"", "\\\"").Replace("\r\n", "\n").Replace("\n", "\");\r\n sb.Append(\"") + "\");");
format = "C#";
}
else if (RbStrToJS.Checked)
{
builder.Append("var sb=\"" + this.TxtFromCode.Text.Trim().Replace("\"", "\\\"").Replace("\r\n", "\n").Replace("\n", "\";\r\n sb=sb+\"") + "\";");
format = "JavaScript";
}
else if (RbStrToQuickJS.Checked)
{
builder.Append("var sb=\"" + this.TxtFromCode.Text.Trim().Replace("\"", "\\\"").Replace("\r\n", "\n").Replace("\n", "\";\r\n sb=sb+\"") + "\";");
builder = new StringBuilder(builder.ToString().Replace("script", "scr\"+\"ipt") + " document.write(sb);");
builder.Insert(0, "<script>\r\n");
builder.Append ("\r\n</script>");
format = "HTML";
}
else if (RbStrToASP.Checked)
{
builder.Append("sb=\"" + this.TxtFromCode.Text.Trim().Replace("\"", "\"\"").Replace("\r\n", "\n").Replace("\n", "\" & vbCrLf \r\nsb=sb & \"") + "\"");
format = "ASP/XHTML";
}
textEditorControl1.Document.HighlightingStrategy = HighlightingStrategyFactory.CreateHighlightingStrategy(format);
textEditorControl1.Text = builder.ToString();
}
private void RbStrToC_CheckedChanged(object sender, EventArgs e)
{
Convert();
}
private void RbStrToJS_CheckedChanged(object sender, EventArgs e)
{
Convert();
}
private void RbStrToQuickJS_CheckedChanged(object sender, EventArgs e)
{
Convert();
}
private void TxtFromCode_DoubleClick(object sender, EventArgs e)
{
ryControls.Controls.RichTextBox2 txt = (ryControls.Controls.RichTextBox2)sender;
开发辅助工具.Controls.FrmText frm = new Controls.FrmText
{
Icon = Icon
};
frm.richTextBox1.Text = txt.Text;
if (frm.ShowDialog() == DialogResult.OK)
{
txt.Text = frm.richTextBox1.Text;
}
}
private void TxtFromCode_TextChanged(object sender, EventArgs e)
{
Convert();
}
}
}
@@ -0,0 +1,194 @@
<?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="contextMenuStripHighlightText1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value>
</metadata>
<metadata name="menuRight1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>262, 17</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>
AAABAAEAIBwAAAEAIACYDgAAFgAAACgAAAAgAAAAOAAAAAEAIAAAAAAAAA4AAKdrAACnawAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAJAAA
AKAAAABbAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAsAAAA7AAAANgAAAAeAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAA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AAAAAAAAAAAAAAAAAAAAAAAAAAAAP8H////A////wH///8B
////AP///wD///wAeD/4AHAf8AAwD+AAMAfAABABgAAQAYAACAGAMA4BgDgEAYAIAAGADAABwAwAA/AO
AAf4DgAf/A8AP///AP///4B///+Af///wH///8B////gf///4P8=
</value>
</data>
</root>
+361
View File
@@ -0,0 +1,361 @@
namespace 开发辅助工具.Tools
{
partial class FrmTime
{
/// <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(FrmTime));
this.label1 = new System.Windows.Forms.Label();
this.TxtFromUnixTime = new ryControls.TextBoxEx2();
this.label2 = new System.Windows.Forms.Label();
this.TxtResultTime = new ryControls.TextBoxEx2();
this.label3 = new System.Windows.Forms.Label();
this.dateTimePickerEX1 = new ryControls.DateTimePickerEX();
this.TxtResultUnixTime = new ryControls.TextBoxEx2();
this.label4 = new System.Windows.Forms.Label();
this.TxtJSTime2 = new ryControls.TextBoxEx2();
this.label5 = new System.Windows.Forms.Label();
this.TxtJSTime1 = new ryControls.TextBoxEx2();
this.label6 = new System.Windows.Forms.Label();
this.TxtUnixTime3 = new ryControls.TextBoxEx2();
this.label7 = new System.Windows.Forms.Label();
this.TxtResultTime3 = new ryControls.TextBoxEx2();
this.label8 = new System.Windows.Forms.Label();
this.TxtFromJSTime3 = new ryControls.TextBoxEx2();
this.label9 = new System.Windows.Forms.Label();
this.menuRight1 = new ryPaiban.Model.MenuRight(this.components);
this.SuspendLayout();
//
// label1
//
this.label1.AutoSize = true;
this.label1.Location = new System.Drawing.Point(11, 8);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(65, 12);
this.label1.TabIndex = 0;
this.label1.Text = "Unix时间戳";
//
// TxtFromUnixTime
//
this.TxtFromUnixTime.BackColor = System.Drawing.Color.White;
this.TxtFromUnixTime.EmptyText = "请输入时间戳";
this.TxtFromUnixTime.Location = new System.Drawing.Point(13, 23);
this.TxtFromUnixTime.MaxLength = 999999999;
this.TxtFromUnixTime.Multiline = false;
this.TxtFromUnixTime.Name = "TxtFromUnixTime";
this.TxtFromUnixTime.OnlyNumeric = false;
this.TxtFromUnixTime.PasswordChar = '\0';
this.TxtFromUnixTime.ReadOnly = false;
this.TxtFromUnixTime.SelectedText = "";
this.TxtFromUnixTime.SelectionLength = 0;
this.TxtFromUnixTime.SelectionStart = 0;
this.TxtFromUnixTime.Size = new System.Drawing.Size(277, 30);
this.TxtFromUnixTime.TabIndex = 1;
this.TxtFromUnixTime.TextAlign = System.Windows.Forms.HorizontalAlignment.Left;
this.TxtFromUnixTime.ToolTip = "";
this.TxtFromUnixTime.TextChanged2 += new System.EventHandler(this.TxtFromUnixTime_TextChanged2);
//
// label2
//
this.label2.AutoSize = true;
this.label2.Location = new System.Drawing.Point(294, 9);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(53, 12);
this.label2.TabIndex = 2;
this.label2.Text = "具体时间";
//
// TxtResultTime
//
this.TxtResultTime.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(255)))), ((int)(((byte)(192)))));
this.TxtResultTime.EmptyText = "";
this.TxtResultTime.Location = new System.Drawing.Point(296, 23);
this.TxtResultTime.MaxLength = 999999999;
this.TxtResultTime.Multiline = false;
this.TxtResultTime.Name = "TxtResultTime";
this.TxtResultTime.OnlyNumeric = false;
this.TxtResultTime.PasswordChar = '\0';
this.TxtResultTime.ReadOnly = true;
this.TxtResultTime.SelectedText = "";
this.TxtResultTime.SelectionLength = 0;
this.TxtResultTime.SelectionStart = 0;
this.TxtResultTime.Size = new System.Drawing.Size(243, 30);
this.TxtResultTime.TabIndex = 3;
this.TxtResultTime.TextAlign = System.Windows.Forms.HorizontalAlignment.Left;
this.TxtResultTime.ToolTip = "";
//
// label3
//
this.label3.AutoSize = true;
this.label3.Location = new System.Drawing.Point(11, 56);
this.label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(53, 12);
this.label3.TabIndex = 4;
this.label3.Text = "具体时间";
//
// dateTimePickerEX1
//
this.dateTimePickerEX1.CustomFormat = "yyyy年MM月dd日 dddd HH:mm:ss";
this.dateTimePickerEX1.Font = new System.Drawing.Font("宋体", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.dateTimePickerEX1.Format = System.Windows.Forms.DateTimePickerFormat.Custom;
this.dateTimePickerEX1.Location = new System.Drawing.Point(13, 75);
this.dateTimePickerEX1.Name = "dateTimePickerEX1";
this.dateTimePickerEX1.Size = new System.Drawing.Size(277, 23);
this.dateTimePickerEX1.TabIndex = 5;
this.dateTimePickerEX1.ValueChanged += new System.EventHandler(this.DateTimePickerEX1_ValueChanged);
//
// TxtResultUnixTime
//
this.TxtResultUnixTime.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(255)))), ((int)(((byte)(192)))));
this.TxtResultUnixTime.EmptyText = "";
this.TxtResultUnixTime.Location = new System.Drawing.Point(296, 71);
this.TxtResultUnixTime.MaxLength = 999999999;
this.TxtResultUnixTime.Multiline = false;
this.TxtResultUnixTime.Name = "TxtResultUnixTime";
this.TxtResultUnixTime.OnlyNumeric = false;
this.TxtResultUnixTime.PasswordChar = '\0';
this.TxtResultUnixTime.ReadOnly = true;
this.TxtResultUnixTime.SelectedText = "";
this.TxtResultUnixTime.SelectionLength = 0;
this.TxtResultUnixTime.SelectionStart = 0;
this.TxtResultUnixTime.Size = new System.Drawing.Size(243, 30);
this.TxtResultUnixTime.TabIndex = 7;
this.TxtResultUnixTime.TextAlign = System.Windows.Forms.HorizontalAlignment.Left;
this.TxtResultUnixTime.ToolTip = "";
//
// label4
//
this.label4.AutoSize = true;
this.label4.Location = new System.Drawing.Point(294, 57);
this.label4.Name = "label4";
this.label4.Size = new System.Drawing.Size(65, 12);
this.label4.TabIndex = 6;
this.label4.Text = "Unix时间戳";
//
// TxtJSTime2
//
this.TxtJSTime2.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(255)))), ((int)(((byte)(192)))));
this.TxtJSTime2.EmptyText = "";
this.TxtJSTime2.Location = new System.Drawing.Point(545, 71);
this.TxtJSTime2.MaxLength = 999999999;
this.TxtJSTime2.Multiline = false;
this.TxtJSTime2.Name = "TxtJSTime2";
this.TxtJSTime2.OnlyNumeric = false;
this.TxtJSTime2.PasswordChar = '\0';
this.TxtJSTime2.ReadOnly = true;
this.TxtJSTime2.SelectedText = "";
this.TxtJSTime2.SelectionLength = 0;
this.TxtJSTime2.SelectionStart = 0;
this.TxtJSTime2.Size = new System.Drawing.Size(243, 30);
this.TxtJSTime2.TabIndex = 11;
this.TxtJSTime2.TextAlign = System.Windows.Forms.HorizontalAlignment.Left;
this.TxtJSTime2.ToolTip = "";
//
// label5
//
this.label5.AutoSize = true;
this.label5.Location = new System.Drawing.Point(543, 57);
this.label5.Name = "label5";
this.label5.Size = new System.Drawing.Size(53, 12);
this.label5.TabIndex = 10;
this.label5.Text = "JS时间戳";
//
// TxtJSTime1
//
this.TxtJSTime1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(255)))), ((int)(((byte)(192)))));
this.TxtJSTime1.EmptyText = "";
this.TxtJSTime1.Location = new System.Drawing.Point(545, 23);
this.TxtJSTime1.MaxLength = 999999999;
this.TxtJSTime1.Multiline = false;
this.TxtJSTime1.Name = "TxtJSTime1";
this.TxtJSTime1.OnlyNumeric = false;
this.TxtJSTime1.PasswordChar = '\0';
this.TxtJSTime1.ReadOnly = true;
this.TxtJSTime1.SelectedText = "";
this.TxtJSTime1.SelectionLength = 0;
this.TxtJSTime1.SelectionStart = 0;
this.TxtJSTime1.Size = new System.Drawing.Size(243, 30);
this.TxtJSTime1.TabIndex = 9;
this.TxtJSTime1.TextAlign = System.Windows.Forms.HorizontalAlignment.Left;
this.TxtJSTime1.ToolTip = "";
//
// label6
//
this.label6.AutoSize = true;
this.label6.Location = new System.Drawing.Point(543, 9);
this.label6.Name = "label6";
this.label6.Size = new System.Drawing.Size(53, 12);
this.label6.TabIndex = 8;
this.label6.Text = "JS时间戳";
//
// TxtUnixTime3
//
this.TxtUnixTime3.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(255)))), ((int)(((byte)(192)))));
this.TxtUnixTime3.EmptyText = "";
this.TxtUnixTime3.Location = new System.Drawing.Point(545, 120);
this.TxtUnixTime3.MaxLength = 999999999;
this.TxtUnixTime3.Multiline = false;
this.TxtUnixTime3.Name = "TxtUnixTime3";
this.TxtUnixTime3.OnlyNumeric = false;
this.TxtUnixTime3.PasswordChar = '\0';
this.TxtUnixTime3.ReadOnly = true;
this.TxtUnixTime3.SelectedText = "";
this.TxtUnixTime3.SelectionLength = 0;
this.TxtUnixTime3.SelectionStart = 0;
this.TxtUnixTime3.Size = new System.Drawing.Size(243, 30);
this.TxtUnixTime3.TabIndex = 17;
this.TxtUnixTime3.TextAlign = System.Windows.Forms.HorizontalAlignment.Left;
this.TxtUnixTime3.ToolTip = "";
//
// label7
//
this.label7.AutoSize = true;
this.label7.Location = new System.Drawing.Point(543, 106);
this.label7.Name = "label7";
this.label7.Size = new System.Drawing.Size(65, 12);
this.label7.TabIndex = 16;
this.label7.Text = "Unix时间戳";
//
// TxtResultTime3
//
this.TxtResultTime3.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(255)))), ((int)(((byte)(192)))));
this.TxtResultTime3.EmptyText = "";
this.TxtResultTime3.Location = new System.Drawing.Point(296, 120);
this.TxtResultTime3.MaxLength = 999999999;
this.TxtResultTime3.Multiline = false;
this.TxtResultTime3.Name = "TxtResultTime3";
this.TxtResultTime3.OnlyNumeric = false;
this.TxtResultTime3.PasswordChar = '\0';
this.TxtResultTime3.ReadOnly = true;
this.TxtResultTime3.SelectedText = "";
this.TxtResultTime3.SelectionLength = 0;
this.TxtResultTime3.SelectionStart = 0;
this.TxtResultTime3.Size = new System.Drawing.Size(243, 30);
this.TxtResultTime3.TabIndex = 15;
this.TxtResultTime3.TextAlign = System.Windows.Forms.HorizontalAlignment.Left;
this.TxtResultTime3.ToolTip = "";
//
// label8
//
this.label8.AutoSize = true;
this.label8.Location = new System.Drawing.Point(294, 106);
this.label8.Name = "label8";
this.label8.Size = new System.Drawing.Size(53, 12);
this.label8.TabIndex = 14;
this.label8.Text = "具体时间";
//
// TxtFromJSTime3
//
this.TxtFromJSTime3.BackColor = System.Drawing.Color.White;
this.TxtFromJSTime3.EmptyText = "请输入时间戳";
this.TxtFromJSTime3.Location = new System.Drawing.Point(13, 120);
this.TxtFromJSTime3.MaxLength = 999999999;
this.TxtFromJSTime3.Multiline = false;
this.TxtFromJSTime3.Name = "TxtFromJSTime3";
this.TxtFromJSTime3.OnlyNumeric = false;
this.TxtFromJSTime3.PasswordChar = '\0';
this.TxtFromJSTime3.ReadOnly = false;
this.TxtFromJSTime3.SelectedText = "";
this.TxtFromJSTime3.SelectionLength = 0;
this.TxtFromJSTime3.SelectionStart = 0;
this.TxtFromJSTime3.Size = new System.Drawing.Size(277, 30);
this.TxtFromJSTime3.TabIndex = 13;
this.TxtFromJSTime3.TextAlign = System.Windows.Forms.HorizontalAlignment.Left;
this.TxtFromJSTime3.ToolTip = "";
this.TxtFromJSTime3.TextChanged2 += new System.EventHandler(this.TxtFromJSTime3_TextChanged2);
//
// label9
//
this.label9.AutoSize = true;
this.label9.Location = new System.Drawing.Point(11, 105);
this.label9.Name = "label9";
this.label9.Size = new System.Drawing.Size(53, 12);
this.label9.TabIndex = 12;
this.label9.Text = "JS时间戳";
//
// menuRight1
//
this.menuRight1.Name = "menuRight1";
this.menuRight1.Size = new System.Drawing.Size(173, 48);
this.menuRight1.SourceContent = this;
//
// FrmTime
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(800, 450);
this.Controls.Add(this.TxtUnixTime3);
this.Controls.Add(this.label7);
this.Controls.Add(this.TxtResultTime3);
this.Controls.Add(this.label8);
this.Controls.Add(this.TxtFromJSTime3);
this.Controls.Add(this.label9);
this.Controls.Add(this.TxtJSTime2);
this.Controls.Add(this.label5);
this.Controls.Add(this.TxtJSTime1);
this.Controls.Add(this.label6);
this.Controls.Add(this.TxtResultUnixTime);
this.Controls.Add(this.label4);
this.Controls.Add(this.dateTimePickerEX1);
this.Controls.Add(this.label3);
this.Controls.Add(this.TxtResultTime);
this.Controls.Add(this.label2);
this.Controls.Add(this.TxtFromUnixTime);
this.Controls.Add(this.label1);
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
this.Name = "FrmTime";
this.TabPageContextMenuStrip = this.menuRight1;
this.Text = "时间戳转换";
this.Load += new System.EventHandler(this.FrmTime_Load);
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
private System.Windows.Forms.Label label1;
private ryControls.TextBoxEx2 TxtFromUnixTime;
private System.Windows.Forms.Label label2;
private ryControls.TextBoxEx2 TxtResultTime;
private System.Windows.Forms.Label label3;
private ryControls.DateTimePickerEX dateTimePickerEX1;
private ryControls.TextBoxEx2 TxtResultUnixTime;
private System.Windows.Forms.Label label4;
private ryControls.TextBoxEx2 TxtJSTime2;
private System.Windows.Forms.Label label5;
private ryControls.TextBoxEx2 TxtJSTime1;
private System.Windows.Forms.Label label6;
private ryControls.TextBoxEx2 TxtUnixTime3;
private System.Windows.Forms.Label label7;
private ryControls.TextBoxEx2 TxtResultTime3;
private System.Windows.Forms.Label label8;
private ryControls.TextBoxEx2 TxtFromJSTime3;
private System.Windows.Forms.Label label9;
private ryPaiban.Model.MenuRight menuRight1;
}
}
@@ -0,0 +1,48 @@
using ryCommon;
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 WeifenLuo.WinFormsUI.Docking;
namespace 开发辅助工具.Tools
{
public partial class FrmTime : DockContent
{
public FrmTime()
{
InitializeComponent();
dateTimePickerEX1.Value = DateTime.Now.Date;
}
private void FrmTime_Load(object sender, EventArgs e)
{
}
private void TxtFromUnixTime_TextChanged2(object sender, EventArgs e)
{
var dt =RyDate.UnixTimeToDateTime(TxtFromUnixTime.Text);
TxtResultTime.Text = dt.ToString("yyyy-MM-dd dddd HH:mm:ss");
TxtJSTime1.Text = RyDate.DateTimeToJSTime(dt).ToString();
}
private void DateTimePickerEX1_ValueChanged(object sender, EventArgs e)
{
TxtResultUnixTime.Text = RyDate.DateTimeToUnixTime(dateTimePickerEX1.Value).ToString();
TxtJSTime2.Text = RyDate.DateTimeToJSTime(dateTimePickerEX1.Value).ToString();
}
private void TxtFromJSTime3_TextChanged2(object sender, EventArgs e)
{
var dt = RyDate.JSTimeToDateTime(TxtFromJSTime3.Text);
TxtResultTime3.Text = dt.ToString("yyyy-MM-dd dddd HH:mm:ss");
TxtUnixTime3.Text = RyDate.DateTimeToUnixTime(dt).ToString();
}
}
}
@@ -0,0 +1,200 @@
<?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="menuRight1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</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>
AAABAAEAICAAAAEAIACoEAAAFgAAACgAAAAgAAAAQAAAAAEAIAAAAAAAABAAAGDqAABg6gAA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AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAkAAAAoAAAATAAA
AGkAAAB4AAAAeAAAAGkAAABMAAAAKAAAAAkAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAA/4AB//4AAH/4AAAf8AAAD+AAAAfAAAADwAGAA4AP8AGAH/gBAD/8AAB/
/gAA//8AAf//gAH4AAAB+AAAA/gAQAP4AEAB+AAAAfgAAAH4H4AA+B8AAHgeAAA4HACAGBgBgAgQAcAA
AAPAAAAD4AAAB/AAAA/4AAAf/gAAf/+AAf8=
</value>
</data>
</root>
+87
View File
@@ -0,0 +1,87 @@
namespace 开发辅助工具.Tools
{
partial class FrmToolsBox
{
/// <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(FrmToolsBox));
this.BtnJson = new ryControls.ButtonEx();
this.BtnCalc = new ryControls.ButtonEx();
this.menuRight1 = new ryPaiban.Model.MenuRight(this.components);
this.SuspendLayout();
//
// BtnJson
//
this.BtnJson.ForeColor = System.Drawing.Color.White;
this.BtnJson.Location = new System.Drawing.Point(12, 12);
this.BtnJson.Name = "BtnJson";
this.BtnJson.Size = new System.Drawing.Size(99, 34);
this.BtnJson.TabIndex = 2;
this.BtnJson.Text = "Json查看器";
this.BtnJson.UseVisualStyleBackColor = true;
this.BtnJson.Click += new System.EventHandler(this.BtnJson_Click);
//
// BtnCalc
//
this.BtnCalc.ForeColor = System.Drawing.Color.White;
this.BtnCalc.Location = new System.Drawing.Point(117, 12);
this.BtnCalc.Name = "BtnCalc";
this.BtnCalc.Size = new System.Drawing.Size(99, 34);
this.BtnCalc.TabIndex = 3;
this.BtnCalc.Text = "计算器";
this.BtnCalc.UseVisualStyleBackColor = true;
this.BtnCalc.Click += new System.EventHandler(this.BtnCalc_Click);
//
// menuRight1
//
this.menuRight1.Name = "menuRight1";
this.menuRight1.Size = new System.Drawing.Size(185, 70);
this.menuRight1.SourceContent = this;
//
// FrmToolsBox
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(800, 450);
this.Controls.Add(this.BtnCalc);
this.Controls.Add(this.BtnJson);
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
this.Name = "FrmToolsBox";
this.TabPageContextMenuStrip = this.menuRight1;
this.Text = "工具大全";
this.ResumeLayout(false);
}
#endregion
private ryControls.ButtonEx BtnJson;
private ryControls.ButtonEx BtnCalc;
private ryPaiban.Model.MenuRight menuRight1;
}
}
@@ -0,0 +1,30 @@
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 WeifenLuo.WinFormsUI.Docking;
namespace 开发辅助工具.Tools
{
public partial class FrmToolsBox : DockContent
{
public FrmToolsBox()
{
InitializeComponent();
}
private void BtnJson_Click(object sender, EventArgs e)
{
ryCommon.RyFiles.OpenFile(Application.StartupPath + "\\SysDb\\Tools\\Json\\HiJson 2.1.2_jdk64.exe");
}
private void BtnCalc_Click(object sender, EventArgs e)
{
ryCommon.RyFiles.OpenFile("calc.exe");
}
}
}
@@ -0,0 +1,200 @@
<?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="menuRight1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</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>
AAABAAEAICAAAAEAIACoEAAAFgAAACgAAAAgAAAAQAAAAAEAIAAAAAAAABAAABMLAAATCwAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAUAAAAKAAAADAAAAAwAAAAMAAAADAAAAAwAAAAMAAAADAAA
AAwAAAAMAAAADAAAAAwAAAAMAAAADAAAAAwAAAAMAAAADAAAAAwAAAAMAAAACwAAAAcAAAACAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAgEBAAAAAAcAAAAcAgICPQUFBFYGBQVdBgUFXQYFBV0GBQVdBgUFXQYF
BV0GBQVdBgUFXQYFBV0GBQVdBgUFXQYFBV0GBQVdBgUFXQYFBV0GBQVdBgUFXQYFBV0GBQVaBAMDSQAA
ACkAAAAOAAAAAgAAAAAAAAAAAAAAAAMCAgAAAAALAwICOA0MDIsTEhHLFhQT5RYUE+oWFBPqFhQT6hYU
E+oWFBPqFhQT6hYUE+oWFBPqFhQT6hYUE+oWFBPqFhQT6hYUE+oWFBPqFhQT6hYUE+oWFBPqFhQT6hYU
E+kVExLZEA8OqgcGBlgAAAAYAAAAAgAAAAAAAAAAAAAABgQEAzcSEBCvGRYV+BoXFv8aFxb/GhcW/xoX
Fv8aFxb/GhcW/xoXFv8aFxb/GhcW/xoXFv8aFxb/GhcW/xoXFv8aFxb/GhcW/xoXFv8aFxb/GhcW/xoX
Fv8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/zEtLP8xLSz/MS0s/zEtLP8xLSz/MS0s/zg0M/syLy5vAAAAAyMiIQAAAAAHPDk4fDw5
OPoyLi3/Mi4t/zIuLf8yLi3/Mi4t/zIuLf8yLi3/Mi4t/zIuLf8yLi3/Mi4t/zIuLf8yLi3/Mi4t/zIu
Lf8yLi3/Mi4t/zIuLf8yLi3/Mi4t/zIuLf8yLi3/Mi4t/zEtLP83MzL/QD08wygmJiTUycYAAAAAAM7G
wwAtKyoXSEVElkE+PfY3MzL/My8u/zIuLf8yLi3/Mi4t/zIuLf8yLi3/Mi4t/zIuLf8yLi3/Mi4t/zIu
Lf8yLi3/Mi4t/zIuLf8yLi3/Mi4t/zIuLf8yLi3/Mi4t/zIuLf80MTD/PDk4/0dEQ8w/PTxBAAAAAhQU
EwAAAAAAAAAAANjS0AA1NDQRUE5NYk9MTLNLSEfaSkdG5EpGReRKRkXkSkZF5EpGReRKRkXkSkZF5EpG
ReRKRkXkSkZF5EpGReRKRkXkSkZF5EpGReRKRkXkSkZF5EpGReRKRkXkS0dG4E1KScpRTk6JRkRELAAA
AAI1MzMAAAAAAAAAAAANCwsAAAAAAGhmZgAAAAAASkhHEldVVCNZV1YoWFZVKFhWVShYVlUoWFZVKFhW
VShYVlUoWFZVKFhWVShYVlUoWFZVKFhWVShYVlUoWFZVKFhWVShYVlUoWFZVKFlWVihYVlUmU1FQGyQj
IwaalpUAHh4eAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=
</value>
</data>
</root>
+910
View File
@@ -0,0 +1,910 @@
namespace 开发辅助工具.Tools
{
partial class FrmWebGet
{
/// <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(FrmWebGet));
this.ChkUrlLower = new System.Windows.Forms.CheckBox();
this.tabControl2 = new System.Windows.Forms.TabControl();
this.tabPage3 = new System.Windows.Forms.TabPage();
this.pictureBox1 = new System.Windows.Forms.PictureBox();
this.RichHtml = new System.Windows.Forms.RichTextBox();
this.contextMenuStripRichText1 = new ryProcessManager.hezuo.ContextMenuStripRichText();
this.tabPage12 = new System.Windows.Forms.TabPage();
this.Te_Format = new ICSharpCode.TextEditor.TextEditorControl();
this.contextMenuStripHighlightText1 = new ryProcessManager.hezuo.ContextMenuStripHighlightText();
this.tabPage4 = new System.Windows.Forms.TabPage();
this.RichCookie = new System.Windows.Forms.RichTextBox();
this.tabPage5 = new System.Windows.Forms.TabPage();
this.RichStatus = new System.Windows.Forms.RichTextBox();
this.tabPage6 = new System.Windows.Forms.TabPage();
this.RichHeader = new System.Windows.Forms.RichTextBox();
this.tabPreview = new System.Windows.Forms.TabPage();
this.extendedWebBrowser1 = new ExtendedWebBrowser2.ExtendedWebBrowser();
this.groupBox3 = new System.Windows.Forms.GroupBox();
this.tabControl1 = new System.Windows.Forms.TabControl();
this.tabPage1 = new System.Windows.Forms.TabPage();
this.TxtPost = new ryControls.Controls.RichTextBox2();
this.tabPage2 = new System.Windows.Forms.TabPage();
this.TxtCookie = new ryControls.Controls.RichTextBox2();
this.tabPage7 = new System.Windows.Forms.TabPage();
this.TxtInputHeader = new ryControls.Controls.RichTextBox2();
this.groupBox2 = new System.Windows.Forms.GroupBox();
this.CbbReferer = new ryControls.RyComboBox();
this.CbbIp = new ryControls.RyComboBox();
this.label6 = new System.Windows.Forms.Label();
this.CbbUserAgent = new ryControls.RyComboBox();
this.label7 = new System.Windows.Forms.Label();
this.CbbContentType = new ryControls.RyComboBox();
this.label11 = new System.Windows.Forms.Label();
this.label8 = new System.Windows.Forms.Label();
this.groupBox1 = new System.Windows.Forms.GroupBox();
this.ChkNoPreview = new System.Windows.Forms.CheckBox();
this.ChkHtmlPreview = new System.Windows.Forms.CheckBox();
this.ChkGetPic = new System.Windows.Forms.CheckBox();
this.ChkJump = new System.Windows.Forms.CheckBox();
this.CbbWriteTimeout = new ryControls.RyComboBox();
this.label5 = new System.Windows.Forms.Label();
this.CbbTimeout = new ryControls.RyComboBox();
this.label4 = new System.Windows.Forms.Label();
this.CbbEncoding = new ryControls.RyComboBox();
this.label3 = new System.Windows.Forms.Label();
this.BtnRunHtml = new ryControls.ButtonEx();
this.RbPost = new System.Windows.Forms.RadioButton();
this.RbGet = new System.Windows.Forms.RadioButton();
this.TxtUrl = new ryControls.TextBoxEx2();
this.label2 = new System.Windows.Forms.Label();
this.menuRight1 = new ryPaiban.Model.MenuRight(this.components);
this.BtnCtreateCShape = new ryControls.ButtonEx();
this.columnModel1 = new XPTable.Models.ColumnModel();
this.ColUrl = new XPTable.Models.TextColumn();
this.ColTitle = new XPTable.Models.TextColumn();
this.tableModel1 = new XPTable.Models.TableModel();
this.table1 = new XPTable.Models.Table();
this.timer1 = new System.Windows.Forms.Timer(this.components);
this.tabControl2.SuspendLayout();
this.tabPage3.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit();
this.tabPage12.SuspendLayout();
this.tabPage4.SuspendLayout();
this.tabPage5.SuspendLayout();
this.tabPage6.SuspendLayout();
this.tabPreview.SuspendLayout();
this.groupBox3.SuspendLayout();
this.tabControl1.SuspendLayout();
this.tabPage1.SuspendLayout();
this.tabPage2.SuspendLayout();
this.tabPage7.SuspendLayout();
this.groupBox2.SuspendLayout();
this.groupBox1.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.table1)).BeginInit();
this.SuspendLayout();
//
// ChkUrlLower
//
this.ChkUrlLower.AutoSize = true;
this.ChkUrlLower.Location = new System.Drawing.Point(630, 10);
this.ChkUrlLower.Name = "ChkUrlLower";
this.ChkUrlLower.Size = new System.Drawing.Size(72, 16);
this.ChkUrlLower.TabIndex = 109;
this.ChkUrlLower.Text = "全转小写";
this.ChkUrlLower.UseVisualStyleBackColor = true;
//
// tabControl2
//
this.tabControl2.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.tabControl2.Controls.Add(this.tabPage3);
this.tabControl2.Controls.Add(this.tabPage12);
this.tabControl2.Controls.Add(this.tabPage4);
this.tabControl2.Controls.Add(this.tabPage5);
this.tabControl2.Controls.Add(this.tabPage6);
this.tabControl2.Controls.Add(this.tabPreview);
this.tabControl2.Location = new System.Drawing.Point(8, 314);
this.tabControl2.Name = "tabControl2";
this.tabControl2.SelectedIndex = 0;
this.tabControl2.Size = new System.Drawing.Size(889, 306);
this.tabControl2.TabIndex = 108;
//
// tabPage3
//
this.tabPage3.Controls.Add(this.pictureBox1);
this.tabPage3.Controls.Add(this.RichHtml);
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(881, 280);
this.tabPage3.TabIndex = 0;
this.tabPage3.Text = "HTML";
this.tabPage3.UseVisualStyleBackColor = true;
//
// pictureBox1
//
this.pictureBox1.Dock = System.Windows.Forms.DockStyle.Fill;
this.pictureBox1.Location = new System.Drawing.Point(3, 3);
this.pictureBox1.Name = "pictureBox1";
this.pictureBox1.Size = new System.Drawing.Size(875, 274);
this.pictureBox1.TabIndex = 1;
this.pictureBox1.TabStop = false;
this.pictureBox1.Visible = false;
//
// RichHtml
//
this.RichHtml.BackColor = System.Drawing.Color.White;
this.RichHtml.BorderStyle = System.Windows.Forms.BorderStyle.None;
this.RichHtml.ContextMenuStrip = this.contextMenuStripRichText1;
this.RichHtml.Dock = System.Windows.Forms.DockStyle.Fill;
this.RichHtml.Location = new System.Drawing.Point(3, 3);
this.RichHtml.Name = "RichHtml";
this.RichHtml.ReadOnly = true;
this.RichHtml.Size = new System.Drawing.Size(875, 274);
this.RichHtml.TabIndex = 0;
this.RichHtml.Text = "";
//
// contextMenuStripRichText1
//
this.contextMenuStripRichText1.Name = "contextMenuStripRichText1";
this.contextMenuStripRichText1.Size = new System.Drawing.Size(101, 164);
//
// tabPage12
//
this.tabPage12.Controls.Add(this.Te_Format);
this.tabPage12.Location = new System.Drawing.Point(4, 22);
this.tabPage12.Name = "tabPage12";
this.tabPage12.Padding = new System.Windows.Forms.Padding(3);
this.tabPage12.Size = new System.Drawing.Size(879, 280);
this.tabPage12.TabIndex = 4;
this.tabPage12.Text = "HTML格式化";
this.tabPage12.UseVisualStyleBackColor = true;
//
// Te_Format
//
this.Te_Format.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.Te_Format.ContextMenuStrip = this.contextMenuStripHighlightText1;
this.Te_Format.IsReadOnly = false;
this.Te_Format.Location = new System.Drawing.Point(3, 3);
this.Te_Format.Name = "Te_Format";
this.Te_Format.Size = new System.Drawing.Size(870, 279);
this.Te_Format.TabIndex = 0;
//
// contextMenuStripHighlightText1
//
this.contextMenuStripHighlightText1.Name = "contextMenuStripHighlightText1";
this.contextMenuStripHighlightText1.Size = new System.Drawing.Size(101, 186);
//
// tabPage4
//
this.tabPage4.Controls.Add(this.RichCookie);
this.tabPage4.Location = new System.Drawing.Point(4, 22);
this.tabPage4.Name = "tabPage4";
this.tabPage4.Padding = new System.Windows.Forms.Padding(3);
this.tabPage4.Size = new System.Drawing.Size(879, 280);
this.tabPage4.TabIndex = 1;
this.tabPage4.Text = "Cookie";
this.tabPage4.UseVisualStyleBackColor = true;
//
// RichCookie
//
this.RichCookie.BackColor = System.Drawing.Color.White;
this.RichCookie.BorderStyle = System.Windows.Forms.BorderStyle.None;
this.RichCookie.ContextMenuStrip = this.contextMenuStripRichText1;
this.RichCookie.Dock = System.Windows.Forms.DockStyle.Fill;
this.RichCookie.Location = new System.Drawing.Point(3, 3);
this.RichCookie.Name = "RichCookie";
this.RichCookie.ReadOnly = true;
this.RichCookie.Size = new System.Drawing.Size(873, 274);
this.RichCookie.TabIndex = 1;
this.RichCookie.Text = "";
//
// tabPage5
//
this.tabPage5.Controls.Add(this.RichStatus);
this.tabPage5.Location = new System.Drawing.Point(4, 22);
this.tabPage5.Name = "tabPage5";
this.tabPage5.Padding = new System.Windows.Forms.Padding(3);
this.tabPage5.Size = new System.Drawing.Size(879, 280);
this.tabPage5.TabIndex = 2;
this.tabPage5.Text = "Status";
this.tabPage5.UseVisualStyleBackColor = true;
//
// RichStatus
//
this.RichStatus.BackColor = System.Drawing.Color.White;
this.RichStatus.BorderStyle = System.Windows.Forms.BorderStyle.None;
this.RichStatus.ContextMenuStrip = this.contextMenuStripRichText1;
this.RichStatus.Dock = System.Windows.Forms.DockStyle.Fill;
this.RichStatus.Location = new System.Drawing.Point(3, 3);
this.RichStatus.Name = "RichStatus";
this.RichStatus.ReadOnly = true;
this.RichStatus.Size = new System.Drawing.Size(873, 274);
this.RichStatus.TabIndex = 2;
this.RichStatus.Text = "";
//
// tabPage6
//
this.tabPage6.Controls.Add(this.RichHeader);
this.tabPage6.Location = new System.Drawing.Point(4, 22);
this.tabPage6.Name = "tabPage6";
this.tabPage6.Padding = new System.Windows.Forms.Padding(3);
this.tabPage6.Size = new System.Drawing.Size(879, 280);
this.tabPage6.TabIndex = 3;
this.tabPage6.Text = "Header";
this.tabPage6.UseVisualStyleBackColor = true;
//
// RichHeader
//
this.RichHeader.BackColor = System.Drawing.Color.White;
this.RichHeader.BorderStyle = System.Windows.Forms.BorderStyle.None;
this.RichHeader.ContextMenuStrip = this.contextMenuStripRichText1;
this.RichHeader.Dock = System.Windows.Forms.DockStyle.Fill;
this.RichHeader.Location = new System.Drawing.Point(3, 3);
this.RichHeader.Name = "RichHeader";
this.RichHeader.ReadOnly = true;
this.RichHeader.Size = new System.Drawing.Size(873, 274);
this.RichHeader.TabIndex = 3;
this.RichHeader.Text = "";
//
// tabPreview
//
this.tabPreview.Controls.Add(this.extendedWebBrowser1);
this.tabPreview.Location = new System.Drawing.Point(4, 22);
this.tabPreview.Name = "tabPreview";
this.tabPreview.Padding = new System.Windows.Forms.Padding(3);
this.tabPreview.Size = new System.Drawing.Size(879, 280);
this.tabPreview.TabIndex = 5;
this.tabPreview.Text = "预览";
this.tabPreview.UseVisualStyleBackColor = true;
//
// extendedWebBrowser1
//
this.extendedWebBrowser1.Dock = System.Windows.Forms.DockStyle.Fill;
this.extendedWebBrowser1.ForceOpenThisWindow = true;
this.extendedWebBrowser1.Location = new System.Drawing.Point(3, 3);
this.extendedWebBrowser1.MinimumSize = new System.Drawing.Size(20, 20);
this.extendedWebBrowser1.Name = "extendedWebBrowser1";
this.extendedWebBrowser1.ScriptErrorsSuppressed = true;
this.extendedWebBrowser1.Size = new System.Drawing.Size(873, 274);
this.extendedWebBrowser1.TabIndex = 2;
//
// groupBox3
//
this.groupBox3.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.groupBox3.Controls.Add(this.tabControl1);
this.groupBox3.Location = new System.Drawing.Point(10, 170);
this.groupBox3.Name = "groupBox3";
this.groupBox3.Size = new System.Drawing.Size(887, 138);
this.groupBox3.TabIndex = 107;
this.groupBox3.TabStop = false;
this.groupBox3.Text = "高级输入参数";
//
// tabControl1
//
this.tabControl1.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.tabControl1.Controls.Add(this.tabPage1);
this.tabControl1.Controls.Add(this.tabPage2);
this.tabControl1.Controls.Add(this.tabPage7);
this.tabControl1.Location = new System.Drawing.Point(4, 17);
this.tabControl1.Name = "tabControl1";
this.tabControl1.SelectedIndex = 0;
this.tabControl1.Size = new System.Drawing.Size(876, 115);
this.tabControl1.TabIndex = 6;
//
// tabPage1
//
this.tabPage1.Controls.Add(this.TxtPost);
this.tabPage1.Location = new System.Drawing.Point(4, 22);
this.tabPage1.Name = "tabPage1";
this.tabPage1.Padding = new System.Windows.Forms.Padding(3);
this.tabPage1.Size = new System.Drawing.Size(868, 89);
this.tabPage1.TabIndex = 0;
this.tabPage1.Text = "Post数据";
this.tabPage1.UseVisualStyleBackColor = true;
//
// TxtPost
//
this.TxtPost.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.TxtPost.BorderStyle = System.Windows.Forms.BorderStyle.None;
this.TxtPost.DetectUrls = false;
this.TxtPost.EmptyText = "请填写Post数据";
this.TxtPost.ForeColor = System.Drawing.Color.Black;
this.TxtPost.Location = new System.Drawing.Point(2, 3);
this.TxtPost.Name = "TxtPost";
this.TxtPost.OnlyInputText = true;
this.TxtPost.Size = new System.Drawing.Size(862, 83);
this.TxtPost.TabIndex = 2;
this.TxtPost.Text = "";
this.TxtPost.TextChanged += new System.EventHandler(this.TxtPost_TextChanged);
this.TxtPost.DoubleClick += new System.EventHandler(this.TxtPost_DoubleClick);
//
// tabPage2
//
this.tabPage2.Controls.Add(this.TxtCookie);
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(868, 89);
this.tabPage2.TabIndex = 1;
this.tabPage2.Text = "Cookie";
this.tabPage2.UseVisualStyleBackColor = true;
//
// TxtCookie
//
this.TxtCookie.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.TxtCookie.BorderStyle = System.Windows.Forms.BorderStyle.None;
this.TxtCookie.DetectUrls = false;
this.TxtCookie.EmptyText = "请填写请求时要发送的Cookie";
this.TxtCookie.ForeColor = System.Drawing.Color.Black;
this.TxtCookie.Location = new System.Drawing.Point(2, 3);
this.TxtCookie.Name = "TxtCookie";
this.TxtCookie.OnlyInputText = true;
this.TxtCookie.Size = new System.Drawing.Size(862, 83);
this.TxtCookie.TabIndex = 6;
this.TxtCookie.Text = "";
this.TxtCookie.TextChanged += new System.EventHandler(this.TxtCookie_TextChanged);
this.TxtCookie.DoubleClick += new System.EventHandler(this.TxtPost_DoubleClick);
//
// tabPage7
//
this.tabPage7.Controls.Add(this.TxtInputHeader);
this.tabPage7.Location = new System.Drawing.Point(4, 22);
this.tabPage7.Name = "tabPage7";
this.tabPage7.Padding = new System.Windows.Forms.Padding(3);
this.tabPage7.Size = new System.Drawing.Size(868, 89);
this.tabPage7.TabIndex = 2;
this.tabPage7.Text = "Header";
this.tabPage7.UseVisualStyleBackColor = true;
//
// TxtInputHeader
//
this.TxtInputHeader.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.TxtInputHeader.BorderStyle = System.Windows.Forms.BorderStyle.None;
this.TxtInputHeader.DetectUrls = false;
this.TxtInputHeader.EmptyText = "请填写请求时要发送的Header";
this.TxtInputHeader.ForeColor = System.Drawing.Color.Black;
this.TxtInputHeader.Location = new System.Drawing.Point(2, 3);
this.TxtInputHeader.Name = "TxtInputHeader";
this.TxtInputHeader.OnlyInputText = true;
this.TxtInputHeader.Size = new System.Drawing.Size(862, 83);
this.TxtInputHeader.TabIndex = 7;
this.TxtInputHeader.Text = "";
this.TxtInputHeader.TextChanged += new System.EventHandler(this.TxtInputHeader_TextChanged);
this.TxtInputHeader.DoubleClick += new System.EventHandler(this.TxtPost_DoubleClick);
//
// groupBox2
//
this.groupBox2.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.groupBox2.Controls.Add(this.CbbReferer);
this.groupBox2.Controls.Add(this.CbbIp);
this.groupBox2.Controls.Add(this.label6);
this.groupBox2.Controls.Add(this.CbbUserAgent);
this.groupBox2.Controls.Add(this.label7);
this.groupBox2.Controls.Add(this.CbbContentType);
this.groupBox2.Controls.Add(this.label11);
this.groupBox2.Controls.Add(this.label8);
this.groupBox2.Location = new System.Drawing.Point(10, 90);
this.groupBox2.Name = "groupBox2";
this.groupBox2.Size = new System.Drawing.Size(887, 75);
this.groupBox2.TabIndex = 106;
this.groupBox2.TabStop = false;
this.groupBox2.Text = "高级配置";
//
// CbbReferer
//
this.CbbReferer.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.CbbReferer.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed;
this.CbbReferer.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.CbbReferer.Font = new System.Drawing.Font("宋体", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.CbbReferer.FormattingEnabled = true;
this.CbbReferer.Location = new System.Drawing.Point(360, 45);
this.CbbReferer.Name = "CbbReferer";
this.CbbReferer.Size = new System.Drawing.Size(520, 24);
this.CbbReferer.TabIndex = 6;
//
// CbbIp
//
this.CbbIp.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed;
this.CbbIp.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.CbbIp.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.CbbIp.FormattingEnabled = true;
this.CbbIp.Location = new System.Drawing.Point(86, 46);
this.CbbIp.Name = "CbbIp";
this.CbbIp.Size = new System.Drawing.Size(205, 22);
this.CbbIp.TabIndex = 5;
//
// label6
//
this.label6.AutoSize = true;
this.label6.Location = new System.Drawing.Point(11, 50);
this.label6.Name = "label6";
this.label6.Size = new System.Drawing.Size(41, 12);
this.label6.TabIndex = 4;
this.label6.Text = "代理IP";
//
// CbbUserAgent
//
this.CbbUserAgent.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.CbbUserAgent.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed;
this.CbbUserAgent.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.CbbUserAgent.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.CbbUserAgent.FormattingEnabled = true;
this.CbbUserAgent.Items.AddRange(new object[] {
"Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; Trident/5.0)",
"Mozilla/5.0 (Windows NT 6.1; WOW64; rv:18.0) Gecko/20100101 Firefox/18.0",
"Mozilla/4.0 (compatible; MSIE 8.0; Windows NT6.0)",
"Opera/9.27 (Windows NT 5.2; U; zh-cn)"});
this.CbbUserAgent.Location = new System.Drawing.Point(360, 18);
this.CbbUserAgent.Name = "CbbUserAgent";
this.CbbUserAgent.Size = new System.Drawing.Size(520, 22);
this.CbbUserAgent.TabIndex = 300;
//
// label7
//
this.label7.AutoSize = true;
this.label7.Location = new System.Drawing.Point(297, 24);
this.label7.Name = "label7";
this.label7.Size = new System.Drawing.Size(59, 12);
this.label7.TabIndex = 2;
this.label7.Text = "UserAgent";
//
// CbbContentType
//
this.CbbContentType.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed;
this.CbbContentType.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.CbbContentType.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.CbbContentType.FormattingEnabled = true;
this.CbbContentType.Items.AddRange(new object[] {
"text/html",
"application/x-www-form-urlencoded",
"application/json",
"text/json"});
this.CbbContentType.Location = new System.Drawing.Point(86, 18);
this.CbbContentType.Name = "CbbContentType";
this.CbbContentType.Size = new System.Drawing.Size(205, 22);
this.CbbContentType.TabIndex = 1;
//
// label11
//
this.label11.AutoSize = true;
this.label11.Location = new System.Drawing.Point(299, 50);
this.label11.Name = "label11";
this.label11.Size = new System.Drawing.Size(47, 12);
this.label11.TabIndex = 0;
this.label11.Text = "Referer";
//
// label8
//
this.label8.AutoSize = true;
this.label8.Location = new System.Drawing.Point(11, 24);
this.label8.Name = "label8";
this.label8.Size = new System.Drawing.Size(71, 12);
this.label8.TabIndex = 0;
this.label8.Text = "ContentType";
//
// groupBox1
//
this.groupBox1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.groupBox1.Controls.Add(this.ChkNoPreview);
this.groupBox1.Controls.Add(this.ChkHtmlPreview);
this.groupBox1.Controls.Add(this.ChkGetPic);
this.groupBox1.Controls.Add(this.ChkJump);
this.groupBox1.Controls.Add(this.CbbWriteTimeout);
this.groupBox1.Controls.Add(this.label5);
this.groupBox1.Controls.Add(this.CbbTimeout);
this.groupBox1.Controls.Add(this.label4);
this.groupBox1.Controls.Add(this.CbbEncoding);
this.groupBox1.Controls.Add(this.label3);
this.groupBox1.Location = new System.Drawing.Point(10, 34);
this.groupBox1.Name = "groupBox1";
this.groupBox1.Size = new System.Drawing.Size(887, 51);
this.groupBox1.TabIndex = 105;
this.groupBox1.TabStop = false;
this.groupBox1.Text = "基本配置";
//
// ChkNoPreview
//
this.ChkNoPreview.AutoSize = true;
this.ChkNoPreview.Checked = true;
this.ChkNoPreview.CheckState = System.Windows.Forms.CheckState.Checked;
this.ChkNoPreview.Location = new System.Drawing.Point(610, 21);
this.ChkNoPreview.Name = "ChkNoPreview";
this.ChkNoPreview.Size = new System.Drawing.Size(60, 16);
this.ChkNoPreview.TabIndex = 9;
this.ChkNoPreview.Text = "不预览";
this.ChkNoPreview.UseVisualStyleBackColor = true;
this.ChkNoPreview.CheckedChanged += new System.EventHandler(this.ChkNoPreview_CheckedChanged);
//
// ChkHtmlPreview
//
this.ChkHtmlPreview.AutoSize = true;
this.ChkHtmlPreview.Checked = true;
this.ChkHtmlPreview.CheckState = System.Windows.Forms.CheckState.Checked;
this.ChkHtmlPreview.Enabled = false;
this.ChkHtmlPreview.Location = new System.Drawing.Point(676, 21);
this.ChkHtmlPreview.Name = "ChkHtmlPreview";
this.ChkHtmlPreview.Size = new System.Drawing.Size(144, 16);
this.ChkHtmlPreview.TabIndex = 8;
this.ChkHtmlPreview.Text = "使用HTML结果进行预览";
this.ChkHtmlPreview.UseVisualStyleBackColor = true;
//
// ChkGetPic
//
this.ChkGetPic.AutoSize = true;
this.ChkGetPic.Location = new System.Drawing.Point(532, 21);
this.ChkGetPic.Name = "ChkGetPic";
this.ChkGetPic.Size = new System.Drawing.Size(72, 16);
this.ChkGetPic.TabIndex = 7;
this.ChkGetPic.Text = "获取图片";
this.ChkGetPic.UseVisualStyleBackColor = true;
//
// ChkJump
//
this.ChkJump.AutoSize = true;
this.ChkJump.Location = new System.Drawing.Point(478, 21);
this.ChkJump.Name = "ChkJump";
this.ChkJump.Size = new System.Drawing.Size(48, 16);
this.ChkJump.TabIndex = 6;
this.ChkJump.Text = "跳转";
this.ChkJump.UseVisualStyleBackColor = true;
//
// CbbWriteTimeout
//
this.CbbWriteTimeout.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed;
this.CbbWriteTimeout.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.CbbWriteTimeout.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.CbbWriteTimeout.FormattingEnabled = true;
this.CbbWriteTimeout.Items.AddRange(new object[] {
"100秒",
"50秒",
"30秒",
"20秒",
"10秒",
"5秒"});
this.CbbWriteTimeout.Location = new System.Drawing.Point(393, 18);
this.CbbWriteTimeout.Name = "CbbWriteTimeout";
this.CbbWriteTimeout.Size = new System.Drawing.Size(74, 22);
this.CbbWriteTimeout.TabIndex = 5;
//
// label5
//
this.label5.AutoSize = true;
this.label5.Location = new System.Drawing.Point(337, 24);
this.label5.Name = "label5";
this.label5.Size = new System.Drawing.Size(53, 12);
this.label5.TabIndex = 4;
this.label5.Text = "写入超时";
//
// CbbTimeout
//
this.CbbTimeout.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed;
this.CbbTimeout.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.CbbTimeout.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.CbbTimeout.FormattingEnabled = true;
this.CbbTimeout.Items.AddRange(new object[] {
"100秒",
"50秒",
"30秒",
"20秒",
"10秒",
"5秒"});
this.CbbTimeout.Location = new System.Drawing.Point(256, 18);
this.CbbTimeout.Name = "CbbTimeout";
this.CbbTimeout.Size = new System.Drawing.Size(74, 22);
this.CbbTimeout.TabIndex = 3;
//
// label4
//
this.label4.AutoSize = true;
this.label4.Location = new System.Drawing.Point(197, 24);
this.label4.Name = "label4";
this.label4.Size = new System.Drawing.Size(53, 12);
this.label4.TabIndex = 2;
this.label4.Text = "连接超时";
//
// CbbEncoding
//
this.CbbEncoding.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed;
this.CbbEncoding.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.CbbEncoding.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.CbbEncoding.FormattingEnabled = true;
this.CbbEncoding.Items.AddRange(new object[] {
"自动识别",
"utf-8",
"gb2312",
"gbk",
"ASCII",
"Unicode",
"iso-8859-1"});
this.CbbEncoding.Location = new System.Drawing.Point(70, 18);
this.CbbEncoding.Name = "CbbEncoding";
this.CbbEncoding.Size = new System.Drawing.Size(121, 22);
this.CbbEncoding.TabIndex = 1;
//
// label3
//
this.label3.AutoSize = true;
this.label3.Location = new System.Drawing.Point(11, 24);
this.label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(53, 12);
this.label3.TabIndex = 0;
this.label3.Text = "选择编码";
//
// BtnRunHtml
//
this.BtnRunHtml.BaseColor = System.Drawing.Color.FromArgb(((int)(((byte)(51)))), ((int)(((byte)(76)))), ((int)(((byte)(95)))));
this.BtnRunHtml.Location = new System.Drawing.Point(723, 6);
this.BtnRunHtml.Name = "BtnRunHtml";
this.BtnRunHtml.Size = new System.Drawing.Size(82, 26);
this.BtnRunHtml.TabIndex = 104;
this.BtnRunHtml.Text = "执行";
this.BtnRunHtml.UseVisualStyleBackColor = true;
this.BtnRunHtml.Click += new System.EventHandler(this.BtnRunHtml_Click);
//
// RbPost
//
this.RbPost.AutoSize = true;
this.RbPost.Location = new System.Drawing.Point(577, 10);
this.RbPost.Name = "RbPost";
this.RbPost.Size = new System.Drawing.Size(47, 16);
this.RbPost.TabIndex = 103;
this.RbPost.Text = "Post";
this.RbPost.UseVisualStyleBackColor = true;
//
// RbGet
//
this.RbGet.AutoSize = true;
this.RbGet.Checked = true;
this.RbGet.Location = new System.Drawing.Point(530, 10);
this.RbGet.Name = "RbGet";
this.RbGet.Size = new System.Drawing.Size(41, 16);
this.RbGet.TabIndex = 102;
this.RbGet.TabStop = true;
this.RbGet.Text = "Get";
this.RbGet.UseVisualStyleBackColor = true;
//
// TxtUrl
//
this.TxtUrl.BackColor = System.Drawing.Color.White;
this.TxtUrl.EmptyText = "请填写请求url";
this.TxtUrl.ImeMode = System.Windows.Forms.ImeMode.Close;
this.TxtUrl.Location = new System.Drawing.Point(45, 6);
this.TxtUrl.MaxLength = 999999999;
this.TxtUrl.Multiline = false;
this.TxtUrl.Name = "TxtUrl";
this.TxtUrl.OnlyNumeric = false;
this.TxtUrl.PasswordChar = '\0';
this.TxtUrl.ReadOnly = false;
this.TxtUrl.SelectedText = "";
this.TxtUrl.SelectionLength = 0;
this.TxtUrl.SelectionStart = 0;
this.TxtUrl.Size = new System.Drawing.Size(479, 23);
this.TxtUrl.TabIndex = 110;
this.TxtUrl.TextAlign = System.Windows.Forms.HorizontalAlignment.Left;
this.TxtUrl.ToolTip = "";
this.TxtUrl.WordWrap = true;
this.TxtUrl.TextChanged2 += new System.EventHandler(this.TxtUrl_TextChanged2);
this.TxtUrl.KeyDown += new System.Windows.Forms.KeyEventHandler(this.TxtUrl_KeyDown);
this.TxtUrl.Leave += new System.EventHandler(this.TxtUrl_Leave);
//
// label2
//
this.label2.AutoSize = true;
this.label2.Location = new System.Drawing.Point(14, 10);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(23, 12);
this.label2.TabIndex = 101;
this.label2.Text = "Url";
//
// menuRight1
//
this.menuRight1.Name = "menuRight1";
this.menuRight1.Size = new System.Drawing.Size(185, 92);
this.menuRight1.SourceContent = this;
//
// BtnCtreateCShape
//
this.BtnCtreateCShape.BaseColor = System.Drawing.Color.FromArgb(((int)(((byte)(51)))), ((int)(((byte)(76)))), ((int)(((byte)(95)))));
this.BtnCtreateCShape.Location = new System.Drawing.Point(812, 6);
this.BtnCtreateCShape.Name = "BtnCtreateCShape";
this.BtnCtreateCShape.Size = new System.Drawing.Size(82, 26);
this.BtnCtreateCShape.TabIndex = 111;
this.BtnCtreateCShape.Text = "生成代码";
this.BtnCtreateCShape.UseVisualStyleBackColor = true;
this.BtnCtreateCShape.Click += new System.EventHandler(this.BtnCtreateCShape_Click);
//
// columnModel1
//
this.columnModel1.Columns.AddRange(new XPTable.Models.Column[] {
this.ColUrl,
this.ColTitle});
//
// ColUrl
//
this.ColUrl.Editable = false;
this.ColUrl.Tag = null;
this.ColUrl.Text = "网址";
this.ColUrl.Width = 430;
//
// ColTitle
//
this.ColTitle.Editable = false;
this.ColTitle.Tag = null;
this.ColTitle.Text = "名称";
this.ColTitle.Width = 200;
//
// table1
//
this.table1.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.table1.ColumnModel = this.columnModel1;
this.table1.EnableToolTips = true;
this.table1.FullRowSelect = true;
this.table1.HeaderStyle = System.Windows.Forms.ColumnHeaderStyle.Nonclickable;
this.table1.Location = new System.Drawing.Point(45, 30);
this.table1.Name = "table1";
this.table1.NoItemsText = "当前列表没有任何项";
this.table1.Size = new System.Drawing.Size(657, 347);
this.table1.TabIndex = 112;
this.table1.TableModel = this.tableModel1;
this.table1.Text = "table1";
this.table1.Visible = false;
this.table1.CellLostFocus += new XPTable.Events.CellFocusEventHandler(this.Table1_CellLostFocus);
this.table1.KeyDown += new System.Windows.Forms.KeyEventHandler(this.Table1_KeyDown);
this.table1.Leave += new System.EventHandler(this.Table1_Leave);
this.table1.MouseClick += new System.Windows.Forms.MouseEventHandler(this.table1_MouseClick);
//
// timer1
//
this.timer1.Interval = 1000;
this.timer1.Tick += new System.EventHandler(this.timer1_Tick);
//
// FrmWebGet
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(909, 620);
this.Controls.Add(this.TxtUrl);
this.Controls.Add(this.BtnCtreateCShape);
this.Controls.Add(this.ChkUrlLower);
this.Controls.Add(this.tabControl2);
this.Controls.Add(this.groupBox3);
this.Controls.Add(this.groupBox2);
this.Controls.Add(this.groupBox1);
this.Controls.Add(this.BtnRunHtml);
this.Controls.Add(this.RbPost);
this.Controls.Add(this.RbGet);
this.Controls.Add(this.label2);
this.Controls.Add(this.table1);
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
this.Name = "FrmWebGet";
this.TabPageContextMenuStrip = this.menuRight1;
this.Text = "网页抓取工具";
this.Load += new System.EventHandler(this.FrmWebGet_Load);
this.Click += new System.EventHandler(this.FrmWebGet_Click);
this.tabControl2.ResumeLayout(false);
this.tabPage3.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit();
this.tabPage12.ResumeLayout(false);
this.tabPage4.ResumeLayout(false);
this.tabPage5.ResumeLayout(false);
this.tabPage6.ResumeLayout(false);
this.tabPreview.ResumeLayout(false);
this.groupBox3.ResumeLayout(false);
this.tabControl1.ResumeLayout(false);
this.tabPage1.ResumeLayout(false);
this.tabPage2.ResumeLayout(false);
this.tabPage7.ResumeLayout(false);
this.groupBox2.ResumeLayout(false);
this.groupBox2.PerformLayout();
this.groupBox1.ResumeLayout(false);
this.groupBox1.PerformLayout();
((System.ComponentModel.ISupportInitialize)(this.table1)).EndInit();
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
private System.Windows.Forms.CheckBox ChkUrlLower;
private System.Windows.Forms.TabControl tabControl2;
private System.Windows.Forms.TabPage tabPage3;
private System.Windows.Forms.PictureBox pictureBox1;
private System.Windows.Forms.RichTextBox RichHtml;
private System.Windows.Forms.TabPage tabPage12;
private ICSharpCode.TextEditor.TextEditorControl Te_Format;
private System.Windows.Forms.TabPage tabPage4;
private System.Windows.Forms.RichTextBox RichCookie;
private System.Windows.Forms.TabPage tabPage5;
private System.Windows.Forms.RichTextBox RichStatus;
private System.Windows.Forms.TabPage tabPage6;
private System.Windows.Forms.RichTextBox RichHeader;
private System.Windows.Forms.GroupBox groupBox3;
private System.Windows.Forms.GroupBox groupBox2;
private ryControls.RyComboBox CbbReferer;
private ryControls.RyComboBox CbbIp;
private System.Windows.Forms.Label label6;
private ryControls.RyComboBox CbbUserAgent;
private System.Windows.Forms.Label label7;
private ryControls.RyComboBox CbbContentType;
private System.Windows.Forms.Label label11;
private System.Windows.Forms.Label label8;
private System.Windows.Forms.GroupBox groupBox1;
private System.Windows.Forms.CheckBox ChkGetPic;
private System.Windows.Forms.CheckBox ChkJump;
private ryControls.RyComboBox CbbWriteTimeout;
private System.Windows.Forms.Label label5;
private ryControls.RyComboBox CbbTimeout;
private System.Windows.Forms.Label label4;
private ryControls.RyComboBox CbbEncoding;
private System.Windows.Forms.Label label3;
private ryControls.ButtonEx BtnRunHtml;
private System.Windows.Forms.RadioButton RbPost;
private System.Windows.Forms.RadioButton RbGet;
private ryControls.TextBoxEx2 TxtUrl;
private System.Windows.Forms.Label label2;
private ryProcessManager.hezuo.ContextMenuStripRichText contextMenuStripRichText1;
private ryProcessManager.hezuo.ContextMenuStripHighlightText contextMenuStripHighlightText1;
private ryPaiban.Model.MenuRight menuRight1;
private ryControls.ButtonEx BtnCtreateCShape;
private XPTable.Models.ColumnModel columnModel1;
private XPTable.Models.TableModel tableModel1;
private XPTable.Models.Table table1;
private XPTable.Models.TextColumn ColUrl;
private XPTable.Models.TextColumn ColTitle;
private System.Windows.Forms.Timer timer1;
private System.Windows.Forms.TabControl tabControl1;
private System.Windows.Forms.TabPage tabPage1;
private System.Windows.Forms.TabPage tabPage2;
private System.Windows.Forms.TabPage tabPage7;
private ryControls.Controls.RichTextBox2 TxtPost;
private ryControls.Controls.RichTextBox2 TxtCookie;
private ryControls.Controls.RichTextBox2 TxtInputHeader;
private System.Windows.Forms.TabPage tabPreview;
private ExtendedWebBrowser2.ExtendedWebBrowser extendedWebBrowser1;
private System.Windows.Forms.CheckBox ChkHtmlPreview;
private System.Windows.Forms.CheckBox ChkNoPreview;
}
}
@@ -0,0 +1,771 @@
using DotNet4.Utilities;
using ICSharpCode.TextEditor.Document;
using ryCommon;
using ryCommonDb;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading;
using System.Windows.Forms;
using WeifenLuo.WinFormsUI.Docking;
using 开发辅助工具.Manager;
namespace 开发辅助工具.Tools
{
public partial class FrmWebGet : DockContent
{
public FrmWebGet()
{
InitializeComponent();
LoadPram();
tabControl2.SelectedTab = tabPage12;
}
private void LoadPram()
{
Te_Format.IsReadOnly = true;
CbbContentType.SelectedIndex = 0;
CbbUserAgent.SelectedIndex = 0;
CbbEncoding.SelectedIndex = 0;
CbbTimeout.SelectedIndex = CbbTimeout.Items.Count-2;
CbbWriteTimeout.SelectedIndex = CbbWriteTimeout.Items.Count - 2;
CbbUserAgent.Items.AddRange(new UserAgentInfo[]{
new UserAgentInfo() { name = "QQ浏览器极速模式", useragent = "Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/63.0.3239.26 Safari/537.36 Core/1.63.6776.400 QQBrowser/10.3.2601.400" },
new UserAgentInfo() { name = "360浏览器极速模式", useragent = "Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/63.0.3239.132 Safari/537.36" },
new UserAgentInfo() { name = "QQ浏览器手机版", useragent = "Mozilla/5.0 (Linux; U; Android 8.1.0; zh-cn; BLA-AL00 Build/HUAWEIBLA-AL00) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/57.0.2987.132 MQQBrowser/8.9 Mobile Safari/537.36" },
new UserAgentInfo() { name = "微信", useragent = "Mozilla/5.0 (Linux; U; Android 4.1.2; zh-cn; GT-I9300 Build/JZO54K) AppleWebKit/534.30 (KHTML, like Gecko) Version/4.0 Mobile Safari/534.30 MicroMessenger/5.2.380" },
new UserAgentInfo() { name = "iPhone", useragent = "Mozilla/5.0 (iPhone; U; CPU like Mac OS X; en) AppleWebKit/420+ (KHTML, like Gecko) Version/3.0 Mobile/1C28 Safari/419.3" },
new UserAgentInfo() { name = "安卓", useragent = "Mozilla/5.0 (Linux; Android 4.1.1; Nexus 7 Build/JRO03S) AppleWebKit/535.19 (KHTML, like Gecko) Chrome/18.0.1025.166 Safari/535.19" },
});
TxtPost.AddSeparatorMenu();
TxtPost.AddMenu("将选定项进行Url编码(UTF8)", "").Click += new EventHandler((object sender2, EventArgs e2) =>
{
RyWeb.QuickWeb web = new RyWeb.QuickWeb();
TxtPost.SelectedText = web.UrlEncode(TxtPost.SelectedText, Encoding.UTF8);
});
TxtPost.AddMenu("将选定项进行Url编码(GB2312)", "").Click += new EventHandler((object sender2, EventArgs e2) =>
{
RyWeb.QuickWeb web = new RyWeb.QuickWeb();
TxtPost.SelectedText = web.UrlEncode(TxtPost.SelectedText, Encoding.GetEncoding("GB2312"));
});
TxtPost.AddSeparatorMenu();
TxtPost.AddMenu("将选定项进行Url解码(UTF8)", "").Click += new EventHandler((object sender2, EventArgs e2) =>
{
TxtPost.SelectedText = RyWeb.WebDecode.UrlDecode(TxtPost.SelectedText, Encoding.UTF8);
});
TxtPost.AddMenu("将选定项进行Url解码(GB2312)", "").Click += new EventHandler((object sender2, EventArgs e2) =>
{
TxtPost.SelectedText = RyWeb.WebDecode.UrlDecode(TxtPost.SelectedText, Encoding.GetEncoding("GB2312"));
});
TxtPost.AddSeparatorMenu();
TxtPost.AddMenu("查询选定项对应的时间", "unixtime").Click += new EventHandler((object sender2, EventArgs e2) =>
{
MessageBox.Show("当前选中的时间是:" + RyDate.UnixTimeToDateTime(TxtPost.SelectedText).ToString(), "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
});
TxtPost.AddMenu("插入时间戳", "").Click += new EventHandler((object sender2, EventArgs e2) =>
{
SuperDesign.Controls.FrmInsertUnixTime frm = new SuperDesign.Controls.FrmInsertUnixTime();
frm.Icon = Icon;
var text = TxtPost.SelectedText;
if(text.Length>4 && text.IsInt())
{
frm.dateTimePickerEX1.Value = RyDate.UnixTimeToDateTime(text);
}
if (frm.ShowDialog()==DialogResult.OK)
{
TxtPost.SelectedText = RyDate.DateTimeToUnixTime(frm.dateTimePickerEX1.Value).ToString();
}
// MessageBox.Show("当前选中的时间是:" + RyDate.UnixTimeToDateTime(TxtPost.SelectedText).ToString(), "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
});
TxtPost.OnMenuOpening += TxtPost_OnMenuOpening;
}
private void TxtPost_OnMenuOpening(object sender, CancelEventArgs e)
{
var item= TxtPost.GetMenuItem("unixtime");
if(item!=null)
{
var text = TxtPost.SelectedText;
item.Visible = text.IsInt() && text.Length>4;
}
}
private bool IsExit = false;
private bool IsRunning = false;
Thread th;
private void BtnRunHtml_Click(object sender, EventArgs e)
{
if (IsRunning) {
IsExit = true;
BtnRunHtml.Text = "停止中"; ;
if (th!=null && th.IsAlive)
{
th.Abort();
}
return;
}
IsExit = false;
IsRunning = true;
BtnRunHtml.Text = "停止执行"; ;
#region 将当前设置赋值到查询
this.RichHtml.Text = "正在获取数据...";
Te_Format.Text = "正在获取数据...";
this.RichCookie.Text = "";
RichHeader.Text = "";
RichStatus.Text = "";
extendedWebBrowser1.LoadStrings("");
if (TxtUrl.Text.IndexOfEx("//") == 0)
{
TxtUrl.Text = "http:" + TxtUrl.Text;
}
else if (TxtUrl.Text.IndexOfEx("://") == 0)
{
TxtUrl.Text = "http" + TxtUrl.Text;
}
else if (TxtUrl.Text.IndexOfEx("http") != 0)
{
TxtUrl.Text = "http://" + TxtUrl.Text.TrimStart('/');
}
string str = "get";
if (RbGet.Checked)
{
str = "get";
}
if (RbPost.Checked)
{
str = "post";
}
HttpItem item = new HttpItem
{
URL = TxtUrl.Text.Trim(),
Method = str,
IsToLower = this.ChkUrlLower.Checked,
Cookie = this.TxtCookie.Text.Trim(),
Referer = this.CbbReferer.Text.Trim(),
Postdata = this.TxtPost.Text.Trim(),
Timeout = Convert.ToInt32(this.CbbTimeout.Text.Replace("秒", string.Empty).Trim()) * 0x3e8,
ReadWriteTimeout = Convert.ToInt32(this.CbbWriteTimeout.Text.Replace("秒", string.Empty).Trim()) * 0x3e8,
UserAgent = this.CbbUserAgent.Text,
ContentType = this.CbbContentType.Text,
Allowautoredirect = this.ChkJump.Checked,
ProtocolVersion = System.Net.HttpVersion.Version11,
ResultType = ChkGetPic.Checked ? ResultType.Byte : ResultType.String,
};
if (TxtInputHeader.Text.Length > 0)
{
try
{
string[] item_header = TxtInputHeader.Text.Replace("\r", "").Split('\n');
for (int i = 0; i < item_header.Length; i++)
{
item.Header.Add(item_header[i]);
//int iPos = item_header[i].LastIndexOf(":");
//if (iPos > 0)
//{
// var header_name = item_header[i].Substring(0, iPos);
// var header_value = item_header[i].Substring(iPos + 1);
// item.Header.Add(header_name, header_value);
//}
}
}
catch (Exception exception)
{
this.RichHtml.Text = exception.Message;
Te_Format.Text = "";
tabControl2.SelectedIndex = 0;
return;
}
}
if (CbbUserAgent.SelectedIndex != -1)
{
if (CbbUserAgent.SelectedItem is UserAgentInfo)
{
item.UserAgent = ((UserAgentInfo)CbbUserAgent.SelectedItem).useragent;
}
}
if (!string.IsNullOrEmpty(this.CbbIp.Text.Trim()))
{
item.ProxyIp = this.CbbIp.Text.Trim();
}
if (!this.CbbEncoding.Text.Contains("自动"))
{
item.Encoding = Encoding.GetEncoding(this.CbbEncoding.Text.Trim());
}
#endregion
if (th != null && th.IsAlive)
{
th.Abort();
}
th = new Thread(Start);
th.Start();
void Start()
{
try
{
var http = new HttpHelper();
DateTime dt = DateTime.Now;
var result = http.GetHtml(item);
DateTime dt_end = DateTime.Now;
_ = this.Invoke(new Action(() =>
{
#region 将获得的结果显示出来
if (result.Html.Length > 1024 * 1024 * 4)
{
this.RichHtml.Text = "获取失败,您要获取的网页超过4MB,暂时无法获取。";
Te_Format.Text = "获取失败,您要获取的网页超过4MB,暂时无法获取。";
}
else
{
if (result.StatusCode == System.Net.HttpStatusCode.Redirect)
{
if (!ChkJump.Checked)
{
switch (MessageBox.Show("当前Url需要跳转,是否勾选跳转重试获取?", "提示", MessageBoxButtons.YesNo, MessageBoxIcon.Question))
{
case DialogResult.Yes:
ChkJump.Checked = true;
IsRunning = false;
BtnRunHtml_Click(sender, e);
return;
}
}
}
RichHtml.Text = string.Empty;
if (this.ChkGetPic.Checked)
{
pictureBox1.Image = this.ByteArrayToImage(result.ResultByte);
RichHtml.Visible = false;
pictureBox1.Visible = true;
tabControl2.SelectedIndex = 0;
AddUrl("", TxtUrl.Text);
}
else
{
this.RichHtml.Text = result.Html;
if (Manager.Json.IsJson(result.Html))
{
Te_Format.Document.HighlightingStrategy = HighlightingStrategyFactory.CreateHighlightingStrategy("JSON");
Te_Format.Text = Manager.Json.ConvertJsonString(result.Html);
AddUrl("", TxtUrl.Text);
}
else
{
string[] _format_html = result.Html.Replace("\r", "").Split('\n');
string _html = "";
for (int i = 0; i < _format_html.Length; i++)
{
if (_format_html[i].Trim().Length == 0)
{
continue;
}
if (_html.Length > 0) { _html += "\r\n"; }
_html += _format_html[i];
}
Te_Format.Document.HighlightingStrategy = HighlightingStrategyFactory.CreateHighlightingStrategy("HTML");
Te_Format.Text = _html;
if (result.StatusCode == System.Net.HttpStatusCode.Redirect || result.StatusCode == System.Net.HttpStatusCode.OK)
{
string title = "";
try
{
HtmlAgilityPack.HtmlDocument htmlDoc = new HtmlAgilityPack.HtmlDocument();
htmlDoc.LoadHtml(result.Html);
var anchors = htmlDoc.DocumentNode.SelectNodes("//title");
if (anchors != null && anchors.Count > 0)
{
title = RyWeb.WebDecode.ConvertHtmlInner(anchors[0].InnerText);
}
}
catch { }
AddUrl(title, TxtUrl.Text);
}
}
this.RichHtml.Visible = true;
this.pictureBox1.Visible = false;
}
}
this.RichCookie.Text = result.Cookie;
var timespan = (dt_end - dt).TotalMilliseconds.ToInt();
string timespan_str = "";
if (timespan < 1000) { timespan_str = timespan + "毫秒"; }
else { timespan_str = timespan / 1000 + "秒" + timespan % 1000 + "毫秒"; }
this.RichStatus.Text = "StatusCode:" + result.StatusCode.ToString() + "\r\nStatusDescription:" + result.StatusDescription + "\r\n耗时:" + timespan_str;
this.RichHeader.Text = "";
foreach (string str1 in result.Header.AllKeys)
{
string text = this.RichHeader.Text;
this.RichHeader.Text = text + str1 + ":" + result.Header[str1].ToString() + "\r\n";
}
if (!ChkNoPreview.Checked)
{
if (ChkHtmlPreview.Checked)
{
if (!this.CbbEncoding.Text.Contains("自动"))
{
extendedWebBrowser1.LoadStrings(RichHtml.Text.Trim(), Encoding.GetEncoding(this.CbbEncoding.Text.Trim()));
}
else { extendedWebBrowser1.LoadStrings(RichHtml.Text.Trim(), Encoding.UTF8); }
//MessageBox.Show(extendedWebBrowser1.Document.Encoding);
//extendedWebBrowser1.Document.Encoding = Encoding.UTF8.BodyName;
}
else
{
if (RbGet.Checked)
{
extendedWebBrowser1.Navigate(TxtUrl.Text, null, null, TxtInputHeader.Text);
}
else
{
string strData = TxtPost.Text;
string strHeaders = "Content-Type: " + CbbContentType.Text + "\r\n" + TxtInputHeader.Text;
ASCIIEncoding AE = new ASCIIEncoding();
byte[] bytePost = AE.GetBytes(strData);
//byte[] byteHeaders = AE.GetBytes(strHeaders);
extendedWebBrowser1.Navigate(TxtUrl.Text, null, bytePost, strHeaders);
}
}
}
#endregion
}));
}
catch (Exception exception)
{
this.Invoke(new Action(() =>
{
if (IsExit)
{
this.RichHtml.Text = "用户中断执行";
BtnRunHtml.Text = "执行";
IsRunning = false;
}
else
{
this.RichHtml.Text = exception.Message;
}
Te_Format.Text = "";
}));
}
this.Invoke(new Action(() =>
{
BtnRunHtml.Text = "执行";
IsRunning = false;
}));
}
}
private Image ByteArrayToImage(byte[] Bytes)
{
MemoryStream stream = new MemoryStream(Bytes);
return Image.FromStream(stream, true);
}
private void TxtUrl_KeyDown(object sender, KeyEventArgs e)
{
if (e.KeyCode == Keys.Enter)
{
BtnRunHtml.PerformClick();
}
else if (e.KeyCode == Keys.Down)
{
if (table1.Visible)
{
table1.TableModel.Selections.Clear();
table1.TableModel.Selections.AddCells(0, 0, 0, columnModel1.Columns.Count - 1);
table1.Focus();
}
}
}
private void FrmWebGet_Load(object sender, EventArgs e)
{
contextMenuStripHighlightText1.AddSeparatorMenu();
contextMenuStripHighlightText1.AddMenu("将选中的内容作为Json分析", "").Click += AnalyJson_Click;
for (int i = 0; i < this.Controls.Count; i++)
{
switch (this.Controls[i])
{
case GroupBox gb:
gb.Click += Gb_Click;
break;
}
}
}
private void Gb_Click(object sender, EventArgs e)
{
table1.Visible = false;
//RbGet.Focus();
switch ((this.DockPanel.FindForm()))
{
case Form1 frm:
frm.HideDownList();
break;
}
}
private void AnalyJson_Click(object sender, EventArgs e)
{
ContextMenuStrip menu =(ContextMenuStrip) (((ToolStripMenuItem)sender).Owner);
switch(menu.SourceControl)
{
case ICSharpCode.TextEditor.TextEditorControl rich_txt:
var SelectedText= rich_txt.ActiveTextAreaControl.SelectionManager.SelectedText;
if (SelectedText == "") { SelectedText = rich_txt.Text; }
//if (Manager.Json.IsJson(SelectedText))
{
FrmJson frm = new FrmJson();
frm.Show(this.DockPanel);
frm.LoadJson(SelectedText);
}
break;
case RichTextBox rich_txt2:
var SelectedText2 = rich_txt2.SelectedText;
if (SelectedText2 == "") { SelectedText2 = rich_txt2.Text; }
//if (Manager.Json.IsJson(SelectedText2))
{
FrmJson frm = new FrmJson();
frm.Show(this.DockPanel);
frm.LoadJson(SelectedText2);
}
break;
}
}
private void BtnCtreateCShape_Click(object sender, EventArgs e)
{
string str = "get";
if (RbGet.Checked)
{
str = "get";
}
if (RbPost.Checked)
{
str = "post";
}
HttpItem item = new HttpItem
{
URL = TxtUrl.Text.Trim(),
Method = str,
IsToLower = this.ChkUrlLower.Checked,
Cookie = this.TxtCookie.Text.Trim(),
Referer = this.CbbReferer.Text.Trim(),
Postdata = this.TxtPost.Text.Trim(),
Timeout = Convert.ToInt32(this.CbbTimeout.Text.Replace("秒", string.Empty).Trim()) * 0x3e8,
ReadWriteTimeout = Convert.ToInt32(this.CbbWriteTimeout.Text.Replace("秒", string.Empty).Trim()) * 0x3e8,
UserAgent = this.CbbUserAgent.Text,
ContentType = this.CbbContentType.Text,
Allowautoredirect = this.ChkJump.Checked,
ResultType = ChkGetPic.Checked ? ResultType.Byte : ResultType.String
};
if (CbbUserAgent.SelectedIndex != -1)
{
if (CbbUserAgent.SelectedItem is UserAgentInfo)
{
item.UserAgent = ((UserAgentInfo)CbbUserAgent.SelectedItem).useragent;
}
}
if (!string.IsNullOrEmpty(this.CbbIp.Text.Trim()))
{
item.ProxyIp = this.CbbIp.Text.Trim();
}
if (!this.CbbEncoding.Text.Contains("自动"))
{
item.Encoding = Encoding.GetEncoding(this.CbbEncoding.Text.Trim());
}
this.RichHtml.Visible = true;
this.pictureBox1.Visible = false;
//this.SetHttpItem();
StringBuilder builder = new StringBuilder();
builder.Append(" HttpHelper http = new HttpHelper();\r\n");
builder.Append(" HttpItem item = new HttpItem()\r\n");
builder.Append(" {\r\n");
builder.Append(" URL = \"" + item.URL + "\",//URL 必需项 \r\n");
if (!this.CbbEncoding.Text.Trim().Contains("自动"))
{
builder.Append(" Encoding = System.Text.Encoding.GetEncoding( \"" + this.CbbEncoding.Text.Trim() + "\"),//URL 可选项 默认为Get \r\n");
}
builder.Append(" Method = \"" + item.Method + "\",//URL 可选项 默认为Get \r\n");
builder.Append(" IsToLower = " + item.IsToLower.ToString().ToLower() + ",//得到的HTML代码是否转成小写 可选项默认转小写 \r\n");
builder.Append(" Cookie = \"" + item.Cookie + "\",//字符串Cookie 可选项 \r\n");
builder.Append(" Referer =\"" + item.Referer + "\",//来源URL 可选项 \r\n");
builder.Append(" Postdata = \"" + item.Postdata + "\",//Post数据 可选项GET时不需要写 \r\n");
builder.Append(" Timeout = " + item.Timeout + ",//连接超时时间 可选项默认为100000 \r\n");
builder.Append(" ReadWriteTimeout = " + item.ReadWriteTimeout + ",//写入Post数据超时时间 可选项默认为30000 \r\n");
builder.Append(" UserAgent = \"" + item.UserAgent + "\",//用户的浏览器类型,版本,操作系统 可选项有默认值 \r\n");
builder.Append(" ContentType = \"" + item.ContentType + "\",//返回类型 可选项有默认值 \r\n");
builder.Append(" Allowautoredirect = " + item.Allowautoredirect.ToString().ToLower() + ",//是否根据301跳转 可选项 \r\n");
builder.Append(" //CerPath = \"d:\\123.cer\",//证书绝对路径 可选项不需要证书时可以不写这个参数 \r\n");
builder.Append(" //Connectionlimit = 1024,//最大连接数 可选项 默认为1024 \r\n");
builder.Append(" ProxyIp = \"" + item.ProxyIp + "\",//代理服务器ID 可选项 不需要代理 时可以不设置这三个参数 \r\n");
builder.Append(" //ProxyPwd = \"123456\",//代理服务器密码 可选项 \r\n");
builder.Append(" //ProxyUserName = \"administrator\",//代理服务器账户名 可选项 \r\n");
builder.Append(" ResultType = " + (ChkGetPic.Checked ? "ResultType.Byte" : "ResultType.String") + "\r\n");
builder.Append(" };\r\n");
builder.Append("");
builder.Append(" HttpResult result = http.GetHtml(item);\r\n");
builder.Append(" string html = result.Html;\r\n");
builder.Append(" string cookie = result.Cookie;\r\n");
builder.Append(" \r\n\r\n");
builder.Append(" /// <summary>\r\n");
builder.Append(" /// 字节数组生成图片\r\n");
builder.Append(" /// </summary>\r\n");
builder.Append(" /// <param name=\"Bytes\">字节数组</param>\r\n");
builder.Append(" /// <returns>图片</returns>\r\n");
builder.Append(" private Image byteArrayToImage(byte[] Bytes)\r\n");
builder.Append(" {\r\n");
builder.Append(" MemoryStream ms = new MemoryStream(Bytes);\r\n");
builder.Append(" return Bitmap.FromStream(ms,true);\r\n");
builder.Append(" }\r\n");
RichHtml.Text = builder.ToString();
Te_Format.Document.HighlightingStrategy = HighlightingStrategyFactory.CreateHighlightingStrategy("C#");
Te_Format.Text= builder.ToString();
}
public void AddUrl(string title,string url)
{
DataProvider mydb = new DataProvider();
IDbInterface db = Itrycn_Db.CreateDataProvider(Itrycn_Db.dataType);
if (db.ConnDb(Itrycn_Db.User_SQLConn) == 1)
{
var _title = title;
if(_title == "")
{
var mode = url.Replace("?","&").GetStr("&a=","");
if (mode.IndexOf("&") > 0) { mode = mode.GetStr("", "&"); }
if(mode.Length==0)
{
mode = url.Replace("?", "&").GetStr("&Action=", "");
if (mode.IndexOf("&") > 0) { mode = mode.GetStr("", "&"); }
}
_title = mode;
}
RyQuickSQL mySQL = new RyQuickSQL("Urls");
mySQL.AddField("Name", _title);
mySQL.AddField("Url", url);
mySQL.AddField("Cookie", TxtCookie.Text);
mySQL.AddField("Postdata", TxtPost.Text);
mySQL.AddField("Header", TxtInputHeader.Text);
mySQL.AddField("Method", RbGet.Checked?"get":"post");
mySQL.AddField("Referer", CbbReferer.Text);
mySQL.AddField("ContentType", CbbContentType.Text);
mySQL.AddField("Encoding", CbbEncoding.Text);
DataSet ds = db.ReadData("select * from Urls where Url=@Url", mySQL);
if (mydb.HaveData(ds))
{
DataRow reader = ds.Tables[0].Rows[0];
#region 读取信息
mySQL.AddFieldCalc("ClickCount", "ClickCount+1");//点击次数
mySQL.AddField("editTime", DateTime.Now);
db.ExecuteNonQuery(mySQL.GetUpdateSQL() + " where id=" + reader["id"].ToString(), mySQL);
#endregion
}
else
{
mySQL.AddField("ClickCount",1);
mySQL.AddField("editTime", DateTime.Now);
mySQL.AddField("addTime", DateTime.Now);
db.ExecuteNonQuery(mySQL.GetInsertSQL(),mySQL);
}
}
db.Free();
}
bool proc_use = false;
private void ClickItem(bool run = false)
{
if (table1.SelectedItems.Length > 0)
{
table1.Visible = false;
Application.DoEvents();
proc_use = true;
string url = table1.SelectedItems[0].Cells[ColUrl.Index].Text;
DataProvider mydb = new DataProvider();
IDbInterface db = Itrycn_Db.CreateDataProvider(Itrycn_Db.dataType);
if (db.ConnDb(Itrycn_Db.User_SQLConn) == 1)
{
db.AddParameter("url", url);
DataSet ds = db.ReadData("select * from Urls where Url=@url", db.GetParameter());
if(mydb.HaveData(ds))
{
DataRow row = ds.Tables[0].Rows[0];
SetValueByRich(TxtCookie,"Cookie");
SetValueByRich(TxtPost, "Postdata");
SetValueByRich(TxtInputHeader, "Header");
SetValue2(CbbReferer, "Referer");
SetValue2(CbbContentType, "ContentType");
SetValue2(CbbEncoding, "Encoding");
if (row["Method"].ToString().Length>0)
{
if(row["Method"].ToString()=="post")
{
RbPost.Checked = true;
}
else { RbGet.Checked = true; }
}
void SetValueByRich(ryControls.Controls.RichTextBox2 txt, string Field)
{
if (row[Field].ToString().Length > 0) { txt.Text = row[Field].ToString(); }
}
void SetValue2(ryControls.RyComboBox cbb, string Field)
{
if (row[Field].ToString().Length>0) { cbb.Text = row[Field].ToString(); }
}
}
db.Free();
}
TxtUrl.Text = url;
if (run)
{ BtnRunHtml.PerformClick(); }
proc_use = false;
}
else { table1.Visible = false; }
}
private void Table1_KeyDown(object sender, KeyEventArgs e)
{
if (e.KeyCode == Keys.Up)
{
if (table1.SelectedItems.Length > 0 && table1.SelectedItems[0].Index == 0)
{
table1.TableModel.Selections.Clear();
TxtUrl.Select();
//rySearch1.Select();
}
}
else if (e.KeyCode == Keys.Enter)
{
ClickItem();
}
}
private void TxtUrl_TextChanged2(object sender, EventArgs e)
{
if (proc_use) { return; }
string sql_where = "";
if (TxtUrl.Text != "") { sql_where = " where (Name like @SearchText or Url like @SearchText)"; }
#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)
{
db.AddParameter("SearchText", "%" + TxtUrl.Text + "%");
DataSet ds = db.ReadData("select * from Urls" + sql_where+ " order by ClickCount desc,editTime desc", db.GetParameter());
for (int i = 0; i < ds.Tables[0].Rows.Count; i++)
{
DataRow row = ds.Tables[0].Rows[i];
DateTime editTime = row["editTime"].ToDateTime();
XPTable.Models.Row itemList = new XPTable.Models.Row()
{
Tag = row["id"].ToString()
};
//需要修改此处
itemList.Cells.Add(new XPTable.Models.Cell(row["Url"].ToString()));//示例
itemList.Cells.Add(new XPTable.Models.Cell(row["Name"].ToString()));
if (editTime >= DateTime.Now.AddMinutes(-10))
{
tableModel1.Rows.Insert(0,itemList);
}
else
{
tableModel1.Rows.Add(itemList);
}
}
db.Free();
table1.Visible = tableModel1.Rows.Count != 0;
table1.BringToFront();
}
#endregion
}
private void FrmWebGet_Click(object sender, EventArgs e)
{
table1.Visible = false;
}
private void Table1_CellLostFocus(object sender, XPTable.Events.CellFocusEventArgs e)
{
if (e.Row == -1) { table1.Visible = false; }
}
private void Table1_Leave(object sender, EventArgs e)
{
if(!TxtUrl.Focused)
{
table1.Visible = false;
}
}
private void TxtUrl_Leave(object sender, EventArgs e)
{
if (!table1.Focused)
{
table1.Visible = false;
}
}
private void timer1_Tick(object sender, EventArgs e)
{
}
private void table1_MouseClick(object sender, MouseEventArgs e)
{
if (e.Button == MouseButtons.Left)
{
ClickItem();
}
}
private void TxtPost_DoubleClick(object sender, EventArgs e)
{
ryControls.Controls.RichTextBox2 txt = (ryControls.Controls.RichTextBox2)sender;
开发辅助工具.Controls.FrmText frm = new Controls.FrmText
{
Icon = Icon
};
frm.richTextBox1.Text = txt.Text;
if (frm.ShowDialog() == DialogResult.OK)
{
txt.Text = frm.richTextBox1.Text;
}
}
private void TxtPost_TextChanged(object sender, EventArgs e)
{
if (TxtPost.Text != "") { tabPage1.Text = "Post数据(有数据)"; }
else { tabPage1.Text = "Post数据"; }
}
private void TxtCookie_TextChanged(object sender, EventArgs e)
{
if (TxtCookie.Text != "") { tabPage2.Text = "Cookie(有数据)"; }
else { tabPage2.Text = "Cookie"; }
}
private void TxtInputHeader_TextChanged(object sender, EventArgs e)
{
if (TxtInputHeader.Text != "") { tabPage7.Text = "Header(有数据)"; }
else { tabPage7.Text = "Header"; }
}
private void ChkNoPreview_CheckedChanged(object sender, EventArgs e)
{
ChkHtmlPreview.Enabled = !ChkNoPreview.Checked;
}
}
public class UserAgentInfo
{
public string name = "";
public string useragent = "";
public override string ToString()
{
return name;
}
}
}
@@ -0,0 +1,215 @@
<?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="contextMenuStripRichText1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>627, 25</value>
</metadata>
<metadata name="contextMenuStripHighlightText1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>33, 18</value>
</metadata>
<metadata name="menuRight1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>842, 25</value>
</metadata>
<metadata name="columnModel1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>269, 25</value>
</metadata>
<metadata name="tableModel1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>410, 25</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>
AAABAAEAICAAAAEAIACoEAAAFgAAACgAAAAgAAAAQAAAAAEAIAAAAAAAABAAAAAAAAAAAAAAAAAAAAAA
AACBemwQgXpsiIF6bO+Bemz/gXps+4F6bPqBemz6gXps+oF6bPqBemz6gXps+oF6bPqBemz6gXps+oF6
bPqBemz6gXps+oF6bPqBemz6gXps+oF6bPqBemz6gXps/4F6bPmBemyqgXpsIYF6bACBemwAAAAAAAAA
AAAAAAAAAAAAAIF6bImBemz8gXps14F6bHmBemxTgXpsUIF6bFCBemxQgXpsUIF6bFCBemxQgXpsUIF6
bFCBemxQgXpsUIF6bFCBemxQgXpsUIF6bFCBemxQgXpsUIF6bFCBemxpgXpswIF6bP+BemyogXpsCoF6
bAAAAAAAAAAAAAAAAAAAAAAAgXps74F6bNeBemwvgXpsAIF6bACBemwAgXpsAIF6bACBemwAgXpsAIF6
bACBemwAgXpsAIF6bACBemwAgXpsAIF6bACBemwAgXpsAIF6bACBemwAgXpsAIF6bACBemwSgXpssIF6
bPKBemwygXpsAIF6bACBemwAgXpsAIF6bACBemz/gXpseIF6bACBemwAgXpsAIF6bACBemwXgXpsNIF6
bDeBemw2gXpsNoF6bDaBemw2gXpsNoF6bDaBemw2gXpsNoF6bDaBemw2gXpsNoF6bDaBemw2gXpsN4F6
bDKBemxzgXps9YF6bG6BemwzgXpsN4F6bCiBemwFgXpsAIF6bPuBemxTgXpsAIF6bACBemwAgXpsVIF6
bM+BemzwgXps8oF6bPGBemzxgXps8oF6bPKBemzxgXps8YF6bPKBemzxgXps8YF6bPKBemzygXps8oF6
bPKBemzxgXps8oF6bPOBemz+gXps9oF6bPKBemzygXps54F6bJiBemwagXps+oF6bFCBemwAgXpsAIF6
bDKBemzlgXps/4F6bP6Bemz1gXps/YF6bP+Bemz2gXps+oF6bP+Bemz+gXps9YF6bP6Bemz/gXps+oF6
bPiBemz8gXps9oF6bP2Bemz1gXps/oF6bPWBemzxgXps8YF6bPKBemz+gXps/4F6bKGBemz6gXpsUYF6
bACBemwAgXpsdIF6bP+Bemz/gXps5IF6bFyBemzagXps/oF6bHOBemysgXps/4F6bOCBemxcgXps3oF6
bP+BemyngXpsiIF6bKiBemxcgXpsxYF6bGiBemzqgXpsbYF6bEGBemxMgXpsWoF6bN+Bemz/gXps84F6
bPqBemxRgXpsAIF6bACBemyFgXps/4F6bP+BemzcgXpsLoF6bNOBemz/gXpsTIF6bJSBemz/gXps2IF6
bC2BemzUgXps/4F6bI6BemxhgXpsYoF6bBGBemyWgXpsP4F6bOOBemxEgXpsgoF6bNWBemzV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YF6bLGBemyxgXpssYF6
bLGBemyxgXpssYF6bLGBemyxgXpssYF6bLGBemywgXpsvIF6bPWBemzHgXpssIF6bLCBemyYgXpsRIF6
bAKBemz6gXpsUYF6bACBemwAgXpsAIF6bACBemwAgXpsDYF6bAuBemwEgXpsBIF6bASBemwEgXpsBIF6
bASBemwEgXpsBIF6bASBemwEgXpsBIF6bASBemwEgXpsBIF6bAKBemwogXps34F6bEuBemwAgXpsBIF6
bACBemwAgXpsAIF6bPqBemxRgXpsAAAAAACBemwAgXpsAIF6bACBemxmgXpsW4F6bACBemwAgXpsAIF6
bACBemwAgXpsAIF6bACBemwAgXpsAIF6bACBemwAgXpsAIF6bACBemwAgXpsAIF6bCSBemzegXpsSIF6
bACBemwAgXpsAIF6bACBemwAgXps+oF6bFGBemwAgXpsAIF6bACBemwAgXpsGIF6bG2BemyHgXpsAIF6
bBqBemwKgXpsAIF6bACBemwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACBemwAgXpsJYF6
bN6BemxIgXpsAAAAAAAAAAAAAAAAAAAAAACBemz6gXpsUYF6bACBemwAgXpsA4F6bGCBemykgXpsWYF6
bJuBemwAgXpsb4F6bJmBemwWgXpsAIF6bACBemwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAIF6
bACBemwlgXps3oF6bEiBemwAAAAAAAAAAAAAAAAAAAAAAIF6bPqBemxRgXpsAIF6bA2BemyCgXps+YF6
bLqBemw9gXpsq4F6bAaBemxrgXps/4F6bLuBemwtgXpsAIF6bACBemwAgXpsAIF6bACBemwAgXpsAIF6
bACBemwAgXpsAIF6bCSBemzegXpsSIF6bAAAAAAAAAAAAAAAAAAAAAAAgXps+oF6bE+BemwagXpsqIF6
bP6BemzAgXpsNoF6bB+BemyygXpsF4F6bBOBemyKgXps9oF6bNmBemxKgXpsAYF6bACBemwAgXpsCIF6
bBCBemwQgXpsEIF6bBCBemwOgXpsMoF6bOCBemxIgXpsAAAAAAAAAAAAAA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bACBemwfgXps3IF6bFCBemwIgXpsmoF6
bPeBemx0gXpsAoF6bACBemwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAIF6bP+Bemx4gXpsAIF6
bACBemwAAAAAAAAAAACBemwAgXpsB4F6bCaBemwFgXpsAAAAAAAAAAAAgXpsAIF6bB+BemzbgXpsW4F6
bIuBemz5gXpsgYF6bAWBemwAgXpsAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAgXps74F6
bNeBemwvgXpsAIF6bACBemwAgXpsAIF6bACBemwAgXpsAIF6bACBemwAgXpsAIF6bACBemwAgXpsG4F6
bNyBemzKgXps9oF6bI+BemwIgXpsAIF6bAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AACBemyJgXps/IF6bNeBemx6gXpsU4F6bFCBemxQgXpsUIF6bFCBemxQgXpsUIF6bFCBemxQgXpsUIF6
bE6BemxlgXps6oF6bP+BemybgXpsDYF6bACBemwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAIF6bBCBemyIgXps74F6bP+Bemz7gXps+oF6bPqBemz6gXps+oF6bPqBemz6gXps+oF6
bPqBemz6gXps+oF6bPuBemz/gXpsuIF6bBaBemwAgXpsAIF6bAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAADwAAAA8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAAAf4PAAD+DwAAAA8AAAAPAAAADwAAAA8AAAAPAAAADwAA
AB8AAAA/AAAAfwYMAP8AAAH/AAAD/wAAA/8=
</value>
</data>
<metadata name="timer1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>537, 25</value>
</metadata>
</root>
+198
View File
@@ -0,0 +1,198 @@
namespace 开发辅助工具.Tools
{
partial class FrmXpath
{
/// <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(FrmXpath));
this.splitContainer1 = new System.Windows.Forms.SplitContainer();
this.panelEx1 = new ryControls.PanelEx();
this.textEditorControl1 = new ICSharpCode.TextEditor.TextEditorControl();
this.contextMenuStripHighlightText1 = new ryProcessManager.hezuo.ContextMenuStripHighlightText();
this.RySearchXpath = new ryControls.rySearch();
this.label1 = new System.Windows.Forms.Label();
this.CbbXMLType = new ryControls.RyComboBox();
this.menuRight1 = new ryPaiban.Model.MenuRight(this.components);
this.TxtXML = new ryControls.Controls.RichTextBox2();
((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).BeginInit();
this.splitContainer1.Panel1.SuspendLayout();
this.splitContainer1.Panel2.SuspendLayout();
this.splitContainer1.SuspendLayout();
this.panelEx1.SuspendLayout();
this.SuspendLayout();
//
// splitContainer1
//
this.splitContainer1.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.splitContainer1.Location = new System.Drawing.Point(10, 33);
this.splitContainer1.Name = "splitContainer1";
this.splitContainer1.Orientation = System.Windows.Forms.Orientation.Horizontal;
//
// splitContainer1.Panel1
//
this.splitContainer1.Panel1.Controls.Add(this.TxtXML);
//
// splitContainer1.Panel2
//
this.splitContainer1.Panel2.Controls.Add(this.panelEx1);
this.splitContainer1.Size = new System.Drawing.Size(875, 475);
this.splitContainer1.SplitterDistance = 145;
this.splitContainer1.SplitterWidth = 2;
this.splitContainer1.TabIndex = 13;
//
// panelEx1
//
this.panelEx1.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.panelEx1.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(213)))), ((int)(((byte)(216)))), ((int)(((byte)(223)))));
this.panelEx1.Controls.Add(this.textEditorControl1);
this.panelEx1.Location = new System.Drawing.Point(2, 3);
this.panelEx1.Name = "panelEx1";
this.panelEx1.Padding = new System.Windows.Forms.Padding(2);
this.panelEx1.RoundeStyle = ryControls.RoundStyle.None;
this.panelEx1.Size = new System.Drawing.Size(869, 326);
this.panelEx1.TabIndex = 8;
this.panelEx1.TileBackColor = System.Drawing.Color.White;
//
// textEditorControl1
//
this.textEditorControl1.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.textEditorControl1.ContextMenuStrip = this.contextMenuStripHighlightText1;
this.textEditorControl1.IsReadOnly = false;
this.textEditorControl1.Location = new System.Drawing.Point(5, 5);
this.textEditorControl1.Name = "textEditorControl1";
this.textEditorControl1.Size = new System.Drawing.Size(859, 316);
this.textEditorControl1.TabIndex = 5;
//
// contextMenuStripHighlightText1
//
this.contextMenuStripHighlightText1.Name = "contextMenuStripHighlightText1";
this.contextMenuStripHighlightText1.Size = new System.Drawing.Size(101, 186);
//
// RySearchXpath
//
this.RySearchXpath.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.RySearchXpath.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(236)))), ((int)(((byte)(239)))), ((int)(((byte)(244)))));
this.RySearchXpath.BaseColor = System.Drawing.Color.FromArgb(((int)(((byte)(51)))), ((int)(((byte)(76)))), ((int)(((byte)(95)))));
this.RySearchXpath.EmptyText = "";
this.RySearchXpath.Location = new System.Drawing.Point(179, 3);
this.RySearchXpath.Name = "RySearchXpath";
this.RySearchXpath.Size = new System.Drawing.Size(707, 25);
this.RySearchXpath.TabIndex = 12;
this.RySearchXpath.OnSearch += new System.EventHandler(this.RySearchXpath_OnSearch);
//
// label1
//
this.label1.AutoSize = true;
this.label1.Location = new System.Drawing.Point(102, 8);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(71, 12);
this.label1.TabIndex = 11;
this.label1.Text = "Xpath表达式";
//
// CbbXMLType
//
this.CbbXMLType.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed;
this.CbbXMLType.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.CbbXMLType.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.CbbXMLType.Font = new System.Drawing.Font("宋体", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.CbbXMLType.FormattingEnabled = true;
this.CbbXMLType.Items.AddRange(new object[] {
"XML内容",
"Html内容"});
this.CbbXMLType.Location = new System.Drawing.Point(11, 3);
this.CbbXMLType.Name = "CbbXMLType";
this.CbbXMLType.Size = new System.Drawing.Size(85, 24);
this.CbbXMLType.TabIndex = 10;
//
// menuRight1
//
this.menuRight1.Name = "menuRight1";
this.menuRight1.Size = new System.Drawing.Size(173, 48);
this.menuRight1.SourceContent = this;
//
// TxtXML
//
this.TxtXML.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.TxtXML.BorderStyle = System.Windows.Forms.BorderStyle.None;
this.TxtXML.DetectUrls = false;
this.TxtXML.EmptyText = "待匹配的XML或HTML内容";
this.TxtXML.ForeColor = System.Drawing.Color.Black;
this.TxtXML.Location = new System.Drawing.Point(3, 3);
this.TxtXML.Name = "TxtXML";
this.TxtXML.OnlyInputText = true;
this.TxtXML.Size = new System.Drawing.Size(868, 139);
this.TxtXML.TabIndex = 32;
this.TxtXML.Text = "";
this.TxtXML.DoubleClick += new System.EventHandler(this.TxtXML_DoubleClick);
//
// FrmXpath
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(894, 509);
this.Controls.Add(this.splitContainer1);
this.Controls.Add(this.RySearchXpath);
this.Controls.Add(this.label1);
this.Controls.Add(this.CbbXMLType);
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
this.Name = "FrmXpath";
this.TabPageContextMenuStrip = this.menuRight1;
this.Text = "Xpath测试工具";
this.Load += new System.EventHandler(this.FrmXpath_Load);
this.splitContainer1.Panel1.ResumeLayout(false);
this.splitContainer1.Panel2.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).EndInit();
this.splitContainer1.ResumeLayout(false);
this.panelEx1.ResumeLayout(false);
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
private System.Windows.Forms.SplitContainer splitContainer1;
private ryControls.PanelEx panelEx1;
private ICSharpCode.TextEditor.TextEditorControl textEditorControl1;
private ryControls.rySearch RySearchXpath;
private System.Windows.Forms.Label label1;
private ryControls.RyComboBox CbbXMLType;
private ryProcessManager.hezuo.ContextMenuStripHighlightText contextMenuStripHighlightText1;
private ryPaiban.Model.MenuRight menuRight1;
private ryControls.Controls.RichTextBox2 TxtXML;
}
}
@@ -0,0 +1,88 @@
using HtmlAgilityPack;
using ICSharpCode.TextEditor.Document;
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 WeifenLuo.WinFormsUI.Docking;
namespace 开发辅助工具.Tools
{
public partial class FrmXpath : DockContent
{
public FrmXpath()
{
InitializeComponent();
CbbXMLType.SelectedIndex = 0;
textEditorControl1.IsReadOnly = true;
}
private void RySearchXpath_OnSearch(object sender, EventArgs e)
{
string text = "";
string format = "XML";
try
{
if (CbbXMLType.SelectedIndex == 0)
{
format = "XML";
System.Xml.XmlDocument xml = new System.Xml.XmlDocument();
xml.LoadXml(TxtXML.Text);
var node = xml.SelectNodes(RySearchXpath.Text);
if (node != null)
{
for (int i = 0; i < node.Count; i++)
{
if (text != "") { text += "\r\n\r\n"; }
text += node[i].OuterXml;
}
}
}
else if (CbbXMLType.SelectedIndex == 1)
{
format = "HTML";
HtmlAgilityPack.HtmlDocument htmlDoc = new HtmlAgilityPack.HtmlDocument();
htmlDoc.LoadHtml(TxtXML.Text);
HtmlNodeCollection anchors = htmlDoc.DocumentNode.SelectNodes(RySearchXpath.Text);
if (anchors != null)
{
for (int i = 0; i < anchors.Count; i++)
{
if (text != "") { text += "\r\n\r\n"; }
text += anchors[i].OuterHtml;
}
}
}
}
catch (Exception ex)
{
MessageBox.Show(ex.Message, "错误提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
}
textEditorControl1.Document.HighlightingStrategy = HighlightingStrategyFactory.CreateHighlightingStrategy(format);
textEditorControl1.Text = text;
}
private void FrmXpath_Load(object sender, EventArgs e)
{
}
private void TxtXML_DoubleClick(object sender, EventArgs e)
{
ryControls.Controls.RichTextBox2 txt = (ryControls.Controls.RichTextBox2)sender;
开发辅助工具.Controls.FrmText frm = new Controls.FrmText
{
Icon = Icon
};
frm.richTextBox1.Text = txt.Text;
if (frm.ShowDialog() == DialogResult.OK)
{
txt.Text = frm.richTextBox1.Text;
}
}
}
}
@@ -0,0 +1,203 @@
<?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="contextMenuStripHighlightText1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value>
</metadata>
<metadata name="menuRight1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>262, 17</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>
AAABAAEAICAAAAEAIACoEAAAFgAAACgAAAAgAAAAQAAAAAEAIAAAAAAAABAAAK8bAACvGwAAAAAAAAAA
AAAAAAAAARYZAAgdIAABFRgAARUYAAEVGAABFRgAABQXAAEWGQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAARYZAAAVGAABFRgAARUYAAEVGAABFRgAARUYAAEVGAABFRgAARUYAAUZ
HAABFhkAAAAAAAAAAAASIiUABRkcAAAVGA4AFRgbABUYGwAVGA0DFxoABRgbAAUZHAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFGBsAAxcaAAAVGA4AFRgeABUYHgAVGB0AFRgdABUYHQAV
GB0AFRgPBhkcAB8rLgAAAAAAAAAAAAMXGgADFxoUAhcasQIWGd4CFhneAhcasAMXGhoEGBsABxodAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABxseAAQYGwADFxoWAhcargIWGeICFhngAhYZ3wIW
Gd8CFhneAhYZ4AIXGrIDFxoUAxcaAAAAAAAAAAAABBgbAAQYGxIFGRzEBRkc/wUZHP8FGRz/BRkclAYa
HQUHGx4ACx0gAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAseIAAGGh0AAA8KAAUZHH8FGRz/BRkc/wUZ
HP8FGRz/BRk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