예제 #1
0
        private static void AddChannels(IEditorPlugIn plugIn)
        {
            if (plugIn.DriverID == ModuleNo.DualPump)
            {
                bool isChannelFound = false;
                foreach (IDevice device in PumpHelper.GetPumpDevicesFromPumpModule(plugIn))
                {
                    AddChannels(plugIn, device);
                    isChannelFound = true;
                }

                if (!isChannelFound) // when the dual pump is configured as a shared device
                {
                    AddChannels(plugIn, plugIn.Symbol);
                }
            }
            else
            {
                AddChannels(plugIn, plugIn.Symbol);
            }
        }
예제 #2
0
        void IInitEditorPlugIn.Initialize(IEditorPlugIn plugIn)
        {
            m_Detector = plugIn.System.DataAcquisition.Detectors.Add(plugIn.Symbol, true);

            foreach (ISymbol symbol in plugIn.Symbol.ChildrenOfType(SymbolType.Channel))
            {
                //if (symbol.AuditLevel <= AuditLevel.Advanced)
                //{
                //    continue;
                //}

                m_Detector.Channels.Add(symbol);
            }

            IDeviceModel      deviceModel = plugIn.DeviceModels.Add(plugIn.Symbol, DeviceIcon.GenericDetector);
            IPage             page        = deviceModel.CreatePage(new DetectorPage(m_Detector), plugIn.Symbol.Name, plugIn.Symbol);
            IEditorDeviceView view        = deviceModel.EditorDeviceViews.Add(EditorViewOrder.CDDetectorViews);

            view.Pages.Add(page);
            deviceModel.WizardPages.Add(page, WizardPageOrder.CDDetectorPages);
        }
예제 #3
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);
        }
예제 #4
0
 /// <summary>
 /// Init a new detector page. DetectorSymbol is the symbol from the symbol table for the detector
 /// device.
 /// </summary>
 public DetectorPage(ISymbol detectorSymbol, IEditorPlugIn plugIn)
 {
     InitializeComponent();
     m_DetectorSymbol = detectorSymbol;
     m_EditorPlugIn   = plugIn;
 }
예제 #5
0
 public void Initialize(IEditorPlugIn plugIn)
 {
 }
예제 #6
0
 private static void Init_1(IEditorPlugIn plugIn)
 {
     PumpHelper.AddPumpPages(plugIn);
     AddChannels(plugIn);
 }
예제 #7
0
 void IInitEditorPlugIn.Initialize(IEditorPlugIn plugIn)
 {
     Init_1(plugIn);
     //Init_2(plugIn);
 }
예제 #8
0
 /// <summary>
 /// Create a new detector page. The page will display up to two channel grids. One grid is for
 /// 2D channels only and will have two columns for the properties FixedDataRate and PacketSize. The
 /// other grid will display the 3D field is available with all wavelength and bunchwidth properties.
 /// </summary>
 public DetectorPage(IEditorPlugIn plugIn)
 {
     InitializeComponent();
     m_EditorPlugIn = plugIn;
 }
예제 #9
0
        /// <seealso cref="IInitEditorPlugIn.Initialize"/>
        public void Initialize(IEditorPlugIn plugIn)
        {
            IDeviceModel deviceModel = plugIn.DeviceModels.Add(plugIn.Symbol, DeviceIcon.LcSystem);

            IEditorDeviceView editorView = null;

            // We would like to have a page for each device. Therefore the symbol for each device needs
            // to be identified.

            //Find the pump device symbol
            var pumpDeviceSymbol = FindPump(plugIn.Symbol);

            if (pumpDeviceSymbol != null)
            {
                //Create pages for pump device.
                var   pumpPage  = new PumpGeneralPage();
                IPage iPumpPage = deviceModel.CreatePage(pumpPage, "LC System Pump Settings", pumpDeviceSymbol);
                //Add iPumpPage to Wizard page collection. Set order for pump.
                deviceModel.WizardPages.Add(iPumpPage, WizardPageOrder.PumpPages);
                //Create and add pump page to Editor page collection.
                editorView = deviceModel.EditorDeviceViews.Add(EditorViewOrder.LCSystemViews);
                editorView.Pages.Add(iPumpPage);

                //Add pump gradient page.

                //The IPumpDescription object holds all relevant information of the pump which are needed by the component PumpGradientPage.
                //Information like flow symbol and solvent symbols are stored in IPumpDescription.
                //Notice: for using the IPumpDescription the pump symbol and its child need a defined structure.
                //See CM7 DDK V2 help for further information.
                IPumpDescription pumpDescription = plugIn.System.PumpSubsystem.CreatePumpDescription(pumpDeviceSymbol as IDevice);
                //Inform the system that this page handles a pump.
                plugIn.System.PumpSubsystem.Pumps.Add(pumpDescription);
                //Now create the gradient page which consists of a plot component for displaying the flow and solvent gradients
                //and a grid for defining time actions.

                iPumpPage = deviceModel.CreatePage(new PumpGradientPage(pumpDescription), "LC System Pump Gradient Settings", pumpDeviceSymbol);
                //Add iPumpPage to Wizard page collection. Set order for pump.
                deviceModel.WizardPages.Add(iPumpPage, WizardPageOrder.PumpPages);
                //Add pump page to Editor page collection.
                editorView.Pages.Add(iPumpPage);
            }

            //Find the detector device symbol
            var detectorDeviceSymbol = FindDetector(plugIn.Symbol);

            if (detectorDeviceSymbol != null)
            {
                //Create page for detector device.
                var   detectorPage  = new DetectorPage(detectorDeviceSymbol, plugIn);
                IPage iDetectorPage = deviceModel.CreatePage(detectorPage, "LC System Detector Settings", detectorDeviceSymbol);
                //Add iDetectorPage to Wizard page collection. Set order for UV VIS detectors.
                deviceModel.WizardPages.Add(iDetectorPage, WizardPageOrder.UVDetectorPages);
                //Create and add detector page to Editor page collection.
                if (editorView == null)
                {
                    editorView = deviceModel.EditorDeviceViews.Add(EditorViewOrder.LCSystemViews);
                }
                editorView.Pages.Add(iDetectorPage);
            }

            //Since there are no settings for the sampler, we do not create a dedicated page.
            //Nevertheless an inject command and a Wait.Ready statement must be created.
            //This will be done by using the BasicInjectorComponent.
            var samplerDevice = FindSampler(plugIn.Symbol);

            if (samplerDevice != null)
            {
                new BasicInjectorComponent(deviceModel, samplerDevice);
            }
        }