public MoveThread(MyPanel panel, ArrayList list) { if (panel.mainForm.isSound) { LinesMediaPlayer.moveSound.Play(); } this.panel = panel; this.list = list; timer = new Timer(); timer.Interval = SkinConstants.DelayMove; timer.Tick += new EventHandler(timer_Tick); point = (Point)list[0]; color = panel.gameShape.matrix[point.X, point.Y]; panel.gameShape.matrix[point.X, point.Y] = 0; panel.pieces[point.X, point.Y].color = 0; count = 0; panel.isLocking = true; timer.Start(); }
public AppearenceThread(MyPanel panel, int[,] a) { this.panel = panel; ArrayList list = new ArrayList(); for (int i = 0; i < 9; i++) { for (int j = 0; j < 9; j++) { if (a[i, j] < 0) { list.Add(new Point(i, j)); } } } p = new Point[list.Count]; for (int i = 0; i < list.Count; i++) { p[i] = (Point)list[i]; } len = p.Length; timer = new Timer(); timer.Interval = SkinConstants.DelayAppearence; timer.Tick += new EventHandler(timer_Tick); count = 0; timer.Start(); }
public TimeThread(MyPanel panel) { this.panel = panel; timer = new Timer(); timer.Interval = 1000; timer.Tick += new EventHandler(timer_Tick); timer.Start(); }
public DestructionThread(MyPanel panel, ArrayList list) { if (panel.mainForm.isSound) { LinesMediaPlayer.destroySound.Play(); } this.panel = panel; p = new Point[list.Count]; len = list.Count; for (int i = 0; i < list.Count; i++) { p[i] = (Point)list[i]; } timer = new Timer(); timer.Interval = SkinConstants.DelayDestruction; timer.Tick += new EventHandler(timer_Tick); count = 0; timer.Start(); }
private void MainForm_Load(object sender, EventArgs e) { panel = new MyPanel(this); this.Controls.Add(panel); }