Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- using System.Windows.Forms;
- using System.Drawing;
- namespace WindowsFormsMinesweeper
- {
- class FieldButton : Button
- {
- private readonly int width = 40;
- private readonly int height = 40;
- public FieldButton(int x, int y)
- {
- this.Location = new Point(x, y);
- this.Width = width;
- this.Height = height;
- //this.BackgroundImage = Image.FromFile(@"C:\Users\Rasmu\Desktop");
- this.MouseClick += new MouseEventHandler(FieldClicked);
- }
- private void FieldClicked(object sender, MouseEventArgs e)
- {
- switch (e.Button)
- {
- case MouseButtons.Left:
- ClearField();
- break;
- case MouseButtons.Right:
- FlagField();
- break;
- }
- }
- private void ClearField()
- {
- }
- private void FlagField ()
- {
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement