Creating SendTo Plugin
  • You can create a SendTo plugin by implementing ISendTo interface from CaptureItPlus.Libs.dll.
  • ISendTo Plugin
  • Properties
    • string Name - Gets the name of the Plugin.
    • string Caption - Gets the Menu Text for the specified Plugin.
    • bool IsFinished - Gets whether the Send to execution is finished or not.
  • Methods
    • void Execute(string filename) - Executes the Plugin code.
    • void ShowAbout(); - Shows information about the Plugin.
  • Sample Implementation
Here is the code of DemoSendToPlugin implementation.

using System.ComponentModel.Composition;
using System.Windows.Forms;
using CaptureItPlus.Libs;

namespace CaptureItPlus.Plugins
{
    [Export(typeof(ISendTo))]
    public class DemoSendToPlugin : ISendTo
    {
        public string Name
        {
            get { return "DemoSendToPlugin"; }
        }

        public string Caption
        {
            get { return "DemoSendToPlugin"; }
        }

        public void Execute(string filename)
        {
            MessageBox.Show(string.Format("Demo application with Filename : {0}", filename));
        }

        public void ShowAbout()
        {
            MessageBox.Show("Demo Plugin");
        }

        public bool IsFinished
        {
            get { return true; }
        }
    }
}
  • Plugin Deployment
    • You can compile this file and copy it to the Plugins folder in the installation directory.
deployment.png
  • And after copying, restart CaptureItPlus and click on the SendTo menu, you can see the DemoSendToPlugin menu item
afterplugindeploy.png
  • Here is the MessageBox when you click on the DemoSendToPlugin menu item.
demoplugin.png

Happy Coding :)

Last edited Aug 21, 2011 at 8:11 PM by anuraj_p, version 2

Comments

No comments yet.