// window / plugin mechanics public WpfMtpControlWrapper() { InitializeComponent(); // use pre-definitions this.defsInterop = new AasxPredefinedConcepts.DefinitionsExperimental.InteropRelations(); this.defsMtp = new DefinitionsMTP.ModuleTypePackage(); }
public void Start( AdminShellPackageEnv thePackage, AdminShell.Submodel theSubmodel, AasxPluginMtpViewer.MtpViewerOptions theOptions, PluginEventStack eventStack) { this.thePackage = thePackage; this.theSubmodel = theSubmodel; this.theOptions = theOptions; this.theEventStack = eventStack; this.theDefs = new DefinitionsMTP.ModuleTypePackage(new DefinitionsMTP()); }
/// <summary> /// Create a set of minimal options /// </summary> public static MtpViewerOptions CreateDefault() { var defs = new DefinitionsMTP.ModuleTypePackage(new DefinitionsMTP()); var rec1 = new MtpViewerOptionsRecord(); rec1.RecordType = MtpViewerOptionsRecord.MtpRecordType.MtpType; rec1.AllowSubmodelSemanticId = new List <AdminShell.Key>(defs.SEM_MtpSubmodel.Keys); var rec2 = new MtpViewerOptionsRecord(); rec2.RecordType = MtpViewerOptionsRecord.MtpRecordType.MtpInstance; rec2.AllowSubmodelSemanticId = new List <AdminShell.Key>(defs.SEM_MtpInstanceSubmodel.Keys); var opt = new MtpViewerOptions(); opt.Records.Add(rec1); opt.Records.Add(rec2); return(opt); }