Esempio n. 1
0
        internal void WSonMessage(JaPluReBehavior jaPluReBehavior, MessageEventArgs e)
        {
            if (e.IsText)
            {
                JTask task;
                try
                {
                    JMessage msg = JSONSerializer<JMessage>.DeSerialize(e.Data);
                    task = new JTask(msg);
                    window.WFUIize(() => Tasks.Add(task));

                }
                catch (Exception ex)
                {
                    window.notIcon.ShowBalloonTip(2000, "Error", "Invalid Message received", ToolTipIcon.Error);
                    task = new JTask();
                    task.Error = ex.Message;
                    Server.Send(JSONSerializer<JTask>.Serialize(task));
                }
            }
        }
Esempio n. 2
0
 internal void WSonOpen(JaPluReBehavior japlureBehavior)
 {
     window.WFUIize(() => ConnectedClients.Add(japlureBehavior));
 }
Esempio n. 3
0
 internal void WSonError(JaPluReBehavior japlureBehavior, ErrorEventArgs e)
 {
     if (ConnectedClients.Contains(japlureBehavior))
         window.WFUIize(() => ConnectedClients.Remove(japlureBehavior));
 }