cyzhao %!s(int64=3) %!d(string=hai) anos
pai
achega
71a453e7b6

+ 22 - 0
CSserver/DataTransfer/DataTransfer.csproj

@@ -0,0 +1,22 @@
+<Project Sdk="Microsoft.NET.Sdk">
+
+  <PropertyGroup>
+    <OutputType>Exe</OutputType>
+    <TargetFramework>net5.0</TargetFramework>
+  </PropertyGroup>
+
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
+    <DebugType>full</DebugType>
+    <DebugSymbols>true</DebugSymbols>
+  </PropertyGroup>
+
+  <ItemGroup>
+    <PackageReference Include="MySql.Data" Version="8.0.25" />
+    <PackageReference Include="StackExchange.Redis" Version="2.2.50" />
+  </ItemGroup>
+
+  <ItemGroup>
+    <ProjectReference Include="..\Lib1\Lib1.csproj" />
+  </ItemGroup>
+
+</Project>

+ 54 - 0
CSserver/DataTransfer/Program.cs

@@ -0,0 +1,54 @@
+using System;
+using System.Threading;
+using System.Data;
+
+namespace DataTransfer
+{
+    class Program
+    {
+        static void Main(string[] args)
+        {
+            Console.WriteLine("言灵数据传输开始........");
+
+            Thread t1 = new Thread(transfer);
+            t1.IsBackground = true;
+            t1.Start();
+            
+        }
+
+        public static void transfer()
+        {
+            Console.WriteLine("Hello World!");
+            while (true)
+            {
+
+
+                Console.WriteLine("qqqqqqqqqqqqq");
+                try
+                {
+                    int hour = DateTime.Now.Hour;
+                    //if (hour == 2)//正式的是晚上2点进行数据传输
+                    //{
+                    //    //进行数据传输
+                    //}
+                  
+                    Console.WriteLine("transfer............");
+                    break;
+                }
+                catch (Exception ex)
+                {
+                    Console.WriteLine("transfesssssssssssssssssssr............");
+                    Console.WriteLine(ex.Message);  // 提示套接字监听异常     
+                    break;
+                }
+            }
+         
+            Console.WriteLine("Hello World!3333");
+        } 
+
+        public static void text()
+        {
+            Console.WriteLine("text--------------");
+        }
+    }
+}

+ 9 - 3
CSserver/csserver.sln

@@ -1,7 +1,7 @@
 
 Microsoft Visual Studio Solution File, Format Version 12.00
-# Visual Studio Version 17
-VisualStudioVersion = 17.0.31410.414
+# Visual Studio Version 16
+VisualStudioVersion = 16.0.31005.135
 MinimumVisualStudioVersion = 10.0.40219.1
 Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ChatServer", "csserver\ChatServer.csproj", "{ADB21DA6-E0B4-4218-85F4-59351E635488}"
 EndProject
@@ -11,10 +11,12 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "clientTest", "clientTest\cl
 EndProject
 Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "PBReferens", "PBReferens\PBReferens.csproj", "{03F69CA0-352E-4F6B-A683-5C395F29A3EE}"
 EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Lib1", "Lib1\Lib1.csproj", "{D49EB2E3-949C-48AF-BFCA-E07B171E2715}"
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Lib1", "Lib1\Lib1.csproj", "{D49EB2E3-949C-48AF-BFCA-E07B171E2715}"
 EndProject
 Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Libs", "Libs", "{02C64572-AF0B-4AE0-8685-3836A0FD1C1E}"
 EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DataTransfer", "DataTransfer\DataTransfer.csproj", "{201B65E5-35B6-4AF0-B4DF-8334484BC804}"
+EndProject
 Global
 	GlobalSection(SolutionConfigurationPlatforms) = preSolution
 		Debug|Any CPU = Debug|Any CPU
@@ -41,6 +43,10 @@ Global
 		{D49EB2E3-949C-48AF-BFCA-E07B171E2715}.Debug|Any CPU.Build.0 = Debug|Any CPU
 		{D49EB2E3-949C-48AF-BFCA-E07B171E2715}.Release|Any CPU.ActiveCfg = Release|Any CPU
 		{D49EB2E3-949C-48AF-BFCA-E07B171E2715}.Release|Any CPU.Build.0 = Release|Any CPU
+		{201B65E5-35B6-4AF0-B4DF-8334484BC804}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+		{201B65E5-35B6-4AF0-B4DF-8334484BC804}.Debug|Any CPU.Build.0 = Debug|Any CPU
+		{201B65E5-35B6-4AF0-B4DF-8334484BC804}.Release|Any CPU.ActiveCfg = Release|Any CPU
+		{201B65E5-35B6-4AF0-B4DF-8334484BC804}.Release|Any CPU.Build.0 = Release|Any CPU
 	EndGlobalSection
 	GlobalSection(SolutionProperties) = preSolution
 		HideSolutionNode = FALSE