添加项目文件。
This commit is contained in:
77
CommonLibrary/Class1.cs
Normal file
77
CommonLibrary/Class1.cs
Normal file
@@ -0,0 +1,77 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
|
||||
namespace CommonLibrary
|
||||
{
|
||||
public class CommonLibrary
|
||||
{
|
||||
#region 公用端口设计块
|
||||
|
||||
/// <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>
|
||||
/// 用于软件远程更新的端口,此处随机定义了一个数据
|
||||
/// </summary>
|
||||
public static int Port_Update_Remote { get; } = 26435;
|
||||
|
||||
#endregion
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 用于网络通信的二级协议头说明
|
||||
/// </summary>
|
||||
public class CommonHeadCode
|
||||
{
|
||||
/// <summary>
|
||||
/// 同步通信的头说明,以字母A开头
|
||||
/// </summary>
|
||||
public class SimplifyHeadCode
|
||||
{
|
||||
public static string 维护检查 { get; } = "A001";//A开始的表明是系统相关的
|
||||
public static string 更新检查 { get; } = "A002";
|
||||
public static string 账户检查 { get; } = "A003";
|
||||
public static string 参数下载 { get; } = "A004";
|
||||
public static string 密码修改 { get; } = "A005";
|
||||
public static string 更细账户信息 { get; } = "A006";
|
||||
public static string 获取账户信息 { get; } = "A007";
|
||||
public static string 更新公告 { get; } = "A008";
|
||||
|
||||
|
||||
|
||||
public static string 网络日志查看 { get; } = "B001";//B开头的是日志请求和清空
|
||||
public static string 网络日志清空 { get; } = "B002";
|
||||
public static string 同步日志查看 { get; } = "B003";
|
||||
public static string 同步日志清空 { get; } = "B004";
|
||||
public static string 更新日志查看 { get; } = "B005";
|
||||
public static string 更新日志清空 { get; } = "B006";
|
||||
|
||||
}
|
||||
/// <summary>
|
||||
/// 异步通信的头说明,以字母H开头,后面跟I,G,K,L,M
|
||||
/// </summary>
|
||||
public class MultiNetHeadCode
|
||||
{
|
||||
public static string 所有客户端在线信息 { get; } = "H001";
|
||||
public static string 关闭所有客户端 { get; } = "H002";
|
||||
public static string 弹窗消息 { get; } = "H003";
|
||||
}
|
||||
|
||||
|
||||
//可以在下面进行扩展,需要保证长度都是统一的
|
||||
}
|
||||
}
|
||||
57
CommonLibrary/CommonLibrary.csproj
Normal file
57
CommonLibrary/CommonLibrary.csproj
Normal file
@@ -0,0 +1,57 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<ProjectGuid>8c97f322-4306-40fc-afcf-753384d80046</ProjectGuid>
|
||||
<OutputType>Library</OutputType>
|
||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||
<RootNamespace>CommonLibrary</RootNamespace>
|
||||
<AssemblyName>CommonLibrary</AssemblyName>
|
||||
<TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>bin\Debug\</OutputPath>
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>bin\Release\</OutputPath>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="System"/>
|
||||
|
||||
<Reference Include="System.Core"/>
|
||||
<Reference Include="System.Xml.Linq"/>
|
||||
<Reference Include="System.Data.DataSetExtensions"/>
|
||||
|
||||
|
||||
<Reference Include="System.Data"/>
|
||||
|
||||
<Reference Include="System.Xml"/>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="Class1.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
||||
Other similar extension points exist, see Microsoft.Common.targets.
|
||||
<Target Name="BeforeBuild">
|
||||
</Target>
|
||||
<Target Name="AfterBuild">
|
||||
</Target>
|
||||
-->
|
||||
|
||||
</Project>
|
||||
36
CommonLibrary/Properties/AssemblyInfo.cs
Normal file
36
CommonLibrary/Properties/AssemblyInfo.cs
Normal file
@@ -0,0 +1,36 @@
|
||||
using System.Reflection;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
// 有关程序集的一般信息由以下
|
||||
// 控制。更改这些特性值可修改
|
||||
// 与程序集关联的信息。
|
||||
[assembly: AssemblyTitle("CommonLibrary")]
|
||||
[assembly: AssemblyDescription("")]
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyCompany("Microsoft")]
|
||||
[assembly: AssemblyProduct("CommonLibrary")]
|
||||
[assembly: AssemblyCopyright("Copyright © Microsoft 2017")]
|
||||
[assembly: AssemblyTrademark("")]
|
||||
[assembly: AssemblyCulture("")]
|
||||
|
||||
//将 ComVisible 设置为 false 将使此程序集中的类型
|
||||
//对 COM 组件不可见。 如果需要从 COM 访问此程序集中的类型,
|
||||
//请将此类型的 ComVisible 特性设置为 true。
|
||||
[assembly: ComVisible(false)]
|
||||
|
||||
// 如果此项目向 COM 公开,则下列 GUID 用于类型库的 ID
|
||||
[assembly: Guid("8c97f322-4306-40fc-afcf-753384d80046")]
|
||||
|
||||
// 程序集的版本信息由下列四个值组成:
|
||||
//
|
||||
// 主版本
|
||||
// 次版本
|
||||
// 生成号
|
||||
// 修订号
|
||||
//
|
||||
//可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值,
|
||||
// 方法是按如下所示使用“*”: :
|
||||
// [assembly: AssemblyVersion("1.0.*")]
|
||||
[assembly: AssemblyVersion("1.0.0.0")]
|
||||
[assembly: AssemblyFileVersion("1.0.0.0")]
|
||||
Reference in New Issue
Block a user