资源简介
穆运峰的多线程的例子.rar
代码片段和文件信息
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Drawing;
using System.Drawing.Drawing2D;
using System.Drawing.Imaging;
using System.Threading;
namespace BallBouncApp
{
public class Ball
{
public Mutex ballMutex;
public Point ptCenter;
public Size size;
public Color color;
public bool bContinue;
public int dx;
public int dy;
public int slp;
public int R;
public Brush br;
public void Draw(Graphics g)
{
g.FillEllipse(br new Rectangle(ptCenter.X - R ptCenter.Y - R 2 * R 2 * R));
}
public void Move()
{
while (bContinue)
{
ballMutex.WaitOne();
ptCenter.Y += dy;
if (ptCenter.Y >= size.Height || ptCenter.Y <= 0)
{
dy = -dy;
ptCenter.Y += dy;
}
ptCenter.X += dx;
if (ptCenter.X >= size.Width || ptCenter.X <= 0)
{
dx = -dx;
ptCenter.X += dx;
}
ballMutex.ReleaseMutex();
Thread.Sleep(slp);
}
}
}
}
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 143 2018-01-02 10:30 说明.txt
文件 1346 2018-01-01 22:31 BallBouncApp\BallBouncApp\Ball.cs
文件 3772 2018-01-01 22:29 BallBouncApp\BallBouncApp\BallBouncApp.csproj
文件 2884 2018-01-02 10:24 BallBouncApp\BallBouncApp\FormMain.cs
文件 3584 2018-01-01 22:29 BallBouncApp\BallBouncApp\FormMain.Designer.cs
文件 5817 2018-01-01 22:29 BallBouncApp\BallBouncApp\FormMain.resx
文件 496 2018-01-01 20:41 BallBouncApp\BallBouncApp\Program.cs
文件 1356 2018-01-01 20:41 BallBouncApp\BallBouncApp\Properties\AssemblyInfo.cs
文件 2876 2018-01-01 20:41 BallBouncApp\BallBouncApp\Properties\Resources.Designer.cs
文件 5612 2018-01-01 20:41 BallBouncApp\BallBouncApp\Properties\Resources.resx
文件 1099 2018-01-01 20:41 BallBouncApp\BallBouncApp\Properties\Settings.Designer.cs
文件 249 2018-01-01 20:41 BallBouncApp\BallBouncApp\Properties\Settings.settings
文件 901 2018-01-01 22:38 BallBouncApp\BallBouncApp\UpDataUi.cs
文件 878 2018-01-01 20:41 BallBouncApp\BallBouncApp.sln
..A..H. 21504 2018-01-02 10:25 BallBouncApp\BallBouncApp.suo
文件 13938 1998-03-27 08:40 MtGdi02\bounce.cpp
文件 3696 1998-03-27 08:40 MtGdi02\bounce.h
文件 1 2009-08-31 02:32 MtGdi02\ClassDiagram1.cd
文件 3180 1998-03-27 08:40 MtGdi02\hello.cpp
文件 1302 1998-03-27 08:40 MtGdi02\hello.h
文件 766 1998-03-27 08:40 MtGdi02\hello.ico
文件 5044 1998-03-27 08:40 MtGdi02\l.jpn\mtmdi.rc
文件 1814 1998-03-27 08:40 MtGdi02\mainfrm.cpp
文件 1344 1998-03-27 08:40 MtGdi02\mainfrm.h
文件 519 1998-03-27 08:40 MtGdi02\makefile
文件 23284 2014-01-07 16:29 MtGdi02\Mtgdi.aps
文件 2430 1998-03-27 08:40 MtGdi02\mtgdi.clw
文件 3037 1998-03-27 08:40 MtGdi02\mtgdi.cpp
文件 7108 2013-11-29 09:14 MtGdi02\mtgdi.dsp
文件 533 1998-03-27 08:40 MtGdi02\mtgdi.dsw
............此处省略73个文件信息
相关资源
- Concurrency in Go(EarlyRelease) 无水印p
- cfx中ccl语言使用手册
- 单元测试一条龙1.50final
- 金丰300T级进冲床电气控制原理图1
- DSP实验(10次实验有详细步骤)
- HP Compaq 8200 Elite 系列商用台式机
- 2019年软考高级下半年信息系统项目管
- Assembly Language for x86 Processors (7th Ed
- Mule基础教程中文版
- 易语言凡哥记事本V1源码易语言凡哥记
- 易语言码表文本加解密模块源码
- DIR2病毒源代码(汇编语言编写)
- ADC0809的采样控制电路的实现.doc
- CRichEditView显示行号的代码
- STM8S代码例程
- 上海交大计算机图形学课程视频31集
- Source Insight 4.0.0080破解文件 替换lic
- Apk加固Demo
- VMware Workstation Pro 15 注册机
- HumanDet(公交车系统模式识别)
- 基于89C51的智能台灯
- 计算机数值分析.rar
- 水晶排课 11.53 破解版
- 51智能排课系统大课表版v5.1.3中文免费
- 用友U8新引入帐套后固定资产模块出错
- Beginning STM32: Developing with FreeRTOS libo
- 土木工程毕业设计(得了95分)
- 土木工程毕业设计 -大连理工大学
- 八重州 7800电路图 高清版
- PalmOS一些常识
川公网安备 51152502000135号
评论
共有 条评论