public void SetElementStatus(int row, int column, FieldElementStatus status) { fieldControl.SetElementStatus(row, column, status); }
public void SetElementStatus(int row, int column, FieldElementStatus status) { var element = Controls.OfType <FieldButton>().Where(b => b.Row == row && b.Column == column).First(); element.SetStatus(status); }
internal void SetStatus(FieldElementStatus status) { this.status = status; switch (status) { case FieldElementStatus.Open0: BackgroundImage = FieldButtonResources.buttonPressed; return; case FieldElementStatus.Open1: BackgroundImage = FieldButtonResources.buttonOpen1; return; case FieldElementStatus.Open2: BackgroundImage = FieldButtonResources.buttonOpen2; return; case FieldElementStatus.Open3: BackgroundImage = FieldButtonResources.buttonOpen3; return; case FieldElementStatus.Open4: BackgroundImage = FieldButtonResources.buttonOpen4; return; case FieldElementStatus.Open5: BackgroundImage = FieldButtonResources.buttonOpen5; return; case FieldElementStatus.Open6: BackgroundImage = FieldButtonResources.buttonOpen6; return; case FieldElementStatus.Open7: BackgroundImage = FieldButtonResources.buttonOpen7; return; case FieldElementStatus.Open8: BackgroundImage = FieldButtonResources.buttonOpen8; return; case FieldElementStatus.BombFlagged: BackgroundImage = FieldButtonResources.buttonFlagged; return; case FieldElementStatus.BombRevealed: BackgroundImage = FieldButtonResources.bombRevealed; return; case FieldElementStatus.BombDeath: BackgroundImage = FieldButtonResources.bombDeath; return; case FieldElementStatus.BombMisFlagged: BackgroundImage = FieldButtonResources.bombMisFlagged; return; case FieldElementStatus.Active: BackgroundImage = FieldButtonResources.buttonUnpressed; return; } }