diff --git a/Bin/Debug/SuperDesign/MyDb.dll b/Bin/Debug/SuperDesign/MyDb.dll
index 0fd8b32..669e5fd 100644
Binary files a/Bin/Debug/SuperDesign/MyDb.dll and b/Bin/Debug/SuperDesign/MyDb.dll differ
diff --git a/Bin/Debug/SuperDesign/MyDb.xml b/Bin/Debug/SuperDesign/MyDb.xml
index e490868..237e86c 100644
--- a/Bin/Debug/SuperDesign/MyDb.xml
+++ b/Bin/Debug/SuperDesign/MyDb.xml
@@ -641,6 +641,14 @@
属性值
如为1,表示加载成功,为0为失败
+
+
+ 设置节点值
+
+ 属性名
+ 属性值
+ 如为1,表示加载成功,为0为失败
+
设置节点值
@@ -667,7 +675,7 @@
- 读取指定节点的值
+ 读取指定节点的值(string)
@@ -736,7 +744,7 @@
- 读取指定节点的值
+ 读取指定节点的值(string)
@@ -744,7 +752,7 @@
- 读取指定节点的值
+ 读取指定节点的值(int)
@@ -752,7 +760,7 @@
- 读取指定节点的值
+ 读取指定节点的值(decimal)
@@ -965,6 +973,13 @@
+
+
+ 判断字符串是否只包含数字
+
+
+
+
判断字符串是否匹配,支持?*通配符
@@ -1075,6 +1090,13 @@
是否是通配符表达式,不是,则普通替换,忽略大小写,是,则启用通配符替换
+
+
+ 将颜色转换为Html颜色格式
+
+
+
+
支持忽略大小写的替换文本功能
@@ -1125,6 +1147,13 @@
+
+
+ 判断字符串是否是数字(不同于IsInt,本函数是判断字符串是否只含有数字,对字符串长度没有限制)
+
+
+
+
是否在指定范围内
@@ -1168,6 +1197,36 @@
+
+
+ 将数字转换成字符串,小数点末尾后面不包含0
+
+
+
+
+
+
+ 将数字转换成字符串,小数点末尾后面不包含0
+
+
+
+
+
+
+
+ 将数字转换成字符串,小数点末尾后面不包含0
+
+
+
+
+
+
+ 将数字转换成字符串,小数点末尾后面不包含0
+
+
+
+
+
将指定类型转换成整型
@@ -1190,6 +1249,20 @@
+
+
+ 转换为Js时间戳
+
+
+
+
+
+
+ 转换为Unix时间戳
+
+
+
+
将指定类型转换成长整型
@@ -1212,23 +1285,61 @@
+
+
+ 判断时间是否在指定时间上
+
+
+
+
+
+
+
+
+ 判断时间是否在指定时间上
+
+
+
+
+
+
+
+
+
+ 判断时间是否在指定日期
+
+
+
+
+
+
+
+
+ 判断时间是否在指定日期
+
+
+
+
+
+
+
- 转换DateTime类型到日期时间字符串
+ 转换DateTime类型到日期时间字符串(例如 2000-01-01 08:08:08)
- 转换DateTime类型到日期字符串
+ 转换DateTime类型到日期字符串(例如 2000-01-01)
- 转换DateTime类型到日期星期字符串
+ 转换DateTime类型到日期星期字符串(例如 2000-01-01 星期六)
@@ -1399,6 +1510,75 @@
+
+
+ 根据表单字段名,获取对应的值
+
+
+
+
+
+
+
+
+ 根据表单字段名,获取对应的值
+
+
+
+
+
+
+
+ 根据表单字段名,获取对应的值
+
+
+
+
+
+
+
+
+ 根据表单字段名,获取对应的值
+
+
+
+
+
+
+
+
+ 根据表单字段名,获取对应的值
+
+
+
+
+
+
+
+
+ 根据表单字段名,获取对应的值
+
+
+
+
+
+
+
+
+ 根据表单字段名,获取对应的值
+
+
+
+
+
+
+
+
+ 获取不含域名的部分网址
+
+
+
+
文件信息
@@ -1416,12 +1596,127 @@
+
+
+ 根据版本字符串输出double类型的版本号
+
+
+
+
+
+
+
+ 比较两个版本号大小
+
+
+
+ oldVer小于newVer,返回1,大于则返回-1,相等返回0,不支持则返回-1000
+
+
+
+ 从字符串中提取版本号
+
+
+
+
+
+
+ 比较版本号
+
+
+
+
+
+ old小于new,返回1,大于则返回-1,相等返回0
+
判断是否是管理员方式运行
+
+
+ 大文件与批量文件操作类,支持中途取消操作,本类需要实例化操作
+
+
+
+
+ 传输进度
+
+ 当前传输完成的值
+ 全部值,为-1表示无法获取
+ 当前传输的百分比,为-1表示无法获取
+
+
+
+ 传输进度
+
+
+
+
+ 取消事件
+
+
+
+
+ 大文件按流复制文件,支持自动创建目标文件夹。 true:复制成功 false:复制失败
+
+ 原始文件路径
+ 复制目标文件路径
+
+
+
+
+ 复制文件夹到目标文件夹,不支持进度事件,支持中途取消
+
+ 源文件夹
+ 目标文件夹
+ 返回复制操作是否成功的标识,成功返回0,负数表示复制失败的文件数量。1表示源文件夹不存在
+
+
+
+ 复制文件夹到目标文件夹,支持进度事件,支持中途取消
+
+ 源文件夹
+ 目标文件夹
+ 返回复制操作是否成功的标识,成功返回0,负数表示复制失败的文件数量。1表示源文件夹不存在
+
+
+
+ 复制文件夹到目标文件夹,支持中途取消
+
+ 源文件夹
+ 目标文件夹
+ 初始的文件数量
+ 总数量,如果不计算,则使用-1
+ 操作的数量,包含成功的和失败的
+ 返回复制操作是否成功的标识,成功返回0,负数表示复制失败的文件数量。1表示源文件夹不存在
+
+
+
+ 获取文件夹中的文件数量
+
+ 文件夹路径
+ 返回文件数量,中途取消则返回-1
+
+
+
+ 获取文件夹的大小
+
+ 文件夹路径
+ 返回文件数量,中途取消则返回-1
+
+
+
+ 添加文件到指定文件夹,会进行自动重命名,并返回重命名后的文件名(含路径)
+
+ 要添加的文件路径
+ 要添加到的文件夹
+ 是否根据时间进行重命名
+ 返回是否成功执行
+ 成功执行则返回路径,否则返回空
+
Hosts操作类
@@ -1510,6 +1805,429 @@
是否要删除
+
+
+ 图片相关API
+
+
+
+
+ 从文件或Url中加载图片,使用本方法,不会导致图片文件被占用。
+
+
+
+
+
+
+ 保存高质量不失真照片
+
+
+
+
+
+
+
+ 保存高质量不失真照片
+
+
+
+
+
+
+
+ 保存高质量不失真照片
+
+
+
+
+
+
+
+ 保存高质量不失真照片
+
+
+
+
+
+
+ 保存高质量不失真照片
+
+
+
+
+
+
+ 以逆时针为方向对图像进行旋转
+
+ 位图流
+ 旋转角度[0,360](前台给的)
+
+
+
+
+ 是否包括透明像素
+
+
+
+ 操作失败
+
+
+
+ 矩形边界
+
+
+
+
+
+
+
+ 计算水印位置
+
+
+
+
+
+
+
+
+ 写入水印
+
+ 原图
+ 水印图片
+ 水印位置
+ 不透明度(0~1),越小越透明
+
+
+
+
+ 写入水印
+
+ 原图
+ 水印图片
+ 水印位置
+ x坐标偏移
+ y坐标偏移
+ 不透明度(0~1),越小越透明
+
+
+
+
+ 写入水印
+
+ 原图
+ 水印图片
+ 水印位置
+ x坐标偏移
+ y坐标偏移
+ 不透明度(0~1),越小越透明
+
+
+
+
+ 计算最大字体大小
+
+
+
+
+
+
+
+
+
+
+ 计算旋转矩形大小
+
+
+
+
+
+
+
+ 写入水印文字
+
+ 图片
+ 水印文字
+ 水印字体名字
+ 字体颜色
+ 字体大小
+ 旋转角度
+ 水印位置
+ x坐标偏移
+ y坐标偏移
+ 不透明度(0~1),越小越透明
+
+
+
+
+ 写入水印文字
+
+ 图片
+ 水印文字
+ 水印字体名字
+ 字体颜色
+ 字体大小
+ 旋转角度
+ 水印位置
+ x坐标偏移
+ y坐标偏移
+ 不透明度(0~1),越小越透明
+
+
+
+
+ 写入水印文字
+
+ 图片
+ 水印文字
+ 水印字体名字
+ 字体颜色
+ 字体大小
+ 旋转角度
+ 水印位置
+ 不透明度(0~1),越小越透明
+
+
+
+
+ 往图片右下角写入水印文字
+
+ 图片
+ 水印文字
+ 水印字体名字
+ 字体颜色
+ 字体大小
+ 不透明度(0~1),越小越透明
+
+
+
+
+ 往图片右下角写入水印文字
+
+ 图片
+ 水印文字
+ 水印字体名字
+ 字体颜色
+ 字体大小
+
+
+
+
+ 缩放
+
+
+ 宽
+ 高
+ 插值算法
+ 返回缩放后的图片
+ Image 不能为 null
+ 操作失败
+
+
+
+ 缩放
+
+
+ 宽
+ 高
+ 返回缩放后的图片
+ Image 不能为 null
+ 操作失败
+
+
+
+ 根据原边长和新边长计算绘制的起始点坐标
+
+
+
+
+
+
+
+ 获取缩放模式
+
+
+
+
+
+ 是否裁剪图片
+
+
+
+
+ 裁剪或填充
+
+
+
+
+ 背景色
+ 插值算法
+
+ Image 不能为 null
+ 操作失败
+
+
+
+ 裁剪
+
+
+ 宽度
+ 高度
+
+ 返回裁剪后的图片
+ Image 不能为 null
+ 新的图片尺寸的宽度和高度必须大于零
+ 操作失败
+
+
+
+ 调整宽度
+
+
+
+
+
+
+
+ 根据最大宽度调整图片尺寸
+
+
+ 最大宽度
+ 返回调整后的图片
+ Image 不能为 null
+ 最大宽度必须大于零
+ 操作失败
+
+
+
+ 根据最大高度调整图片尺寸
+
+
+ 最大高度
+ 返回调整后的图片
+ Image 不能为 null
+ 最大宽度必须大于零
+ 操作失败
+
+
+
+ 调整高度
+
+
+
+
+
+
+
+ 调整图片大小
+
+
+
+
+
+
+
+
+
+ 调整图片大小
+
+
+
+
+
+
+
+
+
+
+ 调整图片大小
+
+
+
+
+
+
+
+
+
+
+
+
+ 转换Image为Icon
+
+ 要转换为图标的Image对象
+ 当image为null时是否返回null。false则抛空引用异常
+
+
+
+
+ 缩放模式
+
+
+
+
+ 宽度优先(不裁剪宽)
+
+
+
+
+ 高度优先(不裁剪高)
+
+
+
+
+ 水印位置
+
+
+
+
+ 左上角
+
+
+
+
+ 中上
+
+
+
+
+ 右上角
+
+
+
+
+ 左中
+
+
+
+
+ 居中
+
+
+
+
+ 右中
+
+
+
+
+ 左下角
+
+
+
+
+ 中下
+
+
+
+
+ 右下角
+
+
+
+
+ 全屏平铺
+
+
音频播放类
@@ -1800,11 +2518,11 @@
- 复制文件夹到目标文件夹
+ 复制文件夹到目标文件夹(从3.0.2205.2601版本起已更换实现底层)
源文件夹
目标文件夹
- 返回移动操作是否成功的标识,成功返回0,负数表示复制失败的文件数量。1表示源文件夹不存在
+ 返回复制操作是否成功的标识,成功返回0,负数表示复制失败的文件数量。1表示源文件夹不存在
@@ -1912,6 +2630,20 @@
+
+
+ 判断是否为空的文件夹
+
+
+
+
+
+
+ 文件或文件夹是否存在
+
+
+
+
判断文件名是否有效
@@ -1947,6 +2679,14 @@
+
+
+ 读取文件内容,可以自动识别文件编码
+
+
+
+
+
读取文件所有行,可以自动识别文件编码
@@ -1954,6 +2694,14 @@
+
+
+ 读取文件所有行,可以自动识别文件编码
+
+
+
+
+
写入所有文本行到文件,如果文件夹不存在,会自动创建
@@ -1970,6 +2718,13 @@
+
+
+ 以UTF-8格式写入所有文本到文件,如果文件夹不存在,会自动创建
+
+
+
+
从文件中加载图片,使用本方法,不会导致图片文件被占用。
@@ -2000,6 +2755,13 @@
+
+
+ 根据文件大小字符串获取长整型表示的文件大小
+
+
+
+
获取文件大小字符串
@@ -2051,6 +2813,20 @@
+
+
+ 保存高质量不失真照片
+
+
+
+
+
+
+ 保存高质量不失真照片
+
+
+
+
获取绝对路径
@@ -2476,6 +3252,328 @@
父窗体居中
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 设置线程数量
+
+
+
+
+ 要计算的总数量
+
+
+
+
+ 每个线程要计算的数量
+
+
+
+
+
+
+
+
+
+ 当前已使用的时间
+
+
+
+
+
+
+ 线程数量
+ 要计算的事务数量
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 多线程计算时激发
+
+
+
+
+ 在所有线程执行完毕后发生
+
+
+
+
+ 在线程执行完毕后发生,最后一个执行完毕的线程将不收到本事件通知
+
+
+
+
+ 进程相关接口
+
+
+
+
+ 获取进程路径
+
+
+
+
+
+
+ 获取进程路径
+
+
+
+
+
+
+ 获取命令行
+
+
+
+
+
+
+ 获取命令行
+
+
+
+
+
+
+ 运行库检测类
+
+
+
+
+ 获取产品状态
+
+
+
+
+
+
+ 判断是否已安装VC运行库
+
+
+
+
+
+ 判断是否已安装VC运行库
+
+
+
+
+
+ 安装状态
+
+
+
+
+ 组件禁用
+
+
+
+
+ 配置数据已损坏
+
+
+
+
+ 安装已暂停或正在进行
+
+
+
+
+ 从源运行,源不可用
+
+
+
+
+ 返回缓冲区溢出
+
+
+
+
+ 无效的参数传递给该函数。
+
+
+
+
+ 不公布或者未安装该产品。
+
+
+
+
+ 损坏
+
+
+
+
+ 该产品已公布但尚未安装。
+
+
+
+
+ 正在移除的组件(操作状态,不可设置)
+
+
+
+
+ 不同的用户安装该产品。
+
+
+
+
+ 安装在本地驱动器上
+
+
+
+
+ 从源代码、CD或网络运行
+
+
+
+
+ 为当前用户安装该产品。
+
+
+
+
+ 安装的版本,是x86还是x64,还是全部安装了
+
+
+
+
+ 判断32位和64位运行库是否已安装
+
+
+
+
+ 判断32位运行库是否已安装
+
+
+
+
+ 判断64位运行库是否已安装
+
+
+
+
+ 判断是否已安装VC2005运行库
+
+
+
+
+
+ 判断是否已安装VC2005SP1运行库
+
+
+
+
+
+ 判断是否已安装VC2008运行库
+
+
+
+
+
+ 判断是否已安装VC2008SP1运行库
+
+
+
+
+
+ 判断是否已安装VC2010运行库
+
+
+
+
+
+ 判断是否已安装VC2010SP1运行库
+
+
+
+
+
+ 判断是否已安装VC2012运行库
+
+
+
+
+
+ 判断是否已安装VC2013运行库
+
+
+
+
+
+ 判断是否已安装VC2015或以上运行库
+
+
+
+
+
+ 判断是否已安装VC2017运行库或以上运行库
+
+
+
+
+
+ 判断是否已安装VC2019运行库或以上运行库
+
+
+
+
+
+ 判断是否已安装VC2022运行库或以上运行库
+
+
+
+
+
+ 判断当前系统是否安装了WebView2组件
+
+
+
+
+
+ 判断当前系统是否安装了.NET 4.8
+
+
+
日期时间的操作类
@@ -2573,6 +3671,13 @@
是否显示秒
+
+
+ 将秒数显示成中文表达式
+
+
+
+
计算一个时间与当前本地日期和时间的时间间隔,返回的是时间间隔的日期差的绝对值.
@@ -2726,6 +3831,12 @@
+
+
+ 获取当前前台的窗口句柄
+
+
+
设置为当前活动窗口
@@ -2797,6 +3908,68 @@
访问的注册表节点
+
+
+ 判断注册表项是否存在
+
+
+
+
+
+
+
+
+ 删除注册表键(如果存在子键,子键将一并被删除)
+
+
+
+
+
+
+
+
+
+ 删除注册表键值
+
+
+
+
+
+
+
+
+
+ 获取注册表键值
+
+
+
+
+
+
+
+
+
+
+ 设置注册表键值
+
+
+
+
+
+
+
+
+
+
+ 设置注册表键值
+
+
+
+
+
+
+
+
设置是否开机启动
@@ -3038,7 +4211,7 @@
- 获取系统
+ 获取系统名称,注意需要在app.manifest文件中设置兼容win10
@@ -3098,124 +4271,60 @@
是否截取鼠标指针
-
-
- 给控件增加拖放功能的类
-
-
-
-
- 拖放实例
-
-
-
-
- 高级拖放事件
-
-
-
+
-
+
-
+ 根据XPath来获取属性值
-
-
-
-
-
-
-
-
- 使管理员方式运行时支持拖放
-
-
-
-
-
- 使支持拖放属性
-
-
-
-
-
-
-
-
+
+
+ 属性名,为空则输出InnerText,-1则输出InnerHtml,-2则输出OuterHtml
+
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 网络操作类
-
-
-
-
- 通过NetworkInterface读取网卡Mac
+ 根据当前节点生成HtmlDocument
+
-
+
- 通过NetworkInterface读取网卡Mac
+ 根据XPath来获取属性值
+
+
+ 属性名,为空则输出InnerText,-1则输出InnerHtml,-2则输出OuterHtml
+
-
+
- 根据mac字符串来获取最终的mac地址,可以是各种MAC地址格式,非法的内容将返回null
+ 根据XPath来查找节点
-
+
+
-
+
- 远程唤醒
+ 在当前节点下根据xpath来查找符合的第一个节点
-
-
+
+
-
+
- 远程唤醒
+ 在当前节点下根据xpath来查找所有符合的节点
-
-
-
+
+
@@ -6306,6 +7415,200 @@
Gets the fragment text.
+
+
+ 给控件增加拖放功能的类
+
+
+
+
+ 拖放实例
+
+
+
+
+ 高级拖放事件
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 使管理员方式运行时支持拖放
+
+
+
+
+
+ 使支持拖放属性
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 获取WMI内容
+
+
+
+
+
+
+ 获取WMI内容
+
+
+
+
+
+
+ 获取内存信息
+
+
+
+
+
+ 获取显卡信息
+
+
+
+
+
+ 获取显卡信息
+
+
+
+
+
+ 获取显卡信息
+
+
+
+
+
+ 获取硬盘信息
+
+
+
+
+
+ 获取主板信息
+
+
+
+
+
+ 获取处理器信息
+
+
+
+
+
+ 获取主要硬件信息
+
+
+
+
+
+ 获取主要硬件信息
+
+ 是否获取XML格式
+
+
+
+
+ 网络操作类
+
+
+
+
+ 通过NetworkInterface读取网卡Mac
+
+
+
+
+
+ 通过NetworkInterface读取网卡Mac
+
+
+
+
+
+ 根据mac字符串来获取最终的mac地址,可以是各种MAC地址格式,非法的内容将返回null
+
+
+
+
+
+
+ 远程唤醒
+
+
+
+
+
+
+
+ 远程唤醒
+
+
+
+
+
+
消息客户端类
@@ -6401,6 +7704,54 @@
文件映射对象的名称
+
+
+ 写共享内存
+
+ 映射对象(简单类型、结构体等)
+ 文件映射对象的名称
+
+
+
+
+ 写共享内存
+
+ 映射对象(简单类型、结构体等)
+ 文件映射对象的名称
+
+
+
+
+ 写共享内存
+
+ 映射对象(简单类型、结构体等)
+ 文件映射对象的名称
+
+
+
+
+ 写共享内存
+
+ 映射对象(简单类型、结构体等)
+ 文件映射对象的名称
+
+
+
+
+ 写共享内存
+
+ 映射对象(简单类型、结构体等)
+ 文件映射对象的名称
+
+
+
+
+ 写共享内存
+
+ 映射对象(简单类型、结构体等)
+ 文件映射对象的名称
+
+
写共享内存
@@ -6412,6 +7763,31 @@
发送消息
+
+
+ 读共享内存
+
+
+
+
+
+
+
+ 读共享内存
+
+
+
+
+
+
+
+ 读共享内存
+
+
+
+
+
+
读共享内存
@@ -6910,6 +8286,30 @@
+
+
+ 执行SQL语句
+
+
+ 只针对IsAdd为false才生效,where 以后的sql语句
+ 是新增还是更新
+
+
+
+
+ 插入数据库
+
+
+
+
+
+
+ 更新数据库
+
+
+ where 以后的sql语句
+
+
执行SQL语句
@@ -6937,6 +8337,12 @@
释放资源
+
+
+ 最后一个错误信息
+
+
+
@@ -7092,6 +8498,12 @@
+
+
+ 获取最后一次错误信息
+
+
+
@@ -7232,6 +8644,30 @@
+
+
+ 执行SQL语句
+
+
+ 只针对IsAdd为false才生效,where 以后的sql语句
+ 是新增还是更新
+
+
+
+
+ 插入数据库
+
+
+
+
+
+
+ 更新数据库
+
+
+ where 以后的sql语句
+
+
@@ -7404,6 +8840,13 @@
+
+
+ 添加byte[]字段
+
+
+
+
添加bool字段
@@ -7817,6 +9260,11 @@
是否设置为全文小写,默认为不转化
+
+
+ 获取或设置要在 HTTP 请求中使用的 Date HTTP 标头值。默认不填写
+
+
支持跳转页面,查询结果将是跳转后的页面,默认是不跳转
@@ -7900,6 +9348,11 @@
item.IPEndPoint = new IPEndPoint(IPAddress.Parse("192.168.1.1"),80);
+
+
+ 是否重置request,response的值,默认不重置,当设置为True时request,response将被设置为Null
+
+
Http返回参数类
@@ -8000,11 +9453,161 @@
CookieCollection格式的Cookie集合同时也返回String类型的cookie
+
+
+ Http服务器类
+
+
+
+
+
+
+
+
+
+
+
+ 当收到Get事件时激发
+
+
+
+
+ 当收到Post事件时激发
+
+
+
+
+ 监听的主机,默认是localhost
+
+
+
+
+ 最后一次错误信息
+
+
+
+
+ 在此端口建立Http服务类
+
+ 端口号
+
+
+
+
+
+
+
+
+
+ 开始服务
+
+
+
+
+ 退出服务
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 超时时间
+
以post方式获取网页源码
@@ -8056,11 +9659,29 @@
+
+
+ 获取网址对应的文件大小
+
+
+
+
+
+
+
+ 代理
+
+
+
+
+ 是否自动跳转
+
+
获取网页源码
@@ -8108,6 +9729,13 @@
+
+
+
+
+
+
+
将相对网址转换成绝对网址
@@ -8116,6 +9744,116 @@
当前页面地址
转换后的绝对网址
+
+
+ WebDav接口
+
+
+
+
+ WebDav初始化
+
+
+
+
+
+
+
+ 删除文件
+
+ 相对路径,不包括域名
+
+
+
+
+ 下载文件
+
+
+
+
+
+
+
+ 下载文件
+
+
+
+
+
+
+
+
+ 上传文件
+
+
+
+
+
+
+
+ 上传文件
+
+
+
+
+
+
+
+
+ 新建文件夹
+
+
+
+
+
+
+ 新建文件夹
+
+ 文件夹路径
+
+
+
+
+
+ 新建文件夹
+
+
+
+
+
+
+
+ 将文件或目录列出来
+
+
+
+
+
+
+
+ 定义每个文件或目录的属性
+
+
+
+
+ 文件名
+
+
+
+
+ 是否是文件夹
+
+
+
+
+ 网址
+
+
+
+
+ 最后修改时间
+
+
@@ -8217,6 +9955,24 @@
+
+
+ 将url里的字段分解成表单字典
+
+
+
+
+
+
+
+
+ 根据表单字段名获取值
+
+
+
+
+
+
AES加密解密类
@@ -9120,11 +10876,31 @@
Ctrl键
+
+
+ Alt+Ctrl键
+
+
Shift键
+
+
+ Shift+Alt键
+
+
+
+
+ Shift+Ctrl键
+
+
+
+
+ Alt+Shift+Ctrl键
+
+
Win键
@@ -9156,6 +10932,50 @@
释放热键
+
+
+ 获取热键Tag
+
+
+
+
+
+
+ 获取热键id
+
+
+
+
+
+
+ 获取热键id
+
+
+
+
+
+
+
+ 判断热键id是否存在
+
+
+
+
+
+
+ 判断热键Tag是否存在
+
+
+
+
+
+
+ 判断热键是否存在
+
+
+
+
+
注册热键
@@ -9174,6 +10994,21 @@
+
+
+ 注册热键
+
+
+
+
+
+
+
+
+
+ 获取热键数量
+
+
删除热键
@@ -9186,6 +11021,11 @@
删除所有热键
+
+
+ 删除所有热键
+
+
热键事件
@@ -9214,6 +11054,11 @@
热键id
+
+
+ 热键Tag
+
+
功能键
@@ -9232,6 +11077,20 @@
+
+
+ 热键类型
+
+
+
+
+
+
+
+
+ 热键类型
+
+
@@ -9245,6 +11104,22 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Bin/Debug/SuperDesign/MyDb_SQLite.dll b/Bin/Debug/SuperDesign/MyDb_SQLite.dll
index 4b53a03..fa2c602 100644
Binary files a/Bin/Debug/SuperDesign/MyDb_SQLite.dll and b/Bin/Debug/SuperDesign/MyDb_SQLite.dll differ
diff --git a/Bin/Debug/SuperDesign/MyDb_SQLite.xml b/Bin/Debug/SuperDesign/MyDb_SQLite.xml
index 70ccea6..b80291c 100644
--- a/Bin/Debug/SuperDesign/MyDb_SQLite.xml
+++ b/Bin/Debug/SuperDesign/MyDb_SQLite.xml
@@ -213,6 +213,12 @@
+
+
+ 获取最后一次错误信息
+
+
+
@@ -358,6 +364,30 @@
+
+
+ 执行SQL语句
+
+
+ 只针对IsAdd为false才生效,where 以后的sql语句
+ 是新增还是更新
+
+
+
+
+ 插入数据库
+
+
+
+
+
+
+ 更新数据库
+
+
+ where 以后的sql语句
+
+
diff --git a/Bin/Debug/SuperDesign/Newtonsoft.Json.dll b/Bin/Debug/SuperDesign/Newtonsoft.Json.dll
index 55d537f..7af125a 100644
Binary files a/Bin/Debug/SuperDesign/Newtonsoft.Json.dll and b/Bin/Debug/SuperDesign/Newtonsoft.Json.dll differ
diff --git a/Bin/Debug/SuperDesign/SuperDesign.exe b/Bin/Debug/SuperDesign/SuperDesign.exe
index b7a601c..43baf42 100644
Binary files a/Bin/Debug/SuperDesign/SuperDesign.exe and b/Bin/Debug/SuperDesign/SuperDesign.exe differ
diff --git a/Bin/Debug/SuperDesign/UserDb/MyDb.dat b/Bin/Debug/SuperDesign/UserDb/MyDb.dat
index 24e2f0a..188139b 100644
Binary files a/Bin/Debug/SuperDesign/UserDb/MyDb.dat and b/Bin/Debug/SuperDesign/UserDb/MyDb.dat differ
diff --git a/Bin/Debug/SuperDesign/ryControls.dll b/Bin/Debug/SuperDesign/ryControls.dll
index 40dca2b..a7d24af 100644
Binary files a/Bin/Debug/SuperDesign/ryControls.dll and b/Bin/Debug/SuperDesign/ryControls.dll differ
diff --git a/Bin/Debug/SuperDesign/ryControls.xml b/Bin/Debug/SuperDesign/ryControls.xml
index dfc0ba6..ebd2815 100644
--- a/Bin/Debug/SuperDesign/ryControls.xml
+++ b/Bin/Debug/SuperDesign/ryControls.xml
@@ -4,6 +4,830 @@
ryControls
+
+
+ Martin Lottering : 2007-10-27
+ --------------------------------
+ This is a usefull control in Filters. Allows you to save space and can replace a Grouped Box of CheckBoxes.
+ Currently used on the TasksFilter for TaskStatusses, which means the user can select which Statusses to include
+ in the "Search".
+ This control does not implement a CheckBoxListBox, instead it adds a wrapper for the normal ComboBox and Items.
+ See the CheckBoxItems property.
+ ----------------
+ ALSO IMPORTANT: In Data Binding when setting the DataSource. The ValueMember must be a bool type property, because it will
+ be binded to the Checked property of the displayed CheckBox. Also see the DisplayMemberSingleItem for more information.
+ ----------------
+ Extends the CodeProject PopupComboBox "Simple pop-up control" "http://www.codeproject.com/cs/miscctrl/simplepopup.asp"
+ by Lukasz Swiatkowski.
+
+
+
+
+
+
+
+
+
+ The checkbox list control. The public CheckBoxItems property provides a direct reference to its Items.
+
+
+
+
+ In DataBinding operations, this property will be used as the DisplayMember in the CheckBoxComboBoxListBox.
+ The normal/existing "DisplayMember" property is used by the TextBox of the ComboBox to display
+ a concatenated Text of the items selected. This concatenation and its formatting however is controlled
+ by the Binded object, since it owns that property.
+
+
+
+
+ Builds a CSV string of the items selected.
+
+
+
+
+ A direct reference to the Items of CheckBoxComboBoxListControl.
+ You can use it to Get or Set the Checked status of items manually if you want.
+ But do not manipulate the List itself directly, e.g. Adding and Removing,
+ since the list is synchronised when shown with the ComboBox.Items. So for changing
+ the list contents, use Items instead.
+
+
+
+
+ The DataSource of the combobox. Refreshes the CheckBox wrappers when this is set.
+
+
+
+
+ The ValueMember of the combobox. Refreshes the CheckBox wrappers when this is set.
+
+
+
+
+ In DataBinding operations, this property will be used as the DisplayMember in the CheckBoxComboBoxListBox.
+ The normal/existing "DisplayMember" property is used by the TextBox of the ComboBox to display
+ a concatenated Text of the items selected. This concatenation however is controlled by the Binded
+ object, since it owns that property.
+
+
+
+
+ Made this property Browsable again, since the Base Popup hides it. This class uses it again.
+ Gets an object representing the collection of the items contained in this
+ System.Windows.Forms.ComboBox.
+
+ A System.Windows.Forms.ComboBox.ObjectCollection representing the items in
+ the System.Windows.Forms.ComboBox.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Will add an invisible item when the style is DropDownList,
+ to help maintain the correct text in main TextBox.
+
+
+
+
+
+
+
+
+
+
+
+ A function to clear/reset the list.
+ (Ubiklou : http://www.codeproject.com/KB/combobox/extending_combobox.aspx?msg=2526813#xx2526813xx)
+
+
+
+
+ Uncheck all items.
+
+
+
+
+ The properties that will be assigned to the checkboxes as default values.
+
+
+
+
+
+
+
+
+
+
+ Required designer variable.
+
+
+
+
+ Clean up any resources being used.
+
+ true if managed resources should be disposed; otherwise, false.
+
+
+
+ Required method for Designer support - do not modify
+ the contents of this method with the code editor.
+
+
+
+
+ A container control for the ListControl to ensure the ScrollBar on the ListControl does not
+ Paint over the Size grip. Setting the Padding or Margin on the Popup or host control does
+ not work as I expected.
+
+
+
+
+
+
+
+
+
+ Prescribed by the Popup class to ensure Resize operations work correctly.
+
+
+
+
+
+ This ListControl that pops up to the User. It contains the CheckBoxComboBoxItems.
+ The items are docked DockStyle.Top in this control.
+
+
+
+
+
+
+
+
+
+
+ Simply a reference to the CheckBoxComboBox.
+
+
+
+
+ A Typed list of ComboBoxCheckBoxItems.
+
+
+
+
+
+
+
+
+
+ Prescribed by the Popup control to enable Resize operations.
+
+
+
+
+
+
+
+
+
+
+
+ Maintains the controls displayed in the list by keeping them in sync with the actual
+ items in the combobox. (e.g. removing and adding as well as ordering)
+
+
+
+
+ The CheckBox items displayed in the Popup of the ComboBox.
+
+
+
+
+
+
+ A reference to the CheckBoxComboBox.
+ A reference to the item in the ComboBox.Items that this object is extending.
+
+
+
+ A reference to the CheckBoxComboBox.
+
+
+
+
+ A reference to the Item in ComboBox.Items that this object is extending.
+
+
+
+
+ A reference to the Item in ComboBox.Items that this object is extending.
+
+
+
+
+ When using Data Binding operations via the DataSource property of the ComboBox. This
+ adds the required Bindings for the CheckBoxes.
+
+
+
+
+
+
+
+
+
+
+ Added this handler because the control doesn't seem
+ to initialize correctly until shown for the first
+ time, which also means the summary text value
+ of the combo is out of sync initially.
+
+
+
+
+ A Typed List of the CheckBox items.
+ Simply a wrapper for the CheckBoxComboBox.Items. A list of CheckBoxComboBoxItem objects.
+ This List is automatically synchronised with the Items of the ComboBox and extended to
+ handle the additional boolean value. That said, do not Add or Remove using this List,
+ it will be lost or regenerated from the ComboBox.Items.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Returns the item with the specified displayName or Text.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Called when any property changes.
+
+
+
+
+
+
+
+
+
+ CodeProject.com "Simple pop-up control" "http://www.codeproject.com/cs/miscctrl/simplepopup.asp".
+
+
+
+
+ CodeProject.com "Simple pop-up control" "http://www.codeproject.com/cs/miscctrl/simplepopup.asp".
+
+
+
+
+ CodeProject.com Simple pop-up control http://www.codeproject.com/cs/miscctrl/simplepopup.asp.
+ Represents a pop-up window.
+
+
+
+
+ Gets the content of the pop-up.
+
+
+
+
+ Gets a value indicating whether the PopupControl.Popup uses the fade effect.
+
+ true if pop-up uses the fade effect; otherwise, false.
+ To use the fade effect, the FocusOnOpen property also has to be set to true.
+
+
+
+ Gets or sets a value indicating whether to focus the content after the pop-up has been opened.
+
+ true if the content should be focused after the pop-up has been opened; otherwise, false.
+ If the FocusOnOpen property is set to false, then pop-up cannot use the fade effect.
+
+
+
+ Gets or sets a value indicating whether presing the alt key should close the pop-up.
+
+ true if presing the alt key does not close the pop-up; otherwise, false.
+
+
+
+ Gets or sets a value indicating whether this PopupControl.Popup is resizable.
+
+ true if resizable; otherwise, false.
+
+
+
+ Gets or sets the size that is the lower limit that can specify.
+
+ An ordered pair of type representing the width and height of a rectangle.
+
+
+
+ Gets or sets the size that is the upper limit that can specify.
+
+ An ordered pair of type representing the width and height of a rectangle.
+
+
+
+ Gets parameters of a new window.
+
+ An object of type used when creating a new window.
+
+
+
+ Initializes a new instance of the PopupControl.Popup class.
+
+ The content of the pop-up.
+
+ Pop-up will be disposed immediately after disposion of the content control.
+
+ is null
.
+
+
+
+ Processes a dialog box key.
+
+ One of the values that represents the key to process.
+
+ true if the key was processed by the control; otherwise, false.
+
+
+
+
+ Updates the pop-up region.
+
+
+
+
+ Shows pop-up window below the specified control.
+
+ The control below which the pop-up will be shown.
+
+ When there is no space below the specified control, the pop-up control is shown above it.
+
+ is null
.
+
+
+
+ Shows pop-up window below the specified area of specified control.
+
+ The control used to compute screen location of specified area.
+ The area of control below which the pop-up will be shown.
+
+ When there is no space below specified area, the pop-up control is shown above it.
+
+ is null
.
+
+
+
+ Adjusts the size of the owner to accommodate the if the owner is currently displayed, or clears and resets active child controls of the if the is not currently displayed.
+
+ true if the owner is currently displayed; otherwise, false.
+
+
+
+ Raises the event.
+
+ An that contains the event data.
+
+
+
+ Raises the event.
+
+ A that contains the event data.
+
+
+
+ Raises the event.
+
+ An that contains the event data.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Processes Windows messages.
+
+ The Windows to process.
+
+
+
+ Processes the resizing messages.
+
+ The message.
+ true, if the WndProc method from the base class shouldn't be invoked.
+
+
+
+ Paints the size grip.
+
+ The instance containing the event data.
+
+
+
+ Required designer variable.
+
+
+
+
+ Clean up any resources being used.
+
+ true if managed resources should be disposed; otherwise, false.
+
+
+
+ Required method for Designer support - do not modify
+ the contents of this method with the code editor.
+
+
+
+
+ CodeProject.com "Simple pop-up control" "http://www.codeproject.com/cs/miscctrl/simplepopup.asp".
+ Represents a Windows combo box control with a custom popup control attached.
+
+
+
+
+ Initializes a new instance of the PopupControl.PopupComboBox class.
+
+
+
+
+ The pop-up wrapper for the dropDownControl.
+ Made PROTECTED instead of PRIVATE so descendent classes can set its Resizable property.
+ Note however the pop-up properties must be set after the dropDownControl is assigned, since this
+ popup wrapper is recreated when the dropDownControl is assigned.
+
+
+
+
+ Gets or sets the drop down control.
+
+ The drop down control.
+
+
+
+ Shows the drop down.
+
+
+
+
+ Hides the drop down.
+
+
+
+
+ Processes Windows messages.
+
+ The Windows to process.
+
+
+ This property is not relevant for this class.
+ This property is not relevant for this class.
+
+
+ This property is not relevant for this class.
+ This property is not relevant for this class.
+
+
+ This property is not relevant for this class.
+ This property is not relevant for this class.
+
+
+ This property is not relevant for this class.
+ This property is not relevant for this class.
+
+
+ This property is not relevant for this class.
+ This property is not relevant for this class.
+
+
+
+ Required designer variable.
+
+
+
+
+ Clean up any resources being used.
+
+ true if managed resources should be disposed; otherwise, false.
+
+
+
+ Required method for Designer support - do not modify
+ the contents of this method with the code editor.
+
+
+
+
+ Maintains an additional "Selected" and "Count" value for each item in a List.
+ Useful in the CheckBoxComboBox. It holds a reference to the List[Index] Item and
+ whether it is selected or not.
+ It also caters for a Count, if needed.
+
+
+
+
+ No property on the object is specified for display purposes, so simple ToString() operation
+ will be performed. And no Counts will be displayed
+
+
+
+
+ No property on the object is specified for display purposes, so simple ToString() operation
+ will be performed.
+
+
+
+
+ A Display "Name" property is specified. ToString() will not be performed on items.
+ This is specifically useful on DataTable implementations, or where PropertyDescriptors are used to read the values.
+ If a PropertyDescriptor is not found, a Property will be used.
+
+
+
+
+ A Display "Name" property is specified. ToString() will not be performed on items.
+ This is specifically useful on DataTable implementations, or where PropertyDescriptors are used to read the values.
+ If a PropertyDescriptor is not found, a Property will be used.
+
+
+
+
+ Is a Count indicator used.
+
+
+
+
+ The original List of values wrapped. A "Selected" and possibly "Count" functionality is added.
+
+
+
+
+ Used to indicate NOT to use ToString(), but read this property instead as a display value.
+
+
+
+
+ When specified, indicates that ToString() should not be performed on the items.
+ This property will be read instead.
+ This is specifically useful on DataTable implementations, where PropertyDescriptors are used to read the values.
+
+
+
+
+ Builds a concatenation list of selected items in the list.
+
+
+
+
+ Indicates whether the Item display value (Name) should include a count.
+
+
+
+
+ Reset all counts to zero.
+
+
+
+
+ Creates a ObjectSelectionWrapper item.
+ Note that the constructor signature of sub classes classes are important.
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Used together with the ListSelectionWrapper in order to wrap data sources for a CheckBoxComboBox.
+ It helps to ensure you don't add an extra "Selected" property to a class that don't really need or want that information.
+
+
+
+
+
+
+
+
+
+
+
+ Used as a count indicator for the item. Not necessarily displayed.
+
+
+
+
+ Is this item selected.
+
+
+
+
+ A reference to the wrapped item.
+
+
+
+
+ The containing list for these selections.
+
+
+
+
+ An indicator of how many items with the specified status is available for the current filter level.
+ Thaught this would make the app a bit more user-friendly and help not to miss items in Statusses
+ that are not often used.
+
+
+
+
+ A reference to the item wrapped.
+
+
+
+
+ The item display value. If ShowCount is true, it displays the "Name [Count]".
+
+
+
+
+ The textbox display value. The names concatenated.
+
+
+
+
+ Indicates whether the item is selected.
+
+
+
+
+
+
+
+
+
+
+
+
+
控件状态
@@ -4358,6 +5182,9 @@
超级颜色选择控件
+
+ 分页控件
+
@@ -6260,6 +7087,38 @@
+
+
+ 密码控件
+
+
+
+
+
+
+
+
+
+ 密码
+
+
+
+
+ 必需的设计器变量。
+
+
+
+
+ 清理所有正在使用的资源。
+
+ 如果应释放托管资源,为 true;否则为 false。
+
+
+
+ 设计器支持所需的方法 - 不要
+ 使用代码编辑器修改此方法的内容。
+
+
分页控件
@@ -7769,6 +8628,16 @@
标签创建时事件
+
+
+ 标签激活前事件
+
+
+
+
+ 标签激活后事件
+
+
在标签栏创建时激发
@@ -7841,6 +8710,11 @@
标题栏图标尺寸
+
+
+ 窗体图标,如果设置本项,将不使用Icon属性
+
+
标题栏图标与窗体左边框的距离
@@ -7916,6 +8790,18 @@
MGdUI皮肤
+
+
+
+
+
+
+
+
+
+
+
+
获取子窗体
@@ -7963,6 +8849,11 @@
to make the client area to have 3D view
+
+
+ 双击事件
+
+
消息
@@ -8757,6 +9648,15 @@
皮肤主题
+
+
+ 设置百分比
+
+
+
+
+
+
引发 ValueChanged 事件
@@ -8870,7 +9770,7 @@
布局比较简单的Object
-
+
@@ -14498,22 +15398,26 @@
- The contents of the control will be updated immediately after setting this property.
+ 设置此属性后,控件的内容将立即更新。
- This method preserves selection, if possible. Use if
- you do not want to preserve the selection. Preserving selection is the slowest part of this
- code and performance is O(n) where n is the number of selected rows.
- This method is not thread safe.
- The property DOES work on virtual lists: setting is problem-free, but if you try to get it
- and the list has 10 million objects, it may take some time to return.
- This collection is unfiltered. Use to access just those objects
- that survive any installed filters.
+ 如果可能,此方法将保留所选内容。使用 if
+ 如果您不想保留所选内容,请执行以下操作。
+ 保留选择是该代码中最慢的部分,性能为O(N),其中n是选定的行数。
+ 此方法不是线程安全的。
+ 该属性确实适用于虚拟列表:设置是没有问题的,但如果您尝试获取它,
+ 并且列表有1000万个对象,则可能需要一些时间才能返回。
+ 此集合未经过筛选。使用 只访问那些在任何已安装的筛选器中幸存下来的对象。
+
+
+ 获取当前控件所有对象组成的列表
+
+
- Gets the collection of objects that will be considered when creating clusters
- (which are used to generate Excel-like column filters)
+ 获取创建群集时将考虑的对象集合。
+ (用于生成类似Excel的列筛选器)
@@ -14647,18 +15551,17 @@
SelectColumnsOnRightClickBehaviour设置为InlineMenu时才有效。当行为设置为SubMenu菜单时,该选项不起作用。
-
- Gets or sets the column that is drawn with a slight tint.
-
-
-
- If TintSortColumn is true, the sort column will automatically
- be made the selected column.
-
-
- The colour of the tint is controlled by SelectedColumnTint.
-
-
+
+ 获取或设置选定列
+
+
+
+ 如果TintSortColumn为true,则排序列将自动成为选定列。
+
+
+ 色调的颜色由SelectedColumnTint控制。
+
+
@@ -14996,12 +15899,11 @@
- This delegate fetches the checkedness of an object as a boolean only.
+ 此委托仅将对象的检查性作为布尔值获取。
- Use this if you never want to worry about the
- Indeterminate state (which is fairly common).
+ 如果您永远不想担心不确定状态(这是相当常见的),请使用此选项。
- This is a convenience wrapper around the CheckStateGetter property.
+ 这是CheckStateGetter属性的便捷包装。
@@ -15019,7 +15921,7 @@
- Gets whether or not this listview is capabale of showing groups
+ 获取此列表视图是否能够显示组
@@ -15057,20 +15959,17 @@
- The name of the property (or field) that holds whether or not a model is checked.
+ 保存是否选中模型的属性(或字段)的名称。
- The property be modifiable. It must have a return type of bool (or of bool? if
- TriStateCheckBoxes is true).
- Setting this property replaces any CheckStateGetter or CheckStatePutter that have been installed.
- Conversely, later setting the CheckStateGetter or CheckStatePutter properties will take precedence
- over the behavior of this property.
+ 该属性是可修改的。它必须具有bool(或bool?)返回类型。如果TriStateCheckBooks为真)。
+ 设置此属性将替换任何已安装的CheckStateGetter或CheckStatePutter。
+ 相反,稍后设置CheckStateGetter或CheckStatePutter属性将优先于此属性的行为。
- This delegate will be called whenever the ObjectListView needs to know the check state
- of the row associated with a given model object.
+ 只要ObjectListView需要知道与给定模型对象关联的行的检查状态,就会调用此委托。
.NET has no support for indeterminate values, but as of v2.0, this class allows
@@ -15085,20 +15984,19 @@
-
- This delegate can be used to sort the table in a custom fasion.
-
-
-
- The delegate must install a ListViewItemSorter on the ObjectListView.
- Installing the ItemSorter does the actual work of sorting the ListViewItems.
- See ColumnComparer in the code for an example of what an ItemSorter has to do.
-
-
- Do not install a CustomSorter on a VirtualObjectListView. Override the SortObjects()
- method of the IVirtualListDataSource instead.
-
-
+
+ 此委托可用于以自定义方式对表进行排序。
+
+
+
+ 委托必须在ObjectListView上安装ListViewItemSorter。
+ 安装ItemSorter会执行对ListViewItems进行排序的实际工作。
+ 有关ItemSorter必须执行的操作的示例,请参见代码中的ColumnCompeller。
+
+
+ 请勿在VirtualObjectListView上安装CustomSorter。改为重写IVirtualListDataSource的SortObjects()方法。
+
+
@@ -15132,77 +16030,69 @@
- Add the given model object to this control.
+ 将给定的模型对象添加到此控件。
- The model object to be displayed
+ 要显示的模型对象
See AddObjects() for more details
- Add the given collection of model objects to this control.
+ 将给定的模型对象集合添加到此控件。
- A collection of model objects
+ 要显示的模型对象集合
- The added objects will appear in their correct sort position, if sorting
- is active (i.e. if PrimarySortColumn is not null). Otherwise, they will appear at the end of the list.
- No check is performed to see if any of the objects are already in the ListView.
- Null objects are silently ignored.
+ 如果排序处于活动状态(即,如果PrimarySortColumn不为空),则添加的对象将出现在其正确的排序位置。否则,它们将出现在列表的末尾。
+ 不执行任何检查以查看是否有任何对象已在ListView中。
+ 空对象将被静默忽略。
- Resize the columns to the maximum of the header width and the data.
+ 将列的大小调整到页眉宽度和数据的最大值。
-
- Set up any automatically initialized column widths (columns that
- have a width of 0 or -1 will be resized to the width of their
- contents or header respectively).
-
-
- Obviously, this will only work once. Once it runs, the columns widths will
- be changed to something else (other than 0 or -1), so it wont do anything the
- second time through. Use to force all columns
- to change their size.
-
+
+ 设置任何自动初始化的列宽(宽度为0或-1的列将分别调整为其内容或标题的宽度)。
+
+
+ 显然,这只会起作用一次。一旦运行,列宽将更改为其他值(不是0或-1),因此第二次运行时不会执行任何操作。
+ 若要强制所有列更改其大小,请使用 。
+
- Organise the view items into groups, based on the last sort column or the first column
- if there is no last sort column
+ 根据最后一个排序列或第一列(如果没有最后一个排序列)将视图项组织到组中
- Organise the view items into groups, based on the given column
+ 根据给定列将视图项组织成组
- If the AlwaysGroupByColumn property is not null,
- the list view items will be organisd by that column,
- and the 'column' parameter will be ignored.
+ 如果AlwaysGroupByColumn属性不为Null,则列表视图项将按该列组织,并且将忽略‘Column’参数。
- This method triggers sorting events: BeforeSorting and AfterSorting.
+ 此方法触发排序事件:BeforeSorting和AfterSorting。
- The column whose values should be used for sorting.
+ 其值应用于排序的列。
- Organise the view items into groups, based on the given columns
+ 根据给定列将视图项组织成组
- What column will be used for grouping
- What ordering will be used for groups
- The column whose values should be used for sorting. Cannot be null
- The order in which the values from column will be sorted
- When the values from 'column' are equal, use the values provided by this column
- How will the secondary values be sorted
- This method does not trigger sorting events. Use BuildGroups() to do that
+ 将使用哪一列进行分组
+ 组将使用什么顺序
+ 其值应用于排序的列。不能为空
+ 列中值的排序顺序
+ 当‘column’中的值相等时,请使用此列提供的值
+ 次级值将如何排序
+ 此方法不会触发排序事件。使用BuildGroups()执行此操作
- Collect and return all the variables that influence the creation of groups
+ 收集并返回影响组创建的所有变量
@@ -15217,12 +16107,12 @@
- Build/rebuild all the list view items in the list, preserving as much state as is possible
+ 生成/重新生成列表中的所有列表视图项,尽可能多地保留状态
- Build/rebuild all the list view items in the list
+ 生成/重新生成列表中的所有列表视图项
If this is true, the control will try to preserve the selection,
focused item, and the scroll position (see Remarks)
@@ -15236,7 +16126,7 @@
- Clear any cached info this list may have been using
+ 清除此列表可能一直在使用的所有缓存信息
@@ -15271,85 +16161,90 @@
- Remove all items from this list
+ 移除所有对象(线程安全)
This method can safely be called from background threads.
- Reset the memory of which URLs have been visited
+ 重置已访问其URL的内存
-
- Copy a text and html representation of the selected rows onto the clipboard.
-
- Be careful when using this with virtual lists. If the user has selected
- 10,000,000 rows, this method will faithfully try to copy all of them to the clipboard.
- From the user's point of view, your program will appear to have hung.
+
+ 将选定行的文本和HTML表示复制到剪贴板上。
+
+ Be careful when using this with virtual lists. If the user has selected
+ 10,000,000 rows, this method will faithfully try to copy all of them to the clipboard.
+ From the user's point of view, your program will appear to have hung.
- Copy a text and html representation of the given objects onto the clipboard.
+ 将给定对象的文本和HTML表示复制到剪贴板上。
+
+
+
+
+ 将所有对象的文本和HTML表示复制到剪贴板上。
- Return a html representation of the given objects
+ 返回给定对象的html表示形式
- Deselect all rows in the listview
+ 取消选择列表视图中的所有行
-
- Return the ListViewItem that appears immediately after the given item.
- If the given item is null, the first item in the list will be returned.
- Return null if the given item is the last item.
-
- The item that is before the item that is returned, or null
- A ListViewItem
+
+ 返回紧跟在给定项后面的ListViewItem。
+ 如果给定项为空,则返回列表中的第一个项。
+ 如果给定项是最后一项,则返回NULL。
+
+ The item that is before the item that is returned, or null
+ A ListViewItem
-
- Return the last item in the order they are shown to the user.
- If the control is not grouped, the display order is the same as the
- sorted list order. But if the list is grouped, the display order is different.
-
-
+
+ 按向用户显示的顺序返回最后一项。
+ 如果控件未分组,则显示顺序与排序的列表顺序相同。
+ 但如果列表是分组的,则显示顺序不同。
+
+
-
- Return the n'th item (0-based) in the order they are shown to the user.
- If the control is not grouped, the display order is the same as the
- sorted list order. But if the list is grouped, the display order is different.
-
-
-
+
+ 按向用户显示的顺序返回第n项(从0开始)。
+ 如果控件未分组,则显示顺序与排序的列表顺序相同。
+ 但如果列表是分组的,则显示顺序不同。
+
+
+
-
- Return the display index of the given listviewitem index.
- If the control is not grouped, the display order is the same as the
- sorted list order. But if the list is grouped, the display order is different.
-
-
-
+
+ 返回给定listviewitem索引的显示索引。
+ 如果控件未分组,则显示顺序与排序的列表顺序相同。
+ 但如果列表是分组的,则显示顺序不同。
+
+
+
-
- Return the ListViewItem that appears immediately before the given item.
- If the given item is null, the last item in the list will be returned.
- Return null if the given item is the first item.
-
- The item that is before the item that is returned
- A ListViewItem
+
+ 返回紧接在给定项之前出现的ListViewItem。
+ 如果给定项为空,则返回列表中的最后一项。
+ 如果给定项是第一项,则返回NULL。
+
+ The item that is before the item that is returned
+ A ListViewItem
- Insert the given collection of objects before the given position
+ 在给定位置之前插入给定的对象集合
Where to insert the objects
The objects to be inserted
@@ -15364,21 +16259,21 @@
- Return true if the row representing the given model is selected
+ 如果选择了表示给定模型的行,则返回TRUE
The model object to look for
Is the row selected
- Has the given URL been visited?
+ 给定的URL是否已被访问
The string to be consider
Has it been visited
- Scroll the ListView by the given deltas.
+ 按给定的值增量滚动ListView。
Horizontal delta
Vertical delta
@@ -15389,32 +16284,32 @@
-
- Remember that the given URL has been visited
-
- The url to be remembered
- This does not cause the control be redrawn
+
+ 记住给定的URL已被访问
+
+ The url to be remembered
+ This does not cause the control be redrawn
- Move the given collection of objects to the given index.
+ 将给定的对象集合移动到给定的索引。
- This operation only makes sense on non-grouped ObjectListViews.
+ 此操作仅对未分组的ObjectListViews有意义。
-
- Calculate what item is under the given point?
-
-
-
-
+
+ 计算在给定点下的项目是什么?
+
+
+
+
- Perform a hit test using the Windows control's SUBITEMHITTEST message.
- This provides information about group hits that the standard ListView.HitTest() does not.
+ 使用Windows控件的SUBITEMHITTEST消息执行点击测试。
+ 这提供了标准ListView.HitTest()不提供的有关组点击的信息。
@@ -15459,7 +16354,7 @@
- Remove the given model object from the ListView
+ 从ListView中删除给定的模型对象
The model to be removed
See RemoveObjects() for more details
@@ -15467,58 +16362,56 @@
-
- Remove all of the given objects from the control.
-
- Collection of objects to be removed
-
- Nulls and model objects that are not in the ListView are silently ignored.
- This method is thread-safe.
-
+
+ 从控件中移除所有给定对象。
+
+ Collection of objects to be removed
+
+ Nulls and model objects that are not in the ListView are silently ignored.
+ This method is thread-safe.
+
- Select all rows in the listview
+ 选择列表视图中的所有行
-
- Set the given image to be fixed in the bottom right of the list view.
- This image will not scroll when the list view scrolls.
-
-
-
- This method uses ListView's native ability to display a background image.
- It has a few limitations:
-
-
- - It doesn't work well with owner drawn mode. In owner drawn mode, each cell draws itself,
- including its background, which covers the background image.
- - It doesn't look very good when grid lines are enabled, since the grid lines are drawn over the image.
- - It does not work at all on XP.
- - Obviously, it doesn't look good when alternate row background colors are enabled.
-
-
- If you can live with these limitations, native watermarks are quite neat. They are true backgrounds, not
- translucent overlays like the OverlayImage uses. They also have the decided advantage over overlays in that
- they work correctly even in MDI applications.
-
- Setting this clears any background image.
-
- The image to be drawn. If null, any existing image will be removed.
+
+ 在列表视图的右下角设置要固定的给定图像。
+ 当列表视图滚动时,此图像不会滚动。
+
+
+
+ 此方法使用ListView的原生功能显示背景图像。
+ 它有几个限制:
+
+
+ - 它在owner drawn模式下不能很好地工作。在owner drawn绘制模式下,
+ 每个单元格都会绘制自身,包括覆盖背景图像的背景。
+ - 启用网格线时看起来不是很好,因为网格线是在图像上绘制的。
+ - 它在XP上完全不起作用。
+ - 显然,当启用交替行背景色时,效果不佳。
+
+
+ 如果你能忍受这些限制,原生水印就相当不错了。
+ 它们是真实的背景,而不是像OverlayImage使用的半透明覆盖。
+ 与覆盖相比,它们也有明显的优势,因为即使在MDI应用程序中,它们也可以正常工作。
+
+ 设置此选项将清除所有背景图像。
+
+ The image to be drawn. If null, any existing image will be removed.
- Set the given image to be background of the ListView so that it appears at the given
- percentage offsets within the list.
+ 将给定的图像设置为ListView的背景,以便它在列表中以给定的百分比偏移量显示。
- This has the same limitations as described in . Make sure those limitations
- are understood before using the method.
- This is very similar to setting the property of the standard .NET ListView, except that the standard
- BackgroundImage does not handle images with transparent areas properly -- it renders transparent areas as black. This
- method does not have that problem.
- Setting this clears any background watermark.
+ 这具有与 中所述的相同限制.
+ 在使用该方法之前,请确保了解这些限制。
+ 这非常类似于 属性,
+ 但标准Backround Image不能正确处理具有透明区域的图像--它将透明区域呈现为黑色。这种方法没有这个问题。
+ 设置此选项将清除所有背景水印。
The image to be drawn. If null, any existing image will be removed.
The horizontal percentage where the image will be placed. 0 is absolute left, 100 is absolute right.
@@ -15526,64 +16419,63 @@
- Set the given image to be the tiled background of the ListView.
+ 将给定图像设置为ListView的平铺背景。
- This has the same limitations as described in and .
- Make sure those limitations
- are understood before using the method.
+ 这具有与 和 相同的限制.
+ 在使用该方法之前,请确保了解这些限制。
- The image to be drawn. If null, any existing image will be removed.
+ 要绘制的图像。如果为null,则将删除所有现有图像。
- Set the collection of objects that will be shown in this list view.
+ 设置将在此列表视图中显示的对象集合。
- This method can safely be called from background threads.
- The list is updated immediately
+ 可以从后台线程安全地调用此方法。
+ 该列表将立即更新
The objects to be displayed
- Set the collection of objects that will be shown in this list view.
+ 设置将在此列表视图中显示的对象集合。
- This method can safely be called from background threads.
- The list is updated immediately
+ 可以从后台线程安全地调用此方法.
+ 该列表将立即更新
The objects to be displayed
- Should the state of the list be preserved as far as is possible.
+ 是否应尽可能保留列表的状态。
-
- Update the given model object into the ListView. The model will be added if it doesn't already exist.
-
- The model to be updated
-
-
- See for more details
-
- This method is thread-safe.
- This method will cause the list to be resorted.
- This method only works on ObjectListViews and FastObjectListViews.
-
+
+ 将给定的模型对象更新到ListView中。
+ 如果该模型尚不存在,则会添加该模型。
+
+ The model to be updated
+
+
+ See for more details
+
+ 此方法是线程安全的。
+ 此方法将导致重新排序列表。
+ 此方法仅适用于ObjectListViews和FastObjectListViews。
+
-
- Update the pre-existing models that are equal to the given objects. If any of the model doesn't
- already exist in the control, they will be added.
-
- Collection of objects to be updated/added
-
- This method will cause the list to be resorted.
- Nulls are silently ignored.
- This method is thread-safe.
- This method only works on ObjectListViews and FastObjectListViews.
-
+
+ 更新与给定对象相等的预先存在的模型。
+ 如果控件中不存在任何模型,则会添加它们。
+
+ Collection of objects to be updated/added
+
+ 此方法将导致重新排序列表。
+ null值将被静默忽略。
+ 此方法是线程安全的。
+ 此方法仅适用于ObjectListViews和FastObjectListViews。
+
- Change any subscriptions to INotifyPropertyChanged events on our current
- model objects so that we no longer listen for events on the old models
- and do listen for events on the given collection.
+ 更改当前模型对象上对INotifyPropertyChanged事件的任何订阅,
+ 以便我们不再侦听旧模型上的事件,而侦听给定集合上的事件。
This does nothing if UseNotifyPropertyChanged is false.
@@ -16607,7 +17499,7 @@
- Return the tooltip that should be shown when the mouse is hovered over the given cell
+ 返回当鼠标悬停在给定单元格上时应显示的工具提示
The column index whose tool tip is to be fetched
The row index whose tool tip is to be fetched
@@ -16615,7 +17507,7 @@
- Return the OLVListItem that displays the given model object
+ 返回显示给定模型对象的OLVListItem
The modelObject whose item is to be found
The OLVListItem that displays the model, or null
@@ -16633,7 +17525,7 @@
- Prepare the listview to show alternate row backcolors
+ 准备列表视图以显示交替的行背景色
We cannot rely on lvi.Index in this method.
In a straight list, lvi.Index is the display index, and can be used to determine
@@ -16648,7 +17540,7 @@
- Tell the underlying list control which images to show against the subitems
+ 告诉基础列表控件针对子项显示哪些图像
the index at which the item occurs
the item whose subitems are to be set
@@ -16687,7 +17579,7 @@
- Trigger FormatRow and possibly FormatCell events for the given item
+ 触发给定项目的FormatRow和可能的FormatCell事件
@@ -16695,7 +17587,7 @@
- Trigger FormatCell events for the given item
+ 触发给定项目的FormatCell事件
@@ -22335,6 +23227,20 @@
The value of the aspect that should be displayed
A string representation of the aspect
+
+
+ Convert the aspect object to its string representation.
+
+
+ If the column has been given a AspectToStringConverter, that will be used to do
+ the conversion, otherwise just use ToString().
+ The returned value will not be null. Nulls are always converted
+ to empty strings.
+
+
+ The value of the aspect that should be displayed
+ A string representation of the aspect
+
Decide the clustering strategy that will be used for this column
@@ -24388,65 +25294,79 @@
- Should this bar be drawn in the system style?
+ 此栏是否应以系统样式绘制?
- How many pixels in from our cell border will this bar be drawn
+ 将从我们的单元格边框开始绘制多少像素的条形图
-
- What color will be used to fill the interior of the control before the
- progress bar is drawn?
-
+
+ 在绘制进度条之前,将使用什么颜色填充控件内部?
+
- What color should the frame of the progress bar be?
+ 进度条边框颜色
- How many pixels wide should the frame of the progress bar be?
+ 进度条的边框像素宽
- What color should the 'filled in' part of the progress bar be?
+ 进度条的“填充”部分应该是什么颜色?
- This is only used if GradientStartColor is Color.Empty
+ 仅当GradientStartColor为Color.Empty时才使用此选项
- Use a gradient to fill the progress bar starting with this color
+ 使用渐变以此颜色开始填充进度条
- Use a gradient to fill the progress bar ending with this color
+ 使用渐变填充以此颜色结尾的进度条
+
+
+
+
+ 使用渐变以此颜色开始填充渐满进度条
+
+
+
+
+ 使用渐变填充以此颜色结尾的渐满进度条
- Regardless of how wide the column become the progress bar will never be wider than this
+ 无论列变得多宽,进度条都不会比这个宽。
- Regardless of how high the cell is the progress bar will never be taller than this
+ 无论单元格有多高,进度条都不会比这个高
- The minimum data value expected. Values less than this will given an empty bar
+ 预期的最小数据值。小于此值的值将显示一个空条。
+
+
+
+
+ 接近满时的值,高于该值时,显示不同颜色,小于等于MinimumValue或大于MaximumValue值,则表示未设置该值
-
- The maximum value for the range. Values greater than this will give a full bar
-
+
+ 范围的最大值。大于此值的值将给出一个完整的条形。
+
@@ -24458,6 +25378,11 @@
The brush that will be used to fill the bar
+
+
+ The brush that will be used to fill the bar
+
+
The brush that will be used to fill the background of the bar
@@ -28224,7 +29149,7 @@
- Initializes a new instance of the class.
+ Initializes a new instance of the PopupControl.ComboBox class.
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 6bee153..c13617d 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,4 +1,10 @@
-### 2021-09-03更新
+### 2023-01-21更新
+------
+#### SuperDesign V2.0.2301.2101
+- *.[新增]新增API编辑器,自动保存和快速插入修改参数。
+- *.[改进]使用新款高亮编辑器。
+
+### 2021-09-03更新
------
#### SuperDesign V2.0.2109.0301
- *.[改进]全新网页抓取工具,对历史记录支持编辑和收藏。
diff --git a/Source/.vs/开发辅助工具/v16/.suo b/Source/.vs/开发辅助工具/v16/.suo
index b5d6d1f..c95daf1 100644
Binary files a/Source/.vs/开发辅助工具/v16/.suo and b/Source/.vs/开发辅助工具/v16/.suo differ
diff --git a/Source/.vs/开发辅助工具/v17/.suo b/Source/.vs/开发辅助工具/v17/.suo
index 64350ed..f206974 100644
Binary files a/Source/.vs/开发辅助工具/v17/.suo and b/Source/.vs/开发辅助工具/v17/.suo differ
diff --git a/Source/开发辅助工具/Controls/ContextMenuStripHighlightText.Designer.cs b/Source/开发辅助工具/Controls/ContextMenuStripHighlightText.Designer.cs
deleted file mode 100644
index 123ac34..0000000
--- a/Source/开发辅助工具/Controls/ContextMenuStripHighlightText.Designer.cs
+++ /dev/null
@@ -1,42 +0,0 @@
-namespace ryProcessManager.hezuo
-{
- partial class ContextMenuStripHighlightText
- {
- ///
- /// 必需的设计器变量。
- ///
- private System.ComponentModel.IContainer components = null;
-
- ///
- /// 清理所有正在使用的资源。
- ///
- /// 如果应释放托管资源,为 true;否则为 false。
- protected override void Dispose(bool disposing)
- {
- if (disposing && (components != null))
- {
- components.Dispose();
- }
- base.Dispose(disposing);
- }
-
- #region 组件设计器生成的代码
-
- ///
- /// 设计器支持所需的方法 - 不要修改
- /// 使用代码编辑器修改此方法的内容。
- ///
- private void InitializeComponent()
- {
- this.SuspendLayout();
- //
- // ContextMenuStripRichText
- //
- this.Opening += new System.ComponentModel.CancelEventHandler(this.ContextMenuStripRichText_Opening);
- this.ResumeLayout(false);
-
- }
-
- #endregion
- }
-}
diff --git a/Source/开发辅助工具/Controls/ContextMenuStripHighlightText.cs b/Source/开发辅助工具/Controls/ContextMenuStripHighlightText.cs
deleted file mode 100644
index af84d47..0000000
--- a/Source/开发辅助工具/Controls/ContextMenuStripHighlightText.cs
+++ /dev/null
@@ -1,137 +0,0 @@
-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;
-
-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 FastColoredTextBoxNS.FastColoredTextBox)) { return; }
- var rich_txt = (FastColoredTextBoxNS.FastColoredTextBox)base.SourceControl;
- rich_txt.ShowFindDialog();
- }
- private void SelectAll_Click(object sender, EventArgs e)
- {
- if (!(base.SourceControl is FastColoredTextBoxNS.FastColoredTextBox)) { return; }
- var rich_txt = (FastColoredTextBoxNS.FastColoredTextBox)base.SourceControl;
- rich_txt.SelectAll();
- //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 FastColoredTextBoxNS.FastColoredTextBox)) { return; }
- var rich_txt = (FastColoredTextBoxNS.FastColoredTextBox)base.SourceControl;
- rich_txt.Undo();
- }
- private void Redo_Click(object sender, EventArgs e)
- {
- if (!(base.SourceControl is FastColoredTextBoxNS.FastColoredTextBox)) { return; }
- var rich_txt = (FastColoredTextBoxNS.FastColoredTextBox)base.SourceControl;
- rich_txt.Redo();
- }
- private void Cut_Click(object sender, EventArgs e)
- {
- if (!(base.SourceControl is FastColoredTextBoxNS.FastColoredTextBox)) { return; }
- var rich_txt = (FastColoredTextBoxNS.FastColoredTextBox)base.SourceControl;
- rich_txt.Cut();
- }
- private void Copy_Click(object sender, EventArgs e)
- {
- if (!(base.SourceControl is FastColoredTextBoxNS.FastColoredTextBox)) { return; }
- var rich_txt = (FastColoredTextBoxNS.FastColoredTextBox)base.SourceControl;
- var ss = rich_txt.SelectedText;
- rich_txt.Copy();
- }
- private void Paste_Click(object sender, EventArgs e)
- {
- if (!(base.SourceControl is FastColoredTextBoxNS.FastColoredTextBox)) { return; }
- var rich_txt = (FastColoredTextBoxNS.FastColoredTextBox)base.SourceControl;
- rich_txt.Paste();
- }
- private void Del_Click(object sender, EventArgs e)
- {
- if (!(base.SourceControl is FastColoredTextBoxNS.FastColoredTextBox)) { return; }
- var rich_txt = (FastColoredTextBoxNS.FastColoredTextBox)base.SourceControl;
- rich_txt.SelectedText="";
- }
- 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 FastColoredTextBoxNS.FastColoredTextBox)) { return; }
- var rich_txt = (FastColoredTextBoxNS.FastColoredTextBox)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.UndoEnabled && !rich_txt.ReadOnly;
- break;
- case "redo":
- item.Enabled = rich_txt.RedoEnabled && !rich_txt.ReadOnly;
- 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.ReadOnly;
- 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;
- }
- }
- }
- }
-}
diff --git a/Source/开发辅助工具/Controls/ContextMenuStripHighlightText.resx b/Source/开发辅助工具/Controls/ContextMenuStripHighlightText.resx
deleted file mode 100644
index e5858cc..0000000
--- a/Source/开发辅助工具/Controls/ContextMenuStripHighlightText.resx
+++ /dev/null
@@ -1,123 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- text/microsoft-resx
-
-
- 2.0
-
-
- System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
-
-
- System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
-
-
- False
-
-
\ No newline at end of file
diff --git a/Source/开发辅助工具/Controls/FrmText.Designer.cs b/Source/开发辅助工具/Controls/FrmText.Designer.cs
index 96e0302..76ab0d1 100644
--- a/Source/开发辅助工具/Controls/FrmText.Designer.cs
+++ b/Source/开发辅助工具/Controls/FrmText.Designer.cs
@@ -1,33 +1,33 @@
-namespace 开发辅助工具.Controls
-{
- partial class FrmText
- {
- ///
- /// Required designer variable.
- ///
- private System.ComponentModel.IContainer components = null;
-
- ///
- /// Clean up any resources being used.
- ///
- /// true if managed resources should be disposed; otherwise, false.
- protected override void Dispose(bool disposing)
- {
- if (disposing && (components != null))
- {
- components.Dispose();
- }
- base.Dispose(disposing);
- }
-
- #region Windows Form Designer generated code
-
- ///
- /// Required method for Designer support - do not modify
- /// the contents of this method with the code editor.
- ///
- private void InitializeComponent()
- {
+namespace 开发辅助工具.Controls
+{
+ partial class FrmText
+ {
+ ///
+ /// Required designer variable.
+ ///
+ private System.ComponentModel.IContainer components = null;
+
+ ///
+ /// Clean up any resources being used.
+ ///
+ /// true if managed resources should be disposed; otherwise, false.
+ protected override void Dispose(bool disposing)
+ {
+ if (disposing && (components != null))
+ {
+ components.Dispose();
+ }
+ base.Dispose(disposing);
+ }
+
+ #region Windows Form Designer generated code
+
+ ///
+ /// Required method for Designer support - do not modify
+ /// the contents of this method with the code editor.
+ ///
+ private void InitializeComponent()
+ {
this.panelEx1 = new ryControls.PanelEx();
this.richTextBox1 = new System.Windows.Forms.RichTextBox();
this.contextMenuStripRichText1 = new ryProcessManager.hezuo.ContextMenuStripRichText();
@@ -92,13 +92,13 @@
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;
- }
+ }
+
+ #endregion
+
+ private ryControls.PanelEx panelEx1;
+ private ryControls.ButtonEx BtnSave;
+ private ryProcessManager.hezuo.ContextMenuStripRichText contextMenuStripRichText1;
+ public System.Windows.Forms.RichTextBox richTextBox1;
+ }
}
\ No newline at end of file
diff --git a/Source/开发辅助工具/Controls/MenuRight.cs b/Source/开发辅助工具/Controls/MenuRight.cs
index c58aced..d273a83 100644
--- a/Source/开发辅助工具/Controls/MenuRight.cs
+++ b/Source/开发辅助工具/Controls/MenuRight.cs
@@ -31,12 +31,12 @@ namespace ryPaiban.Model
{
if (_SourceContent != null)
{
- _SourceContent.FormClosing -= _SourceContent_FormClosing;
+ _SourceContent.FormClosing -= SourceContent_FormClosing;
}
_SourceContent = value;
if (value != null)
{
- _SourceContent.FormClosing += _SourceContent_FormClosing;
+ _SourceContent.FormClosing += SourceContent_FormClosing;
_SourceContent.TabPageContextMenuStrip = this;
}
}
@@ -44,7 +44,7 @@ namespace ryPaiban.Model
}
- private void _SourceContent_FormClosing(object sender, FormClosingEventArgs e)
+ private void SourceContent_FormClosing(object sender, FormClosingEventArgs e)
{
if (Itrycn_Db.IsCloseConfirm)
{
diff --git a/Source/开发辅助工具/Form1.cs b/Source/开发辅助工具/Form1.cs
index 230b886..35bdea3 100644
--- a/Source/开发辅助工具/Form1.cs
+++ b/Source/开发辅助工具/Form1.cs
@@ -1,280 +1,283 @@
-using DotNet4.Utilities;
-using HtmlAgilityPack;
-using Microsoft.Win32;
-using ryCommon;
-using ryCommonDb;
+using DotNet4.Utilities;
+using HtmlAgilityPack;
+using Microsoft.Win32;
+using ryCommon;
+using ryCommonDb;
using Sheng.Winform.Controls.PopupControl;
-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 and IsFav<>1", 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();
+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
+ {
+ public Form1(string ProjectPath,string mode)
+ {
+ 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;
+ 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 and IsFav<>1", 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();
+ 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())
+ {
+ 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();
+ }
+ 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
+ {
+ Icon = Icon
+ };
+ frm.ShowDialog();
+ frm.Dispose();
+ }
+
+ private void BtnCreateProject_Click(object sender, EventArgs e)
+ {
+ FrmCreateProject frm = new FrmCreateProject
+ {
+ Icon = Icon,
+ StartPosition = FormStartPosition.CenterParent
+ };
+ frm.ShowDialog();
+ frm.Dispose();
+ }
+ }
+
+}
diff --git a/Source/开发辅助工具/Form1.resx b/Source/开发辅助工具/Form1.resx
index f481ecf..cd7deb8 100644
--- a/Source/开发辅助工具/Form1.resx
+++ b/Source/开发辅助工具/Form1.resx
@@ -118,7 +118,7 @@
System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
- 17, 17
+ 5, 32
130, 32
diff --git a/Source/开发辅助工具/Manager/FrmToolsSearch.cs b/Source/开发辅助工具/Manager/FrmToolsSearch.cs
index e54aa9d..acf6c20 100644
--- a/Source/开发辅助工具/Manager/FrmToolsSearch.cs
+++ b/Source/开发辅助工具/Manager/FrmToolsSearch.cs
@@ -138,7 +138,6 @@ namespace 开发辅助工具.Tools
{
return;
}
- DataProvider mydb = new DataProvider();
IDbInterface db = Itrycn_Db.CreateDataProvider(Itrycn_Db.dataType);
if (db.ConnDb(Itrycn_Db.Sys_SQLConn) == 1)
{
diff --git a/Source/开发辅助工具/Manager/Itrycn_Info.cs b/Source/开发辅助工具/Manager/Itrycn_Info.cs
index ff38f01..4f3ccbf 100644
--- a/Source/开发辅助工具/Manager/Itrycn_Info.cs
+++ b/Source/开发辅助工具/Manager/Itrycn_Info.cs
@@ -45,7 +45,6 @@ namespace 开发辅助工具.Manager
}
public static void CreateSysTable()
{
- DataProvider mydb = new DataProvider();
IDbInterface db = CreateDataProvider(dataType);
if (db.ConnDb(Sys_SQLConn) == 1)
{
@@ -65,7 +64,6 @@ namespace 开发辅助工具.Manager
}
public static void CreateUserTable()
{
- DataProvider mydb = new DataProvider();
IDbInterface db = CreateDataProvider(dataType);
if (db.ConnDb(User_SQLConn) == 1)
{
@@ -109,12 +107,24 @@ namespace 开发辅助工具.Manager
#endregion
#region 设置表
mySQL.Clear();
- mySQL.TableName = "Settings"; ;
+ mySQL.TableName = "Settings";
mySQL.AddField("Name", "");
mySQL.AddField("Value", "");//值
mySQL.AddField("addTime", DateTime.Now);
db.CreateDb(mySQL);
#endregion
+ #region API表
+ mySQL.Clear();
+ mySQL.TableName = "api";
+ mySQL.AddField("Name", "");
+ mySQL.AddField("Url", "");
+ mySQL.AddField("APIName", "");
+ mySQL.AddField("Postdata", "");
+ mySQL.AddField("ClickCount", 0);//点击次数
+ mySQL.AddField("editTime", DateTime.Now);
+ mySQL.AddField("addTime", DateTime.Now);
+ db.CreateDb(mySQL);
+ #endregion
}
}
}
diff --git a/Source/开发辅助工具/Manager/Json.cs b/Source/开发辅助工具/Manager/Json.cs
index dd6a912..f95d168 100644
--- a/Source/开发辅助工具/Manager/Json.cs
+++ b/Source/开发辅助工具/Manager/Json.cs
@@ -47,7 +47,7 @@ namespace 开发辅助工具.Manager
{
try
{
- var jo= (JObject)JsonConvert.DeserializeObject(str);
+ var jo= JsonConvert.DeserializeObject(str);
return true;
}
catch(Exception ex)
diff --git a/Source/开发辅助工具/Manager/RyProject.cs b/Source/开发辅助工具/Manager/RyProject.cs
index 74e6012..97c125d 100644
--- a/Source/开发辅助工具/Manager/RyProject.cs
+++ b/Source/开发辅助工具/Manager/RyProject.cs
@@ -188,12 +188,13 @@ namespace 开发辅助工具.Manager
if (RyFiles.CopyFile(sourch_folder + "\\x64\\*", _path + "\\x64\\") != 0)
{ _error_str += sourch_folder + "\\x64\\*\r\n"; error++; }
}
- if (RyFiles.CopyFile(dllpath, files[i]) != 0)
+ if (dllpath!= files[i] && 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)
+ var to_xml_path = System.IO.Path.GetDirectoryName(files[i]) + "\\" + System.IO.Path.GetFileNameWithoutExtension(files[i]) + ".xml";
+ if (dll_xml_path.ToLower()!=to_xml_path.ToLower() && RyFiles.CopyFile(dll_xml_path, to_xml_path) != 0)
{ _error_str += files[i] + "\r\n"; error++; }
}
}
diff --git a/Source/开发辅助工具/Properties/AssemblyInfo.cs b/Source/开发辅助工具/Properties/AssemblyInfo.cs
index f303c14..a35d14f 100644
--- a/Source/开发辅助工具/Properties/AssemblyInfo.cs
+++ b/Source/开发辅助工具/Properties/AssemblyInfo.cs
@@ -31,5 +31,5 @@ using System.Runtime.InteropServices;
// 可以指定所有值,也可以使用以下所示的 "*" 预置版本号和修订号
// 方法是按如下所示使用“*”: :
// [assembly: AssemblyVersion("1.0.*")]
-[assembly: AssemblyVersion("2.0.2109.0301")]
-[assembly: AssemblyFileVersion("2.0.2109.0301")]
\ No newline at end of file
+[assembly: AssemblyVersion("2.0.2301.2101")]
+[assembly: AssemblyFileVersion("2.0.2301.2101")]
\ No newline at end of file
diff --git a/Source/开发辅助工具/Properties/Resources.Designer.cs b/Source/开发辅助工具/Properties/Resources.Designer.cs
index 1417f19..9ff0f13 100644
--- a/Source/开发辅助工具/Properties/Resources.Designer.cs
+++ b/Source/开发辅助工具/Properties/Resources.Designer.cs
@@ -59,5 +59,55 @@ namespace SuperDesign.Properties {
resourceCulture = value;
}
}
+
+ ///
+ /// 查找 System.Drawing.Bitmap 类型的本地化资源。
+ ///
+ internal static System.Drawing.Bitmap Clock {
+ get {
+ object obj = ResourceManager.GetObject("Clock", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+
+ ///
+ /// 查找 System.Drawing.Bitmap 类型的本地化资源。
+ ///
+ internal static System.Drawing.Bitmap DeleteHS {
+ get {
+ object obj = ResourceManager.GetObject("DeleteHS", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+
+ ///
+ /// 查找 System.Drawing.Bitmap 类型的本地化资源。
+ ///
+ internal static System.Drawing.Bitmap GoToNextMessage {
+ get {
+ object obj = ResourceManager.GetObject("GoToNextMessage", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+
+ ///
+ /// 查找 System.Drawing.Bitmap 类型的本地化资源。
+ ///
+ internal static System.Drawing.Bitmap GoToPreviousMessage {
+ get {
+ object obj = ResourceManager.GetObject("GoToPreviousMessage", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+
+ ///
+ /// 查找 System.Drawing.Bitmap 类型的本地化资源。
+ ///
+ internal static System.Drawing.Bitmap LineColorHS {
+ get {
+ object obj = ResourceManager.GetObject("LineColorHS", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
}
}
diff --git a/Source/开发辅助工具/Properties/Resources.resx b/Source/开发辅助工具/Properties/Resources.resx
index af7dbeb..7b0d3e4 100644
--- a/Source/开发辅助工具/Properties/Resources.resx
+++ b/Source/开发辅助工具/Properties/Resources.resx
@@ -46,7 +46,7 @@
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
- : System.Serialization.Formatters.Binary.BinaryFormatter
+ : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
@@ -60,6 +60,7 @@
: and then encoded with base64 encoding.
-->
+
@@ -68,9 +69,10 @@
-
+
+
@@ -85,9 +87,10 @@
-
+
+
@@ -109,9 +112,25 @@
2.0
- System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+ System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
- System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ ..\Resources\clock.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
+
+
+ ..\Resources\deletehs.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
+
+
+ ..\Resources\gotonextmessage.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
+
+
+ ..\Resources\gotopreviousmessage.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
+
+
+ ..\Resources\linecolorhs.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
+
\ No newline at end of file
diff --git a/Source/开发辅助工具/SuperDesign.csproj b/Source/开发辅助工具/SuperDesign.csproj
index 150230d..a5318d9 100644
--- a/Source/开发辅助工具/SuperDesign.csproj
+++ b/Source/开发辅助工具/SuperDesign.csproj
@@ -11,6 +11,23 @@
v4.5.2
512
+
+
+ publish\
+ true
+ Disk
+ false
+ Foreground
+ 7
+ Days
+ false
+ false
+ true
+ 0
+ 1.0.0.%2a
+ false
+ false
+ true
AnyCPU
@@ -22,6 +39,7 @@
prompt
4
false
+ true
AnyCPU
@@ -37,10 +55,6 @@
gaim_48px_29650_easyicon.net.ico
-
- False
- ..\..\Bin\Debug\SuperDesign\FastColoredTextBox.dll
-
..\..\Bin\Debug\SupperDesign\MyDb.dll
@@ -54,11 +68,17 @@
..\..\Bin\Debug\SupperDesign\ryControls.dll
+
+ False
+ ..\..\Bin\Debug\SuperDesign\Scintilla.NET.dll
+
C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5.2\System.dll
+
+
@@ -81,11 +101,12 @@
-
+
+
Component
-
- ContextMenuStripHighlightText.cs
+
+ ContextMenuStripHighlightText2.cs
Component
@@ -111,6 +132,79 @@
FrmTitle.cs
+
+ UserControl
+
+
+ FindAllResultsPanel.cs
+
+
+
+ Component
+
+
+ Form
+
+
+ FindReplaceDialog.cs
+
+
+ UserControl
+
+
+ IncrementalSearcher.cs
+
+
+ Component
+
+
+ Form
+
+
+ FrmFindOrReplace.cs
+
+
+
+ Form
+
+
+ GoToDialog.cs
+
+
+ Component
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Component
@@ -143,6 +237,7 @@
FrmSetting.cs
+
@@ -159,6 +254,18 @@
+
+ Form
+
+
+ APIEditor.cs
+
+
+ Form
+
+
+ FrmAddPostParam.cs
+
Form
@@ -261,8 +368,8 @@
FrmXpath.cs
-
- ContextMenuStripHighlightText.cs
+
+ ContextMenuStripHighlightText2.cs
ContextMenuStripRichText.cs
@@ -276,6 +383,24 @@
FrmTitle.cs
+
+ FindAllResultsPanel.cs
+
+
+ FindReplaceDialog.cs
+
+
+ IncrementalSearcher.cs
+
+
+ FrmFindOrReplace.cs
+
+
+ GoToDialog.cs
+
+
+ HighlightEditor.cs
+
Form1.cs
@@ -301,6 +426,12 @@
Resources.resx
True
+
+ APIEditor.cs
+
+
+ FrmAddPostParam.cs
+
FrmColor.cs
@@ -353,6 +484,7 @@
FrmXpath.cs
+
SettingsSingleFileGenerator
Settings.Designer.cs
@@ -365,11 +497,36 @@
+
+
+
+
+
+
+
+
+ False
+ Microsoft .NET Framework 4.5.2 %28x86 和 x64%29
+ true
+
+
+ False
+ .NET Framework 3.5 SP1
+ false
+
-
+
+
+
+ 这台计算机上缺少此项目引用的 NuGet 程序包。使用“NuGet 程序包还原”可下载这些程序包。有关更多信息,请参见 http://go.microsoft.com/fwlink/?LinkID=322105。缺少的文件是 {0}。
+
+
+
+
+
\ No newline at end of file
diff --git a/Source/开发辅助工具/SuperDesign.csproj.user b/Source/开发辅助工具/SuperDesign.csproj.user
index b5c8d8a..48c8121 100644
--- a/Source/开发辅助工具/SuperDesign.csproj.user
+++ b/Source/开发辅助工具/SuperDesign.csproj.user
@@ -1,9 +1,18 @@
- get "E:\我的代码\网上源码\ProgramCalculator\FRData\FRData.csproj"
+
+
- ProjectFiles
+ ShowAllFiles
+ publish\
+
+
+
+
+
+ zh-CN
+ false
\ No newline at end of file
diff --git a/Source/开发辅助工具/Tools/FrmColor.cs b/Source/开发辅助工具/Tools/FrmColor.cs
index e6b8396..4cf29e1 100644
--- a/Source/开发辅助工具/Tools/FrmColor.cs
+++ b/Source/开发辅助工具/Tools/FrmColor.cs
@@ -18,7 +18,17 @@ namespace 开发辅助工具.Tools
{
InitializeComponent();
}
+ public string CSharpColorToDelphiColor(Color csharpColor)
+ {
+ //去掉透明度
+ int iColor = csharpColor.ToArgb();
+ int delphi_color_int = (iColor >> 16) + (iColor & 0x00FF00) + ((iColor & 0x0000FF) << 16);
+ Color delphi_color = Color.FromArgb(delphi_color_int);
+ //转换颜色位置
+ return string.Format("${0:X2}{1:X2}{2:X2}{3:X2}",
+ delphi_color.A, delphi_color.R, delphi_color.G, delphi_color.B);
+ }
private void SuperColor1_BackColorChanged(object sender, EventArgs e)
{
Color color = superColor1.BackColor;
@@ -30,6 +40,7 @@ namespace 开发辅助工具.Tools
AddList("RGBA颜色值", "rgba(" + color.R + "," + color.G + "," + color.B + "," + color.A + ")", "HTML5、CSS3常用");
AddList("ARGB颜色值", String.Format("#{0:X2}{1:X2}{2:X2}{3:X2}", color.A, color.R, color.G, color.B), "android常用");
AddList("16进制颜色值", String.Format("#{0:X2}{1:X2}{2:X2}", color.R, color.G, color.B), "");
+ AddList("Delphi颜色值", CSharpColorToDelphiColor(color), "");
AddList("HSL颜色值", "hsl(" + color.GetHue().ToString("0.00") + "," + color.GetSaturation().ToString("0.00%") + "," + (hsl.L / 255m).ToString("0.00%") + ")", "");
AddList("HSV颜色值", "hsv(" + color.GetHue().ToString("0.00") + "," + (hsv.S / 255m).ToString("0.00") + "," + (hsv.V / 255m).ToString("0.00") + ")", "");
ColorHelper.RGB2CMYK(RGB, out var c, out var m, out var y, out var k);
diff --git a/Source/开发辅助工具/Tools/FrmEncode.Designer.cs b/Source/开发辅助工具/Tools/FrmEncode.Designer.cs
index 07c54ef..98592c7 100644
--- a/Source/开发辅助工具/Tools/FrmEncode.Designer.cs
+++ b/Source/开发辅助工具/Tools/FrmEncode.Designer.cs
@@ -37,7 +37,6 @@
this.RbURLEncode = new System.Windows.Forms.RadioButton();
this.RbBase64Decode = new System.Windows.Forms.RadioButton();
this.RbBase64Encode = new System.Windows.Forms.RadioButton();
- this.TxtResultCode = new ryControls.TextBoxEx2();
this.menuRight1 = new ryPaiban.Model.MenuRight(this.components);
this.RbChsToUTF8 = new System.Windows.Forms.RadioButton();
this.RbUTF8ToChs = new System.Windows.Forms.RadioButton();
@@ -47,6 +46,10 @@
this.RbSHA224 = new System.Windows.Forms.RadioButton();
this.RbSHA512 = new System.Windows.Forms.RadioButton();
this.TxtFromCode = new ryControls.Controls.RichTextBox2();
+ this.RbJsonToXML = new System.Windows.Forms.RadioButton();
+ this.TxtResultCode = new ryControls.Controls.RichTextBox2();
+ this.RbBigToSmall = new System.Windows.Forms.RadioButton();
+ this.RbSmallToBig = new System.Windows.Forms.RadioButton();
this.SuspendLayout();
//
// RbChsToUnicode
@@ -136,29 +139,6 @@
this.RbBase64Encode.UseVisualStyleBackColor = true;
this.RbBase64Encode.CheckedChanged += new System.EventHandler(this.RbBase64Encode_CheckedChanged);
//
- // TxtResultCode
- //
- this.TxtResultCode.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
- | System.Windows.Forms.AnchorStyles.Left)
- | System.Windows.Forms.AnchorStyles.Right)));
- this.TxtResultCode.BackColor = System.Drawing.Color.White;
- this.TxtResultCode.EmptyText = "转换好后的内容";
- this.TxtResultCode.Location = new System.Drawing.Point(12, 234);
- this.TxtResultCode.MaxLength = 999999999;
- this.TxtResultCode.Multiline = true;
- this.TxtResultCode.Name = "TxtResultCode";
- this.TxtResultCode.OnlyNumeric = false;
- this.TxtResultCode.PasswordChar = '\0';
- this.TxtResultCode.ReadOnly = true;
- this.TxtResultCode.SelectedText = "";
- this.TxtResultCode.SelectionLength = 0;
- this.TxtResultCode.SelectionStart = 0;
- this.TxtResultCode.Size = new System.Drawing.Size(926, 209);
- this.TxtResultCode.TabIndex = 14;
- this.TxtResultCode.TextAlign = System.Windows.Forms.HorizontalAlignment.Left;
- this.TxtResultCode.ToolTip = "";
- this.TxtResultCode.WordWrap = true;
- //
// menuRight1
//
this.menuRight1.Name = "menuRight1";
@@ -250,6 +230,7 @@
this.TxtFromCode.BorderStyle = System.Windows.Forms.BorderStyle.None;
this.TxtFromCode.DetectUrls = false;
this.TxtFromCode.EmptyText = "请填写待转换的内容";
+ this.TxtFromCode.Font = new System.Drawing.Font("Courier New", 10F);
this.TxtFromCode.ForeColor = System.Drawing.Color.Black;
this.TxtFromCode.Location = new System.Drawing.Point(12, 54);
this.TxtFromCode.Name = "TxtFromCode";
@@ -257,14 +238,72 @@
this.TxtFromCode.Size = new System.Drawing.Size(926, 174);
this.TxtFromCode.TabIndex = 29;
this.TxtFromCode.Text = "";
+ this.TxtFromCode.WordWrap = false;
this.TxtFromCode.TextChanged += new System.EventHandler(this.TxtFromCode_TextChanged);
this.TxtFromCode.DoubleClick += new System.EventHandler(this.TxtFromCode_DoubleClick_1);
//
+ // RbJsonToXML
+ //
+ this.RbJsonToXML.AutoSize = true;
+ this.RbJsonToXML.Location = new System.Drawing.Point(379, 32);
+ this.RbJsonToXML.Name = "RbJsonToXML";
+ this.RbJsonToXML.Size = new System.Drawing.Size(77, 16);
+ this.RbJsonToXML.TabIndex = 30;
+ this.RbJsonToXML.Text = "Json=>XML";
+ this.RbJsonToXML.UseVisualStyleBackColor = true;
+ this.RbJsonToXML.CheckedChanged += new System.EventHandler(this.RbJsonToXML_CheckedChanged);
+ //
+ // TxtResultCode
+ //
+ this.TxtResultCode.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
+ | System.Windows.Forms.AnchorStyles.Left)
+ | System.Windows.Forms.AnchorStyles.Right)));
+ this.TxtResultCode.BackColor = System.Drawing.Color.White;
+ this.TxtResultCode.BorderStyle = System.Windows.Forms.BorderStyle.None;
+ this.TxtResultCode.DetectUrls = false;
+ this.TxtResultCode.EmptyText = "转换好后的内容";
+ this.TxtResultCode.Font = new System.Drawing.Font("Courier New", 10F);
+ this.TxtResultCode.ForeColor = System.Drawing.Color.Black;
+ this.TxtResultCode.Location = new System.Drawing.Point(12, 234);
+ this.TxtResultCode.Name = "TxtResultCode";
+ this.TxtResultCode.OnlyInputText = true;
+ this.TxtResultCode.ReadOnly = true;
+ this.TxtResultCode.Size = new System.Drawing.Size(926, 204);
+ this.TxtResultCode.TabIndex = 31;
+ this.TxtResultCode.Text = "";
+ this.TxtResultCode.WordWrap = false;
+ //
+ // RbBigToSmall
+ //
+ this.RbBigToSmall.AutoSize = true;
+ this.RbBigToSmall.Location = new System.Drawing.Point(473, 32);
+ this.RbBigToSmall.Name = "RbBigToSmall";
+ this.RbBigToSmall.Size = new System.Drawing.Size(59, 16);
+ this.RbBigToSmall.TabIndex = 32;
+ this.RbBigToSmall.Text = "转小写";
+ this.RbBigToSmall.UseVisualStyleBackColor = true;
+ this.RbBigToSmall.CheckedChanged += new System.EventHandler(this.RbBigToSmall_CheckedChanged);
+ //
+ // RbSmallToBig
+ //
+ this.RbSmallToBig.AutoSize = true;
+ this.RbSmallToBig.Location = new System.Drawing.Point(550, 32);
+ this.RbSmallToBig.Name = "RbSmallToBig";
+ this.RbSmallToBig.Size = new System.Drawing.Size(59, 16);
+ this.RbSmallToBig.TabIndex = 33;
+ this.RbSmallToBig.Text = "转大写";
+ this.RbSmallToBig.UseVisualStyleBackColor = true;
+ this.RbSmallToBig.CheckedChanged += new System.EventHandler(this.RbSmallToBig_CheckedChanged);
+ //
// FrmEncode
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(950, 450);
+ this.Controls.Add(this.RbSmallToBig);
+ this.Controls.Add(this.RbBigToSmall);
+ this.Controls.Add(this.TxtResultCode);
+ this.Controls.Add(this.RbJsonToXML);
this.Controls.Add(this.TxtFromCode);
this.Controls.Add(this.RbSHA512);
this.Controls.Add(this.RbSHA224);
@@ -280,7 +319,6 @@
this.Controls.Add(this.RbURLEncode);
this.Controls.Add(this.RbBase64Decode);
this.Controls.Add(this.RbBase64Encode);
- this.Controls.Add(this.TxtResultCode);
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
this.Name = "FrmEncode";
this.TabPageContextMenuStrip = this.menuRight1;
@@ -299,7 +337,6 @@
private System.Windows.Forms.RadioButton RbURLEncode;
private System.Windows.Forms.RadioButton RbBase64Decode;
private System.Windows.Forms.RadioButton RbBase64Encode;
- private ryControls.TextBoxEx2 TxtResultCode;
private ryPaiban.Model.MenuRight menuRight1;
private System.Windows.Forms.RadioButton RbChsToUTF8;
private System.Windows.Forms.RadioButton RbUTF8ToChs;
@@ -308,6 +345,10 @@
private System.Windows.Forms.RadioButton RbSHA256;
private System.Windows.Forms.RadioButton RbSHA224;
private System.Windows.Forms.RadioButton RbSHA512;
- private ryControls.Controls.RichTextBox2 TxtFromCode;
+ private ryControls.Controls.RichTextBox2 TxtFromCode;
+ private System.Windows.Forms.RadioButton RbJsonToXML;
+ private ryControls.Controls.RichTextBox2 TxtResultCode;
+ private System.Windows.Forms.RadioButton RbBigToSmall;
+ private System.Windows.Forms.RadioButton RbSmallToBig;
}
}
\ No newline at end of file
diff --git a/Source/开发辅助工具/Tools/FrmEncode.cs b/Source/开发辅助工具/Tools/FrmEncode.cs
index 3296d49..df49532 100644
--- a/Source/开发辅助工具/Tools/FrmEncode.cs
+++ b/Source/开发辅助工具/Tools/FrmEncode.cs
@@ -1,13 +1,16 @@
-using System;
+using Newtonsoft.Json;
+using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
+using System.IO;
using System.Linq;
using System.Security.Cryptography;
using System.Text;
using System.Text.RegularExpressions;
using System.Windows.Forms;
+using System.Xml;
using WeifenLuo.WinFormsUI.Docking;
namespace 开发辅助工具.Tools
@@ -128,6 +131,26 @@ namespace 开发辅助工具.Tools
catch { TxtResultCode.Text = ""; }
#endregion
}
+ else if (RbBigToSmall.Checked)
+ {
+ #region 大写转小写
+ try
+ {
+ TxtResultCode.Text =from_text.ToLower();
+ }
+ catch { TxtResultCode.Text = ""; }
+ #endregion
+ }
+ else if (RbSmallToBig.Checked)
+ {
+ #region 小写转大写
+ try
+ {
+ TxtResultCode.Text = from_text.ToUpper();
+ }
+ catch { TxtResultCode.Text = ""; }
+ #endregion
+ }
else if (RbMD5.Checked)
{
#region 获取MD5
@@ -178,6 +201,53 @@ namespace 开发辅助工具.Tools
catch { TxtResultCode.Text = ""; }
#endregion
}
+ else if (RbJsonToXML.Checked)
+ {
+ #region JSON=>XML
+ try
+ {
+ string json1 = @"{
+ ""?xml"": {
+ ""@version"": ""1.0"",
+ ""@standalone"": ""no""
+ },
+ ""root"":" + from_text + "}";
+ System.Xml.XmlDocument doc1 = JsonConvert.DeserializeXmlNode(json1);
+ TxtResultCode.Text = formatXml(doc1);
+ }
+ catch { TxtResultCode.Text = ""; }
+ #endregion
+ }
+ }
+ private static string formatXml(object xml)
+ {
+ XmlDocument xd;
+ if (xml is XmlDocument)
+ {
+ xd = xml as XmlDocument;
+ }
+ else
+ {
+ xd = new XmlDocument();
+ xd.LoadXml(xml as string);
+ }
+ StringBuilder sb = new StringBuilder();
+ StringWriter sw = new StringWriter(sb);
+ XmlTextWriter xtw = null;
+ try
+ {
+ xtw = new XmlTextWriter(sw);
+ xtw.Formatting = System.Xml.Formatting.Indented;
+ xtw.Indentation = 1;
+ xtw.IndentChar = '\t';
+ xd.WriteTo(xtw);
+ }
+ finally
+ {
+ if (xtw != null)
+ xtw.Close();
+ }
+ return sb.ToString();
}
public string get_uft8(string unicodeString)
{
@@ -254,5 +324,35 @@ namespace 开发辅助工具.Tools
txt.Text = frm.richTextBox1.Text;
}
}
+
+ private void RbJsonToXML_CheckedChanged(object sender, EventArgs e)
+ {
+ RadioButton chk = (RadioButton)sender;
+ if (chk.Checked)
+ {
+ CbbEncodingCode.Enabled = false;
+ }
+ AutoCode();
+ }
+
+ private void RbBigToSmall_CheckedChanged(object sender, EventArgs e)
+ {
+ RadioButton chk = (RadioButton)sender;
+ if (chk.Checked)
+ {
+ CbbEncodingCode.Enabled = false;
+ }
+ AutoCode();
+ }
+
+ private void RbSmallToBig_CheckedChanged(object sender, EventArgs e)
+ {
+ RadioButton chk = (RadioButton)sender;
+ if (chk.Checked)
+ {
+ CbbEncodingCode.Enabled = false;
+ }
+ AutoCode();
+ }
}
}
diff --git a/Source/开发辅助工具/Tools/FrmJson.Designer.cs b/Source/开发辅助工具/Tools/FrmJson.Designer.cs
index a0a2bfb..37691e8 100644
--- a/Source/开发辅助工具/Tools/FrmJson.Designer.cs
+++ b/Source/开发辅助工具/Tools/FrmJson.Designer.cs
@@ -31,7 +31,6 @@
this.components = new System.ComponentModel.Container();
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(FrmJson));
this.splitContainer1 = new System.Windows.Forms.SplitContainer();
- this.textEditorControl1 = new FastColoredTextBoxNS.FastColoredTextBox();
this.treeView1 = new System.Windows.Forms.TreeView();
this.contextMenuStrip1 = new System.Windows.Forms.ContextMenuStrip(this.components);
this.复制键名ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
@@ -39,13 +38,13 @@
this.toolStripMenuItem1 = new System.Windows.Forms.ToolStripSeparator();
this.展开ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.折叠ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
- this.contextMenuStripHighlightText1 = new ryProcessManager.hezuo.ContextMenuStripHighlightText();
this.toolStrip1 = new System.Windows.Forms.ToolStrip();
this.BtnFormat = new System.Windows.Forms.ToolStripButton();
this.BtnPasteJson = new System.Windows.Forms.ToolStripButton();
this.BtnCopyJson = new System.Windows.Forms.ToolStripButton();
this.CopyJsonByCHS = new System.Windows.Forms.ToolStripButton();
this.menuRight1 = new ryPaiban.Model.MenuRight(this.components);
+ this.highlightEditor1 = new ryControls.HighlightEditor();
((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).BeginInit();
this.splitContainer1.Panel1.SuspendLayout();
this.splitContainer1.Panel2.SuspendLayout();
@@ -62,7 +61,7 @@
//
// splitContainer1.Panel1
//
- this.splitContainer1.Panel1.Controls.Add(this.textEditorControl1);
+ this.splitContainer1.Panel1.Controls.Add(this.highlightEditor1);
//
// splitContainer1.Panel2
//
@@ -70,16 +69,6 @@
this.splitContainer1.Size = new System.Drawing.Size(800, 491);
this.splitContainer1.SplitterDistance = 400;
this.splitContainer1.TabIndex = 0;
- this.textEditorControl1.AutoScrollMinSize = new System.Drawing.Size(27, 14);
- this.textEditorControl1.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
- this.textEditorControl1.ContextMenuStrip = this.contextMenuStripHighlightText1;
- this.textEditorControl1.Cursor = System.Windows.Forms.Cursors.IBeam;
- this.textEditorControl1.Dock = System.Windows.Forms.DockStyle.Fill;
- this.textEditorControl1.Font = new System.Drawing.Font("Courier New", 9.75F);
- this.textEditorControl1.Location = new System.Drawing.Point(0, 0);
- this.textEditorControl1.Name = "textEditorControl1";
- this.textEditorControl1.Size = new System.Drawing.Size(400, 491);
- this.textEditorControl1.TabIndex = 23;
//
// treeView1
//
@@ -139,11 +128,6 @@
this.折叠ToolStripMenuItem.Text = "折叠";
this.折叠ToolStripMenuItem.Click += new System.EventHandler(this.折叠ToolStripMenuItem_Click);
//
- // contextMenuStripHighlightText1
- //
- this.contextMenuStripHighlightText1.Name = "contextMenuStripHighlightText1";
- this.contextMenuStripHighlightText1.Size = new System.Drawing.Size(101, 186);
- //
// toolStrip1
//
this.toolStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
@@ -203,6 +187,23 @@
this.menuRight1.Size = new System.Drawing.Size(185, 92);
this.menuRight1.SourceContent = this;
//
+ // highlightEditor1
+ //
+ this.highlightEditor1.AutoCMaxHeight = 9;
+ this.highlightEditor1.BiDirectionality = ScintillaNET.BiDirectionalDisplayType.Disabled;
+ this.highlightEditor1.CaretLineBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(255)))), ((int)(((byte)(192)))));
+ this.highlightEditor1.CaretLineVisible = true;
+ this.highlightEditor1.Dock = System.Windows.Forms.DockStyle.Fill;
+ this.highlightEditor1.LexerName = null;
+ this.highlightEditor1.Location = new System.Drawing.Point(0, 0);
+ this.highlightEditor1.Name = "highlightEditor1";
+ this.highlightEditor1.ScrollWidth = 88;
+ this.highlightEditor1.Size = new System.Drawing.Size(400, 491);
+ this.highlightEditor1.TabIndents = true;
+ this.highlightEditor1.TabIndex = 0;
+ this.highlightEditor1.UseRightToLeftReadingLayout = false;
+ this.highlightEditor1.WrapMode = ScintillaNET.WrapMode.None;
+ //
// FrmJson
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
@@ -231,7 +232,6 @@
private System.Windows.Forms.SplitContainer splitContainer1;
private System.Windows.Forms.TreeView treeView1;
- private ryProcessManager.hezuo.ContextMenuStripHighlightText contextMenuStripHighlightText1;
private System.Windows.Forms.ContextMenuStrip contextMenuStrip1;
private System.Windows.Forms.ToolStripMenuItem 复制键名ToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem 复制键值ToolStripMenuItem;
@@ -244,6 +244,6 @@
private System.Windows.Forms.ToolStripMenuItem 展开ToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem 折叠ToolStripMenuItem;
private System.Windows.Forms.ToolStripButton CopyJsonByCHS;
- private FastColoredTextBoxNS.FastColoredTextBox textEditorControl1;
+ private ryControls.HighlightEditor highlightEditor1;
}
}
\ No newline at end of file
diff --git a/Source/开发辅助工具/Tools/FrmJson.cs b/Source/开发辅助工具/Tools/FrmJson.cs
index c32dd5d..260871c 100644
--- a/Source/开发辅助工具/Tools/FrmJson.cs
+++ b/Source/开发辅助工具/Tools/FrmJson.cs
@@ -1,5 +1,4 @@
-using FastColoredTextBoxNS;
-using Newtonsoft.Json;
+using Newtonsoft.Json;
using Newtonsoft.Json.Linq;
using System;
using System.Collections.Generic;
@@ -19,51 +18,6 @@ namespace 开发辅助工具.Tools
public FrmJson()
{
InitializeComponent();
- textEditorControl1.ClearStylesBuffer();
- textEditorControl1.Range.ClearStyle(StyleIndex.All);
- textEditorControl1.AddStyle(new MarkerStyle(new SolidBrush(Color.FromArgb(40, Color.Gray))));
- textEditorControl1.AutoIndentNeeded -= fctb_AutoIndentNeeded;
- textEditorControl1.Language = Language.JSON;
- textEditorControl1.OnSyntaxHighlight(new TextChangedEventArgs(textEditorControl1.Range));
- }
- private void fctb_AutoIndentNeeded(object sender, AutoIndentEventArgs args)
- {
- //block {}
- if (Regex.IsMatch(args.LineText, @"^[^""']*\{.*\}[^""']*$"))
- return;
- //start of block {}
- if (Regex.IsMatch(args.LineText, @"^[^""']*\{"))
- {
- args.ShiftNextLines = args.TabLength;
- return;
- }
- //end of block {}
- if (Regex.IsMatch(args.LineText, @"}[^""']*$"))
- {
- args.Shift = -args.TabLength;
- args.ShiftNextLines = -args.TabLength;
- return;
- }
- //label
- if (Regex.IsMatch(args.LineText, @"^\s*\w+\s*:\s*($|//)") &&
- !Regex.IsMatch(args.LineText, @"^\s*default\s*:"))
- {
- args.Shift = -args.TabLength;
- return;
- }
- //some statements: case, default
- if (Regex.IsMatch(args.LineText, @"^\s*(case|default)\b.*:\s*($|//)"))
- {
- args.Shift = -args.TabLength / 2;
- return;
- }
- //is unclosed operator in previous line ?
- if (Regex.IsMatch(args.PrevLineText, @"^\s*(if|for|foreach|while|[\}\s]*else)\b[^{]*$"))
- if (!Regex.IsMatch(args.PrevLineText, @"(;\s*$)|(;\s*//)"))//operator is unclosed
- {
- args.Shift = args.TabLength;
- return;
- }
}
private void LoadTreeList(TreeNodeCollection nodes,JObject jo)
{
@@ -119,8 +73,8 @@ namespace 开发辅助工具.Tools
{
try
{
- textEditorControl1.Text = Manager.Json.ConvertJsonString(json_text);
- textEditorControl1.Refresh();
+ highlightEditor1.SetHightlightText(Manager.Json.ConvertJsonString(json_text),"json");
+ highlightEditor1.Refresh();
JObject jo = null;
if (Manager.Json.IsArray(json_text))
{
@@ -225,12 +179,12 @@ namespace 开发辅助工具.Tools
}
private void BtnFormat_Click(object sender, EventArgs e)
{
- Format(textEditorControl1.Text);
+ Format(highlightEditor1.Text);
}
public void LoadJson(string json_text)
{
- textEditorControl1.Text = json_text;
- textEditorControl1.Refresh();
+ highlightEditor1.SetHightlightText(json_text,"json");
+ highlightEditor1.Refresh();
BtnFormat.PerformClick();
}
private void 复制键名ToolStripMenuItem_Click(object sender, EventArgs e)
@@ -255,7 +209,7 @@ namespace 开发辅助工具.Tools
private void BtnCopyJson_Click(object sender, EventArgs e)
{
- ryCommon.RyFiles.CopyToClip(textEditorControl1.Text);
+ ryCommon.RyFiles.CopyToClip(highlightEditor1.Text);
}
private void FrmJson_Load(object sender, EventArgs e)
@@ -289,7 +243,7 @@ namespace 开发辅助工具.Tools
{
try
{
- JObject jo = (JObject)JsonConvert.DeserializeObject(textEditorControl1.Text);
+ JObject jo = (JObject)JsonConvert.DeserializeObject(highlightEditor1.Text);
var aa = Newtonsoft.Json.JsonConvert.SerializeObject(jo, new Newtonsoft.Json.JsonSerializerSettings() { StringEscapeHandling = Newtonsoft.Json.StringEscapeHandling.EscapeNonAscii });
ryCommon.RyFiles.CopyToClip(aa);
}
diff --git a/Source/开发辅助工具/Tools/FrmJson.resx b/Source/开发辅助工具/Tools/FrmJson.resx
index 5291ee2..69ddf9a 100644
--- a/Source/开发辅助工具/Tools/FrmJson.resx
+++ b/Source/开发辅助工具/Tools/FrmJson.resx
@@ -117,10 +117,6 @@
System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
-
- 17, 17
-
-
262, 17
diff --git a/Source/开发辅助工具/Tools/FrmProject.cs b/Source/开发辅助工具/Tools/FrmProject.cs
index 11fbcb0..d8c4af3 100644
--- a/Source/开发辅助工具/Tools/FrmProject.cs
+++ b/Source/开发辅助工具/Tools/FrmProject.cs
@@ -154,23 +154,11 @@ namespace 开发辅助工具.Tools
string _ProjectPath = "";
private string GetPath(string _path)
{
- string tmp_path = _path;
- if (_path.IndexOf("..") == 0)
- {
- tmp_path = System.IO.Path.GetDirectoryName(System.IO.Path.GetDirectoryName(_ProjectPath).Trim('\\'));
- tmp_path = tmp_path + "\\" + _path.Substring(2);
- }
- else if (_path.IndexOf(".") == 0)
- {
- tmp_path = System.IO.Path.GetDirectoryName(_ProjectPath);
- tmp_path = tmp_path + "\\" + _path.Substring(1);
- }
- else if (_path.IndexOf(":") < 0)
- {
- tmp_path = System.IO.Path.GetDirectoryName(_ProjectPath);
- tmp_path = tmp_path + "\\" + _path;
- }
- return tmp_path.Replace("\\\\", "\\");
+ var cur_dir = Environment.CurrentDirectory;
+ Environment.CurrentDirectory = System.IO.Path.GetDirectoryName(_ProjectPath);
+ var tmp_path = System.IO.Path.GetFullPath(_path);
+ Environment.CurrentDirectory = cur_dir;
+ return tmp_path;
}
private string GetDebugPath()
{
diff --git a/Source/开发辅助工具/Tools/FrmRegex.Designer.cs b/Source/开发辅助工具/Tools/FrmRegex.Designer.cs
index 046d14d..7536eff 100644
--- a/Source/开发辅助工具/Tools/FrmRegex.Designer.cs
+++ b/Source/开发辅助工具/Tools/FrmRegex.Designer.cs
@@ -201,6 +201,7 @@
| System.Windows.Forms.AnchorStyles.Right)));
this.RySearchRegex.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(236)))), ((int)(((byte)(239)))), ((int)(((byte)(244)))));
this.RySearchRegex.BaseColor = System.Drawing.Color.FromArgb(((int)(((byte)(51)))), ((int)(((byte)(76)))), ((int)(((byte)(95)))));
+ this.RySearchRegex.ButtonRoundBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(236)))), ((int)(((byte)(239)))), ((int)(((byte)(244)))));
this.RySearchRegex.EmptyText = "";
this.RySearchRegex.Location = new System.Drawing.Point(81, 6);
this.RySearchRegex.Name = "RySearchRegex";
@@ -220,7 +221,7 @@
// menuRight1
//
this.menuRight1.Name = "menuRight1";
- this.menuRight1.Size = new System.Drawing.Size(185, 70);
+ this.menuRight1.Size = new System.Drawing.Size(185, 92);
this.menuRight1.SourceContent = this;
//
// TxtRegexInput
@@ -230,6 +231,7 @@
this.TxtRegexInput.BorderStyle = System.Windows.Forms.BorderStyle.None;
this.TxtRegexInput.DetectUrls = false;
this.TxtRegexInput.EmptyText = "在此输入待匹配文本";
+ this.TxtRegexInput.Font = new System.Drawing.Font("Courier New", 10F);
this.TxtRegexInput.ForeColor = System.Drawing.Color.Black;
this.TxtRegexInput.Location = new System.Drawing.Point(12, 37);
this.TxtRegexInput.Name = "TxtRegexInput";
@@ -237,6 +239,7 @@
this.TxtRegexInput.Size = new System.Drawing.Size(825, 158);
this.TxtRegexInput.TabIndex = 18;
this.TxtRegexInput.Text = "";
+ this.TxtRegexInput.WordWrap = false;
this.TxtRegexInput.DoubleClick += new System.EventHandler(this.TxtRegexInput_DoubleClick);
//
// FrmRegex
@@ -254,6 +257,7 @@
this.Name = "FrmRegex";
this.TabPageContextMenuStrip = this.menuRight1;
this.Text = "正则表达式";
+ this.Load += new System.EventHandler(this.FrmRegex_Load);
this.tabControl3.ResumeLayout(false);
this.TabTxtResult.ResumeLayout(false);
this.tabPage10.ResumeLayout(false);
diff --git a/Source/开发辅助工具/Tools/FrmRegex.cs b/Source/开发辅助工具/Tools/FrmRegex.cs
index 2f5d766..9a24311 100644
--- a/Source/开发辅助工具/Tools/FrmRegex.cs
+++ b/Source/开发辅助工具/Tools/FrmRegex.cs
@@ -41,7 +41,7 @@ namespace 开发辅助工具.Tools
{
option = RegexOptions.IgnoreCase;
}
- if (Multiline) { option = option | RegexOptions.Multiline; }
+ if (Multiline) { option |= RegexOptions.Multiline; }
Regex reg = new Regex(RegexText, option);
//返回一个结果集
MatchCollection result = reg.Matches(RegexInput);
@@ -106,5 +106,9 @@ namespace 开发辅助工具.Tools
txt.Text = frm.richTextBox1.Text;
}
}
+
+ private void FrmRegex_Load(object sender, EventArgs e)
+ {
+ }
}
}
diff --git a/Source/开发辅助工具/Tools/FrmStrCount.Designer.cs b/Source/开发辅助工具/Tools/FrmStrCount.Designer.cs
index 2ea3107..0f75275 100644
--- a/Source/开发辅助工具/Tools/FrmStrCount.Designer.cs
+++ b/Source/开发辅助工具/Tools/FrmStrCount.Designer.cs
@@ -30,17 +30,11 @@
{
this.components = new System.ComponentModel.Container();
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(FrmStrCount));
- this.contextMenuStripHighlightText1 = new ryProcessManager.hezuo.ContextMenuStripHighlightText();
this.menuRight1 = new ryPaiban.Model.MenuRight(this.components);
this.TxtFromCode = new ryControls.Controls.RichTextBox2();
- this.fastColoredTextBox1 = new FastColoredTextBoxNS.FastColoredTextBox();
+ this.highlightEditor1 = new ryControls.HighlightEditor();
this.SuspendLayout();
//
- // contextMenuStripHighlightText1
- //
- this.contextMenuStripHighlightText1.Name = "contextMenuStripHighlightText1";
- this.contextMenuStripHighlightText1.Size = new System.Drawing.Size(101, 186);
- //
// menuRight1
//
this.menuRight1.Name = "menuRight1";
@@ -54,6 +48,7 @@
this.TxtFromCode.BorderStyle = System.Windows.Forms.BorderStyle.None;
this.TxtFromCode.DetectUrls = false;
this.TxtFromCode.EmptyText = "请填写待计算的字符串";
+ this.TxtFromCode.Font = new System.Drawing.Font("Courier New", 10F);
this.TxtFromCode.ForeColor = System.Drawing.Color.Black;
this.TxtFromCode.Location = new System.Drawing.Point(12, 3);
this.TxtFromCode.Name = "TxtFromCode";
@@ -61,41 +56,48 @@
this.TxtFromCode.Size = new System.Drawing.Size(812, 207);
this.TxtFromCode.TabIndex = 30;
this.TxtFromCode.Text = "";
+ this.TxtFromCode.WordWrap = false;
this.TxtFromCode.TextChanged += new System.EventHandler(this.TxtFromCode_TextChanged);
//
- // fastColoredTextBox1
+ // highlightEditor1
//
- this.fastColoredTextBox1.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
+ this.highlightEditor1.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.fastColoredTextBox1.AutoScrollMinSize = new System.Drawing.Size(27, 14);
- this.fastColoredTextBox1.ContextMenuStrip = this.contextMenuStripHighlightText1;
- this.fastColoredTextBox1.Cursor = System.Windows.Forms.Cursors.IBeam;
- this.fastColoredTextBox1.Font = new System.Drawing.Font("Courier New", 9.75F);
- this.fastColoredTextBox1.Location = new System.Drawing.Point(12, 216);
- this.fastColoredTextBox1.Name = "fastColoredTextBox1";
- this.fastColoredTextBox1.Size = new System.Drawing.Size(812, 277);
- this.fastColoredTextBox1.TabIndex = 31;
+ this.highlightEditor1.AutoCAutoHide = false;
+ this.highlightEditor1.AutoCMaxHeight = 9;
+ this.highlightEditor1.BiDirectionality = ScintillaNET.BiDirectionalDisplayType.Disabled;
+ this.highlightEditor1.CaretLineBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(255)))), ((int)(((byte)(192)))));
+ this.highlightEditor1.CaretLineVisible = true;
+ this.highlightEditor1.LexerName = null;
+ this.highlightEditor1.Location = new System.Drawing.Point(12, 216);
+ this.highlightEditor1.Name = "highlightEditor1";
+ this.highlightEditor1.ScrollWidth = 88;
+ this.highlightEditor1.Size = new System.Drawing.Size(812, 258);
+ this.highlightEditor1.TabIndents = true;
+ this.highlightEditor1.TabIndex = 31;
+ this.highlightEditor1.UseRightToLeftReadingLayout = false;
+ this.highlightEditor1.WrapMode = ScintillaNET.WrapMode.None;
//
// FrmStrCount
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(836, 495);
- this.Controls.Add(this.fastColoredTextBox1);
+ this.Controls.Add(this.highlightEditor1);
this.Controls.Add(this.TxtFromCode);
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
this.Name = "FrmStrCount";
this.TabPageContextMenuStrip = this.menuRight1;
this.Text = "字符串统计";
+ this.Load += new System.EventHandler(this.FrmStrCount_Load);
this.ResumeLayout(false);
}
#endregion
- private ryProcessManager.hezuo.ContextMenuStripHighlightText contextMenuStripHighlightText1;
private ryPaiban.Model.MenuRight menuRight1;
private ryControls.Controls.RichTextBox2 TxtFromCode;
- private FastColoredTextBoxNS.FastColoredTextBox fastColoredTextBox1;
+ private ryControls.HighlightEditor highlightEditor1;
}
}
\ No newline at end of file
diff --git a/Source/开发辅助工具/Tools/FrmStrCount.cs b/Source/开发辅助工具/Tools/FrmStrCount.cs
index 16deb54..468716a 100644
--- a/Source/开发辅助工具/Tools/FrmStrCount.cs
+++ b/Source/开发辅助工具/Tools/FrmStrCount.cs
@@ -1,4 +1,5 @@
-using System;
+using ryControls;
+using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
@@ -15,7 +16,7 @@ namespace 开发辅助工具.Tools
public FrmStrCount()
{
InitializeComponent();
- fastColoredTextBox1.ReadOnly = true;
+ highlightEditor1.ReadOnly = true;
}
private void TxtFromCode_TextChanged(object sender, EventArgs e)
@@ -23,13 +24,20 @@ namespace 开发辅助工具.Tools
Manager.TotalCount totalCount = new Manager.TotalCount();
string fromText = TxtFromCode.Text;
int iCount = totalCount.GetByteLength(fromText, out int HanziCount, out int engCount, out int NumCount);
- string resultStr = "";
+ string resultStr;
resultStr = "字节数: " + iCount.ToString() + "个(汉字算两个字符)";
resultStr += "\r\n字数: " + fromText.Length.ToString() + "个(汉字算一个字符)";
resultStr += "\r\n汉字数: " + HanziCount.ToString() + "个(汉字算一个字符)";
resultStr += "\r\n英文数量: " + engCount.ToString() + "个";
resultStr += "\r\n数字数量: " + NumCount.ToString() + "个";
- fastColoredTextBox1.Text = resultStr;
+ highlightEditor1.ReadOnly = false;
+ highlightEditor1.Text = resultStr;
+ highlightEditor1.ReadOnly = true;
+ }
+
+ private void FrmStrCount_Load(object sender, EventArgs e)
+ {
+ highlightEditor1.SetFocus();
}
}
}
diff --git a/Source/开发辅助工具/Tools/FrmStrCount.resx b/Source/开发辅助工具/Tools/FrmStrCount.resx
index a75b767..c6583c0 100644
--- a/Source/开发辅助工具/Tools/FrmStrCount.resx
+++ b/Source/开发辅助工具/Tools/FrmStrCount.resx
@@ -117,13 +117,9 @@
System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
-
- 17, 17
-
262, 17
-
diff --git a/Source/开发辅助工具/Tools/FrmStrToCode.Designer.cs b/Source/开发辅助工具/Tools/FrmStrToCode.Designer.cs
index c3151c6..54d9899 100644
--- a/Source/开发辅助工具/Tools/FrmStrToCode.Designer.cs
+++ b/Source/开发辅助工具/Tools/FrmStrToCode.Designer.cs
@@ -28,15 +28,13 @@
///
private void InitializeComponent()
{
- this.components = new System.ComponentModel.Container();
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(FrmStrToCode));
this.RbStrToC = new System.Windows.Forms.RadioButton();
this.RbStrToJS = new System.Windows.Forms.RadioButton();
this.RbStrToQuickJS = new System.Windows.Forms.RadioButton();
this.RbStrToASP = new System.Windows.Forms.RadioButton();
this.TxtFromCode = new ryControls.Controls.RichTextBox2();
- this.fastColoredTextBox1 = new FastColoredTextBoxNS.FastColoredTextBox();
- this.contextMenuStripHighlightText1 = new ryProcessManager.hezuo.ContextMenuStripHighlightText();
+ this.highlightEditor1 = new ryControls.HighlightEditor();
this.SuspendLayout();
//
// RbStrToC
@@ -91,6 +89,7 @@
this.TxtFromCode.BorderStyle = System.Windows.Forms.BorderStyle.None;
this.TxtFromCode.DetectUrls = false;
this.TxtFromCode.EmptyText = "请填写待转换的内容";
+ this.TxtFromCode.Font = new System.Drawing.Font("Courier New", 10F);
this.TxtFromCode.ForeColor = System.Drawing.Color.Black;
this.TxtFromCode.Location = new System.Drawing.Point(12, 3);
this.TxtFromCode.Name = "TxtFromCode";
@@ -98,34 +97,36 @@
this.TxtFromCode.Size = new System.Drawing.Size(812, 207);
this.TxtFromCode.TabIndex = 31;
this.TxtFromCode.Text = "";
+ this.TxtFromCode.WordWrap = false;
this.TxtFromCode.TextChanged += new System.EventHandler(this.TxtFromCode_TextChanged);
this.TxtFromCode.DoubleClick += new System.EventHandler(this.TxtFromCode_DoubleClick);
//
- // fastColoredTextBox1
+ // highlightEditor1
//
- this.fastColoredTextBox1.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
+ this.highlightEditor1.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.fastColoredTextBox1.AutoScrollMinSize = new System.Drawing.Size(27, 14);
- this.fastColoredTextBox1.ContextMenuStrip = this.contextMenuStripHighlightText1;
- this.fastColoredTextBox1.Cursor = System.Windows.Forms.Cursors.IBeam;
- this.fastColoredTextBox1.Font = new System.Drawing.Font("Courier New", 9.75F);
- this.fastColoredTextBox1.Location = new System.Drawing.Point(12, 238);
- this.fastColoredTextBox1.Name = "fastColoredTextBox1";
- this.fastColoredTextBox1.Size = new System.Drawing.Size(812, 255);
- this.fastColoredTextBox1.TabIndex = 32;
- //
- // contextMenuStripHighlightText1
- //
- this.contextMenuStripHighlightText1.Name = "contextMenuStripHighlightText1";
- this.contextMenuStripHighlightText1.Size = new System.Drawing.Size(101, 186);
+ this.highlightEditor1.AutoCAutoHide = false;
+ this.highlightEditor1.AutoCMaxHeight = 9;
+ this.highlightEditor1.BiDirectionality = ScintillaNET.BiDirectionalDisplayType.Disabled;
+ this.highlightEditor1.CaretLineBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(255)))), ((int)(((byte)(192)))));
+ this.highlightEditor1.CaretLineVisible = true;
+ this.highlightEditor1.LexerName = null;
+ this.highlightEditor1.Location = new System.Drawing.Point(12, 238);
+ this.highlightEditor1.Name = "highlightEditor1";
+ this.highlightEditor1.ScrollWidth = 88;
+ this.highlightEditor1.Size = new System.Drawing.Size(812, 245);
+ this.highlightEditor1.TabIndents = true;
+ this.highlightEditor1.TabIndex = 32;
+ this.highlightEditor1.UseRightToLeftReadingLayout = false;
+ this.highlightEditor1.WrapMode = ScintillaNET.WrapMode.None;
//
// FrmStrToCode
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(836, 495);
- this.Controls.Add(this.fastColoredTextBox1);
+ this.Controls.Add(this.highlightEditor1);
this.Controls.Add(this.TxtFromCode);
this.Controls.Add(this.RbStrToASP);
this.Controls.Add(this.RbStrToQuickJS);
@@ -134,6 +135,7 @@
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
this.Name = "FrmStrToCode";
this.Text = "字符串转代码";
+ this.Load += new System.EventHandler(this.FrmStrToCode_Load);
this.ResumeLayout(false);
this.PerformLayout();
@@ -146,7 +148,6 @@
private System.Windows.Forms.RadioButton RbStrToASP;
private ryPaiban.Model.MenuRight menuRight1;
private ryControls.Controls.RichTextBox2 TxtFromCode;
- private FastColoredTextBoxNS.FastColoredTextBox fastColoredTextBox1;
- private ryProcessManager.hezuo.ContextMenuStripHighlightText contextMenuStripHighlightText1;
+ private ryControls.HighlightEditor highlightEditor1;
}
}
\ No newline at end of file
diff --git a/Source/开发辅助工具/Tools/FrmStrToCode.cs b/Source/开发辅助工具/Tools/FrmStrToCode.cs
index db673ec..d9c508b 100644
--- a/Source/开发辅助工具/Tools/FrmStrToCode.cs
+++ b/Source/开发辅助工具/Tools/FrmStrToCode.cs
@@ -1,131 +1,91 @@
-using FastColoredTextBoxNS;
-using System;
-using System.Collections.Generic;
-using System.ComponentModel;
-using System.Data;
-using System.Drawing;
-using System.Linq;
-using System.Text;
+using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Data;
+using System.Drawing;
+using System.Linq;
+using System.Text;
using System.Text.RegularExpressions;
-using System.Windows.Forms;
-using WeifenLuo.WinFormsUI.Docking;
-
-namespace 开发辅助工具.Tools
-{
- public partial class FrmStrToCode : DockContent
- {
- public FrmStrToCode()
- {
- InitializeComponent();
- fastColoredTextBox1.ReadOnly = true;
- fastColoredTextBox1.ClearStylesBuffer();
- fastColoredTextBox1.Range.ClearStyle(StyleIndex.All);
- fastColoredTextBox1.AddStyle(new MarkerStyle(new SolidBrush(Color.FromArgb(40, Color.Gray))));
- fastColoredTextBox1.AutoIndentNeeded -= fctb_AutoIndentNeeded;
- fastColoredTextBox1.Language = Language.JSON;
- fastColoredTextBox1.OnSyntaxHighlight(new TextChangedEventArgs(fastColoredTextBox1.Range));
- }
- private void fctb_AutoIndentNeeded(object sender, AutoIndentEventArgs args)
- {
- //block {}
- if (Regex.IsMatch(args.LineText, @"^[^""']*\{.*\}[^""']*$"))
- return;
- //start of block {}
- if (Regex.IsMatch(args.LineText, @"^[^""']*\{"))
- {
- args.ShiftNextLines = args.TabLength;
- return;
- }
- //end of block {}
- if (Regex.IsMatch(args.LineText, @"}[^""']*$"))
- {
- args.Shift = -args.TabLength;
- args.ShiftNextLines = -args.TabLength;
- return;
- }
- //label
- if (Regex.IsMatch(args.LineText, @"^\s*\w+\s*:\s*($|//)") &&
- !Regex.IsMatch(args.LineText, @"^\s*default\s*:"))
- {
- args.Shift = -args.TabLength;
- return;
- }
- //some statements: case, default
- if (Regex.IsMatch(args.LineText, @"^\s*(case|default)\b.*:\s*($|//)"))
- {
- args.Shift = -args.TabLength / 2;
- return;
- }
- //is unclosed operator in previous line ?
- if (Regex.IsMatch(args.PrevLineText, @"^\s*(if|for|foreach|while|[\}\s]*else)\b[^{]*$"))
- if (!Regex.IsMatch(args.PrevLineText, @"(;\s*$)|(;\s*//)"))//operator is unclosed
- {
- args.Shift = args.TabLength;
- return;
- }
- }
- private void Convert()
- {
- StringBuilder builder = new StringBuilder();
- if (RbStrToC.Checked)
- {
- builder.Append(" StringBuilder sb = new StringBuilder();\r\n");
- builder.Append(" sb.Append(\"" + TxtFromCode.Text.Trim().Replace("\"", "\\\"").Replace("\r\n", "\n").Replace("\n", "\");\r\n sb.Append(\"") + "\");");
- fastColoredTextBox1.Language = FastColoredTextBoxNS.Language.CSharp;
- }
- else if (RbStrToJS.Checked)
- {
- builder.Append("var sb=\"" + this.TxtFromCode.Text.Trim().Replace("\"", "\\\"").Replace("\r\n", "\n").Replace("\n", "\";\r\n sb=sb+\"") + "\";");
- fastColoredTextBox1.Language = FastColoredTextBoxNS.Language.JS;
- }
- else if (RbStrToQuickJS.Checked)
- {
- builder.Append("var sb=\"" + this.TxtFromCode.Text.Trim().Replace("\"", "\\\"").Replace("\r\n", "\n").Replace("\n", "\";\r\n sb=sb+\"") + "\";");
- builder = new StringBuilder(builder.ToString().Replace("script", "scr\"+\"ipt") + " document.write(sb);");
- builder.Insert(0, "");
- fastColoredTextBox1.Language = FastColoredTextBoxNS.Language.HTML;
- }
- else if (RbStrToASP.Checked)
- {
- builder.Append("sb=\"" + this.TxtFromCode.Text.Trim().Replace("\"", "\"\"").Replace("\r\n", "\n").Replace("\n", "\" & vbCrLf \r\nsb=sb & \"") + "\"");
- fastColoredTextBox1.Language = FastColoredTextBoxNS.Language.VB;
- }
- fastColoredTextBox1.Text = builder.ToString();
- }
-
- private void RbStrToC_CheckedChanged(object sender, EventArgs e)
- {
- Convert();
- }
-
- private void RbStrToJS_CheckedChanged(object sender, EventArgs e)
- {
- Convert();
- }
-
- private void RbStrToQuickJS_CheckedChanged(object sender, EventArgs e)
- {
- Convert();
- }
-
- private void TxtFromCode_DoubleClick(object sender, EventArgs e)
- {
- ryControls.Controls.RichTextBox2 txt = (ryControls.Controls.RichTextBox2)sender;
- 开发辅助工具.Controls.FrmText frm = new Controls.FrmText
- {
- Icon = Icon
- };
- frm.richTextBox1.Text = txt.Text;
- if (frm.ShowDialog() == DialogResult.OK)
- {
- txt.Text = frm.richTextBox1.Text;
- }
- }
-
- private void TxtFromCode_TextChanged(object sender, EventArgs e)
- {
- Convert();
- }
- }
-}
+using System.Windows.Forms;
+using WeifenLuo.WinFormsUI.Docking;
+
+namespace 开发辅助工具.Tools
+{
+ public partial class FrmStrToCode : DockContent
+ {
+ public FrmStrToCode()
+ {
+ InitializeComponent();
+ highlightEditor1.ReadOnly = true;
+ }
+ private void Convert()
+ {
+ StringBuilder builder = new StringBuilder();
+ var formart = "";
+ if (RbStrToC.Checked)
+ {
+ builder.Append(" StringBuilder sb = new StringBuilder();\r\n");
+ builder.Append(" sb.Append(\"" + TxtFromCode.Text.Trim().Replace("\"", "\\\"").Replace("\r\n", "\n").Replace("\n", "\");\r\n sb.Append(\"") + "\");");
+ formart = "c#";
+ }
+ else if (RbStrToJS.Checked)
+ {
+ builder.Append("var sb=\"" + this.TxtFromCode.Text.Trim().Replace("\"", "\\\"").Replace("\r\n", "\n").Replace("\n", "\";\r\n sb=sb+\"") + "\";");
+ formart = "js";
+ }
+ else if (RbStrToQuickJS.Checked)
+ {
+ builder.Append("var sb=\"" + this.TxtFromCode.Text.Trim().Replace("\"", "\\\"").Replace("\r\n", "\n").Replace("\n", "\";\r\n sb=sb+\"") + "\";");
+ builder = new StringBuilder(builder.ToString().Replace("script", "scr\"+\"ipt") + " document.write(sb);");
+ builder.Insert(0, "");
+ formart = "html";
+ }
+ else if (RbStrToASP.Checked)
+ {
+ builder.Append("sb=\"" + this.TxtFromCode.Text.Trim().Replace("\"", "\"\"").Replace("\r\n", "\n").Replace("\n", "\" & vbCrLf \r\nsb=sb & \"") + "\"");
+ formart = "vb";
+ }
+ highlightEditor1.SetHightlightText(builder.ToString(),formart);
+ }
+
+ private void RbStrToC_CheckedChanged(object sender, EventArgs e)
+ {
+ Convert();
+ }
+
+ private void RbStrToJS_CheckedChanged(object sender, EventArgs e)
+ {
+ Convert();
+ }
+
+ private void RbStrToQuickJS_CheckedChanged(object sender, EventArgs e)
+ {
+ Convert();
+ }
+
+ private void TxtFromCode_DoubleClick(object sender, EventArgs e)
+ {
+ ryControls.Controls.RichTextBox2 txt = (ryControls.Controls.RichTextBox2)sender;
+ 开发辅助工具.Controls.FrmText frm = new Controls.FrmText
+ {
+ Icon = Icon
+ };
+ frm.richTextBox1.Text = txt.Text;
+ if (frm.ShowDialog() == DialogResult.OK)
+ {
+ txt.Text = frm.richTextBox1.Text;
+ }
+ }
+
+ private void TxtFromCode_TextChanged(object sender, EventArgs e)
+ {
+ Convert();
+ }
+
+ private void FrmStrToCode_Load(object sender, EventArgs e)
+ {
+ highlightEditor1.SetFocus();
+ }
+ }
+}
diff --git a/Source/开发辅助工具/Tools/FrmStrToCode.resx b/Source/开发辅助工具/Tools/FrmStrToCode.resx
index e5faee7..f641dc8 100644
--- a/Source/开发辅助工具/Tools/FrmStrToCode.resx
+++ b/Source/开发辅助工具/Tools/FrmStrToCode.resx
@@ -117,10 +117,6 @@
System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
-
- 17, 17
-
-
diff --git a/Source/开发辅助工具/Tools/FrmWebGet.Designer.cs b/Source/开发辅助工具/Tools/FrmWebGet.Designer.cs
index 380ae29..0d6b735 100644
--- a/Source/开发辅助工具/Tools/FrmWebGet.Designer.cs
+++ b/Source/开发辅助工具/Tools/FrmWebGet.Designer.cs
@@ -30,14 +30,12 @@
{
this.components = new System.ComponentModel.Container();
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(FrmWebGet));
- this.ChkUrlLower = new System.Windows.Forms.CheckBox();
this.tabControl2 = new System.Windows.Forms.TabControl();
this.tabPage3 = new System.Windows.Forms.TabPage();
this.pictureBox1 = new System.Windows.Forms.PictureBox();
this.RichHtml = new ryControls.Controls.RichTextBox2();
this.tabPage12 = new System.Windows.Forms.TabPage();
- this.Te_Format = new FastColoredTextBoxNS.FastColoredTextBox();
- this.contextMenuStripHighlightText1 = new ryProcessManager.hezuo.ContextMenuStripHighlightText();
+ this.highlightEditor1 = new ryControls.HighlightEditor();
this.tabPage4 = new System.Windows.Forms.TabPage();
this.RichCookie = new ryControls.Controls.RichTextBox2();
this.tabPage5 = new System.Windows.Forms.TabPage();
@@ -74,22 +72,24 @@
this.label4 = new System.Windows.Forms.Label();
this.CbbEncoding = new ryControls.RyComboBox();
this.label3 = new System.Windows.Forms.Label();
- this.BtnRunHtml = new ryControls.ButtonEx();
this.RbPost = new System.Windows.Forms.RadioButton();
this.RbGet = new System.Windows.Forms.RadioButton();
- this.TxtUrl = new ryControls.TextBoxEx2();
this.label2 = new System.Windows.Forms.Label();
- this.menuRight1 = new ryPaiban.Model.MenuRight(this.components);
- this.BtnCtreateCShape = new ryControls.ButtonEx();
- this.timer1 = new System.Windows.Forms.Timer(this.components);
- this.objectListView2 = new BrightIdeasSoftware.ObjectListView();
- this.OlvUrl = ((BrightIdeasSoftware.OLVColumn)(new BrightIdeasSoftware.OLVColumn()));
- this.OlvName = ((BrightIdeasSoftware.OLVColumn)(new BrightIdeasSoftware.OLVColumn()));
this.contextMenuStrip1 = new System.Windows.Forms.ContextMenuStrip(this.components);
this.置顶收藏该项ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.删除该项ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.toolStripMenuItem1 = new System.Windows.Forms.ToolStripSeparator();
this.设置备注ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
+ this.menuRight1 = new ryPaiban.Model.MenuRight(this.components);
+ this.TxtUrl = new ryControls.TextBoxEx2();
+ this.BtnCtreateCShape = new ryControls.ButtonEx();
+ this.BtnRunHtml = new ryControls.ButtonEx();
+ this.objectListView2 = new BrightIdeasSoftware.ObjectListView();
+ this.OlvUrl = ((BrightIdeasSoftware.OLVColumn)(new BrightIdeasSoftware.OLVColumn()));
+ this.OlvName = ((BrightIdeasSoftware.OLVColumn)(new BrightIdeasSoftware.OLVColumn()));
+ this.BtnMore = new ryControls.SuperPictureBox();
+ this.MenuMore = new System.Windows.Forms.ContextMenuStrip(this.components);
+ this.toolTip1 = new System.Windows.Forms.ToolTip(this.components);
this.tabControl2.SuspendLayout();
this.tabPage3.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit();
@@ -105,20 +105,11 @@
this.tabPage7.SuspendLayout();
this.groupBox2.SuspendLayout();
this.groupBox1.SuspendLayout();
- ((System.ComponentModel.ISupportInitialize)(this.objectListView2)).BeginInit();
this.contextMenuStrip1.SuspendLayout();
+ ((System.ComponentModel.ISupportInitialize)(this.objectListView2)).BeginInit();
+ ((System.ComponentModel.ISupportInitialize)(this.BtnMore)).BeginInit();
this.SuspendLayout();
//
- // ChkUrlLower
- //
- this.ChkUrlLower.AutoSize = true;
- this.ChkUrlLower.Location = new System.Drawing.Point(630, 10);
- this.ChkUrlLower.Name = "ChkUrlLower";
- this.ChkUrlLower.Size = new System.Drawing.Size(72, 16);
- this.ChkUrlLower.TabIndex = 109;
- this.ChkUrlLower.Text = "全转小写";
- this.ChkUrlLower.UseVisualStyleBackColor = true;
- //
// tabControl2
//
this.tabControl2.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
@@ -176,7 +167,7 @@
//
// tabPage12
//
- this.tabPage12.Controls.Add(this.Te_Format);
+ this.tabPage12.Controls.Add(this.highlightEditor1);
this.tabPage12.Location = new System.Drawing.Point(4, 22);
this.tabPage12.Name = "tabPage12";
this.tabPage12.Padding = new System.Windows.Forms.Padding(3);
@@ -185,22 +176,26 @@
this.tabPage12.Text = "HTML格式化";
this.tabPage12.UseVisualStyleBackColor = true;
//
- // Te_Format
+ // highlightEditor1
//
- this.Te_Format.AutoScrollMinSize = new System.Drawing.Size(0, 17);
- this.Te_Format.ContextMenuStrip = this.contextMenuStripHighlightText1;
- this.Te_Format.Cursor = System.Windows.Forms.Cursors.IBeam;
- this.Te_Format.Dock = System.Windows.Forms.DockStyle.Fill;
- this.Te_Format.ImeMode = System.Windows.Forms.ImeMode.On;
- this.Te_Format.Location = new System.Drawing.Point(3, 3);
- this.Te_Format.Name = "Te_Format";
- this.Te_Format.Size = new System.Drawing.Size(875, 274);
- this.Te_Format.TabIndex = 24;
- //
- // contextMenuStripHighlightText1
- //
- this.contextMenuStripHighlightText1.Name = "contextMenuStripHighlightText1";
- this.contextMenuStripHighlightText1.Size = new System.Drawing.Size(101, 186);
+ this.highlightEditor1.AutoCAutoHide = false;
+ this.highlightEditor1.AutoCMaxHeight = 9;
+ this.highlightEditor1.BiDirectionality = ScintillaNET.BiDirectionalDisplayType.Disabled;
+ this.highlightEditor1.BorderStyle = System.Windows.Forms.BorderStyle.None;
+ this.highlightEditor1.CaretLineBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(255)))), ((int)(((byte)(192)))));
+ this.highlightEditor1.CaretLineVisible = true;
+ this.highlightEditor1.Dock = System.Windows.Forms.DockStyle.Fill;
+ this.highlightEditor1.Font = new System.Drawing.Font("Consolas", 11.25F);
+ this.highlightEditor1.LexerName = null;
+ this.highlightEditor1.Location = new System.Drawing.Point(3, 3);
+ this.highlightEditor1.Name = "highlightEditor1";
+ this.highlightEditor1.ReadOnly = true;
+ this.highlightEditor1.ScrollWidth = 1;
+ this.highlightEditor1.Size = new System.Drawing.Size(875, 274);
+ this.highlightEditor1.TabIndents = true;
+ this.highlightEditor1.TabIndex = 0;
+ this.highlightEditor1.UseRightToLeftReadingLayout = false;
+ this.highlightEditor1.WrapMode = ScintillaNET.WrapMode.None;
//
// tabPage4
//
@@ -686,21 +681,10 @@
this.label3.TabIndex = 0;
this.label3.Text = "选择编码";
//
- // BtnRunHtml
- //
- this.BtnRunHtml.BaseColor = System.Drawing.Color.FromArgb(((int)(((byte)(51)))), ((int)(((byte)(76)))), ((int)(((byte)(95)))));
- this.BtnRunHtml.Location = new System.Drawing.Point(723, 6);
- this.BtnRunHtml.Name = "BtnRunHtml";
- this.BtnRunHtml.Size = new System.Drawing.Size(82, 26);
- this.BtnRunHtml.TabIndex = 104;
- this.BtnRunHtml.Text = "执行";
- this.BtnRunHtml.UseVisualStyleBackColor = true;
- this.BtnRunHtml.Click += new System.EventHandler(this.BtnRunHtml_Click);
- //
// RbPost
//
this.RbPost.AutoSize = true;
- this.RbPost.Location = new System.Drawing.Point(577, 10);
+ this.RbPost.Location = new System.Drawing.Point(629, 10);
this.RbPost.Name = "RbPost";
this.RbPost.Size = new System.Drawing.Size(47, 16);
this.RbPost.TabIndex = 103;
@@ -711,7 +695,7 @@
//
this.RbGet.AutoSize = true;
this.RbGet.Checked = true;
- this.RbGet.Location = new System.Drawing.Point(530, 10);
+ this.RbGet.Location = new System.Drawing.Point(582, 10);
this.RbGet.Name = "RbGet";
this.RbGet.Size = new System.Drawing.Size(41, 16);
this.RbGet.TabIndex = 102;
@@ -719,30 +703,6 @@
this.RbGet.Text = "Get";
this.RbGet.UseVisualStyleBackColor = true;
//
- // TxtUrl
- //
- this.TxtUrl.BackColor = System.Drawing.Color.White;
- this.TxtUrl.EmptyText = "请填写请求url";
- this.TxtUrl.ImeMode = System.Windows.Forms.ImeMode.Close;
- this.TxtUrl.Location = new System.Drawing.Point(45, 6);
- this.TxtUrl.MaxLength = 999999999;
- this.TxtUrl.Multiline = false;
- this.TxtUrl.Name = "TxtUrl";
- this.TxtUrl.OnlyNumeric = false;
- this.TxtUrl.PasswordChar = '\0';
- this.TxtUrl.ReadOnly = false;
- this.TxtUrl.SelectedText = "";
- this.TxtUrl.SelectionLength = 0;
- this.TxtUrl.SelectionStart = 0;
- this.TxtUrl.Size = new System.Drawing.Size(479, 23);
- this.TxtUrl.TabIndex = 110;
- this.TxtUrl.TextAlign = System.Windows.Forms.HorizontalAlignment.Left;
- this.TxtUrl.ToolTip = "";
- this.TxtUrl.WordWrap = true;
- this.TxtUrl.TextChanged2 += new System.EventHandler(this.TxtUrl_TextChanged2);
- this.TxtUrl.KeyDown += new System.Windows.Forms.KeyEventHandler(this.TxtUrl_KeyDown);
- this.TxtUrl.Leave += new System.EventHandler(this.TxtUrl_Leave);
- //
// label2
//
this.label2.AutoSize = true;
@@ -752,66 +712,6 @@
this.label2.TabIndex = 101;
this.label2.Text = "Url";
//
- // menuRight1
- //
- this.menuRight1.Name = "menuRight1";
- this.menuRight1.Size = new System.Drawing.Size(185, 92);
- this.menuRight1.SourceContent = this;
- //
- // BtnCtreateCShape
- //
- this.BtnCtreateCShape.BaseColor = System.Drawing.Color.FromArgb(((int)(((byte)(51)))), ((int)(((byte)(76)))), ((int)(((byte)(95)))));
- this.BtnCtreateCShape.Location = new System.Drawing.Point(812, 6);
- this.BtnCtreateCShape.Name = "BtnCtreateCShape";
- this.BtnCtreateCShape.Size = new System.Drawing.Size(82, 26);
- this.BtnCtreateCShape.TabIndex = 111;
- this.BtnCtreateCShape.Text = "生成代码";
- this.BtnCtreateCShape.UseVisualStyleBackColor = true;
- this.BtnCtreateCShape.Click += new System.EventHandler(this.BtnCtreateCShape_Click);
- //
- // timer1
- //
- this.timer1.Interval = 1000;
- this.timer1.Tick += new System.EventHandler(this.timer1_Tick);
- //
- // objectListView2
- //
- this.objectListView2.AllColumns.Add(this.OlvUrl);
- this.objectListView2.AllColumns.Add(this.OlvName);
- this.objectListView2.CellEditUseWholeCell = false;
- this.objectListView2.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] {
- this.OlvUrl,
- this.OlvName});
- this.objectListView2.ContextMenuStrip = this.contextMenuStrip1;
- this.objectListView2.Cursor = System.Windows.Forms.Cursors.Default;
- this.objectListView2.FullRowSelect = true;
- this.objectListView2.HideSelection = false;
- this.objectListView2.Location = new System.Drawing.Point(45, 30);
- this.objectListView2.MultiSelect = false;
- this.objectListView2.Name = "objectListView2";
- this.objectListView2.RowHeight = 25;
- this.objectListView2.ShowGroups = false;
- this.objectListView2.ShowItemToolTips = true;
- this.objectListView2.Size = new System.Drawing.Size(653, 323);
- this.objectListView2.TabIndex = 113;
- this.objectListView2.UseCompatibleStateImageBehavior = false;
- this.objectListView2.UseHotItem = true;
- this.objectListView2.View = System.Windows.Forms.View.Details;
- this.objectListView2.Visible = false;
- this.objectListView2.KeyDown += new System.Windows.Forms.KeyEventHandler(this.Table1_KeyDown);
- this.objectListView2.Leave += new System.EventHandler(this.Table1_Leave);
- this.objectListView2.MouseClick += new System.Windows.Forms.MouseEventHandler(this.table1_MouseClick);
- //
- // OlvUrl
- //
- this.OlvUrl.Text = "网址";
- this.OlvUrl.Width = 430;
- //
- // OlvName
- //
- this.OlvName.Text = "名称";
- this.OlvName.Width = 200;
- //
// contextMenuStrip1
//
this.contextMenuStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
@@ -821,7 +721,7 @@
this.设置备注ToolStripMenuItem});
this.contextMenuStrip1.Name = "contextMenuStrip1";
this.contextMenuStrip1.Size = new System.Drawing.Size(149, 76);
- this.contextMenuStrip1.Opening += new System.ComponentModel.CancelEventHandler(this.contextMenuStrip1_Opening);
+ this.contextMenuStrip1.Opening += new System.ComponentModel.CancelEventHandler(this.ContextMenuStrip1_Opening);
//
// 置顶收藏该项ToolStripMenuItem
//
@@ -849,14 +749,123 @@
this.设置备注ToolStripMenuItem.Text = "设置备注";
this.设置备注ToolStripMenuItem.Click += new System.EventHandler(this.设置备注ToolStripMenuItem_Click);
//
+ // menuRight1
+ //
+ this.menuRight1.Name = "menuRight1";
+ this.menuRight1.Size = new System.Drawing.Size(185, 92);
+ this.menuRight1.SourceContent = null;
+ //
+ // TxtUrl
+ //
+ this.TxtUrl.BackColor = System.Drawing.Color.White;
+ this.TxtUrl.EmptyText = "请填写请求url";
+ this.TxtUrl.ImeMode = System.Windows.Forms.ImeMode.Close;
+ this.TxtUrl.Location = new System.Drawing.Point(45, 6);
+ this.TxtUrl.MaxLength = 999999999;
+ this.TxtUrl.Multiline = false;
+ this.TxtUrl.Name = "TxtUrl";
+ this.TxtUrl.OnlyNumeric = false;
+ this.TxtUrl.PasswordChar = '\0';
+ this.TxtUrl.ReadOnly = false;
+ this.TxtUrl.SelectedText = "";
+ this.TxtUrl.SelectionLength = 0;
+ this.TxtUrl.SelectionStart = 0;
+ this.TxtUrl.Size = new System.Drawing.Size(505, 23);
+ this.TxtUrl.TabIndex = 110;
+ this.TxtUrl.TextAlign = System.Windows.Forms.HorizontalAlignment.Left;
+ this.TxtUrl.ToolTip = "";
+ this.TxtUrl.WordWrap = true;
+ this.TxtUrl.TextChanged2 += new System.EventHandler(this.TxtUrl_TextChanged2);
+ this.TxtUrl.KeyDown += new System.Windows.Forms.KeyEventHandler(this.TxtUrl_KeyDown);
+ this.TxtUrl.Leave += new System.EventHandler(this.TxtUrl_Leave);
+ //
+ // BtnCtreateCShape
+ //
+ this.BtnCtreateCShape.BaseColor = System.Drawing.Color.FromArgb(((int)(((byte)(51)))), ((int)(((byte)(76)))), ((int)(((byte)(95)))));
+ this.BtnCtreateCShape.Location = new System.Drawing.Point(812, 6);
+ this.BtnCtreateCShape.Name = "BtnCtreateCShape";
+ this.BtnCtreateCShape.Size = new System.Drawing.Size(82, 26);
+ this.BtnCtreateCShape.TabIndex = 111;
+ this.BtnCtreateCShape.Text = "生成代码";
+ this.BtnCtreateCShape.UseVisualStyleBackColor = true;
+ this.BtnCtreateCShape.Click += new System.EventHandler(this.BtnCtreateCShape_Click);
+ //
+ // BtnRunHtml
+ //
+ this.BtnRunHtml.BaseColor = System.Drawing.Color.FromArgb(((int)(((byte)(51)))), ((int)(((byte)(76)))), ((int)(((byte)(95)))));
+ this.BtnRunHtml.Location = new System.Drawing.Point(723, 6);
+ this.BtnRunHtml.Name = "BtnRunHtml";
+ this.BtnRunHtml.Size = new System.Drawing.Size(82, 26);
+ this.BtnRunHtml.TabIndex = 104;
+ this.BtnRunHtml.Text = "执行";
+ this.BtnRunHtml.UseVisualStyleBackColor = true;
+ this.BtnRunHtml.Click += new System.EventHandler(this.BtnRunHtml_Click);
+ //
+ // objectListView2
+ //
+ this.objectListView2.AllColumns.Add(this.OlvUrl);
+ this.objectListView2.AllColumns.Add(this.OlvName);
+ this.objectListView2.CellEditUseWholeCell = false;
+ this.objectListView2.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] {
+ this.OlvUrl,
+ this.OlvName});
+ this.objectListView2.ContextMenuStrip = this.contextMenuStrip1;
+ this.objectListView2.Cursor = System.Windows.Forms.Cursors.Default;
+ this.objectListView2.FullRowSelect = true;
+ this.objectListView2.HideSelection = false;
+ this.objectListView2.Location = new System.Drawing.Point(45, 30);
+ this.objectListView2.MultiSelect = false;
+ this.objectListView2.Name = "objectListView2";
+ this.objectListView2.RowHeight = 25;
+ this.objectListView2.ShowItemToolTips = true;
+ this.objectListView2.Size = new System.Drawing.Size(653, 323);
+ this.objectListView2.TabIndex = 113;
+ this.objectListView2.UseCompatibleStateImageBehavior = false;
+ this.objectListView2.UseHotItem = true;
+ this.objectListView2.View = System.Windows.Forms.View.Details;
+ this.objectListView2.Visible = false;
+ this.objectListView2.KeyDown += new System.Windows.Forms.KeyEventHandler(this.Table1_KeyDown);
+ this.objectListView2.Leave += new System.EventHandler(this.Table1_Leave);
+ this.objectListView2.MouseClick += new System.Windows.Forms.MouseEventHandler(this.Table1_MouseClick);
+ //
+ // OlvUrl
+ //
+ this.OlvUrl.Text = "网址";
+ this.OlvUrl.Width = 430;
+ //
+ // OlvName
+ //
+ this.OlvName.Text = "名称";
+ this.OlvName.Width = 200;
+ //
+ // BtnMore
+ //
+ this.BtnMore.Cursor = System.Windows.Forms.Cursors.Hand;
+ this.BtnMore.Image = ((System.Drawing.Image)(resources.GetObject("BtnMore.Image")));
+ this.BtnMore.ImageDomain = null;
+ this.BtnMore.ImageResFolder = null;
+ this.BtnMore.Location = new System.Drawing.Point(556, 8);
+ this.BtnMore.Name = "BtnMore";
+ this.BtnMore.Size = new System.Drawing.Size(20, 18);
+ this.BtnMore.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom;
+ this.BtnMore.TabIndex = 114;
+ this.BtnMore.TabStop = false;
+ this.toolTip1.SetToolTip(this.BtnMore, "更多选项");
+ this.BtnMore.Click += new System.EventHandler(this.BtnMore_Click);
+ //
+ // MenuMore
+ //
+ this.MenuMore.Name = "MenuMore";
+ this.MenuMore.Size = new System.Drawing.Size(61, 4);
+ //
// FrmWebGet
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(909, 620);
+ this.Controls.Add(this.BtnMore);
this.Controls.Add(this.TxtUrl);
this.Controls.Add(this.BtnCtreateCShape);
- this.Controls.Add(this.ChkUrlLower);
this.Controls.Add(this.tabControl2);
this.Controls.Add(this.groupBox3);
this.Controls.Add(this.groupBox2);
@@ -889,16 +898,15 @@
this.groupBox2.PerformLayout();
this.groupBox1.ResumeLayout(false);
this.groupBox1.PerformLayout();
- ((System.ComponentModel.ISupportInitialize)(this.objectListView2)).EndInit();
this.contextMenuStrip1.ResumeLayout(false);
+ ((System.ComponentModel.ISupportInitialize)(this.objectListView2)).EndInit();
+ ((System.ComponentModel.ISupportInitialize)(this.BtnMore)).EndInit();
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
-
- private System.Windows.Forms.CheckBox ChkUrlLower;
private System.Windows.Forms.TabControl tabControl2;
private System.Windows.Forms.TabPage tabPage3;
private System.Windows.Forms.PictureBox pictureBox1;
@@ -930,10 +938,8 @@
private System.Windows.Forms.RadioButton RbGet;
private ryControls.TextBoxEx2 TxtUrl;
private System.Windows.Forms.Label label2;
- private ryProcessManager.hezuo.ContextMenuStripHighlightText contextMenuStripHighlightText1;
private ryPaiban.Model.MenuRight menuRight1;
private ryControls.ButtonEx BtnCtreateCShape;
- private System.Windows.Forms.Timer timer1;
private System.Windows.Forms.TabControl tabControl1;
private System.Windows.Forms.TabPage tabPage1;
private System.Windows.Forms.TabPage tabPage2;
@@ -945,7 +951,6 @@
private ExtendedWebBrowser2.ExtendedWebBrowser extendedWebBrowser1;
private System.Windows.Forms.CheckBox ChkHtmlPreview;
private System.Windows.Forms.CheckBox ChkNoPreview;
- private FastColoredTextBoxNS.FastColoredTextBox Te_Format;
private BrightIdeasSoftware.ObjectListView objectListView2;
private BrightIdeasSoftware.OLVColumn OlvUrl;
private BrightIdeasSoftware.OLVColumn OlvName;
@@ -958,5 +963,9 @@
private System.Windows.Forms.ToolStripMenuItem 删除该项ToolStripMenuItem;
private System.Windows.Forms.ToolStripSeparator toolStripMenuItem1;
private System.Windows.Forms.ToolStripMenuItem 设置备注ToolStripMenuItem;
+ private ryControls.HighlightEditor highlightEditor1;
+ private ryControls.SuperPictureBox BtnMore;
+ private System.Windows.Forms.ContextMenuStrip MenuMore;
+ private System.Windows.Forms.ToolTip toolTip1;
}
}
\ No newline at end of file
diff --git a/Source/开发辅助工具/Tools/FrmWebGet.cs b/Source/开发辅助工具/Tools/FrmWebGet.cs
index fd0a499..11fdbcb 100644
--- a/Source/开发辅助工具/Tools/FrmWebGet.cs
+++ b/Source/开发辅助工具/Tools/FrmWebGet.cs
@@ -1,16 +1,21 @@
using BrightIdeasSoftware;
using DotNet4.Utilities;
-using FastColoredTextBoxNS;
using Newtonsoft.Json;
using Newtonsoft.Json.Linq;
using ryCommon;
using ryCommonDb;
+using ryControls;
+using ryProcessManager.hezuo;
+using ScintillaNET;
using Sheng.Winform.Controls.PopupControl;
+using SuperDesign.Controls;
+using SuperDesign.Tools;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
+using System.Drawing.Design;
using System.IO;
using System.Linq;
using System.Net;
@@ -20,8 +25,10 @@ using System.Text;
using System.Text.RegularExpressions;
using System.Threading;
using System.Windows.Forms;
+using VPKSoft.ScintillaLexers;
using WeifenLuo.WinFormsUI.Docking;
using 开发辅助工具.Manager;
+using static ScintillaNET.Style;
namespace 开发辅助工具.Tools
{
@@ -32,12 +39,6 @@ namespace 开发辅助工具.Tools
InitializeComponent();
LoadPram();
tabControl2.SelectedTab = tabPage12;
- Te_Format.ClearStylesBuffer();
- Te_Format.Range.ClearStyle(StyleIndex.All);
- Te_Format.AddStyle(new MarkerStyle(new SolidBrush(Color.FromArgb(40, Color.Gray))));
- Te_Format.AutoIndentNeeded -= fctb_AutoIndentNeeded;
- Te_Format.Language = Language.JSON;
- Te_Format.OnSyntaxHighlight(new TextChangedEventArgs(Te_Format.Range));
OlvUrl.AspectGetter = delegate (object x) { return ((UrlInfo)x).Url; };
OlvName.AspectGetter = delegate (object x) {
var item = (UrlInfo)x;
@@ -50,29 +51,31 @@ namespace 开发辅助工具.Tools
};
//OlvUrl.Renderer = CreateDescribedTaskRenderer();
objectListView2.FormatRow += ObjectListView2_FormatRow;
+
}
private DescribedTaskRenderer CreateDescribedTaskRenderer()
{
// Let's create an appropriately configured renderer.
- DescribedTaskRenderer renderer = new DescribedTaskRenderer();
+ DescribedTaskRenderer renderer = new DescribedTaskRenderer
+ {
+ // Give the renderer its own collection of images.
+ // If this isn't set, the renderer will use the SmallImageList from the ObjectListView.
+ // (this is standard Renderer behaviour, not specific to DescribedTaskRenderer).
+ // Tell the renderer which property holds the text to be used as a description
+ DescriptionAspectName = "Name",
+ UseCustomCheckboxImages = false,
+ // Change the formatting slightly
+ TitleFont = new Font("宋体", 9, FontStyle.Regular),
+ DescriptionFont = new Font("宋体", 9),
+ DescriptionColor = Color.Gray,
+ TopSpace = 2,
+ //renderer.ImageTextSpace = 8;
+ TitleDescriptionSpace = 2,
- // Give the renderer its own collection of images.
- // If this isn't set, the renderer will use the SmallImageList from the ObjectListView.
- // (this is standard Renderer behaviour, not specific to DescribedTaskRenderer).
- // Tell the renderer which property holds the text to be used as a description
- renderer.DescriptionAspectName = "Name";
- renderer.UseCustomCheckboxImages = false;
- // Change the formatting slightly
- renderer.TitleFont = new Font("宋体", 9, FontStyle.Regular);
- renderer.DescriptionFont = new Font("宋体", 9);
- renderer.DescriptionColor = Color.Gray;
- renderer.TopSpace = 2;
- //renderer.ImageTextSpace = 8;
- renderer.TitleDescriptionSpace = 2;
-
- // Use older Gdi renderering, since most people think the text looks clearer
- renderer.UseGdiTextRendering = true;
+ // Use older Gdi renderering, since most people think the text looks clearer
+ UseGdiTextRendering = true
+ };
// If you like colours other than black and grey, you could uncomment these
// renderer.TitleColor = Color.DarkBlue;
@@ -86,48 +89,8 @@ namespace 开发辅助工具.Tools
if (item.Fav) { e.Item.ForeColor = Color.Blue; } else { e.Item.ForeColor = Color.Black; }
}
- private void fctb_AutoIndentNeeded(object sender, AutoIndentEventArgs args)
- {
- //block {}
- if (Regex.IsMatch(args.LineText, @"^[^""']*\{.*\}[^""']*$"))
- return;
- //start of block {}
- if (Regex.IsMatch(args.LineText, @"^[^""']*\{"))
- {
- args.ShiftNextLines = args.TabLength;
- return;
- }
- //end of block {}
- if (Regex.IsMatch(args.LineText, @"}[^""']*$"))
- {
- args.Shift = -args.TabLength;
- args.ShiftNextLines = -args.TabLength;
- return;
- }
- //label
- if (Regex.IsMatch(args.LineText, @"^\s*\w+\s*:\s*($|//)") &&
- !Regex.IsMatch(args.LineText, @"^\s*default\s*:"))
- {
- args.Shift = -args.TabLength;
- return;
- }
- //some statements: case, default
- if (Regex.IsMatch(args.LineText, @"^\s*(case|default)\b.*:\s*($|//)"))
- {
- args.Shift = -args.TabLength / 2;
- return;
- }
- //is unclosed operator in previous line ?
- if (Regex.IsMatch(args.PrevLineText, @"^\s*(if|for|foreach|while|[\}\s]*else)\b[^{]*$"))
- if (!Regex.IsMatch(args.PrevLineText, @"(;\s*$)|(;\s*//)"))//operator is unclosed
- {
- args.Shift = args.TabLength;
- return;
- }
- }
private void LoadPram()
{
- Te_Format.ReadOnly = true;
CbbContentType.SelectedIndex = 0;
CbbUserAgent.SelectedIndex = 0;
CbbEncoding.SelectedIndex = 0;
@@ -168,8 +131,10 @@ namespace 开发辅助工具.Tools
});
TxtPost.AddMenu("插入时间戳", "").Click += new EventHandler((object sender2, EventArgs e2) =>
{
- SuperDesign.Controls.FrmInsertUnixTime frm = new SuperDesign.Controls.FrmInsertUnixTime();
- frm.Icon = Icon;
+ SuperDesign.Controls.FrmInsertUnixTime frm = new SuperDesign.Controls.FrmInsertUnixTime
+ {
+ Icon = Icon
+ };
var text = TxtPost.SelectedText;
if(text.Length>4 && text.IsInt())
{
@@ -199,6 +164,7 @@ namespace 开发辅助工具.Tools
Thread th;
private void BtnRunHtml_Click(object sender, EventArgs e)
{
+ objectListView2.Visible = false;
if (IsRunning) {
IsExit = true;
BtnRunHtml.Text = "停止中"; ;
@@ -213,7 +179,7 @@ namespace 开发辅助工具.Tools
BtnRunHtml.Text = "停止执行"; ;
#region 将当前设置赋值到查询
this.RichHtml.Text = "正在获取数据...";
- Te_Format.Text = "正在获取数据...";
+ highlightEditor1.Text="正在获取数据...";
this.RichCookie.Text = "";
RichHeader.Text = "";
RichStatus.Text = "";
@@ -256,12 +222,11 @@ namespace 开发辅助工具.Tools
{
URL = TxtUrl.Text.Trim(),
Method = str,
- IsToLower = this.ChkUrlLower.Checked,
Cookie = this.TxtCookie.Text.Trim(),
Referer = this.CbbReferer.Text.Trim(),
Postdata = PostData,
- Timeout = Convert.ToInt32(this.CbbTimeout.Text.Replace("秒", string.Empty).Trim()) * 0x3e8,
- ReadWriteTimeout = Convert.ToInt32(this.CbbWriteTimeout.Text.Replace("秒", string.Empty).Trim()) * 0x3e8,
+ Timeout = this.CbbTimeout.Text.Replace("秒", string.Empty).Trim().ToInt() * 0x3e8,
+ ReadWriteTimeout = this.CbbWriteTimeout.Text.Replace("秒", string.Empty).Trim().ToInt() * 0x3e8,
UserAgent = this.CbbUserAgent.Text,
ContentType = this.CbbContentType.Text,
Allowautoredirect = this.ChkJump.Checked,
@@ -288,7 +253,7 @@ namespace 开发辅助工具.Tools
catch (Exception exception)
{
this.RichHtml.Text = exception.Message;
- Te_Format.Text = "";
+ highlightEditor1.Text = "";
tabControl2.SelectedIndex = 0;
BtnRunHtml.Text = "执行";
IsRunning = false;
@@ -297,9 +262,9 @@ namespace 开发辅助工具.Tools
}
if (CbbUserAgent.SelectedIndex != -1)
{
- if (CbbUserAgent.SelectedItem is UserAgentInfo)
+ if (CbbUserAgent.SelectedItem is UserAgentInfo info)
{
- item.UserAgent = ((UserAgentInfo)CbbUserAgent.SelectedItem).useragent;
+ item.UserAgent = info.useragent;
}
}
if (!string.IsNullOrEmpty(this.CbbIp.Text.Trim()))
@@ -325,13 +290,13 @@ namespace 开发辅助工具.Tools
DateTime dt = DateTime.Now;
var result = http.GetHtml(item);
DateTime dt_end = DateTime.Now;
- _ = this.Invoke(new Action(() =>
+ this.Invoke(new Action(() =>
{
#region 将获得的结果显示出来
if (result.Html.Length > 1024 * 1024 * 4)
{
this.RichHtml.Text = "获取失败,您要获取的网页超过4MB,暂时无法获取。";
- Te_Format.Text = "获取失败,您要获取的网页超过4MB,暂时无法获取。";
+ highlightEditor1.Text = "获取失败,您要获取的网页超过4MB,暂时无法获取。";
}
else
{
@@ -363,8 +328,7 @@ namespace 开发辅助工具.Tools
this.RichHtml.Text = result.Html;
if (Manager.Json.IsJson(result.Html))
{
- Te_Format.Language = Language.JSON;
- Te_Format.Text = Manager.Json.ConvertJsonString(result.Html);
+ highlightEditor1.SetHightlightText(Manager.Json.ConvertJsonString(result.Html), "json");
AddUrl("", TxtUrl.Text);
}
else
@@ -380,15 +344,17 @@ namespace 开发辅助工具.Tools
if (_html.Length > 0) { _html += "\r\n"; }
_html += _format_html[i];
}
- Te_Format.Language = Language.HTML;
- try
- {
- Te_Format.Text = JJCCX.Xml.HtmlFormater.ConvertToXml(_html, true);
- }
- catch
- {
- Te_Format.Text = _html;
- }
+ //try
+ //{
+ // var html2 = JJCCX.Xml.HtmlFormater.ConvertToXml(_html, true);
+ // scintilla1.Text = html2;
+ //}
+ //catch(Exception ex)
+ //{
+ // scintilla1.Text = _html;
+ //}
+ IndentLibrary.HtmlIndent indent = new IndentLibrary.HtmlIndent();
+ highlightEditor1.SetHightlightText(indent.Beautify(_html).Trim(),"html");
if (result.StatusCode == System.Net.HttpStatusCode.Redirect || result.StatusCode == System.Net.HttpStatusCode.OK)
{
string title = "";
@@ -433,7 +399,7 @@ namespace 开发辅助工具.Tools
{
extendedWebBrowser1.LoadStrings(RichHtml.Text.Trim(), Encoding.GetEncoding(this.CbbEncoding.Text.Trim()));
}
- else { extendedWebBrowser1.LoadStrings(RichHtml.Text.Trim(), Encoding.UTF8); }
+ else { extendedWebBrowser1.LoadStrings(RichHtml.Text.Trim()); }
//MessageBox.Show(extendedWebBrowser1.Document.Encoding);
//extendedWebBrowser1.Document.Encoding = Encoding.UTF8.BodyName;
}
@@ -471,7 +437,7 @@ namespace 开发辅助工具.Tools
{
this.RichHtml.Text = exception.Message;
}
- Te_Format.Text = "";
+ highlightEditor1.Text = "";
}));
}
this.Invoke(new Action(() =>
@@ -507,10 +473,12 @@ namespace 开发辅助工具.Tools
}
private void FrmWebGet_Load(object sender, EventArgs e)
{
+ highlightEditor1.SetFocus();
//TxtPost.AutoWordSelection = false;
System.Net.ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12; //加上这一句
- contextMenuStripHighlightText1.AddSeparatorMenu();
- contextMenuStripHighlightText1.AddMenu("将选中的内容作为Json分析", "").Click += AnalyJson_Click;
+ var highlight_menu = (ContextMenuStripHighlightText2)highlightEditor1.ContextMenuStrip;
+ highlight_menu.AddSeparatorMenu();
+ highlight_menu.AddMenu("将选中的内容作为Json分析", "").Click += AnalyJson_Click;
for (int i = 0; i < this.Controls.Count; i++)
{
switch (this.Controls[i])
@@ -543,7 +511,7 @@ namespace 开发辅助工具.Tools
ContextMenuStrip menu =(ContextMenuStrip) (((ToolStripMenuItem)sender).Owner);
switch(menu.SourceControl)
{
- case FastColoredTextBox rich_txt:
+ case HighlightEditor rich_txt:
var SelectedText= rich_txt.SelectedText;
if (SelectedText == "") { SelectedText = rich_txt.Text; }
//if (Manager.Json.IsJson(SelectedText))
@@ -581,7 +549,6 @@ namespace 开发辅助工具.Tools
{
URL = TxtUrl.Text.Trim(),
Method = str,
- IsToLower = this.ChkUrlLower.Checked,
Cookie = this.TxtCookie.Text.Trim(),
Referer = this.CbbReferer.Text.Trim(),
Postdata = this.TxtPost.Text.Trim(),
@@ -594,9 +561,9 @@ namespace 开发辅助工具.Tools
};
if (CbbUserAgent.SelectedIndex != -1)
{
- if (CbbUserAgent.SelectedItem is UserAgentInfo)
+ if (CbbUserAgent.SelectedItem is UserAgentInfo info2)
{
- item.UserAgent = ((UserAgentInfo)CbbUserAgent.SelectedItem).useragent;
+ item.UserAgent = info2.useragent;
}
}
if (!string.IsNullOrEmpty(this.CbbIp.Text.Trim()))
@@ -620,7 +587,6 @@ namespace 开发辅助工具.Tools
builder.Append(" Encoding = System.Text.Encoding.GetEncoding( \"" + this.CbbEncoding.Text.Trim() + "\"),//URL 可选项 默认为Get \r\n");
}
builder.Append(" Method = \"" + item.Method + "\",//URL 可选项 默认为Get \r\n");
- builder.Append(" IsToLower = " + item.IsToLower.ToString().ToLower() + ",//得到的HTML代码是否转成小写 可选项默认转小写 \r\n");
builder.Append(" Cookie = \"" + item.Cookie + "\",//字符串Cookie 可选项 \r\n");
builder.Append(" Referer =\"" + item.Referer + "\",//来源URL 可选项 \r\n");
builder.Append(" Postdata = \"" + item.Postdata + "\",//Post数据 可选项GET时不需要写 \r\n");
@@ -652,8 +618,7 @@ namespace 开发辅助工具.Tools
builder.Append(" return Bitmap.FromStream(ms,true);\r\n");
builder.Append(" }\r\n");
RichHtml.Text = builder.ToString();
- Te_Format.Language = Language.CSharp;
- Te_Format.Text= builder.ToString();
+ highlightEditor1.SetHightlightText(builder.ToString(), "c#");
}
public void AddUrl(string title,string url)
@@ -781,7 +746,6 @@ namespace 开发辅助工具.Tools
#region 重新载入数据
objectListView2.ClearObjects();
List list = new List();
- DataProvider mydb = new DataProvider();
IDbInterface db = Itrycn_Db.CreateDataProvider(Itrycn_Db.dataType);
if (db.ConnDb(Itrycn_Db.User_SQLConn) == 1)
{
@@ -838,13 +802,7 @@ namespace 开发辅助工具.Tools
objectListView2.Visible = false;
}
}
-
-
- private void timer1_Tick(object sender, EventArgs e)
- {
- }
-
- private void table1_MouseClick(object sender, MouseEventArgs e)
+ private void Table1_MouseClick(object sender, MouseEventArgs e)
{
if (e.Button == MouseButtons.Left)
{
@@ -906,7 +864,7 @@ namespace 开发辅助工具.Tools
}
- private void contextMenuStrip1_Opening(object sender, CancelEventArgs e)
+ private void ContextMenuStrip1_Opening(object sender, CancelEventArgs e)
{
var item = (UrlInfo)objectListView2.SelectedObject;
if (item == null) { return; }
@@ -954,6 +912,104 @@ namespace 开发辅助工具.Tools
}
db.Free();
}
+
+ private void BtnMore_Click(object sender, EventArgs e)
+ {
+ SuperPictureBox btn = (SuperPictureBox)sender;
+ Point p = new Point(0, btn.Height);
+ MenuMore.Items.Clear();
+ AddMenu("API编辑器", "api");
+ AddMenu("-", "");
+ try
+ {
+ var uri = new Uri(TxtUrl.Text);
+ var host = uri.Host.ToLower();
+ if(host.IndexOfEx("www.87g")==0 || host.IndexOfEx("www.3h3") == 0
+ ||host.IndexOfEx("www.downxia") == 0 || host.IndexOfEx("www.downbank") == 0)
+ {
+ List list = new List
+ {
+ new MenuTag() { Title = "切换到【87G】87g.com", Site = "http://www.87g.com" },
+ new MenuTag() { Title = "切换到【87G】87g.cn", Site = "http://www.87g.cn" },
+ new MenuTag() { Title = "-", Site = "" },
+ new MenuTag() { Title = "切换到【当游】3h3.com", Site = "http://www.3h3.com" },
+ new MenuTag() { Title = "切换到【当游】3h3.cn", Site = "http://www.3h3.cn" },
+ new MenuTag() { Title = "-", Site = "" },
+ new MenuTag() { Title = "切换到【当下】downxia.com", Site = "http://www.downxia.com" },
+ new MenuTag() { Title = "切换到【当下】downxia.cn", Site = "http://www.downxia.cn" },
+ new MenuTag() { Title = "-", Site = "" },
+ new MenuTag() { Title = "切换到【下银网】downbank.cn", Site = "https://www.downbank.cn" },
+ new MenuTag() { Title = "切换到【下银网】downbank.cc", Site = "http://www.downbank.cc" }
+ };
+ for (int i = 0; i < list.Count; i++)
+ {
+ if (list[i].Title=="-")
+ {
+ MenuMore.Items.Add(list[i].Title);
+ continue;
+ }
+ if (list[i].Site.IndexOfEx(host)>=0)
+ {continue;}
+ AddMenu(list[i].Title, list[i].Site);
+ }
+ }
+ }
+ catch { }
+
+ MenuMore.Show(btn, p);
+ void AddMenu(string title, string site)
+ {
+ ToolStripItem item = MenuMore.Items.Add(title);
+ item.Tag= new MenuTag() { Site = site };
+ item.Click += Item_Click;
+ }
+ }
+
+ private void Item_Click(object sender, EventArgs e)
+ {
+ if(sender is ToolStripItem item)
+ {
+ if(item.Tag is MenuTag menuTag)
+ {
+ if(menuTag.Site=="api")
+ {
+ Uri uri = null;
+ try
+ {
+ uri = new Uri(TxtUrl.Text);
+ }
+ catch { }
+ if (uri != null)
+ {
+ APIEditor frm = new APIEditor();
+ frm.LoadData(uri, TxtPost.Text);
+ if(frm.ShowDialog()==DialogResult.OK)
+ {
+ TxtPost.Text = frm.SelectedPostDatas;
+ }
+ frm.Dispose();
+ }
+ return;
+ }
+ var url = TxtUrl.Text;
+ var pos = url.IndexOfEx("//");
+ if(pos>=0)
+ {
+ pos = url.IndexOfEx("/", pos + 2);
+ if(pos>0)
+ {
+ TxtUrl.Text= menuTag.Site+ url.Substring(pos);
+ }
+ }
+ }
+ }
+ }
+
+ class MenuTag
+ {
+ public string Title { get; set; }
+ public string Site { get; set; }
+ }
}
public class UrlInfo
{
diff --git a/Source/开发辅助工具/Tools/FrmWebGet.resx b/Source/开发辅助工具/Tools/FrmWebGet.resx
index b523b1f..69629bb 100644
--- a/Source/开发辅助工具/Tools/FrmWebGet.resx
+++ b/Source/开发辅助工具/Tools/FrmWebGet.resx
@@ -117,16 +117,33 @@
System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
-
- 33, 18
+
+ 141, 17
- 603, 26
-
-
- 388, 26
+ 17, 17
+
+
+ iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAABGdBTUEAALGPC/xhBQAAAfJJREFUWEe9
+ VU1LxDAQ7dVf4GUvy+ZrFQWxTVwEEcGDIHgQj4InD/4JURQEUURRFARBUPQXeRAEwYMgeBAED4JO6my6
+ 29Zs2m32wUAzL8m8adK+QGO00SKETDbigWfU62qYczVeq7WG4gQhaoQz+aODMbkZJz1B0HA5qRVtxEnd
+ eTvpUwR0vcSo/E7qqFWkgkAX9SlCULkI+34lNdQdUgl8iWAsXOBUfpq9ubxBKouqRTSpmod9Pjr2vEbq
+ f1QlAjqdg/XvyT7qCqne6FdEk0YzsO6tY49LpNxRVgTn4TTc9tdkXXSBVHEUFUHplIJ5L2YNlWdIlYer
+ CDjzEOK5Y94JUv2jlwhCwgnIP5k5VB0hVR3+EyFEawyeH9t5weRBvMAH8kTAX+3B5Hi0j1OLQZBwVgcO
+ rUiLMEHlHk6xQpufoNEaDvUrlKy9iWDRFqatyHkTu0hZAZd0xdSiaj1Opt0QJu3ERA8YEVRtY8qKzuI6
+ rG7o+jr1Ony0Il3cyQ1LX6gUMsWLuCF8UodIlUK283JueIxUIeSceXk3hDM7RcoJOZ3374aw6TlSVmQ7
+ r9ANIaydZDr344b5Z5nt3KMbQnTd5mzng3HDW51PFx+oG0Lcd40r+nlZkSPiLxx/35Ug5zic3LBSGBGO
+ bugFWgQ+lkQQ/AJUtHba3NGRcAAAAABJRU5ErkJggg==
+
+
+
+ 423, 17
+
+
+ 306, 17
+
AAABAAEAICAAAAEAIACoEAAAFgAAACgAAAAgAAAAQAAAAAEAIAAAAAAAABAAAAAAAAAAAAAAAAAAAAAA
@@ -203,7 +220,4 @@
AB8AAAA/AAAAfwYMAP8AAAH/AAAD/wAAA/8=
-
- 280, 15
-
\ No newline at end of file
diff --git a/Source/开发辅助工具/Tools/FrmXpath.Designer.cs b/Source/开发辅助工具/Tools/FrmXpath.Designer.cs
index dcc8847..54a1964 100644
--- a/Source/开发辅助工具/Tools/FrmXpath.Designer.cs
+++ b/Source/开发辅助工具/Tools/FrmXpath.Designer.cs
@@ -33,12 +33,11 @@
this.splitContainer1 = new System.Windows.Forms.SplitContainer();
this.TxtXML = new ryControls.Controls.RichTextBox2();
this.panelEx1 = new ryControls.PanelEx();
- this.fastColoredTextBox1 = new FastColoredTextBoxNS.FastColoredTextBox();
- this.contextMenuStripHighlightText1 = new ryProcessManager.hezuo.ContextMenuStripHighlightText();
this.RySearchXpath = new ryControls.rySearch();
this.label1 = new System.Windows.Forms.Label();
this.CbbXMLType = new ryControls.RyComboBox();
this.menuRight1 = new ryPaiban.Model.MenuRight(this.components);
+ this.highlightEditor1 = new ryControls.HighlightEditor();
((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).BeginInit();
this.splitContainer1.Panel1.SuspendLayout();
this.splitContainer1.Panel2.SuspendLayout();
@@ -92,33 +91,15 @@
| 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.fastColoredTextBox1);
+ this.panelEx1.Controls.Add(this.highlightEditor1);
this.panelEx1.Location = new System.Drawing.Point(2, 3);
this.panelEx1.Name = "panelEx1";
this.panelEx1.Padding = new System.Windows.Forms.Padding(2);
this.panelEx1.RoundeStyle = ryControls.RoundStyle.None;
- this.panelEx1.Size = new System.Drawing.Size(869, 326);
+ this.panelEx1.Size = new System.Drawing.Size(869, 328);
this.panelEx1.TabIndex = 8;
this.panelEx1.TileBackColor = System.Drawing.Color.White;
//
- // fastColoredTextBox1
- //
- this.fastColoredTextBox1.AutoScrollMinSize = new System.Drawing.Size(0, 14);
- this.fastColoredTextBox1.ContextMenuStrip = this.contextMenuStripHighlightText1;
- this.fastColoredTextBox1.Cursor = System.Windows.Forms.Cursors.IBeam;
- this.fastColoredTextBox1.Dock = System.Windows.Forms.DockStyle.Fill;
- this.fastColoredTextBox1.Font = new System.Drawing.Font("Courier New", 9.75F);
- this.fastColoredTextBox1.ImeMode = System.Windows.Forms.ImeMode.On;
- this.fastColoredTextBox1.Location = new System.Drawing.Point(2, 2);
- this.fastColoredTextBox1.Name = "fastColoredTextBox1";
- this.fastColoredTextBox1.Size = new System.Drawing.Size(865, 322);
- this.fastColoredTextBox1.TabIndex = 0;
- //
- // contextMenuStripHighlightText1
- //
- this.contextMenuStripHighlightText1.Name = "contextMenuStripHighlightText1";
- this.contextMenuStripHighlightText1.Size = new System.Drawing.Size(101, 186);
- //
// RySearchXpath
//
this.RySearchXpath.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
@@ -165,6 +146,23 @@
this.menuRight1.Size = new System.Drawing.Size(185, 92);
this.menuRight1.SourceContent = this;
//
+ // highlightEditor1
+ //
+ this.highlightEditor1.AutoCMaxHeight = 9;
+ this.highlightEditor1.BiDirectionality = ScintillaNET.BiDirectionalDisplayType.Disabled;
+ this.highlightEditor1.CaretLineBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(255)))), ((int)(((byte)(192)))));
+ this.highlightEditor1.CaretLineVisible = true;
+ this.highlightEditor1.Dock = System.Windows.Forms.DockStyle.Fill;
+ this.highlightEditor1.LexerName = null;
+ this.highlightEditor1.Location = new System.Drawing.Point(2, 2);
+ this.highlightEditor1.Name = "highlightEditor1";
+ this.highlightEditor1.ScrollWidth = 88;
+ this.highlightEditor1.Size = new System.Drawing.Size(865, 324);
+ this.highlightEditor1.TabIndents = true;
+ this.highlightEditor1.TabIndex = 0;
+ this.highlightEditor1.UseRightToLeftReadingLayout = false;
+ this.highlightEditor1.WrapMode = ScintillaNET.WrapMode.None;
+ //
// FrmXpath
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
@@ -196,9 +194,8 @@
private ryControls.rySearch RySearchXpath;
private System.Windows.Forms.Label label1;
private ryControls.RyComboBox CbbXMLType;
- private ryProcessManager.hezuo.ContextMenuStripHighlightText contextMenuStripHighlightText1;
private ryPaiban.Model.MenuRight menuRight1;
private ryControls.Controls.RichTextBox2 TxtXML;
- private FastColoredTextBoxNS.FastColoredTextBox fastColoredTextBox1;
+ private ryControls.HighlightEditor highlightEditor1;
}
}
\ No newline at end of file
diff --git a/Source/开发辅助工具/Tools/FrmXpath.cs b/Source/开发辅助工具/Tools/FrmXpath.cs
index 65e6a39..63ba08f 100644
--- a/Source/开发辅助工具/Tools/FrmXpath.cs
+++ b/Source/开发辅助工具/Tools/FrmXpath.cs
@@ -1,5 +1,4 @@
-using FastColoredTextBoxNS;
-using HtmlAgilityPack;
+using HtmlAgilityPack;
using Newtonsoft.Json;
using Newtonsoft.Json.Linq;
using System;
@@ -21,62 +20,18 @@ namespace 开发辅助工具.Tools
{
InitializeComponent();
CbbXMLType.SelectedIndex = 0;
- fastColoredTextBox1.ReadOnly = true;
- fastColoredTextBox1.ClearStylesBuffer();
- fastColoredTextBox1.Range.ClearStyle(StyleIndex.All);
- fastColoredTextBox1.AddStyle(new MarkerStyle(new SolidBrush(Color.FromArgb(40, Color.Gray))));
- fastColoredTextBox1.AutoIndentNeeded -= fctb_AutoIndentNeeded;
- fastColoredTextBox1.Language = Language.JSON;
- fastColoredTextBox1.OnSyntaxHighlight(new TextChangedEventArgs(fastColoredTextBox1.Range));
- }
- private void fctb_AutoIndentNeeded(object sender, AutoIndentEventArgs args)
- {
- //block {}
- if (Regex.IsMatch(args.LineText, @"^[^""']*\{.*\}[^""']*$"))
- return;
- //start of block {}
- if (Regex.IsMatch(args.LineText, @"^[^""']*\{"))
- {
- args.ShiftNextLines = args.TabLength;
- return;
- }
- //end of block {}
- if (Regex.IsMatch(args.LineText, @"}[^""']*$"))
- {
- args.Shift = -args.TabLength;
- args.ShiftNextLines = -args.TabLength;
- return;
- }
- //label
- if (Regex.IsMatch(args.LineText, @"^\s*\w+\s*:\s*($|//)") &&
- !Regex.IsMatch(args.LineText, @"^\s*default\s*:"))
- {
- args.Shift = -args.TabLength;
- return;
- }
- //some statements: case, default
- if (Regex.IsMatch(args.LineText, @"^\s*(case|default)\b.*:\s*($|//)"))
- {
- args.Shift = -args.TabLength / 2;
- return;
- }
- //is unclosed operator in previous line ?
- if (Regex.IsMatch(args.PrevLineText, @"^\s*(if|for|foreach|while|[\}\s]*else)\b[^{]*$"))
- if (!Regex.IsMatch(args.PrevLineText, @"(;\s*$)|(;\s*//)"))//operator is unclosed
- {
- args.Shift = args.TabLength;
- return;
- }
+ highlightEditor1.ReadOnly = true;
}
private void RySearchXpath_OnSearch(object sender, EventArgs e)
{
string text = "";
+ var format = "";
try
{
if (CbbXMLType.SelectedIndex == 0)
{
- fastColoredTextBox1.Language = Language.XML;
+ format="xml";
System.Xml.XmlDocument xml = new System.Xml.XmlDocument();
xml.LoadXml(TxtXML.Text);
var node = xml.SelectNodes(RySearchXpath.Text);
@@ -91,7 +46,7 @@ namespace 开发辅助工具.Tools
}
else if (CbbXMLType.SelectedIndex == 1)
{
- fastColoredTextBox1.Language = Language.HTML;
+ format = "html";
HtmlAgilityPack.HtmlDocument htmlDoc = new HtmlAgilityPack.HtmlDocument();
htmlDoc.LoadHtml(TxtXML.Text);
HtmlNodeCollection anchors = htmlDoc.DocumentNode.SelectNodes(RySearchXpath.Text);
@@ -106,7 +61,7 @@ namespace 开发辅助工具.Tools
}
else if (CbbXMLType.SelectedIndex == 2)
{
- fastColoredTextBox1.Language = Language.JSON;
+ format = "json";
try
{
JObject jo = (JObject)JsonConvert.DeserializeObject(TxtXML.Text);
@@ -126,12 +81,12 @@ namespace 开发辅助工具.Tools
{
MessageBox.Show(ex.Message, "错误提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
}
- fastColoredTextBox1.Text = text;
+ highlightEditor1.SetHightlightText(text,format);
}
private void FrmXpath_Load(object sender, EventArgs e)
{
-
+ highlightEditor1.SetFocus();
}
private void TxtXML_DoubleClick(object sender, EventArgs e)
diff --git a/Source/开发辅助工具/Tools/FrmXpath.resx b/Source/开发辅助工具/Tools/FrmXpath.resx
index 0ec0491..4c674a3 100644
--- a/Source/开发辅助工具/Tools/FrmXpath.resx
+++ b/Source/开发辅助工具/Tools/FrmXpath.resx
@@ -117,9 +117,6 @@
System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
-
- 17, 17
-
262, 17