private static void Send(bool show, bool exit) { ActionStruct pdu = new ActionStruct { showWindow = show, exitApp = exit, }; MessageManager.Send(pdu); }
public static void Deal(string message) { try { ActionStruct acs = JsonConvert.DeserializeObject <ActionStruct>(message); if (acs.exitApp) { ExitApp(); } if (acs.showWindow) { ShowWindow(); } else { HideWindow(); } } catch (JsonException e) { LoggingManager.Warn($"Deserialize NurseryActionStruct failed. {e.Message}"); } }