Plug-In 1.8 Getting Started

From AutoCount Resource Center
Revision as of 08:51, 10 August 2018 by DanielY (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search
AutoCount Accounting Plug-in Tutorial

Getting Started


 AutoCount Accounting provides integration solution for Software Developers to build attachable module(s) to enhance or customise AutoCount Accounting for today’s market requirements.

 AutoCount provides this tutorial for software developers to learn to develop AutoCount Accounting Plug-in through exercises.


This tutorial is a getting started for software developer to build Plug-in for AutoCount Accounting.

  • Learn the Tools and Applications to build AutoCount Accounting Plug-in
  • Add menu function for the Plug-in
  • Add Form and Dialog Box
  • Load AutoCount Data from Microsoft SQL Server

Requirements in this tutorial

  • Experience in programming, and C# (C Sharp) programming language.
  • AutoCount Accounting version 1.8.25, and 2.0.
  • AutoCount Plug-in Builder with AutoCount Developer ID.
  • Development Tools & Programs
  • Versions Comparison
Comparison of AutoCount Accounting Major versions
AutoCount Accounting 1.8.25
or Higher
AutoCount Accounting 2.0
Development Tool Microsoft Visual Studio 2015 or higher
Database Server Microsoft SQL Server 2008R2 SP2, SQL Server 2012, SQL Server 2014
.Net Framework Microsoft .Net Framework 4.0 Microsoft .Net Framework 4.5
Assemblies DevExpress WinForms Components 13.1.10 DevExpress WinForms Components 17.1.9

5 Basic Steps to Build AutoCount Accounting Plug-in Package

5 steps to successfully create a plug-in for AutoCount Accounting.



Exercise 1: Build My First Plug-In

Objectives: Create a new Plug-in project for AutoCount Accounting

This exercise is to build an AutoCount Accounting Plug-in Package, and successfully load the Plug-in at AutoCount Accounting Plug-in Manager.
Start Exercise 1

Plug-In Company Info and Properties

Developer's Company Information

Insert Company Information at the constructor of the class that inherits BCE.AutoCount.PlugIn.BasePlugIn.
public Plugin() : base(new Guid("37125E27-65B4-4B1D-9E1D-6FA67838E2BE"),
    "My First Plugin", "1.0.1")
    SetManufacturer("Auto Count Sdn. Bhd.");
    SetCopyright("Copyright 2015 © Auto Count Sdn. Bhd.");


  • SetMinimumAccountingVersionRequired is to control version compatibility of AutoCount Accounting and the plug-in.
    The string value is the lowest version of AutoCount Accounting that is required to load this plug-in.
public Plugin() : base(new Guid("37125E27-65B4-4B1D-9E1D-6FA67838E2BE"),
    "My First Plugin", "1.0.1")

SetMinimumAccountingVersionRequired(“1.8.25”) version control is added, when AutoCount Accounting version must be equal or higher than 1.8.25.

Plug-In License Mode


  • SetIsFreeLicense method is to set the license status of this plugin.
    Default value is true, when not specified.
public Plugin() : base(new Guid("37125E27-65B4-4B1D-9E1D-6FA67838E2BE"),
    "My First Plugin", "1.0.1")


  • SetSupportLicenseKey method enables [Enter License Key] button at Plug-In Manager.
    Default value is false, when not specified.
 1public Plugin() : base(new Guid("37125E27-65B4-4B1D-9E1D-6FA67838E2BE"),
 2    "My First Plugin", "1.0.1")
 4    SetManufacturer("Auto Count Sdn. Bhd.");
 5    SetManufacturerUrl("");
 6    SetCopyright("Copyright 2015 © Auto Count Sdn. Bhd.");
 7    SetSalesPhone("1-800-88-7766");
 8    SetSupportPhone("+60-3-3324-2148");
10    SetMinimumAccountingVersionRequired("1.8.25");
11    SetIsFreeLicense(false);
12    SetSupportLicenseKey(true);

Set Custom License Status

  • Beside the existing License Status, such as PermanentLicense, TemporaryLicense, and Unregistered. Custom license status can be defined.
  1. Call the method SetIsFreeLicense, and set it to false.
  2. Set the LicenseStatus properties to LicenseStatus.Custom.
  3. Then, assign string to CustomLicenseStatus.

    201a.LicenseStatus Custom s.png License Status is updated to "Beta version.".
 1public class Plugin : BCE.AutoCount.PlugIn.BasePlugIn
 3    public Plugin() : base(new Guid("37125E27-65B4-4B1D-9E1D-6FA67838E2BE"),
 4        "My First Plugin", "1.0.1")
 5    {
 6        SetIsFreeLicense(false);
 7    }
 9    public override void TestLicenseKey(LicenseStatusArgs e, string licenseKey)
10    {
11        e.LicenseStatus = LicenseStatus.Custom;
12        e.CustomLicenseStatus = "Beta version.";
13    }

Plug-In Menu and Function

Main Menu Caption

  • Set Main Menu Caption in BeforeLoad override method
    Default menu caption is "Plug-Ins".
 1public class Plugin : BCE.AutoCount.PlugIn.BasePlugIn
 3    public Plugin() : base(new Guid("37125E27-65B4-4B1D-9E1D-6FA67838E2BE"),
 4        "My First Plugin", "1.0.1")
 5    {
 6    }
 8    public override bool BeforeLoad(BeforeLoadArgs e)
 9    {
10        e.MainMenuCaption = "MyFirstPlugin";
12        return base.BeforeLoad(e);
13    }

Sub Menu and Functions

Add Sub Menu that uses MenuItemAttribute (Attribute Class)

Attribute Class is a declarative method that is declared before a class,
where the class properties can be defined.
The method of the attribute has overloading methods which it supports Optional Parameter.
Method: BCE.AutoCount.PlugIn.MenuItem

Examples of defining Attribute:

//Simple MenuItemAttribute
[BCE.AutoCount.PlugIn.MenuItem("Greetings", 1)]
//Overload methods with addition parameters [BCE.AutoCount.PlugIn.MenuItem("Greetings", 1, false, "CMD_VIEW_FORM1", "CMD_OPEN_FORM1")]
//Attribute contains Optional Parameter [BCE.AutoCount.PlugIn.MenuItem("Greetings", MenuOrder=1)]
//Attribute contain Optional Parameter [BCE.AutoCount.PlugIn.MenuItem("Greetings", 1, OpenAccessRight="CMD_OPEN_FORM1", VisibleAccessRight="CMD_VIEW_FORM1")]
//Attribute contains Optional Parameter [BCE.AutoCount.PlugIn.MenuItem("Greetings", MenuOrder=1, BeginNewGroup=true, ParentMenuCaption="Group Menu", ParentMenuOrder=1, OpenAccessRight="CMD_OPEN_FORM1", VisibleAccessRight="CMD_VIEW_FORM1")]

This sample code shows where to use the attribute.

[BCE.AutoCount.PlugIn.MenuItem("Greetings", 1)]
class FormAbout : Form
    public FormAbout(BCE.Data.DBSetting dbSetting)

Add Sub Menu that inherits BCE.AutoCount.PlugIn.BaseMenuItem

  • Create a class that inherits from BCE.AutoCount.PlugIn.BaseMenuItem
class SubMenuAbout : BCE.AutoCount.PlugIn.BaseMenuItem
    public SubMenuAbout(BCE.Data.DBSetting dbSetting) : base("BaseMenuItem Sample", 90, true, "", "")

    public override void MenuItemClick(
             ISimpleThreadFormLauncher threadFormLauncher, DBSetting dbSetting)
        base.MenuItemClick(threadFormLauncher, dbSetting);


Exercise 2: Create Dialog Box

Objectives: Create "About" Dialog Box to display information of this plug-in.

This exercise shows the steps to create Dialog Box using Class Attribute.
Start Exercise 2


Exercise 3: Create Form

Objectives: Create a windows form to load A/R Invoice, A/R Debit Note, A/R Credit Note and A/R Payment.

An example to load data and display on the Form.
Start Exercise 3


In this tutorial, you have learned;

  1. Apply Plug-In Entry Point
  2. Create Menu Item
  3. Create and build AutoCount Accounting plug-in.
  4. Access to MS SQL Server instance with DBSetting.
    You will learn more on BCE.Data.DBSetting as we progress.
  5. Load AutoCount Accounting data to a System.Data.DataTable.

Next tutorial, we look at the presentation of user interface, and design the UI that look and feel like AutoCount Accounting.

See Also

Go to menu

IconAC81.png Go to top
ProgrammerGo.jpg Resources For AutoCount Software Developers