예제 #1
0
 public void UIEvent(UIEvent uievent)
 {
     if (DLLManager.Count > 0)       // if worth calling..
     {
         string output = BaseUtils.JSON.JToken.FromObject(uievent)?.ToString();
         if (output != null)
         {
             DLLManager.NewUIEvent(output);
         }
         else
         {
             System.Diagnostics.Debug.WriteLine("Could not serialise " + uievent.EventTypeStr);
         }
     }
 }
예제 #2
0
 public void UIEvent(UIEvent u)
 {
     try
     {
         if (DLLManager.Count > 0)       // if worth calling..
         {
             string output = JsonConvert.SerializeObject(u);
             DLLManager.NewUIEvent(output);
         }
     }
     catch (Exception ex)
     {
         System.Diagnostics.Debug.WriteLine("Could not serialise " + u.EventTypeStr + " " + ex);
     }
 }
 private void buttonUIEvent_Click(object sender, EventArgs e)
 {
     mgr.NewUIEvent("Test json");
 }