~alexlauni/do-plugins/bansheeplugin

« back to all changes in this revision

Viewing changes to Emesene/src/EmeseneAvatarItem.cs

  • Committer: Alex Launi
  • Date: 2009-02-28 17:40:30 UTC
  • mfrom: (276.37.54 trunk)
  • Revision ID: alex.launi@gmail.com-20090228174030-vj9z2b96smsodmmb
merge trunk

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
using System;
 
2
using Do.Universe;
 
3
using Do.Platform;
 
4
 
 
5
namespace Do.Universe
 
6
{
 
7
        public class EmeseneAvatarItem : Item, IFileItem
 
8
        {
 
9
                
 
10
                private string path;
 
11
                
 
12
                public EmeseneAvatarItem(string path)
 
13
                {                       
 
14
                        this.path = path;
 
15
                }               
 
16
                
 
17
                
 
18
                public override string Name
 
19
                {
 
20
                        get { return path; }
 
21
                }
 
22
                
 
23
                public override string Description
 
24
                {
 
25
                        get { return "Emesene avatar."; }
 
26
                }
 
27
                
 
28
                public  string Uri
 
29
                {
 
30
                        get { return "file://" + Path; }
 
31
                }
 
32
                
 
33
                public  string Path
 
34
                {
 
35
                        get { return this.path; }
 
36
                }
 
37
                
 
38
                public override string Icon
 
39
                {
 
40
                        get { return this.path; }
 
41
                }
 
42
                
 
43
                public override bool Equals(object obj)
 
44
                {
 
45
                    if (obj == null) return false;
 
46
 
 
47
                    if (this.GetType() != obj.GetType()) return false;
 
48
                    EmeseneAvatarItem avatar = (EmeseneAvatarItem) obj;     
 
49
 
 
50
                    // Check for paths
 
51
                    if (!Object.Equals(this.path, avatar.path)) return false;
 
52
 
 
53
                    return true;
 
54
                } 
 
55
                
 
56
        }
 
57
}