资源简介
设定计时时间,时间到后音箱发出声音,再次循环,小计时器
生产岗位做节拍器提的需求
代码片段和文件信息
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官方
评论
共有 条评论