Skip to content

Creating and Running Your First Plugin

thecopy edited this page Jun 4, 2013 · 1 revision

Download the Controll.Client library

Install-Package Controll.Client -pre

Make sure you have the following package feeds:


Sample Activity

Note: a plugin can contain many activities. The .dll-file (the assembly) is the plugin.

This is a sample activity. Remember to add a using reference to Controll.Client.

public class SampleActivity : IActivity
{
    public void Execute(IActivityContext context)
    {
       context.Message(ActivityMessageType.Notification, "Hello World!");           
    }

    public ActivityViewModel ViewModel { get { return _viewModel; } }
    private readonly ActivityViewModel _viewModel = new ActivityViewModel
        {
            Key = Guid.Parse("3F7DB79F-A596-4A1A-852F-1B0EF287D479"),
            Name = "Hello World",
            Description = "An activity which says hello!",
            CreatorName = "Creator",
            LastUpdated = DateTime.Parse("2013-04-25"),
            Version = new Version(1,0,0,0),

            Commands = new List<ActivityCommandViewModel>{
                    new ActivityCommandViewModel{
                            Label = "Hello!",
                            Name = "hello"
                        }
                }
        };
}

Run It!

The easiest way to try it out is to use http://controll.apphb.com/. This is a free Controll service which anyone can use.

  1. Register yourself (no email or confirmation needed)
  2. Add a zombie
  3. Connect with the SimpleConsoleZombie as this zombie
  4. Send the .dll-file to the zombie using the web-interface
  5. Run it!