Skip to content

Creating a Simple Plugin

C272 edited this page May 8, 2019 · 5 revisions

Choosing the Plugin Type

If you have a plugin up and running (eg. have a class that implements easyCaseSDK.IPlugin, if not read here), you can choose one of two different routes. One option is to create a compiler plugin, which compiles for a certain casemaker, and the other is to create a theme.

Since this section is for simple plugins, I'll only show how to create a theme. Descriptions of plugins can be found in the wiki index, here.

Creating a Theme

To create a theme, again, you just need to implement an interface. The "themes" interface may change in the future, so this is just a guideline, however it will fundamentally work the same way, just selecting colours. First, make a class inheriting from easyCaseSDK.IPluginTheme.

using easyCaseSDK;

public class YellowTheme : IPluginTheme
{
    ....
}

After this, explicitly implement the interface with all the required colours, compile, and restart the program. Make sure your new build is in easyCase\plugins\ before launching. You can then select your plugin's theme from the easyCase settings. Below is an example theme created for the beta release, which you can use as a reference.

easyCase Light Theme (Official):

//Theme information for easyCase Light Theme plugin.
public class LightTheme_Theme : IPluginTheme
{
    public string Name { get; set; } = "Light";
    public Color TextColour { get; set; } = Color.Black;
    public Color BackgroundColour { get; set; } = SystemColors.Window;
    public Color ControlBackgroundColour { get; set; } = SystemColors.Window;
    public RibbonTheme RibbonTheme { get; set; } = RibbonTheme.Normal;
    public Color RibbonBackgroundColour { get; set; } = Color.White;
}

Download Center

To download easyCase, please navigate here.

Clone this wiki locally