private void CallDialog(PipeCallFunctionStruct call) { var data = ObjectConvert.Get <DialogActionParamsModel>(call.Data); Application.Current.Dispatcher.Invoke(() => { var dialog = new DialogWindow(data.Title, data.Content, data.Image, data.Buttons); dialog.OnWindowClosedEvent += (sender, value) => { var feedback = new PipeCallFunctionFeedbackStruct(); feedback.ID = call.ID; feedback.CallFunctionType = call.CallFunctionType; feedback.FeedbackData = value; pipeNet.Send(JsonConvert.SerializeObject(feedback)); }; dialog.Show(); }); }
public static void Call(PipeCallFunctionStruct data) { Connect(); pipeNet.Send(JsonConvert.SerializeObject(data)); }