Ejemplo n.º 1
0
        private static void Send(bool show, bool exit)
        {
            ActionStruct pdu = new ActionStruct
            {
                showWindow = show,
                exitApp    = exit,
            };

            MessageManager.Send(pdu);
        }
Ejemplo n.º 2
0
 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}");
     }
 }