### 2020-12-27 dev更新

#### VSoft    V1.0.2012.2701
- *.[新增]新增支持通过双击鼠标中键、侧键的方式来显示主界面。
- *.[改进]当多次最小化后,不再显示最小化通知。
- *.[改进]改进栏目和分类控件皮肤。
This commit is contained in:
鑫Intel 2020-12-27 17:04:15 +08:00
parent 60ef7eeb55
commit 800c766a67
34 changed files with 8385 additions and 7917 deletions

Binary file not shown.

Binary file not shown.

View File

@ -958,6 +958,13 @@
<param name="str"></param>
<returns></returns>
</member>
<member name="M:ryCommon.Strings.IsEng(System.String)">
<summary>
判断字符串是否只包含英文
</summary>
<param name="str"></param>
<returns></returns>
</member>
<member name="M:ryCommon.Strings.IsMatchStr(System.String,System.String)">
<summary>
判断字符串是否匹配,支持?*通配符
@ -1091,6 +1098,13 @@
<param name="input"></param>
<returns></returns>
</member>
<member name="M:ryCommon.VarExtension.IsEng(System.String)">
<summary>
判断字符串是否是英文
</summary>
<param name="input"></param>
<returns></returns>
</member>
<member name="M:ryCommon.VarExtension.IsInRange(System.Decimal,System.Decimal,System.Decimal)">
<summary>
是否在指定范围内
@ -1407,6 +1421,14 @@
<param name="list">要追加的内容列表每一行为ip 域名的格式</param>
<returns>0表示无需新增,-1表示添加失败,1表示追加成功</returns>
</member>
<member name="M:ryCommon.Hosts.AddHosts(System.String,System.Boolean)">
<summary>
write为true,追加内容到hosts里;为false,判断是否需要追加
</summary>
<param name="list">要追加的内容列表每一行为ip 域名的格式</param>
<param name="write">是否要写入,如果为false,则只判断是否需要追加,而不写入Hosts文件</param>
<returns>0表示无需新增,-1表示添加失败,1表示追加成功</returns>
</member>
<member name="M:ryCommon.Hosts.AddHosts(ryCommon.HostInfo)">
<summary>
追加内容到hosts里
@ -1878,6 +1900,13 @@
<param name="handle"></param>
<returns></returns>
</member>
<member name="M:ryCommon.RyFiles.AdminDragEnable(System.IntPtr)">
<summary>
使管理员方式运行时支持拖放
</summary>
<param name="handle"></param>
<returns></returns>
</member>
<member name="M:ryCommon.RyFiles.SaveHighQualityImage(System.Drawing.Bitmap,System.String,ryCommon.sType.ImageType)">
<summary>
保存高质量不失真照片
@ -2662,6 +2691,12 @@
</summary>
</member>
<member name="M:ElevatedDragDropManager.AdminDragEnable(System.IntPtr)">
<summary>
使管理员方式运行时支持拖放
</summary>
<param name="hWnd"></param>
</member>
<member name="M:ElevatedDragDropManager.EnableDragDrop(System.IntPtr)">
<summary>
使支持拖放属性

Binary file not shown.

View File

@ -1,3 +1,3 @@
<root>
<list id="Setting" ShowMainHotKey="1+88" OpenByClick="0" HideAfterRun="1" />
<list id="Setting" ShowMainHotKey="1+88" OpenByClick="0" HideAfterRun="1" ShowMainMouseKeyOn="1" ShowMainMouseKey="0" />
</root>

Binary file not shown.

View File

@ -1,4 +1,4 @@
[VSoft]
hwnd=660032
hwnd=2889742
width=742
height=572

Binary file not shown.

Binary file not shown.

View File

@ -1,3 +1,3 @@
<root>
<list id="LastUpdateTime" Value="2020/12/8 13:44:08" />
<list id="LastUpdateTime" Value="2020/12/27 16:55:44" />
</root>

Binary file not shown.

Binary file not shown.

View File

@ -1,4 +1,11 @@
### 2020-12-08更新
### 2020-12-27 dev更新
------
#### VSoft V1.0.2012.2701
- *.[新增]新增支持通过双击鼠标中键、侧键的方式来显示主界面。
- *.[改进]当多次最小化后,不再显示最小化通知。
- *.[改进]改进栏目和分类控件皮肤。
### 2020-12-08更新
------
#### VSoft V1.0.2012.0801

Binary file not shown.

View File

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

View File

@ -37,11 +37,11 @@
<ItemGroup>
<Reference Include="MyDb, Version=2.1.2011.901, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\..\..\公共代码\C#\公用控件组\Bin\Debug\CommonControls\.NET4\MyDb.dll</HintPath>
<HintPath>..\..\Bin\Debug\VSoft\MyDb.dll</HintPath>
</Reference>
<Reference Include="ryControls, Version=2.1.2006.3001, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\..\..\公共代码\C#\公用控件组\Bin\Debug\CommonControls\.NET4\ryControls.dll</HintPath>
<HintPath>..\..\Bin\Debug\VSoft\ryControls.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Core" />

View File

@ -24,6 +24,14 @@ namespace VSoft.Config
/// </summary>
public static string ShowMainHotKey = "";
/// <summary>
/// 是否开启鼠标快捷键
/// </summary>
public static bool ShowMainMouseKeyOn = true;
/// <summary>
/// 鼠标快捷键
/// </summary>
public static int ShowMainMouseKey = 0;
/// <summary>
/// 单击打开软件
/// </summary>
public static bool OpenByClick = false;
@ -39,6 +47,8 @@ namespace VSoft.Config
ShowMainHotKey = Stor.GetAttrValue("ShowMainHotKey", "1+88");
OpenByClick = Stor.GetAttrValue("OpenByClick", false);
HideAfterRun = Stor.GetAttrValue("HideAfterRun", true);
ShowMainMouseKeyOn = Stor.GetAttrValue("ShowMainMouseKeyOn", true);
ShowMainMouseKey = Stor.GetAttrValue("ShowMainMouseKey", 0);
//low_count = Stor.GetAttrValue("LowCount", 10);
}
}

View File

