1 |
william |
17 |
using System; |
2 |
|
|
using System.Collections.Generic; |
3 |
|
|
using System.ComponentModel; |
4 |
|
|
using System.Drawing; |
5 |
|
|
using System.Data; |
6 |
|
|
using System.Linq; |
7 |
|
|
using System.Text; |
8 |
|
|
using System.Windows.Forms; |
9 |
|
|
|
10 |
|
|
namespace EmuXPortal |
11 |
|
|
{ |
12 |
|
|
public partial class GameControl : UserControl |
13 |
|
|
{ |
14 |
william |
22 |
public GameControl() { InitializeComponent(); } |
15 |
|
|
public Image GameImage { get { return gameImage.Image; } set { gameImage.Image = value; } } |
16 |
|
|
public string GameName { get { return gameName.Text; } set { gameName.Text = value; } } |
17 |
|
|
private void GameControl_Load(object sender, EventArgs e) |
18 |
william |
17 |
{ |
19 |
william |
22 |
Graphics g = gameName.CreateGraphics(); |
20 |
|
|
Size size = g.MeasureString(gameName.Text, gameName.Font).ToSize(); |
21 |
|
|
gameName.Size = new Size(size.Width + 5, gameName.Size.Height); |
22 |
william |
17 |
} |
23 |
|
|
} |
24 |
|
|
} |