资源简介
VS上运行通过,下载可直接运行,有助于学习C#多线程技术
代码片段和文件信息
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using Dm;
using System.Threading; //多线程
using System.Text.Regularexpressions; //正则表达式
namespace WindowsFormsApplication1
{
public partial class Form1 : Form
{
public Form1()
{ //加载窗体
InitializeComponent();
}
#region “程序集变量“
//private dmsoft dm = new dmsoft();
private Thread[] 线程 = new Thread[30];
private int[] 窗口句柄 = new int[30];
private string[] 线程状态 = new string[30];
private string[] 开始时间 = new string[30];
private dmsoft[] 大漠 = new dmsoft[30];
private int[] 大漠ID = new int[30];
private string 程序路径 = ““;
private bool 表格线程 = false;
private bool 网络验证_通过 = true;
private string 网络验证_用户信息 = ““;
private string 窗口_标题 = “骑士之心“;
private string 窗口_类名 = “KnightageClient“;
//控件变量
int CPU优化 = 0;
string 绑定_屏幕 = ““;
string 绑定_键盘 = ““;
string 绑定_鼠标 = ““;
string 绑定_公共 = ““;
int 绑定_模式 = 0;
bool 热键提示音 = false;
bool 程序窗口置顶 = false;
int 表格_选中索引 = -1;
#endregion
#region “线程:创建/关闭/暂停/继续“
private void 线程_创建(int 操作)
{
if (表格线程)
{
return;
}
控件是否有效(false);
int hwnd;
bool 工作 = false;
hwnd = 返回窗口句柄(操作);
if (hwnd > 0)
{
for (int j = 0; j < 窗口句柄.Length; j++)
{
if (hwnd == 窗口句柄[j])
{
工作 = true;
MessageBox.Show(“窗口已工作“);
break;
}
}//*
if (工作 == false)
{
int i = 线程_找空余位置(hwnd);
if (i >= 0)
{
窗口句柄[i] = hwnd;
开始时间[i] = DateTime.Now.ToString();
线程状态[i] = “正常“;
Thread 初始化 = new Thread(new ParameterizedThreadStart(主程序));
线程[i] = 初始化;
线程[i].IsBackground = true;
线程[i].Start(i);
列表框_置信息(“【开启】—— ID:“ + Convert.ToString(i) + “|“ + “窗口句柄:“ + Convert.ToString(窗口句柄[i]));
表格_置信息(i);
提示音();
}
}//*
}
控件是否有效(true);
}
private void 线程_暂停(int 操作)
{
if (表格线程)
{
return;
}
控件是否有效(false);
int hwnd;
bool 工作 = false;
hwnd = 返回窗口
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 187 2014-09-28 21:47 C\WindowsFormsApplication1\WindowsFormsApplication1\App.config
文件 1026 2014-09-30 17:55 C\WindowsFormsApplication1\WindowsFormsApplication1\bin\Debug\Config.xm
文件 516096 2006-08-18 11:50 C\WindowsFormsApplication1\WindowsFormsApplication1\bin\Debug\IrisSkin2.dll
文件 66048 2014-09-30 17:55 C\WindowsFormsApplication1\WindowsFormsApplication1\bin\Debug\WindowsFormsApplication1.exe
文件 187 2014-09-28 21:47 C\WindowsFormsApplication1\WindowsFormsApplication1\bin\Debug\WindowsFormsApplication1.exe.config
文件 95744 2014-09-30 17:55 C\WindowsFormsApplication1\WindowsFormsApplication1\bin\Debug\WindowsFormsApplication1.pdb
文件 24224 2014-09-30 17:55 C\WindowsFormsApplication1\WindowsFormsApplication1\bin\Debug\WindowsFormsApplication1.vshost.exe
文件 187 2014-09-28 21:47 C\WindowsFormsApplication1\WindowsFormsApplication1\bin\Debug\WindowsFormsApplication1.vshost.exe.config
文件 490 2012-06-06 02:06 C\WindowsFormsApplication1\WindowsFormsApplication1\bin\Debug\WindowsFormsApplication1.vshost.exe.manifest
文件 145050 2014-09-30 16:56 C\WindowsFormsApplication1\WindowsFormsApplication1\bin\Debug\日志\14943562.bmp
文件 145050 2014-09-30 17:40 C\WindowsFormsApplication1\WindowsFormsApplication1\bin\Debug\日志\1511458.bmp
文件 145050 2014-09-30 16:56 C\WindowsFormsApplication1\WindowsFormsApplication1\bin\Debug\日志\30214558.bmp
文件 145050 2014-09-30 17:40 C\WindowsFormsApplication1\WindowsFormsApplication1\bin\Debug\日志\3475188.bmp
文件 33729 2006-03-22 10:24 C\WindowsFormsApplication1\WindowsFormsApplication1\bin\Debug\皮肤\Carlmness\calmness.gif
文件 20139 2006-03-22 10:16 C\WindowsFormsApplication1\WindowsFormsApplication1\bin\Debug\皮肤\Carlmness\Calmness.ssk
文件 20271 2006-03-22 10:16 C\WindowsFormsApplication1\WindowsFormsApplication1\bin\Debug\皮肤\Carlmness\CalmnessColor1.ssk
文件 20208 2006-03-22 10:15 C\WindowsFormsApplication1\WindowsFormsApplication1\bin\Debug\皮肤\Carlmness\CalmnessColor2.ssk
文件 40436 2006-03-22 10:25 C\WindowsFormsApplication1\WindowsFormsApplication1\bin\Debug\皮肤\Carlmness\calmness_color1.gif
文件 50601 2006-03-22 10:26 C\WindowsFormsApplication1\WindowsFormsApplication1\bin\Debug\皮肤\Carlmness\calmness_color2.gif
..A.SH. 18432 2007-07-02 18:42 C\WindowsFormsApplication1\WindowsFormsApplication1\bin\Debug\皮肤\Carlmness\Thumbs.db
文件 18221 2006-03-22 12:22 C\WindowsFormsApplication1\WindowsFormsApplication1\bin\Debug\皮肤\Deep\deepcyan.gif
文件 5032 2006-04-04 15:20 C\WindowsFormsApplication1\WindowsFormsApplication1\bin\Debug\皮肤\Deep\DeepCyan.ssk
文件 17920 2006-03-22 12:23 C\WindowsFormsApplication1\WindowsFormsApplication1\bin\Debug\皮肤\Deep\deepgreen.gif
文件 5037 2006-03-29 12:12 C\WindowsFormsApplication1\WindowsFormsApplication1\bin\Debug\皮肤\Deep\DeepGreen.ssk
文件 20292 2006-03-22 12:24 C\WindowsFormsApplication1\WindowsFormsApplication1\bin\Debug\皮肤\Deep\deeporange.gif
文件 4908 2006-03-29 12:12 C\WindowsFormsApplication1\WindowsFormsApplication1\bin\Debug\皮肤\Deep\DeepOrange.ssk
..A.SH. 17408 2007-07-02 18:42 C\WindowsFormsApplication1\WindowsFormsApplication1\bin\Debug\皮肤\Deep\Thumbs.db
文件 41715 2006-03-22 10:30 C\WindowsFormsApplication1\WindowsFormsApplication1\bin\Debug\皮肤\Emerald\emerald.gif
文件 12666 2006-03-22 06:06 C\WindowsFormsApplication1\WindowsFormsApplication1\bin\Debug\皮肤\Emerald\Emerald.ssk
文件 12261 2006-03-22 06:07 C\WindowsFormsApplication1\WindowsFormsApplication1\bin\Debug\皮肤\Emerald\EmeraldColor1.ssk
............此处省略166个文件信息
- 上一篇:可以用的微信支付.NET版
- 下一篇:社团交流网站设计
评论
共有 条评论