public void RaiseEvent()
 {
     if (ShowEventHandler != null)
     {
         ShowEventHandler.Invoke("message", new EventArgs());
     }
 }
示例#2
0
        public void FireShowEvent()
        {
            ShowEventHandler handler = ShowEvent;

            if (handler != null)
            {
                handler(this, null);
            }
        }
示例#3
0
 public void ShowInfo(_GoldPrice goodInfo)
 {
     try
     {
         if (listView.InvokeRequired)
         {
             ShowEventHandler _myInvoke = new ShowEventHandler(AddToList);
             this.Invoke(_myInvoke, new object[] { goodInfo });
         }
         else
         {
             AddToList(goodInfo);
         }
     }
     catch (Exception e)
     {
         string strError = e.Message;
     }
 }
 public void ShowInfo(_GoodsFreshStr goodInfo)
 {
     try
     {
         if (listView.InvokeRequired)
         {
             ShowEventHandler _myInvoke = new ShowEventHandler(AddToList);
             this.Invoke(_myInvoke, new object[] { goodInfo });
         }
         else
         {
             AddToList(goodInfo);
         }
     }
     catch(Exception e)
     {
         string strError = e.Message;
     }
 }