public override void PopulateFromAml(string Name, InternalElementType ie, MtpDataSourceSubscriber subscriber) { if (ie == null || subscriber == null) { return; } this.TagName = "" + Name; subscriber.SubscribeToAmlIdRefWith <double>(ie.Attribute, "V", (ct, o) => { this.Value = (double)o; }); }
private void LoadFile(string fn) { if (!".aml .zip .mtp".Contains(System.IO.Path.GetExtension(fn.Trim().ToLower()))) { return; } this.client = new WpfMtpControl.MtpVisuOpcUaClient(); this.client.ItemChanged += Client_ItemChanged; this.activeSubscriber = new MtpDataSourceSubscriber(); this.activeMtpData = new WpfMtpControl.MtpData(); this.hintsForConfigRecs = new MtpSymbolMapRecordList(); this.activeMtpData.LoadAmlOrMtp(activeVisualObjectLib, this.client, this.activeSubscriber, fn, makeUpConfigRecs: hintsForConfigRecs); if (this.activeMtpData.PictureCollection.Count > 0) { mtpVisu.SetPicture(this.activeMtpData.PictureCollection.Values.ElementAt(0)); } mtpVisu.RedrawMtp(); this.Title = "WPF MTP Viewer prototype - " + fn; }
// Construct public override void PopulateFromAml(string Name, InternalElementType ie, MtpDataSourceSubscriber subscriber) { this.TagName = "" + Name; }
// // Important Methods // public virtual void PopulateFromAml(string Name, InternalElementType ie, MtpDataSourceSubscriber subscriber) { }