diff --git a/Bin/Debug/VSoft/Newtonsoft.Json.dll b/Bin/Debug/VSoft/Newtonsoft.Json.dll
index c2b16bb..7af125a 100644
Binary files a/Bin/Debug/VSoft/Newtonsoft.Json.dll and b/Bin/Debug/VSoft/Newtonsoft.Json.dll differ
diff --git a/Bin/Debug/VSoft/RaUI.dll b/Bin/Debug/VSoft/RaUI.dll
new file mode 100644
index 0000000..ecf762b
Binary files /dev/null and b/Bin/Debug/VSoft/RaUI.dll differ
diff --git a/Bin/Debug/VSoft/UserDb/Softs.dat b/Bin/Debug/VSoft/UserDb/Softs.dat
index 19bd629..9276193 100644
Binary files a/Bin/Debug/VSoft/UserDb/Softs.dat and b/Bin/Debug/VSoft/UserDb/Softs.dat differ
diff --git a/Bin/Debug/VSoft/UserDb/Win.dat b/Bin/Debug/VSoft/UserDb/Win.dat
index 796e7c7..d1154a9 100644
--- a/Bin/Debug/VSoft/UserDb/Win.dat
+++ b/Bin/Debug/VSoft/UserDb/Win.dat
@@ -1,5 +1,5 @@
[VSoft]
-hwnd=132806
+hwnd=331696
width=745
height=543
[VSoft_Test]
diff --git a/Bin/Debug/VSoft/VSoft.dll b/Bin/Debug/VSoft/VSoft.dll
index 68f202c..3638a01 100644
Binary files a/Bin/Debug/VSoft/VSoft.dll and b/Bin/Debug/VSoft/VSoft.dll differ
diff --git a/Bin/Debug/VSoft/VSoftBox.exe b/Bin/Debug/VSoft/VSoftBox.exe
index 7170f29..765dbe9 100644
Binary files a/Bin/Debug/VSoft/VSoftBox.exe and b/Bin/Debug/VSoft/VSoftBox.exe differ
diff --git a/Bin/Debug/VSoft/VSoftBox.exe.config b/Bin/Debug/VSoft/VSoftBox.exe.config
new file mode 100644
index 0000000..ff99501
--- /dev/null
+++ b/Bin/Debug/VSoft/VSoftBox.exe.config
@@ -0,0 +1,3 @@
+
+
+
diff --git a/Source/DyLine/Program.cs b/Source/DyLine/Program.cs
index 7db2f21..6b9db62 100644
--- a/Source/DyLine/Program.cs
+++ b/Source/DyLine/Program.cs
@@ -26,6 +26,7 @@ namespace DyLine
clsMsg ryMsg = new clsMsg();
ryMsg.SendMsgToryProcess(0, item);//向流程软件发送连接信息
}
+
}
}
}
diff --git a/Source/VSoftBox/Program.cs b/Source/VSoftBox/Program.cs
index bd4cb0e..afac53f 100644
--- a/Source/VSoftBox/Program.cs
+++ b/Source/VSoftBox/Program.cs
@@ -30,7 +30,7 @@ namespace VSoftBox
{
ProcessPath = Application.StartupPath.Substring(0, Application.StartupPath.Length - sub_dir.Length);
AppDomain.CurrentDomain.AssemblyResolve += CurrentDomain_AssemblyResolve;
- Soft_Info.UserDataFolder = ProcessPath+"\\UserDb\\VSoft";
+ Soft_Info.UserDataFolder = ProcessPath+"\\UserDb\\Tools\\VSoft";
}
#endif
Application.EnableVisualStyles();
diff --git a/Source/VSoftBox/Properties/AssemblyInfo.cs b/Source/VSoftBox/Properties/AssemblyInfo.cs
index a091233..04bcc7f 100644
--- a/Source/VSoftBox/Properties/AssemblyInfo.cs
+++ b/Source/VSoftBox/Properties/AssemblyInfo.cs
@@ -32,5 +32,5 @@ using System.Runtime.InteropServices;
//可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值
//通过使用 "*",如下所示:
// [assembly: AssemblyVersion("1.0.*")]
-[assembly: AssemblyVersion("1.0.2205.2701")]
-[assembly: AssemblyFileVersion("1.0.2205.2701")]
\ No newline at end of file
+[assembly: AssemblyVersion("1.0.2302.1501")]
+[assembly: AssemblyFileVersion("1.0.2302.1501")]
\ No newline at end of file
diff --git a/Source/VSoftBox/Properties/Resources.Designer.cs b/Source/VSoftBox/Properties/Resources.Designer.cs
index 6f6dc95..d4c87b3 100644
--- a/Source/VSoftBox/Properties/Resources.Designer.cs
+++ b/Source/VSoftBox/Properties/Resources.Designer.cs
@@ -1,69 +1,61 @@
//------------------------------------------------------------------------------
//
// 此代码由工具生成。
-// 运行时版本: 4.0.30319.42000
+// 运行时版本:4.0.30319.42000
//
-// 对此文件的更改可能导致不正确的行为,如果
-// 重新生成代码,则所做更改将丢失。
+// 对此文件的更改可能会导致不正确的行为,并且如果
+// 重新生成代码,这些更改将会丢失。
//
//------------------------------------------------------------------------------
-namespace VSoftBox.Properties
-{
-
-
+namespace VSoftBox.Properties {
+ using System;
+
+
///
- /// 强类型资源类,用于查找本地化字符串等。
+ /// 一个强类型的资源类,用于查找本地化的字符串等。
///
// 此类是由 StronglyTypedResourceBuilder
// 类通过类似于 ResGen 或 Visual Studio 的工具自动生成的。
- // 若要添加或删除成员,请编辑 .ResX 文件,然后重新运行 ResGen
+ // 若要添加或移除成员,请编辑 .ResX 文件,然后重新运行 ResGen
// (以 /str 作为命令选项),或重新生成 VS 项目。
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "17.0.0.0")]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
- internal class Resources
- {
-
+ internal class Resources {
+
private static global::System.Resources.ResourceManager resourceMan;
-
+
private static global::System.Globalization.CultureInfo resourceCulture;
-
+
[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
- internal Resources()
- {
+ internal Resources() {
}
-
+
///
- /// 返回此类使用的缓存 ResourceManager 实例。
+ /// 返回此类使用的缓存的 ResourceManager 实例。
///
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
- internal static global::System.Resources.ResourceManager ResourceManager
- {
- get
- {
- if ((resourceMan == null))
- {
+ internal static global::System.Resources.ResourceManager ResourceManager {
+ get {
+ if (object.ReferenceEquals(resourceMan, null)) {
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("VSoftBox.Properties.Resources", typeof(Resources).Assembly);
resourceMan = temp;
}
return resourceMan;
}
}
-
+
///
- /// 覆盖当前线程的 CurrentUICulture 属性
- /// 使用此强类型的资源类的资源查找。
+ /// 重写当前线程的 CurrentUICulture 属性,对
+ /// 使用此强类型资源类的所有资源查找执行重写。
///
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
- internal static global::System.Globalization.CultureInfo Culture
- {
- get
- {
+ internal static global::System.Globalization.CultureInfo Culture {
+ get {
return resourceCulture;
}
- set
- {
+ set {
resourceCulture = value;
}
}
diff --git a/Source/VSoftBox/Properties/Settings.Designer.cs b/Source/VSoftBox/Properties/Settings.Designer.cs
index 6317e34..bf06952 100644
--- a/Source/VSoftBox/Properties/Settings.Designer.cs
+++ b/Source/VSoftBox/Properties/Settings.Designer.cs
@@ -1,28 +1,24 @@
//------------------------------------------------------------------------------
//
-// This code was generated by a tool.
-// Runtime Version:4.0.30319.42000
+// 此代码由工具生成。
+// 运行时版本:4.0.30319.42000
//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated.
+// 对此文件的更改可能会导致不正确的行为,并且如果
+// 重新生成代码,这些更改将会丢失。
//
//------------------------------------------------------------------------------
-namespace VSoftBox.Properties
-{
-
-
+namespace VSoftBox.Properties {
+
+
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0")]
- internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase
- {
-
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "17.5.0.0")]
+ internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {
+
private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
-
- public static Settings Default
- {
- get
- {
+
+ public static Settings Default {
+ get {
return defaultInstance;
}
}
diff --git a/Source/VSoftBox/VSoftBox.csproj b/Source/VSoftBox/VSoftBox.csproj
index 5710fe0..e9e76f5 100644
--- a/Source/VSoftBox/VSoftBox.csproj
+++ b/Source/VSoftBox/VSoftBox.csproj
@@ -8,9 +8,10 @@
WinExe
VSoftBox
VSoftBox
- v4.0
+ v4.5.2
512
true
+
AnyCPU
@@ -18,9 +19,10 @@
full
false
..\..\Bin\Debug\VSoft\
- TRACE;DEBUG;DY;TEST
+ TRACE;DEBUG;DY
prompt
4
+ false
AnyCPU
@@ -30,18 +32,15 @@
TRACE
prompt
4
+ false
项目5.ico
-
+
False
- ..\..\Bin\Debug\VSoft\MyDb.dll
-
-
- False
- ..\..\Bin\Debug\VSoft\ryControls.dll
+ ..\..\Bin\Debug\VSoft\RaUI.dll
@@ -66,7 +65,9 @@
True
Resources.resx
+ True
+
SettingsSingleFileGenerator
Settings.Designer.cs
diff --git a/Source/VSoftBox/app.config b/Source/VSoftBox/app.config
new file mode 100644
index 0000000..ff99501
--- /dev/null
+++ b/Source/VSoftBox/app.config
@@ -0,0 +1,3 @@
+
+
+
diff --git a/Source/VSoft_Dll/FrmVSoft.Designer.cs b/Source/VSoft_Dll/FrmVSoft.Designer.cs
index 1d94a3c..22ffe59 100644
--- a/Source/VSoft_Dll/FrmVSoft.Designer.cs
+++ b/Source/VSoft_Dll/FrmVSoft.Designer.cs
@@ -52,7 +52,6 @@
this.新增分类ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.Menu修改分类 = new System.Windows.Forms.ToolStripMenuItem();
this.Menu删除分类 = new System.Windows.Forms.ToolStripMenuItem();
- this.LblDrag = new System.Windows.Forms.Label();
this.timer1 = new System.Windows.Forms.Timer(this.components);
this.notifyIcon1 = new System.Windows.Forms.NotifyIcon(this.components);
this.MenuTray = new System.Windows.Forms.ContextMenuStrip(this.components);
@@ -222,15 +221,6 @@
this.Menu删除分类.Text = "删除分类";
this.Menu删除分类.Click += new System.EventHandler(this.Menu删除分类_Click);
//
- // LblDrag
- //
- this.LblDrag.BackColor = System.Drawing.Color.Black;
- this.LblDrag.Location = new System.Drawing.Point(123, 54);
- this.LblDrag.Name = "LblDrag";
- this.LblDrag.Size = new System.Drawing.Size(2, 89);
- this.LblDrag.TabIndex = 6;
- this.LblDrag.Visible = false;
- //
// notifyIcon1
//
this.notifyIcon1.ContextMenuStrip = this.MenuTray;
@@ -368,8 +358,8 @@
this.rySearch1.Name = "rySearch1";
this.rySearch1.Size = new System.Drawing.Size(142, 27);
this.rySearch1.TabIndex = 2;
- this.rySearch1.OnSearch += new System.EventHandler(this.rySearch1_OnSearch);
- this.rySearch1.KeyDown += new System.Windows.Forms.KeyEventHandler(this.rySearch1_KeyDown);
+ this.rySearch1.OnSearch += new System.EventHandler(this.RySearch1_OnSearch);
+ this.rySearch1.KeyDown += new System.Windows.Forms.KeyEventHandler(this.RySearch1_KeyDown);
//
// panelEx1
//
@@ -378,7 +368,6 @@
| System.Windows.Forms.AnchorStyles.Right)));
this.panelEx1.BackColor = System.Drawing.Color.White;
this.panelEx1.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(213)))), ((int)(((byte)(216)))), ((int)(((byte)(223)))));
- this.panelEx1.Controls.Add(this.LblDrag);
this.panelEx1.Controls.Add(this.LblEmpty);
this.panelEx1.Controls.Add(this.IconViewEx1);
this.panelEx1.Location = new System.Drawing.Point(84, 65);
@@ -388,7 +377,7 @@
this.panelEx1.Size = new System.Drawing.Size(656, 473);
this.panelEx1.TabIndex = 1;
this.panelEx1.TileBackColor = System.Drawing.Color.White;
- this.panelEx1.Resize += new System.EventHandler(this.panelEx1_Resize);
+ this.panelEx1.Resize += new System.EventHandler(this.PanelEx1_Resize);
//
// LblEmpty
//
@@ -663,7 +652,6 @@
private System.Windows.Forms.ToolStripMenuItem Menu修改分类;
private System.Windows.Forms.ToolStripMenuItem Menu删除分类;
private System.Windows.Forms.ColumnHeader columnHeader1;
- private System.Windows.Forms.Label LblDrag;
private System.Windows.Forms.Timer timer1;
private System.Windows.Forms.ColumnHeader columnHeader2;
private System.Windows.Forms.NotifyIcon notifyIcon1;
diff --git a/Source/VSoft_Dll/FrmVSoft.cs b/Source/VSoft_Dll/FrmVSoft.cs
index 5def6fa..57d055c 100644
--- a/Source/VSoft_Dll/FrmVSoft.cs
+++ b/Source/VSoft_Dll/FrmVSoft.cs
@@ -15,14 +15,16 @@ using System.Windows.Forms;
using VSoft.Config;
using VSoft.Prams;
using VSoft.Skins;
+using static System.Windows.Forms.VisualStyles.VisualStyleElement;
+using static System.Windows.Forms.VisualStyles.VisualStyleElement.Header;
namespace VSoft
{
public partial class FrmVSoft : SKinForm
{
- string[] prog_args;
- string SQLConnStr = Itrycn_Db.SQLConnStr;
- MouseHook mouse = new MouseHook();
+ readonly string[] prog_args;
+ readonly string SQLConnStr = Itrycn_Db.SQLConnStr;
+ readonly MouseHook mouse = new MouseHook();
public FrmVSoft(string[] args)
{
InitializeComponent();
@@ -49,7 +51,7 @@ namespace VSoft
PnlLeft.BackColor = backcolor;
}
- private ToolTip lvTp = new ToolTip();
+ private readonly System.Windows.Forms.ToolTip lvTp = new System.Windows.Forms.ToolTip();
private void FrmVSoft_FormClosed(object sender, FormClosedEventArgs e)
{
mouse.Stop();
@@ -95,7 +97,8 @@ namespace VSoft
{
LoadDb(false);
}
- Dictionary dictCacheImg = new Dictionary();
+
+ readonly Dictionary dictCacheImg = new Dictionary();
private void LoadDb(bool isSearch)
{
IconViewEx1.Items.Clear();
@@ -292,6 +295,7 @@ namespace VSoft
SysFuns.WinHotReg hotkey;
private void FrmVSoft_Load(object sender, EventArgs e)
{
+ //IconViewEx1.SetInterval(100, 100);
Config.Soft_Config.MainForm = this;
MinimumSize = new Size(400, 200);
LblEmpty.Left =((panelEx1.Width - LblEmpty.Width) / 2);
@@ -464,16 +468,18 @@ namespace VSoft
if (ds.HaveData())
{
DataRow row = ds.GetFirstRowData();
- SoftInfo info = new SoftInfo();
- info.Id = row["id"].ToInt();
- info.SoftType = row["SoftType"].ToInt();
- info.ColumnId = row["ColumnId"].ToInt();
- info.Name = row["Name"].ToString();
- info.Path = row["Path"].ToString();
- info.RunPram = row["RunPram"].ToString();
- info.SetJson = row["SetJson"].ToString();
- info.StartPath = row["StartPath"].ToString();
- info.IconPath = row["IconPath"].ToString();
+ SoftInfo info = new SoftInfo
+ {
+ Id = row["id"].ToInt(),
+ SoftType = row["SoftType"].ToInt(),
+ ColumnId = row["ColumnId"].ToInt(),
+ Name = row["Name"].ToString(),
+ Path = row["Path"].ToString(),
+ RunPram = row["RunPram"].ToString(),
+ SetJson = row["SetJson"].ToString(),
+ StartPath = row["StartPath"].ToString(),
+ IconPath = row["IconPath"].ToString()
+ };
VSoft.Prams.Run.Open(info, false);
}
db.Free();
@@ -561,7 +567,7 @@ namespace VSoft
}
}
- private void rySearch1_OnSearch(object sender, EventArgs e)
+ private void RySearch1_OnSearch(object sender, EventArgs e)
{
if(rySearch1.Text.Length==0)
{
@@ -597,8 +603,10 @@ namespace VSoft
}
private void BtnAddColumn_Click(object sender, EventArgs e)
{
- FrmAddColumn frm = new FrmAddColumn();
- frm.TopMost = TopMost;
+ FrmAddColumn frm = new FrmAddColumn
+ {
+ TopMost = TopMost
+ };
frm.ShowInCenter(this);
if (frm.ShowDialog() == DialogResult.OK)
{
@@ -621,9 +629,11 @@ namespace VSoft
private void 修改栏目ToolStripMenuItem_Click(object sender, EventArgs e)
{
if (TabList_Column.SelectedItems.Count == 0) { return; }
- FrmAddColumn frm = new FrmAddColumn();
- frm.TopMost = TopMost;
- frm.IsAdd = 0;
+ FrmAddColumn frm = new FrmAddColumn
+ {
+ TopMost = TopMost,
+ IsAdd = 0
+ };
frm.GetInfo(TabList_Column.SelectedItems[0].Tag.ToInt());
frm.ShowInCenter(this);
if (frm.ShowDialog() == DialogResult.OK)
@@ -708,9 +718,11 @@ namespace VSoft
return;
}
var id = TabList_Column.SelectedItems[0].Tag.ToInt();
- FrmAddType frm = new FrmAddType();
- frm.TopMost = TopMost;
- frm.ParentId = id;
+ FrmAddType frm = new FrmAddType
+ {
+ TopMost = TopMost,
+ ParentId = id
+ };
frm.ShowInCenter(this);
if (frm.ShowDialog() == DialogResult.OK)
{
@@ -752,9 +764,11 @@ namespace VSoft
Msg.ShowMsg("默认分类不支持修改", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
return;
}
- FrmAddType frm = new FrmAddType();
- frm.TopMost = TopMost;
- frm.IsAdd = 0;
+ FrmAddType frm = new FrmAddType
+ {
+ TopMost = TopMost,
+ IsAdd = 0
+ };
frm.GetInfo(id);
frm.ShowInCenter(this);
if (frm.ShowDialog() == DialogResult.OK)
@@ -895,9 +909,11 @@ namespace VSoft
Msg.ShowMsg("当前模式下不支持添加软件。", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
return;
}
- FrmAddSoft frm = new FrmAddSoft();
- frm.TopMost = TopMost;
- frm.ColumnId = ColumnId;
+ FrmAddSoft frm = new FrmAddSoft
+ {
+ TopMost = TopMost,
+ ColumnId = ColumnId
+ };
frm.ShowInCenter(this);
if (frm.ShowDialog() == DialogResult.OK)
{
@@ -912,10 +928,12 @@ namespace VSoft
{
if (IconViewEx1.SelectedItems.Count == 0) { return; }
var info = (SoftInfo)IconViewEx1.SelectedItems[0].Tag;
- FrmAddSoft frm = new FrmAddSoft();
- frm.TopMost = TopMost;
- frm.SelectId = info.Id;
- frm.IsAdd = 0;
+ FrmAddSoft frm = new FrmAddSoft
+ {
+ TopMost = TopMost,
+ SelectId = info.Id,
+ IsAdd = 0
+ };
frm.GetInfo(info.Id);
frm.ShowInCenter(this);
if (frm.ShowDialog() == DialogResult.OK)
@@ -1089,8 +1107,6 @@ namespace VSoft
private void IconViewEx1_DragEnter(object sender, DragEventArgs e)
{
- LblDrag.Height = IconViewEx1.TileSize.Height;
- LblDrag.Parent = IconViewEx1;
ListViewItem lvi = (ListViewItem)e.Data.GetData(typeof(ListViewItem));
if (lvi != null)
{
@@ -1104,7 +1120,6 @@ namespace VSoft
}
private void IconViewEx1_DragDrop(object sender, DragEventArgs e)
{
- LblDrag.Visible = false;
var filedrop = e.Data.GetData(DataFormats.FileDrop);
if (filedrop != null)
{
@@ -1141,6 +1156,7 @@ namespace VSoft
var pram = "";
var StartPath = "";
var des = "";
+ var icon = "";
var name = System.IO.Path.GetFileNameWithoutExtension(path);
if (System.IO.Path.GetExtension(path).ToLower() == ".lnk")
{
@@ -1148,6 +1164,10 @@ namespace VSoft
path = shortcut.TargetPath;
pram = shortcut.Arguments;
StartPath = shortcut.WorkDir;
+ if(shortcut.IconLocation!= path)
+ {
+ icon = shortcut.IconLocation;
+ }
des = shortcut.Description;
}
else
@@ -1160,7 +1180,7 @@ namespace VSoft
mySQL.AddField("Path", path);
mySQL.AddField("RunPram", pram);
mySQL.AddField("StartPath", StartPath);//起始路径
- mySQL.AddField("IconPath", "");//图标路径
+ mySQL.AddField("IconPath", icon);//图标路径
Json json = new Json("");
json.Add("RunAsAdmin", false);
mySQL.AddField("SetJson", json.Text);//设置
@@ -1173,16 +1193,18 @@ namespace VSoft
mySQL.AddField("sortindex", Itrycn_Db.GetSoftCount(db3, ColumnId) + 1);
mySQL.AddField("addTime", DateTime.Now);
var ds = db3.ReadData(mySQL.GetInsertSQL() + ";select last_insert_rowid();", mySQL);
- SoftInfo info = new SoftInfo();
- info.Id = ds.Tables[0].Rows[0][0].ToInt();
- info.SoftType = 0;
- info.ColumnId = ColumnId;
- info.Name = name;
- info.Path = path;
- info.RunPram = pram;
- info.SetJson = json.Text;
- info.StartPath = StartPath;
- info.IconPath = "";
+ SoftInfo info = new SoftInfo
+ {
+ Id = ds.Tables[0].Rows[0][0].ToInt(),
+ SoftType = 0,
+ ColumnId = ColumnId,
+ Name = name,
+ Path = path,
+ RunPram = pram,
+ SetJson = json.Text,
+ StartPath = StartPath,
+ IconPath = ""
+ };
string img_path = info.TruePath;
if (dictCacheImg.ContainsKey(img_path))
{
@@ -1203,6 +1225,9 @@ namespace VSoft
Point pt;
pt = ((IconViewEx)(sender)).PointToClient(new Point(e.X, e.Y));
var to_item = IconViewEx1.GetItemAt(pt.X, pt.Y);
+ IconViewEx1.InsertionMark.Index = -1;
+ TabList_Type.InsertionMark.Index = -1;
+ TabList_Column.InsertionMark.Index = -1;
if (to_item == null) { return; }
//获得拖放中的项
ListViewItem lvi = (ListViewItem)e.Data.GetData(typeof(ListViewItem));
@@ -1224,53 +1249,61 @@ namespace VSoft
}
private void IconViewEx1_DragOver(object sender, DragEventArgs e)
{
- ListViewItem item = null;
- if (sender is IconViewEx)
+ if (sender is IconViewEx list)
{
var filedrop = e.Data.GetData(DataFormats.FileDrop);
- if (filedrop != null) {
- if (LblDrag.Visible) { LblDrag.Visible = false; }
- return;
+ if (filedrop != null)
+ {
+ list.InsertionMark.Index = -1;
+ return;
}
var lvi = e.Data.GetData(typeof(ListViewItem));
- if(lvi==null)
+ if (lvi == null)
{
- if (LblDrag.Visible) { LblDrag.Visible = false; }
+ list.InsertionMark.Index = -1;
return;
}
else
{
var lvi2 = (ListViewItem)lvi;
- if(lvi2.ListView!=IconViewEx1)
+ if (lvi2.ListView != IconViewEx1)
{
- if (LblDrag.Visible){LblDrag.Visible = false;}
+ list.InsertionMark.Index = -1;
return;
}
}
- var list = ((IconViewEx)(sender));
var pt = list.PointToClient(new Point(e.X, e.Y));
- item = list.GetItemAt(pt.X, pt.Y);
- }
- else if (sender is TabList)
- {
- var list = ((TabList)(sender));
- var pt = list.PointToClient(new Point(e.X, e.Y));
- item = list.GetItemAt(pt.X, pt.Y);
- }
- if (item == null)
- {
- if (LblDrag.Visible)
+ int targetIndex = list.InsertionMark.NearestIndex(pt);
+ if (targetIndex > -1)
{
- LblDrag.Visible = false;
+ // Determine whether the mouse pointer is to the left or
+ // the right of the midpoint of the closest item and set
+ // the InsertionMark.AppearsAfterItem property accordingly.
+ Rectangle itemBounds = list.GetItemRect(targetIndex);
+ if (pt.X > itemBounds.Left + (itemBounds.Width / 2))
+ {
+ list.InsertionMark.AppearsAfterItem = true;
+ }
+ else
+ {
+ list.InsertionMark.AppearsAfterItem = false;
+ }
}
+ list.InsertionMark.Index = targetIndex;
+ list.InsertionMark.Color = Color.Black; ;
+ //item = list.GetItemAt(pt.X, pt.Y);
}
- else
+ else if (sender is TabList list2)
{
- if (!LblDrag.Visible)
+ var pt = list2.PointToClient(new Point(e.X, e.Y));
+ int targetIndex = list2.InsertionMark.NearestIndex(pt);
+ if (targetIndex > -1)
{
- LblDrag.Visible = true;
+ // Rectangle itemBounds = list2.GetItemRect(targetIndex);
+ list2.InsertionMark.AppearsAfterItem = false;
}
- LblDrag.Location = item.Position;
+ list2.InsertionMark.Index = targetIndex;
+ list2.InsertionMark.Color = Color.Black; ;
}
}
#endregion
@@ -1281,15 +1314,15 @@ namespace VSoft
ListViewItem lvi = (ListViewItem)e.Data.GetData(typeof(ListViewItem));
if (lvi != null)
{
- LblDrag.Height = TabList_Column.TileSize.Height;
- LblDrag.Parent = TabList_Column;
e.Effect = DragDropEffects.Move;
}
}
private void TabList_Column_DragDrop(object sender, DragEventArgs e)
{
- LblDrag.Visible = false;
Point pt;
+ IconViewEx1.InsertionMark.Index = -1;
+ TabList_Type.InsertionMark.Index = -1;
+ TabList_Column.InsertionMark.Index = -1;
pt = ((TabList)(sender)).PointToClient(new Point(e.X, e.Y));
var item = TabList_Column.GetItemAt(pt.X, pt.Y);
if (item == null) { return; }
@@ -1368,16 +1401,16 @@ namespace VSoft
ListViewItem lvi = (ListViewItem)e.Data.GetData(typeof(ListViewItem));
if (lvi != null)
{
- LblDrag.Height = TabList_Type.TileSize.Height;
- LblDrag.Parent = TabList_Type;
e.Effect = DragDropEffects.Move;
}
}
private void TabList_Type_DragDrop(object sender, DragEventArgs e)
{
- LblDrag.Visible = false;
Point pt;
+ IconViewEx1.InsertionMark.Index = -1;
+ TabList_Type.InsertionMark.Index = -1;
+ TabList_Column.InsertionMark.Index = -1;
pt = ((TabList)(sender)).PointToClient(new Point(e.X, e.Y));
var item = TabList_Type.GetItemAt(pt.X, pt.Y);
if (item == null) { return; }
@@ -1521,9 +1554,11 @@ namespace VSoft
private void ShowSetting(bool ShowInScreenCenter)
{
hotkey.Enabled = false;
- FrmSetting frm = new FrmSetting();
- frm.TopMost = TopMost;
- if(!ShowInScreenCenter)
+ FrmSetting frm = new FrmSetting
+ {
+ TopMost = TopMost
+ };
+ if (!ShowInScreenCenter)
{
frm.ShowInCenter(this);
}
@@ -1591,7 +1626,7 @@ namespace VSoft
}
}
- private void rySearch1_KeyDown(object sender, KeyEventArgs e)
+ private void RySearch1_KeyDown(object sender, KeyEventArgs e)
{
if (e.KeyCode == Keys.Down)
{
@@ -1649,8 +1684,10 @@ namespace VSoft
Msg.ShowMsg("当前模式下不支持添加软件。", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
return;
}
- FrmInCMD frm = new FrmInCMD();
- frm.TopMost = TopMost;
+ FrmInCMD frm = new FrmInCMD
+ {
+ TopMost = TopMost
+ };
frm.ShowInCenter(this);
if (frm.ShowDialog()==DialogResult.OK)
{
@@ -1749,7 +1786,7 @@ namespace VSoft
}
- private void panelEx1_Resize(object sender, EventArgs e)
+ private void PanelEx1_Resize(object sender, EventArgs e)
{
// LblEmpty.Left = panelEx1.Left + ((panelEx1.Width - LblEmpty.Width) / 2);
}
diff --git a/Source/VSoft_Dll/FrmVSoft.resx b/Source/VSoft_Dll/FrmVSoft.resx
index 8db5b61..2b88f6c 100644
--- a/Source/VSoft_Dll/FrmVSoft.resx
+++ b/Source/VSoft_Dll/FrmVSoft.resx
@@ -124,7 +124,7 @@
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO
- wQAADsEBuJFr7QAAAYRJREFUOE+NkztPwlAUx8/gakIYWFwYHB1w8FUQCEpI1KiTYpSHQVQisviYjZsJ
+ wAAADsABataJCQAAAYRJREFUOE+NkztPwlAUx8/gakIYWFwYHB1w8FUQCEpI1KiTYpSHQVQisviYjZsJ
k4OJMT6ILhgTFheDiongc4AP4HdgcO/xnPZWaG81/JN/Qu49v1972wJ2iUQiQWqFiqL82yO2/w4Nuann
DA3MrqMrWcDaSRB30uOGiPfcYrwVWuQr1HnIPxXFnsQxQvYDYeMd1Scf1Yt3hwGMz4UNEc9WBK4JsHfx
AJ0r1wibBAoYMizwolpR9D6OYOPCh5f7AU0kcF0AuU8JhsybCVYfhvXeD9kIbGBYEwILrJYHZYEzVZRg
@@ -137,7 +137,7 @@
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO
- wQAADsEBuJFr7QAAAIpJREFUOE/tktEGxDAQRef/v6NLly5dQpfQtSXkixJJHu661R36NC/70NJhiDnH
+ wAAADsABataJCQAAAIpJREFUOE/tktEGxDAQRef/v6NLly5dQpfQtSXkixJJHu661R36NC/70NJhiDnH
mImRv0SMESEELJ8F73mG9x6vacKGTS6ErbVdOudUsLiwM4s55zX5fo6jChYXjvUTUkqoteIxDCpYXLgT
BSZhKQX3vlfB4sIP4U4ci50Jb12ngsUPENcdnPsORL5USPZgYQ6cHAAAAABJRU5ErkJggg==
@@ -182,7 +182,7 @@
iVBORw0KGgoAAAANSUhEUgAAAIAAAACACAYAAADDPmHLAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAL
- EAAACxABrSO9dQAABvRJREFUeF7tnE2IHEUUxwcjIjkE1JMREnMWD7phd7uzfuBJEPSkd0+55BLQc9ds
+ DwAACw8BkvkDpQAABvRJREFUeF7tnE2IHEUUxwcjIjkE1JMREnMWD7phd7uzfuBJEPSkd0+55BLQc9ds
ooIXT+bix8kgbtSYgxA1hsWLImLAPYTEXBRUNGiMEojpnpTvdWpIT2/Nm+6e7uqerv+DH0tPVfVs7/t1
ffTHDopEoPS9QTQ6FKrkbKjiC/TzCqFBp6CcpLk5G6h4GK7rYKD0HSaF1WL5iN4XqOR4ECU3cl8GFoAg
ii8eWNePmXQWjyWld4ZRcox2kuR3ChYPOonfeVLpu0165TgQ6d3UlWzZdgQWF+oNvufcmjTbIzyq99KZ
diff --git a/Source/VSoft_Dll/Prams/Run.cs b/Source/VSoft_Dll/Prams/Run.cs
index b1aba14..c94fa41 100644
--- a/Source/VSoft_Dll/Prams/Run.cs
+++ b/Source/VSoft_Dll/Prams/Run.cs
@@ -90,7 +90,7 @@ namespace VSoft.Prams
{
case DialogResult.Yes:
SHEmptyRecycleBin(IntPtr.Zero, "", SHERB_NOCONFIRMATION + SHERB_NOPROGRESSUI + SHERB_NOSOUND);
- return 1;
+ return 37;
}
break;
case "trans"://翻译
@@ -98,7 +98,7 @@ namespace VSoft.Prams
{
RyForm.ShowOne(new Tools.FrmTrans());
}));
- break;
+ return 37;
}
return 0;
}
diff --git a/Source/VSoft_Dll/Properties/AssemblyInfo.cs b/Source/VSoft_Dll/Properties/AssemblyInfo.cs
index 8f8e52a..0f2a5b4 100644
--- a/Source/VSoft_Dll/Properties/AssemblyInfo.cs
+++ b/Source/VSoft_Dll/Properties/AssemblyInfo.cs
@@ -32,5 +32,5 @@ using System.Runtime.InteropServices;
//可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值
//通过使用 "*",如下所示:
// [assembly: AssemblyVersion("1.0.*")]
-[assembly: AssemblyVersion("1.0.2211.3001")]
-[assembly: AssemblyFileVersion("1.0.2211.3001")]
\ No newline at end of file
+[assembly: AssemblyVersion("1.0.2310.2401")]
+[assembly: AssemblyFileVersion("1.0.2310.2401")]
\ No newline at end of file
diff --git a/Source/VSoft_Dll/Properties/Resources.Designer.cs b/Source/VSoft_Dll/Properties/Resources.Designer.cs
index f6bb76f..1d46c0b 100644
--- a/Source/VSoft_Dll/Properties/Resources.Designer.cs
+++ b/Source/VSoft_Dll/Properties/Resources.Designer.cs
@@ -19,7 +19,7 @@ namespace VSoft.Properties {
// 类通过类似于 ResGen 或 Visual Studio 的工具自动生成的。
// 若要添加或移除成员,请编辑 .ResX 文件,然后重新运行 ResGen
// (以 /str 作为命令选项),或重新生成 VS 项目。
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "16.0.0.0")]
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "17.0.0.0")]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
internal class Resources {
@@ -47,8 +47,8 @@ namespace VSoft.Properties {
}
///
- /// 重写当前线程的 CurrentUICulture 属性
- /// 重写当前线程的 CurrentUICulture 属性。
+ /// 重写当前线程的 CurrentUICulture 属性,对
+ /// 使用此强类型资源类的所有资源查找执行重写。
///
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
internal static global::System.Globalization.CultureInfo Culture {
diff --git a/Source/VSoft_Dll/Tools/Trans/FrmTrans.cs b/Source/VSoft_Dll/Tools/Trans/FrmTrans.cs
index 269ee8d..bfe3399 100644
--- a/Source/VSoft_Dll/Tools/Trans/FrmTrans.cs
+++ b/Source/VSoft_Dll/Tools/Trans/FrmTrans.cs
@@ -39,26 +39,16 @@ namespace VSoft.Tools
string salt = rd.Next(100000).ToString();
// 改成您的密钥
string secretKey = "l6ngE7GjtdvRESJqQzDL";
+ RyWeb.QuickWeb web = new RyWeb.QuickWeb();
string sign = EncryptString(appId + q + salt + secretKey);
- string url = "http://api.fanyi.baidu.com/api/trans/vip/translate?";
- url += "q=" + RyWeb.WebDecode.UrlEncode(q);
- url += "&from=" + from;
- url += "&to=" + to;
- url += "&appid=" + appId;
- url += "&salt=" + salt;
- url += "&sign=" + sign;
- HttpWebRequest request = (HttpWebRequest)WebRequest.Create(url);
- request.Method = "GET";
- request.ContentType = "text/html;charset=UTF-8";
- request.UserAgent = null;
- request.Timeout = 6000;
- HttpWebResponse response = (HttpWebResponse)request.GetResponse();
- Stream myResponseStream = response.GetResponseStream();
- StreamReader myStreamReader = new StreamReader(myResponseStream, Encoding.GetEncoding("utf-8"));
- string retString = myStreamReader.ReadToEnd();
- myStreamReader.Close();
- myResponseStream.Close();
- JObject jo = JObject.Parse(retString);
+ string post_data = "q=" + web.UrlEncode(q);
+ post_data += "&from=" + from;
+ post_data += "&to=" + to;
+ post_data += "&appid=" + appId;
+ post_data += "&salt=" + salt;
+ post_data += "&sign=" + sign;
+ var http= web.Post("http://api.fanyi.baidu.com/api/trans/vip/translate", post_data);
+ JObject jo = JObject.Parse(http.Html);
var trans_result = jo["trans_result"];
if (trans_result != null)
{
diff --git a/Source/VSoft_Dll/VSoft.csproj b/Source/VSoft_Dll/VSoft.csproj
index 654e443..f0b510e 100644
--- a/Source/VSoft_Dll/VSoft.csproj
+++ b/Source/VSoft_Dll/VSoft.csproj
@@ -9,9 +9,10 @@
Properties
VSoft
VSoft
- v4.0
+ v4.5.2
512
true
+
true
@@ -22,6 +23,7 @@
prompt
4
AnyCPU
+ false
pdbonly
@@ -30,24 +32,16 @@
TRACE
prompt
4
+ false
-
- False
- ..\..\Bin\Debug\VSoft\MyDb.dll
-
-
- ..\..\Bin\Debug\VSoft\MyDb_SQLite.dll
-
False
..\..\Bin\Debug\VSoft\Newtonsoft.Json.dll
-
- ..\..\Bin\Debug\VSoft\ryControls.dll
-
-
- ..\..\Bin\Debug\VSoft\ryUpdate.dll
+
+ False
+ ..\..\Bin\Debug\VSoft\RaUI.dll