Beispiel #1
0
 private void BindMouseEvent()
 {
     if (this.Trigger == TriggerType.Click)
     {
         ElementInfo.BindClickEvent($"main_{IdentityKey}", nameof(WillShowSubInfo), this);
     }
     else if (this.Trigger == TriggerType.Hover)
     {
         ElementInfo.BindMouseOverEvent($"main_{IdentityKey}", nameof(WillShowSubInfo), this);
         ElementInfo.BindMouseOutEvent($"main_{IdentityKey}", nameof(OnMouseOut), this);
     }
     else if (this.Trigger == TriggerType.ContextMenu)
     {
         ElementInfo.BindContextMenuEvent($"main_{IdentityKey}", nameof(WillShowSubInfo), this, true);
         ElementInfo.BindClickEvent($"main_{IdentityKey}", nameof(OnMouseOut), this);
     }
 }
Beispiel #2
0
 private void BindMouseEvent()
 {
     ElementInfo.BindMouseOverEvent($"main_{IdentityKey}", nameof(OnMouseOver), this);
     ElementInfo.BindMouseOutEvent($"main_{IdentityKey}", nameof(OnMouseOut), this);
 }