void ReleaseDesignerOutlets() { if (SystemTrayStatusMenu != null) { SystemTrayStatusMenu.Dispose(); SystemTrayStatusMenu = null; } if (MyMainMenu != null) { MyMainMenu.Dispose(); MyMainMenu = null; } }
public Controller(MainWindow mainWindow, Grid MainGrid, ref MyLabel[,] CellsArray, Label timeLabel) { this.mainWindow = mainWindow; this.MainGrid = MainGrid; this.CellsArray = CellsArray; this.timeLabel = timeLabel; timer = new MyTimer(timeLabel); contentControl = new TransitioningContentControl() { Transition = TransitionType.Left, RestartTransitionOnContentChange = true }; mainMenu = new MyMainMenu(NewGameBtn_Click, ResumeBtn_Click, OpenBtn_Click); menu = new MyMenu(ResumeBtn_Click, SaveBtn_Click, MainMenuBtn_Click); finishBanner = new FinishBanner(MainGrid, timer); ShowGrid(mainMenu.grid); }