partial void PublishUIMessageInternal(XElement uiMsgElement) { var dlg = new ClientMessageWindow(uiMsgElement); dlg.Closed += (s, e) => { if (dlg.DialogResult.HasValue && dlg.DialogResult.Value) { XDocument userDoc = dlg.Result.Document; //XElement action = (XElement)ApplicationEx..DocumentElement; XElement[] sendElt = null; XElement child = (XElement)userDoc.FirstNode; if (child.Name == "Request" || child.Name == "Response") { int count = child.Nodes().Count(); sendElt = new XElement[count]; child = (XElement)child.FirstNode; } else { sendElt = new XElement[userDoc.Nodes().Count()]; } int i = 0; while (child != null) { sendElt[i] = child; child = (XElement)child.NextNode; i++; } this.CurrentActivity.Exec(sendElt); } else { //ServerApplicationService.Response.Document.Root.RemoveAll(); //ServerApplicationService.PublishResponse(); } }; dlg.Show(); }
public ClientMessageButton(ClientMessageWindow window) { InitializeComponent(); ClientMessageWindow = window; }