|
Aha! I found one interesting trick.
"class AnotherPluginSample : ITimeSnapperPlugin"
is not declared as public.
Hence, timesnapper doesn't find that class when it goes hunting for plugins.
Also, generally, the code in those samples needs to be fleshed out... Not implemented exceptions need to be replaced with your own choice of implementation.
Here's a more complete version of 'AnotherSamplePlugin'...
using System;
using System.Diagnostics;
using TimeSnapperPluginAPI;
namespace CSharpSamplePlugin
{
public class AnotherPluginSample : ITimeSnapperPlugin
{
bool ITimeSnapperPlugin.Configurable
{ get { return false; }}
void ITimeSnapperPlugin.Configure()
{
throw new NotImplementedException();
}
string ITimeSnapperPlugin.Description
{
get { return "Hello from another"; }
}
string ITimeSnapperPlugin.FriendlyName
{
get { return "Another"; }
}
object ITimeSnapperPlugin.HandleEvent(TimeSnapperEvent TimeSnapperEvent, EventArgs args)
{
switch (TimeSnapperEvent)
{
case TimeSnapperEvent.FlagSaved :
Debug.WriteLine("A flag was saved");
break;
case TimeSnapperEvent.SnapshotSaved :
Debug.WriteLine("A snapshot was saved");
break;
default:
Debug.Assert(false, "Hey! I didn't subscribe to " + TimeSnapperEvent.ToString() + "... why am I being notified?");
break;
}
return null;
}
TimeSnapperMenuItem[] ITimeSnapperPlugin.MenuItems()
{
return null;
}
Guid ITimeSnapperPlugin.PluginID
{
get
{
return new Guid("E569317D-1F8D-4c51-BA91-D7EA0375B8CD");
}
}
TimeSnapperEvent[] ITimeSnapperPlugin.SubscribesTo()
{
return new TimeSnapperEvent[] { TimeSnapperEvent.FlagSaved,
TimeSnapperEvent.SnapshotSaved };
}
}
}
.: http://secretGeek.net :: dot Nuts about dot Net :.
|