@ -35,11 +35,14 @@
this.btnOK = new ryControls.ButtonEx();
this.chromeTabControl1 = new ryControls.ChromeTabControl();
this.tabPage2 = new System.Windows.Forms.TabPage();
this.ChkHideAfterRun = new System.Windows.Forms.CheckBox();
this.ChkOpenByClick = new System.Windows.Forms.CheckBox();
this.hotkeyTextBox1 = new ryControls.HotkeyTextBox();
this.label1 = new System.Windows.Forms.Label();
this.toolTip1 = new System.Windows.Forms.ToolTip(this.components);
this.ChkHideAfterRun = new System.Windows.Forms.CheckBox();
this.CbbMouseKeyShow = new ryControls.RyComboBox();
this.ChkMouseKey = new System.Windows.Forms.CheckBox();
this.label2 = new System.Windows.Forms.Label();
this.chromeTabControl1.SuspendLayout();
this.tabPage2.SuspendLayout();
this.SuspendLayout();
@ -101,6 +104,9 @@
//
// tabPage2
//
this.tabPage2.Controls.Add(this.label2);
this.tabPage2.Controls.Add(this.ChkMouseKey);
this.tabPage2.Controls.Add(this.CbbMouseKeyShow);
this.tabPage2.Controls.Add(this.ChkHideAfterRun);
this.tabPage2.Controls.Add(this.ChkOpenByClick);
this.tabPage2.Controls.Add(this.hotkeyTextBox1);
@ -114,10 +120,20 @@
this.tabPage2.Text = "普通";
this.tabPage2.UseVisualStyleBackColor = true;
//
// ChkHideAfterRun
//
this.ChkHideAfterRun.AutoSize = true;
this.ChkHideAfterRun.Location = new System.Drawing.Point(8, 115);
this.ChkHideAfterRun.Name = "ChkHideAfterRun";
this.ChkHideAfterRun.Size = new System.Drawing.Size(132, 16);
this.ChkHideAfterRun.TabIndex = 6;
this.ChkHideAfterRun.Text = "启动软件后隐藏自身";
this.ChkHideAfterRun.UseVisualStyleBackColor = true;
//
// ChkOpenByClick
//
this.ChkOpenByClick.AutoSize = true;
this.ChkOpenByClick.Location = new System.Drawing.Point(8, 63);
this.ChkOpenByClick.Location = new System.Drawing.Point(8, 93);
this.ChkOpenByClick.Name = "ChkOpenByClick";
this.ChkOpenByClick.Size = new System.Drawing.Size(228, 16);
this.ChkOpenByClick.TabIndex = 5;
@ -145,15 +161,43 @@
this.label1.TabIndex = 3;
this.label1.Text = "显示主界面快捷键";
//
// ChkHideAfterRun
// CbbMouseKeyShow
//
this.ChkHideAfterRun.AutoSize = true;
this.ChkHideAfterRun.Location = new System.Drawing.Point(8, 85);
this.ChkHideAfterRun.Name = "ChkHideAfterRun";
this.ChkHideAfterRun.Size = new System.Drawing.Size(132, 16);
this.ChkHideAfterRun.TabIndex = 6;
this.ChkHideAfterRun.Text = "启动软件后隐藏自身";
this.ChkHideAfterRun.UseVisualStyleBackColor = true;
this.CbbMouseKeyShow.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed;
this.CbbMouseKeyShow.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.CbbMouseKeyShow.Enabled = false;
this.CbbMouseKeyShow.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.CbbMouseKeyShow.Font = new System.Drawing.Font("宋体", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.CbbMouseKeyShow.FormattingEnabled = true;
this.CbbMouseKeyShow.Items.AddRange(new object[] {
"中键",
"侧键1",
"侧键2"});
this.CbbMouseKeyShow.Location = new System.Drawing.Point(80, 62);
this.CbbMouseKeyShow.Name = "CbbMouseKeyShow";
this.CbbMouseKeyShow.Size = new System.Drawing.Size(121, 24);
this.CbbMouseKeyShow.TabIndex = 8;
this.CbbMouseKeyShow.SelectedIndexChanged += new System.EventHandler(this.CbbMouseKeyShow_SelectedIndexChanged);
//
// ChkMouseKey
//
this.ChkMouseKey.AutoSize = true;
this.ChkMouseKey.Location = new System.Drawing.Point(8, 66);
this.ChkMouseKey.Name = "ChkMouseKey";
this.ChkMouseKey.Size = new System.Drawing.Size(72, 16);
this.ChkMouseKey.TabIndex = 9;
this.ChkMouseKey.Text = "双击鼠标";
this.ChkMouseKey.UseVisualStyleBackColor = true;
this.ChkMouseKey.CheckedChanged += new System.EventHandler(this.ChkMouseKey_CheckedChanged);
//
// label2
//
this.label2.AutoSize = true;
this.label2.Location = new System.Drawing.Point(208, 68);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(65, 12);
this.label2.TabIndex = 10;
this.label2.Text = "显示主界面";
//
// FrmSetting
//
@ -187,5 +231,8 @@
private System.Windows.Forms.CheckBox ChkOpenByClick;
private System.Windows.Forms.ToolTip toolTip1;
private System.Windows.Forms.CheckBox ChkHideAfterRun;
private System.Windows.Forms.CheckBox ChkMouseKey;
private ryControls.RyComboBox CbbMouseKeyShow;
private System.Windows.Forms.Label label2;
}
}

View File

@ -41,9 +41,21 @@ namespace VSoft.Config
mySetting.Add("ShowMainHotKey", hotkeyTextBox1, "1+88");
mySetting.Add("OpenByClick", ChkOpenByClick);
mySetting.Add("HideAfterRun", ChkHideAfterRun,true);
mySetting.Add("ShowMainMouseKeyOn", ChkMouseKey, true);
mySetting.Add("ShowMainMouseKey", CbbMouseKeyShow, 0);
mySetting.Read();
ryCommon.RyRegedit.RegRoot = Microsoft.Win32.RegistryHive.CurrentUser;
ChkAutoRun.Checked = ryCommon.RyRegedit.IsAutoRun(Soft_Info.Soft_Id, "\"" + Application.ExecutablePath.Replace("/", "\\") + "\" "+ Soft_Info.Soft_Pram);
}
private void CbbMouseKeyShow_SelectedIndexChanged(object sender, EventArgs e)
{
}
private void ChkMouseKey_CheckedChanged(object sender, EventArgs e)
{
CbbMouseKeyShow.Enabled = ChkMouseKey.Checked;
}
}
}

View File

