/// <summary> /// Set the parameters needed from the Net, namely the data source used. /// </summary> /// <param name="np">Specifies the NetParameter used.</param> public override void SetNetParameterUsed(NetParameter np) { base.SetNetParameterUsed(np); m_strSource = null; m_nSourceId = 0; m_nProjectID = np.ProjectID; foreach (LayerParameter p in np.layer) { if (p.type == LayerParameter.LayerType.DATA || p.type == LayerParameter.LayerType.TRIPLET_DATA) { m_strSource = p.data_param.source; break; } } if (m_strSource != null) { m_nSourceId = m_db.GetSourceID(m_strSource); } }
/// <summary> /// Opens the underlying database with a given data source. /// </summary> /// <param name="strSrc">Specifies the data source name.</param> public void Open(string strSrc) { m_strSrc = strSrc; m_nSrcID = m_db.GetSourceID(strSrc); }