### 2021-07-05更新

------
#### VSoft    V1.0.2107.0501
- *.[新增]新增适配原生64位系统。
- *.[修复]修复将侧键作为热键时,点击两个侧键都会激活软件的BUG。
- *.[修复]修复点击主界面中设置按钮,设置按钮没在父窗体居中的BUG。
- *.[修复]修复在右键菜单中无法编辑和新增软件的BUG。
- *.[修复]修复主界面右键菜单打开的窗体没居中的BUG。
This commit is contained in:
紫林软件 2021-07-05 21:44:33 +08:00
parent 3869ec013b
commit 64e190aa7b
35 changed files with 4114 additions and 191 deletions

Binary file not shown.

Binary file not shown.

File diff suppressed because it is too large Load Diff

Binary file not shown.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.5 KiB

View File

@ -1,7 +1,7 @@
[VSoft]
hwnd=1577024
width=733
height=570
hwnd=1775930
width=745
height=543
[VSoft_Test]
hwnd=987400
width=733

Binary file not shown.

Binary file not shown.

View File

@ -1,3 +1,3 @@
<root>
<list id="LastUpdateTime" Value="2021/6/15 10:04:53" />
<list id="LastUpdateTime" Value="2021/7/5 21:41:10" />
</root>

Binary file not shown.

File diff suppressed because it is too large Load Diff

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -1,4 +1,16 @@
### 2021-03-08更新
### 2021-07-05更新
------
#### VSoft V1.0.2107.0501
- *.[新增]新增适配原生64位系统。
- *.[修复]修复将侧键作为热键时,点击两个侧键都会激活软件的BUG。
- *.[修复]修复点击主界面中设置按钮设置按钮没在父窗体居中的BUG。
- *.[修复]修复在右键菜单中无法编辑和新增软件的BUG。
- *.[修复]修复主界面右键菜单打开的窗体没居中的BUG。
#### VSoftBox V1.0.2107.0401
- *.[新增]新增适配原生64位系统。
### 2021-03-08更新
------
#### VSoft V1.0.2103.0801
- *.[改进]改进公司条件下的皮肤,更美观。

Binary file not shown.

View File

