Beispiel #1
0
 public void OnInput(object sender, IOEventArgs e)
 {
     switch (e.Object.ToString())
     {
         case "start":
             StartTrolling();
             break;
         case "stop":
             StopTrolling();
             break;
         default:
             break;
     }
 }
Beispiel #2
0
 public virtual void OnInput(object obj, IOEventArgs args)
 {
     if (Input != null)
     {
         Input(obj, args);
     }
 }
Beispiel #3
0
 public virtual void OnOutput(object obj, IOEventArgs args)
 {
     if (Output != null)
     {
         Output(obj, args);
     }
 }
Beispiel #4
0
        private void OnNetworkInput(object sender, IOEventArgs e)
        {
            if (e.Object != null)
            {
                if (e.Object.GetType().Equals(typeof(ChatPacket)))
                {
                    HandleChatPacket((ChatPacket)e.Object);

                    if (VideoSync.HostedServer != null)
                    {
                        if (VideoSync.HostedServer.Running)
                        {
                            VideoSync.HostedServer.sendAll(e.Object, e.Client);
                        }
                    }
                }
                else if (e.Object.GetType().Equals(typeof(MessagePacket)))
                {
                    HandleMessagePacket((MessagePacket)e.Object);
                }
            }
        }
Beispiel #5
0
 private void OnWatchOutput(object sender, IOEventArgs e)
 {
 }
Beispiel #6
0
 private void OnWatchInput(object sender, IOEventArgs e)
 {
     InputWrapper(sender, e);
     try
     {
         if (e.Object.GetType() == typeof(TimeStampPacket))
         {
             HandleTimeStampPacket((TimeStampPacket)e.Object);
         }
         else if (e.Object.GetType() == typeof(PlayStatePacket))
         {
             HandlePlayStatePacket((PlayStatePacket)e.Object, null);
         }
         else if (e.Object.GetType() == typeof(JoinPacket))
         {
             HandleJoinPacket((JoinPacket)e.Object);
         }
         else if (e.Object.GetType() == typeof(UrlPacket))
         {
             HandleUrlPacket((UrlPacket)e.Object, e.Client);
         }
     }
     catch (Exception ex)
     {
         Debug.Log(ex);
     }
 }
Beispiel #7
0
 private void OnHostOutput(object sender, IOEventArgs e)
 {
     // Not used
 }
Beispiel #8
0
 private void OnHostInput(object sender, IOEventArgs e)
 {
     InputWrapper(sender, e);
     try
     {
         if (e.Object.GetType() == typeof(PlayStatePacket))
         {
             //HandlePlayStatePacket((PlayStatePacket)e.Object, e.Client);
         }
         else if (e.Object.GetType() == typeof(UrlPacket))
         {
             HandleUrlPacket((UrlPacket)e.Object, e.Client);
         }
     }
     catch (Exception ex)
     {
         Debug.Log(ex);
     }
 }
Beispiel #9
0
 public virtual void OnInput(object o, IOEventArgs args)
 {
     if (InputWrapper != null)
     {
         InputWrapper(o, args);
     }
 }