private void gameReload() { pushAble = false; for (int i = 0; i < gameSpace.RowDefinitions.Count; ++i) { for (int j = 0; j < gameSpace.ColumnDefinitions.Count; ++j) { gameSpace.Children.Remove(this.fone.foneMatrix[i, j]); } } for (int i = 0; i < previewSpace.RowDefinitions.Count; ++i) { for (int j = 0; j < previewSpace.ColumnDefinitions.Count; ++j) { previewSpace.Children.Remove(this.fone.prevMatrix[i, j]); } } fone = new background(gameSpace, previewSpace); this.fone.FigureBackgroundColor = currentColor; optView = new optionsView(); optView.getParent(this); mainTimer.Start(); }
private void mainView_Initialized(object sender, EventArgs e) { fone = new background(gameSpace, previewSpace); optView = new optionsView(); optView.getParent(this); mainTimer = new DispatcherTimer(); mainTimer.Tick += new EventHandler(encreaseStep); mainTimer.Interval = new TimeSpan(0, 0, 0, 0, 400); this.fone.FigureBackgroundColor = currentColor; mainTimer.Start(); }