private static void InitializePump(IEditorPlugIn plugIn, IDevice deviceSymbol) { IPage gradientPage; IDeviceModel deviceModel = plugIn.DeviceModels.Add(deviceSymbol, DeviceIcon.Pump); IPumpDescription description = plugIn.System.PumpSubsystem.CreatePumpDescription(deviceSymbol); plugIn.System.PumpSubsystem.Pumps.Add(description); ISymbol curveSymbol = deviceSymbol.Children["Curve"]; if (curveSymbol != null) { PumpGradientPage gradientPageControl = new PumpGradientPage(description); gradientPageControl.AllowEmptyGradientCells = false; gradientPage = deviceModel.CreatePage(gradientPageControl, "Gradient", deviceSymbol); } else { gradientPage = deviceModel.CreatePage(new PumpGradientPlotPage(description), "Gradient", deviceSymbol); } gradientPage.Description = deviceSymbol.Name + " Gradient"; IPage pumpPage = deviceModel.CreatePage(new PumpFlowPage(gradientPage, description), "Flow", deviceSymbol); pumpPage.Description = deviceSymbol.Name + " Flow"; IEditorDeviceView view = deviceModel.EditorDeviceViews.Add(EditorViewOrder.PumpViews); view.Pages.Add(pumpPage); view.Pages.Add(gradientPage); deviceModel.WizardPages.Add(pumpPage, WizardPageOrder.PumpPages); deviceModel.WizardPages.Add(gradientPage, WizardPageOrder.PumpPages); }
/// <seealso cref="IInitEditorPlugIn.Initialize"/> public void Initialize(IEditorPlugIn plugIn) { IDeviceModel deviceModel = plugIn.DeviceModels.Add(plugIn.Symbol, DeviceIcon.Pump); // Create gradient page for TimeTableDriver. //Information like flow symbol and solvent symbols are stored in IPumpDescription. //See CM7 DDK V2 help for further information. IPumpDescription pumpDescription = plugIn.System.PumpSubsystem.CreatePumpDescription(plugIn.Symbol as IDevice); plugIn.System.PumpSubsystem.Pumps.Add(pumpDescription); IPage iGradientPage = deviceModel.CreatePage(new PumpGradientPage(pumpDescription), "Gradient Settings", plugIn.Symbol); //Add iGradientPage to Wizard page collection. Set order to OvenPages . deviceModel.WizardPages.Add(iGradientPage, WizardPageOrder.PumpPages); //Add iGradientPage page to Editor page collection. IEditorDeviceView deviceEditorView = deviceModel.EditorDeviceViews.Add(EditorViewOrder.PumpViews); deviceEditorView.Pages.Add(iGradientPage); // Create time grid page for TimeTableDriver. IPage iValvePage = deviceModel.CreatePage(new TimeGridPage(), "Valve Settings", plugIn.Symbol); //Add iTempCtrlPage to Wizard page collection. Set order to OvenPages . deviceModel.WizardPages.Add(iValvePage, WizardPageOrder.PumpPages); //Add TempCtrl page to Editor page collection. deviceEditorView.Pages.Add(iValvePage); }
/// <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); } }