@ -99,7 +99,6 @@
this.IconViewEx1.MultiSelect = false;
this.IconViewEx1.Name = "IconViewEx1";
this.IconViewEx1.OwnerDraw = true;
this.IconViewEx1.SelectedBackColor = System.Drawing.Color.LightYellow;
this.IconViewEx1.ShowItemToolTips = true;
this.IconViewEx1.Size = new System.Drawing.Size(550, 365);
this.IconViewEx1.TabIndex = 0;
@ -312,7 +311,6 @@
this.TabList_Type.Name = "TabList_Type";
this.TabList_Type.OwnerDraw = true;
this.TabList_Type.Scrollable = false;
this.TabList_Type.SelectedBackColor = System.Drawing.Color.LightSkyBlue;
this.TabList_Type.Size = new System.Drawing.Size(74, 398);
this.TabList_Type.TabIndex = 4;
this.TabList_Type.TileSize = new System.Drawing.Size(80, 28);
@ -347,7 +345,6 @@
this.TabList_Column.Name = "TabList_Column";
this.TabList_Column.OwnerDraw = true;
this.TabList_Column.Scrollable = false;
this.TabList_Column.SelectedBackColor = System.Drawing.Color.LightSkyBlue;
this.TabList_Column.Size = new System.Drawing.Size(519, 29);
this.TabList_Column.TabIndex = 1;
this.TabList_Column.TileSize = new System.Drawing.Size(70, 28);

View File

