/// <summary> /// Creates a new instance of the <see cref="Measurements"/> class. /// </summary> /// <param name="autosave">Determines whether the current item is saved automatically when a new item is selected.</param> public Measurements(bool autosave = true) : base(0, autosave) { m_historianLookupList = Historian.GetLookupList(null, isOptional: true); m_signalTypeLookupList = SignalType.GetLookupList(null); m_searcher = new AsyncSearcher <DataModels.Measurement>(); m_searcher.MatchesFound += Searcher_MatchesFound; m_searcher.SearchComplete += Searcher_SearchComplete; }
/// <summary> /// Creates a new instance of the <see cref="Measurements"/> class. /// </summary> /// <param name="deviceID">The ID of the device that the current measurement is associated with..</param> /// <param name="itemsPerPage">The number of measurements to display on each page of the data grid.</param> /// <param name="autosave">Determines whether the current item is saved automatically when a new item is selected.</param> public Measurements(int deviceID, int itemsPerPage, bool autosave = true) : base(0, autosave) // Set ItemsPerPage to zero to avoid load() in the base class. { m_deviceID = deviceID; ItemsPerPage = itemsPerPage; m_historianLookupList = Historian.GetLookupList(null, isOptional: true); m_signalTypeLookupList = SignalType.GetLookupList(null); m_searcher = new AsyncSearcher <DataModels.Measurement>(); m_searcher.MatchesFound += Searcher_MatchesFound; m_searcher.SearchComplete += Searcher_SearchComplete; Load(); }