Difference between revisions of "Hide Plug-In on Main Menu"

From AutoCount Resource Center
Jump to navigation Jump to search
(Created page with "<syntaxhighlight lang="csharp" highlight="10"> public class PlugInMain : AutoCount.PlugIn.BasePlugIn { public PlugInMain() : base(new Guid("12D34B4A-692D-46DE-8D7D-B3520D4...")
 
m
 
(6 intermediate revisions by the same user not shown)
Line 1: Line 1:
<syntaxhighlight lang="csharp" highlight="10">
+
<syntaxhighlight lang="csharp" highlight="10,14,16">
 
public class PlugInMain : AutoCount.PlugIn.BasePlugIn
 
public class PlugInMain : AutoCount.PlugIn.BasePlugIn
 
{
 
{
Line 21: Line 21:
 
</syntaxhighlight>
 
</syntaxhighlight>
   
* Add '''e.Visible = false''' in an override method of '''AfterLogin(AfterLoginArgs e)''' will not show "My PlugIn 2" on the MainMenu.
+
* Add '''e.Visible = false''' in '''AfterLogin(AfterLoginArgs e)'''
  +
* "My PlugIn 2" caption will not appear on the Main Menu.
   
 
[[Category:Programmer]]
 
[[Category:Programmer]]
[[Category:FAQ]]
+
[[Category:Programmer FAQ]]
  +
{{NavigateDeveloper}}

Latest revision as of 07:00, 17 July 2018

public class PlugInMain : AutoCount.PlugIn.BasePlugIn
{
    public PlugInMain() : base(new Guid("12D34B4A-692D-46DE-8D7D-B3520D4CA679"),
        "My PlugIn for AC 2.0", "1.0.0.1")
    {
    }

    public override bool BeforeLoad(BeforeLoadArgs e)
    {
        e.MainMenuCaption = "My PlugIn 2";
        return base.BeforeLoad(e);
    }

    public override void AfterLogin(AfterLoginArgs e)
    {
        e.Visible = false;
        base.AfterLogin(e);
    }
}
  • Add e.Visible = false in AfterLogin(AfterLoginArgs e)
  • "My PlugIn 2" caption will not appear on the Main Menu.

Go to menu

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