ATTENTION: You are viewing a page formatted for mobile devices; to view the full web page, click HERE.

DonationCoder.com Software > FARR Plugins and Aliases

FARR C# SDK and Documentation V2 (19/10/2008)

<< < (7/11) > >>

joshuawood:
I'm having troubles compiling, using VS2005 and the latest SDK. I've copied parts from FARRAltTab, but I get "no suitable method found to override" for SetSearchParameters and SetFeatureParamers. I loaded the template, changed the class to my name, but left the namespace alone. Then just copied some bits from FARRAltTab. It compiled when I initially opened the template ok.

I note all the examples inherit from FARRPluginBase, not FARRCSharpPluginBase, but I get more issues if I change it to the former base, suggesting the template and SDK has changed since the example code was written.

skajfes:
Err. The examples ARE using ActionItems and ActionLists. See iTunes plugin for example.

All the documentation is in the first post.
-vitalyb (December 26, 2008, 11:25 AM)
--- End quote ---
Sorry, my mistake. I was tired and wasn't thinking very well :) In the meantime, i had a look on all the provided plugins and figured it out, and I must say, it is great! I wrote a plugin in half an hour!

joshuawood:
skajfes, any chance I could pls look at your source so I can figure it out?

Edt: I didn't see you post about the missing/changed SetSearchParameters method; Perhaps I need to examine the iTunes plugin more; I'm new to all of this.

joshuawood:
Ok, I'm still confused. FARRTunes still uses SetSearchParameters and SetFeatureParamaters, and won't compile for me as it stands. Can anyone help?

skajfes:
Itunes plugin does use SetSearchParameters method that no longer exists (at least from what i can see) but that didn't compile for me because I don't have itunes libraries installed.

So to write a plugin I used the suplied Visual Studio template for FARR plugin project, created a new project and that's it.
Most of my plugin logic is in the classes that derive from ActionList and ActionItem.

In the class that derives from FARRCSharpPluginBase override the method SetGeneralInfoParameters to set general parameters of the plugin (plugin name, creator, icon etc.)

In the constructor of the class that derives from ActionList call the base constructor and pass it pluginBase object and regex to activate the plugin as string. Like this:
      
public ClipboardList(FARRCSharpPluginBase pluginBase)
   : base(pluginBase, "^clip")
{
         
}


In the GetActionsCount method I fill my results into SourceList. SourceList is defined as List<ActionItem> in ActionList class that I derived from. Results are of type ActionItem (or any derived class).

Use the constructor of ActionItem derived class to initialize the item. I did a clipboard plugin so i passed it some text that I read from a file as an argument.

Override the GetDataRaw and Execute methods. In GetDataRaw you define what will be written in Path and Group variables of the result. And Execute method defines what happens when user executes an item.
You need to override the CaptionRaw property to set the Caption that is displayed in result list.

use pluginbase.ExecuteFarrCommand () method to pass commands to farr.

And that's mostly it, I hope that this isn't as confusing as I think it is.

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version