### 2021-09-07更新
------ #### VSoft V1.0.2109.0701 - *.[新增]新增支持设置软件全局快捷键。
This commit is contained in:
parent
64e190aa7b
commit
150b39ca18
Binary file not shown.
File diff suppressed because it is too large
Load Diff
Binary file not shown.
Binary file not shown.
BIN
Bin/Debug/VSoft/UserDb/SoftLogos/20210907135620.exe
Normal file
BIN
Bin/Debug/VSoft/UserDb/SoftLogos/20210907135620.exe
Normal file
Binary file not shown.
Binary file not shown.
|
@ -1,5 +1,5 @@
|
|||
[VSoft]
|
||||
hwnd=1775930
|
||||
hwnd=1446336
|
||||
width=745
|
||||
height=543
|
||||
[VSoft_Test]
|
||||
|
|
Binary file not shown.
Binary file not shown.
|
@ -1,3 +1,3 @@
|
|||
<root>
|
||||
<list id="LastUpdateTime" Value="2021/7/5 21:41:10" />
|
||||
<list id="LastUpdateTime" Value="2021/9/7 13:56:03" />
|
||||
</root>
|
Binary file not shown.
File diff suppressed because it is too large
Load Diff
Binary file not shown.
|
@ -1,4 +1,9 @@
|
|||
### 2021-07-05更新
|
||||
### 2021-09-07更新
|
||||
------
|
||||
#### VSoft V1.0.2109.0701
|
||||
- *.[新增]新增支持设置软件全局快捷键。
|
||||
|
||||
### 2021-07-05更新
|
||||
------
|
||||
#### VSoft V1.0.2107.0501
|
||||
- *.[新增]新增适配原生64位系统。
|
||||
|
|
Binary file not shown.
BIN
Source/.vs/VSoft/v17/.suo
Normal file
BIN
Source/.vs/VSoft/v17/.suo
Normal file
Binary file not shown.
|
@ -8,19 +8,21 @@
|
|||
<OutputType>WinExe</OutputType>
|
||||
<RootNamespace>DyLine</RootNamespace>
|
||||
<AssemblyName>DyLine</AssemblyName>
|
||||
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
|
||||
<TargetFrameworkVersion>v4.5.2</TargetFrameworkVersion>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
<Deterministic>true</Deterministic>
|
||||
<TargetFrameworkProfile />
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<PlatformTarget>x86</PlatformTarget>
|
||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>..\..\Bin\Debug\VSoft\</OutputPath>
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
<DefineConstants>DEBUG;TRACE;DY</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<Prefer32Bit>false</Prefer32Bit>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||
|
@ -30,6 +32,7 @@
|
|||
<DefineConstants>TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<Prefer32Bit>false</Prefer32Bit>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="System" />
|
||||
|
@ -45,18 +48,9 @@
|
|||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="clsMsg.cs" />
|
||||
<Compile Include="Form1.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Form1.Designer.cs">
|
||||
<DependentUpon>Form1.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Program.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
<Compile Include="ryMemoryShare.cs" />
|
||||
<EmbeddedResource Include="Form1.resx">
|
||||
<DependentUpon>Form1.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Properties\Resources.resx">
|
||||
<Generator>ResXFileCodeGenerator</Generator>
|
||||
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
|
||||
|
@ -65,7 +59,9 @@
|
|||
<Compile Include="Properties\Resources.Designer.cs">
|
||||
<AutoGen>True</AutoGen>
|
||||
<DependentUpon>Resources.resx</DependentUpon>
|
||||
<DesignTime>True</DesignTime>
|
||||
</Compile>
|
||||
<None Include="app.config" />
|
||||
<None Include="Properties\Settings.settings">
|
||||
<Generator>SettingsSingleFileGenerator</Generator>
|
||||
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
|
||||
|
|
48
Source/DyLine/Form1.Designer.cs
generated
48
Source/DyLine/Form1.Designer.cs
generated
|
@ -1,48 +0,0 @@
|
|||
|
||||
namespace DyLine
|
||||
{
|
||||
partial class Form1
|
||||
{
|
||||
/// <summary>
|
||||
/// 必需的设计器变量。
|
||||
/// </summary>
|
||||
private System.ComponentModel.IContainer components = null;
|
||||
|
||||
/// <summary>
|
||||
/// 清理所有正在使用的资源。
|
||||
/// </summary>
|
||||
/// <param name="disposing">如果应释放托管资源,为 true;否则为 false。</param>
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
if (disposing && (components != null))
|
||||
{
|
||||
components.Dispose();
|
||||
}
|
||||
base.Dispose(disposing);
|
||||
}
|
||||
|
||||
#region Windows 窗体设计器生成的代码
|
||||
|
||||
/// <summary>
|
||||
/// 设计器支持所需的方法 - 不要修改
|
||||
/// 使用代码编辑器修改此方法的内容。
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// Form1
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.ClientSize = new System.Drawing.Size(251, 125);
|
||||
this.Name = "Form1";
|
||||
this.Text = "Form1";
|
||||
this.ResumeLayout(false);
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
|
|
@ -1,19 +0,0 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Data;
|
||||
using System.Drawing;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace DyLine
|
||||
{
|
||||
public partial class Form1 : Form
|
||||
{
|
||||
public Form1()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,120 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
</root>
|
|
@ -10,7 +10,7 @@ using System.Runtime.InteropServices;
|
|||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyCompany("")]
|
||||
[assembly: AssemblyProduct("DyLine")]
|
||||
[assembly: AssemblyCopyright("Copyright © 2020")]
|
||||
[assembly: AssemblyCopyright("Copyright © 2021")]
|
||||
[assembly: AssemblyTrademark("")]
|
||||
[assembly: AssemblyCulture("")]
|
||||
|
||||
|
@ -32,5 +32,5 @@ using System.Runtime.InteropServices;
|
|||
//可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值
|
||||
//通过使用 "*",如下所示:
|
||||
// [assembly: AssemblyVersion("1.0.*")]
|
||||
[assembly: AssemblyVersion("1.0.0.0")]
|
||||
[assembly: AssemblyFileVersion("1.0.0.0")]
|
||||
[assembly: AssemblyVersion("2.0.0.0")]
|
||||
[assembly: AssemblyFileVersion("2.0.0.0")]
|
||||
|
|
43
Source/DyLine/Properties/Resources.Designer.cs
generated
43
Source/DyLine/Properties/Resources.Designer.cs
generated
|
@ -1,48 +1,44 @@
|
|||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// 此代码由工具生成。
|
||||
// 运行时版本: 4.0.30319.42000
|
||||
// 运行时版本:4.0.30319.42000
|
||||
//
|
||||
// 对此文件的更改可能导致不正确的行为,如果
|
||||
// 重新生成代码,则所做更改将丢失。
|
||||
// 对此文件的更改可能会导致不正确的行为,并且如果
|
||||
// 重新生成代码,这些更改将会丢失。
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace DyLine.Properties {
|
||||
using System;
|
||||
|
||||
|
||||
namespace DyLine.Properties
|
||||
{
|
||||
/// <summary>
|
||||
/// 强类型资源类,用于查找本地化字符串等。
|
||||
/// 一个强类型的资源类,用于查找本地化的字符串等。
|
||||
/// </summary>
|
||||
// 此类是由 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() {
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 返回此类使用的缓存 ResourceManager 实例。
|
||||
/// 返回此类使用的缓存的 ResourceManager 实例。
|
||||
/// </summary>
|
||||
[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("DyLine.Properties.Resources", typeof(Resources).Assembly);
|
||||
resourceMan = temp;
|
||||
}
|
||||
|
@ -55,14 +51,11 @@ namespace DyLine.Properties
|
|||
/// 使用此强类型资源类的所有资源查找执行重写。
|
||||
/// </summary>
|
||||
[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;
|
||||
}
|
||||
}
|
||||
|
|
23
Source/DyLine/Properties/Settings.Designer.cs
generated
23
Source/DyLine/Properties/Settings.Designer.cs
generated
|
@ -1,27 +1,24 @@
|
|||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// 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.
|
||||
// 对此文件的更改可能会导致不正确的行为,并且如果
|
||||
// 重新生成代码,这些更改将会丢失。
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace DyLine.Properties {
|
||||
|
||||
|
||||
namespace DyLine.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.0.2.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;
|
||||
}
|
||||
}
|
||||
|
|
3
Source/DyLine/app.config
Normal file
3
Source/DyLine/app.config
Normal file
|
@ -0,0 +1,3 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<configuration>
|
||||
<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5.2"/></startup></configuration>
|
29
Source/VSoftBox/Init.cs
Normal file
29
Source/VSoftBox/Init.cs
Normal file
|
@ -0,0 +1,29 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Windows.Forms;
|
||||
using VSoft.Config;
|
||||
|
||||
namespace VSoftBox
|
||||
{
|
||||
class Init
|
||||
{
|
||||
static System.Threading.Mutex run;
|
||||
public static void Show(string[] args)
|
||||
{
|
||||
Soft_Info.UserDataFolder = ryCommon.RyFiles.GetRealPath(Soft_Info.UserDataFolder);
|
||||
run = new System.Threading.Mutex(true, Soft_Info.Soft_Id, out bool runone);
|
||||
if (!runone) //已经运行了
|
||||
{
|
||||
ryCommon.Ini ini = new ryCommon.Ini(Soft_Info.UserDataFolder + "\\Win.dat");
|
||||
ryControls.Win32.SendMessage((IntPtr)ini.ReadIni(Soft_Info.Soft_Id, "hwnd", 0), 17189, 100, 100);
|
||||
}
|
||||
else
|
||||
{
|
||||
Application.Run(new VSoft.FrmVSoft(args));
|
||||
//Application.Run(new WindowsFormsApp2.Form1());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -18,7 +18,6 @@ namespace VSoftBox
|
|||
static string ProcessPath;
|
||||
#endif
|
||||
|
||||
static System.Threading.Mutex run;
|
||||
/// <summary>
|
||||
/// 应用程序的主入口点。
|
||||
/// </summary>
|
||||
|
@ -31,22 +30,12 @@ namespace VSoftBox
|
|||
{
|
||||
ProcessPath = Application.StartupPath.Substring(0, Application.StartupPath.Length - sub_dir.Length);
|
||||
AppDomain.CurrentDomain.AssemblyResolve += CurrentDomain_AssemblyResolve;
|
||||
Soft_Info.UserDataFolder = ProcessPath+"\\UserDb\\VSoft";
|
||||
}
|
||||
#endif
|
||||
Application.EnableVisualStyles();
|
||||
Application.SetCompatibleTextRenderingDefault(false);
|
||||
Soft_Info.UserDataFolder = ryCommon.RyFiles.GetRealPath(Soft_Info.UserDataFolder);
|
||||
run = new System.Threading.Mutex(true, Soft_Info.Soft_Id, out bool runone);
|
||||
if (!runone) //已经运行了
|
||||
{
|
||||
ryCommon.Ini ini = new ryCommon.Ini(Soft_Info.UserDataFolder + "\\Win.dat");
|
||||
ryControls.Win32.SendMessage((IntPtr)ini.ReadIni(Soft_Info.Soft_Id, "hwnd", 0), 17189, 100, 100);
|
||||
}
|
||||
else
|
||||
{
|
||||
Application.Run(new VSoft.FrmVSoft(args));
|
||||
//Application.Run(new WindowsFormsApp2.Form1());
|
||||
}
|
||||
Init.Show(args);
|
||||
}
|
||||
#if DY
|
||||
static Assembly CurrentDomain_AssemblyResolve(object sender, ResolveEventArgs args)
|
||||
|
|
|
@ -32,5 +32,5 @@ using System.Runtime.InteropServices;
|
|||
//可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值
|
||||
//通过使用 "*",如下所示:
|
||||
// [assembly: AssemblyVersion("1.0.*")]
|
||||
[assembly: AssemblyVersion("1.0.2107.0501")]
|
||||
[assembly: AssemblyFileVersion("1.0.2107.0501")]
|
||||
[assembly: AssemblyVersion("1.0.2109.0701")]
|
||||
[assembly: AssemblyFileVersion("1.0.2109.0701")]
|
|
@ -18,7 +18,7 @@
|
|||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>..\..\Bin\Debug\VSoft\</OutputPath>
|
||||
<DefineConstants>TRACE;DEBUG</DefineConstants>
|
||||
<DefineConstants>TRACE;DEBUG;DY</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
|
@ -55,6 +55,7 @@
|
|||
<Reference Include="System.Xml" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="Init.cs" />
|
||||
<Compile Include="Program.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
<EmbeddedResource Include="Properties\Resources.resx">
|
||||
|
|
|
@ -39,6 +39,13 @@ namespace VSoft.Config
|
|||
/// 启动软件后隐藏自身
|
||||
/// </summary>
|
||||
public static bool HideAfterRun = true;
|
||||
/// <summary>
|
||||
/// 当前软件加载的热键列表
|
||||
/// </summary>
|
||||
public static List<HotKeyItem> HotKeyList = new List<HotKeyItem>();
|
||||
/// <summary>
|
||||
/// 获取设置
|
||||
/// </summary>
|
||||
public static void LoadSetting()
|
||||
{
|
||||
ryCommon.Storage Stor = new Storage();
|
||||
|
@ -51,5 +58,69 @@ namespace VSoft.Config
|
|||
ShowMainMouseKey = Stor.GetAttrValue("ShowMainMouseKey", 0);
|
||||
//low_count = Stor.GetAttrValue("LowCount", 10);
|
||||
}
|
||||
/// <summary>
|
||||
/// 设置热键到列表中
|
||||
/// </summary>
|
||||
/// <param name="id"></param>
|
||||
/// <param name="name"></param>
|
||||
/// <param name="hotkey"></param>
|
||||
/// <returns>返回热键在列表中的位置</returns>
|
||||
public static int SetHotKeyList(string id,string name,string hotkey)
|
||||
{
|
||||
var index= HotKeyList.FindIndex(a => a.ID == id);
|
||||
if(index!=-1)
|
||||
{
|
||||
HotKeyList[index].Name = name;
|
||||
HotKeyList[index].HotKey = hotkey;
|
||||
return index;
|
||||
}
|
||||
else
|
||||
{
|
||||
HotKeyList.Add(new HotKeyItem() { ID=id, Name=name, HotKey=hotkey });
|
||||
return HotKeyList.Count - 1;
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// 从列表中删除热键
|
||||
/// </summary>
|
||||
/// <param name="id"></param>
|
||||
/// <returns>返回热键在原来列表中的位置</returns>
|
||||
public static int RemoveHotKeyList(string id)
|
||||
{
|
||||
var index = HotKeyList.FindIndex(a => a.ID == id);
|
||||
if (index != -1)
|
||||
{
|
||||
HotKeyList.RemoveAt(index);
|
||||
|
||||
}
|
||||
return index;
|
||||
}
|
||||
/// <summary>
|
||||
/// 在列表中查找热键是否已存在
|
||||
/// </summary>
|
||||
/// <param name="hotkey"></param>
|
||||
/// <returns>返回热键在原来列表中的位置</returns>
|
||||
public static int IsHotKeyExistInList(string hotkey)
|
||||
{
|
||||
var index = HotKeyList.FindIndex(a => a.HotKey == hotkey);
|
||||
return index;
|
||||
}
|
||||
|
||||
}
|
||||
public class HotKeyItem
|
||||
{
|
||||
/// <summary>
|
||||
/// ID
|
||||
/// </summary>
|
||||
public string ID { get; set; } = "";
|
||||
/// <summary>
|
||||
/// 热键名称
|
||||
/// </summary>
|
||||
public string Name { get; set; } = "";
|
||||
/// <summary>
|
||||
/// 热键
|
||||
/// </summary>
|
||||
public string HotKey { get; set; } = "";
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
using ryCommon;
|
||||
using ryCommonDb;
|
||||
using ryControls;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
@ -8,6 +9,7 @@ using System.Drawing;
|
|||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Windows.Forms;
|
||||
using VSoft.Prams;
|
||||
|
||||
namespace VSoft.Config
|
||||
{
|
||||
|
@ -29,6 +31,26 @@ namespace VSoft.Config
|
|||
|
||||
private void BtnOK_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (hotkeyTextBox1.HaveHotKey)
|
||||
{
|
||||
IDbInterface db = Itrycn_Db.CreateDataProvider(Itrycn_Db.dataType);
|
||||
if (db.ConnDb(Itrycn_Db.SQLConnStr) == 1)
|
||||
{
|
||||
var ds = db.ReadData("select * from Softs where Hotkey='" + hotkeyTextBox1.HotKey + "' limit 1");
|
||||
if (ds.HaveData())
|
||||
{
|
||||
Msg.ShowMsg("当前热键已经存在,请更换热键。", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
|
||||
ds.Dispose(); return;
|
||||
}
|
||||
ds.Dispose();
|
||||
}
|
||||
db.Free();
|
||||
Config.Soft_Config.SetHotKeyList("showmain", "显示主界面", hotkeyTextBox1.HotKey);
|
||||
}
|
||||
else
|
||||
{
|
||||
Config.Soft_Config.RemoveHotKeyList("showmain");
|
||||
}
|
||||
mySetting.Save();
|
||||
ryCommon.RyRegedit.RegRoot = Microsoft.Win32.RegistryHive.CurrentUser;
|
||||
ryCommon.RyRegedit.SetAutoRun(ChkAutoRun.Checked, Soft_Info.Soft_Id, "\"" + Application.ExecutablePath.Replace("/","\\") + "\" "+ Soft_Info.Soft_Pram);
|
||||
|
|
51
Source/VSoft_Dll/FrmAddSoft.Designer.cs
generated
51
Source/VSoft_Dll/FrmAddSoft.Designer.cs
generated
|
@ -43,6 +43,8 @@
|
|||
this.label4 = new System.Windows.Forms.Label();
|
||||
this.chromeTabControl1 = new ryControls.ChromeTabControl();
|
||||
this.tabPage1 = new System.Windows.Forms.TabPage();
|
||||
this.label7 = new System.Windows.Forms.Label();
|
||||
this.hotkeyTextBox1 = new ryControls.HotkeyTextBox();
|
||||
this.ChkRunAsAdmin = new System.Windows.Forms.CheckBox();
|
||||
this.BtnBrowser = new ryControls.ButtonEx();
|
||||
this.TxtStartPath = new ryControls.TextBoxEx2();
|
||||
|
@ -128,7 +130,7 @@
|
|||
this.LblCustomImg.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
|
||||
this.LblCustomImg.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
|
||||
this.LblCustomImg.ForeColor = System.Drawing.Color.DodgerBlue;
|
||||
this.LblCustomImg.Location = new System.Drawing.Point(448, 125);
|
||||
this.LblCustomImg.Location = new System.Drawing.Point(576, 125);
|
||||
this.LblCustomImg.Name = "LblCustomImg";
|
||||
this.LblCustomImg.Size = new System.Drawing.Size(86, 18);
|
||||
this.LblCustomImg.TabIndex = 12;
|
||||
|
@ -151,7 +153,7 @@
|
|||
this.TxtDes.SelectedText = "";
|
||||
this.TxtDes.SelectionLength = 0;
|
||||
this.TxtDes.SelectionStart = 0;
|
||||
this.TxtDes.Size = new System.Drawing.Size(385, 80);
|
||||
this.TxtDes.Size = new System.Drawing.Size(513, 80);
|
||||
this.TxtDes.TabIndex = 11;
|
||||
this.TxtDes.TextAlign = System.Windows.Forms.HorizontalAlignment.Left;
|
||||
this.TxtDes.ToolTip = "";
|
||||
|
@ -181,7 +183,7 @@
|
|||
this.chromeTabControl1.SelectedIndex = 0;
|
||||
this.chromeTabControl1.ShowAddButton = false;
|
||||
this.chromeTabControl1.ShowCloseButton = false;
|
||||
this.chromeTabControl1.Size = new System.Drawing.Size(522, 306);
|
||||
this.chromeTabControl1.Size = new System.Drawing.Size(650, 415);
|
||||
this.chromeTabControl1.SizeMode = System.Windows.Forms.TabSizeMode.Fixed;
|
||||
this.chromeTabControl1.TabContextMenuStrip = null;
|
||||
this.chromeTabControl1.TabIndex = 9;
|
||||
|
@ -189,6 +191,8 @@
|
|||
//
|
||||
// tabPage1
|
||||
//
|
||||
this.tabPage1.Controls.Add(this.label7);
|
||||
this.tabPage1.Controls.Add(this.hotkeyTextBox1);
|
||||
this.tabPage1.Controls.Add(this.ChkRunAsAdmin);
|
||||
this.tabPage1.Controls.Add(this.BtnBrowser);
|
||||
this.tabPage1.Controls.Add(this.TxtStartPath);
|
||||
|
@ -200,11 +204,31 @@
|
|||
this.tabPage1.Location = new System.Drawing.Point(1, 29);
|
||||
this.tabPage1.Name = "tabPage1";
|
||||
this.tabPage1.Padding = new System.Windows.Forms.Padding(3);
|
||||
this.tabPage1.Size = new System.Drawing.Size(520, 276);
|
||||
this.tabPage1.Size = new System.Drawing.Size(648, 385);
|
||||
this.tabPage1.TabIndex = 0;
|
||||
this.tabPage1.Text = "运行";
|
||||
this.tabPage1.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// label7
|
||||
//
|
||||
this.label7.AutoSize = true;
|
||||
this.label7.Location = new System.Drawing.Point(6, 153);
|
||||
this.label7.Name = "label7";
|
||||
this.label7.Size = new System.Drawing.Size(53, 12);
|
||||
this.label7.TabIndex = 11;
|
||||
this.label7.Text = "运行热键";
|
||||
//
|
||||
// hotkeyTextBox1
|
||||
//
|
||||
this.hotkeyTextBox1.BackColor = System.Drawing.Color.White;
|
||||
this.hotkeyTextBox1.HotKey = "0+0";
|
||||
this.hotkeyTextBox1.Location = new System.Drawing.Point(8, 168);
|
||||
this.hotkeyTextBox1.Name = "hotkeyTextBox1";
|
||||
this.hotkeyTextBox1.Size = new System.Drawing.Size(244, 26);
|
||||
this.hotkeyTextBox1.T_Key = System.Windows.Forms.Keys.None;
|
||||
this.hotkeyTextBox1.T_Modifiers = 0;
|
||||
this.hotkeyTextBox1.TabIndex = 10;
|
||||
//
|
||||
// ChkRunAsAdmin
|
||||
//
|
||||
this.ChkRunAsAdmin.AutoSize = true;
|
||||
|
@ -217,7 +241,7 @@
|
|||
//
|
||||
// BtnBrowser
|
||||
//
|
||||
this.BtnBrowser.BaseColor = System.Drawing.Color.DarkGreen;
|
||||
this.BtnBrowser.BaseColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(150)))), ((int)(((byte)(20)))));
|
||||
this.BtnBrowser.ColorGradient = true;
|
||||
this.BtnBrowser.Location = new System.Drawing.Point(463, 20);
|
||||
this.BtnBrowser.Name = "BtnBrowser";
|
||||
|
@ -318,9 +342,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.DarkGreen;
|
||||
this.BtnCancel.BaseColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(150)))), ((int)(((byte)(20)))));
|
||||
this.BtnCancel.ColorGradient = true;
|
||||
this.BtnCancel.Location = new System.Drawing.Point(458, 467);
|
||||
this.BtnCancel.Location = new System.Drawing.Point(586, 576);
|
||||
this.BtnCancel.Name = "BtnCancel";
|
||||
this.BtnCancel.Size = new System.Drawing.Size(75, 27);
|
||||
this.BtnCancel.TabIndex = 8;
|
||||
|
@ -331,9 +355,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.DarkGreen;
|
||||
this.BtnOK.BaseColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(150)))), ((int)(((byte)(20)))));
|
||||
this.BtnOK.ColorGradient = true;
|
||||
this.BtnOK.Location = new System.Drawing.Point(377, 467);
|
||||
this.BtnOK.Location = new System.Drawing.Point(505, 576);
|
||||
this.BtnOK.Name = "BtnOK";
|
||||
this.BtnOK.Size = new System.Drawing.Size(75, 27);
|
||||
this.BtnOK.TabIndex = 7;
|
||||
|
@ -347,7 +371,7 @@
|
|||
this.PicImg.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
|
||||
this.PicImg.ContextMenuStrip = this.contextMenuStrip1;
|
||||
this.PicImg.Cursor = System.Windows.Forms.Cursors.Hand;
|
||||
this.PicImg.Location = new System.Drawing.Point(448, 36);
|
||||
this.PicImg.Location = new System.Drawing.Point(576, 36);
|
||||
this.PicImg.Name = "PicImg";
|
||||
this.PicImg.Size = new System.Drawing.Size(86, 86);
|
||||
this.PicImg.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom;
|
||||
|
@ -388,7 +412,7 @@
|
|||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.ClientSize = new System.Drawing.Size(543, 506);
|
||||
this.ClientSize = new System.Drawing.Size(671, 615);
|
||||
this.Controls.Add(this.TxtCmdId);
|
||||
this.Controls.Add(this.label6);
|
||||
this.Controls.Add(this.LblCustomImg);
|
||||
|
@ -400,11 +424,10 @@
|
|||
this.Controls.Add(this.PicImg);
|
||||
this.Controls.Add(this.label1);
|
||||
this.Controls.Add(this.TxtName);
|
||||
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
|
||||
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 = 1;
|
||||
this.ShowShadow = false;
|
||||
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
|
||||
this.Text = "添加软件";
|
||||
this.Load += new System.EventHandler(this.FrmAddSoft_Load);
|
||||
|
@ -446,5 +469,7 @@
|
|||
private System.Windows.Forms.Label label6;
|
||||
private ryControls.TextBoxEx2 TxtCmdId;
|
||||
private System.Windows.Forms.ToolTip toolTip1;
|
||||
private System.Windows.Forms.Label label7;
|
||||
public ryControls.HotkeyTextBox hotkeyTextBox1;
|
||||
}
|
||||
}
|
|
@ -65,6 +65,7 @@ namespace VSoft
|
|||
TxtPath.Text = reader["Path"].ToString();
|
||||
TxtRunPram.Text = reader["RunPram"].ToString();
|
||||
TxtStartPath.Text = reader["StartPath"].ToString();
|
||||
hotkeyTextBox1.HotKey = reader["Hotkey"].ToString();
|
||||
Json json = new Json(reader["SetJson"].ToString());
|
||||
ChkRunAsAdmin.Checked = json.GetJsonValue("RunAsAdmin", false);
|
||||
var _IconPath = reader["IconPath"].ToString();
|
||||
|
@ -84,7 +85,10 @@ namespace VSoft
|
|||
}
|
||||
db.Free();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 当前操作的id
|
||||
/// </summary>
|
||||
public int Op_Id { get; set; } = -1;
|
||||
private void BtnOK_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (TxtName.Text.Length == 0)
|
||||
|
@ -126,6 +130,24 @@ namespace VSoft
|
|||
}
|
||||
ds.Dispose();
|
||||
}
|
||||
if (hotkeyTextBox1.HaveHotKey)
|
||||
{
|
||||
var ds = db.ReadData("select * from " + tableName + " where Hotkey='" + hotkeyTextBox1.HotKey + "' and id<>" + SelectId + " limit 1");
|
||||
if (mydb.HaveData(ds))
|
||||
{
|
||||
Msg.ShowMsg("当前热键已经存在,请更换热键。", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
|
||||
ds.Dispose(); return;
|
||||
}
|
||||
else
|
||||
{
|
||||
if(Config.Soft_Config.IsHotKeyExistInList(hotkeyTextBox1.HotKey)>=0)
|
||||
{
|
||||
Msg.ShowMsg("当前热键已经存在,请更换热键。", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
|
||||
ds.Dispose(); return;
|
||||
}
|
||||
}
|
||||
ds.Dispose();
|
||||
}
|
||||
RyQuickSQL mySQL = new RyQuickSQL(tableName);
|
||||
mySQL.AddField("Name", TxtName.Text);
|
||||
mySQL.AddField("CmdId", TxtCmdId.Text);
|
||||
|
@ -137,6 +159,7 @@ namespace VSoft
|
|||
json.Add("RunAsAdmin", ChkRunAsAdmin.Checked);
|
||||
mySQL.AddField("SetJson", json.Text);//设置
|
||||
mySQL.AddField("Des", TxtDes.Text);//备注
|
||||
mySQL.AddField("Hotkey", hotkeyTextBox1.HaveHotKey?hotkeyTextBox1.HotKey:"");//快捷键
|
||||
mySQL.AddField("Pinyin", ryCommon.PinYin.Convert(TxtName.Text) + "\r\n" + ryCommon.PinYin.ConvertFirstPY(TxtName.Text));
|
||||
mySQL.AddField("editTime", DateTime.Now);
|
||||
if (IsAdd >= 1)
|
||||
|
@ -146,11 +169,17 @@ namespace VSoft
|
|||
mySQL.AddField("ColumnId",ColumnId);
|
||||
mySQL.AddField("sortindex",Itrycn_Db.GetSoftCount(db, ColumnId) + 1);
|
||||
mySQL.AddField("addTime", DateTime.Now);
|
||||
db.ExecuteNonQuery(mySQL.GetInsertSQL(), mySQL);
|
||||
var ds= db.ReadData(mySQL.GetInsertSQL()+";select last_insert_rowid();", mySQL);
|
||||
if (ds.HaveData())
|
||||
{
|
||||
Op_Id = ds.GetFirstRowCellValue();
|
||||
}
|
||||
ds.Dispose();
|
||||
}
|
||||
else
|
||||
{
|
||||
db.ExecuteNonQuery(mySQL.GetUpdateSQL() + " where id=" + SelectId, mySQL);
|
||||
Op_Id = SelectId;
|
||||
}
|
||||
}
|
||||
db.Free();
|
||||
|
|
|
@ -29,6 +29,9 @@ namespace VSoft
|
|||
//配置软件信息
|
||||
notifyIcon1.Text = Config.Soft_Info.Soft_Title;
|
||||
Text = Config.Soft_Info.Soft_Title + " V" + RySoft.VersionStr;
|
||||
#if TEST
|
||||
Text +=" V内部测试版";
|
||||
#endif
|
||||
if (!Config.Soft_Info.ShowTray) { notifyIcon1.Visible = false; }
|
||||
#if DY
|
||||
捐助ToolStripMenuItem.Text = "关于";
|
||||
|
@ -160,6 +163,7 @@ namespace VSoft
|
|||
}
|
||||
else { LblEmpty.Visible = false; }
|
||||
}
|
||||
db.Free();
|
||||
}
|
||||
private void LoadColumn()
|
||||
{
|
||||
|
@ -239,6 +243,31 @@ namespace VSoft
|
|||
TabList_Type.Items[0].Selected = true;
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// 注册热键
|
||||
/// </summary>
|
||||
private void RegisterHotkey()
|
||||
{
|
||||
hotkey.UnHotKey();
|
||||
IDbInterface db2 = Itrycn_Db.CreateDataProvider(Itrycn_Db.dataType);
|
||||
if (db2.ConnDb(SQLConnStr) == 1)
|
||||
{
|
||||
HotkeyValue hot = new HotkeyValue(Soft_Config.ShowMainHotKey);
|
||||
hotkey.RegHotKey(100, hot.Modifiers_Int, hot.KeyCode);
|
||||
var ds = db2.ReadData("select * from Softs where Hotkey<>''");
|
||||
if (ds.HaveData())
|
||||
{
|
||||
for (int i = 0; i < ds.Tables[0].Rows.Count; i++)
|
||||
{
|
||||
var item = ds.GetRow(i);
|
||||
hot.LoadHotKeyStr(item["HotKey"].ToString());
|
||||
hotkey.RegHotKey(100 + item["id"].ToInt(), hot.Modifiers_Int, hot.KeyCode);
|
||||
}
|
||||
}
|
||||
ds.Dispose();
|
||||
}
|
||||
db2.Free();
|
||||
}
|
||||
SysFuns.WinHotReg hotkey;
|
||||
private void FrmVSoft_Load(object sender, EventArgs e)
|
||||
{
|
||||
|
@ -299,9 +328,8 @@ namespace VSoft
|
|||
// Msg.ShowMsg("管理员模式下启动本软件,可能会导致无法拖放图标到本软件。", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
|
||||
//}
|
||||
hotkey = new SysFuns.WinHotReg(Handle);
|
||||
HotkeyValue hot = new HotkeyValue(Soft_Config.ShowMainHotKey);
|
||||
hotkey.RegHotKey(100,hot.Modifiers_Int, hot.KeyCode);
|
||||
hotkey.OnHotkey += Hotkey_OnHotkey;
|
||||
RegisterHotkey();
|
||||
ryCommon.RyRegedit.RegRoot = Microsoft.Win32.RegistryHive.CurrentUser;
|
||||
//如果开机启动没有启动
|
||||
if(!ryCommon.RyRegedit.IsAutoRun(Soft_Info.Soft_Id, "\"" + Application.ExecutablePath.Replace("/", "\\") + "\" " + Soft_Info.Soft_Pram))
|
||||
|
@ -314,8 +342,11 @@ namespace VSoft
|
|||
}
|
||||
}
|
||||
ShowInCenter(null);
|
||||
#if DY
|
||||
#else
|
||||
LiveUpdate.RyUpdate update = new LiveUpdate.RyUpdate(Soft_Info.Update_Url);
|
||||
update.CheckUpdate();
|
||||
#endif
|
||||
mouse.OnMouseActivity += Mouse_OnMouseActivity;
|
||||
mouse.Start();
|
||||
}
|
||||
|
@ -327,6 +358,32 @@ namespace VSoft
|
|||
case 100:
|
||||
ShowOrHideUI();
|
||||
break;
|
||||
default:
|
||||
var id = HotKeyID - 100;
|
||||
IDbInterface db = Itrycn_Db.CreateDataProvider(Itrycn_Db.dataType);
|
||||
if (db.ConnDb(SQLConnStr) == 1)
|
||||
{
|
||||
var sql = "select * from Softs where id="+id;
|
||||
DataSet ds = db.ReadData("select * from Softs where id=" + id);
|
||||
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();
|
||||
VSoft.Prams.Run.Open(info, false);
|
||||
}
|
||||
db.Free();
|
||||
}
|
||||
db.Free();
|
||||
break;
|
||||
}
|
||||
}
|
||||
[System.Runtime.InteropServices.DllImport("user32.dll", EntryPoint = "SetForegroundWindow")]
|
||||
|
@ -719,6 +776,12 @@ namespace VSoft
|
|||
frm.ShowInCenter(this);
|
||||
if (frm.ShowDialog() == DialogResult.OK)
|
||||
{
|
||||
if(frm.hotkeyTextBox1.HaveHotKey)
|
||||
{
|
||||
hotkey.UnHotKey(frm.Op_Id+00);
|
||||
HotkeyValue hot = new HotkeyValue(frm.hotkeyTextBox1.HotKey);
|
||||
hotkey.RegHotKey(frm.Op_Id+100, hot.Modifiers_Int, hot.KeyCode);
|
||||
}
|
||||
LoadDb();
|
||||
}
|
||||
frm.Dispose();
|
||||
|
@ -735,6 +798,16 @@ namespace VSoft
|
|||
frm.ShowInCenter(this);
|
||||
if (frm.ShowDialog() == DialogResult.OK)
|
||||
{
|
||||
if (frm.hotkeyTextBox1.HaveHotKey)
|
||||
{
|
||||
hotkey.UnHotKey(frm.Op_Id + 100);
|
||||
HotkeyValue hot = new HotkeyValue(frm.hotkeyTextBox1.HotKey);
|
||||
hotkey.RegHotKey(frm.Op_Id +100, hot.Modifiers_Int, hot.KeyCode);
|
||||
}
|
||||
else
|
||||
{
|
||||
hotkey.UnHotKey(frm.Op_Id +100);
|
||||
}
|
||||
SetSoftRow(info.Id, IconViewEx1.SelectedItems[0].Index);
|
||||
}
|
||||
frm.Dispose();
|
||||
|
@ -756,6 +829,7 @@ namespace VSoft
|
|||
{
|
||||
RyFiles.DeleteFile(RyFiles.GetRealPath(info.IconPath));
|
||||
}
|
||||
hotkey.UnHotKey(info.Id+100);
|
||||
db.DelById("Softs", info.Id.ToString());
|
||||
IconViewEx1.SelectedItems[i].Remove();
|
||||
if (IconViewEx1.Items.Count == 0)
|
||||
|
@ -1308,7 +1382,7 @@ namespace VSoft
|
|||
if (frm.ShowDialog() == DialogResult.OK)
|
||||
{
|
||||
VSoft.Config.Soft_Config.LoadSetting();
|
||||
hotkey.UnHotKey();
|
||||
hotkey.UnHotKey(100);
|
||||
HotkeyValue hot = new HotkeyValue(Soft_Config.ShowMainHotKey);
|
||||
hotkey.RegHotKey(100, hot.Modifiers_Int, hot.KeyCode);
|
||||
}
|
||||
|
|
|
@ -5,6 +5,7 @@ using System.Collections.Generic;
|
|||
using System.Data;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using VSoft.Config;
|
||||
using static ryCommonDb.DataProvider;
|
||||
|
||||
namespace VSoft.Prams
|
||||
|
@ -12,8 +13,8 @@ namespace VSoft.Prams
|
|||
public class Itrycn_Db
|
||||
{
|
||||
public static string SQLConnStr_SysDb = "<app>\\SysDb\\SysConfig.dat";
|
||||
public static string SQLConnStr = "<app>\\UserDb\\Softs.dat|";
|
||||
public static string SQLConnStr_Logs = "<app>\\UserDb\\logs.dat|";
|
||||
public static string SQLConnStr = Soft_Info.UserDataFolder+ "\\Softs.dat|";
|
||||
public static string SQLConnStr_Logs = Soft_Info.UserDataFolder + "\\logs.dat|";
|
||||
public static DataProvider.DataProviderType dataType = DataProvider.DataProviderType.SQLiteDataProvider;
|
||||
public static IDbInterface CreateDataProvider(DataProviderType dataProviderType)
|
||||
{
|
||||
|
@ -164,6 +165,7 @@ namespace VSoft.Prams
|
|||
mySQL.AddField("ClickCount",0);//点击量
|
||||
mySQL.AddField("SetJson", "");//设置
|
||||
mySQL.AddField("Des", "");//备注
|
||||
mySQL.AddField("Hotkey", "");//快捷键
|
||||
mySQL.AddField("PinYin", "");//拼音
|
||||
mySQL.AddField("ColumnId", 0);//栏目ID
|
||||
mySQL.AddField("sortindex", 0);
|
||||
|
|
|
@ -32,5 +32,5 @@ using System.Runtime.InteropServices;
|
|||
//可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值
|
||||
//通过使用 "*",如下所示:
|
||||
// [assembly: AssemblyVersion("1.0.*")]
|
||||
[assembly: AssemblyVersion("1.0.2107.0501")]
|
||||
[assembly: AssemblyFileVersion("1.0.2107.0501")]
|
||||
[assembly: AssemblyVersion("1.0.2109.0701")]
|
||||
[assembly: AssemblyFileVersion("1.0.2109.0701")]
|
|
@ -18,7 +18,7 @@
|
|||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>..\..\Bin\Debug\VSoft\</OutputPath>
|
||||
<DefineConstants>TRACE;DEBUG</DefineConstants>
|
||||
<DefineConstants>TRACE;DEBUG;DY</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||
|
|
Loading…
Reference in New Issue
Block a user