public PurgeDisplay(PurgeView v) { view = v; BitmapSource toBitmap = XpsImage.Create(purgeFileName, (int) v.Deck.CurrentDraw ); // margins for the border of the entire card (left/right/top/bottom) int marginX = 25; int marginY = 15; fullImage = new CroppedBitmap(toBitmap, new System.Windows.Int32Rect(0 + marginX, 0 + marginY, (int)toBitmap.Width - 2 * marginX, (int)toBitmap.Height - 2 * marginY)); // location of the useful game text on card int top = 750; int height = 215; image = new CroppedBitmap(toBitmap, new System.Windows.Int32Rect(marginX+20, top, (int)toBitmap.Width - 2 * (marginX+20), height)); // location of the card header int topHeader = 50; int heightHeader = 50; headerImage = new CroppedBitmap(toBitmap, new System.Windows.Int32Rect(marginX, topHeader, (int)toBitmap.Width - 2 *marginX, heightHeader)); }
private void CreateAllViews(Game g) { tv = new TileView(g.Tiles); ev = new EventView(g.Events); uv = new PurgeView(g.Purges); pv = new PlayersView(this, g.Players); CreatePageViews(); NotifyAll(); }