2017-10-15 16:04:28 +08:00
|
|
|
|
using HslCommunication.BasicFramework;
|
|
|
|
|
|
using System;
|
2017-03-04 17:07:26 +08:00
|
|
|
|
using System.Collections.Generic;
|
2017-10-15 16:04:28 +08:00
|
|
|
|
using System.Drawing;
|
2017-03-04 17:07:26 +08:00
|
|
|
|
using System.Linq;
|
|
|
|
|
|
using System.Text;
|
2017-10-15 16:04:28 +08:00
|
|
|
|
using System.Windows.Forms;
|
2017-03-04 17:07:26 +08:00
|
|
|
|
|
|
|
|
|
|
namespace CommonLibrary
|
|
|
|
|
|
{
|
2017-10-15 16:04:28 +08:00
|
|
|
|
/***********************************************************************************
|
2017-09-19 10:37:17 +08:00
|
|
|
|
*
|
2017-10-15 16:04:28 +08:00
|
|
|
|
* 说明:用来客户端和服务器都能够直达访问的一些静态资源
|
|
|
|
|
|
* 专门放在这下面的数据是需要支持winform和wpf共同访问的
|
2017-09-19 10:37:17 +08:00
|
|
|
|
*
|
2017-10-15 16:04:28 +08:00
|
|
|
|
***********************************************************************************/
|
|
|
|
|
|
|
2017-09-19 10:37:17 +08:00
|
|
|
|
|
2017-10-15 16:04:28 +08:00
|
|
|
|
|
|
|
|
|
|
public class UserSystem
|
2017-03-04 17:07:26 +08:00
|
|
|
|
{
|
2017-10-15 16:04:28 +08:00
|
|
|
|
static UserSystem()
|
2017-05-05 23:07:44 +08:00
|
|
|
|
{
|
2017-06-29 08:10:53 +08:00
|
|
|
|
/**************************************************************************
|
|
|
|
|
|
*
|
|
|
|
|
|
* 时间:2017年6月29日 07:58:02
|
|
|
|
|
|
* 说明:更改版本机制,每次提交新增修订版的版本号
|
|
|
|
|
|
* 发行:发行版将采用主版本加次版本来发行
|
|
|
|
|
|
*
|
|
|
|
|
|
**************************************************************************/
|
2017-10-15 16:04:28 +08:00
|
|
|
|
|
2017-07-07 14:12:42 +08:00
|
|
|
|
/**************************************************************************
|
|
|
|
|
|
*
|
2017-09-21 12:20:16 +08:00
|
|
|
|
* 说明:以下是大版本号的发布日期
|
|
|
|
|
|
*
|
|
|
|
|
|
* 时间:2017年7月7日 14:11:35 版本号:1.1.0
|
2017-07-18 15:11:16 +08:00
|
|
|
|
* 时间:2017年7月18日 15:10:18 版本号:1.2.0
|
2017-09-21 12:20:16 +08:00
|
|
|
|
* 时间:2017年9月3日 13:27:52 版本号:1.3.0
|
2017-09-19 10:37:17 +08:00
|
|
|
|
* 时间:2017年9月19日 22:06:27 版本号:1.4.0
|
2017-10-02 09:36:00 +08:00
|
|
|
|
* 时间:2017年10月1日 16:00:13 版本号:1.5.0
|
2017-10-06 19:28:44 +08:00
|
|
|
|
* 时间:2017年10月6日 19:23:09 版本号:1.6.0
|
2017-10-21 12:22:50 +08:00
|
|
|
|
* 时间:2017年10月21日 11:55:41 版本号:1.7.0
|
2017-09-14 22:14:08 +08:00
|
|
|
|
*
|
|
|
|
|
|
**************************************************************************/
|
|
|
|
|
|
|
2017-10-15 21:09:22 +08:00
|
|
|
|
|
2017-12-24 13:35:13 +08:00
|
|
|
|
SoftBasic.FrameworkVersion = new SystemVersion("1.7.11");
|
2017-05-05 23:07:44 +08:00
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
2017-09-19 10:37:17 +08:00
|
|
|
|
|
|
|
|
|
|
/************************************************************************************************
|
|
|
|
|
|
*
|
|
|
|
|
|
* 注意:您在准备二次开发时,应该重新生成一个自己的GUID码
|
|
|
|
|
|
*
|
2017-09-20 21:55:43 +08:00
|
|
|
|
************************************************************************************************/
|
2017-09-19 10:37:17 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
2017-09-21 12:20:16 +08:00
|
|
|
|
/// 用于整个网络服务交互的身份令牌,可有效的防止来自网络的攻击,其他系统的恶意的连接
|
|
|
|
|
|
/// 重新生成令牌后就无法更改,否则不支持自动升级
|
2017-09-19 10:37:17 +08:00
|
|
|
|
/// </summary>
|
|
|
|
|
|
public static Guid KeyToken { get; set; } = new Guid("1275BB9A-14B2-4A96-9673-B0AF0463D474");
|
|
|
|
|
|
|
|
|
|
|
|
|
2017-03-04 17:07:26 +08:00
|
|
|
|
|
2017-09-20 21:55:43 +08:00
|
|
|
|
/************************************************************************************************
|
|
|
|
|
|
*
|
|
|
|
|
|
* 注意:此处的所有的网络端口应该重新指定,防止其他人的项目连接到你的程序上
|
|
|
|
|
|
* 假设你们的多个项目服务器假设在一台电脑的情况,就绝对要替换下面的端口号
|
|
|
|
|
|
*
|
|
|
|
|
|
************************************************************************************************/
|
2017-10-15 16:04:28 +08:00
|
|
|
|
|
2017-03-05 18:32:55 +08:00
|
|
|
|
|
2017-03-04 17:07:26 +08:00
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// 主网络端口,此处随机定义了一个数据
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
public static int Port_Main_Net { get; } = 17652;
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// 同步网络访问的端口,此处随机定义了一个数据
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
public static int Port_Second_Net { get; } = 14568;
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// 用于软件系统更新的端口,此处随机定义了一个数据
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
public static int Port_Update_Net { get; } = 17538;
|
|
|
|
|
|
/// <summary>
|
2017-04-06 16:18:46 +08:00
|
|
|
|
/// 共享文件的端口号
|
|
|
|
|
|
/// </summary>
|
2017-10-01 15:59:37 +08:00
|
|
|
|
public static int Port_Ultimate_File_Server { get; } = 34261;
|
2017-06-07 16:20:40 +08:00
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// 用于UDP传输的端口号
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
public static int Port_Udp_Server { get; } = 32566;
|
2017-07-06 22:04:52 +08:00
|
|
|
|
/// <summary>
|
2017-10-04 20:39:56 +08:00
|
|
|
|
/// 用于服务器版本更新的端口
|
2017-07-06 22:04:52 +08:00
|
|
|
|
/// </summary>
|
2017-09-17 21:59:45 +08:00
|
|
|
|
public static int Port_Advanced_File_Server { get; } = 24672;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2017-05-04 11:43:50 +08:00
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// 整个系统的加密解密密码
|
|
|
|
|
|
/// </summary>
|
2017-09-19 10:37:17 +08:00
|
|
|
|
public static string Security { get; } = "qwertyui";
|
2017-03-04 17:07:26 +08:00
|
|
|
|
|
2017-10-15 16:04:28 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// 统一的窗体图标显示
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
/// <returns></returns>
|
|
|
|
|
|
public static Icon GetFormWindowIcon()
|
|
|
|
|
|
{
|
|
|
|
|
|
return Icon.ExtractAssociatedIcon(Application.ExecutablePath);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
2017-03-04 17:07:26 +08:00
|
|
|
|
}
|