Esempio n. 1
0
        private void txtIco_TextChanged(object sender, EventArgs e)
        {
            itemProp.icoID = Int32.Parse(txtIco.Text);
            SqlDb sqldb = new SqlDb();

            try
            {
                sqldb.SetConnection(itemProp.conn);
                DataSet ds = sqldb.ExeSqlDs("select filename,frame from icon where id=" + txtIco.Text, "icon");
                m_icoFileName = ds.Tables[0].Rows[0]["filename"].ToString();
                m_icoFileName = System.IO.Path.Combine(itemProp.iconDir, m_icoFileName);
                m_icoFrame    = Int32.Parse(ds.Tables[0].Rows[0]["frame"].ToString());
            }
            catch
            {
                m_icoFileName = "";
                m_icoFrame    = 0;
            }
            timer1.Enabled = true;
        }
Esempio n. 2
0
        private void buttonX3_Click(object sender, EventArgs e)
        {
            if(itemProp.icoSelector != null)
            {
                itemProp.icoSelector.IconID = itemProp.icoID;

                if (!itemProp.icoSelector.Inited) // 延迟初始化
                {
                    itemProp.icoSelector.Init();
                }

                int ret = itemProp.icoSelector.Show();

                if (ret >= 0)
                {
                    txtIco.Text = ret.ToString();
                    SqlDb sqldb = new SqlDb();
                    sqldb.SetConnection(itemProp.conn);
                    DataSet ds = sqldb.ExeSqlDs("select soundid from icon where id=" + txtIco.Text, "icon");
                    textSoundID.Text = ds.Tables[0].Rows[0][0].ToString();
                }
            }
            else
            {
                MessageBox.Show("icoSelector尚未初始化");
            }
        }
Esempio n. 3
0
 private void txtIco_TextChanged(object sender, EventArgs e)
 {
     itemProp.icoID = Int32.Parse(txtIco.Text);
     SqlDb sqldb = new SqlDb();
     try
     {
         sqldb.SetConnection(itemProp.conn);
         DataSet ds = sqldb.ExeSqlDs("select filename,frame from icon where id=" + txtIco.Text, "icon");
         m_icoFileName = ds.Tables[0].Rows[0]["filename"].ToString();
         m_icoFileName = System.IO.Path.Combine(itemProp.iconDir, m_icoFileName);
         m_icoFrame = Int32.Parse(ds.Tables[0].Rows[0]["frame"].ToString());
     }
     catch
     {
         m_icoFileName = "";
         m_icoFrame = 0;
     }
     timer1.Enabled = true;
 }