~bas-dotbas/do/win32-next

« back to all changes in this revision

Viewing changes to Do/src/Do.Core/Item.cs

  • Committer: djsiegel at gmail
  • Date: 2007-10-13 21:55:22 UTC
  • Revision ID: djsiegel@gmail.com-20071013215522-n0vjgog0tyjfnpno
Restructured plugins library.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
// Item.cs created with MonoDevelop
 
2
// User: dave at 1:07 AM 8/17/2007
 
3
//
 
4
// To change standard headers go to Edit->Preferences->Coding->Standard Headers
 
5
//
 
6
 
 
7
using System;
 
8
using System.Collections;
 
9
using System.Collections.Generic;
 
10
 
 
11
using Do.Universe;
 
12
 
 
13
namespace Do.Core
 
14
{
 
15
        public class Item : GCObject, IItem
 
16
        {
 
17
                public static readonly string DefaultItemIcon = "gnome-fs-executable";
 
18
                public static readonly string DefaultItemDescription = "";
 
19
                
 
20
                protected Item parent;
 
21
                protected IItem item;
 
22
                
 
23
                public Item (IItem item)
 
24
                {
 
25
                        if (item == null) {
 
26
                                throw new ArgumentNullException ();
 
27
                        }
 
28
                        this.item = item;
 
29
                }
 
30
                
 
31
                public IItem IItem {
 
32
                        get { return item; }
 
33
                }
 
34
                
 
35
                public override string Name {
 
36
                        get { return (item.Name == null ? DefaultItemName : item.Name); }
 
37
                }
 
38
                
 
39
                public override string Description {
 
40
                        get { return (item.Description == null ? DefaultItemDescription : item.Description); }
 
41
                }
 
42
                
 
43
                public override string Icon {
 
44
                        get { return (item.Icon == null ? DefaultItemIcon : item.Icon); }
 
45
                }
 
46
        
 
47
        }
 
48
}