First in 202205060145

This commit is contained in:
Youmu_Liu_NLI
2022-05-06 01:45:42 +08:00
commit bd948f60d6
243 changed files with 583275 additions and 0 deletions
+6
View File
@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.7.2" />
</startup>
</configuration>
+92
View File
@@ -0,0 +1,92 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Threading;
using System.Timers;
using System.Windows.Forms;
namespace Threading_Demo3
{
class Program
{
static void Main(string[] args)
{
demo demo1 = new demo();
demo1.spin ();
Console.ReadLine();
}
}
class demo
{
private Action action1 { get; set; }
private Action action2 { get; set; }
private Action action3 { get; set; }
private Action action4 { get; set; }
private int count { get; set; }
private int count1 { get; set; }
public System.Timers.Timer timer1 { get; set; }
public demo()
{
this.action1 = new Action(this.say);
this.action2 = new Action(this.spin);
this.action3 = new Action(this.spin2);
this.action3 = new Action(this.spin3);
this.count = 0;
this.count1 = 0;
this.timer1 = new System.Timers.Timer();
this.timer1.Interval = 15;
this.timer1.Elapsed += this.say2;
}
private void spin2()
{
Thread.Sleep(12);
this.action1.Invoke();
this.action4.Invoke();
}
private void spin3()
{
Thread.Sleep(11);
if (count<=180)
{
this.action1.Invoke();
this.action2.Invoke();
}
}
private void say2(object sender, ElapsedEventArgs e)
{
this.count1++;
if (this.count1 <= 180)
{
Console.WriteLine("{0}\tLong Live TouHou!\t{1}", count1.ToString(), DateTime.UtcNow.ToString());
}
else
{
this.timer1.Stop();
}
}
private void say()
{
this.count++;
Console.WriteLine("{0}\tLong Live TouHou!\t{1}",count.ToString(),DateTime.UtcNow.ToString());
Form forms = new Form();
forms.Text = DateTime.UtcNow.ToString();
forms.ShowDialog();
Thread.Sleep(50);
forms.Close ();
}
public void spin()
{
Thread.Sleep(12);
this.action1.Invoke();
this.action3.Invoke();
}
}
}
@@ -0,0 +1,36 @@
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// 有关程序集的一般信息由以下
// 控制。更改这些特性值可修改
// 与程序集关联的信息。
[assembly: AssemblyTitle("ConsoleApp1")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("ConsoleApp1")]
[assembly: AssemblyCopyright("Copyright © 2021")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
// 将 ComVisible 设置为 false 会使此程序集中的类型
//对 COM 组件不可见。如果需要从 COM 访问此程序集中的类型
//请将此类型的 ComVisible 特性设置为 true。
[assembly: ComVisible(false)]
// 如果此项目向 COM 公开,则下列 GUID 用于类型库的 ID
[assembly: Guid("53eaa6ae-6c72-4f64-b3c0-ec660c4431fc")]
// 程序集的版本信息由下列四个值组成:
//
// 主版本
// 次版本
// 生成号
// 修订号
//
//可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值
//通过使用 "*",如下所示:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]
@@ -0,0 +1,67 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" 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>{53EAA6AE-6C72-4F64-B3C0-EC660C4431FC}</ProjectGuid>
<OutputType>Exe</OutputType>
<RootNamespace>ConsoleApp1</RootNamespace>
<AssemblyName>ConsoleApp1</AssemblyName>
<TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
<Deterministic>true</Deterministic>
<NuGetPackageImportStamp>
</NuGetPackageImportStamp>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<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' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="OpenCL.Net, Version=2.2.9.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\THCCD Demo\packages\OpenCL.Net.2.2.9.0\lib\net40\OpenCL.Net.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Windows.Forms" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Data" />
<Reference Include="System.Net.Http" />
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="Program.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
<ItemGroup>
<None Include="App.config" />
<None Include="packages.config" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<Import Project="..\THCCD Demo\packages\OpenCL.Net.2.2.9.0\build\net40\OpenCL.Net.targets" Condition="Exists('..\THCCD Demo\packages\OpenCL.Net.2.2.9.0\build\net40\OpenCL.Net.targets')" />
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
<PropertyGroup>
<ErrorText>这台计算机上缺少此项目引用的 NuGet 程序包。使用“NuGet 程序包还原”可下载这些程序包。有关更多信息,请参见 http://go.microsoft.com/fwlink/?LinkID=322105。缺少的文件是 {0}。</ErrorText>
</PropertyGroup>
<Error Condition="!Exists('..\THCCD Demo\packages\OpenCL.Net.2.2.9.0\build\net40\OpenCL.Net.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\THCCD Demo\packages\OpenCL.Net.2.2.9.0\build\net40\OpenCL.Net.targets'))" />
</Target>
</Project>
Binary file not shown.
@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.7.2" />
</startup>
</configuration>
Binary file not shown.
@@ -0,0 +1,4 @@
// <autogenerated />
using System;
using System.Reflection;
[assembly: global::System.Runtime.Versioning.TargetFrameworkAttribute(".NETFramework,Version=v4.7.2", FrameworkDisplayName = ".NET Framework 4.7.2")]
Binary file not shown.
Binary file not shown.
@@ -0,0 +1 @@
277526e6458b7c0ee0115c49957c0929904d1374
@@ -0,0 +1,7 @@
D:\荷城工业\研究项目\1-旗舰级\东方同人TH2020\工程\源代码\Demo\ConsoleApp1\bin\Debug\ConsoleApp1.exe.config
D:\荷城工业\研究项目\1-旗舰级\东方同人TH2020\工程\源代码\Demo\ConsoleApp1\bin\Debug\ConsoleApp1.exe
D:\荷城工业\研究项目\1-旗舰级\东方同人TH2020\工程\源代码\Demo\ConsoleApp1\bin\Debug\ConsoleApp1.pdb
D:\荷城工业\研究项目\1-旗舰级\东方同人TH2020\工程\源代码\Demo\ConsoleApp1\obj\Debug\Threading Demo3.csproj.CoreCompileInputs.cache
D:\荷城工业\研究项目\1-旗舰级\东方同人TH2020\工程\源代码\Demo\ConsoleApp1\obj\Debug\ConsoleApp1.exe
D:\荷城工业\研究项目\1-旗舰级\东方同人TH2020\工程\源代码\Demo\ConsoleApp1\obj\Debug\ConsoleApp1.pdb
D:\荷城工业\研究项目\1-旗舰级\东方同人TH2020\工程\源代码\Demo\ConsoleApp1\obj\Debug\Threading Demo3.csproj.AssemblyReference.cache
@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="OpenCL.Net" version="2.2.9.0" targetFramework="net472" />
</packages>
+6
View File
@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.7.2" />
</startup>
</configuration>
@@ -0,0 +1,38 @@
using System;
using System.Windows;
using System.Windows.Forms;
namespace FormDemo
{
class Program
{
static void Main()
{
MyForm MainForm = new MyForm("Main Waindow");
MainForm.ShowDialog();
}
}
class MyForm : Form
{
private Button NewButton;
private TextBox Output;
public MyForm(string FormName)
{
Form NewForm = new Form();
this.Text= FormName;
this.Output=new TextBox();
this.NewButton = new Button();
this.Controls.Add(this.NewButton);
this.Controls.Add(this.Output);
this.NewButton.Text = "ShowHello";
this.NewButton.Top = 20;
this.NewButton.Click += ButtonClicked;
}
private void ButtonClicked(object sender, EventArgs e)
{
this.Output.Text = "Hello World";
}
}
}
+51
View File
@@ -0,0 +1,51 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" 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>{26B67F06-5B9B-4B06-BFAA-FCCF9A11D391}</ProjectGuid>
<OutputType>WinExe</OutputType>
<RootNamespace>Project1</RootNamespace>
<AssemblyName>FormDemo</AssemblyName>
<TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
<Deterministic>true</Deterministic>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<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' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup>
<StartupObject>FormDemo.Program</StartupObject>
</PropertyGroup>
<ItemGroup>
<None Include="App.config" />
</ItemGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Windows" />
<Reference Include="System.Windows.Forms" />
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="NewFolder1\CodeFile1.cs" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project>
Binary file not shown.
@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.7.2" />
</startup>
</configuration>
Binary file not shown.
@@ -0,0 +1,4 @@
// <autogenerated />
using System;
using System.Reflection;
[assembly: global::System.Runtime.Versioning.TargetFrameworkAttribute(".NETFramework,Version=v4.7.2", FrameworkDisplayName = ".NET Framework 4.7.2")]
Binary file not shown.
Binary file not shown.
@@ -0,0 +1 @@
53d736cea3461863c247af0cb99304dfd8a84069
@@ -0,0 +1,8 @@
D:\荷城工业\研究项目\1-旗舰级\东方同人TH2020\工程\源代码\Demo\Project1\obj\Debug\Project1.csproj.AssemblyReference.cache
D:\荷城工业\研究项目\1-旗舰级\东方同人TH2020\工程\源代码\Demo\Project1\obj\Debug\Project1.csproj.SuggestedBindingRedirects.cache
D:\荷城工业\研究项目\1-旗舰级\东方同人TH2020\工程\源代码\Demo\Project1\obj\Debug\Project1.csproj.CoreCompileInputs.cache
D:\荷城工业\研究项目\1-旗舰级\东方同人TH2020\工程\源代码\Demo\Project1\bin\Debug\FormDemo.exe.config
D:\荷城工业\研究项目\1-旗舰级\东方同人TH2020\工程\源代码\Demo\Project1\bin\Debug\FormDemo.exe
D:\荷城工业\研究项目\1-旗舰级\东方同人TH2020\工程\源代码\Demo\Project1\bin\Debug\FormDemo.pdb
D:\荷城工业\研究项目\1-旗舰级\东方同人TH2020\工程\源代码\Demo\Project1\obj\Debug\FormDemo.exe
D:\荷城工业\研究项目\1-旗舰级\东方同人TH2020\工程\源代码\Demo\Project1\obj\Debug\FormDemo.pdb
@@ -0,0 +1,11 @@
{
"Version": 1,
"ProjectMap": {
"26b67f06-5b9b-4b06-bfaa-fccf9a11d391": {
"ProjectGuid": "26b67f06-5b9b-4b06-bfaa-fccf9a11d391",
"DisplayName": "Project1",
"ColorIndex": 0
}
},
"NextColorIndex": 1
}
Binary file not shown.
Binary file not shown.
+6
View File
@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.7.2" />
</startup>
</configuration>
+47
View File
@@ -0,0 +1,47 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Threading;
using System.Timers;
namespace THCCD_Demo
{
class Program
{
static void Main(string[] args)
{
System.Timers.Timer mainTimer = new System.Timers.Timer();
Say sentence = new Say();
mainTimer.Interval = 1000.0 / 60.0;
//Timer.interval属性是一个double类型参数,可以是小数,理论可以用于THCCD的游戏时钟。
Console.WriteLine(mainTimer.Interval);
mainTimer.Elapsed += sentence.say;
mainTimer.Start();
Console.ReadLine();
}
}
class Say
{
private int count;
public Say()
{
this.count = 0;
}
internal void say(object sender, ElapsedEventArgs e)
{
this.count++;
if (count <= 60)
{
Console.WriteLine("Long live TouHou!");
Console.WriteLine(DateTime.UtcNow.ToString());
}
}
}
}
@@ -0,0 +1,36 @@
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// 有关程序集的一般信息由以下
// 控制。更改这些特性值可修改
// 与程序集关联的信息。
[assembly: AssemblyTitle("THCCD Demo")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("THCCD Demo")]
[assembly: AssemblyCopyright("Copyright © 2021")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
// 将 ComVisible 设置为 false 会使此程序集中的类型
//对 COM 组件不可见。如果需要从 COM 访问此程序集中的类型
//请将此类型的 ComVisible 特性设置为 true。
[assembly: ComVisible(false)]
// 如果此项目向 COM 公开,则下列 GUID 用于类型库的 ID
[assembly: Guid("63873377-e0ba-4d4b-b560-8ad3bdff7bb2")]
// 程序集的版本信息由下列四个值组成:
//
// 主版本
// 次版本
// 生成号
// 修订号
//
//可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值
//通过使用 "*",如下所示:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]
+49
View File
@@ -0,0 +1,49 @@
Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 17
VisualStudioVersion = 17.0.32112.339
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Timer Demo", "Timer Demo.csproj", "{63873377-E0BA-4D4B-B560-8AD3BDFF7BB2}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ThreadingTimersDemo", "..\ThreadingTimersDemo\ThreadingTimersDemo.csproj", "{527292DD-1BE3-4E95-A49C-E29216D6234D}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Threding Demo2", "..\Threding Demo2\Threding Demo2.csproj", "{BCDD3037-9193-4881-AC65-E02BED9704D0}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Threading Demo3", "..\ConsoleApp1\Threading Demo3.csproj", "{53EAA6AE-6C72-4F64-B3C0-EC660C4431FC}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Project1", "..\Project1\Project1.csproj", "{26B67F06-5B9B-4B06-BFAA-FCCF9A11D391}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{63873377-E0BA-4D4B-B560-8AD3BDFF7BB2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{63873377-E0BA-4D4B-B560-8AD3BDFF7BB2}.Debug|Any CPU.Build.0 = Debug|Any CPU
{63873377-E0BA-4D4B-B560-8AD3BDFF7BB2}.Release|Any CPU.ActiveCfg = Release|Any CPU
{63873377-E0BA-4D4B-B560-8AD3BDFF7BB2}.Release|Any CPU.Build.0 = Release|Any CPU
{527292DD-1BE3-4E95-A49C-E29216D6234D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{527292DD-1BE3-4E95-A49C-E29216D6234D}.Debug|Any CPU.Build.0 = Debug|Any CPU
{527292DD-1BE3-4E95-A49C-E29216D6234D}.Release|Any CPU.ActiveCfg = Release|Any CPU
{527292DD-1BE3-4E95-A49C-E29216D6234D}.Release|Any CPU.Build.0 = Release|Any CPU
{BCDD3037-9193-4881-AC65-E02BED9704D0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{BCDD3037-9193-4881-AC65-E02BED9704D0}.Debug|Any CPU.Build.0 = Debug|Any CPU
{BCDD3037-9193-4881-AC65-E02BED9704D0}.Release|Any CPU.ActiveCfg = Release|Any CPU
{BCDD3037-9193-4881-AC65-E02BED9704D0}.Release|Any CPU.Build.0 = Release|Any CPU
{53EAA6AE-6C72-4F64-B3C0-EC660C4431FC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{53EAA6AE-6C72-4F64-B3C0-EC660C4431FC}.Debug|Any CPU.Build.0 = Debug|Any CPU
{53EAA6AE-6C72-4F64-B3C0-EC660C4431FC}.Release|Any CPU.ActiveCfg = Release|Any CPU
{53EAA6AE-6C72-4F64-B3C0-EC660C4431FC}.Release|Any CPU.Build.0 = Release|Any CPU
{26B67F06-5B9B-4B06-BFAA-FCCF9A11D391}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{26B67F06-5B9B-4B06-BFAA-FCCF9A11D391}.Debug|Any CPU.Build.0 = Debug|Any CPU
{26B67F06-5B9B-4B06-BFAA-FCCF9A11D391}.Release|Any CPU.ActiveCfg = Release|Any CPU
{26B67F06-5B9B-4B06-BFAA-FCCF9A11D391}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {F6AD5A92-EBAB-4F5B-AF26-B99E38F52553}
EndGlobalSection
EndGlobal
@@ -0,0 +1,54 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" 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>{63873377-E0BA-4D4B-B560-8AD3BDFF7BB2}</ProjectGuid>
<OutputType>Exe</OutputType>
<RootNamespace>THCCD_Demo</RootNamespace>
<AssemblyName>THCCD Demo</AssemblyName>
<TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
<Deterministic>true</Deterministic>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<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' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<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.Windows.Forms" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Data" />
<Reference Include="System.Net.Http" />
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="Program.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
<ItemGroup>
<None Include="App.config" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project>
Binary file not shown.
@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.7.2" />
</startup>
</configuration>
Binary file not shown.
@@ -0,0 +1,4 @@
// <autogenerated />
using System;
using System.Reflection;
[assembly: global::System.Runtime.Versioning.TargetFrameworkAttribute(".NETFramework,Version=v4.7.2", FrameworkDisplayName = ".NET Framework 4.7.2")]
@@ -0,0 +1 @@
7f4b213b428f4c013f19137338418ee1f5525793
@@ -0,0 +1,7 @@
D:\荷城工业\研究项目\1-旗舰级\东方同人TH2020\工程\源代码\Demo\THCCD Demo\bin\Debug\THCCD Demo.exe.config
D:\荷城工业\研究项目\1-旗舰级\东方同人TH2020\工程\源代码\Demo\THCCD Demo\bin\Debug\THCCD Demo.exe
D:\荷城工业\研究项目\1-旗舰级\东方同人TH2020\工程\源代码\Demo\THCCD Demo\bin\Debug\THCCD Demo.pdb
D:\荷城工业\研究项目\1-旗舰级\东方同人TH2020\工程\源代码\Demo\THCCD Demo\obj\Debug\THCCD Demo.csproj.AssemblyReference.cache
D:\荷城工业\研究项目\1-旗舰级\东方同人TH2020\工程\源代码\Demo\THCCD Demo\obj\Debug\THCCD Demo.csproj.CoreCompileInputs.cache
D:\荷城工业\研究项目\1-旗舰级\东方同人TH2020\工程\源代码\Demo\THCCD Demo\obj\Debug\THCCD Demo.exe
D:\荷城工业\研究项目\1-旗舰级\东方同人TH2020\工程\源代码\Demo\THCCD Demo\obj\Debug\THCCD Demo.pdb
Binary file not shown.
Binary file not shown.
@@ -0,0 +1 @@
7f4b213b428f4c013f19137338418ee1f5525793
@@ -0,0 +1,7 @@
D:\荷城工业\研究项目\1-旗舰级\东方同人TH2020\工程\源代码\Demo\THCCD Demo\bin\Debug\THCCD Demo.exe.config
D:\荷城工业\研究项目\1-旗舰级\东方同人TH2020\工程\源代码\Demo\THCCD Demo\bin\Debug\THCCD Demo.exe
D:\荷城工业\研究项目\1-旗舰级\东方同人TH2020\工程\源代码\Demo\THCCD Demo\bin\Debug\THCCD Demo.pdb
D:\荷城工业\研究项目\1-旗舰级\东方同人TH2020\工程\源代码\Demo\THCCD Demo\obj\Debug\Timer Demo.csproj.CoreCompileInputs.cache
D:\荷城工业\研究项目\1-旗舰级\东方同人TH2020\工程\源代码\Demo\THCCD Demo\obj\Debug\THCCD Demo.exe
D:\荷城工业\研究项目\1-旗舰级\东方同人TH2020\工程\源代码\Demo\THCCD Demo\obj\Debug\THCCD Demo.pdb
D:\荷城工业\研究项目\1-旗舰级\东方同人TH2020\工程\源代码\Demo\THCCD Demo\obj\Debug\Timer Demo.csproj.AssemblyReference.cache
@@ -0,0 +1,22 @@
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<CoreCompileDependsOn>$(CoreCompileDependsOn);Kernel</CoreCompileDependsOn>
</PropertyGroup>
<ItemGroup>
<AvailableItemName Include="Kernel"/>
</ItemGroup>
<UsingTask TaskName="OpenCL.Net.Tasks.Kernel" AssemblyFile="..\..\lib\net40\OpenCL.Net.dll" />
<Target Name="Kernel" Inputs="@(Kernel)" Outputs="@(Kernel->'$(IntermediateOutputPath)%(FileName).kernel.cs')">
<Kernel InputFiles="@(Kernel)" OutputFiles="@(Kernel->'$(IntermediateOutputPath)%(FileName).kernel.cs')">
<Output TaskParameter="OutputFiles" ItemName="KernelWrapper"/>
</Kernel>
</Target>
<ItemGroup>
<Compile Include="@(Kernel->'$(IntermediateOutputPath)%(FileName).kernel.cs')">
<CopyToOutputDirectory>Never</CopyToOutputDirectory>
</Compile>
<Content Include="@(Kernel)">
<CopyToOutputDirectory>%(CopyToOutputDirectory)</CopyToOutputDirectory>
</Content>
</ItemGroup>
</Project>
@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.7.2" />
</startup>
</configuration>
@@ -0,0 +1,54 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Threading;
using System.Timers;
namespace ThreadingTimersDemo
{
class Program
{
static void Main(string[] args)
{
say say = new say();
say.Spin();
int count = 0;
while (true)
{
Thread.Sleep(16);
count++;
Console.WriteLine("{0}\t{1}",count,DateTime.UtcNow.ToString());
}
}
}
class say
{
public Action Repeat { get; set; }
public Action Operation { get; set; }
public int Count { get; set; }
public say()
{
Repeat = new Action(this.Spin);
Operation = new Action(this.SaySentence );
}
public void Spin()
{
Thread.Sleep(16);
if (this.Count<=600)
{
this.Operation.Invoke();
this.Count++;
this.Repeat.Invoke();
}
}
public void SaySentence()
{
//Console.WriteLine("Long Live TouHou!");
//Console.WriteLine(DateTime.UtcNow.ToString());
//Console.WriteLine(this.Count );
Console.WriteLine("{0}\t{1}",this.Count.ToString(),DateTime.UtcNow.ToString());
}
}
}
@@ -0,0 +1,36 @@
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// 有关程序集的一般信息由以下
// 控制。更改这些特性值可修改
// 与程序集关联的信息。
[assembly: AssemblyTitle("ThreadingTimersDemo")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("ThreadingTimersDemo")]
[assembly: AssemblyCopyright("Copyright © 2021")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
// 将 ComVisible 设置为 false 会使此程序集中的类型
//对 COM 组件不可见。如果需要从 COM 访问此程序集中的类型
//请将此类型的 ComVisible 特性设置为 true。
[assembly: ComVisible(false)]
// 如果此项目向 COM 公开,则下列 GUID 用于类型库的 ID
[assembly: Guid("527292dd-1be3-4e95-a49c-e29216d6234d")]
// 程序集的版本信息由下列四个值组成:
//
// 主版本
// 次版本
// 生成号
// 修订号
//
//可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值
//通过使用 "*",如下所示:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]
@@ -0,0 +1,53 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" 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>{527292DD-1BE3-4E95-A49C-E29216D6234D}</ProjectGuid>
<OutputType>Exe</OutputType>
<RootNamespace>ThreadingTimersDemo</RootNamespace>
<AssemblyName>ThreadingTimersDemo</AssemblyName>
<TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
<Deterministic>true</Deterministic>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<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' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<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="Microsoft.CSharp" />
<Reference Include="System.Data" />
<Reference Include="System.Net.Http" />
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="Program.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
<ItemGroup>
<None Include="App.config" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project>
@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.7.2" />
</startup>
</configuration>
@@ -0,0 +1,4 @@
// <autogenerated />
using System;
using System.Reflection;
[assembly: global::System.Runtime.Versioning.TargetFrameworkAttribute(".NETFramework,Version=v4.7.2", FrameworkDisplayName = ".NET Framework 4.7.2")]
@@ -0,0 +1 @@
7f4b213b428f4c013f19137338418ee1f5525793
@@ -0,0 +1,7 @@
D:\荷城工业\研究项目\1-旗舰级\东方同人TH2020\工程\源代码\Demo\ThreadingTimersDemo\bin\Debug\ThreadingTimersDemo.exe.config
D:\荷城工业\研究项目\1-旗舰级\东方同人TH2020\工程\源代码\Demo\ThreadingTimersDemo\bin\Debug\ThreadingTimersDemo.exe
D:\荷城工业\研究项目\1-旗舰级\东方同人TH2020\工程\源代码\Demo\ThreadingTimersDemo\bin\Debug\ThreadingTimersDemo.pdb
D:\荷城工业\研究项目\1-旗舰级\东方同人TH2020\工程\源代码\Demo\ThreadingTimersDemo\obj\Debug\ThreadingTimersDemo.csproj.AssemblyReference.cache
D:\荷城工业\研究项目\1-旗舰级\东方同人TH2020\工程\源代码\Demo\ThreadingTimersDemo\obj\Debug\ThreadingTimersDemo.csproj.CoreCompileInputs.cache
D:\荷城工业\研究项目\1-旗舰级\东方同人TH2020\工程\源代码\Demo\ThreadingTimersDemo\obj\Debug\ThreadingTimersDemo.exe
D:\荷城工业\研究项目\1-旗舰级\东方同人TH2020\工程\源代码\Demo\ThreadingTimersDemo\obj\Debug\ThreadingTimersDemo.pdb
+6
View File
@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.7.2" />
</startup>
</configuration>
+41
View File
@@ -0,0 +1,41 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Threading;
using System.Diagnostics;
namespace Threding_Demo2
{
class Program
{
static void Main(string[] args)
{
long frequency = Stopwatch.Frequency;
Console.WriteLine("Timer frequency in ticks per second = {0}",frequency);
long nanosecPerTick = (1000L * 1000L * 1000L) / frequency;
Console.WriteLine("Timer is accurate within {0} nanoseconds",nanosecPerTick);
}
}
class demo
{
public Stopwatch Stopwatcher { get; set; }
public demo()
{
this.Stopwatcher = new Stopwatch();
}
public void PreSpin(Stopwatch a, double duration)
{
var current = a.ElapsedTicks;
while ((a.ElapsedTicks-current)<duration )
{
Thread.SpinWait(10);
}
}
public void Spin(Stopwatch a, double duration)
{
this.PreSpin(a,duration);
}
}
}
@@ -0,0 +1,36 @@
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// 有关程序集的一般信息由以下
// 控制。更改这些特性值可修改
// 与程序集关联的信息。
[assembly: AssemblyTitle("Threding Demo2")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("Threding Demo2")]
[assembly: AssemblyCopyright("Copyright © 2021")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
// 将 ComVisible 设置为 false 会使此程序集中的类型
//对 COM 组件不可见。如果需要从 COM 访问此程序集中的类型
//请将此类型的 ComVisible 特性设置为 true。
[assembly: ComVisible(false)]
// 如果此项目向 COM 公开,则下列 GUID 用于类型库的 ID
[assembly: Guid("bcdd3037-9193-4881-ac65-e02bed9704d0")]
// 程序集的版本信息由下列四个值组成:
//
// 主版本
// 次版本
// 生成号
// 修订号
//
//可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值
//通过使用 "*",如下所示:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]
@@ -0,0 +1,53 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" 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>{BCDD3037-9193-4881-AC65-E02BED9704D0}</ProjectGuid>
<OutputType>Exe</OutputType>
<RootNamespace>Threding_Demo2</RootNamespace>
<AssemblyName>Threding Demo2</AssemblyName>
<TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
<Deterministic>true</Deterministic>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<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' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<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="Microsoft.CSharp" />
<Reference Include="System.Data" />
<Reference Include="System.Net.Http" />
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="Program.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
<ItemGroup>
<None Include="App.config" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project>
@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.7.2" />
</startup>
</configuration>
@@ -0,0 +1,4 @@
// <autogenerated />
using System;
using System.Reflection;
[assembly: global::System.Runtime.Versioning.TargetFrameworkAttribute(".NETFramework,Version=v4.7.2", FrameworkDisplayName = ".NET Framework 4.7.2")]
@@ -0,0 +1 @@
7f4b213b428f4c013f19137338418ee1f5525793
@@ -0,0 +1,8 @@
D:\荷城工业\研究项目\1-旗舰级\东方同人TH2020\工程\源代码\Demo\Threding Demo2\bin\Debug\Threding Demo2.exe.config
D:\荷城工业\研究项目\1-旗舰级\东方同人TH2020\工程\源代码\Demo\Threding Demo2\bin\Debug\Threding Demo2.exe
D:\荷城工业\研究项目\1-旗舰级\东方同人TH2020\工程\源代码\Demo\Threding Demo2\bin\Debug\Threding Demo2.pdb
D:\荷城工业\研究项目\1-旗舰级\东方同人TH2020\工程\源代码\Demo\Threding Demo2\obj\Debug\Threding Demo2.csproj.AssemblyReference.cache
D:\荷城工业\研究项目\1-旗舰级\东方同人TH2020\工程\源代码\Demo\Threding Demo2\obj\Debug\Threding Demo2.csproj.CoreCompileInputs.cache
D:\荷城工业\研究项目\1-旗舰级\东方同人TH2020\工程\源代码\Demo\Threding Demo2\obj\Debug\Threding Demo2.exe
D:\荷城工业\研究项目\1-旗舰级\东方同人TH2020\工程\源代码\Demo\Threding Demo2\obj\Debug\Threding Demo2.pdb
D:\荷城工业\研究项目\1-旗舰级\东方同人TH2020\工程\源代码\Demo\Threding Demo2\obj\Debug\Threding Demo2.csproj.SuggestedBindingRedirects.cache