@ -1,6 +1,9 @@
using System;
using System.Collections.Generic;
using System.Linq;
#if DY
using System.Reflection;
#endif
using System.Windows.Forms;
using VSoft.Config;
@ -8,6 +11,13 @@ namespace VSoftBox
{
static class Program
{
#if DY
/// <summary>
/// 流程软件路径
/// </summary>
static string ProcessPath;
#endif
static System.Threading.Mutex run;
/// <summary>
/// 应用程序的主入口点。
@ -15,6 +25,14 @@ namespace VSoftBox
[STAThread]
static void Main(string[] args)
{
#if DY
var sub_dir = @"\SysDb\Tools\VSoft";
if (Application.StartupPath.EndsWith(sub_dir, StringComparison.OrdinalIgnoreCase))
{
ProcessPath = Application.StartupPath.Substring(0, Application.StartupPath.Length - sub_dir.Length);
AppDomain.CurrentDomain.AssemblyResolve += CurrentDomain_AssemblyResolve;
}
#endif
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
Soft_Info.UserDataFolder = ryCommon.RyFiles.GetRealPath(Soft_Info.UserDataFolder);
@ -30,5 +48,23 @@ namespace VSoftBox
//Application.Run(new WindowsFormsApp2.Form1());
}
}
#if DY
static Assembly CurrentDomain_AssemblyResolve(object sender, ResolveEventArgs args)
{
AssemblyName assemblyName = new AssemblyName(args.Name);
if (System.IO.File.Exists(ProcessPath + @"\" + assemblyName.Name + ".dll"))
{
return Assembly.LoadFrom(ProcessPath + @"\" + assemblyName.Name + ".dll");
}
else if (System.IO.File.Exists(ProcessPath + @"\Bin\dlls\" + assemblyName.Name + ".dll"))
{
return Assembly.LoadFrom(ProcessPath + @"\Bin\dlls\" + assemblyName.Name + ".dll");
}
else
{
return args.RequestingAssembly;
}
}
#endif
}
}

View File

@ -32,5 +32,5 @@ using System.Runtime.InteropServices;
//可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值
//通过使用 "*",如下所示:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.2103.0801")]
[assembly: AssemblyFileVersion("1.0.2103.0801")]
[assembly: AssemblyVersion("1.0.2107.0501")]
[assembly: AssemblyFileVersion("1.0.2107.0501")]

View File

@ -13,7 +13,7 @@
<Deterministic>true</Deterministic>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<PlatformTarget>x86</PlatformTarget>
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>

View File

@ -60,8 +60,9 @@
// btnCancel
//
this.btnCancel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.btnCancel.BaseColor = System.Drawing.Color.FromArgb(((int)(((byte)(51)))), ((int)(((byte)(76)))), ((int)(((byte)(95)))));
this.btnCancel.Location = new System.Drawing.Point(488, 462);
this.btnCancel.BaseColor = System.Drawing.Color.Teal;
this.btnCancel.ColorGradient = true;
this.btnCancel.Location = new System.Drawing.Point(393, 389);
this.btnCancel.Name = "btnCancel";
this.btnCancel.Size = new System.Drawing.Size(79, 30);
this.btnCancel.TabIndex = 22;
@ -72,8 +73,9 @@
// btnOK
//
this.btnOK.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.btnOK.BaseColor = System.Drawing.Color.FromArgb(((int)(((byte)(51)))), ((int)(((byte)(76)))), ((int)(((byte)(95)))));
this.btnOK.Location = new System.Drawing.Point(403, 462);
this.btnOK.BaseColor = System.Drawing.Color.Teal;
this.btnOK.ColorGradient = true;
this.btnOK.Location = new System.Drawing.Point(308, 389);
this.btnOK.Name = "btnOK";
this.btnOK.Size = new System.Drawing.Size(79, 30);
this.btnOK.TabIndex = 21;
@ -96,7 +98,7 @@
this.chromeTabControl1.SelectedIndex = 0;
this.chromeTabControl1.ShowAddButton = false;
this.chromeTabControl1.ShowCloseButton = false;
this.chromeTabControl1.Size = new System.Drawing.Size(568, 426);
this.chromeTabControl1.Size = new System.Drawing.Size(473, 353);
this.chromeTabControl1.SizeMode = System.Windows.Forms.TabSizeMode.Fixed;
this.chromeTabControl1.TabContextMenuStrip = null;
this.chromeTabControl1.TabIndex = 23;
@ -115,7 +117,7 @@
this.tabPage2.Location = new System.Drawing.Point(1, 29);
this.tabPage2.Name = "tabPage2";
this.tabPage2.Padding = new System.Windows.Forms.Padding(3);
this.tabPage2.Size = new System.Drawing.Size(566, 396);
this.tabPage2.Size = new System.Drawing.Size(471, 323);
this.tabPage2.TabIndex = 0;
this.tabPage2.Text = "普通";
this.tabPage2.UseVisualStyleBackColor = true;
@ -203,13 +205,13 @@
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(577, 504);
this.ClientSize = new System.Drawing.Size(482, 431);
this.Controls.Add(this.chromeTabControl1);
this.Controls.Add(this.btnCancel);
this.Controls.Add(this.btnOK);
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
this.Name = "FrmSetting";
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
this.Text = "设置";
this.Load += new System.EventHandler(this.FrmSetting_Load);
this.Resize += new System.EventHandler(this.FrmSetting_Resize);

View File

@ -78,7 +78,7 @@
this.label7.AutoSize = true;
this.label7.BackColor = System.Drawing.Color.Transparent;
this.label7.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64)))));
this.label7.Location = new System.Drawing.Point(13, 321);
this.label7.Location = new System.Drawing.Point(13, 333);
this.label7.Name = "label7";
this.label7.Size = new System.Drawing.Size(467, 12);
this.label7.TabIndex = 20;
@ -101,7 +101,7 @@
this.label3.AutoSize = true;
this.label3.BackColor = System.Drawing.Color.Transparent;
this.label3.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64)))));
this.label3.Location = new System.Drawing.Point(12, 343);
this.label3.Location = new System.Drawing.Point(12, 355);
this.label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(365, 12);
this.label3.TabIndex = 18;
@ -164,7 +164,7 @@
this.pnlTopLogo.Dock = System.Windows.Forms.DockStyle.Top;
this.pnlTopLogo.Location = new System.Drawing.Point(1, 27);
this.pnlTopLogo.Name = "pnlTopLogo";
this.pnlTopLogo.Size = new System.Drawing.Size(491, 59);
this.pnlTopLogo.Size = new System.Drawing.Size(493, 59);
this.pnlTopLogo.TabIndex = 8;
//
// lblTitle
@ -184,7 +184,7 @@
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.BackColor = System.Drawing.Color.White;
this.ClientSize = new System.Drawing.Size(493, 362);
this.ClientSize = new System.Drawing.Size(495, 374);
this.Controls.Add(this.label1);
this.Controls.Add(this.label7);
this.Controls.Add(this.label6);
@ -196,11 +196,10 @@
this.Controls.Add(this.lblVisitUrl);
this.Controls.Add(this.label2);
this.Controls.Add(this.pnlTopLogo);
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
this.MaximizeBox = false;
this.Name = "FrmAbout";
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
this.Text = "关于";
this.Load += new System.EventHandler(this.FrmAbout_Load);
((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit();

View File

@ -40,8 +40,9 @@
// BtnCancel
//
this.BtnCancel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.BtnCancel.BaseColor = System.Drawing.Color.FromArgb(((int)(((byte)(51)))), ((int)(((byte)(76)))), ((int)(((byte)(95)))));
this.BtnCancel.Location = new System.Drawing.Point(264, 131);
this.BtnCancel.BaseColor = System.Drawing.Color.Teal;
this.BtnCancel.ColorGradient = true;
this.BtnCancel.Location = new System.Drawing.Point(262, 130);
this.BtnCancel.Name = "BtnCancel";
this.BtnCancel.Size = new System.Drawing.Size(75, 27);
this.BtnCancel.TabIndex = 10;
@ -52,8 +53,9 @@
// BtnOK
//
this.BtnOK.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.BtnOK.BaseColor = System.Drawing.Color.FromArgb(((int)(((byte)(51)))), ((int)(((byte)(76)))), ((int)(((byte)(95)))));
this.BtnOK.Location = new System.Drawing.Point(183, 131);
this.BtnOK.BaseColor = System.Drawing.Color.Teal;
this.BtnOK.ColorGradient = true;
this.BtnOK.Location = new System.Drawing.Point(181, 130);
this.BtnOK.Name = "BtnOK";
this.BtnOK.Size = new System.Drawing.Size(75, 27);
this.BtnOK.TabIndex = 9;
@ -123,14 +125,14 @@
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(350, 165);
this.ClientSize = new System.Drawing.Size(348, 164);
this.Controls.Add(this.label2);
this.Controls.Add(this.TxtDes);
this.Controls.Add(this.label1);
this.Controls.Add(this.TxtName);
this.Controls.Add(this.BtnCancel);
this.Controls.Add(this.BtnOK);
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
this.MaximizeBox = false;
this.Name = "FrmAddColumn";

View File

@ -403,8 +403,8 @@
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
this.Name = "FrmAddSoft";
this.ShadowColor = System.Drawing.Color.FromArgb(((int)(((byte)(224)))), ((int)(((byte)(224)))), ((int)(((byte)(224)))));
this.ShadowWidth = 0;
this.ShowShadow = true;
this.ShadowWidth = 1;
this.ShowShadow = false;
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
this.Text = "添加软件";
this.Load += new System.EventHandler(this.FrmAddSoft_Load);

View File

@ -98,8 +98,9 @@
// BtnCancel
//
this.BtnCancel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.BtnCancel.BaseColor = System.Drawing.Color.FromArgb(((int)(((byte)(51)))), ((int)(((byte)(76)))), ((int)(((byte)(95)))));
this.BtnCancel.Location = new System.Drawing.Point(264, 128);
this.BtnCancel.BaseColor = System.Drawing.Color.Teal;
this.BtnCancel.ColorGradient = true;
this.BtnCancel.Location = new System.Drawing.Point(263, 133);
this.BtnCancel.Name = "BtnCancel";
this.BtnCancel.Size = new System.Drawing.Size(75, 27);
this.BtnCancel.TabIndex = 10;
@ -110,8 +111,9 @@
// BtnOK
//
this.BtnOK.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.BtnOK.BaseColor = System.Drawing.Color.FromArgb(((int)(((byte)(51)))), ((int)(((byte)(76)))), ((int)(((byte)(95)))));
this.BtnOK.Location = new System.Drawing.Point(183, 128);
this.BtnOK.BaseColor = System.Drawing.Color.Teal;
this.BtnOK.ColorGradient = true;
this.BtnOK.Location = new System.Drawing.Point(182, 133);
this.BtnOK.Name = "BtnOK";
this.BtnOK.Size = new System.Drawing.Size(75, 27);
this.BtnOK.TabIndex = 9;
@ -123,14 +125,14 @@
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(350, 162);
this.ClientSize = new System.Drawing.Size(349, 167);
this.Controls.Add(this.label2);
this.Controls.Add(this.TxtDes);
this.Controls.Add(this.label1);
this.Controls.Add(this.TxtName);
this.Controls.Add(this.BtnCancel);
this.Controls.Add(this.BtnOK);
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
this.MaximizeBox = false;
this.Name = "FrmAddType";

View File

@ -78,7 +78,7 @@
this.panelEx1.Name = "panelEx1";
this.panelEx1.Padding = new System.Windows.Forms.Padding(3);
this.panelEx1.RoundeStyle = ryControls.RoundStyle.None;
this.panelEx1.Size = new System.Drawing.Size(587, 417);
this.panelEx1.Size = new System.Drawing.Size(596, 446);
this.panelEx1.TabIndex = 1;
this.panelEx1.TileBackColor = System.Drawing.Color.White;
//
@ -106,7 +106,7 @@
this.IconViewEx1.SelectedForeColor = System.Drawing.Color.Black;
this.IconViewEx1.SelectedStartBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(251)))), ((int)(((byte)(237)))));
this.IconViewEx1.ShowItemToolTips = true;
this.IconViewEx1.Size = new System.Drawing.Size(581, 381);
this.IconViewEx1.Size = new System.Drawing.Size(590, 410);
this.IconViewEx1.TabIndex = 0;
this.IconViewEx1.TextHeight = 20;
this.IconViewEx1.TileSize = new System.Drawing.Size(90, 90);
@ -192,7 +192,7 @@
this.panel1.Dock = System.Windows.Forms.DockStyle.Top;
this.panel1.Location = new System.Drawing.Point(3, 3);
this.panel1.Name = "panel1";
this.panel1.Size = new System.Drawing.Size(581, 30);
this.panel1.Size = new System.Drawing.Size(590, 30);
this.panel1.TabIndex = 1;
this.panel1.Visible = false;
//
@ -210,6 +210,7 @@
this.rySearch1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(236)))), ((int)(((byte)(239)))), ((int)(((byte)(244)))));
this.rySearch1.BaseColor = System.Drawing.Color.FromArgb(((int)(((byte)(51)))), ((int)(((byte)(76)))), ((int)(((byte)(95)))));
this.rySearch1.ButtonRoundBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(236)))), ((int)(((byte)(239)))), ((int)(((byte)(244)))));
this.rySearch1.ColorGradient = true;
this.rySearch1.EmptyText = "输入名称或拼音即可搜索";
this.rySearch1.Location = new System.Drawing.Point(90, 34);
this.rySearch1.Name = "rySearch1";
@ -222,7 +223,7 @@
//
this.BtnAddColumn.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.BtnAddColumn.Image = ((System.Drawing.Image)(resources.GetObject("BtnAddColumn.Image")));
this.BtnAddColumn.Location = new System.Drawing.Point(649, 65);
this.BtnAddColumn.Location = new System.Drawing.Point(658, 65);
this.BtnAddColumn.Name = "BtnAddColumn";
this.BtnAddColumn.Size = new System.Drawing.Size(27, 28);
this.BtnAddColumn.TabIndex = 3;
@ -323,7 +324,7 @@
this.TabList_Type.SelectedEndBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(236)))), ((int)(((byte)(181)))));
this.TabList_Type.SelectedForeColor = System.Drawing.Color.Black;
this.TabList_Type.SelectedStartBackColor = System.Drawing.Color.LightSkyBlue;
this.TabList_Type.Size = new System.Drawing.Size(83, 414);
this.TabList_Type.Size = new System.Drawing.Size(83, 443);
this.TabList_Type.TabIndex = 4;
this.TabList_Type.TileSize = new System.Drawing.Size(80, 28);
this.TabList_Type.UseCompatibleStateImageBehavior = false;
@ -361,7 +362,7 @@
this.TabList_Column.SelectedEndBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(236)))), ((int)(((byte)(181)))));
this.TabList_Column.SelectedForeColor = System.Drawing.Color.Black;
this.TabList_Column.SelectedStartBackColor = System.Drawing.Color.LightSkyBlue;
this.TabList_Column.Size = new System.Drawing.Size(556, 29);
this.TabList_Column.Size = new System.Drawing.Size(565, 29);
this.TabList_Column.TabIndex = 1;
this.TabList_Column.TileSize = new System.Drawing.Size(70, 28);
this.TabList_Column.UseCompatibleStateImageBehavior = false;
@ -377,7 +378,7 @@
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(689, 529);
this.ClientSize = new System.Drawing.Size(698, 558);
this.Controls.Add(this.LblDrag);
this.Controls.Add(this.pictureBox1);
this.Controls.Add(this.TabList_Type);
@ -385,6 +386,7 @@
this.Controls.Add(this.TabList_Column);
this.Controls.Add(this.rySearch1);
this.Controls.Add(this.panelEx1);
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
this.Name = "FrmInCMD";
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;

