Esempio n. 1
0
 public Contact(Account account, Hashtable data, string workfile)
 {
     this.account  = account;
     this.data     = data;
     this.workfile = workfile;
     this.uri      = NewUri(account, Thunderbird.ConstructMailboxString(workfile, account), GetString("id"));
 }
Esempio n. 2
0
            public Mail(Account account, Hashtable data, string workfile)
            {
                foreach (string key in data.Keys)
                {
                    if (key == "id")
                    {
                        SetObject(key, data [key]);
                    }
                    else if (key == "sender")
                    {
                        SetObject(key, Utils.HeaderDecodePhrase((string)data [key]));
                    }
                    else if (key == "subject")
                    {
                        SetObject(key, Utils.HeaderDecodeText((string)data [key]));
                    }
                    else if (key == "recipients")
                    {
                        SetObject(key, Utils.HeaderDecodePhrase((string)data [key]));
                    }
                    else if (key == "date")
                    {
                        SetObject(key, Thunderbird.HexDateToString((string)data [key]));
                    }
                    else if (key == "size")
                    {
                        SetObject(key, Thunderbird.Hex2Dec((string)data [key]));
                    }
                    else if (key == "msgOffset")
                    {
                        SetObject(key, Thunderbird.Hex2Dec((string)data[key]));
                    }
                    else if (key == "offlineMsgSize")
                    {
                        SetObject(key, Thunderbird.Hex2Dec((string)data [key]));
                    }
                    else if (key == "message-id")
                    {
                        SetObject(key, (string)data [key]);
                    }
                    else if (key == "references")
                    {
                        SetObject(key, (data [key] as string).Replace("\\", ""));
                    }
                }

                this.account  = account;
                this.workfile = workfile;
                SetObject("mailbox", Thunderbird.ConstructMailboxString(workfile, account));
                this.uri = Thunderbird.NewUri(Account, GetString("mailbox"), GetString("id"));
            }