初始备份。
This commit is contained in:
commit
59677e1a85
6
.gitignore
vendored
Normal file
6
.gitignore
vendored
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
Publish/
|
||||||
|
Res/
|
||||||
|
**/obj
|
||||||
|
*.pdb
|
||||||
|
**/dcu
|
||||||
|
*.dcu
|
BIN
Bin/Debug/SuperDesign/.vs/SupperDesign/v16/.suo
Normal file
BIN
Bin/Debug/SuperDesign/.vs/SupperDesign/v16/.suo
Normal file
Binary file not shown.
BIN
Bin/Debug/SuperDesign/HtmlAgilityPack.dll
Normal file
BIN
Bin/Debug/SuperDesign/HtmlAgilityPack.dll
Normal file
Binary file not shown.
2578
Bin/Debug/SuperDesign/HtmlAgilityPack.xml
Normal file
2578
Bin/Debug/SuperDesign/HtmlAgilityPack.xml
Normal file
File diff suppressed because it is too large
Load Diff
BIN
Bin/Debug/SuperDesign/ICSharpCode.TextEditor.dll
Normal file
BIN
Bin/Debug/SuperDesign/ICSharpCode.TextEditor.dll
Normal file
Binary file not shown.
2390
Bin/Debug/SuperDesign/ICSharpCode.TextEditor.xml
Normal file
2390
Bin/Debug/SuperDesign/ICSharpCode.TextEditor.xml
Normal file
File diff suppressed because it is too large
Load Diff
BIN
Bin/Debug/SuperDesign/MGdUI.dll
Normal file
BIN
Bin/Debug/SuperDesign/MGdUI.dll
Normal file
Binary file not shown.
1345
Bin/Debug/SuperDesign/MGdUI.xml
Normal file
1345
Bin/Debug/SuperDesign/MGdUI.xml
Normal file
File diff suppressed because it is too large
Load Diff
BIN
Bin/Debug/SuperDesign/MyDb.dll
Normal file
BIN
Bin/Debug/SuperDesign/MyDb.dll
Normal file
Binary file not shown.
4829
Bin/Debug/SuperDesign/MyDb.xml
Normal file
4829
Bin/Debug/SuperDesign/MyDb.xml
Normal file
File diff suppressed because it is too large
Load Diff
BIN
Bin/Debug/SuperDesign/MyDb_SQLite.dll
Normal file
BIN
Bin/Debug/SuperDesign/MyDb_SQLite.dll
Normal file
Binary file not shown.
BIN
Bin/Debug/SuperDesign/Newtonsoft.Json.dll
Normal file
BIN
Bin/Debug/SuperDesign/Newtonsoft.Json.dll
Normal file
Binary file not shown.
9327
Bin/Debug/SuperDesign/Newtonsoft.Json.xml
Normal file
9327
Bin/Debug/SuperDesign/Newtonsoft.Json.xml
Normal file
File diff suppressed because it is too large
Load Diff
BIN
Bin/Debug/SuperDesign/RyWeb.dll
Normal file
BIN
Bin/Debug/SuperDesign/RyWeb.dll
Normal file
Binary file not shown.
BIN
Bin/Debug/SuperDesign/SCREEN_CAPTURE.dll
Normal file
BIN
Bin/Debug/SuperDesign/SCREEN_CAPTURE.dll
Normal file
Binary file not shown.
BIN
Bin/Debug/SuperDesign/Secure/SupperDesign.exe
Normal file
BIN
Bin/Debug/SuperDesign/Secure/SupperDesign.exe
Normal file
Binary file not shown.
BIN
Bin/Debug/SuperDesign/SuperDesign.exe
Normal file
BIN
Bin/Debug/SuperDesign/SuperDesign.exe
Normal file
Binary file not shown.
7
Bin/Debug/SuperDesign/SysDb/.gitignore
vendored
Normal file
7
Bin/Debug/SuperDesign/SysDb/.gitignore
vendored
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
Publish/
|
||||||
|
Res/
|
||||||
|
**/obj
|
||||||
|
*.pdb
|
||||||
|
**/dcu
|
||||||
|
*.dcu
|
||||||
|
**/Secure
|
36
Bin/Debug/SuperDesign/SysDb/AssemblyInfo.cs
Normal file
36
Bin/Debug/SuperDesign/SysDb/AssemblyInfo.cs
Normal file
|
@ -0,0 +1,36 @@
|
||||||
|
using System.Reflection;
|
||||||
|
using System.Runtime.CompilerServices;
|
||||||
|
using System.Runtime.InteropServices;
|
||||||
|
|
||||||
|
// 有关程序集的一般信息由以下
|
||||||
|
// 控制。更改这些特性值可修改
|
||||||
|
// 与程序集关联的信息。
|
||||||
|
[assembly: AssemblyTitle("@AssemblyTitle")]
|
||||||
|
[assembly: AssemblyDescription("")]
|
||||||
|
[assembly: AssemblyConfiguration("")]
|
||||||
|
[assembly: AssemblyCompany("")]
|
||||||
|
[assembly: AssemblyProduct("@AssemblyProduct")]
|
||||||
|
[assembly: AssemblyCopyright("@Copyright")]
|
||||||
|
[assembly: AssemblyTrademark("")]
|
||||||
|
[assembly: AssemblyCulture("")]
|
||||||
|
|
||||||
|
// 将 ComVisible 设置为 false 会使此程序集中的类型
|
||||||
|
//对 COM 组件不可见。如果需要从 COM 访问此程序集中的类型
|
||||||
|
//请将此类型的 ComVisible 特性设置为 true。
|
||||||
|
[assembly: ComVisible(false)]
|
||||||
|
|
||||||
|
// 如果此项目向 COM 公开,则下列 GUID 用于类型库的 ID
|
||||||
|
[assembly: Guid("62b5c3e8-4af1-4a7f-a40b-a6186f83dbd2")]
|
||||||
|
|
||||||
|
// 程序集的版本信息由下列四个值组成:
|
||||||
|
//
|
||||||
|
// 主版本
|
||||||
|
// 次版本
|
||||||
|
// 生成号
|
||||||
|
// 修订号
|
||||||
|
//
|
||||||
|
// 可以指定所有值,也可以使用以下所示的 "*" 预置版本号和修订号
|
||||||
|
// 方法是按如下所示使用“*”: :
|
||||||
|
// [assembly: AssemblyVersion("1.0.*")]
|
||||||
|
[assembly: AssemblyVersion("1.0.0.0")]
|
||||||
|
[assembly: AssemblyFileVersion("1.0.0.0")]
|
2
Bin/Debug/SuperDesign/SysDb/Folder.txt
Normal file
2
Bin/Debug/SuperDesign/SysDb/Folder.txt
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
VS2019项目目录|E:\SysDoc\Documents\Visual Studio 2019\Projects\
|
||||||
|
程序开发源码|E:\我的代码\毕方项目\C#
|
BIN
Bin/Debug/SuperDesign/SysDb/Tools.dat
Normal file
BIN
Bin/Debug/SuperDesign/SysDb/Tools.dat
Normal file
Binary file not shown.
BIN
Bin/Debug/SuperDesign/SysDb/Tools/Json/HiJson 2.1.2_jdk64.exe
Normal file
BIN
Bin/Debug/SuperDesign/SysDb/Tools/Json/HiJson 2.1.2_jdk64.exe
Normal file
Binary file not shown.
198
Bin/Debug/SuperDesign/SysDb/Tools/Json/error.log
Normal file
198
Bin/Debug/SuperDesign/SysDb/Tools/Json/error.log
Normal file
|
@ -0,0 +1,198 @@
|
||||||
|
Exception in thread "AWT-EventQueue-0" java.lang.IllegalStateException: cannot open system clipboard
|
||||||
|
at sun.awt.windows.WClipboard.openClipboard(Native Method)
|
||||||
|
at sun.awt.datatransfer.SunClipboard.getClipboardFormatsOpenClose(Unknown Source)
|
||||||
|
at sun.awt.datatransfer.SunClipboard.isDataFlavorAvailable(Unknown Source)
|
||||||
|
at org.jdesktop.application.TextActions.updateTextActions(TextActions.java:132)
|
||||||
|
at org.jdesktop.application.TextActions.access$400(TextActions.java:47)
|
||||||
|
at org.jdesktop.application.TextActions$ClipboardListener.flavorsChanged(TextActions.java:108)
|
||||||
|
at sun.awt.datatransfer.SunClipboard$1SunFlavorChangeNotifier.run(Unknown Source)
|
||||||
|
at java.awt.event.InvocationEvent.dispatch(Unknown Source)
|
||||||
|
at java.awt.EventQueue.dispatchEventImpl(Unknown Source)
|
||||||
|
at java.awt.EventQueue.access$500(Unknown Source)
|
||||||
|
at java.awt.EventQueue$3.run(Unknown Source)
|
||||||
|
at java.awt.EventQueue$3.run(Unknown Source)
|
||||||
|
at java.security.AccessController.doPrivileged(Native Method)
|
||||||
|
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source)
|
||||||
|
at java.awt.EventQueue.dispatchEvent(Unknown Source)
|
||||||
|
at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
|
||||||
|
at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
|
||||||
|
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
|
||||||
|
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
|
||||||
|
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
|
||||||
|
at java.awt.EventDispatchThread.run(Unknown Source)
|
||||||
|
Exception in thread "AWT-EventQueue-0" java.lang.IllegalStateException: cannot open system clipboard
|
||||||
|
at sun.awt.windows.WClipboard.openClipboard(Native Method)
|
||||||
|
at sun.awt.datatransfer.SunClipboard.getClipboardFormatsOpenClose(Unknown Source)
|
||||||
|
at sun.awt.datatransfer.SunClipboard.isDataFlavorAvailable(Unknown Source)
|
||||||
|
at org.jdesktop.application.TextActions.updateTextActions(TextActions.java:132)
|
||||||
|
at org.jdesktop.application.TextActions.access$400(TextActions.java:47)
|
||||||
|
at org.jdesktop.application.TextActions$ClipboardListener.flavorsChanged(TextActions.java:108)
|
||||||
|
at sun.awt.datatransfer.SunClipboard$1SunFlavorChangeNotifier.run(Unknown Source)
|
||||||
|
at java.awt.event.InvocationEvent.dispatch(Unknown Source)
|
||||||
|
at java.awt.EventQueue.dispatchEventImpl(Unknown Source)
|
||||||
|
at java.awt.EventQueue.access$500(Unknown Source)
|
||||||
|
at java.awt.EventQueue$3.run(Unknown Source)
|
||||||
|
at java.awt.EventQueue$3.run(Unknown Source)
|
||||||
|
at java.security.AccessController.doPrivileged(Native Method)
|
||||||
|
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source)
|
||||||
|
at java.awt.EventQueue.dispatchEvent(Unknown Source)
|
||||||
|
at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
|
||||||
|
at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
|
||||||
|
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
|
||||||
|
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
|
||||||
|
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
|
||||||
|
at java.awt.EventDispatchThread.run(Unknown Source)
|
||||||
|
Exception in thread "AWT-EventQueue-0" java.lang.IllegalStateException: cannot open system clipboard
|
||||||
|
at sun.awt.windows.WClipboard.openClipboard(Native Method)
|
||||||
|
at sun.awt.datatransfer.SunClipboard.getClipboardFormatsOpenClose(Unknown Source)
|
||||||
|
at sun.awt.datatransfer.SunClipboard.isDataFlavorAvailable(Unknown Source)
|
||||||
|
at org.jdesktop.application.TextActions.updateTextActions(TextActions.java:132)
|
||||||
|
at org.jdesktop.application.TextActions.access$400(TextActions.java:47)
|
||||||
|
at org.jdesktop.application.TextActions$ClipboardListener.flavorsChanged(TextActions.java:108)
|
||||||
|
at sun.awt.datatransfer.SunClipboard$1SunFlavorChangeNotifier.run(Unknown Source)
|
||||||
|
at java.awt.event.InvocationEvent.dispatch(Unknown Source)
|
||||||
|
at java.awt.EventQueue.dispatchEventImpl(Unknown Source)
|
||||||
|
at java.awt.EventQueue.access$500(Unknown Source)
|
||||||
|
at java.awt.EventQueue$3.run(Unknown Source)
|
||||||
|
at java.awt.EventQueue$3.run(Unknown Source)
|
||||||
|
at java.security.AccessController.doPrivileged(Native Method)
|
||||||
|
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source)
|
||||||
|
at java.awt.EventQueue.dispatchEvent(Unknown Source)
|
||||||
|
at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
|
||||||
|
at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
|
||||||
|
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
|
||||||
|
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
|
||||||
|
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
|
||||||
|
at java.awt.EventDispatchThread.run(Unknown Source)
|
||||||
|
Exception in thread "AWT-EventQueue-0" java.lang.IllegalStateException: cannot open system clipboard
|
||||||
|
at sun.awt.windows.WClipboard.openClipboard(Native Method)
|
||||||
|
at sun.awt.datatransfer.SunClipboard.getClipboardFormatsOpenClose(Unknown Source)
|
||||||
|
at sun.awt.datatransfer.SunClipboard.isDataFlavorAvailable(Unknown Source)
|
||||||
|
at org.jdesktop.application.TextActions.updateTextActions(TextActions.java:132)
|
||||||
|
at org.jdesktop.application.TextActions.access$400(TextActions.java:47)
|
||||||
|
at org.jdesktop.application.TextActions$ClipboardListener.flavorsChanged(TextActions.java:108)
|
||||||
|
at sun.awt.datatransfer.SunClipboard$1SunFlavorChangeNotifier.run(Unknown Source)
|
||||||
|
at java.awt.event.InvocationEvent.dispatch(Unknown Source)
|
||||||
|
at java.awt.EventQueue.dispatchEventImpl(Unknown Source)
|
||||||
|
at java.awt.EventQueue.access$500(Unknown Source)
|
||||||
|
at java.awt.EventQueue$3.run(Unknown Source)
|
||||||
|
at java.awt.EventQueue$3.run(Unknown Source)
|
||||||
|
at java.security.AccessController.doPrivileged(Native Method)
|
||||||
|
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source)
|
||||||
|
at java.awt.EventQueue.dispatchEvent(Unknown Source)
|
||||||
|
at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
|
||||||
|
at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
|
||||||
|
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
|
||||||
|
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
|
||||||
|
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
|
||||||
|
at java.awt.EventDispatchThread.run(Unknown Source)
|
||||||
|
Exception in thread "AWT-EventQueue-0" java.lang.IllegalStateException: cannot open system clipboard
|
||||||
|
at sun.awt.windows.WClipboard.openClipboard(Native Method)
|
||||||
|
at sun.awt.datatransfer.SunClipboard.getClipboardFormatsOpenClose(Unknown Source)
|
||||||
|
at sun.awt.datatransfer.SunClipboard.isDataFlavorAvailable(Unknown Source)
|
||||||
|
at org.jdesktop.application.TextActions.updateTextActions(TextActions.java:132)
|
||||||
|
at org.jdesktop.application.TextActions.access$400(TextActions.java:47)
|
||||||
|
at org.jdesktop.application.TextActions$ClipboardListener.flavorsChanged(TextActions.java:108)
|
||||||
|
at sun.awt.datatransfer.SunClipboard$1SunFlavorChangeNotifier.run(Unknown Source)
|
||||||
|
at java.awt.event.InvocationEvent.dispatch(Unknown Source)
|
||||||
|
at java.awt.EventQueue.dispatchEventImpl(Unknown Source)
|
||||||
|
at java.awt.EventQueue.access$500(Unknown Source)
|
||||||
|
at java.awt.EventQueue$3.run(Unknown Source)
|
||||||
|
at java.awt.EventQueue$3.run(Unknown Source)
|
||||||
|
at java.security.AccessController.doPrivileged(Native Method)
|
||||||
|
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source)
|
||||||
|
at java.awt.EventQueue.dispatchEvent(Unknown Source)
|
||||||
|
at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
|
||||||
|
at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
|
||||||
|
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
|
||||||
|
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
|
||||||
|
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
|
||||||
|
at java.awt.EventDispatchThread.run(Unknown Source)
|
||||||
|
Exception in thread "AWT-EventQueue-0" java.lang.IllegalStateException: cannot open system clipboard
|
||||||
|
at sun.awt.windows.WClipboard.openClipboard(Native Method)
|
||||||
|
at sun.awt.datatransfer.SunClipboard.getClipboardFormatsOpenClose(Unknown Source)
|
||||||
|
at sun.awt.datatransfer.SunClipboard.isDataFlavorAvailable(Unknown Source)
|
||||||
|
at org.jdesktop.application.TextActions.updateTextActions(TextActions.java:132)
|
||||||
|
at org.jdesktop.application.TextActions.access$400(TextActions.java:47)
|
||||||
|
at org.jdesktop.application.TextActions$ClipboardListener.flavorsChanged(TextActions.java:108)
|
||||||
|
at sun.awt.datatransfer.SunClipboard$1SunFlavorChangeNotifier.run(Unknown Source)
|
||||||
|
at java.awt.event.InvocationEvent.dispatch(Unknown Source)
|
||||||
|
at java.awt.EventQueue.dispatchEventImpl(Unknown Source)
|
||||||
|
at java.awt.EventQueue.access$500(Unknown Source)
|
||||||
|
at java.awt.EventQueue$3.run(Unknown Source)
|
||||||
|
at java.awt.EventQueue$3.run(Unknown Source)
|
||||||
|
at java.security.AccessController.doPrivileged(Native Method)
|
||||||
|
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source)
|
||||||
|
at java.awt.EventQueue.dispatchEvent(Unknown Source)
|
||||||
|
at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
|
||||||
|
at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
|
||||||
|
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
|
||||||
|
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
|
||||||
|
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
|
||||||
|
at java.awt.EventDispatchThread.run(Unknown Source)
|
||||||
|
Exception in thread "AWT-EventQueue-0" java.lang.IllegalStateException: cannot open system clipboard
|
||||||
|
at sun.awt.windows.WClipboard.openClipboard(Native Method)
|
||||||
|
at sun.awt.datatransfer.SunClipboard.getClipboardFormatsOpenClose(Unknown Source)
|
||||||
|
at sun.awt.datatransfer.SunClipboard.isDataFlavorAvailable(Unknown Source)
|
||||||
|
at org.jdesktop.application.TextActions.updateTextActions(TextActions.java:132)
|
||||||
|
at org.jdesktop.application.TextActions.access$400(TextActions.java:47)
|
||||||
|
at org.jdesktop.application.TextActions$ClipboardListener.flavorsChanged(TextActions.java:108)
|
||||||
|
at sun.awt.datatransfer.SunClipboard$1SunFlavorChangeNotifier.run(Unknown Source)
|
||||||
|
at java.awt.event.InvocationEvent.dispatch(Unknown Source)
|
||||||
|
at java.awt.EventQueue.dispatchEventImpl(Unknown Source)
|
||||||
|
at java.awt.EventQueue.access$500(Unknown Source)
|
||||||
|
at java.awt.EventQueue$3.run(Unknown Source)
|
||||||
|
at java.awt.EventQueue$3.run(Unknown Source)
|
||||||
|
at java.security.AccessController.doPrivileged(Native Method)
|
||||||
|
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source)
|
||||||
|
at java.awt.EventQueue.dispatchEvent(Unknown Source)
|
||||||
|
at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
|
||||||
|
at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
|
||||||
|
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
|
||||||
|
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
|
||||||
|
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
|
||||||
|
at java.awt.EventDispatchThread.run(Unknown Source)
|
||||||
|
Exception in thread "AWT-EventQueue-0" java.lang.IllegalStateException: cannot open system clipboard
|
||||||
|
at sun.awt.windows.WClipboard.openClipboard(Native Method)
|
||||||
|
at sun.awt.datatransfer.SunClipboard.getClipboardFormatsOpenClose(Unknown Source)
|
||||||
|
at sun.awt.datatransfer.SunClipboard.isDataFlavorAvailable(Unknown Source)
|
||||||
|
at org.jdesktop.application.TextActions.updateTextActions(TextActions.java:132)
|
||||||
|
at org.jdesktop.application.TextActions.access$400(TextActions.java:47)
|
||||||
|
at org.jdesktop.application.TextActions$ClipboardListener.flavorsChanged(TextActions.java:108)
|
||||||
|
at sun.awt.datatransfer.SunClipboard$1SunFlavorChangeNotifier.run(Unknown Source)
|
||||||
|
at java.awt.event.InvocationEvent.dispatch(Unknown Source)
|
||||||
|
at java.awt.EventQueue.dispatchEventImpl(Unknown Source)
|
||||||
|
at java.awt.EventQueue.access$500(Unknown Source)
|
||||||
|
at java.awt.EventQueue$3.run(Unknown Source)
|
||||||
|
at java.awt.EventQueue$3.run(Unknown Source)
|
||||||
|
at java.security.AccessController.doPrivileged(Native Method)
|
||||||
|
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source)
|
||||||
|
at java.awt.EventQueue.dispatchEvent(Unknown Source)
|
||||||
|
at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
|
||||||
|
at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
|
||||||
|
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
|
||||||
|
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
|
||||||
|
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
|
||||||
|
at java.awt.EventDispatchThread.run(Unknown Source)
|
||||||
|
Exception in thread "AWT-EventQueue-0" java.lang.IllegalStateException: cannot open system clipboard
|
||||||
|
at sun.awt.windows.WClipboard.openClipboard(Native Method)
|
||||||
|
at sun.awt.datatransfer.SunClipboard.getClipboardFormatsOpenClose(Unknown Source)
|
||||||
|
at sun.awt.datatransfer.SunClipboard.isDataFlavorAvailable(Unknown Source)
|
||||||
|
at org.jdesktop.application.TextActions.updateTextActions(TextActions.java:132)
|
||||||
|
at org.jdesktop.application.TextActions.access$400(TextActions.java:47)
|
||||||
|
at org.jdesktop.application.TextActions$ClipboardListener.flavorsChanged(TextActions.java:108)
|
||||||
|
at sun.awt.datatransfer.SunClipboard$1SunFlavorChangeNotifier.run(Unknown Source)
|
||||||
|
at java.awt.event.InvocationEvent.dispatch(Unknown Source)
|
||||||
|
at java.awt.EventQueue.dispatchEventImpl(Unknown Source)
|
||||||
|
at java.awt.EventQueue.access$500(Unknown Source)
|
||||||
|
at java.awt.EventQueue$3.run(Unknown Source)
|
||||||
|
at java.awt.EventQueue$3.run(Unknown Source)
|
||||||
|
at java.security.AccessController.doPrivileged(Native Method)
|
||||||
|
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source)
|
||||||
|
at java.awt.EventQueue.dispatchEvent(Unknown Source)
|
||||||
|
at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
|
||||||
|
at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
|
||||||
|
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
|
||||||
|
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
|
||||||
|
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
|
||||||
|
at java.awt.EventDispatchThread.run(Unknown Source)
|
BIN
Bin/Debug/SuperDesign/SysDb/混淆.nrproj
Normal file
BIN
Bin/Debug/SuperDesign/SysDb/混淆.nrproj
Normal file
Binary file not shown.
BIN
Bin/Debug/SuperDesign/System.Data.SQLite.dll
Normal file
BIN
Bin/Debug/SuperDesign/System.Data.SQLite.dll
Normal file
Binary file not shown.
174
Bin/Debug/SuperDesign/System.Data.SQLite.dll.config
Normal file
174
Bin/Debug/SuperDesign/System.Data.SQLite.dll.config
Normal file
|
@ -0,0 +1,174 @@
|
||||||
|
<?xml version="1.0"?>
|
||||||
|
<!--
|
||||||
|
*
|
||||||
|
* System.Data.SQLite.dll.config -
|
||||||
|
*
|
||||||
|
* Written by Joe Mistachkin.
|
||||||
|
* Released to the public domain, use at your own risk!
|
||||||
|
*
|
||||||
|
-->
|
||||||
|
<configuration>
|
||||||
|
<appSettings>
|
||||||
|
<!--
|
||||||
|
NOTE: If this environment variable is set [to anything], it will be
|
||||||
|
used by the System.Data.SQLite.Linq.SQLiteProviderManifest class
|
||||||
|
(and the System.Data.SQLite.EF6.SQLiteProviderManifest class) to
|
||||||
|
modify future provider manifest tokens by appending the value of
|
||||||
|
the environment variable to the existing provider manifest token,
|
||||||
|
if any. Typically, in order for the constructed provider
|
||||||
|
manifest token to be syntactically correct, the environment
|
||||||
|
variable value [to be appended] must begin with a semicolon.
|
||||||
|
-->
|
||||||
|
<!--
|
||||||
|
<add key="AppendManifestToken_SQLiteProviderManifest" value="" />
|
||||||
|
-->
|
||||||
|
|
||||||
|
<!--
|
||||||
|
NOTE: If this environment variable is set [to anything], it will be
|
||||||
|
used by the System.Data.SQLite.SQLiteConnection class as the
|
||||||
|
default flags for all opened connections (i.e. when they are
|
||||||
|
not present in the connection string).
|
||||||
|
-->
|
||||||
|
<!--
|
||||||
|
<add key="DefaultFlags_SQLiteConnection" value="" />
|
||||||
|
-->
|
||||||
|
|
||||||
|
<!--
|
||||||
|
NOTE: If this configuration variable is set [to anything], the SQLite
|
||||||
|
logging subsystem may be initialized in a non-default application
|
||||||
|
domain. By default, this is not allowed due to the potential
|
||||||
|
for application domain unloading issues.
|
||||||
|
-->
|
||||||
|
<!--
|
||||||
|
<add key="Force_SQLiteLog" value="1" />
|
||||||
|
-->
|
||||||
|
|
||||||
|
<!--
|
||||||
|
NOTE: If this configuration variable is set [to anything], the native
|
||||||
|
library pre-loading functionality will be disabled. By default,
|
||||||
|
the native library pre-loading will attempt to load the native
|
||||||
|
SQLite library from architecture-specific (e.g. "x86", "amd64",
|
||||||
|
"x64") or platform-specific (e.g. "Win32") directories that
|
||||||
|
reside underneath the application base directory.
|
||||||
|
-->
|
||||||
|
<!--
|
||||||
|
<add key="No_PreLoadSQLite" value="1" />
|
||||||
|
-->
|
||||||
|
|
||||||
|
<!--
|
||||||
|
NOTE: If this configuration variable is set [to anything], the new
|
||||||
|
connection string parsing algorithm will not be used. This
|
||||||
|
environment variable is intended for use with legacy code only.
|
||||||
|
-->
|
||||||
|
<!--
|
||||||
|
<add key="No_SQLiteConnectionNewParser" value="1" />
|
||||||
|
-->
|
||||||
|
|
||||||
|
<!--
|
||||||
|
NOTE: If this configuration variable is set [to anything], the initial
|
||||||
|
search for types in all loaded assemblies that are tagged with
|
||||||
|
the SQLiteFunction attribute will be skipped. Normally, this
|
||||||
|
search is conducted only once per application domain by the
|
||||||
|
static constructor of the SQLiteFunction class; however, these
|
||||||
|
implementation details are subject to change.
|
||||||
|
-->
|
||||||
|
<!--
|
||||||
|
<add key="No_SQLiteFunctions" value="1" />
|
||||||
|
-->
|
||||||
|
|
||||||
|
<!--
|
||||||
|
NOTE: If this configuration variable is set [to anything], it will be
|
||||||
|
used instead of the application base directory by the native
|
||||||
|
library pre-loader. This environment variable can be especially
|
||||||
|
useful in ASP.NET and other hosted environments where direct
|
||||||
|
control of the location of the managed assemblies is not under
|
||||||
|
the control of the application.
|
||||||
|
-->
|
||||||
|
<!--
|
||||||
|
<add key="PreLoadSQLite_BaseDirectory" value="" />
|
||||||
|
-->
|
||||||
|
|
||||||
|
<!--
|
||||||
|
NOTE: If this configuration variable is set [to anything], it will be
|
||||||
|
used instead of the processor architecture value contained in the
|
||||||
|
PROCESSOR_ARCHITECTURE environment variable to help build the
|
||||||
|
path of the native library to pre-load.
|
||||||
|
-->
|
||||||
|
<!--
|
||||||
|
<add key="PreLoadSQLite_ProcessorArchitecture" value="x86" />
|
||||||
|
-->
|
||||||
|
|
||||||
|
<!--
|
||||||
|
NOTE: If this environment variable is set [to anything], the native
|
||||||
|
library pre-loading code will skip conducting a search for the
|
||||||
|
native library to pre-load. By default, the search starts in the
|
||||||
|
location of the currently executing assembly (i.e. the assembly
|
||||||
|
containing all the managed components for System.Data.SQLite) and
|
||||||
|
then falls back to the application domain base directory.
|
||||||
|
-->
|
||||||
|
<!--
|
||||||
|
<add key="PreLoadSQLite_NoSearchForDirectory" value="1" />
|
||||||
|
-->
|
||||||
|
|
||||||
|
<!--
|
||||||
|
NOTE: If this configuration variable is set [to anything], the location
|
||||||
|
of the currently executing assembly (i.e. the one containing all
|
||||||
|
the managed components for System.Data.SQLite) will be used as
|
||||||
|
the basis for locating the the native library to pre-load (i.e.
|
||||||
|
instead of using the application domain base directory).
|
||||||
|
-->
|
||||||
|
<!--
|
||||||
|
<add key="PreLoadSQLite_UseAssemblyDirectory" value="1" />
|
||||||
|
-->
|
||||||
|
|
||||||
|
<!--
|
||||||
|
NOTE: This configuration variable is normally set by the operating
|
||||||
|
system itself and should reflect the native processor
|
||||||
|
architecture of the current process (e.g. a 32-bit x86
|
||||||
|
application running on a 64-bit x64 operating system should have
|
||||||
|
the value "x86").
|
||||||
|
-->
|
||||||
|
<!--
|
||||||
|
<add key="PROCESSOR_ARCHITECTURE" value="%PROCESSOR_ARCHITECTURE%" />
|
||||||
|
-->
|
||||||
|
|
||||||
|
<!--
|
||||||
|
NOTE: If this environment variable is set [to anything], all calls to
|
||||||
|
prepare a SQL query will be logged, regardless of the flags for
|
||||||
|
the associated connection.
|
||||||
|
-->
|
||||||
|
<!--
|
||||||
|
<add key="SQLite_ForceLogPrepare" value="1" />
|
||||||
|
-->
|
||||||
|
|
||||||
|
<!--
|
||||||
|
NOTE: If this environment variable is set [to anything], it will be
|
||||||
|
used by the System.Data.SQLite.SQLiteFactory class as the type
|
||||||
|
name containing the System.Data.Common.DbProviderServices
|
||||||
|
implementation that should be used.
|
||||||
|
-->
|
||||||
|
<!--
|
||||||
|
<add key="TypeName_SQLiteProviderServices" value="" />
|
||||||
|
-->
|
||||||
|
|
||||||
|
<!--
|
||||||
|
NOTE: If this environment variable is set [to anything], it will be
|
||||||
|
used by the System.Data.SQLite.SQLiteConvert class as the default
|
||||||
|
DbType value that should be used when a per-connection value is
|
||||||
|
not available.
|
||||||
|
-->
|
||||||
|
<!--
|
||||||
|
<add key="Use_SQLiteConvert_DefaultDbType" value="Object" />
|
||||||
|
-->
|
||||||
|
|
||||||
|
<!--
|
||||||
|
NOTE: If this environment variable is set [to anything], it will be
|
||||||
|
used by the System.Data.SQLite.SQLiteConvert class as the default
|
||||||
|
type name that should be used when a per-connection value is not
|
||||||
|
available.
|
||||||
|
-->
|
||||||
|
<!--
|
||||||
|
<add key="Use_SQLiteConvert_DefaultTypeName" value="" />
|
||||||
|
-->
|
||||||
|
</appSettings>
|
||||||
|
</configuration>
|
3
Bin/Debug/SuperDesign/UserDb/MessageBox.xml
Normal file
3
Bin/Debug/SuperDesign/UserDb/MessageBox.xml
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
<root>
|
||||||
|
<list id="Setting" Title="提示" Content="当前分数规则不属于当前用户直属的部门,但当前用户的兼职部门
适用于当前规则,是否要继续?" Icon="MessageBoxIcon.Warning" Btn="MessageBoxButtons.YesNo" Default_Btn="MessageBoxDefaultButton.Button2" TopMost="0" />
|
||||||
|
</root>
|
BIN
Bin/Debug/SuperDesign/UserDb/MyDb.dat
Normal file
BIN
Bin/Debug/SuperDesign/UserDb/MyDb.dat
Normal file
Binary file not shown.
4
Bin/Debug/SuperDesign/UserDb/Setting.dat
Normal file
4
Bin/Debug/SuperDesign/UserDb/Setting.dat
Normal file
|
@ -0,0 +1,4 @@
|
||||||
|
[open]
|
||||||
|
开发辅助工具.Tools.FrmWebGet=1
|
||||||
|
开发辅助工具.Tools.FrmXpath=1
|
||||||
|
开发辅助工具.Tools.FrmEncode=1
|
Binary file not shown.
BIN
Bin/Debug/SuperDesign/WeifenLuo.WinFormsUI.Docking.dll
Normal file
BIN
Bin/Debug/SuperDesign/WeifenLuo.WinFormsUI.Docking.dll
Normal file
Binary file not shown.
BIN
Bin/Debug/SuperDesign/XPTable.dll
Normal file
BIN
Bin/Debug/SuperDesign/XPTable.dll
Normal file
Binary file not shown.
14840
Bin/Debug/SuperDesign/XPTable.xml
Normal file
14840
Bin/Debug/SuperDesign/XPTable.xml
Normal file
File diff suppressed because it is too large
Load Diff
10
Bin/Debug/SuperDesign/app.config
Normal file
10
Bin/Debug/SuperDesign/app.config
Normal file
|
@ -0,0 +1,10 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<configuration>
|
||||||
|
<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0"/></startup>
|
||||||
|
<runtime>
|
||||||
|
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
|
||||||
|
<probing privatePath="dll;dll\net40\bin;dll\net40\bin\Contrib"/>
|
||||||
|
</assemblyBinding>
|
||||||
|
</runtime>
|
||||||
|
|
||||||
|
</configuration>
|
BIN
Bin/Debug/SuperDesign/ryControls.dll
Normal file
BIN
Bin/Debug/SuperDesign/ryControls.dll
Normal file
Binary file not shown.
BIN
Bin/Debug/SuperDesign/zxing.dll
Normal file
BIN
Bin/Debug/SuperDesign/zxing.dll
Normal file
Binary file not shown.
0
Bin/Debug/SuperDesign/测试.txt
Normal file
0
Bin/Debug/SuperDesign/测试.txt
Normal file
124
Bin/混淆_Debug.nrproj
Normal file
124
Bin/混淆_Debug.nrproj
Normal file
|
@ -0,0 +1,124 @@
|
||||||
|
<Reactor_Project ProjectFormat="2">
|
||||||
|
<Main_Assembly>Debug\SuperDesign\SuperDesign.exe</Main_Assembly>
|
||||||
|
<Assembly>
|
||||||
|
<Filename>Debug\SuperDesign\ryControls.dll</Filename>
|
||||||
|
</Assembly>
|
||||||
|
<Assembly>
|
||||||
|
<Filename>Debug\SuperDesign\MyDb_SQLite.dll</Filename>
|
||||||
|
</Assembly>
|
||||||
|
<Assembly>
|
||||||
|
<Filename>Debug\SuperDesign\MyDb.dll</Filename>
|
||||||
|
</Assembly>
|
||||||
|
<General_Settings>
|
||||||
|
<Automatic_Exception_Handling>true</Automatic_Exception_Handling>
|
||||||
|
<Application_Compression>true</Application_Compression>
|
||||||
|
<Show_Loading_Screen>false</Show_Loading_Screen>
|
||||||
|
<Digital_Certificate_PFX_SPC_File />
|
||||||
|
<Digital_Certificate_PVK_File />
|
||||||
|
<Digital_Certificate_PFX_PVK_Password />
|
||||||
|
<Time_Stamp_URL_SHA1>http://timestamp.verisign.com/scripts/timstamp.dll</Time_Stamp_URL_SHA1>
|
||||||
|
<Time_Stamp_URL_SHA256>http://sha256timestamp.ws.symantec.com/sha256/timestamp</Time_Stamp_URL_SHA256>
|
||||||
|
<Embed_Assemblies>false</Embed_Assemblies>
|
||||||
|
<Enable_Visual_Styles>true</Enable_Visual_Styles>
|
||||||
|
<Force_Admin_Privileges>false</Force_Admin_Privileges>
|
||||||
|
<Merge_Assemblies>false</Merge_Assemblies>
|
||||||
|
<Merge_Assembly_Attributes>true</Merge_Assembly_Attributes>
|
||||||
|
<Project_Targets_Mono_Framework>false</Project_Targets_Mono_Framework>
|
||||||
|
<Strong_Name_KeyPair_File />
|
||||||
|
<Strong_Name_KeyPair_Password />
|
||||||
|
<Target_File><AssemblyLocation>\Secure\<AssemblyFileName></Target_File>
|
||||||
|
<V3_Mode>true</V3_Mode>
|
||||||
|
</General_Settings>
|
||||||
|
<Protection_Settings>
|
||||||
|
<Anti_ILDASM>true</Anti_ILDASM>
|
||||||
|
<Inject_Invalid_Metadata>true</Inject_Invalid_Metadata>
|
||||||
|
<Anti_Tampering>false</Anti_Tampering>
|
||||||
|
<Control_Flow_Obfuscation>false</Control_Flow_Obfuscation>
|
||||||
|
<Control_Flow_Obfuscation_Level>9</Control_Flow_Obfuscation_Level>
|
||||||
|
<Native_EXE_File>true</Native_EXE_File>
|
||||||
|
<Native_EXE_Embed_Pdb>false</Native_EXE_Embed_Pdb>
|
||||||
|
<NecroBit>false</NecroBit>
|
||||||
|
<NecroBit_Reflection_Compatibility_Mode>false</NecroBit_Reflection_Compatibility_Mode>
|
||||||
|
<Obfuscation>true</Obfuscation>
|
||||||
|
<Pruning>false</Pruning>
|
||||||
|
<Create_Mapping_File>false</Create_Mapping_File>
|
||||||
|
<Exclude_Enums>false</Exclude_Enums>
|
||||||
|
<Exclude_Events>false</Exclude_Events>
|
||||||
|
<Exclude_Fields>false</Exclude_Fields>
|
||||||
|
<Exclude_Methods>false</Exclude_Methods>
|
||||||
|
<Exclude_Properties>false</Exclude_Properties>
|
||||||
|
<Exclude_Serializable_Types>false</Exclude_Serializable_Types>
|
||||||
|
<Exclude_Types>false</Exclude_Types>
|
||||||
|
<Exclusion_Rules />
|
||||||
|
<Generate_Short_Strings>false</Generate_Short_Strings>
|
||||||
|
<Ignore_InternalsVisibleTo>false</Ignore_InternalsVisibleTo>
|
||||||
|
<Incremental_Obfuscation>false</Incremental_Obfuscation>
|
||||||
|
<Merge_Namespaces>false</Merge_Namespaces>
|
||||||
|
<Merge_Namespaces_Namespace />
|
||||||
|
<Obfuscate_All_Method_Parameters>false</Obfuscate_All_Method_Parameters>
|
||||||
|
<Obfuscate_Public_Types>false</Obfuscate_Public_Types>
|
||||||
|
<Use_Unprintable_Characters>false</Use_Unprintable_Characters>
|
||||||
|
<Pre-JIT_Methods>false</Pre-JIT_Methods>
|
||||||
|
<Public_Types_Internalization>false</Public_Types_Internalization>
|
||||||
|
<Resource_Encryption_And_Compression>true</Resource_Encryption_And_Compression>
|
||||||
|
<String_Encryption>true</String_Encryption>
|
||||||
|
<String_Encryption_Mode>All</String_Encryption_Mode>
|
||||||
|
<String_Encryption_InclusionExclusion_List />
|
||||||
|
<Strong_Name_Removal_Protection>false</Strong_Name_Removal_Protection>
|
||||||
|
</Protection_Settings>
|
||||||
|
<Lock_Settings>
|
||||||
|
<Expire_When_All_Expired>true</Expire_When_All_Expired>
|
||||||
|
<Inbuilt_Lock_Evaluation_Period_Enabled>false</Inbuilt_Lock_Evaluation_Period_Enabled>
|
||||||
|
<Inbuilt_Lock_Evaluation_Period_Type>Trial_Days</Inbuilt_Lock_Evaluation_Period_Type>
|
||||||
|
<Inbuilt_Lock_Evaluation_Period_Time>14</Inbuilt_Lock_Evaluation_Period_Time>
|
||||||
|
<Inbuilt_Lock_Expiry_Date_Enabled>false</Inbuilt_Lock_Expiry_Date_Enabled>
|
||||||
|
<Inbuilt_Lock_Expiry_Date>20180503</Inbuilt_Lock_Expiry_Date>
|
||||||
|
<Inbuilt_Lock_Number_Of_Uses_Enabled>false</Inbuilt_Lock_Number_Of_Uses_Enabled>
|
||||||
|
<Inbuilt_Lock_Number_Of_Uses>10</Inbuilt_Lock_Number_Of_Uses>
|
||||||
|
<Inbuilt_Lock_Max_Number_Of_Instances_Enabled>false</Inbuilt_Lock_Max_Number_Of_Instances_Enabled>
|
||||||
|
<Inbuilt_Lock_Max_Number_Of_Instances>5</Inbuilt_Lock_Max_Number_Of_Instances>
|
||||||
|
<Run_Another_Process_After_Expiration />
|
||||||
|
<Run_Without_License_File>true</Run_Without_License_File>
|
||||||
|
<Shutdown_Process_After_Expiration>true</Shutdown_Process_After_Expiration>
|
||||||
|
<Static_License_FileName />
|
||||||
|
</Lock_Settings>
|
||||||
|
<Dialog_Settings>
|
||||||
|
<Dialog_Evaluation_Period_Enabled>true</Dialog_Evaluation_Period_Enabled>
|
||||||
|
<Dialog_Evaluation_Period>You are on day [current_minutes_days] of your [max_minutes_days] day evaluation period. Your trial period is expired! You need to purchase a license to run this software.</Dialog_Evaluation_Period>
|
||||||
|
<Dialog_Expiry_Date_Enabled>true</Dialog_Expiry_Date_Enabled>
|
||||||
|
<Dialog_Expiry_Date>Your expiration date is reached! You need to purchase a license file to run this software.</Dialog_Expiry_Date>
|
||||||
|
<Dialog_Number_Of_Uses_Enabled>true</Dialog_Number_Of_Uses_Enabled>
|
||||||
|
<Dialog_Number_Of_Uses>You have used this software [current_uses] times out of a maximum of [max_uses]. You have [uses_left] uses left. Your trial period is expired! You need to purchase a license to run this software.</Dialog_Number_Of_Uses>
|
||||||
|
<Dialog_Max_Number_Of_Instances_Enabled>true</Dialog_Max_Number_Of_Instances_Enabled>
|
||||||
|
<Dialog_Max_Number_Of_Instances>You can only run maximal [max_processes] instances of this software at the same time.</Dialog_Max_Number_Of_Instances>
|
||||||
|
<Dialog_License_Not_Found_Enabled>true</Dialog_License_Not_Found_Enabled>
|
||||||
|
<Dialog_License_Not_Found>This software won't run without a valid license file. Either a valid license file could not be found or your license file is expired.</Dialog_License_Not_Found>
|
||||||
|
<Dialog_Nag_Screen_Enabled>false</Dialog_Nag_Screen_Enabled>
|
||||||
|
<Dialog_Nag_Screen>Nag Screen! This message will disappear when a valid license file is installed. You are on day [current_minutes_days] of your [max_minutes_days] day evaluation period. You have [minutes_days_left] days left. You have used this software [current_uses] times out of a maximum of [max_uses]. You have [uses_left] uses left.</Dialog_Nag_Screen>
|
||||||
|
<Dialog_Nag_Screen_XDays>-1</Dialog_Nag_Screen_XDays>
|
||||||
|
<Dialog_Box_Interface />
|
||||||
|
<Dialog_Caption>Lock System</Dialog_Caption>
|
||||||
|
<Color_Gradient_Begin>255255255</Color_Gradient_Begin>
|
||||||
|
<Color_Gradient_End>157211252</Color_Gradient_End>
|
||||||
|
</Dialog_Settings>
|
||||||
|
<License_Manager_Settings>
|
||||||
|
<Individual_Licensing_Bahvior>false</Individual_Licensing_Bahvior>
|
||||||
|
<License_Evaluation_Enabled>false</License_Evaluation_Enabled>
|
||||||
|
<License_Evaluation_Type>Trial_Days</License_Evaluation_Type>
|
||||||
|
<License_Evaluation_Time>1</License_Evaluation_Time>
|
||||||
|
<License_Expiry_Date_Enabled>false</License_Expiry_Date_Enabled>
|
||||||
|
<License_Expiry_Date>20180503</License_Expiry_Date>
|
||||||
|
<License_Hardware_Lock_Enabled>false</License_Hardware_Lock_Enabled>
|
||||||
|
<License_Hardware_BOARD>true</License_Hardware_BOARD>
|
||||||
|
<License_Hardware_CPU>true</License_Hardware_CPU>
|
||||||
|
<License_Hardware_HDD>false</License_Hardware_HDD>
|
||||||
|
<License_Hardware_MAC>true</License_Hardware_MAC>
|
||||||
|
<License_Hardware_ID>####-####-####-####-####</License_Hardware_ID>
|
||||||
|
<License_Number_Of_Uses_Enabled>false</License_Number_Of_Uses_Enabled>
|
||||||
|
<License_Number_Of_Uses>10</License_Number_Of_Uses>
|
||||||
|
<License_Number_Of_Instances_Enabled>false</License_Number_Of_Instances_Enabled>
|
||||||
|
<License_Number_Of_Instances>5</License_Number_Of_Instances>
|
||||||
|
<AdditonalLicenseInformation />
|
||||||
|
<MasterKey>Hr7YPNVEOuGLGJrWzxt2hKWI0xXn4h31i5nGAghNonQ=|<RSAKeyValue><Modulus>twxUWoRvbb2N6CMXQL36TBij9G7nxvU6rTULmVnbS1jYTvPQSKohB2o95vJvdlxjw7KBxYhIFqj9yEn5xvD4GVhj8+MEvG4lNqN1e1FErGin9YYYr4dTZHFe73aG5xxoscKZIg3YYdoBp0lgE2xwfaHyYe03M3mbhQx6axyf7Ak=</Modulus><Exponent>AQAB</Exponent><P>6OP29NbAV7sOKvOFRIeBbnJLh4fOiAjGtqiBlHLyOHt6w1s8N4o4Kr3N2KPVcpj82655KRzRlVDkwQika4eZ9w==</P><Q>yTY83K4a/WpcifMvuAFEuM9wVfXtbQUpV0MSSNgCmWcd6G3+GYShmPUW1gWMv+4H59iiPef1pnXvuzPYnQMp/w==</Q><DP>J/h4Oi1hda01EUoaZVicbkhPjkNQvyhCcrcZBlF0IR2QRFc0TpP6b9uDqNr1l2WKgGnBgbzge7AWksrY7VuooQ==</DP><DQ>PtmhQzFjHts1UqXStwA2bh/lsAQkiJQ/KJG7yWMn1LEAB5Ur9N6X94Y+/tU29NCuSX5Cl2G4OqnGG0yDke/mEw==</DQ><InverseQ>jiKqvwfWSUpKybcT3ucAedpT+kKuB/Qs1xJ0Z6bYOE8EsljxGbq8428Cma5rp33WMP6ybq2HwOddm/73ZFZZKQ==</InverseQ><D>bYP46/cUW8nvHxXvkZKYL/MGFPZNwaFyq7Jy8BrssxXCxOnmkbMH89HCm2ws99mq7qjcL3yr9LLCs5Re1oHRTQT2Vu2hXuGAGVjvHwYPLWGvcYvIuTWoTEw79m+lh/7CYDxfwzwWL095a8D40OvfHauk7xrXDB+qIsEJ7Gkjh0k=</D></RSAKeyValue></MasterKey>
|
||||||
|
</License_Manager_Settings>
|
||||||
|
</Reactor_Project>
|
124
Bin/混淆_Release.nrproj
Normal file
124
Bin/混淆_Release.nrproj
Normal file
|
@ -0,0 +1,124 @@
|
||||||
|
<Reactor_Project ProjectFormat="2">
|
||||||
|
<Main_Assembly>Release\SuperDesign\SuperDesign.exe</Main_Assembly>
|
||||||
|
<Assembly>
|
||||||
|
<Filename>Release\SuperDesign\ryControls.dll</Filename>
|
||||||
|
</Assembly>
|
||||||
|
<Assembly>
|
||||||
|
<Filename>Release\SuperDesign\MyDb_SQLite.dll</Filename>
|
||||||
|
</Assembly>
|
||||||
|
<Assembly>
|
||||||
|
<Filename>Release\SuperDesign\MyDb.dll</Filename>
|
||||||
|
</Assembly>
|
||||||
|
<General_Settings>
|
||||||
|
<Automatic_Exception_Handling>true</Automatic_Exception_Handling>
|
||||||
|
<Application_Compression>true</Application_Compression>
|
||||||
|
<Show_Loading_Screen>false</Show_Loading_Screen>
|
||||||
|
<Digital_Certificate_PFX_SPC_File />
|
||||||
|
<Digital_Certificate_PVK_File />
|
||||||
|
<Digital_Certificate_PFX_PVK_Password />
|
||||||
|
<Time_Stamp_URL_SHA1>http://timestamp.verisign.com/scripts/timstamp.dll</Time_Stamp_URL_SHA1>
|
||||||
|
<Time_Stamp_URL_SHA256>http://sha256timestamp.ws.symantec.com/sha256/timestamp</Time_Stamp_URL_SHA256>
|
||||||
|
<Embed_Assemblies>false</Embed_Assemblies>
|
||||||
|
<Enable_Visual_Styles>true</Enable_Visual_Styles>
|
||||||
|
<Force_Admin_Privileges>false</Force_Admin_Privileges>
|
||||||
|
<Merge_Assemblies>false</Merge_Assemblies>
|
||||||
|
<Merge_Assembly_Attributes>true</Merge_Assembly_Attributes>
|
||||||
|
<Project_Targets_Mono_Framework>false</Project_Targets_Mono_Framework>
|
||||||
|
<Strong_Name_KeyPair_File />
|
||||||
|
<Strong_Name_KeyPair_Password />
|
||||||
|
<Target_File><AssemblyLocation>\Secure\<AssemblyFileName></Target_File>
|
||||||
|
<V3_Mode>true</V3_Mode>
|
||||||
|
</General_Settings>
|
||||||
|
<Protection_Settings>
|
||||||
|
<Anti_ILDASM>true</Anti_ILDASM>
|
||||||
|
<Inject_Invalid_Metadata>true</Inject_Invalid_Metadata>
|
||||||
|
<Anti_Tampering>false</Anti_Tampering>
|
||||||
|
<Control_Flow_Obfuscation>false</Control_Flow_Obfuscation>
|
||||||
|
<Control_Flow_Obfuscation_Level>9</Control_Flow_Obfuscation_Level>
|
||||||
|
<Native_EXE_File>true</Native_EXE_File>
|
||||||
|
<Native_EXE_Embed_Pdb>false</Native_EXE_Embed_Pdb>
|
||||||
|
<NecroBit>false</NecroBit>
|
||||||
|
<NecroBit_Reflection_Compatibility_Mode>false</NecroBit_Reflection_Compatibility_Mode>
|
||||||
|
<Obfuscation>true</Obfuscation>
|
||||||
|
<Pruning>false</Pruning>
|
||||||
|
<Create_Mapping_File>false</Create_Mapping_File>
|
||||||
|
<Exclude_Enums>false</Exclude_Enums>
|
||||||
|
<Exclude_Events>false</Exclude_Events>
|
||||||
|
<Exclude_Fields>false</Exclude_Fields>
|
||||||
|
<Exclude_Methods>false</Exclude_Methods>
|
||||||
|
<Exclude_Properties>false</Exclude_Properties>
|
||||||
|
<Exclude_Serializable_Types>false</Exclude_Serializable_Types>
|
||||||
|
<Exclude_Types>false</Exclude_Types>
|
||||||
|
<Exclusion_Rules />
|
||||||
|
<Generate_Short_Strings>false</Generate_Short_Strings>
|
||||||
|
<Ignore_InternalsVisibleTo>false</Ignore_InternalsVisibleTo>
|
||||||
|
<Incremental_Obfuscation>false</Incremental_Obfuscation>
|
||||||
|
<Merge_Namespaces>false</Merge_Namespaces>
|
||||||
|
<Merge_Namespaces_Namespace />
|
||||||
|
<Obfuscate_All_Method_Parameters>false</Obfuscate_All_Method_Parameters>
|
||||||
|
<Obfuscate_Public_Types>false</Obfuscate_Public_Types>
|
||||||
|
<Use_Unprintable_Characters>false</Use_Unprintable_Characters>
|
||||||
|
<Pre-JIT_Methods>false</Pre-JIT_Methods>
|
||||||
|
<Public_Types_Internalization>false</Public_Types_Internalization>
|
||||||
|
<Resource_Encryption_And_Compression>true</Resource_Encryption_And_Compression>
|
||||||
|
<String_Encryption>true</String_Encryption>
|
||||||
|
<String_Encryption_Mode>All</String_Encryption_Mode>
|
||||||
|
<String_Encryption_InclusionExclusion_List />
|
||||||
|
<Strong_Name_Removal_Protection>false</Strong_Name_Removal_Protection>
|
||||||
|
</Protection_Settings>
|
||||||
|
<Lock_Settings>
|
||||||
|
<Expire_When_All_Expired>true</Expire_When_All_Expired>
|
||||||
|
<Inbuilt_Lock_Evaluation_Period_Enabled>false</Inbuilt_Lock_Evaluation_Period_Enabled>
|
||||||
|
<Inbuilt_Lock_Evaluation_Period_Type>Trial_Days</Inbuilt_Lock_Evaluation_Period_Type>
|
||||||
|
<Inbuilt_Lock_Evaluation_Period_Time>14</Inbuilt_Lock_Evaluation_Period_Time>
|
||||||
|
<Inbuilt_Lock_Expiry_Date_Enabled>false</Inbuilt_Lock_Expiry_Date_Enabled>
|
||||||
|
<Inbuilt_Lock_Expiry_Date>20180503</Inbuilt_Lock_Expiry_Date>
|
||||||
|
<Inbuilt_Lock_Number_Of_Uses_Enabled>false</Inbuilt_Lock_Number_Of_Uses_Enabled>
|
||||||
|
<Inbuilt_Lock_Number_Of_Uses>10</Inbuilt_Lock_Number_Of_Uses>
|
||||||
|
<Inbuilt_Lock_Max_Number_Of_Instances_Enabled>false</Inbuilt_Lock_Max_Number_Of_Instances_Enabled>
|
||||||
|
<Inbuilt_Lock_Max_Number_Of_Instances>5</Inbuilt_Lock_Max_Number_Of_Instances>
|
||||||
|
<Run_Another_Process_After_Expiration />
|
||||||
|
<Run_Without_License_File>true</Run_Without_License_File>
|
||||||
|
<Shutdown_Process_After_Expiration>true</Shutdown_Process_After_Expiration>
|
||||||
|
<Static_License_FileName />
|
||||||
|
</Lock_Settings>
|
||||||
|
<Dialog_Settings>
|
||||||
|
<Dialog_Evaluation_Period_Enabled>true</Dialog_Evaluation_Period_Enabled>
|
||||||
|
<Dialog_Evaluation_Period>You are on day [current_minutes_days] of your [max_minutes_days] day evaluation period. Your trial period is expired! You need to purchase a license to run this software.</Dialog_Evaluation_Period>
|
||||||
|
<Dialog_Expiry_Date_Enabled>true</Dialog_Expiry_Date_Enabled>
|
||||||
|
<Dialog_Expiry_Date>Your expiration date is reached! You need to purchase a license file to run this software.</Dialog_Expiry_Date>
|
||||||
|
<Dialog_Number_Of_Uses_Enabled>true</Dialog_Number_Of_Uses_Enabled>
|
||||||
|
<Dialog_Number_Of_Uses>You have used this software [current_uses] times out of a maximum of [max_uses]. You have [uses_left] uses left. Your trial period is expired! You need to purchase a license to run this software.</Dialog_Number_Of_Uses>
|
||||||
|
<Dialog_Max_Number_Of_Instances_Enabled>true</Dialog_Max_Number_Of_Instances_Enabled>
|
||||||
|
<Dialog_Max_Number_Of_Instances>You can only run maximal [max_processes] instances of this software at the same time.</Dialog_Max_Number_Of_Instances>
|
||||||
|
<Dialog_License_Not_Found_Enabled>true</Dialog_License_Not_Found_Enabled>
|
||||||
|
<Dialog_License_Not_Found>This software won't run without a valid license file. Either a valid license file could not be found or your license file is expired.</Dialog_License_Not_Found>
|
||||||
|
<Dialog_Nag_Screen_Enabled>false</Dialog_Nag_Screen_Enabled>
|
||||||
|
<Dialog_Nag_Screen>Nag Screen! This message will disappear when a valid license file is installed. You are on day [current_minutes_days] of your [max_minutes_days] day evaluation period. You have [minutes_days_left] days left. You have used this software [current_uses] times out of a maximum of [max_uses]. You have [uses_left] uses left.</Dialog_Nag_Screen>
|
||||||
|
<Dialog_Nag_Screen_XDays>-1</Dialog_Nag_Screen_XDays>
|
||||||
|
<Dialog_Box_Interface />
|
||||||
|
<Dialog_Caption>Lock System</Dialog_Caption>
|
||||||
|
<Color_Gradient_Begin>255255255</Color_Gradient_Begin>
|
||||||
|
<Color_Gradient_End>157211252</Color_Gradient_End>
|
||||||
|
</Dialog_Settings>
|
||||||
|
<License_Manager_Settings>
|
||||||
|
<Individual_Licensing_Bahvior>false</Individual_Licensing_Bahvior>
|
||||||
|
<License_Evaluation_Enabled>false</License_Evaluation_Enabled>
|
||||||
|
<License_Evaluation_Type>Trial_Days</License_Evaluation_Type>
|
||||||
|
<License_Evaluation_Time>1</License_Evaluation_Time>
|
||||||
|
<License_Expiry_Date_Enabled>false</License_Expiry_Date_Enabled>
|
||||||
|
<License_Expiry_Date>20180503</License_Expiry_Date>
|
||||||
|
<License_Hardware_Lock_Enabled>false</License_Hardware_Lock_Enabled>
|
||||||
|
<License_Hardware_BOARD>true</License_Hardware_BOARD>
|
||||||
|
<License_Hardware_CPU>true</License_Hardware_CPU>
|
||||||
|
<License_Hardware_HDD>false</License_Hardware_HDD>
|
||||||
|
<License_Hardware_MAC>true</License_Hardware_MAC>
|
||||||
|
<License_Hardware_ID>####-####-####-####-####</License_Hardware_ID>
|
||||||
|
<License_Number_Of_Uses_Enabled>false</License_Number_Of_Uses_Enabled>
|
||||||
|
<License_Number_Of_Uses>10</License_Number_Of_Uses>
|
||||||
|
<License_Number_Of_Instances_Enabled>false</License_Number_Of_Instances_Enabled>
|
||||||
|
<License_Number_Of_Instances>5</License_Number_Of_Instances>
|
||||||
|
<AdditonalLicenseInformation />
|
||||||
|
<MasterKey>Hr7YPNVEOuGLGJrWzxt2hKWI0xXn4h31i5nGAghNonQ=|<RSAKeyValue><Modulus>twxUWoRvbb2N6CMXQL36TBij9G7nxvU6rTULmVnbS1jYTvPQSKohB2o95vJvdlxjw7KBxYhIFqj9yEn5xvD4GVhj8+MEvG4lNqN1e1FErGin9YYYr4dTZHFe73aG5xxoscKZIg3YYdoBp0lgE2xwfaHyYe03M3mbhQx6axyf7Ak=</Modulus><Exponent>AQAB</Exponent><P>6OP29NbAV7sOKvOFRIeBbnJLh4fOiAjGtqiBlHLyOHt6w1s8N4o4Kr3N2KPVcpj82655KRzRlVDkwQika4eZ9w==</P><Q>yTY83K4a/WpcifMvuAFEuM9wVfXtbQUpV0MSSNgCmWcd6G3+GYShmPUW1gWMv+4H59iiPef1pnXvuzPYnQMp/w==</Q><DP>J/h4Oi1hda01EUoaZVicbkhPjkNQvyhCcrcZBlF0IR2QRFc0TpP6b9uDqNr1l2WKgGnBgbzge7AWksrY7VuooQ==</DP><DQ>PtmhQzFjHts1UqXStwA2bh/lsAQkiJQ/KJG7yWMn1LEAB5Ur9N6X94Y+/tU29NCuSX5Cl2G4OqnGG0yDke/mEw==</DQ><InverseQ>jiKqvwfWSUpKybcT3ucAedpT+kKuB/Qs1xJ0Z6bYOE8EsljxGbq8428Cma5rp33WMP6ybq2HwOddm/73ZFZZKQ==</InverseQ><D>bYP46/cUW8nvHxXvkZKYL/MGFPZNwaFyq7Jy8BrssxXCxOnmkbMH89HCm2ws99mq7qjcL3yr9LLCs5Re1oHRTQT2Vu2hXuGAGVjvHwYPLWGvcYvIuTWoTEw79m+lh/7CYDxfwzwWL095a8D40OvfHauk7xrXDB+qIsEJ7Gkjh0k=</D></RSAKeyValue></MasterKey>
|
||||||
|
</License_Manager_Settings>
|
||||||
|
</Reactor_Project>
|
24
CHANGELOG.md
Normal file
24
CHANGELOG.md
Normal file
|
@ -0,0 +1,24 @@
|
||||||
|
### 2020-11-28更新
|
||||||
|
------
|
||||||
|
#### SuperDesign V2.0.2011.2801
|
||||||
|
*.[改进]更新日志和自述文件名更符合git备份规范。
|
||||||
|
|
||||||
|
------
|
||||||
|
### 2019-12-13更新
|
||||||
|
------
|
||||||
|
#### SupperDesign V2.0.1911.2801
|
||||||
|
暂无
|
||||||
|
|
||||||
|
------
|
||||||
|
### 2019-09-19更新
|
||||||
|
------
|
||||||
|
#### SupperDesign V2.0.1909.1901
|
||||||
|
*.[新增]支持多项目。
|
||||||
|
|
||||||
|
*.[新增]支持文件关联。
|
||||||
|
|
||||||
|
*.[新增]新版一键打包功能,支持一键复制打包好的文件到历史版本区域。
|
||||||
|
|
||||||
|
*.[新增]支持快速创建毕方标准文件夹。
|
||||||
|
|
||||||
|
*.[改进]其它一些细节改进。
|
15
README.md
Normal file
15
README.md
Normal file
|
@ -0,0 +1,15 @@
|
||||||
|
# 开发辅助工具
|
||||||
|
|
||||||
|
#### 介绍
|
||||||
|
开发辅助工具是一款专为开发人员设计的工具,内置了多种开发人员常见工具。
|
||||||
|
- 支持各种编码解码
|
||||||
|
- 支持时间戳转换
|
||||||
|
- 更好用的网页抓取工具。
|
||||||
|
- XPath测试工具
|
||||||
|
- 正则表达式测试工具。
|
||||||
|
- 字符串转代码工具
|
||||||
|
- Json格式化工具
|
||||||
|
- 二维码生成与解析工具
|
||||||
|
- 字符串统计工具
|
||||||
|
- 颜色转换工具
|
||||||
|
- 毕方架构解析和辅助工具。
|
BIN
Source/.vs/开发辅助工具/DesignTimeBuild/.dtbcache
Normal file
BIN
Source/.vs/开发辅助工具/DesignTimeBuild/.dtbcache
Normal file
Binary file not shown.
BIN
Source/.vs/开发辅助工具/v15/.suo
Normal file
BIN
Source/.vs/开发辅助工具/v15/.suo
Normal file
Binary file not shown.
0
Source/.vs/开发辅助工具/v15/Server/sqlite3/db.lock
Normal file
0
Source/.vs/开发辅助工具/v15/Server/sqlite3/db.lock
Normal file
BIN
Source/.vs/开发辅助工具/v15/Server/sqlite3/storage.ide
Normal file
BIN
Source/.vs/开发辅助工具/v15/Server/sqlite3/storage.ide
Normal file
Binary file not shown.
BIN
Source/.vs/开发辅助工具/v15/Server/sqlite3/storage.ide-shm
Normal file
BIN
Source/.vs/开发辅助工具/v15/Server/sqlite3/storage.ide-shm
Normal file
Binary file not shown.
BIN
Source/.vs/开发辅助工具/v15/Server/sqlite3/storage.ide-wal
Normal file
BIN
Source/.vs/开发辅助工具/v15/Server/sqlite3/storage.ide-wal
Normal file
Binary file not shown.
BIN
Source/.vs/开发辅助工具/v16/.suo
Normal file
BIN
Source/.vs/开发辅助工具/v16/.suo
Normal file
Binary file not shown.
0
Source/.vs/开发辅助工具/v16/Server/sqlite3/db.lock
Normal file
0
Source/.vs/开发辅助工具/v16/Server/sqlite3/db.lock
Normal file
BIN
Source/.vs/开发辅助工具/v16/Server/sqlite3/storage.ide
Normal file
BIN
Source/.vs/开发辅助工具/v16/Server/sqlite3/storage.ide
Normal file
Binary file not shown.
25
Source/开发辅助工具.sln
Normal file
25
Source/开发辅助工具.sln
Normal file
|
@ -0,0 +1,25 @@
|
||||||
|
|
||||||
|
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||||
|
# Visual Studio Version 16
|
||||||
|
VisualStudioVersion = 16.0.30717.126
|
||||||
|
MinimumVisualStudioVersion = 10.0.40219.1
|
||||||
|
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SuperDesign", "开发辅助工具\SuperDesign.csproj", "{8177CFD1-097C-4D4E-919D-8B519289496E}"
|
||||||
|
EndProject
|
||||||
|
Global
|
||||||
|
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||||
|
Debug|Any CPU = Debug|Any CPU
|
||||||
|
Release|Any CPU = Release|Any CPU
|
||||||
|
EndGlobalSection
|
||||||
|
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||||
|
{8177CFD1-097C-4D4E-919D-8B519289496E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
|
{8177CFD1-097C-4D4E-919D-8B519289496E}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
|
{8177CFD1-097C-4D4E-919D-8B519289496E}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
|
{8177CFD1-097C-4D4E-919D-8B519289496E}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
|
EndGlobalSection
|
||||||
|
GlobalSection(SolutionProperties) = preSolution
|
||||||
|
HideSolutionNode = FALSE
|
||||||
|
EndGlobalSection
|
||||||
|
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||||
|
SolutionGuid = {E0BE1590-8E11-4498-84CF-0D53B57B720C}
|
||||||
|
EndGlobalSection
|
||||||
|
EndGlobal
|
42
Source/开发辅助工具/Controls/ContextMenuStripHighlightText.Designer.cs
generated
Normal file
42
Source/开发辅助工具/Controls/ContextMenuStripHighlightText.Designer.cs
generated
Normal file
|
@ -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
|
||||||
|
}
|
||||||
|
}
|
142
Source/开发辅助工具/Controls/ContextMenuStripHighlightText.cs
Normal file
142
Source/开发辅助工具/Controls/ContextMenuStripHighlightText.cs
Normal file
|
@ -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;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
123
Source/开发辅助工具/Controls/ContextMenuStripHighlightText.resx
Normal file
123
Source/开发辅助工具/Controls/ContextMenuStripHighlightText.resx
Normal file
|
@ -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>
|
42
Source/开发辅助工具/Controls/ContextMenuStripRichText.Designer.cs
generated
Normal file
42
Source/开发辅助工具/Controls/ContextMenuStripRichText.Designer.cs
generated
Normal file
|
@ -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
|
||||||
|
}
|
||||||
|
}
|
118
Source/开发辅助工具/Controls/ContextMenuStripRichText.cs
Normal file
118
Source/开发辅助工具/Controls/ContextMenuStripRichText.cs
Normal file
|
@ -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;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
123
Source/开发辅助工具/Controls/ContextMenuStripRichText.resx
Normal file
123
Source/开发辅助工具/Controls/ContextMenuStripRichText.resx
Normal file
|
@ -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>
|
520
Source/开发辅助工具/Controls/FindAndReplaceForm.cs
Normal file
520
Source/开发辅助工具/Controls/FindAndReplaceForm.cs
Normal file
|
@ -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(); } }
|
||||||
|
}
|
||||||
|
}
|
235
Source/开发辅助工具/Controls/FindAndReplaceForm.designer.cs
generated
Normal file
235
Source/开发辅助工具/Controls/FindAndReplaceForm.designer.cs
generated
Normal file
|
@ -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;
|
||||||
|
}
|
||||||
|
}
|
120
Source/开发辅助工具/Controls/FindAndReplaceForm.resx
Normal file
120
Source/开发辅助工具/Controls/FindAndReplaceForm.resx
Normal file
|
@ -0,0 +1,120 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<root>
|
||||||
|
<!--
|
||||||
|
Microsoft ResX Schema
|
||||||
|
|
||||||
|
Version 2.0
|
||||||
|
|
||||||
|
The primary goals of this format is to allow a simple XML format
|
||||||
|
that is mostly human readable. The generation and parsing of the
|
||||||
|
various data types are done through the TypeConverter classes
|
||||||
|
associated with the data types.
|
||||||
|
|
||||||
|
Example:
|
||||||
|
|
||||||
|
... ado.net/XML headers & schema ...
|
||||||
|
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||||
|
<resheader name="version">2.0</resheader>
|
||||||
|
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||||
|
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||||
|
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||||
|
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||||
|
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||||
|
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||||
|
</data>
|
||||||
|
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||||
|
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||||
|
<comment>This is a comment</comment>
|
||||||
|
</data>
|
||||||
|
|
||||||
|
There are any number of "resheader" rows that contain simple
|
||||||
|
name/value pairs.
|
||||||
|
|
||||||
|
Each data row contains a name, and value. The row also contains a
|
||||||
|
type or mimetype. Type corresponds to a .NET class that support
|
||||||
|
text/value conversion through the TypeConverter architecture.
|
||||||
|
Classes that don't support this are serialized and stored with the
|
||||||
|
mimetype set.
|
||||||
|
|
||||||
|
The mimetype is used for serialized objects, and tells the
|
||||||
|
ResXResourceReader how to depersist the object. This is currently not
|
||||||
|
extensible. For a given mimetype the value must be set accordingly:
|
||||||
|
|
||||||
|
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||||
|
that the ResXResourceWriter will generate, however the reader can
|
||||||
|
read any of the formats listed below.
|
||||||
|
|
||||||
|
mimetype: application/x-microsoft.net.object.binary.base64
|
||||||
|
value : The object must be serialized with
|
||||||
|
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||||
|
: and then encoded with base64 encoding.
|
||||||
|
|
||||||
|
mimetype: application/x-microsoft.net.object.soap.base64
|
||||||
|
value : The object must be serialized with
|
||||||
|
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||||
|
: and then encoded with base64 encoding.
|
||||||
|
|
||||||
|
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||||
|
value : The object must be serialized into a byte array
|
||||||
|
: using a System.ComponentModel.TypeConverter
|
||||||
|
: and then encoded with base64 encoding.
|
||||||
|
-->
|
||||||
|
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||||
|
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||||
|
<xsd:element name="root" msdata:IsDataSet="true">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:choice maxOccurs="unbounded">
|
||||||
|
<xsd:element name="metadata">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||||
|
<xsd:attribute name="type" type="xsd:string" />
|
||||||
|
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||||
|
<xsd:attribute ref="xml:space" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
<xsd:element name="assembly">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:attribute name="alias" type="xsd:string" />
|
||||||
|
<xsd:attribute name="name" type="xsd:string" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
<xsd:element name="data">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||||
|
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||||
|
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||||
|
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||||
|
<xsd:attribute ref="xml:space" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
<xsd:element name="resheader">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
</xsd:choice>
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
</xsd:schema>
|
||||||
|
<resheader name="resmimetype">
|
||||||
|
<value>text/microsoft-resx</value>
|
||||||
|
</resheader>
|
||||||
|
<resheader name="version">
|
||||||
|
<value>2.0</value>
|
||||||
|
</resheader>
|
||||||
|
<resheader name="reader">
|
||||||
|
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
|
</resheader>
|
||||||
|
<resheader name="writer">
|
||||||
|
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
|
</resheader>
|
||||||
|
</root>
|
78
Source/开发辅助工具/Controls/FrmInsertUnixTime.Designer.cs
generated
Normal file
78
Source/开发辅助工具/Controls/FrmInsertUnixTime.Designer.cs
generated
Normal file
|
@ -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;
|
||||||
|
}
|
||||||
|
}
|
24
Source/开发辅助工具/Controls/FrmInsertUnixTime.cs
Normal file
24
Source/开发辅助工具/Controls/FrmInsertUnixTime.cs
Normal file
|
@ -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;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
120
Source/开发辅助工具/Controls/FrmInsertUnixTime.resx
Normal file
120
Source/开发辅助工具/Controls/FrmInsertUnixTime.resx
Normal file
|
@ -0,0 +1,120 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<root>
|
||||||
|
<!--
|
||||||
|
Microsoft ResX Schema
|
||||||
|
|
||||||
|
Version 2.0
|
||||||
|
|
||||||
|
The primary goals of this format is to allow a simple XML format
|
||||||
|
that is mostly human readable. The generation and parsing of the
|
||||||
|
various data types are done through the TypeConverter classes
|
||||||
|
associated with the data types.
|
||||||
|
|
||||||
|
Example:
|
||||||
|
|
||||||
|
... ado.net/XML headers & schema ...
|
||||||
|
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||||
|
<resheader name="version">2.0</resheader>
|
||||||
|
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||||
|
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||||
|
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||||
|
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||||
|
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||||
|
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||||
|
</data>
|
||||||
|
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||||
|
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||||
|
<comment>This is a comment</comment>
|
||||||
|
</data>
|
||||||
|
|
||||||
|
There are any number of "resheader" rows that contain simple
|
||||||
|
name/value pairs.
|
||||||
|
|
||||||
|
Each data row contains a name, and value. The row also contains a
|
||||||
|
type or mimetype. Type corresponds to a .NET class that support
|
||||||
|
text/value conversion through the TypeConverter architecture.
|
||||||
|
Classes that don't support this are serialized and stored with the
|
||||||
|
mimetype set.
|
||||||
|
|
||||||
|
The mimetype is used for serialized objects, and tells the
|
||||||
|
ResXResourceReader how to depersist the object. This is currently not
|
||||||
|
extensible. For a given mimetype the value must be set accordingly:
|
||||||
|
|
||||||
|
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||||
|
that the ResXResourceWriter will generate, however the reader can
|
||||||
|
read any of the formats listed below.
|
||||||
|
|
||||||
|
mimetype: application/x-microsoft.net.object.binary.base64
|
||||||
|
value : The object must be serialized with
|
||||||
|
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||||
|
: and then encoded with base64 encoding.
|
||||||
|
|
||||||
|
mimetype: application/x-microsoft.net.object.soap.base64
|
||||||
|
value : The object must be serialized with
|
||||||
|
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||||
|
: and then encoded with base64 encoding.
|
||||||
|
|
||||||
|
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||||
|
value : The object must be serialized into a byte array
|
||||||
|
: using a System.ComponentModel.TypeConverter
|
||||||
|
: and then encoded with base64 encoding.
|
||||||
|
-->
|
||||||
|
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||||
|
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||||
|
<xsd:element name="root" msdata:IsDataSet="true">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:choice maxOccurs="unbounded">
|
||||||
|
<xsd:element name="metadata">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||||
|
<xsd:attribute name="type" type="xsd:string" />
|
||||||
|
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||||
|
<xsd:attribute ref="xml:space" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
<xsd:element name="assembly">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:attribute name="alias" type="xsd:string" />
|
||||||
|
<xsd:attribute name="name" type="xsd:string" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
<xsd:element name="data">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||||
|
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||||
|
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||||
|
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||||
|
<xsd:attribute ref="xml:space" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
<xsd:element name="resheader">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
</xsd:choice>
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
</xsd:schema>
|
||||||
|
<resheader name="resmimetype">
|
||||||
|
<value>text/microsoft-resx</value>
|
||||||
|
</resheader>
|
||||||
|
<resheader name="version">
|
||||||
|
<value>2.0</value>
|
||||||
|
</resheader>
|
||||||
|
<resheader name="reader">
|
||||||
|
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
|
</resheader>
|
||||||
|
<resheader name="writer">
|
||||||
|
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
|
</resheader>
|
||||||
|
</root>
|
103
Source/开发辅助工具/Controls/FrmText.Designer.cs
generated
Normal file
103
Source/开发辅助工具/Controls/FrmText.Designer.cs
generated
Normal 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;
|
||||||
|
}
|
||||||
|
}
|
24
Source/开发辅助工具/Controls/FrmText.cs
Normal file
24
Source/开发辅助工具/Controls/FrmText.cs
Normal file
|
@ -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;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
123
Source/开发辅助工具/Controls/FrmText.resx
Normal file
123
Source/开发辅助工具/Controls/FrmText.resx
Normal file
|
@ -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
Source/开发辅助工具/Controls/FrmTitle.Designer.cs
generated
Normal file
91
Source/开发辅助工具/Controls/FrmTitle.Designer.cs
generated
Normal 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;
|
||||||
|
}
|
||||||
|
}
|
29
Source/开发辅助工具/Controls/FrmTitle.cs
Normal file
29
Source/开发辅助工具/Controls/FrmTitle.cs
Normal file
|
@ -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;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
120
Source/开发辅助工具/Controls/FrmTitle.resx
Normal file
120
Source/开发辅助工具/Controls/FrmTitle.resx
Normal file
|
@ -0,0 +1,120 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<root>
|
||||||
|
<!--
|
||||||
|
Microsoft ResX Schema
|
||||||
|
|
||||||
|
Version 2.0
|
||||||
|
|
||||||
|
The primary goals of this format is to allow a simple XML format
|
||||||
|
that is mostly human readable. The generation and parsing of the
|
||||||
|
various data types are done through the TypeConverter classes
|
||||||
|
associated with the data types.
|
||||||
|
|
||||||
|
Example:
|
||||||
|
|
||||||
|
... ado.net/XML headers & schema ...
|
||||||
|
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||||
|
<resheader name="version">2.0</resheader>
|
||||||
|
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||||
|
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||||
|
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||||
|
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||||
|
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||||
|
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||||
|
</data>
|
||||||
|
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||||
|
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||||
|
<comment>This is a comment</comment>
|
||||||
|
</data>
|
||||||
|
|
||||||
|
There are any number of "resheader" rows that contain simple
|
||||||
|
name/value pairs.
|
||||||
|
|
||||||
|
Each data row contains a name, and value. The row also contains a
|
||||||
|
type or mimetype. Type corresponds to a .NET class that support
|
||||||
|
text/value conversion through the TypeConverter architecture.
|
||||||
|
Classes that don't support this are serialized and stored with the
|
||||||
|
mimetype set.
|
||||||
|
|
||||||
|
The mimetype is used for serialized objects, and tells the
|
||||||
|
ResXResourceReader how to depersist the object. This is currently not
|
||||||
|
extensible. For a given mimetype the value must be set accordingly:
|
||||||
|
|
||||||
|
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||||
|
that the ResXResourceWriter will generate, however the reader can
|
||||||
|
read any of the formats listed below.
|
||||||
|
|
||||||
|
mimetype: application/x-microsoft.net.object.binary.base64
|
||||||
|
value : The object must be serialized with
|
||||||
|
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||||
|
: and then encoded with base64 encoding.
|
||||||
|
|
||||||
|
mimetype: application/x-microsoft.net.object.soap.base64
|
||||||
|
value : The object must be serialized with
|
||||||
|
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||||
|
: and then encoded with base64 encoding.
|
||||||
|
|
||||||
|
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||||
|
value : The object must be serialized into a byte array
|
||||||
|
: using a System.ComponentModel.TypeConverter
|
||||||
|
: and then encoded with base64 encoding.
|
||||||
|
-->
|
||||||
|
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||||
|
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||||
|
<xsd:element name="root" msdata:IsDataSet="true">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:choice maxOccurs="unbounded">
|
||||||
|
<xsd:element name="metadata">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||||
|
<xsd:attribute name="type" type="xsd:string" />
|
||||||
|
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||||
|
<xsd:attribute ref="xml:space" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
<xsd:element name="assembly">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:attribute name="alias" type="xsd:string" />
|
||||||
|
<xsd:attribute name="name" type="xsd:string" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
<xsd:element name="data">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||||
|
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||||
|
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||||
|
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||||
|
<xsd:attribute ref="xml:space" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
<xsd:element name="resheader">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
</xsd:choice>
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
</xsd:schema>
|
||||||
|
<resheader name="resmimetype">
|
||||||
|
<value>text/microsoft-resx</value>
|
||||||
|
</resheader>
|
||||||
|
<resheader name="version">
|
||||||
|
<value>2.0</value>
|
||||||
|
</resheader>
|
||||||
|
<resheader name="reader">
|
||||||
|
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
|
</resheader>
|
||||||
|
<resheader name="writer">
|
||||||
|
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
|
</resheader>
|
||||||
|
</root>
|
36
Source/开发辅助工具/Controls/MenuRight.Designer.cs
generated
Normal file
36
Source/开发辅助工具/Controls/MenuRight.Designer.cs
generated
Normal 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
|
||||||
|
}
|
||||||
|
}
|
161
Source/开发辅助工具/Controls/MenuRight.cs
Normal file
161
Source/开发辅助工具/Controls/MenuRight.cs
Normal file
|
@ -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
Source/开发辅助工具/Form1.Designer.cs
generated
Normal file
203
Source/开发辅助工具/Form1.Designer.cs
generated
Normal 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
Source/开发辅助工具/Form1.cs
Normal file
280
Source/开发辅助工具/Form1.cs
Normal 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
Source/开发辅助工具/Form1.resx
Normal file
209
Source/开发辅助工具/Form1.resx
Normal 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
|
||||||
|
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAESLMAAAMJAAczXgADGjIAAAAAAAAAAAAAAAAAAAAAAAAA
|
||||||
|
AAAAAAAAAAAAAAAAAAAAAAAAAAAABQo8WmEdY4GrGFFpkgckNWAAAAAsAAAACg5OgQAAAAAAAAAAAAAA
|
||||||
|
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABNQAAAAAAAAAAALAAINOwAABDIAAAAJAAMOAAAA
|
||||||
|
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQ3XgAAGTUkKJvI0FPf+v9L1/H9QbnV7y+FoMUTQVd+AAAJMwAA
|
||||||
|
AAkDFigAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACBgAAAAAAAAAABBA5U1xAmrTXN42nzBAz
|
||||||
|
SXEAAAAiAAAAAwAAAAACFy8AAAAAAAAAAAABAAAAAAAAAAtVhmkwxO/6Rej//0nr//9O7f//V+n9/1PO
|
||||||
|
5fg4jqrLEDtRdgAAACIAAAABAAAAAAABAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQFHjRKSaXA1mHv
|
||||||
|
//9V7f7/QcDa8htnibMBGTBMAAAABQAAAAAAAAAAAAAAAAATJwAAAAQSFHm8uDHM/v882///QeD//0Xl
|
||||||
|
//9I6f//Te3//1rq/f9Wxt70KXKOqwANGjIAAAABAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAAIAxsxTkiY
|
||||||
|
tM9h6vv/UfD//0/u//9K6f//Rc33/x93wcUAF1AYAythAAAAAAAAAAAAA0iTAAc8fDQdkeTpLsP//zXI
|
||||||
|
//88z///O9X//z3c//9D4v//R+j//1Lt//9a3fP+MYaiuAERHzEAAAAAAAAAAAAAAAAV//8AAAAAFggu
|
||||||
|
RmlOobzYaOn7/07t//9L6v//ROT//0vd//9r1P//M43nzgAohhQFPo4AAAAAAAAAAAAKWrYAClOqMxqJ
|
||||||
|
7OYuqPz/S73//2PN//9n1P//U9X//z3W//8+3f//Q+P//0jq//9M3PT+KIGfsAADDyMMPGIAAAAABwAA
|
||||||
|
CjQbV3OWV7jS7Gnq/v9K6f//ReX//0Hg//841f//Vc///1y09/sWaMxtx///AAQ7ewAAAAAAAAAAAAdL
|
||||||
|
mQAERpEGDF/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
|
||||||
|
8vs5ds3cDjuKgAAACS4AAAAaAAAADwAAAAQAChoAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
|
||||||
|
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGQ6UAADedLTKI7eheyv//McX//yrJ//8ry///Ksr//yXB
|
||||||
|
//8bjeb6EVei3Rhll8sneZzCL3yawjBwirUjUmmXDCQ2ZAAAACkAAAAGAAAAAAAAAAAAAAAAAAAAAAAA
|
||||||
|
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQ4hwAAJoIXKHbl0WTE//86w///JsT//yfH
|
||||||
|
//8nyP//Kcn//yu++P4zv/T8QdP9/0ne/v9Q4f7/WuL7/2Da8v5WvdbwNX2Yvw4qP14AAAAMAAAAAAAA
|
||||||
|
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAy5mAAAAAAUaYteoYbj+/0PD
|
||||||
|
//8jvv//IsD//yLA//8oxv//Mc7//zbT//831v//Otj//z3b//9A3f//ROD//0vk//9O4Pv/OqzN4xFO
|
||||||
|
dUMeg7oAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADIDgAEmn/AApN
|
||||||
|
wWRRoff9TcP//yK6//8tvP//RML//1zM//9k0f//WdD//0PK//8sxf//JsX//yrI//8wy///ONH//0XY
|
||||||
|
//86yPf9GYHBWSOm7AAAAQMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQt
|
||||||
|
XAADQKcAADKdHzF96NZBs///Nbv//1vG//+A0v//mtz//6De//+F0v//U7b//yij/v8Wov7/LrH//2XK
|
||||||
|
//+N2v//fM/+/zGT48MATaMaClywAAAAAgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
|
||||||
|
AAAAAAAAAAAAAAItWgBK//8ACVPMdBuH+P1Euf//dM7//6Hf///G6///vuT//0KM7vsJTcHWCFC+oAxp
|
||||||
|
3Jwff+nGX6b08ZvN/f9pp+/qFlq9RCqA6gA0//8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
|
||||||
|
AAAAAAAAAAAAAAAAAAAAAAAAAzZ8AANApwAAM5QQD17bpz2Y+/95yP//m9r//6bk//+Q0vz/SZDY9zVw
|
||||||
|
ndEUQGSWAAYWQgAVVRgUWMRENnnbiyJnyloAAAECACx5AAM0bgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
|
||||||
|
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACER0ABk7OAAU/ugAAK5YYGkzNrEGM8f9azf7/euf//4jr
|
||||||
|
//+D7P//beL+/0nH7/0nhbLTCShFVQAAAAHt//8AaK3/AAAshwADQZMAAAAAAAAAAAAAAAAAAAAAAAAA
|
||||||
|
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACI0kAAAAAAAAAAAMKRoB8La/p/FXl
|
||||||
|
//+B7f//q/X//632//+B7f//WuX//zzZ/f8hj8DSBR88NBV30AABHjsAAkmVAAAAAAAAAAAAAAAAAAAA
|
||||||
|
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFMmAAABk/IhmR
|
||||||
|
zNA13f//Wuf//4nu//+79///xfn//5Xw//9n6P//P+X//yTJ9v8OZp6NAAAABQAHDgAAAAAAAAAAAAAA
|
||||||
|
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAx/
|
||||||
|
4AAIUZJMF7Pu9S3h//9O5///c+r//5Hu//+V7v//fer//1vm//844///Idf//xCM0cwAED8XAidTAAAA
|
||||||
|
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
|
||||||
|
AAAAAAAAEav/AAtqt2MWuvf9I9z//zji//9S5P//Y+X//2Xk//9Y4///QeH//ynd//8c0///EJfn3wI1
|
||||||
|
gCIEP4cAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
|
||||||
|
AAAAAAAAAAAAAAAAAAAMhvcACmrAWxKt+Pwa0P//I9n//zPe//9E4P//SOH//zzf//8p2v//HtP//xfE
|
||||||
|
//8Ni+jaAjWKHQNAjgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
|
||||||
|
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAdfwQAHV7Q1DZHx7BO8//8jy///S9r//2/k//935f//YeD//zrU
|
||||||
|
//8bw///EKv//whw2rUAD1IJATJ4AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
|
||||||
|
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABkuUAAU1eAoHbt6sEJz9/zy///962f//qun//7bt
|
||||||
|
//+X4///X87//yWw//8Jg/X4BFLDWwdy/wAAGUQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
|
||||||
|
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHaO4ABVnWAANQvDMKb+rWQqX+/5XU
|
||||||
|
///V8P//5/f//7rl//9xwf//JYr5/wNZ2JgAKX4KATmXAAEqZgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
|
||||||
|
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAc8YgAEJSwABnf/AABH
|
||||||
|
vDYfa+G0Z6H08q7O+//C2vz/lb/5/UqM7+QQWdSFADSdEgFDtQACRbEAAAAAAAAAAAAAAAAAAAAAAAAA
|
||||||
|
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQ/
|
||||||
|
gwABIjAAA1XeAAArlRAOS8NPNWnVh0Nz2ZgpYNB0BUG3NQAAFAMAQLMAAUrKAAE1fAAAAAAAAAAAAAAA
|
||||||
|
AAAAAAAAAAAAAAAAAAAAAAAAAA/wBwAD4AMAAcADAAAAAwAAAAMAAAADAAAAAwAAAAMAAAAHgAAAB/AA
|
||||||
|
AA/4AAAf/AAAD/4AAAf+AAAD/gAAA/8AAAP/AAAD/wAAA/8AAAf/gAAH/4AAD//AAB//wAA//8AAP//A
|
||||||
|
AD//wAA//8AAP//AAD//4AA//+AAf//wAH8=
|
||||||
|
</value>
|
||||||
|
</data>
|
||||||
|
</root>
|
566
Source/开发辅助工具/FrmMessageBox.Designer.cs
generated
Normal file
566
Source/开发辅助工具/FrmMessageBox.Designer.cs
generated
Normal 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
Source/开发辅助工具/FrmMessageBox.cs
Normal file
238
Source/开发辅助工具/FrmMessageBox.cs
Normal 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();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
120
Source/开发辅助工具/FrmMessageBox.resx
Normal file
120
Source/开发辅助工具/FrmMessageBox.resx
Normal file
|
@ -0,0 +1,120 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<root>
|
||||||
|
<!--
|
||||||
|
Microsoft ResX Schema
|
||||||
|
|
||||||
|
Version 2.0
|
||||||
|
|
||||||
|
The primary goals of this format is to allow a simple XML format
|
||||||
|
that is mostly human readable. The generation and parsing of the
|
||||||
|
various data types are done through the TypeConverter classes
|
||||||
|
associated with the data types.
|
||||||
|
|
||||||
|
Example:
|
||||||
|
|
||||||
|
... ado.net/XML headers & schema ...
|
||||||
|
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||||
|
<resheader name="version">2.0</resheader>
|
||||||
|
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||||
|
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||||
|
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||||
|
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||||
|
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||||
|
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||||
|
</data>
|
||||||
|
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||||
|
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||||
|
<comment>This is a comment</comment>
|
||||||
|
</data>
|
||||||
|
|
||||||
|
There are any number of "resheader" rows that contain simple
|
||||||
|
name/value pairs.
|
||||||
|
|
||||||
|
Each data row contains a name, and value. The row also contains a
|
||||||
|
type or mimetype. Type corresponds to a .NET class that support
|
||||||
|
text/value conversion through the TypeConverter architecture.
|
||||||
|
Classes that don't support this are serialized and stored with the
|
||||||
|
mimetype set.
|
||||||
|
|
||||||
|
The mimetype is used for serialized objects, and tells the
|
||||||
|
ResXResourceReader how to depersist the object. This is currently not
|
||||||
|
extensible. For a given mimetype the value must be set accordingly:
|
||||||
|
|
||||||
|
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||||
|
that the ResXResourceWriter will generate, however the reader can
|
||||||
|
read any of the formats listed below.
|
||||||
|
|
||||||
|
mimetype: application/x-microsoft.net.object.binary.base64
|
||||||
|
value : The object must be serialized with
|
||||||
|
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||||
|
: and then encoded with base64 encoding.
|
||||||
|
|
||||||
|
mimetype: application/x-microsoft.net.object.soap.base64
|
||||||
|
value : The object must be serialized with
|
||||||
|
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||||
|
: and then encoded with base64 encoding.
|
||||||
|
|
||||||
|
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||||
|
value : The object must be serialized into a byte array
|
||||||
|
: using a System.ComponentModel.TypeConverter
|
||||||
|
: and then encoded with base64 encoding.
|
||||||
|
-->
|
||||||
|
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||||
|
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||||
|
<xsd:element name="root" msdata:IsDataSet="true">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:choice maxOccurs="unbounded">
|
||||||
|
<xsd:element name="metadata">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||||
|
<xsd:attribute name="type" type="xsd:string" />
|
||||||
|
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||||
|
<xsd:attribute ref="xml:space" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
<xsd:element name="assembly">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:attribute name="alias" type="xsd:string" />
|
||||||
|
<xsd:attribute name="name" type="xsd:string" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
<xsd:element name="data">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||||
|
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||||
|
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||||
|
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||||
|
<xsd:attribute ref="xml:space" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
<xsd:element name="resheader">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
</xsd:choice>
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
</xsd:schema>
|
||||||
|
<resheader name="resmimetype">
|
||||||
|
<value>text/microsoft-resx</value>
|
||||||
|
</resheader>
|
||||||
|
<resheader name="version">
|
||||||
|
<value>2.0</value>
|
||||||
|
</resheader>
|
||||||
|
<resheader name="reader">
|
||||||
|
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
|
</resheader>
|
||||||
|
<resheader name="writer">
|
||||||
|
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
|
</resheader>
|
||||||
|
</root>
|
29
Source/开发辅助工具/Globals.cs
Normal file
29
Source/开发辅助工具/Globals.cs
Normal 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
Source/开发辅助工具/Manager/ClsPY.cs
Normal file
497
Source/开发辅助工具/Manager/ClsPY.cs
Normal 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
Source/开发辅助工具/Manager/FrmAddTools.Designer.cs
generated
Normal file
245
Source/开发辅助工具/Manager/FrmAddTools.Designer.cs
generated
Normal 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;
|
||||||
|
}
|
||||||
|
}
|
85
Source/开发辅助工具/Manager/FrmAddTools.cs
Normal file
85
Source/开发辅助工具/Manager/FrmAddTools.cs
Normal file
|
@ -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
|
||||||
|
}
|
||||||
|
}
|
120
Source/开发辅助工具/Manager/FrmAddTools.resx
Normal file
120
Source/开发辅助工具/Manager/FrmAddTools.resx
Normal file
|
@ -0,0 +1,120 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<root>
|
||||||
|
<!--
|
||||||
|
Microsoft ResX Schema
|
||||||
|
|
||||||
|
Version 2.0
|
||||||
|
|
||||||
|
The primary goals of this format is to allow a simple XML format
|
||||||
|
that is mostly human readable. The generation and parsing of the
|
||||||
|
various data types are done through the TypeConverter classes
|
||||||
|
associated with the data types.
|
||||||
|
|
||||||
|
Example:
|
||||||
|
|
||||||
|
... ado.net/XML headers & schema ...
|
||||||
|
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||||
|
<resheader name="version">2.0</resheader>
|
||||||
|
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||||
|
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||||
|
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||||
|
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||||
|
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||||
|
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||||
|
</data>
|
||||||
|
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||||
|
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||||
|
<comment>This is a comment</comment>
|
||||||
|
</data>
|
||||||
|
|
||||||
|
There are any number of "resheader" rows that contain simple
|
||||||
|
name/value pairs.
|
||||||
|
|
||||||
|
Each data row contains a name, and value. The row also contains a
|
||||||
|
type or mimetype. Type corresponds to a .NET class that support
|
||||||
|
text/value conversion through the TypeConverter architecture.
|
||||||
|
Classes that don't support this are serialized and stored with the
|
||||||
|
mimetype set.
|
||||||
|
|
||||||
|
The mimetype is used for serialized objects, and tells the
|
||||||
|
ResXResourceReader how to depersist the object. This is currently not
|
||||||
|
extensible. For a given mimetype the value must be set accordingly:
|
||||||
|
|
||||||
|
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||||
|
that the ResXResourceWriter will generate, however the reader can
|
||||||
|
read any of the formats listed below.
|
||||||
|
|
||||||
|
mimetype: application/x-microsoft.net.object.binary.base64
|
||||||
|
value : The object must be serialized with
|
||||||
|
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||||
|
: and then encoded with base64 encoding.
|
||||||
|
|
||||||
|
mimetype: application/x-microsoft.net.object.soap.base64
|
||||||
|
value : The object must be serialized with
|
||||||
|
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||||
|
: and then encoded with base64 encoding.
|
||||||
|
|
||||||
|
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||||
|
value : The object must be serialized into a byte array
|
||||||
|
: using a System.ComponentModel.TypeConverter
|
||||||
|
: and then encoded with base64 encoding.
|
||||||
|
-->
|
||||||
|
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||||
|
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||||
|
<xsd:element name="root" msdata:IsDataSet="true">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:choice maxOccurs="unbounded">
|
||||||
|
<xsd:element name="metadata">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||||
|
<xsd:attribute name="type" type="xsd:string" />
|
||||||
|
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||||
|
<xsd:attribute ref="xml:space" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
<xsd:element name="assembly">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:attribute name="alias" type="xsd:string" />
|
||||||
|
<xsd:attribute name="name" type="xsd:string" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
<xsd:element name="data">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||||
|
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||||
|
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||||
|
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||||
|
<xsd:attribute ref="xml:space" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
<xsd:element name="resheader">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
</xsd:choice>
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
</xsd:schema>
|
||||||
|
<resheader name="resmimetype">
|
||||||
|
<value>text/microsoft-resx</value>
|
||||||
|
</resheader>
|
||||||
|
<resheader name="version">
|
||||||
|
<value>2.0</value>
|
||||||
|
</resheader>
|
||||||
|
<resheader name="reader">
|
||||||
|
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
|
</resheader>
|
||||||
|
<resheader name="writer">
|
||||||
|
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
|
</resheader>
|
||||||
|
</root>
|
344
Source/开发辅助工具/Manager/FrmSetting.Designer.cs
generated
Normal file
344
Source/开发辅助工具/Manager/FrmSetting.Designer.cs
generated
Normal 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;
|
||||||
|
}
|
||||||
|
}
|
197
Source/开发辅助工具/Manager/FrmSetting.cs
Normal file
197
Source/开发辅助工具/Manager/FrmSetting.cs
Normal file
|
@ -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;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
126
Source/开发辅助工具/Manager/FrmSetting.resx
Normal file
126
Source/开发辅助工具/Manager/FrmSetting.resx
Normal file
|
@ -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>
|
190
Source/开发辅助工具/Manager/FrmToolsSearch.Designer.cs
generated
Normal file
190
Source/开发辅助工具/Manager/FrmToolsSearch.Designer.cs
generated
Normal file
|
@ -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;
|
||||||
|
}
|
||||||
|
}
|
155
Source/开发辅助工具/Manager/FrmToolsSearch.cs
Normal file
155
Source/开发辅助工具/Manager/FrmToolsSearch.cs
Normal file
|
@ -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();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
129
Source/开发辅助工具/Manager/FrmToolsSearch.resx
Normal file
129
Source/开发辅助工具/Manager/FrmToolsSearch.resx
Normal file
|
@ -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>
|
109
Source/开发辅助工具/Manager/Itrycn_Info.cs
Normal file
109
Source/开发辅助工具/Manager/Itrycn_Info.cs
Normal file
|
@ -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
Source/开发辅助工具/Manager/Json.cs
Normal file
62
Source/开发辅助工具/Manager/Json.cs
Normal 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;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
395
Source/开发辅助工具/Manager/JsonSplit.cs
Normal file
395
Source/开发辅助工具/Manager/JsonSplit.cs
Normal file
|
@ -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;
|
||||||
|
}
|
||||||
|
}
|
57
Source/开发辅助工具/Manager/ReactorXML.cs
Normal file
57
Source/开发辅助工具/Manager/ReactorXML.cs
Normal file
|
@ -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);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
403
Source/开发辅助工具/Manager/RyProject.cs
Normal file
403
Source/开发辅助工具/Manager/RyProject.cs
Normal file
|
@ -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);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
48
Source/开发辅助工具/Manager/TotalCount.cs
Normal file
48
Source/开发辅助工具/Manager/TotalCount.cs
Normal file
|
@ -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
Source/开发辅助工具/Program.cs
Normal file
44
Source/开发辅助工具/Program.cs
Normal 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("",""));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
35
Source/开发辅助工具/Properties/AssemblyInfo.cs
Normal file
35
Source/开发辅助工具/Properties/AssemblyInfo.cs
Normal file
|
@ -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")]
|
63
Source/开发辅助工具/Properties/Resources.Designer.cs
generated
Normal file
63
Source/开发辅助工具/Properties/Resources.Designer.cs
generated
Normal file
|
@ -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;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
117
Source/开发辅助工具/Properties/Resources.resx
Normal file
117
Source/开发辅助工具/Properties/Resources.resx
Normal file
|
@ -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>
|
26
Source/开发辅助工具/Properties/Settings.Designer.cs
generated
Normal file
26
Source/开发辅助工具/Properties/Settings.Designer.cs
generated
Normal file
|
@ -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;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
7
Source/开发辅助工具/Properties/Settings.settings
Normal file
7
Source/开发辅助工具/Properties/Settings.settings
Normal file
|
@ -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>
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user