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;
- namespace ProgramZaliczenieJiPP5
- {
- class SuperPrzycisk : Button
- {
- public event EventHandler TripleClick;
- public SuperPrzycisk()
- {
- this.BackColor = System.Drawing.Color.Red;
- this.Click += superPrzycisk1_Click;
- }
- public int PrzyciskCounter { get; private set; }
- private void superPrzycisk1_Click(object sender, EventArgs e)
- {
- PrzyciskCounter++;
- if (PrzyciskCounter == 3)
- {
- if (TripleClick !=null)
- {
- TripleClick(sender, e);
- }
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement