private void ProcessTextMessage(Object sender,MShowText msg) { if (sender == currentDevice) { switch (msg.Type) { case MShowText.TYPE.BASE: showMessageBase(msg.Message); break; case MShowText.TYPE.POPUP: if (isBusy) { showMessagePopup(msg.Message); } break; } } }
public void showMessage(Object sender,MShowText msg) { this.Dispatcher.Invoke(System.Windows.Threading.DispatcherPriority.Normal, new textFetcher(ProcessTextMessage),sender,msg); }