~c-franke/do/XesamSearch

« back to all changes in this revision

Viewing changes to BeagleEmailItem.cs

  • Committer: Christof Franke
  • Date: 2008-02-26 10:55:05 UTC
  • Revision ID: kraut@workstation-20080226105505-8am13vug28ok1wsf
version 0.1

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
// BeagleEmailItem.cs 
 
2
// User: kraut (c.franke@muenchen-mail.de) at 22:23 21.02.2008
 
3
 
 
4
 
 
5
using System;
 
6
using System.Collections.Generic;
 
7
using Do.Universe;
 
8
 
 
9
namespace Do.Addins.DoXesam
 
10
{
 
11
        class BeagleEmailItem: XesamEmailItem {
 
12
                protected string to_name;
 
13
                protected string from_name;
 
14
                protected string isent;
 
15
                protected string isanswered;    
 
16
                
 
17
                //protected string folder;
 
18
                protected string client; //can be usefull to open email with an outher mailclient
 
19
                //protected string stock_mail_replied;
 
20
                //protected string stock_mail_open;
 
21
                //protected string stock_mail;
 
22
                
 
23
                
 
24
                public BeagleEmailItem (Dictionary<string,string> fields):base(fields)
 
25
                {       
 
26
                        
 
27
                        this.from_name= fields["beagle:from_name"];
 
28
                        this.to_name=fields["beagle:to_name"];
 
29
                        this.isent=fields["beagle:isSent"];
 
30
                        this.isanswered=fields["beagle:isAnswered"];
 
31
                        
 
32
                        //this.folder=fields["beagle:folder"];
 
33
                        this.client=fields["beagle:client"];
 
34
                        
 
35
                        //this.stock_mail_replied=fields["beagle:stock_mail-replied"];
 
36
                        //this.stock_mail_open=fields["beagle:stock_mail-open"];
 
37
                        //this.stock_mail=fields["beagle:stock_mail"];
 
38
                }
 
39
                
 
40
                /*public override string Name {
 
41
                        get {
 
42
                                return subject;
 
43
                        }
 
44
                }*/
 
45
                
 
46
                public override string Description {
 
47
                        get {
 
48
                                if(base.from =="" & base.subject =="" & base.exactfilename!="")
 
49
                                        return "Attachment: "+base.url;
 
50
                                else if(base.subject=="")
 
51
                                        return base.from;
 
52
                                else 
 
53
                                        return base.subject;
 
54
                                        
 
55
                                
 
56
                        }
 
57
                }
 
58
                
 
59
                public override string Icon {
 
60
                        get {
 
61
                                string icon="";
 
62
                                
 
63
                                if(this.isanswered =="true")
 
64
                                {
 
65
                                        icon="stock_mail-replied";
 
66
                                }else if(base.isread !=""){
 
67
                                        icon="stock_mail-open";
 
68
                                }else{
 
69
                                        icon = "stock_mail";
 
70
                                }
 
71
                                return icon;
 
72
                        }
 
73
                }
 
74
        }
 
75
}