protected void RaiseMessageRecevied(MsgBrokerEventArgs e) { if (MessageReceived != null) { MessageReceived(this, e); } }
public void SendMessage(MsgBrokerMsg msg) { MsgBrokerEventArgs args; args = new MsgBrokerEventArgs(msg.MsgName, msg); RaiseMessageRecevied(args); }
void msgBroker_MessageReceived(object sender, MsgBroker.MsgBrokerEventArgs e) { switch (e.Message.MsgOPCode) { case UI_CONTROL.SET_CONVERT_PROGRESS_VALUE: ConvertProgressBar.Value = (double)e.Message.MsgBody; state_rate.Text = e.Message.MsgBody.ToString() + " %"; break; case UI_CONTROL.FINISH_CONVERT_PROGRESS: confirmBtn.Visibility = Visibility.Visible; break; } }