@ -608,15 +608,15 @@ namespace VSoft
TabList_Column.Items[0].Selected = true;
}
TabList_Column.Focus();
var color = TabList_Column.SelectedBackColor;
TabList_Column.SelectedBackColor = Color.LightYellow;
var color = TabList_Column.SelectedStartBackColor;
TabList_Column.SelectedStartBackColor = Color.LightYellow;
using (var bg = new BackgroundWorker())
{
bg.DoWork += delegate { System.Threading.Thread.Sleep(500); };//180秒后,3分钟
bg.RunWorkerCompleted += delegate {
this.Invoke(new Action(() =>
{
TabList_Column.SelectedBackColor = color;
TabList_Column.SelectedStartBackColor = color;
}));
}; // 线程执行完成后会执行 RunWorkerCompleted 事伯的代码块
bg.RunWorkerAsync();
@ -635,15 +635,15 @@ namespace VSoft
TabList_Type.Items[0].Selected = true;
}
TabList_Type.Focus();
var color = TabList_Type.SelectedBackColor;
TabList_Type.SelectedBackColor = Color.LightYellow;
var color = TabList_Type.SelectedStartBackColor;
TabList_Type.SelectedStartBackColor = Color.LightYellow;
using (var bg = new BackgroundWorker())
{
bg.DoWork += delegate { System.Threading.Thread.Sleep(500); };//180秒后,3分钟
bg.RunWorkerCompleted += delegate {
this.Invoke(new Action(() =>
{
TabList_Type.SelectedBackColor = color;
TabList_Type.SelectedStartBackColor = color;
}));
}; // 线程执行完成后会执行 RunWorkerCompleted 事伯的代码块
bg.RunWorkerAsync();
@ -1076,15 +1076,15 @@ namespace VSoft
}
}
TabList_Column.Focus();
var color = TabList_Column.SelectedBackColor;
TabList_Column.SelectedBackColor = Color.LightYellow;
var color = TabList_Column.SelectedStartBackColor;
TabList_Column.SelectedStartBackColor = Color.LightYellow;
using (var bg = new BackgroundWorker())
{
bg.DoWork += delegate { System.Threading.Thread.Sleep(500); };//180秒后,3分钟
bg.RunWorkerCompleted += delegate {
this.Invoke(new Action(() =>
{
TabList_Column.SelectedBackColor = color;
TabList_Column.SelectedStartBackColor = color;
}));
}; // 线程执行完成后会执行 RunWorkerCompleted 事伯的代码块
bg.RunWorkerAsync();

View File

@ -30,8 +30,6 @@
{
this.components = new System.ComponentModel.Container();
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(FrmVSoft));
this.panelEx1 = new ryControls.PanelEx();
this.LblEmpty = new System.Windows.Forms.Label();
this.MenuList = new System.Windows.Forms.ContextMenuStrip(this.components);
this.ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.toolStripMenuItem2 = new System.Windows.Forms.ToolStripSeparator();
@ -41,7 +39,6 @@
this.ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.toolStripMenuItem1 = new System.Windows.Forms.ToolStripSeparator();
this.ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.rySearch1 = new ryControls.rySearch();
this.BtnAddColumn = new System.Windows.Forms.Button();
this.MenuTabColumn = new System.Windows.Forms.ContextMenuStrip(this.components);
this.ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
@ -65,47 +62,19 @@
this.TabList_Type = new ryControls.TabList();
this.columnHeader2 = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
this.TabList_Column = new ryControls.TabList();
this.rySearch1 = new ryControls.rySearch();
this.panelEx1 = new ryControls.PanelEx();
this.LblEmpty = new System.Windows.Forms.Label();
this.IconViewEx1 = new ryControls.IconViewEx();
this.columnHeader1 = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
this.panelEx1.SuspendLayout();
this.MenuList.SuspendLayout();
this.MenuTabColumn.SuspendLayout();
this.MenuTabType.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit();
this.MenuTray.SuspendLayout();
this.panelEx1.SuspendLayout();
this.SuspendLayout();
//
// panelEx1
//
this.panelEx1.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.panelEx1.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.LblEmpty);
this.panelEx1.Controls.Add(this.IconViewEx1);
this.panelEx1.Location = new System.Drawing.Point(84, 65);
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(626, 448);
this.panelEx1.TabIndex = 1;
this.panelEx1.TileBackColor = System.Drawing.Color.White;
this.panelEx1.Resize += new System.EventHandler(this.panelEx1_Resize);
//
// LblEmpty
//
this.LblEmpty.AutoSize = true;
this.LblEmpty.BackColor = System.Drawing.Color.Transparent;
this.LblEmpty.Font = new System.Drawing.Font("宋体", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.LblEmpty.ForeColor = System.Drawing.Color.Silver;
this.LblEmpty.Location = new System.Drawing.Point(31, 196);
this.LblEmpty.Name = "LblEmpty";
this.LblEmpty.Size = new System.Drawing.Size(456, 19);
this.LblEmpty.TabIndex = 1;
this.LblEmpty.Text = "暂无软件,请右击列表或者直接拖放文件到列表中添加";
this.LblEmpty.Visible = false;
//
// MenuList
//
this.MenuList.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
@ -175,18 +144,6 @@
this.ToolStripMenuItem.Text = "打开软件所在位置";
this.ToolStripMenuItem.Click += new System.EventHandler(this.ToolStripMenuItem_Click);
//
// rySearch1
//
this.rySearch1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(236)))), ((int)(((byte)(239)))), ((int)(((byte)(244)))));
this.rySearch1.BaseColor = System.Drawing.Color.FromArgb(((int)(((byte)(51)))), ((int)(((byte)(76)))), ((int)(((byte)(95)))));
this.rySearch1.EmptyText = "输入名称或拼音即可搜索";
this.rySearch1.Location = new System.Drawing.Point(87, 6);
this.rySearch1.Name = "rySearch1";
this.rySearch1.Size = new System.Drawing.Size(228, 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);
//
// BtnAddColumn
//
this.BtnAddColumn.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
@ -360,14 +317,18 @@
this.TabList_Type.IsDrawGridLines = false;
this.TabList_Type.IsDrawIcon = false;
this.TabList_Type.Location = new System.Drawing.Point(4, 65);
this.TabList_Type.Margin = new System.Windows.Forms.Padding(0);
this.TabList_Type.MultiSelect = false;
this.TabList_Type.Name = "TabList_Type";
this.TabList_Type.OwnerDraw = true;
this.TabList_Type.Scrollable = false;
this.TabList_Type.SelectedBackColor = System.Drawing.Color.LightSkyBlue;
this.TabList_Type.Size = new System.Drawing.Size(74, 445);
this.TabList_Type.SelectedBorderColor = System.Drawing.Color.LightSkyBlue;
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, 445);
this.TabList_Type.TabIndex = 4;
this.TabList_Type.TileSize = new System.Drawing.Size(80, 28);
this.TabList_Type.TileSize = new System.Drawing.Size(77, 28);
this.TabList_Type.UseCompatibleStateImageBehavior = false;
this.TabList_Type.View = System.Windows.Forms.View.Tile;
this.TabList_Type.ItemDrag += new System.Windows.Forms.ItemDragEventHandler(this.TabList_Type_ItemDrag);
@ -395,14 +356,18 @@
this.TabList_Column.IsDrawGridLines = false;
this.TabList_Column.IsDrawIcon = false;
this.TabList_Column.Location = new System.Drawing.Point(87, 34);
this.TabList_Column.Margin = new System.Windows.Forms.Padding(0);
this.TabList_Column.MultiSelect = false;
this.TabList_Column.Name = "TabList_Column";
this.TabList_Column.OwnerDraw = true;
this.TabList_Column.Scrollable = false;
this.TabList_Column.SelectedBackColor = System.Drawing.Color.LightSkyBlue;
this.TabList_Column.SelectedBorderColor = System.Drawing.Color.LightSkyBlue;
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(589, 29);
this.TabList_Column.TabIndex = 1;
this.TabList_Column.TileSize = new System.Drawing.Size(70, 28);
this.TabList_Column.TileSize = new System.Drawing.Size(70, 30);
this.TabList_Column.UseCompatibleStateImageBehavior = false;
this.TabList_Column.View = System.Windows.Forms.View.Tile;
this.TabList_Column.ItemDrag += new System.Windows.Forms.ItemDragEventHandler(this.TabList_Column_ItemDrag);
@ -412,6 +377,51 @@
this.TabList_Column.DragOver += new System.Windows.Forms.DragEventHandler(this.IconViewEx1_DragOver);
this.TabList_Column.KeyDown += new System.Windows.Forms.KeyEventHandler(this.TabList_Column_KeyDown);
//
// rySearch1
//
this.rySearch1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(236)))), ((int)(((byte)(239)))), ((int)(((byte)(244)))));
this.rySearch1.BaseColor = System.Drawing.Color.Teal;
this.rySearch1.ColorGradient = true;
this.rySearch1.EmptyText = "输入名称或拼音即可搜索";
this.rySearch1.Location = new System.Drawing.Point(87, 6);
this.rySearch1.Name = "rySearch1";
this.rySearch1.Size = new System.Drawing.Size(229, 27);
this.rySearch1.TabIndex = 2;
this.rySearch1.UseDefSkin = false;
this.rySearch1.OnSearch += new System.EventHandler(this.rySearch1_OnSearch);
this.rySearch1.KeyDown += new System.Windows.Forms.KeyEventHandler(this.rySearch1_KeyDown);
//
// panelEx1
//
this.panelEx1.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.panelEx1.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.LblEmpty);
this.panelEx1.Controls.Add(this.IconViewEx1);
this.panelEx1.Location = new System.Drawing.Point(84, 65);
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(626, 448);
this.panelEx1.TabIndex = 1;
this.panelEx1.TileBackColor = System.Drawing.Color.White;
this.panelEx1.Resize += new System.EventHandler(this.panelEx1_Resize);
//
// LblEmpty
//
this.LblEmpty.AutoSize = true;
this.LblEmpty.BackColor = System.Drawing.Color.Transparent;
this.LblEmpty.Font = new System.Drawing.Font("宋体", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.LblEmpty.ForeColor = System.Drawing.Color.Silver;
this.LblEmpty.Location = new System.Drawing.Point(31, 196);
this.LblEmpty.Name = "LblEmpty";
this.LblEmpty.Size = new System.Drawing.Size(456, 19);
this.LblEmpty.TabIndex = 1;
this.LblEmpty.Text = "暂无软件,请右击列表或者直接拖放文件到列表中添加";
this.LblEmpty.Visible = false;
//
// IconViewEx1
//
this.IconViewEx1.AllowDrop = true;
@ -423,15 +433,19 @@
this.IconViewEx1.Dock = System.Windows.Forms.DockStyle.Fill;
this.IconViewEx1.HideSelection = false;
this.IconViewEx1.Icon = ((System.Drawing.Image)(resources.GetObject("IconViewEx1.Icon")));
this.IconViewEx1.IconSize = 64;
this.IconViewEx1.IsDrawGridLines = false;
this.IconViewEx1.IsDrawIcon = true;
this.IconViewEx1.Location = new System.Drawing.Point(3, 3);
this.IconViewEx1.MultiSelect = false;
this.IconViewEx1.Name = "IconViewEx1";
this.IconViewEx1.OwnerDraw = true;
this.IconViewEx1.SelectedBackColor = System.Drawing.Color.LightYellow;
this.IconViewEx1.SelectedBorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(229)))), ((int)(((byte)(195)))), ((int)(((byte)(101)))));
this.IconViewEx1.SelectedEndBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(236)))), ((int)(((byte)(181)))));
this.IconViewEx1.SelectedStartBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(251)))), ((int)(((byte)(237)))));
this.IconViewEx1.Size = new System.Drawing.Size(620, 442);
this.IconViewEx1.TabIndex = 0;
this.IconViewEx1.TextHeight = 20;
this.IconViewEx1.TileSize = new System.Drawing.Size(100, 100);
this.IconViewEx1.UseCompatibleStateImageBehavior = false;
this.IconViewEx1.View = System.Windows.Forms.View.Tile;
@ -462,17 +476,17 @@
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
this.Text = "VSoft";
this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.FrmVSoft_FormClosing);
this.FormClosed += new System.Windows.Forms.FormClosedEventHandler(this.FrmVSoft_FormClosed);
this.Load += new System.EventHandler(this.FrmVSoft_Load);
this.Shown += new System.EventHandler(this.FrmVSoft_Shown);
this.ResizeEnd += new System.EventHandler(this.FrmVSoft_ResizeEnd);
this.Resize += new System.EventHandler(this.FrmVSoft_Resize);
this.panelEx1.ResumeLayout(false);
this.panelEx1.PerformLayout();
this.MenuList.ResumeLayout(false);
this.MenuTabColumn.ResumeLayout(false);
this.MenuTabType.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit();
this.MenuTray.ResumeLayout(false);
this.panelEx1.ResumeLayout(false);
this.panelEx1.PerformLayout();
this.ResumeLayout(false);
this.PerformLayout();

