Exemple #1
0
 /// <summary>
 /// Invokes the display message event. This notifies listening controls that a text message has been sent.
 /// </summary>
 /// <param name="sender">The sender.</param>
 /// <param name="e">The <see cref="Lignite.Controls.Events.DisplayMessageEventArgs"/> instance containing the event data.</param>
 public virtual void InvokeDisplayMessage(object sender, DisplayMessageEventArgs e)
 {
     if (DisplayMessage != null) DisplayMessage(sender, e);
 }
Exemple #2
0
 /// <summary>
 /// Displays the message.
 /// </summary>
 /// <param name="sender">The sender.</param>
 /// <param name="e">The <see cref="Lignite.Controls.Events.DisplayMessageEventArgs"/> instance containing the event data.</param>
 private void InvokeDisplayMessage(object sender, DisplayMessageEventArgs e)
 {
     if(InvokeRequired)
     {
         InvokeDisplayMessageCallback d = InvokeDisplayMessage;
         BeginInvoke(d, new[] {sender, e});
     }
     else
     {
         if (e.SenderUID == UniqueInstanceID) return;
         WriteLine(e.Message);
     }
 }