Beispiel #1
0
        /// <seealso cref="IInitEditorPlugIn.Initialize"/>
        public void Initialize(IEditorPlugIn plugIn)
        {
            // Create an ID for the embedded binary data blocks
            var dataBlockId = new PlugInDataBlockId(plugIn.DriverID, plugIn.Symbol.Name, "MyBlobDataType");

            //Create new device model.
            var ddkDeviceModel = plugIn.DeviceModels.Add(plugIn.Symbol, DeviceIcon.LcSystem);

            var myDeviceModel = new DataBlockDeviceModel(ddkDeviceModel, dataBlockId);

            // Create a new page control.
            var plugInPage = new DataBlockPage(myDeviceModel);

            // Create a new DDK page object
            IPage ddkPage = ddkDeviceModel.CreatePage(plugInPage, "Settings stored in an embedded data block", plugIn.Symbol);

            // Add page to Wizard page collection.
            ddkDeviceModel.WizardPages.Add(ddkPage, WizardPageOrder.LCSystemPages);

            // Create a new view and add the page to view's tab control.
            IEditorDeviceView editorView = ddkDeviceModel.EditorDeviceViews.Add(EditorViewOrder.LCSystemViews);

            editorView.Pages.Add(ddkPage);
        }
Beispiel #2
0
 /// <summary>
 /// Create a new isntance of the data block page.
 /// </summary>
 public DataBlockPage(DataBlockDeviceModel deviceModel)
     : this()
 {
     DeviceModel = deviceModel;
 }