raiman
发表于 2021-1-18 23:32
kshhkshhkshhkshhkshhkshhkshhkshh
Cplues
发表于 2021-1-19 20:53
安卓微专业
a0x01
发表于 2021-1-21 10:00
安卓微专业
yaomoon
发表于 2021-2-1 15:26
啥的出发点手法首发是打多少分阿斯顿发阿斯顿发阿道夫
3nc0de
发表于 2021-2-10 16:38
安卓微专业
ryyh
发表于 2021-2-10 16:54
安卓微专业
limengran
发表于 2021-2-10 17:13
安卓微专业 [修改]
sarayaki
发表于 2021-2-10 17:18
安卓微专业
dpblue
发表于 2021-2-10 18:33
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 WFFormUse
{
public partial class FrmTimer : Form
{
public FrmTimer()
{
InitializeComponent();
}
//每隔指定的时间间隔就会触发
private void timer1_Tick(object sender, EventArgs e)
{
lblDateTime.Text = DateTime.Now.ToString();
}
System.Threading.Timer timer4;
private void FrmTimer_Load(object sender, EventArgs e)
{
//UI
lblDateTime.Text = DateTime.Now.ToString();
timer1.Enabled = true;
//服务
System.Timers.Timer timer3 = new System.Timers.Timer();
timer3.Interval = 1000;
//timer3.AutoReset = false;//只会引发一次,就停止了
timer3.Elapsed += Timer3_Elapsed;
timer3.Start();
//多线程
//period时间间隔0或-1 只会执行一 次,然后就停止
//Change 可以让计时器重新启动
//停止 period0 -1 timer4.Dispose()
int count2 = 0;
timer4 = new System.Threading.Timer(new System.Threading.TimerCallback(o => {
count2 += 2;
Action<int> act = ShowCount;
this.Invoke(act, count2);
}), null, 1000,1000);
//timer4.Change(2000, 2000);//改变延迟启动时间和时间间隔
}
private void ShowCount(int cout)
{
txtCount.Text = cout.ToString();
if (cout > 50)
timer4.Dispose();
}
int count = 0;
private void Timer3_Elapsed(object sender, System.Timers.ElapsedEventArgs e)
{
//lblDt2.Text= DateTime.Now.ToString();
count += 1;
Action act = UpdateTime;
this.Invoke(act);
if(count >10)
{
System.Timers.Timer timer = (System.Timers.Timer)sender;
timer.Stop();
}
}
private void UpdateTime()
{
lblDt2.Text = DateTime.Now.ToString();
}
}
}
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 WFFormUse
{
public partial class FrmTimer : Form
{
public FrmTimer()
{
InitializeComponent();
}
//每隔指定的时间间隔就会触发
private void timer1_Tick(object sender, EventArgs e)
{
lblDateTime.Text = DateTime.Now.ToString();
}
System.Threading.Timer timer4;
private void FrmTimer_Load(object sender, EventArgs e)
{
//UI
lblDateTime.Text = DateTime.Now.ToString();
timer1.Enabled = true;
//服务
System.Timers.Timer timer3 = new System.Timers.Timer();
timer3.Interval = 1000;
//timer3.AutoReset = false;//只会引发一次,就停止了
timer3.Elapsed += Timer3_Elapsed;
timer3.Start();
//多线程
//period时间间隔0或-1 只会执行一 次,然后就停止
//Change 可以让计时器重新启动
//停止 period0 -1 timer4.Dispose()
int count2 = 0;
timer4 = new System.Threading.Timer(new System.Threading.TimerCallback(o => {
count2 += 2;
Action<int> act = ShowCount;
this.Invoke(act, count2);
}), null, 1000,1000);
//timer4.Change(2000, 2000);//改变延迟启动时间和时间间隔
}
private void ShowCount(int cout)
{
txtCount.Text = cout.ToString();
if (cout > 50)
timer4.Dispose();
}
int count = 0;
private void Timer3_Elapsed(object sender, System.Timers.ElapsedEventArgs e)
{
//lblDt2.Text= DateTime.Now.ToString();
count += 1;
Action act = UpdateTime;
this.Invoke(act);
if(count >10)
{
System.Timers.Timer timer = (System.Timers.Timer)sender;
timer.Stop();
}
}
private void UpdateTime()
{
lblDt2.Text = DateTime.Now.ToString();
}
}
}
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 WFFormUse
{
public partial class FrmTimer : Form
{
public FrmTimer()
{
InitializeComponent();
}
//每隔指定的时间间隔就会触发
private void timer1_Tick(object sender, EventArgs e)
{
lblDateTime.Text = DateTime.Now.ToString();
}
System.Threading.Timer timer4;
private void FrmTimer_Load(object sender, EventArgs e)
{
//UI
lblDateTime.Text = DateTime.Now.ToString();
timer1.Enabled = true;
//服务
System.Timers.Timer timer3 = new System.Timers.Timer();
timer3.Interval = 1000;
//timer3.AutoReset = false;//只会引发一次,就停止了
timer3.Elapsed += Timer3_Elapsed;
timer3.Start();
//多线程
//period时间间隔0或-1 只会执行一 次,然后就停止
//Change 可以让计时器重新启动
//停止 period0 -1 timer4.Dispose()
int count2 = 0;
timer4 = new System.Threading.Timer(new System.Threading.TimerCallback(o => {
count2 += 2;
Action<int> act = ShowCount;
this.Invoke(act, count2);
}), null, 1000,1000);
//timer4.Change(2000, 2000);//改变延迟启动时间和时间间隔
}
private void ShowCount(int cout)
{
txtCount.Text = cout.ToString();
if (cout > 50)
timer4.Dispose();
}
int count = 0;
private void Timer3_Elapsed(object sender, System.Timers.ElapsedEventArgs e)
{
//lblDt2.Text= DateTime.Now.ToString();
count += 1;
Action act = UpdateTime;
this.Invoke(act);
if(count >10)
{
System.Timers.Timer timer = (System.Timers.Timer)sender;
timer.Stop();
}
}
private void UpdateTime()
{
lblDt2.Text = DateTime.Now.ToString();
}
}
}
佚名24
发表于 2021-2-10 20:24
6666666666666666
页:
2
3
4
5
6
7
8
9
10
11
[12]
13
14