資源簡介
設定計時時間,時間到后音箱發出聲音,再次循環,小計時器
生產崗位做節拍器提的需求
代碼片段和文件信息
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;
namespace?WindowsFormsTime
{
????public?partial?class?Form1?:?Form
????{
????????public?int?A_stcnt;
????????public?int?A_time;
????????public?Form1()
????????{
????????????InitializeComponent();
????????}
????????private?void?timer1_Tick(object?sender?EventArgs?e)
????????{
????????????A_stcnt?=?A_stcnt-1;
????????????if?(A_stcnt?<=?0)
????????????{
????????????????A_stcnt?=?A_time;
????????????????System.Media.SoundPlayer?player?=?new?System.Media.SoundPlayer(Properties.Resources._123);
???????????????//?player.SoundLocation?=?@“D:\kf-dzh\3.C#Ap
- 上一篇:C#和halcon編程(讀取圖片)
- 下一篇:.net core EF6官方
評論
共有 條評論