~cszikszoy/do-plugins/pastebin

« back to all changes in this revision

Viewing changes to Templates/MyCommand.cs

  • Committer: djsiegel at gmail
  • Date: 2007-11-07 19:51:21 UTC
  • Revision ID: djsiegel@gmail.com-20071107195121-v1niznt43hkai3o1
Added some template files.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
//  MyCommand.cs
 
2
//
 
3
//  This is a simple command called MyCommand. If you're going to
 
4
//  create a Command addin, you can start by copying this code
 
5
//  to begin your own command class.
 
6
 
 
7
using System;
 
8
using Do.Universe;
 
9
 
 
10
namespace MyAddinNamespace
 
11
{
 
12
 
 
13
        public class MyCommand : ICommand
 
14
        {
 
15
                
 
16
                public string Name {
 
17
                        get {
 
18
                                return "The name of the command.";
 
19
                        }
 
20
                }
 
21
                
 
22
                public string Description {
 
23
                        get {
 
24
                                return "A description of the command.";
 
25
                        }
 
26
                }
 
27
                
 
28
                public string Icon {
 
29
                        get {
 
30
                                return "my-command-icon";
 
31
                        }
 
32
                }
 
33
                
 
34
                public Type[] SupportedItemTypes {
 
35
                        get {
 
36
                        return new Type[] {
 
37
                                        /* Supported item types go here. */
 
38
                                };
 
39
                        }
 
40
                }
 
41
 
 
42
                public Type[] SupportedItemTypes {
 
43
                        get {
 
44
                        return new Type[] {
 
45
                                        /* Supported modifier item types go here. */
 
46
                                };
 
47
                        }
 
48
                }
 
49
 
 
50
                public bool SupportsItem (IItem item)
 
51
                {
 
52
                        return true;
 
53
                }
 
54
                
 
55
                public bool SupportsModifierItemForItems (IItem[] items, IItem modItem)
 
56
                {
 
57
                        return true;
 
58
                }
 
59
                
 
60
                public void Perform (IItem[] items, IItem[] modItems)
 
61
                {
 
62
                        // This is where the magic happens.
 
63
                }
 
64
                
 
65
        }
 
66
}
 
 
b'\\ No newline at end of file'