View File

@ -20,6 +20,7 @@ namespace VSoft
{
string[] prog_args;
string SQLConnStr = Itrycn_Db.SQLConnStr;
MouseHook mouse = new MouseHook();
public FrmVSoft(string[] args)
{
InitializeComponent();
@ -30,8 +31,48 @@ namespace VSoft
if (!Config.Soft_Info.ShowTray) { notifyIcon1.Visible = false; }
if (!Config.Soft_Info.DonateVisabled) { ToolStripMenuItem.Text = "关于"; }
if (Config.Soft_Info.Soft_Url.Length == 0) { ToolStripMenuItem.PerformClick(); }
notifyIcon1.Icon = Icon;
}
private void FrmVSoft_FormClosed(object sender, FormClosedEventArgs e)
{
mouse.Stop();
}
DateTime dt_lastMouse = DateTime.Now;
int clickcount = 1;
private void Mouse_OnMouseActivity(object sender, MouseEventArgs e)
{
if (!Soft_Config.ShowMainMouseKeyOn) { return; }
var button = MouseButtons.Middle;
if(Soft_Config.ShowMainMouseKey==1)
{
button = MouseButtons.XButton1;
}
else if (Soft_Config.ShowMainMouseKey == 2)
{
button = MouseButtons.XButton2;
}
if (e.Button== button)
{
if(Math.Abs((dt_lastMouse-DateTime.Now).TotalMilliseconds)<500)
{
clickcount++;
if (clickcount == 2)
{
ShowOrHideUI();
}
clickcount = 1;
}
else
{
clickcount = 1;
}
dt_lastMouse = DateTime.Now;
}
// MessageBox.Show(e.Button.ToString());
// e.Button == MouseButtons.Middle;
}
private bool IsProcUse = false;
private void LoadDb()
{
@ -192,6 +233,8 @@ namespace VSoft
}
LiveUpdate.RyUpdate update = new LiveUpdate.RyUpdate(Soft_Info.Update_Url);
update.CheckUpdate();
mouse.OnMouseActivity += Mouse_OnMouseActivity;
mouse.Start();
}
private void Hotkey_OnHotkey(int HotKeyID)
@ -199,23 +242,29 @@ namespace VSoft
switch (HotKeyID)
{
case 100:
if (this.Visible && RyForm.GetActiveWindow()==Handle)
{
this.Hide();
}
else
{
ToolStripMenuItem.PerformClick();
this.BringToFront();
this.Select();
this.Focus();
RyForm.BringToTop(Handle);
rySearch1.Focus();
}
ShowOrHideUI();
break;
}
}
/// <summary>
/// 显示或隐藏UI
/// </summary>
private void ShowOrHideUI()
{
if (this.Visible && RyForm.GetActiveWindow() == Handle)
{
this.Hide();
}
else
{
ToolStripMenuItem.PerformClick();
this.BringToFront();
this.Select();
this.Focus();
RyForm.BringToTop(Handle);
rySearch1.Focus();
}
}
protected override void WndProc(ref System.Windows.Forms.Message msg)
{
switch (msg.Msg)
@ -646,15 +695,15 @@ namespace VSoft
TabList_Column.Items[0].Selected = true;
}
TabList_Column.Focus();
var color = TabList_Column.SelectedBackColor;
TabList_Column.SelectedBackColor = Color.LightYellow;
var color = TabList_Column.SelectedStartBackColor;
TabList_Column.SelectedStartBackColor = Color.LightYellow;
using (var bg = new BackgroundWorker())
{
bg.DoWork += delegate { System.Threading.Thread.Sleep(500); };//180秒后,3分钟
bg.RunWorkerCompleted += delegate {
this.Invoke(new Action(() =>
{
TabList_Column.SelectedBackColor = color;
TabList_Column.SelectedStartBackColor = color;
}));
}; // 线程执行完成后会执行 RunWorkerCompleted 事伯的代码块
bg.RunWorkerAsync();
@ -673,15 +722,15 @@ namespace VSoft
TabList_Type.Items[0].Selected = true;
}
TabList_Type.Focus();
var color = TabList_Type.SelectedBackColor;
TabList_Type.SelectedBackColor = Color.LightYellow;
var color = TabList_Type.SelectedStartBackColor;
TabList_Type.SelectedStartBackColor = Color.LightYellow;
using (var bg = new BackgroundWorker())
{
bg.DoWork += delegate { System.Threading.Thread.Sleep(500); };//180秒后,3分钟
bg.RunWorkerCompleted += delegate {
this.Invoke(new Action(() =>
{
TabList_Type.SelectedBackColor = color;
TabList_Type.SelectedStartBackColor = color;
}));
}; // 线程执行完成后会执行 RunWorkerCompleted 事伯的代码块
bg.RunWorkerAsync();
@ -1002,24 +1051,6 @@ namespace VSoft
this.DoDragDrop(e.Item, DragDropEffects.Move);
}
#endregion
private void FrmVSoft_Shown(object sender, EventArgs e)
{
ryCommon.Ini ini = new Ini(VSoft.Config.Soft_Info.UserDataFolder + "\\Win.dat");
ini.WriteIni(VSoft.Config.Soft_Info.Soft_Id, "hwnd", Handle.ToInt32());
var width=ini.ReadIni(VSoft.Config.Soft_Info.Soft_Id, "width",Width);
var height = ini.ReadIni(VSoft.Config.Soft_Info.Soft_Id, "height", Height);
if(width>=400 && height>=200)
{
Width = width;
Height = height;
}
if (prog_args.Length >= 1)
{
//如果是自启动,并且开启了右下角托盘图标,则隐藏自身。
if (prog_args[0] == Soft_Info.Soft_Pram && Soft_Info.ShowTray)
this.Hide();
}
}
private void TabList_Type_SelectedIndexChanged(object sender, EventArgs e)
{
if (IsProcUse) { return; }
@ -1103,14 +1134,18 @@ namespace VSoft
frm.Dispose();
hotkey.Enabled = true;
}
int hideCount = 0;
private void FrmVSoft_FormClosing(object sender, FormClosingEventArgs e)
{
if (Soft_Info.ShowTray && Soft_Config.HideByCloseBtn && e.CloseReason == CloseReason.UserClosing)
{
e.Cancel = true;
this.Hide();
notifyIcon1.ShowBalloonTip(3000, Soft_Info.Soft_Title, "软件已经最小化到此处,请右击托盘图标进行关闭。", ToolTipIcon.Info);
hideCount++;
if (hideCount <= 2)
{
notifyIcon1.ShowBalloonTip(3000, Soft_Info.Soft_Title, "软件已经最小化到此处,请右击托盘图标进行关闭。", ToolTipIcon.Info);
}
return;
}
}
@ -1170,15 +1205,15 @@ namespace VSoft
}
}
TabList_Column.Focus();
var color = TabList_Column.SelectedBackColor;
TabList_Column.SelectedBackColor = Color.LightYellow;
var color = TabList_Column.SelectedStartBackColor;
TabList_Column.SelectedStartBackColor = Color.LightYellow;
using (var bg = new BackgroundWorker())
{
bg.DoWork += delegate { System.Threading.Thread.Sleep(500); };//180秒后,3分钟
bg.RunWorkerCompleted += delegate {
this.Invoke(new Action(() =>
{
TabList_Column.SelectedBackColor = color;
TabList_Column.SelectedStartBackColor = color;
}));
}; // 线程执行完成后会执行 RunWorkerCompleted 事伯的代码块
bg.RunWorkerAsync();

View File

@ -140,42 +140,6 @@
xAAADsQBlSsOGwAAAIpJREFUOE/tktEGxDAQRef/v6NLly5dQpfQtSXkixJJHu661R36NC/70NJhiDnH
mImRv0SMESEELJ8F73mG9x6vacKGTS6ErbVdOudUsLiwM4s55zX5fo6jChYXjvUTUkqoteIxDCpYXLgT
BSZhKQX3vlfB4sIP4U4ci50Jb12ngsUPENcdnPsORL5USPZgYQ6cHAAAAABJRU5ErkJggg==
</value>
</data>
<data name="IconViewEx1.Icon" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAAIAAAACACAYAAADDPmHLAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAL
EwAACxMBAJqcGAAABvRJREFUeF7tnE2IHEUUxwcjIjkE1JMREnMWD7phd7uzfuBJEPSkd0+55BLQc9ds
ooIXT+bix8kgbtSYgxA1hsWLImLAPYTEXBRUNGiMEojpnpTvdWpIT2/Nm+6e7uqerv+DH0tPVfVs7/t1
ffTHDopEoPS9QTQ6FKrkbKjiC/TzCqFBp6CcpLk5G6h4GK7rYKD0HSaF1WL5iN4XqOR4ECU3cl8GFoAg
ii8eWNePmXQWjyWld4ZRcox2kuR3ChYPOonfeVLpu0165TgQ6d3UlWzZdgQWF+oNvufcmjTbIzyq99KZ
/6ttB6AHUG5XlX7QpHsyVpTeRZUubWsEegUNBz9yrk3abwdN9D62NQD9gyQ4adJ+K2hs2G+rCPpLEOll
k/707D9jqwR6zZdp8pde0fdbCoEHrCm9ZxAMRwdthaD/UO5fxuTPbz4fhCo+ZykAXhBvkQDJH9sLgCdc
5iHgpqUAeADnnnsAayHwAwjgORDAcyCA50AAz4EAngMBPAcCeA4E8BwI4DkQwHM6IUCgkquBijcXjh68
MNORHiD+On08acEiWNdPkLzX7Me0GECAOYMkeISO4a/tx7QYQIAagiR4mI5jISXopAC0raxjbhcYJs+b
X3MiWAIaDv62H1936aQA9Ic8Ya/XPqvD0WHza26LVaUfpTr/5tt0GQhQkrwA+bduV9f1CtVbGAkgQEny
AtBS8PRDSt9lNtNgCRZldQABSpIXgD+zSbCi9FoYJdfz7bsGBCiJTQCGJaDh4E7z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w0mvfTT4bCAFE3AlgezeAt5ueB0AAEXcCMNlVAT8O5mIpCAFE3ArA8PLP5dVACCDiXgDX
QAARCNAWEMAREEAEArQFBHAEBBCBAG3RSQFoWwUq3uwT4XAUmcNLAwJMMCmADwEBJoAAbQEBWgoIkIEm
SFdt42afCaPkH9vfwjUd6QFAW0AAz4EAngMBPAcCeA4E8BwI4DkQwHMggOdAAM+BAJ4DATyHn77501YA
vOAy9QDxlqUAeEF8bhBEyWl7Ieg71PufpCFg9JKtEPSfYDg6OFhTeo+tEPSf5Vf1fbceT1LJF7YKoL/Q
0H8mTT7HgUjvt1UC/YVzbtJ/K8Io+dBWEfQP6vE/Mmm/HWuv6Xuo8FK+MugXgYrPryi9y6R9MsKjei/Z
8ZutIegFvwRH9QMm3fagsWE3Lg71kXiLc2vSLMeS0jup0VvbdwIWkITmd8c4pya9xSNU+nHaAeYFCwgt
827QcH58+YjeZ9JZMTb0jnBdBzR5GKZvtKj4An3BlfwXgtahnMQXeH0fRKNDPKk3GRRiMPgf0ROZOwlS
7NsAAAAASUVORK5CYII=
</value>
</data>
<data name="BtnAddColumn.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
@ -229,6 +193,42 @@
<metadata name="MenuTray.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>690, 17</value>
</metadata>
<data name="IconViewEx1.Icon" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAAIAAAACACAYAAADDPmHLAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAL
EwAACxMBAJqcGAAABvRJREFUeF7tnE2IHEUUxwcjIjkE1JMREnMWD7phd7uzfuBJEPSkd0+55BLQc9ds
ooIXT+bix8kgbtSYgxA1hsWLImLAPYTEXBRUNGiMEojpnpTvdWpIT2/Nm+6e7uqerv+DH0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S0jup0VvbdwIWkITmd8c4pya9xSNU+nHaAeYFCwgt
827QcH58+YjeZ9JZMTb0jnBdBzR5GKZvtKj4An3BlfwXgtahnMQXeH0fRKNDPKk3GRRiMPgf0ROZOwlS
7NsAAAAASUVORK5CYII=
</value>
</data>
<data name="$this.Icon" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
AAABAAEAICAAAAEAIACoEAAAFgAAACgAAAAgAAAAQAAAAAEAIAAAAAAAABAAACMuAAAjLgAAAAAAAAAA

View File

@ -124,9 +124,11 @@ namespace ryControls
private void DrawText(DrawListViewItemEventArgs e, Graphics g, Rectangle r, int paddingHeight)
{
TextFormatFlags flags = GetFormatFlags(HorizontalAlignment.Center);
var r1 = new Rectangle(r.Location,r.Size);
r1.Y=r.Y+ paddingHeight+2;//重绘图标时,文本右移
r1.Height = r.Height - paddingHeight - 2;
var r1 = new Rectangle(r.Location, r.Size)
{
Y = r.Y + paddingHeight + 2,//重绘图标时,文本右移
Height = r.Height - paddingHeight - 2
};
TextRenderer.DrawText(
g,
e.Item.Text,

View File

@ -0,0 +1,37 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows.Forms;
namespace VSoft.Prams
{
public delegate void MouseMovedEvent();
public delegate void MouseMDownEvent();
public delegate void MouseMUpEvent();
public class GlobalMouseHandler : IMessageFilter
{
private const int WM_MOUSEMOVE = 0x0200;
private const int WM_MBUTTONDOWN = 0x0207;
private const int WM_MBUTTONUP = 0x0208;
public event MouseMovedEvent TheMouseMoved;
public event MouseMDownEvent TheMouseMDown;
public event MouseMUpEvent TheMouseMUp;
#region IMessageFilter Members
public bool PreFilterMessage(ref Message m)
{
if (m.Msg == WM_MOUSEMOVE)
if (TheMouseMoved != null)
TheMouseMoved();
if (m.Msg == WM_MBUTTONDOWN)
if (TheMouseMDown != null)
TheMouseMDown();
if (m.Msg == WM_MBUTTONUP)
if (TheMouseMUp != null)
TheMouseMUp();
// Always allow message to continue to the next filter control
return false;
}
#endregion
}
}

View File

@ -0,0 +1,207 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.InteropServices;
using System.Text;
using System.Windows.Forms;
namespace VSoft.Prams
{
/// <summary>
/// 鼠标全局钩子
/// </summary>
public class MouseHook
{
private const int WM_MOUSEMOVE = 0x200;
private const int WM_LBUTTONDOWN = 0x201;
private const int WM_RBUTTONDOWN = 0x204;
private const int WM_MBUTTONDOWN = 0x207;
private const int WM_LBUTTONUP = 0x202;
private const int WM_RBUTTONUP = 0x205;
private const int WM_MBUTTONUP = 0x208;
private const int WM_XBUTTON1 = 0x20B;
private const int WM_XBUTTON2 = 0x20C;
private const int WM_LBUTTONDBLCLK = 0x203;
private const int WM_RBUTTONDBLCLK = 0x206;
private const int WM_MBUTTONDBLCLK = 0x209;
/// <summary>
/// 点
/// </summary>
[StructLayout(LayoutKind.Sequential)]
public class POINT
{
public int x;
public int y;
}
/// <summary>
/// 钩子结构体
/// </summary>
[StructLayout(LayoutKind.Sequential)]
public class MouseHookStruct
{
public POINT pt;
public int hWnd;
public int wHitTestCode;
public int dwExtraInfo;
}
public const int WH_MOUSE_LL = 14; // mouse hook constant
// 装置钩子的函数
[DllImport("user32.dll", CharSet = CharSet.Auto, CallingConvention = CallingConvention.StdCall)]
public static extern int SetWindowsHookEx(int idHook, HookProc lpfn, IntPtr hInstance, int threadId);
// 卸下钩子的函数
[DllImport("user32.dll", CharSet = CharSet.Auto, CallingConvention = CallingConvention.StdCall)]
public static extern bool UnhookWindowsHookEx(int idHook);
// 下一个钩挂的函数
[DllImport("user32.dll", CharSet = CharSet.Auto, CallingConvention = CallingConvention.StdCall)]
public static extern int CallNextHookEx(int idHook, int nCode, Int32 wParam, IntPtr lParam);
[DllImport("kernel32.dll", CharSet = CharSet.Auto, SetLastError = true)]
private static extern IntPtr GetModuleHandle(string lpModuleName);
// 全局的鼠标事件
public event MouseEventHandler OnMouseActivity;
// 钩子回调函数
public delegate int HookProc(int nCode, Int32 wParam, IntPtr lParam);
// 声明鼠标钩子事件类型
private HookProc _mouseHookProcedure;
private static int _hMouseHook = 0; // 鼠标钩子句柄
/// <summary>
/// 构造函数
/// </summary>
public MouseHook()
{
}
/// <summary>
/// 析构函数
/// </summary>
~MouseHook()
{
Stop();
}
/// <summary>
/// 启动全局钩子
/// </summary>
public void Start()
{
// 安装鼠标钩子
if (_hMouseHook == 0)
{
// 生成一个HookProc的实例.
_mouseHookProcedure = new HookProc(MouseHookProc);
_hMouseHook = SetWindowsHookEx(WH_MOUSE_LL, _mouseHookProcedure, IntPtr.Zero, 0);
//假设装置失败停止钩子
if (_hMouseHook == 0)
{
Stop();
throw new Exception("SetWindowsHookEx failed.");
}
}
}
/// <summary>
/// 停止全局钩子
/// </summary>
public void Stop()
{
bool retMouse = true;
if (_hMouseHook != 0)
{
retMouse = UnhookWindowsHookEx(_hMouseHook);
_hMouseHook = 0;
}
// 假设卸下钩子失败
//if (!(retMouse))
// throw new Exception("UnhookWindowsHookEx failed.");
}
/// <summary>
/// 鼠标钩子回调函数
/// </summary>
private int MouseHookProc(int nCode, Int32 wParam, IntPtr lParam)
{
// 假设正常执行而且用户要监听鼠标的消息
if ((nCode >= 0) && (OnMouseActivity != null))
{
MouseButtons button = MouseButtons.None;
int clickCount = 0;
switch (wParam)
{
case WM_LBUTTONDOWN:
button = MouseButtons.Left;
clickCount = 1;
break;
case WM_LBUTTONUP:
button = MouseButtons.Left;
clickCount = 1;
break;
case WM_LBUTTONDBLCLK:
button = MouseButtons.Left;
clickCount = 2;
break;
case WM_RBUTTONDOWN:
button = MouseButtons.Right;
clickCount = 1;
break;
case WM_RBUTTONUP:
button = MouseButtons.Right;
clickCount = 1;
break;
case WM_RBUTTONDBLCLK:
button = MouseButtons.Right;
clickCount = 2;
break;
case WM_MBUTTONDOWN:
button = MouseButtons.Middle;
clickCount = 1;
break;
//case WM_MBUTTONUP:
// button = MouseButtons.Middle;
// clickCount = 1;
// break;
case WM_XBUTTON1:
button = MouseButtons.XButton1;
clickCount = 1;
break;
case WM_XBUTTON2:
button = 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);
// 假设想要限制鼠标在屏幕中的移动区域能够在此处设置
// 后期须要考虑实际的x、y的容差
if (!Screen.PrimaryScreen.Bounds.Contains(e.X, e.Y))
{
//return 1;
}
OnMouseActivity(this, e);
}
// 启动下一次钩子
return CallNextHookEx(_hMouseHook, nCode, wParam, lParam);
}
}
}

View File

@ -4,13 +4,13 @@ using System.Collections.Generic;
using System.Drawing;
using System.Linq;
using System.Text;
using ryControls.Interface;
namespace VSoft.Prams
{
/// <summary>
/// 软件信息
/// </summary>
public class SoftInfo
public class SoftInfo: IItemInfo
{
/// <summary>
/// id

View File

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

View File

@ -1,5 +1,6 @@
using System.ComponentModel;
using System.Drawing;
using System.Drawing.Drawing2D;
using System.Windows.Forms;
namespace ryControls
@ -92,17 +93,71 @@ namespace ryControls
this.DrawText(e, g, r);
}
}
private Color _SelectedBackColor = Color.LightSkyBlue;
[Description("选择项的背景颜色")]
public Color SelectedBackColor
private Color _SelectedStartBackColor = Color.LightSkyBlue;
/// <summary>
/// 选择项的背景开始颜色
/// </summary>
[Description("选择项的背景开始颜色")]
public Color SelectedStartBackColor
{
get
{
return _SelectedBackColor;
return _SelectedStartBackColor;
}
set
{
_SelectedBackColor = value;
_SelectedStartBackColor = value;
this.Refresh();
}
}
private Color _SelectedEndBackColor = Color.FromArgb(255, 236, 181);
/// <summary>
/// 选择项的背景结束颜色
/// </summary>
[Description("选择项的背景结束颜色")]
public Color SelectedEndBackColor
{
get
{
return _SelectedEndBackColor;
}
set
{
_SelectedEndBackColor = value;
this.Refresh();
}
}
private Color _SelectedBorderColor = Color.FromArgb(229, 195, 101);
/// <summary>
/// 选择项的边框颜色
/// </summary>
[Description("选择项的边框颜色")]
public Color SelectedBorderColor
{
get
{
return _SelectedBorderColor;
}
set
{
_SelectedBorderColor = value;
this.Refresh();
}
}
private Color _SelectedForeColor = Color.Black;
/// <summary>
/// 选择项的字体颜色
/// </summary>
[Description("选择项的字体颜色")]
public Color SelectedForeColor
{
get
{
return _SelectedForeColor;
}
set
{
_SelectedForeColor = value;
this.Refresh();
}
}
@ -113,10 +168,24 @@ namespace ryControls
{
if (e.Item.Selected)
{
using (SolidBrush brush = new SolidBrush(_SelectedBackColor))
{
g.FillRectangle(brush, r);
}
//渐变画刷
LinearGradientBrush brush = new LinearGradientBrush(e.Bounds, _SelectedStartBackColor,
_SelectedEndBackColor, LinearGradientMode.Vertical);
//填充区域
//Rectangle borderRect = new Rectangle(r, e.Bounds.Y, e.Bounds.Width - 5, e.Bounds.Height - 2);
e.Graphics.FillRectangle(brush, r);
brush.Dispose();
////画边框
Pen pen = new Pen(_SelectedBorderColor);
Rectangle borderRect = r;
borderRect.Width--;
borderRect.Height--;
e.Graphics.DrawRectangle(pen, borderRect);
pen.Dispose();
//using (SolidBrush brush = new SolidBrush(_SelectedBackColor))
//{
// g.FillRectangle(brush, r);
//}
}
}
@ -156,7 +225,7 @@ namespace ryControls
e.Item.Text,
e.Item.Font,
r,
e.Item.ForeColor,
e.Item.Selected?SelectedForeColor: e.Item.ForeColor,
flags);
}

View File

@ -41,13 +41,13 @@
</Reference>
<Reference Include="Newtonsoft.Json, Version=6.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\..\..\C#\私人代码\QO流程管理\Bin\Debug\RySpider\Newtonsoft.Json.dll</HintPath>
<HintPath>..\..\Bin\Debug\VSoft\Newtonsoft.Json.dll</HintPath>
</Reference>
<Reference Include="ryControls">
<HintPath>..\..\Bin\Debug\VSoft\ryControls.dll</HintPath>
</Reference>
<Reference Include="ryUpdate">
<HintPath>..\..\..\..\..\公共代码\C#\公用控件组\Bin\Debug\CommonControls\.NET4\ryUpdate.dll</HintPath>
<HintPath>..\..\Bin\Debug\VSoft\ryUpdate.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Core" />
@ -106,14 +106,13 @@
</Compile>
<Compile Include="Config\Soft_Info.cs" />
<Compile Include="Prams\c_icon_of_path.cs" />
<Compile Include="Prams\GlobalMouseHandler.cs" />
<Compile Include="Prams\Json.cs" />
<Compile Include="Prams\MouseHook.cs" />
<Compile Include="Prams\Run.cs" />
<Compile Include="TabList.cs">
<SubType>Component</SubType>
</Compile>
<Compile Include="IconViewEx.cs">
<SubType>Component</SubType>
</Compile>
<Compile Include="Prams\API.cs" />
<Compile Include="Prams\FileIcon.cs" />
<Compile Include="Prams\IImageList.cs" />
@ -154,9 +153,6 @@
<EmbeddedResource Include="TabList.resx">
<DependentUpon>TabList.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="IconViewEx.resx">
<DependentUpon>IconViewEx.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Properties\Resources.resx">
<Generator>ResXFileCodeGenerator</Generator>
<LastGenOutput>Resources.Designer.cs</LastGenOutput>