Exemplo n.º 1
0
 internal void SetStatus(MSNStatus newStatus)
 {
     if (this.status != newStatus)
     {
         MSNStatus status1 = this.status;
         this.status = newStatus;
         if (this.StatusChanged != null)
         {
             this.StatusChanged(this, new StatusChangeEventArgs(status1));
         }
         if ((status1 == MSNStatus.Offline) && (this.ContactOnline != null))
         {
             this.ContactOnline(this, new EventArgs());
         }
         if ((newStatus == MSNStatus.Offline) && (this.ContactOffline != null))
         {
             this.ContactOffline(this, new StatusChangeEventArgs(status1));
         }
     }
 }
 // Methods
 public ContactStatusChangeEventArgs(Contact contact, MSNStatus oldStatus)
 {
     this.Contact = contact;
       this.OldStatus = oldStatus;
 }
Exemplo n.º 3
0
 protected string ParseStatus(MSNStatus status)
 {
     switch (status)
       {
     case MSNStatus.Offline:
     {
           return "FLN";
     }
     case MSNStatus.Hidden:
     {
           return "HDN";
     }
     case MSNStatus.Online:
     {
           return "NLN";
     }
     case MSNStatus.Away:
     {
           return "AWY";
     }
     case MSNStatus.Busy:
     {
           return "BSY";
     }
     case MSNStatus.BRB:
     {
           return "BRB";
     }
     case MSNStatus.Lunch:
     {
           return "LUN";
     }
     case MSNStatus.Phone:
     {
           return "PHN";
     }
     case MSNStatus.Idle:
     {
           return "IDL";
     }
       }
       return "Unknown status";
 }
Exemplo n.º 4
0
 public void SetStatus(MSNStatus status)
 {
     if (!this.synSended)
       {
     throw new MSNException("Can't set status. You must call SynchronizeList() before you can set an initial status.");
       }
       object[] objArray1 = new object[5] { "CHG ", this.NewTrans(), " ", this.ParseStatus(status), " 0\r\n" } ;
       this.SocketSend(string.Concat(objArray1));
 }
Exemplo n.º 5
0
 public Messenger()
 {
     this.messengerServer = IPAddress.Parse("64.4.13.17");
       this.lastContactSynced = null;
       this.syncContactsCount = 0;
       this.networkConnected = false;
       this.InitialStatus = MSNStatus.Online;
       this.log = new ArrayList();
       this.conversationQueue = new Queue();
       this.conversationList = new ArrayList();
       this.contacts = new Messenger.ContactList();
       this.contactGroups = new Hashtable();
       this.currentTransaction = 0;
       this.TextEncoding = new UTF8Encoding();
       this.socketBuffer = new byte[0x8000];
       this.synSended = false;
       this.totalMessage = "";
       IPHostEntry entry1 = Dns.Resolve("messenger.hotmail.com");
       IPAddress address1 = entry1.AddressList[0];
       this.MessengerServer = address1;
 }
Exemplo n.º 6
0
 public Contact()
 {
     this.status = MSNStatus.Offline;
       this.updateVersion = 0;
       this.inList = false;
 }
Exemplo n.º 7
0
 internal void SetStatus(MSNStatus newStatus)
 {
     if (this.status != newStatus)
       {
             MSNStatus status1 = this.status;
             this.status = newStatus;
             if (this.StatusChanged != null)
             {
                   this.StatusChanged(this, new StatusChangeEventArgs(status1));
             }
             if ((status1 == MSNStatus.Offline) && (this.ContactOnline != null))
             {
                   this.ContactOnline(this, new EventArgs());
             }
             if ((newStatus == MSNStatus.Offline) && (this.ContactOffline != null))
             {
                   this.ContactOffline(this, new StatusChangeEventArgs(status1));
             }
       }
 }
Exemplo n.º 8
0
 public Contact()
 {
     this.status        = MSNStatus.Offline;
     this.updateVersion = 0;
     this.inList        = false;
 }
 // Methods
 public StatusChangeEventArgs(MSNStatus oldStatus)
 {
     this.OldStatus = oldStatus;
 }
Exemplo n.º 10
0
 // Methods
 public StatusChangeEventArgs(MSNStatus oldStatus)
 {
     this.OldStatus = oldStatus;
 }
 // Methods
 public ContactStatusChangeEventArgs(Contact contact, MSNStatus oldStatus)
 {
     this.Contact   = contact;
     this.OldStatus = oldStatus;
 }