In this Article I'm going to explain some more advanced features of Plugin creation.
Table of Contents
There is another Interface you can use to conditionally show a Plugin.
public class ProtirusPlugin : IConditionalPlugin
Implement the following method
ShowPlugin
This is from the Developer Guide.
public bool ShowPlugin()
{
// To Update
return (CurrentProjectHolder.GetInstance().Project.GetProjectType() == ProjectTypeEnum.maestro);
}
Gets a value indicating if the plugin should be displayed.
ProjectTypeEnum doesn't exist anymore but searching in the DLLs I found
namespace LogicBase.Tool.Common
public enum ProductType
{
Maestro,
Harmony,
Metronome,
Divo,
Composer,
Universal
}
Or
LogicBase.Tool
public static class ProjectType
string[] strArrays = new string[] {
".Workflow", ".Decision", ".Integration", ".WebForms",
".WinForms", ".Harmony", ".Maestro", ".Virtuoso",
".Metronome", ".Monitoring", ".Composer", ".WinComposer"
};
Pull in the following
using LogicBase.Core.Utilities;
Looking into this I couldn't find the matching Projects so I'm going to check the ProjectType another way.
ProjectTypeData ptd = CurrentProjectHolder.GetInstance().Project.ProjectSetupData.ProjectType;
Guid projectTypeId = ptd.ProjectTypeId;
string projectTypeName = ptd.ProjectTypeName;
Debug.Print(string.Format(@"ProjectTypeId {0} | ProjectTypeName {1}", projectTypeId, projectTypeName));
- LogicBase.Core.Models.Decision.DescisionProject, LogicBase.Core
- LogicBase.Core.Models.Dialog.FormDialogProject, LogicBase.Core
- LogicBase.Core.Models.Monitoring.MonitoringProject, LogicBase.Core
- LogicBase.Core.Models.Flexi.FlexiProject, LogicBase.Core
- LogicBase.Core.Models.Workflow.WorkflowProject, LogicBase.Core
- Integration