public bool Init(SqlConnection Conn, string strIconDir) { // 初始化数据库连接及数据表 helper.CurrentSqlConnection = Conn; helper.InitCacheTable(); tgaIO.sqlConn = Conn; m_id = -1; tgaIO.StrIconFolder = strIconDir; m_formselector = new FormSelector(); m_formselector.Tag = this; if (m_bEdit) { m_formselector.EnterEditMode(); } FormScan form = new FormScan(); object[] objs = form.Init(Conn, strIconDir, m_formselector.imageIcons); m_formselector.IconsInfo = objs; inited = true; if (objs.Length > 0) { form.ShowDialog(); //显示图像并创建ImageList } else { return(false); } return(true); }
public bool Init(SqlConnection Conn, string strIconDir) { // 初始化数据库连接及数据表 helper.CurrentSqlConnection = Conn; helper.InitCacheTable(); tgaIO.sqlConn = Conn; m_id = -1; tgaIO.StrIconFolder = strIconDir; m_formselector = new FormSelector(); m_formselector.Tag = this; if (m_bEdit) m_formselector.EnterEditMode(); FormScan form = new FormScan(); object[] objs = form.Init(Conn, strIconDir, m_formselector.imageIcons); m_formselector.IconsInfo = objs; inited = true; if (objs.Length > 0) { form.ShowDialog(); //显示图像并创建ImageList } else { return false; } return true; }