public Uc_ChessPiece(eChessSide side, eChessPieceType type, eChessPieceStyle style, int cellSize, int piecesize) { InitializeComponent(); this._side = side; this._type = type; this._style = style; _cellSize = cellSize; _pieceSize = piecesize; _image = Read_Image_From_Resources.GetChessPieceBitMap(_side, _type, _style); //UserControl Size this.Size = new Size(this._pieceSize, this._pieceSize); }
public Form_Promotion(eChessSide side, eChessPieceStyle style, System.Globalization.CultureInfo language) { InitializeComponent(); //Initalize pictureBox1.Image = Read_Image_From_Resources.GetChessPieceBitMap(side, eChessPieceType.Queen, style); pictureBox2.Image = Read_Image_From_Resources.GetChessPieceBitMap(side, eChessPieceType.Rook, style); pictureBox3.Image = Read_Image_From_Resources.GetChessPieceBitMap(side, eChessPieceType.Knight, style); pictureBox4.Image = Read_Image_From_Resources.GetChessPieceBitMap(side, eChessPieceType.Bishop, style); //Change Language Assembly a = Assembly.Load("Chess Library"); ResourceManager rm = new ResourceManager("Chess_Library.Resources.Lang.Langres", a); this.Text = rm.GetString("Form_Promotion", language); labelX_form_promotion.Text = rm.GetString("labelX_form_promotion", language); }
public static void Promotion(Uc_ChessPiece UcPawn, eChessPieceType PromoteTo, System.Globalization.CultureInfo Language) { if (PromoteTo == eChessPieceType.Null) { Form_Promotion f = new Form_Promotion(UcPawn.Side, UcPawn.Style, Language); if (f.ShowDialog() == DialogResult.OK) { } f.Dispose(); UcPawn.Type = Form_Promotion.Type; } else { UcPawn.Type = PromoteTo; } UcPawn.Image = Read_Image_From_Resources.GetChessPieceBitMap(UcPawn.Side, UcPawn.Type, UcPawn.Style); }