*.[新增]新增函数IsEng来判断字符串是否是英文
This commit is contained in:
parent
5084054674
commit
b7075a3b55
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
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.
Binary file not shown.
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.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
@ -0,0 +1,6 @@
|
||||||
|
### 2020-12-10更新
|
||||||
|
------
|
||||||
|
|
||||||
|
|
||||||
|
#### MyDbV4 V2.1.2012.1001
|
||||||
|
- *.[新增]新增函数IsEng来判断字符串是否是英文
|
Binary file not shown.
|
@ -1,146 +1,146 @@
|
||||||
using Itrycn_Project;
|
using Itrycn_Project;
|
||||||
using ryCommon;
|
using ryCommon;
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.ComponentModel;
|
using System.ComponentModel;
|
||||||
using System.Data;
|
using System.Data;
|
||||||
using System.Drawing;
|
using System.Drawing;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Windows.Forms;
|
using System.Windows.Forms;
|
||||||
|
|
||||||
namespace Itrycn_Project2
|
namespace Itrycn_Project2
|
||||||
{
|
{
|
||||||
public partial class FrmStart : Form
|
public partial class FrmStart : Form
|
||||||
{
|
{
|
||||||
string[] prog_args;
|
string[] prog_args;
|
||||||
public FrmStart(string[] args)
|
public FrmStart(string[] args)
|
||||||
{
|
{
|
||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
prog_args = args;
|
prog_args = args;
|
||||||
//配置软件信息
|
//配置软件信息
|
||||||
notifyIcon1.Text = Soft_Info.Soft_Title;
|
notifyIcon1.Text = Soft_Info.Soft_Title;
|
||||||
Text = Soft_Info.Soft_Title + " V" + RySoft.VersionStr;
|
Text = Soft_Info.Soft_Title + " V" + RySoft.VersionStr;
|
||||||
if (!Soft_Info.ShowTray) { notifyIcon1.Visible = false; }
|
if (!Soft_Info.ShowTray) { notifyIcon1.Visible = false; }
|
||||||
if (!Soft_Info.DonateVisabled) { 捐助ToolStripMenuItem.Text = "关于"; }
|
if (!Soft_Info.DonateVisabled) { 捐助ToolStripMenuItem.Text = "关于"; }
|
||||||
if (Soft_Info.Soft_Url.Length == 0) { 打开官网ToolStripMenuItem.PerformClick(); }
|
if (Soft_Info.Soft_Url.Length == 0) { 打开官网ToolStripMenuItem.PerformClick(); }
|
||||||
notifyIcon1.Icon = Icon;
|
notifyIcon1.Icon = Icon;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void 显示主窗体ToolStripMenuItem_Click(object sender, EventArgs e)
|
private void 显示主窗体ToolStripMenuItem_Click(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
this.WindowState = FormWindowState.Normal;
|
this.WindowState = FormWindowState.Normal;
|
||||||
var topmost = this.TopMost;
|
var topmost = this.TopMost;
|
||||||
this.TopMost = true;
|
this.TopMost = true;
|
||||||
this.Show();
|
this.Show();
|
||||||
this.TopMost = topmost;
|
this.TopMost = topmost;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void 退出软件ToolStripMenuItem_Click(object sender, EventArgs e)
|
private void 退出软件ToolStripMenuItem_Click(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
Application.Exit();
|
Application.Exit();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void FrmStart_Shown(object sender, EventArgs e)
|
private void FrmStart_Shown(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
ryCommon.Ini ini = new Ini(Soft_Info.UserDataFolder + "\\Win.dat");
|
ryCommon.Ini ini = new Ini(Soft_Info.UserDataFolder + "\\Win.dat");
|
||||||
ini.WriteIni(Soft_Info.Soft_Id, "hwnd", Handle.ToInt32());
|
ini.WriteIni(Soft_Info.Soft_Id, "hwnd", Handle.ToInt32());
|
||||||
if (prog_args.Length >= 1)
|
if (prog_args.Length >= 1)
|
||||||
{
|
{
|
||||||
//如果是自启动,并且开启了右下角托盘图标,则隐藏自身。
|
//如果是自启动,并且开启了右下角托盘图标,则隐藏自身。
|
||||||
if (prog_args[0] == Soft_Info.Soft_Pram && Soft_Info.ShowTray)
|
if (prog_args[0] == Soft_Info.Soft_Pram && Soft_Info.ShowTray)
|
||||||
this.Hide();
|
this.Hide();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void FrmStart_FormClosing(object sender, FormClosingEventArgs e)
|
private void FrmStart_FormClosing(object sender, FormClosingEventArgs e)
|
||||||
{
|
{
|
||||||
if (Soft_Info.ShowTray && Soft_Config.HideByCloseBtn && e.CloseReason== CloseReason.UserClosing)
|
if (Soft_Info.ShowTray && Soft_Config.HideByCloseBtn && e.CloseReason== CloseReason.UserClosing)
|
||||||
{
|
{
|
||||||
e.Cancel = true;
|
e.Cancel = true;
|
||||||
this.Hide();
|
this.Hide();
|
||||||
notifyIcon1.ShowBalloonTip(3000, Soft_Info.Soft_Title, "软件已经最小化到此处,请右击托盘图标进行关闭。", ToolTipIcon.Info);
|
notifyIcon1.ShowBalloonTip(3000, Soft_Info.Soft_Title, "软件已经最小化到此处,请右击托盘图标进行关闭。", ToolTipIcon.Info);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (!Soft_Config.IsCanCloseForm)
|
if (!Soft_Config.IsCanCloseForm)
|
||||||
{
|
{
|
||||||
e.Cancel = true;
|
e.Cancel = true;
|
||||||
MessageBox.Show("当前还有操作正在运行,请稍后关闭软件。", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
|
MessageBox.Show("当前还有操作正在运行,请稍后关闭软件。", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
protected override void WndProc(ref System.Windows.Forms.Message msg)
|
protected override void WndProc(ref System.Windows.Forms.Message msg)
|
||||||
{
|
{
|
||||||
switch (msg.Msg)
|
switch (msg.Msg)
|
||||||
{
|
{
|
||||||
case 17189: //处理消息
|
case 17189: //处理消息
|
||||||
{
|
{
|
||||||
#region 激活窗体
|
#region 激活窗体
|
||||||
switch (msg.WParam.ToInt32())
|
switch (msg.WParam.ToInt32())
|
||||||
{
|
{
|
||||||
case 100://
|
case 100://
|
||||||
#region 显示界面
|
#region 显示界面
|
||||||
if ((int)msg.LParam.ToInt32() == 100)
|
if ((int)msg.LParam.ToInt32() == 100)
|
||||||
{
|
{
|
||||||
this.Show();
|
this.Show();
|
||||||
this.WindowState = FormWindowState.Normal;
|
this.WindowState = FormWindowState.Normal;
|
||||||
this.Top = (Screen.PrimaryScreen.WorkingArea.Height - this.Height) / 2;
|
this.Top = (Screen.PrimaryScreen.WorkingArea.Height - this.Height) / 2;
|
||||||
this.Left = (Screen.PrimaryScreen.WorkingArea.Width - this.Width) / 2;
|
this.Left = (Screen.PrimaryScreen.WorkingArea.Width - this.Width) / 2;
|
||||||
//RyForm.SetActiveWindow(Handle);
|
//RyForm.SetActiveWindow(Handle);
|
||||||
RyForm.BringToTop(Handle);
|
RyForm.BringToTop(Handle);
|
||||||
显示主窗体ToolStripMenuItem.PerformClick();
|
显示主窗体ToolStripMenuItem.PerformClick();
|
||||||
this.BringToFront();
|
this.BringToFront();
|
||||||
this.Select();
|
this.Select();
|
||||||
this.Focus();
|
this.Focus();
|
||||||
RyForm.BringToTop(Handle);
|
RyForm.BringToTop(Handle);
|
||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
base.WndProc(ref msg);//调用基类函数处理非自定义消息。
|
base.WndProc(ref msg);//调用基类函数处理非自定义消息。
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void 捐助ToolStripMenuItem_Click(object sender, EventArgs e)
|
private void 捐助ToolStripMenuItem_Click(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
if (Soft_Info.DonateVisabled)
|
if (Soft_Info.DonateVisabled)
|
||||||
{
|
{
|
||||||
FrmAbout frm = new FrmAbout();
|
FrmAbout frm = new FrmAbout();
|
||||||
frm.ShowDialog();
|
frm.ShowDialog();
|
||||||
frm.Dispose();
|
frm.Dispose();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
MessageBox.Show(Soft_Info.AboutText.Replace("#softname#", Soft_Info.Soft_Title).Replace("#ver#", "V" + RySoft.VersionStr), "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
|
MessageBox.Show(Soft_Info.AboutText.Replace("#softname#", Soft_Info.Soft_Title).Replace("#ver#", "V" + RySoft.VersionStr), "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
private void 打开官网ToolStripMenuItem_Click(object sender, EventArgs e)
|
private void 打开官网ToolStripMenuItem_Click(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
ryCommon.RyFiles.OpenUrl(Soft_Info.Soft_Url);
|
ryCommon.RyFiles.OpenUrl(Soft_Info.Soft_Url);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void FrmStart_Load(object sender, EventArgs e)
|
private void FrmStart_Load(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
Itrycn_Project.Itrycn_Db.CreateTable();
|
Itrycn_Project.Itrycn_Db.CreateTable();
|
||||||
LiveUpdate.RyUpdate update = new LiveUpdate.RyUpdate(Soft_Info.Update_Url);
|
LiveUpdate.RyUpdate update = new LiveUpdate.RyUpdate(Soft_Info.Update_Url);
|
||||||
update.CheckUpdate();
|
update.CheckUpdate();
|
||||||
var dbver = Itrycn_Db.GetDbVer();
|
var dbver = Itrycn_Db.GetDbVer();
|
||||||
if(dbver==1) //初始版本,并是当前要求的数据库
|
if(dbver==1) //初始版本,并是当前要求的数据库
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
MessageBox.Show("不支持当前数据库版本,这可能是以下原因导致的:\r\n1.数据库已损坏;'\r\n2.当前数据库是由新版软件创建的(请更新软件后重试)。", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
|
MessageBox.Show("不支持当前数据库版本,这可能是以下原因导致的:\r\n1.数据库已损坏;'\r\n2.当前数据库是由新版软件创建的(请更新软件后重试)。", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
|
||||||
Application.Exit();
|
Application.Exit();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -280,6 +280,15 @@ namespace ryCommon
|
||||||
return !Regex.IsMatch(str, "[^0-9a-zA-Z]");
|
return !Regex.IsMatch(str, "[^0-9a-zA-Z]");
|
||||||
}
|
}
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
/// 判断字符串是否只包含英文
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="str"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
public static bool IsEng(string str)
|
||||||
|
{
|
||||||
|
return !Regex.IsMatch(str, "[^a-zA-Z]");
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
/// 判断字符串是否匹配,支持?*通配符
|
/// 判断字符串是否匹配,支持?*通配符
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="str">待匹配的字符串</param>
|
/// <param name="str">待匹配的字符串</param>
|
||||||
|
|
|
@ -96,6 +96,15 @@ namespace ryCommon
|
||||||
return Strings.IsEngOrNum(input);
|
return Strings.IsEngOrNum(input);
|
||||||
}
|
}
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
/// 判断字符串是否是英文
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="input"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
static public bool IsEng(this string input)
|
||||||
|
{
|
||||||
|
return Strings.IsEng(input);
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
/// 是否在指定范围内
|
/// 是否在指定范围内
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="input"></param>
|
/// <param name="input"></param>
|
||||||
|
|
|
@ -1,36 +1,36 @@
|
||||||
using System.Reflection;
|
using System.Reflection;
|
||||||
using System.Runtime.CompilerServices;
|
using System.Runtime.CompilerServices;
|
||||||
using System.Runtime.InteropServices;
|
using System.Runtime.InteropServices;
|
||||||
|
|
||||||
// 有关程序集的一般信息由以下
|
// 有关程序集的一般信息由以下
|
||||||
// 控制。更改这些特性值可修改
|
// 控制。更改这些特性值可修改
|
||||||
// 与程序集关联的信息。
|
// 与程序集关联的信息。
|
||||||
[assembly: AssemblyTitle("MyDb")]
|
[assembly: AssemblyTitle("MyDb")]
|
||||||
[assembly: AssemblyDescription("基于乘黄V1架构")]
|
[assembly: AssemblyDescription("基于乘黄V1架构")]
|
||||||
[assembly: AssemblyConfiguration("")]
|
[assembly: AssemblyConfiguration("")]
|
||||||
[assembly: AssemblyCompany("睿元网络工作室")]
|
[assembly: AssemblyCompany("睿元网络工作室")]
|
||||||
[assembly: AssemblyProduct("MyDb")]
|
[assembly: AssemblyProduct("MyDb")]
|
||||||
[assembly: AssemblyCopyright("Copyright © 2010-2017")]
|
[assembly: AssemblyCopyright("Copyright © 2010-2017")]
|
||||||
[assembly: AssemblyTrademark("")]
|
[assembly: AssemblyTrademark("")]
|
||||||
[assembly: AssemblyCulture("")]
|
[assembly: AssemblyCulture("")]
|
||||||
|
|
||||||
//将 ComVisible 设置为 false 将使此程序集中的类型
|
//将 ComVisible 设置为 false 将使此程序集中的类型
|
||||||
//对 COM 组件不可见。 如果需要从 COM 访问此程序集中的类型,
|
//对 COM 组件不可见。 如果需要从 COM 访问此程序集中的类型,
|
||||||
//请将此类型的 ComVisible 特性设置为 true。
|
//请将此类型的 ComVisible 特性设置为 true。
|
||||||
[assembly: ComVisible(false)]
|
[assembly: ComVisible(false)]
|
||||||
|
|
||||||
// 如果此项目向 COM 公开,则下列 GUID 用于类型库的 ID
|
// 如果此项目向 COM 公开,则下列 GUID 用于类型库的 ID
|
||||||
[assembly: Guid("9df20d86-a56e-4cf6-a3d8-f30421297b1b")]
|
[assembly: Guid("9df20d86-a56e-4cf6-a3d8-f30421297b1b")]
|
||||||
|
|
||||||
// 程序集的版本信息由下列四个值组成:
|
// 程序集的版本信息由下列四个值组成:
|
||||||
//
|
//
|
||||||
// 主版本
|
// 主版本
|
||||||
// 次版本
|
// 次版本
|
||||||
// 生成号
|
// 生成号
|
||||||
// 修订号
|
// 修订号
|
||||||
//
|
//
|
||||||
//可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值,
|
//可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值,
|
||||||
// 方法是按如下所示使用“*”: :
|
// 方法是按如下所示使用“*”: :
|
||||||
// [assembly: AssemblyVersion("1.0.*")]
|
// [assembly: AssemblyVersion("1.0.*")]
|
||||||
[assembly: AssemblyVersion("2.1.2011.0901")]
|
[assembly: AssemblyVersion("2.1.2012.1001")]
|
||||||
[assembly: AssemblyFileVersion("2.1.2011.0901")]
|
[assembly: AssemblyFileVersion("2.1.2012.1001")]
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading…
Reference in New Issue
Block a user