コード例 #1
0
        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;
        }
コード例 #2
0
 public DetailServer(MtpVisuOpcUaClient parentRef)
 {
     this.ParentRef = parentRef;
 }