課題1 コピペ用(ライブラリ) ( No.7 )
日時: 2020/12/30 21:33
名前: REDCHEEKS

private int _spankSC = 0;
private bool CanSpank()
{
return button1.Text == "尻を引っ込める";
}
private void Spank()
{
_spankSC %= 5;
if(_spankSC == 0)
{
Say("パアン、");
}
else
{
SayAdd("パアン、");
}
_spankSC++;
}
private void Say(string msg)
{
_spankSC = 0;
listBox1.Items.Add(msg);
}
private void SayAdd(string msg)
{
var cnt = listBox1.Items.Count;
if(cnt > 0)
{
listBox1.Items[cnt - 1] += msg;
}
}
private void WaitSec()
{
for (int t = 0; t < 4; t++)
{
System.Threading.Thread.Sleep(250);
Application.DoEvents();
}
}