private void butStop_Click(object sender, System.EventArgs e) { ps = null; timer1.Enabled = false; this.Refresh(); }
private void butFountain_Click(object sender, System.EventArgs e) { ps = new PSFountain(MIDDLE_OF_VIEW, Color.FromArgb(0,0,255)); timer1.Enabled = true; }
private void butExplosion_Click(object sender, System.EventArgs e) { ps = new PSExplosion(MIDDLE_OF_VIEW, Color.FromArgb(255,0,0)); timer1.Enabled = true; }
private void butFirework_Click(object sender, System.EventArgs e) { ps = new PSFirework(MIDDLE_OF_VIEW, Color.FromArgb(200,0,255)); timer1.Enabled = true; }
private void timer1_Tick(object sender, System.EventArgs e) { if (!ps.Update()) { picDisplay.Refresh(); ps = null; timer1.Enabled = false; } else { picDisplay.Refresh(); } }