~c-franke/do/XesamSearch

« back to all changes in this revision

Viewing changes to XesamEmailItem.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
// XesamEmailItem.cs 
 
2
// User: kraut (c.franke@muenchen-mail.de) at 22:23¬†21.02.2008
 
3
 
 
4
using System;
 
5
using System.Collections.Generic;
 
6
using Do.Universe;
 
7
 
 
8
namespace Do.Addins.DoXesam {
 
9
 
 
10
        class XesamEmailItem: XesamItem, IOpenableItem {
 
11
                
 
12
                public XesamEmailItem(Dictionary<string,string> field):base(field)
 
13
                 {
 
14
                        
 
15
                 }
 
16
                
 
17
                public override string Name {
 
18
                        get {
 
19
                                if(base.subject=="")
 
20
                                        return base.exactfilename;
 
21
                                else
 
22
                                        return base.subject;
 
23
                        }
 
24
                }
 
25
                
 
26
                public override string Description {
 
27
                        get {
 
28
                                if(base.from =="" & base.subject =="" & base.exactfilename!="")
 
29
                                        return "Attachment: "+base.url;
 
30
                                else if(base.subject=="")
 
31
                                        return base.from;
 
32
                                else 
 
33
                                        return base.subject;
 
34
                        }
 
35
                }
 
36
                
 
37
                public override string Icon {
 
38
                        get {
 
39
                                string icon=""; 
 
40
                                 if(base.isread !="true"){
 
41
                                        icon="stock_mail-open";
 
42
                                }else{
 
43
                                        icon = "stock_mail";
 
44
                                }
 
45
                                return icon;
 
46
                        }
 
47
                }
 
48
                
 
49
                public virtual string Path {
 
50
                        get {
 
51
                                return base.url;
 
52
                        }
 
53
                }
 
54
                
 
55
                public  string URI {
 
56
                        get {
 
57
                                return base.url;
 
58
                        }
 
59
                }
 
60
                
 
61
                public string MimeType {
 
62
                        get {
 
63
                                return base.mimetype;
 
64
                        }
 
65
                }
 
66
                
 
67
                /** open email via evolution **/
 
68
                public virtual void Open ()
 
69
                {
 
70
                        System.Diagnostics.Process locate;
 
71
                        locate = new System.Diagnostics.Process ();
 
72
                        locate.StartInfo.FileName = "evolution";
 
73
                        locate.StartInfo.Arguments = base.url ;
 
74
                        locate.StartInfo.RedirectStandardOutput = false;
 
75
                        locate.StartInfo.UseShellExecute = false;
 
76
                        locate.Start();
 
77
                }
 
78
        }
 
79
 
 
80
}
 
 
b'\\ No newline at end of file'