Exemplo n.º 1
0
 private void MyMouseEnterInvoke(object sender, EventArgs e)
 {
     if (MyMouseEnter != null)
     {
         MyMouseEnter.Invoke(this, e);
     }
 }
Exemplo n.º 2
0
        private void RegisterMouseEvent()
        {
            this.pictureBox1.MouseEnter += (object sender, EventArgs e) =>
            { if (MyMouseEnter != null)
              {
                  MyMouseEnter.Invoke(this, e);
              }
            };
            this.pictureBox1.MouseLeave += (object sender, EventArgs e) =>
            { if (MyMouseLeave != null)
              {
                  MyMouseLeave.Invoke(this, e);
              }
            };
            this.label1.MouseEnter += (object sender, EventArgs e) =>
            { if (MyMouseEnter != null)
              {
                  MyMouseEnter.Invoke(this, e);
              }
            };
            this.label1.MouseLeave += (object sender, EventArgs e) =>
            { if (MyMouseLeave != null)
              {
                  MyMouseLeave.Invoke(this, e);
              }
            };
            this.MouseEnter += (object sender, EventArgs e) =>
            { if (MyMouseEnter != null)
              {
                  MyMouseEnter.Invoke(this, e);
              }
            };
            this.MouseLeave += (object sender, EventArgs e) =>
            { if (MyMouseLeave != null)
              {
                  MyMouseLeave.Invoke(this, e);
              }
            };
            this.MyMouseEnter += MyItemTemplate_MyMouseEnter;
            this.MyMouseLeave += MyItemTemplate_MyMouseLeave;

            this.checkBox1.CheckedChanged += (object sender, EventArgs e) =>
            { if (MyCheckedChange != null)
              {
                  MyCheckedChange.Invoke(this, e);
              }
            };
        }