Пример #1
0
 // Invoke the ReceivedBundle event
 protected virtual void OnReceivedBundle(OscBundleEventArgs e)
 {
     if (ReceivedBundle != null)
     {
         ReceivedBundle(this, e);
     }
     if (e.AutoUnpack)
     {
         foreach (OscData part in e.Bundle.Parts)
         {
             if (part is OscMessage)
             {
                 OnReceivedMessage(new OscMessageEventArgs(e.Timestamp, (OscMessage)part));
             }
             else if (part is OscBundle)
             {
                 OnReceivedBundle(new OscBundleEventArgs(e.Timestamp, (OscBundle)part));
             }
         }
     }
 }
Пример #2
0
 // Invoke the ReceivedBundle event
 protected virtual void OnReceivedBundle(OscBundleEventArgs e)
 {
     if (ReceivedBundle != null) { ReceivedBundle(this, e); }
     if (e.AutoUnpack)
     {
         foreach (OscData part in e.Bundle.Parts)
         {
             if (part is OscMessage)
             {
                 OnReceivedMessage(new OscMessageEventArgs(e.Timestamp, (OscMessage)part));
             }
             else if (part is OscBundle)
             {
                 OnReceivedBundle(new OscBundleEventArgs(e.Timestamp, (OscBundle)part));
             }
         }
     }
 }