public void SelectGame( GameControl gameControl ) { foreach ( GameControl gc in this.Controls ) { if ( gc.Selected ) { gc.Selected = false; gc.Invalidate(); } } this.SelectedGame = gameControl; MainForm mf = Form.ActiveForm as MainForm; if ( mf == null ) { DebugLog.AppendText( "GamePanel::SelectGame() - ActiveForm is not MainForm!!!" ); return; } mf.UpdateSelected( gameControl ); if ( gameControl == null ) return; gameControl.Selected = true; gameControl.Invalidate(); }
public void SelectGame(GameControl gameControl) { foreach (GameControl gc in this.Controls) { if (gc.Selected) { gc.Selected = false; gc.Invalidate(); } } this.SelectedGame = gameControl; MainForm mf = Form.ActiveForm as MainForm; if (mf == null) { DebugLog.AppendText("GamePanel::SelectGame() - ActiveForm is not MainForm!!!"); return; } mf.UpdateSelected(gameControl); if (gameControl == null) { return; } gameControl.Selected = true; gameControl.Invalidate(); }