/// <summary> /// Create our Dionex.Chromeleon.Symbols.IDevice and our Properties and Commands /// </summary> /// <param name="cmDDK">The DDK instance</param> /// <param name="name">The name for our device. Note that all fraction collection settings are provided under a separate device which is always named "FractionCollection".</param> /// <param name="maximumNumberOfDetectionChannels">The maximum number of dectection channels</param> /// <returns>our IDevice object</returns> internal IDevice Create(IDDK cmDDK, string name, int maximumNumberOfDetectionChannels) { // Create our Dionex.Chromeleon.Symbols.IFractionCollection m_MyCmDevice = cmDDK.CreateFractionCollection(name, "FractionCollection.", false, maximumNumberOfDetectionChannels); m_MyCmDevice.OnGetCurrentTubeNumberAsPositionString += new FractionCollectionEventHandlerS(OnGetCurrentTubeNumberAsPositionString); m_MyCmDevice.OnStartCollect += new FractionCollectionEventHandler(OnStartCollect); m_MyCmDevice.OnSwitchTube += new FractionCollectionEventHandler(OnSwitchTube); m_MyCmDevice.OnEndCollect += new FractionCollectionEventHandler(OnEndCollect); ICommand commandGenerateAuditTrail = m_MyCmDevice.CreateCommand("GenerateAuditTrail", "Writes some example messages to the audit trail"); commandGenerateAuditTrail.OnCommand += new CommandEventHandler(OnCommand_GenerateAuditTrail); ICommand commandSetTotalNumberOnRacks = m_MyCmDevice.CreateCommand("SetTotalNumberOnRacks", "Demonstrates how to change this value"); commandSetTotalNumberOnRacks.OnCommand += new CommandEventHandler(OnCommand_SetTotalNumberOnRacks); ICommand commandSetTotalNumberInstalled = m_MyCmDevice.CreateCommand("SetTotalNumberInstalled", "Demonstrates how to change this value"); commandSetTotalNumberInstalled.OnCommand += new CommandEventHandler(OnCommand_SetTotalNumberInstalled); return(m_MyCmDevice); }