diff --git a/Bin/Debug/CommonControls/.NET4 示例/Itrycn_Project.exe b/Bin/Debug/CommonControls/.NET4 示例/Itrycn_Project.exe index 502ef65..c7070c8 100644 Binary files a/Bin/Debug/CommonControls/.NET4 示例/Itrycn_Project.exe and b/Bin/Debug/CommonControls/.NET4 示例/Itrycn_Project.exe differ diff --git a/Bin/Debug/CommonControls/.NET4 示例/Itrycn_Project2.exe b/Bin/Debug/CommonControls/.NET4 示例/Itrycn_Project2.exe index 0f5d09e..3997375 100644 Binary files a/Bin/Debug/CommonControls/.NET4 示例/Itrycn_Project2.exe and b/Bin/Debug/CommonControls/.NET4 示例/Itrycn_Project2.exe differ diff --git a/Bin/Debug/CommonControls/.NET4 示例/MyDb.dll b/Bin/Debug/CommonControls/.NET4 示例/MyDb.dll index 9c2d6ba..92a9ed3 100644 Binary files a/Bin/Debug/CommonControls/.NET4 示例/MyDb.dll and b/Bin/Debug/CommonControls/.NET4 示例/MyDb.dll differ diff --git a/Bin/Debug/CommonControls/.NET4 示例/MyDb.xml b/Bin/Debug/CommonControls/.NET4 示例/MyDb.xml index 3184d47..bdcb1b2 100644 --- a/Bin/Debug/CommonControls/.NET4 示例/MyDb.xml +++ b/Bin/Debug/CommonControls/.NET4 示例/MyDb.xml @@ -7498,6 +7498,13 @@ + + + 添加byte[]字段 + + + + 添加bool字段 @@ -8150,6 +8157,14 @@ + + + 获取网址对应的文件大小 + + + + + diff --git a/Bin/Debug/CommonControls/.NET4 示例/MyDb_SQLite.dll b/Bin/Debug/CommonControls/.NET4 示例/MyDb_SQLite.dll index 2641998..c4b692a 100644 Binary files a/Bin/Debug/CommonControls/.NET4 示例/MyDb_SQLite.dll and b/Bin/Debug/CommonControls/.NET4 示例/MyDb_SQLite.dll differ diff --git a/Bin/Debug/CommonControls/.NET4 示例/RyPrint.dll b/Bin/Debug/CommonControls/.NET4 示例/RyPrint.dll index 54358d2..0118696 100644 Binary files a/Bin/Debug/CommonControls/.NET4 示例/RyPrint.dll and b/Bin/Debug/CommonControls/.NET4 示例/RyPrint.dll differ diff --git a/Bin/Debug/CommonControls/.NET4 示例/ryControls.dll b/Bin/Debug/CommonControls/.NET4 示例/ryControls.dll index 8ab8a66..52027c9 100644 Binary files a/Bin/Debug/CommonControls/.NET4 示例/ryControls.dll and b/Bin/Debug/CommonControls/.NET4 示例/ryControls.dll differ diff --git a/Bin/Debug/CommonControls/.NET4 示例/ryUpdate.dll b/Bin/Debug/CommonControls/.NET4 示例/ryUpdate.dll index a71d6d2..a541f15 100644 Binary files a/Bin/Debug/CommonControls/.NET4 示例/ryUpdate.dll and b/Bin/Debug/CommonControls/.NET4 示例/ryUpdate.dll differ diff --git a/Bin/Debug/CommonControls/.NET4/MyDb.dll b/Bin/Debug/CommonControls/.NET4/MyDb.dll index 9c2d6ba..92a9ed3 100644 Binary files a/Bin/Debug/CommonControls/.NET4/MyDb.dll and b/Bin/Debug/CommonControls/.NET4/MyDb.dll differ diff --git a/Bin/Debug/CommonControls/.NET4/MyDb.xml b/Bin/Debug/CommonControls/.NET4/MyDb.xml index 3184d47..bdcb1b2 100644 --- a/Bin/Debug/CommonControls/.NET4/MyDb.xml +++ b/Bin/Debug/CommonControls/.NET4/MyDb.xml @@ -7498,6 +7498,13 @@ + + + 添加byte[]字段 + + + + 添加bool字段 @@ -8150,6 +8157,14 @@ + + + 获取网址对应的文件大小 + + + + + diff --git a/Bin/Debug/CommonControls/.NET4/MyDb_MySQL.dll b/Bin/Debug/CommonControls/.NET4/MyDb_MySQL.dll index d83420d..26c9c3e 100644 Binary files a/Bin/Debug/CommonControls/.NET4/MyDb_MySQL.dll and b/Bin/Debug/CommonControls/.NET4/MyDb_MySQL.dll differ diff --git a/Bin/Debug/CommonControls/.NET4/MyDb_SQLite.dll b/Bin/Debug/CommonControls/.NET4/MyDb_SQLite.dll index 2641998..c4b692a 100644 Binary files a/Bin/Debug/CommonControls/.NET4/MyDb_SQLite.dll and b/Bin/Debug/CommonControls/.NET4/MyDb_SQLite.dll differ diff --git a/Bin/Debug/CommonControls/.NET4/RyPrint.dll b/Bin/Debug/CommonControls/.NET4/RyPrint.dll index 54358d2..0118696 100644 Binary files a/Bin/Debug/CommonControls/.NET4/RyPrint.dll and b/Bin/Debug/CommonControls/.NET4/RyPrint.dll differ diff --git a/Bin/Debug/CommonControls/.NET4/ryControls.dll b/Bin/Debug/CommonControls/.NET4/ryControls.dll index 8ab8a66..52027c9 100644 Binary files a/Bin/Debug/CommonControls/.NET4/ryControls.dll and b/Bin/Debug/CommonControls/.NET4/ryControls.dll differ diff --git a/Bin/Debug/CommonControls/.NET4/ryUpdate.dll b/Bin/Debug/CommonControls/.NET4/ryUpdate.dll index a71d6d2..a541f15 100644 Binary files a/Bin/Debug/CommonControls/.NET4/ryUpdate.dll and b/Bin/Debug/CommonControls/.NET4/ryUpdate.dll differ diff --git a/Bin/Release/CommonControls/.NET4 示例/Itrycn_Project.exe b/Bin/Release/CommonControls/.NET4 示例/Itrycn_Project.exe index e442118..12877b4 100644 Binary files a/Bin/Release/CommonControls/.NET4 示例/Itrycn_Project.exe and b/Bin/Release/CommonControls/.NET4 示例/Itrycn_Project.exe differ diff --git a/Bin/Release/CommonControls/.NET4 示例/MyDb.dll b/Bin/Release/CommonControls/.NET4 示例/MyDb.dll index 9518ee0..c16e20f 100644 Binary files a/Bin/Release/CommonControls/.NET4 示例/MyDb.dll and b/Bin/Release/CommonControls/.NET4 示例/MyDb.dll differ diff --git a/Bin/Release/CommonControls/.NET4 示例/MyDb.xml b/Bin/Release/CommonControls/.NET4 示例/MyDb.xml index f09805d..81b9d1b 100644 --- a/Bin/Release/CommonControls/.NET4 示例/MyDb.xml +++ b/Bin/Release/CommonControls/.NET4 示例/MyDb.xml @@ -7471,6 +7471,13 @@ + + + 添加byte[]字段 + + + + 添加bool字段 @@ -8123,6 +8130,14 @@ + + + 获取网址对应的文件大小 + + + + + diff --git a/Bin/Release/CommonControls/.NET4 示例/MyDb_SQLite.dll b/Bin/Release/CommonControls/.NET4 示例/MyDb_SQLite.dll index 1c2c2e7..d1c99de 100644 Binary files a/Bin/Release/CommonControls/.NET4 示例/MyDb_SQLite.dll and b/Bin/Release/CommonControls/.NET4 示例/MyDb_SQLite.dll differ diff --git a/Bin/Release/CommonControls/.NET4 示例/RyPrint.dll b/Bin/Release/CommonControls/.NET4 示例/RyPrint.dll index 37ee0a5..eedabcb 100644 Binary files a/Bin/Release/CommonControls/.NET4 示例/RyPrint.dll and b/Bin/Release/CommonControls/.NET4 示例/RyPrint.dll differ diff --git a/Bin/Release/CommonControls/.NET4 示例/ryControls.dll b/Bin/Release/CommonControls/.NET4 示例/ryControls.dll index 2568790..92ce42f 100644 Binary files a/Bin/Release/CommonControls/.NET4 示例/ryControls.dll and b/Bin/Release/CommonControls/.NET4 示例/ryControls.dll differ diff --git a/Bin/Release/CommonControls/.NET4 示例/ryUpdate.dll b/Bin/Release/CommonControls/.NET4 示例/ryUpdate.dll index a85009a..b6c27c3 100644 Binary files a/Bin/Release/CommonControls/.NET4 示例/ryUpdate.dll and b/Bin/Release/CommonControls/.NET4 示例/ryUpdate.dll differ diff --git a/Bin/Release/CommonControls/.NET4/MyDb.dll b/Bin/Release/CommonControls/.NET4/MyDb.dll index 9518ee0..c16e20f 100644 Binary files a/Bin/Release/CommonControls/.NET4/MyDb.dll and b/Bin/Release/CommonControls/.NET4/MyDb.dll differ diff --git a/Bin/Release/CommonControls/.NET4/MyDb.xml b/Bin/Release/CommonControls/.NET4/MyDb.xml index f09805d..81b9d1b 100644 --- a/Bin/Release/CommonControls/.NET4/MyDb.xml +++ b/Bin/Release/CommonControls/.NET4/MyDb.xml @@ -7471,6 +7471,13 @@ + + + 添加byte[]字段 + + + + 添加bool字段 @@ -8123,6 +8130,14 @@ + + + 获取网址对应的文件大小 + + + + + diff --git a/Bin/Release/CommonControls/.NET4/MyDb_MySQL.dll b/Bin/Release/CommonControls/.NET4/MyDb_MySQL.dll index 54ebbbd..652dc51 100644 Binary files a/Bin/Release/CommonControls/.NET4/MyDb_MySQL.dll and b/Bin/Release/CommonControls/.NET4/MyDb_MySQL.dll differ diff --git a/Bin/Release/CommonControls/.NET4/MyDb_SQLite.dll b/Bin/Release/CommonControls/.NET4/MyDb_SQLite.dll index 1c2c2e7..d1c99de 100644 Binary files a/Bin/Release/CommonControls/.NET4/MyDb_SQLite.dll and b/Bin/Release/CommonControls/.NET4/MyDb_SQLite.dll differ diff --git a/Bin/Release/CommonControls/.NET4/RyPrint.dll b/Bin/Release/CommonControls/.NET4/RyPrint.dll index 37ee0a5..eedabcb 100644 Binary files a/Bin/Release/CommonControls/.NET4/RyPrint.dll and b/Bin/Release/CommonControls/.NET4/RyPrint.dll differ diff --git a/Bin/Release/CommonControls/.NET4/ryControls.dll b/Bin/Release/CommonControls/.NET4/ryControls.dll index 2568790..92ce42f 100644 Binary files a/Bin/Release/CommonControls/.NET4/ryControls.dll and b/Bin/Release/CommonControls/.NET4/ryControls.dll differ diff --git a/Bin/Release/CommonControls/.NET4/ryUpdate.dll b/Bin/Release/CommonControls/.NET4/ryUpdate.dll index a85009a..b6c27c3 100644 Binary files a/Bin/Release/CommonControls/.NET4/ryUpdate.dll and b/Bin/Release/CommonControls/.NET4/ryUpdate.dll differ diff --git a/CHANGELOG.md b/CHANGELOG.md index 7e76f7d..c418231 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,17 @@ -### 2021-09-12更新 +### 2021-09-15更新 +------ +#### MyDb V3.0.2109.1501 +- *.[新增]QuickWeb类的GetSize函数新增支持返回异常信息。 +- *.[新增]MSSQL数据库操作新增对byte[]字段的支持。 + +#### MyDb_SQLite V3.0.2109.1501 +- *.[新增]新增对byte[]字段的支持。 + +#### MyDb_MySQL V3.0.2109.1501 + + - *.[新增]新增对byte[]字段的支持。 + +### 2021-09-12更新 ------ #### ryControls V3.0.2109.1201 - *.[改进]ObjectListView控件的AspectToStringConverter函数新增行数据参数。 diff --git a/Source/.vs/公用控件组V4/v17/.suo b/Source/.vs/公用控件组V4/v17/.suo index a769c7a..baafd63 100644 Binary files a/Source/.vs/公用控件组V4/v17/.suo and b/Source/.vs/公用控件组V4/v17/.suo differ diff --git a/Source/.vs/公用控件组V4/v17/fileList.bin b/Source/.vs/公用控件组V4/v17/fileList.bin index 0cfbf58..2459009 100644 Binary files a/Source/.vs/公用控件组V4/v17/fileList.bin and b/Source/.vs/公用控件组V4/v17/fileList.bin differ diff --git a/Source/Itrycn_Project2/SkinForms/SKinForm.cs b/Source/Itrycn_Project2/SkinForms/SKinForm.cs index db2ff21..deb86c5 100644 --- a/Source/Itrycn_Project2/SkinForms/SKinForm.cs +++ b/Source/Itrycn_Project2/SkinForms/SKinForm.cs @@ -5,49 +5,207 @@ using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; +using System.Runtime.InteropServices; using System.Text; using System.Windows.Forms; namespace RySkins { + [ComVisible(true)] public partial class SKinForm : GMForm { - public SKinForm() + /// + /// 无参数启动 + /// + public SKinForm() : base() { InitializeComponent(); } - public SKinForm(string[] args) + private IntPtr ActiveHandle = IntPtr.Zero; + protected override void OnCreateControl() + { + //ActiveHandle= ryCommon.RyForm.GetActiveWindow(); + base.OnCreateControl(); + InitForm(); + } + protected override void OnHandleCreated(EventArgs e) + { + ActiveHandle = ryCommon.RyForm.GetActiveWindow(); + base.OnHandleCreated(e); + } + /// + /// 以参数方式启动 + /// + /// + public SKinForm(string[] args) : base() { InitializeComponent(); } /// + /// 以单参数方式启动 + /// + /// + public SKinForm(string arg) : base() + { + InitializeComponent(); + } + private void InitForm() + { + if (this.Parent == null) + { + if (this.StartPosition == FormStartPosition.CenterParent) + { + var handle = ActiveHandle; + var parent_handle = WinAPI.User32.GetParent(Handle); + //var dd= this.ParentForm; + if (parent_handle == IntPtr.Zero) { parent_handle = handle; } + var forms = Application.OpenForms; + for (int i = 0; i < forms.Count; i++) + { + if (forms[i].Handle == handle) + { + ShowInCenter(forms[i]); + break; + } + } + } + else if (this.StartPosition == FormStartPosition.CenterScreen) + { + ShowInCenter(null); + } + } + } + /// /// 显示在父窗体中间,如果没有父窗体,则显示在显示器中间 /// /// public void ShowInCenter(Form parent) { - this.StartPosition = FormStartPosition.Manual; - var screen = Screen.FromControl(this); - if (parent==null) //如果没有父窗体,则显示在显示器中间 + ShowInCenter(this, parent); + } + /// + /// 显示在父窗体中间,如果没有父窗体,则显示在显示器中间 + /// + /// + /// + public static void ShowInCenter(Form CurForm, Form parent) + { + CurForm.StartPosition = FormStartPosition.Manual; + var screen = Screen.FromControl(CurForm); + if (parent == null) //如果没有父窗体,则显示在显示器中间 { - Location = new Point((screen.WorkingArea.Width-Width)/2,(screen.WorkingArea.Height-Height)/2); + CurForm.Location = new Point((screen.WorkingArea.Width - CurForm.Width) / 2, (screen.WorkingArea.Height - CurForm.Height) / 2); return; } - var x = parent.Left+(parent.Width - Width) / 2; - var y =parent.Top+ (parent.Height - Height) / 2; - if((x+Width)> screen.WorkingArea.X+ screen.WorkingArea.Width) + var x = parent.Left + (parent.Width - CurForm.Width) / 2; + var y = parent.Top + (parent.Height - CurForm.Height) / 2; + if ((x + CurForm.Width) > screen.WorkingArea.X + screen.WorkingArea.Width) { - x = screen.WorkingArea.X + screen.WorkingArea.Width - Width; + x = screen.WorkingArea.X + screen.WorkingArea.Width - CurForm.Width; } - if ((y + Height) > screen.WorkingArea.Y + screen.WorkingArea.Height) + if ((y + CurForm.Height) > screen.WorkingArea.Y + screen.WorkingArea.Height) { - y = screen.WorkingArea.Y + screen.WorkingArea.Height - Height; + y = screen.WorkingArea.Y + screen.WorkingArea.Height - CurForm.Height; } - Location = new Point(x, y); + CurForm.Location = new Point(x, y); + } + /// + /// 激活窗体 + /// + public void ActiveSkinForm() + { + ryCommon.RyForm.BringToTop(Handle); + ryCommon.RyForm.SetActiveWindow(Handle); + } + /// + /// 显示窗体 + /// + /// 指定要显示的窗体类型名 + public static void ShowForm(Type type) + { + RySkins.SKinForm form = (RySkins.SKinForm)Activator.CreateInstance(type); + form.Show(); + } + /// + /// 显示窗体 + /// + /// 指定要显示的窗体类型名 + /// 参数 + public static void ShowForm(Type type, string arg) + { + RySkins.SKinForm form = (RySkins.SKinForm)Activator.CreateInstance(type, new object[] { arg }); + form.Show(); + } + /// + /// 显示窗体 + /// + /// 指定要显示的窗体类型名 + /// 参数 + public static void ShowForm(Type type, string[] arg) + { + RySkins.SKinForm form = (RySkins.SKinForm)Activator.CreateInstance(type, arg); + form.Show(); + } + /// + /// 显示模式窗体 + /// + /// 指定要显示的窗体类型名 + /// 参数 + public static void ShowDialogForm(Type type, string[] arg) + { + RySkins.SKinForm form = (RySkins.SKinForm)Activator.CreateInstance(type, arg); + form.ShowDialog(); + form.Dispose(); + } + /// + /// 显示窗体,如果当前已经显示过,则激活窗体。 + /// + /// 指定要显示的窗体类型名 + public static void ShowFormOne(Form parent, Type type) + { + ShowFormOne(parent, type, null); + } + /// + /// 显示窗体,如果当前已经显示过,则激活窗体。 + /// + /// 指定要显示的窗体类型名 + /// 参数 + public static void ShowFormOne(Form parent, Type type, string[] arg) + { + var forms = Application.OpenForms; + for (int i = 0; i < forms.Count; i++) + { + if (forms[i].GetType() == type) + { + if (forms[i] is RySkins.SKinForm) + { + var skin_form = (RySkins.SKinForm)forms[i]; + skin_form.ShowInCenter(parent); + skin_form.ActiveSkinForm(); + skin_form.Show(); + return; + } + else + { + forms[i].Show(); + } + } + } + Form form; + if (arg == null) + { form = (Form)Activator.CreateInstance(type); } + else + { + form = (Form)Activator.CreateInstance(type, arg); + } + ShowInCenter(form, parent); + ryCommon.RyForm.BringToTop(form.Handle); + ryCommon.RyForm.SetActiveWindow(form.Handle); + form.Show(); } private void SKinForm_Load(object sender, EventArgs e) { - if (!this.DesignMode) + if (!this.DesignMode) { base.XTheme = new ThemeForm(); } //Opacity = 0.97; } diff --git a/Source/MyDb/MyDb/DataProvider.cs b/Source/MyDb/MyDb/DataProvider.cs index c5d4b12..995383a 100644 --- a/Source/MyDb/MyDb/DataProvider.cs +++ b/Source/MyDb/MyDb/DataProvider.cs @@ -138,6 +138,10 @@ namespace ryCommonDb { mySQL.AddField(col.ColumnName, ds.Tables[0].Rows[i][col].ToBool()); } + else if (col.DataType == typeof(byte[])) + { + mySQL.AddField(col.ColumnName, (byte[])ds.Tables[0].Rows[i][col]); + } #endregion } list.Add(mySQL); diff --git a/Source/MyDb/MyDb/MSSQL/SqlDataProvider.cs b/Source/MyDb/MyDb/MSSQL/SqlDataProvider.cs index 30ba58b..25bbd4f 100644 --- a/Source/MyDb/MyDb/MSSQL/SqlDataProvider.cs +++ b/Source/MyDb/MyDb/MSSQL/SqlDataProvider.cs @@ -320,6 +320,10 @@ namespace ryCommonDb { tmpSQL += "[" + item.Field + "] [DATETIME],"; } + else if (item.value is byte[]) + { + tmpSQL += "[" + item.Field + "] [varbinary](max),"; + } } object[] param = null; return ExecuteNonQuery(tmpSQL.Substring(0, tmpSQL.Length - 1) + ")", param); diff --git a/Source/MyDb/MyDb/ryQuickSQL.cs b/Source/MyDb/MyDb/ryQuickSQL.cs index ccec212..51a16b9 100644 --- a/Source/MyDb/MyDb/ryQuickSQL.cs +++ b/Source/MyDb/MyDb/ryQuickSQL.cs @@ -152,6 +152,15 @@ namespace ryCommonDb /// /// public void AddField(string field, decimal value) + { + ListAdd(new SQLIitem(field, value)); + } + /// + /// 添加byte[]字段 + /// + /// + /// + public void AddField(string field, byte[] value) { ListAdd(new SQLIitem(field, value)); } diff --git a/Source/MyDb/Properties/AssemblyInfo.cs b/Source/MyDb/Properties/AssemblyInfo.cs index 1800c33..9272abe 100644 --- a/Source/MyDb/Properties/AssemblyInfo.cs +++ b/Source/MyDb/Properties/AssemblyInfo.cs @@ -32,5 +32,5 @@ using System; //可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值, // 方法是按如下所示使用“*”: : // [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("3.0.2109.0801")] -[assembly: AssemblyFileVersion("3.0.2109.0801")] \ No newline at end of file +[assembly: AssemblyVersion("3.0.2109.1501")] +[assembly: AssemblyFileVersion("3.0.2109.1501")] \ No newline at end of file diff --git a/Source/MyDb/RyWeb/QuickWeb.cs b/Source/MyDb/RyWeb/QuickWeb.cs index 93033d0..0dc8d92 100644 --- a/Source/MyDb/RyWeb/QuickWeb.cs +++ b/Source/MyDb/RyWeb/QuickWeb.cs @@ -1,7 +1,9 @@ using DotNet4.Utilities; +using ryCommon; using System; using System.Collections.Generic; using System.Linq; +using System.Net; using System.Text; namespace RyWeb @@ -65,7 +67,8 @@ namespace RyWeb Timeout = Timeout, ReadWriteTimeout = Timeout, UserAgent = UserAgent, - Referer=Referer + Referer=Referer, + KeepAlive = false }; if (cookie.Length > 0) { @@ -97,6 +100,17 @@ namespace RyWeb /// public long GetSize(string url) { + return GetSize(url, out _); + } + /// + /// 获取网址对应的文件大小 + /// + /// + /// + /// + public long GetSize(string url,out string errormsg) + { + errormsg = ""; try { HttpHelper t = new HttpHelper(); @@ -109,12 +123,27 @@ namespace RyWeb Timeout = Timeout, ReadWriteTimeout = Timeout, UserAgent = UserAgent, - Referer = Referer - }; + Referer = Referer, + KeepAlive=false + }; HttpResult r = t.GetHtml(m); if (r.StatusCode == System.Net.HttpStatusCode.OK) { - return Convert.ToInt64(r.Header["Content-Length"]); + return GetContentLen(); + } + else if (r.StatusCode == System.Net.HttpStatusCode.NotFound) + { + errormsg = "404错误"; + return -404; + } + else if (r.StatusCode == System.Net.HttpStatusCode.Found) + { + return GetContentLen(); + } + else if (r.StatusCode == 0) + { + errormsg = r.Html; + return 0; } else if (r.StatusCode == System.Net.HttpStatusCode.MethodNotAllowed) { @@ -126,9 +155,29 @@ namespace RyWeb } else return 0; + long GetContentLen() + { + var size = r.Header["Content-Length"].ToInt64(0); + if (size == 0) + { + System.Net.ServicePointManager.DefaultConnectionLimit = 512; + HttpWebRequest request = (HttpWebRequest)HttpWebRequest.Create(url); + request.AllowAutoRedirect = true; + request.Timeout = 3000; + request.ReadWriteTimeout = 3000; + HttpWebResponse response = (HttpWebResponse)request.GetResponse(); + long totalBytes = response.ContentLength; + return totalBytes; + } + else + { + return size; + } + } } - catch + catch(Exception ex) { + errormsg = ex.Message; return 0; } } @@ -153,7 +202,8 @@ namespace RyWeb HttpItem m = new HttpItem() { URL = url, - ContentType= "application/x-www-form-urlencoded" + ContentType= "application/x-www-form-urlencoded", + KeepAlive = false }; if (cookie.Length>0) { @@ -190,7 +240,8 @@ namespace RyWeb HttpHelper t = new HttpHelper(); HttpItem m = new HttpItem() { - URL = url + URL = url, + KeepAlive = false }; if (cookie != "") { diff --git a/Source/MyDb_MySQL/Properties/AssemblyInfo.cs b/Source/MyDb_MySQL/Properties/AssemblyInfo.cs index 63ad0c4..d813a51 100644 --- a/Source/MyDb_MySQL/Properties/AssemblyInfo.cs +++ b/Source/MyDb_MySQL/Properties/AssemblyInfo.cs @@ -1,36 +1,36 @@ -using System.Reflection; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; - -// 有关程序集的一般信息由以下 -// 控制。更改这些特性值可修改 -// 与程序集关联的信息。 -[assembly: AssemblyTitle("MyDb_MySQL")] -[assembly: AssemblyDescription("")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("")] -[assembly: AssemblyProduct("MyDb_MySQL")] -[assembly: AssemblyCopyright("Copyright © 2021")] -[assembly: AssemblyTrademark("")] -[assembly: AssemblyCulture("")] - -//将 ComVisible 设置为 false 将使此程序集中的类型 -//对 COM 组件不可见。 如果需要从 COM 访问此程序集中的类型, -//请将此类型的 ComVisible 特性设置为 true。 -[assembly: ComVisible(false)] - -// 如果此项目向 COM 公开,则下列 GUID 用于类型库的 ID -[assembly: Guid("631290d3-7cb8-4b62-833e-361c20a5f2e0")] - -// 程序集的版本信息由下列四个值组成: -// -// 主版本 -// 次版本 -// 生成号 -// 修订号 -// -//可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值, -// 方法是按如下所示使用“*”: : -// [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("3.0.2105.2201")] -[assembly: AssemblyFileVersion("3.0.2105.2201")] +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// 有关程序集的一般信息由以下 +// 控制。更改这些特性值可修改 +// 与程序集关联的信息。 +[assembly: AssemblyTitle("MyDb_MySQL")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("MyDb_MySQL")] +[assembly: AssemblyCopyright("Copyright © 2021")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +//将 ComVisible 设置为 false 将使此程序集中的类型 +//对 COM 组件不可见。 如果需要从 COM 访问此程序集中的类型, +//请将此类型的 ComVisible 特性设置为 true。 +[assembly: ComVisible(false)] + +// 如果此项目向 COM 公开,则下列 GUID 用于类型库的 ID +[assembly: Guid("631290d3-7cb8-4b62-833e-361c20a5f2e0")] + +// 程序集的版本信息由下列四个值组成: +// +// 主版本 +// 次版本 +// 生成号 +// 修订号 +// +//可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值, +// 方法是按如下所示使用“*”: : +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("3.0.2109.1501")] +[assembly: AssemblyFileVersion("3.0.2109.1501")] \ No newline at end of file diff --git a/Source/MyDb_MySQL/mySqlDataProvider.cs b/Source/MyDb_MySQL/mySqlDataProvider.cs index 55d6a49..7be481b 100644 --- a/Source/MyDb_MySQL/mySqlDataProvider.cs +++ b/Source/MyDb_MySQL/mySqlDataProvider.cs @@ -317,6 +317,10 @@ namespace ryCommonDb { tmpSQL += "[" + item.Field + "] [DATETIME],"; } + else if (item.value is byte[]) + { + tmpSQL += "[" + item.Field + "] [LONGBLOB],"; + } } object[] param = null; return ExecuteNonQuery(tmpSQL.Substring(0, tmpSQL.Length - 1) + ")", param); diff --git a/Source/MyDb_SQLite/Properties/AssemblyInfo.cs b/Source/MyDb_SQLite/Properties/AssemblyInfo.cs index 27457c5..e2bc378 100644 --- a/Source/MyDb_SQLite/Properties/AssemblyInfo.cs +++ b/Source/MyDb_SQLite/Properties/AssemblyInfo.cs @@ -32,5 +32,5 @@ using System.Runtime.InteropServices; //可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值, // 方法是按如下所示使用“*”: : // [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("3.0.2105.2201")] -[assembly: AssemblyFileVersion("3.0.2105.2201")] \ No newline at end of file +[assembly: AssemblyVersion("3.0.2109.1501")] +[assembly: AssemblyFileVersion("3.0.2109.1501")] \ No newline at end of file diff --git a/Source/MyDb_SQLite/SQLiteDataProvider.cs b/Source/MyDb_SQLite/SQLiteDataProvider.cs index 202c0d3..6304d05 100644 --- a/Source/MyDb_SQLite/SQLiteDataProvider.cs +++ b/Source/MyDb_SQLite/SQLiteDataProvider.cs @@ -353,6 +353,10 @@ namespace ryCommonDb { Field = "[" + item.Field.TrimStart('[').TrimEnd(']') + "] DATETIME"; } + else if (item.value is byte[]) + { + Field = "[" + item.Field.TrimStart('[').TrimEnd(']') + "] BLOB"; + } try { object[] param = null; @@ -386,6 +390,10 @@ namespace ryCommonDb { tmpSQL += "[" + item.Field.TrimStart('[').TrimEnd(']') + "] DATETIME,"; } + else if (item.value is byte[]) + { + tmpSQL += "[" + item.Field.TrimStart('[').TrimEnd(']') + "] BLOB,"; + } } object[] param = null; return ExecuteNonQuery(tmpSQL.Substring(0, tmpSQL.Length - 1) + ")", param); diff --git a/Source/ryControls/ObjectListView/ObjectListView.cs b/Source/ryControls/ObjectListView/ObjectListView.cs index 595fd2d..c5d4bd5 100644 --- a/Source/ryControls/ObjectListView/ObjectListView.cs +++ b/Source/ryControls/ObjectListView/ObjectListView.cs @@ -652,7 +652,7 @@ namespace BrightIdeasSoftware this.Layout += new LayoutEventHandler(this.HandleLayout); this.ColumnWidthChanging += new ColumnWidthChangingEventHandler(this.HandleColumnWidthChanging); this.ColumnWidthChanged += new ColumnWidthChangedEventHandler(this.HandleColumnWidthChanged); - + base.ShowGroups = false; base.View = View.Details; base.FullRowSelect = true; // Turn on owner draw so that we are responsible for our own fates (and isolated from bugs in the underlying ListView) diff --git a/Source/ryControls/Properties/AssemblyInfo.cs b/Source/ryControls/Properties/AssemblyInfo.cs index 9bd8dda..c11eeec 100644 --- a/Source/ryControls/Properties/AssemblyInfo.cs +++ b/Source/ryControls/Properties/AssemblyInfo.cs @@ -32,5 +32,5 @@ using System.Runtime.InteropServices; //可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值, // 方法是按如下所示使用“*”: : // [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("3.0.2109.1201")] -[assembly: AssemblyFileVersion("3.0.2109.1201")] \ No newline at end of file +[assembly: AssemblyVersion("3.0.2109.1301")] +[assembly: AssemblyFileVersion("3.0.2109.1301")] \ No newline at end of file