View File

@ -528,6 +528,7 @@ namespace VSoft
ColumnId = ColumnId,
TopMost=TopMost
};
frm.ShowInCenter(this);
if (frm.ShowDialog() == DialogResult.OK)
{
LoadDb();
@ -546,6 +547,7 @@ namespace VSoft
TopMost=TopMost
};
frm.GetInfo(info.Id);
frm.ShowInCenter(this);
if (frm.ShowDialog() == DialogResult.OK)
{
SetSoftRow(info.Id, IconViewEx1.SelectedItems[0].Index);

View File

@ -153,7 +153,7 @@
//
this.BtnAddColumn.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.BtnAddColumn.Image = ((System.Drawing.Image)(resources.GetObject("BtnAddColumn.Image")));
this.BtnAddColumn.Location = new System.Drawing.Point(685, 36);
this.BtnAddColumn.Location = new System.Drawing.Point(681, 36);
this.BtnAddColumn.Name = "BtnAddColumn";
this.BtnAddColumn.Size = new System.Drawing.Size(27, 28);
this.BtnAddColumn.TabIndex = 3;
@ -297,7 +297,7 @@
this.LblSetting.Cursor = System.Windows.Forms.Cursors.Hand;
this.LblSetting.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Underline, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.LblSetting.ForeColor = System.Drawing.Color.White;
this.LblSetting.Location = new System.Drawing.Point(580, 9);
this.LblSetting.Location = new System.Drawing.Point(576, 9);
this.LblSetting.Name = "LblSetting";
this.LblSetting.Size = new System.Drawing.Size(29, 12);
this.LblSetting.TabIndex = 7;
@ -311,7 +311,7 @@
this.PnlLeft.Dock = System.Windows.Forms.DockStyle.Left;
this.PnlLeft.Location = new System.Drawing.Point(2, 32);
this.PnlLeft.Name = "PnlLeft";
this.PnlLeft.Size = new System.Drawing.Size(81, 497);
this.PnlLeft.Size = new System.Drawing.Size(81, 509);
this.PnlLeft.TabIndex = 8;
//
// TabList_Type
@ -340,7 +340,7 @@
this.TabList_Type.SelectedEndBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(236)))), ((int)(((byte)(181)))));
this.TabList_Type.SelectedForeColor = System.Drawing.Color.Black;
this.TabList_Type.SelectedStartBackColor = System.Drawing.Color.LightSkyBlue;
this.TabList_Type.Size = new System.Drawing.Size(77, 394);
this.TabList_Type.Size = new System.Drawing.Size(77, 406);
this.TabList_Type.TabIndex = 4;
this.TabList_Type.TileSize = new System.Drawing.Size(77, 28);
this.TabList_Type.UseCompatibleStateImageBehavior = false;
@ -364,7 +364,7 @@
this.rySearch1.ButtonRoundBackColor = System.Drawing.SystemColors.Control;
this.rySearch1.ColorGradient = true;
this.rySearch1.EmptyText = "输入名称或拼音搜索";
this.rySearch1.Location = new System.Drawing.Point(537, 36);
this.rySearch1.Location = new System.Drawing.Point(533, 36);
this.rySearch1.Name = "rySearch1";
this.rySearch1.Size = new System.Drawing.Size(142, 27);
this.rySearch1.TabIndex = 2;
@ -385,7 +385,7 @@
this.panelEx1.Name = "panelEx1";
this.panelEx1.Padding = new System.Windows.Forms.Padding(3);
this.panelEx1.RoundeStyle = ryControls.RoundStyle.None;
this.panelEx1.Size = new System.Drawing.Size(628, 462);
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);
@ -426,7 +426,7 @@
this.IconViewEx1.SelectedEndBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(236)))), ((int)(((byte)(181)))));
this.IconViewEx1.SelectedForeColor = System.Drawing.Color.Black;
this.IconViewEx1.SelectedStartBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(251)))), ((int)(((byte)(237)))));
this.IconViewEx1.Size = new System.Drawing.Size(622, 456);
this.IconViewEx1.Size = new System.Drawing.Size(650, 467);
this.IconViewEx1.TabIndex = 0;
this.IconViewEx1.TextHeight = 20;
this.IconViewEx1.TileSize = new System.Drawing.Size(100, 100);
@ -464,7 +464,7 @@
this.TabList_Column.SelectedEndBackColor = System.Drawing.Color.SkyBlue;
this.TabList_Column.SelectedForeColor = System.Drawing.Color.Black;
this.TabList_Column.SelectedStartBackColor = System.Drawing.Color.PowderBlue;
this.TabList_Column.Size = new System.Drawing.Size(450, 29);
this.TabList_Column.Size = new System.Drawing.Size(446, 29);
this.TabList_Column.TabIndex = 1;
this.TabList_Column.TileSize = new System.Drawing.Size(70, 30);
this.TabList_Column.UseCompatibleStateImageBehavior = false;
@ -483,7 +483,7 @@
this.BackColor = System.Drawing.Color.White;
this.BorderWidth = 2;
this.CaptionHeight = 30;
this.ClientSize = new System.Drawing.Size(717, 531);
this.ClientSize = new System.Drawing.Size(745, 543);
this.ControlBoxOffset = new System.Drawing.Point(8, 8);
this.Controls.Add(this.rySearch1);
this.Controls.Add(this.PnlLeft);
@ -491,11 +491,11 @@
this.Controls.Add(this.BtnAddColumn);
this.Controls.Add(this.TabList_Column);
this.Controls.Add(this.panelEx1);
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
this.MinimumSize = new System.Drawing.Size(160, 60);
this.Name = "FrmVSoft";
this.SideResizeWidth = 4;
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
this.Text = "VSoft";
themeForm1.BorderWidth = 2;
themeForm1.CaptionBackColorBottom = System.Drawing.Color.White;

