Exemplo n.º 1
0
 internal void FireOnSkypeContactOnlineAppearance(SktSkype sender, OnSkypeContactOnlineAppearanceArgs e)
 {
     if (OnSkypeContactOnlineAppearance == null) return; // No event assigned
     if (gui == null) { FireCallbackInSeparateThread(e, OnSkypeContactOnlineAppearanceInNewThread); return; }
     gui.BeginInvoke(OnSkypeContactOnlineAppearance, new object[] { sender, e }); // Synchronizing to gui thread
 }
Exemplo n.º 2
0
 internal void ProcessOnSkypeContactOnlineAppearance(SktSkype sender)
 {
     if (skypeRef.logging) skypeRef.Log("Processing event OnSkypeContactOnlineAppearance");
     OnSkypeContactOnlineAppearanceArgs args = new OnSkypeContactOnlineAppearanceArgs();
     int marker = 0;
     int typeTag = 0;
     do
     {
     typeTag = skypeRef.transport.ReadByte();
     if (typeTag == 122) break;
     marker = skypeRef.transport.ReadByte();
     switch (marker)
     {
         case 1:
             args.contact = (SktContact)skypeRef.decoder.DecodeObject(2); // SktContact class ID = 2
             break;
         default:
             if (marker != 122) skypeRef.Error(String.Format("Invalid event argument tag {0} in OnSkypeContactOnlineAppearance", marker));
             break;
     }
     } while (marker != 'z');
     skypeRef.transport.ResumeSocketReaderFromEvent();
     args.senderobj = sender;
     FireOnSkypeContactOnlineAppearance(sender, args);
 }