View File

@ -65,7 +65,7 @@ namespace VSoft
}
if (e.Button== button)
{
ryCommon.RyFiles.WriteAllText(Application.StartupPath+"\\1.txt",e.Button.ToString(),Encoding.UTF8);
//ryCommon.RyFiles.WriteAllText(Application.StartupPath+"\\1.txt",e.Button.ToString(),Encoding.UTF8);
if(Math.Abs((dt_lastMouse-DateTime.Now).TotalMilliseconds)<500)
{
clickcount++;
@ -313,6 +313,7 @@ namespace VSoft
break;
}
}
ShowInCenter(null);
LiveUpdate.RyUpdate update = new LiveUpdate.RyUpdate(Soft_Info.Update_Url);
update.CheckUpdate();
mouse.OnMouseActivity += Mouse_OnMouseActivity;
@ -443,6 +444,7 @@ namespace VSoft
{
FrmAddColumn frm = new FrmAddColumn();
frm.TopMost = TopMost;
frm.ShowInCenter(this);
if (frm.ShowDialog() == DialogResult.OK)
{
IDbInterface db = Itrycn_Db.CreateDataProvider(Itrycn_Db.dataType);
@ -468,6 +470,7 @@ namespace VSoft
frm.TopMost = TopMost;
frm.IsAdd = 0;
frm.GetInfo(TabList_Column.SelectedItems[0].Tag.ToInt());
frm.ShowInCenter(this);
if (frm.ShowDialog() == DialogResult.OK)
{
SetColumnRow(TabList_Column.SelectedItems[0].Tag.ToInt(), TabList_Column.SelectedItems[0].Index);
@ -553,6 +556,7 @@ namespace VSoft
FrmAddType frm = new FrmAddType();
frm.TopMost = TopMost;
frm.ParentId = id;
frm.ShowInCenter(this);
if (frm.ShowDialog() == DialogResult.OK)
{
IDbInterface db = Itrycn_Db.CreateDataProvider(Itrycn_Db.dataType);
@ -593,6 +597,7 @@ namespace VSoft
frm.TopMost = TopMost;
frm.IsAdd = 0;
frm.GetInfo(id);
frm.ShowInCenter(this);
if (frm.ShowDialog() == DialogResult.OK)
{
SetTypeRow(id, TabList_Type.SelectedItems[0].Index);
@ -711,6 +716,7 @@ namespace VSoft
FrmAddSoft frm = new FrmAddSoft();
frm.TopMost = TopMost;
frm.ColumnId = ColumnId;
frm.ShowInCenter(this);
if (frm.ShowDialog() == DialogResult.OK)
{
LoadDb();
@ -726,6 +732,7 @@ namespace VSoft
frm.SelectId = info.Id;
frm.IsAdd = 0;
frm.GetInfo(info.Id);
frm.ShowInCenter(this);
if (frm.ShowDialog() == DialogResult.OK)
{
SetSoftRow(info.Id, IconViewEx1.SelectedItems[0].Index);
@ -1296,7 +1303,7 @@ namespace VSoft
frm.TopMost = TopMost;
if(!ShowInScreenCenter)
{
frm.StartPosition = FormStartPosition.CenterParent;
frm.ShowInCenter(this);
}
if (frm.ShowDialog() == DialogResult.OK)
{
@ -1422,6 +1429,7 @@ namespace VSoft
}
FrmInCMD frm = new FrmInCMD();
frm.TopMost = TopMost;
frm.ShowInCenter(this);
if (frm.ShowDialog()==DialogResult.OK)
{
var info = frm.SelectedInfo;

View File

@ -1,5 +1,6 @@
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Runtime.InteropServices;
using System.Text;
@ -16,6 +17,7 @@ namespace VSoft.Prams
private const int WM_LBUTTONDOWN = 0x201;
private const int WM_RBUTTONDOWN = 0x204;
private const int WM_MBUTTONDOWN = 0x207;
private const int WM_XBUTTONDOWN = 0x20B;
private const int WM_LBUTTONUP = 0x202;
private const int WM_RBUTTONUP = 0x205;
private const int WM_MBUTTONUP = 0x208;
@ -38,13 +40,43 @@ namespace VSoft.Prams
/// <summary>
/// 钩子结构体
/// </summary>
[StructLayout(LayoutKind.Sequential)]
[StructLayout(LayoutKind.Explicit)]
public class MouseHookStruct
{
public POINT pt;
public int hWnd;
public int wHitTestCode;
public int dwExtraInfo;
/// <summary>
/// Specifies a Point structure that contains the X- and Y-coordinates of the cursor, in screen coordinates.
/// </summary>
[FieldOffset(0x00)] public System.Drawing.Point Point;
/// <summary>
/// Specifies information associated with the message.
/// </summary>
/// <remarks>
/// The possible values are:
/// <list type="bullet">
/// <item>
/// <description>0 - No Information</description>
/// </item>
/// <item>
/// <description>1 - X-Button1 Click</description>
/// </item>
/// <item>
/// <description>2 - X-Button2 Click</description>
/// </item>
/// <item>
/// <description>120 - Mouse Scroll Away from User</description>
/// </item>
/// <item>
/// <description>-120 - Mouse Scroll Toward User</description>
/// </item>
/// </list>
/// </remarks>
[FieldOffset(0x0A)] public short MouseData;
/// <summary>
/// Returns a Timestamp associated with the input, in System Ticks.
/// </summary>
[FieldOffset(0x10)] public int Timestamp;
}
public const int WH_MOUSE_LL = 14; // mouse hook constant
@ -88,7 +120,6 @@ namespace VSoft.Prams
{
Stop();
}
/// <summary>
/// 启动全局钩子
/// </summary>
@ -100,7 +131,7 @@ namespace VSoft.Prams
// 生成一个HookProc的实例.
_mouseHookProcedure = new HookProc(MouseHookProc);
_hMouseHook = SetWindowsHookEx(WH_MOUSE_LL, _mouseHookProcedure, IntPtr.Zero, 0);
_hMouseHook = SetWindowsHookEx(WH_MOUSE_LL, _mouseHookProcedure, Process.GetCurrentProcess().MainModule.BaseAddress, 0);
//假设装置失败停止钩子
if (_hMouseHook == 0)
@ -139,7 +170,8 @@ namespace VSoft.Prams
{
MouseButtons button = MouseButtons.None;
int clickCount = 0;
// 从回调函数中得到鼠标的信息
MouseHookStruct MyMouseHookStruct = (MouseHookStruct)Marshal.PtrToStructure(lParam, typeof(MouseHookStruct));
switch (wParam)
{
case WM_LBUTTONDOWN:
@ -174,29 +206,23 @@ namespace VSoft.Prams
// button = MouseButtons.Middle;
// clickCount = 1;
// break;
case WM_XBUTTON1:
button = MouseButtons.XButton1;
clickCount = 1;
break;
case WM_XBUTTON2:
button = MouseButtons.XButton2;
case WM_XBUTTONDOWN:
button = MyMouseHookStruct.MouseData == 1
? MouseButtons.XButton1
: MouseButtons.XButton2;
clickCount = 1;
break;
default:
break;
}
// 从回调函数中得到鼠标的信息
MouseHookStruct MyMouseHookStruct = (MouseHookStruct)Marshal.PtrToStructure(lParam, typeof(MouseHookStruct));
MouseEventArgs e = new MouseEventArgs(button, clickCount, MyMouseHookStruct.pt.x, MyMouseHookStruct.pt.y, 0);
MouseEventArgs e = new MouseEventArgs(button, clickCount, MyMouseHookStruct.Point.X, MyMouseHookStruct.Point.Y, 0);
// 假设想要限制鼠标在屏幕中的移动区域能够在此处设置
// 后期须要考虑实际的x、y的容差
if (!Screen.PrimaryScreen.Bounds.Contains(e.X, e.Y))
{
//return 1;
}
//if (!Screen.PrimaryScreen.Bounds.Contains(e.X, e.Y))
//{
// //return 1;
//}
OnMouseActivity(this, e);
}

View File

@ -32,5 +32,5 @@ using System.Runtime.InteropServices;
//可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值
//通过使用 "*",如下所示:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.2103.0801")]
[assembly: AssemblyFileVersion("1.0.2103.0801")]
[assembly: AssemblyVersion("1.0.2107.0501")]
[assembly: AssemblyFileVersion("1.0.2107.0501")]

View File

@ -35,8 +35,10 @@ namespace VSoft.Skins
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(594, 521);
this.ClientSize = new System.Drawing.Size(631, 545);
this.Location = new System.Drawing.Point(0, 0);
this.Name = "SKinForm";
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
this.Text = "SKinForm";
this.Load += new System.EventHandler(this.SKinForm_Load);
this.ResumeLayout(false);

View File

@ -20,6 +20,31 @@ namespace VSoft.Skins
{
InitializeComponent();
}
/// <summary>
/// 显示在父窗体中间,如果没有父窗体,则显示在显示器中间
/// </summary>
/// <param name="parent"></param>
public void ShowInCenter(Form parent)
{
this.StartPosition = FormStartPosition.Manual;
var screen = Screen.FromControl(this);
if (parent == null) //如果没有父窗体,则显示在显示器中间
{
Location = new Point((screen.WorkingArea.Width - Width) / 2, (screen.WorkingArea.Height - 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)
{
x = screen.WorkingArea.X + screen.WorkingArea.Width - Width;
}
if ((y + Height) > screen.WorkingArea.Y + screen.WorkingArea.Height)
{
y = screen.WorkingArea.Y + screen.WorkingArea.Height - Height;
}
Location = new Point(x, y);
}
private void SKinForm_Load(object sender, EventArgs e)
{
if (!this.DesignMode)

View File

@ -36,7 +36,7 @@ namespace VSoft.Skins
SideResizeWidth = 4;
UseDefaultTopRoundingFormRegion = false;
ShadowWidth = 1;
RoundedStyle = RoundStyle.None;
FormBorderOutterColor = Color.Gray;
FormBorderInnerColor = Color.White;

View File

@ -21,7 +21,7 @@
<DefineConstants>TRACE;DEBUG</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<PlatformTarget>x86</PlatformTarget>
<PlatformTarget>AnyCPU</PlatformTarget>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>