Exemplo n.º 1
0
 /// <summary>
 /// 构造函数,主要用于修改产品,删除产品,查询产品
 /// </summary>
 public product(developer dev)
 {
     licenseId   = 0;
     productName = "";
     licenseForm = 0;
     moduleInfo  = new Dictionary <uint, string>();
     API         = new openAPI();
     Dev         = dev;
     raw         = "";
     rom         = "";
     pub         = "";
 }
Exemplo n.º 2
0
 /// <summary>
 /// 构造函数,主要用于创建产品
 /// </summary>
 /// <param name="licID">设定的许可ID</param>
 /// <param name="procName">产品名称</param>
 /// <param name="licForm">许可模式(云,软,云and软)</param>
 public product(uint licID, string procName, uint licForm, developer dev)
 {
     licenseId   = licID;
     productName = procName;
     licenseForm = licForm;
     moduleInfo  = new Dictionary <uint, string>();
     Dev         = dev;
     API         = new openAPI();
     raw         = "";
     rom         = "";
     pub         = "";
 }
Exemplo n.º 3
0
        private void button1_Click(object sender, EventArgs e)
        {
            string    appid = textBox1.Text;
            string    psd   = textBox2.Text;
            developer Dev   = new developer(appid, psd);
            product   pro   = new product(Dev);
            string    desc  = "";

            pro.LicenseId   = Convert.ToUInt32(textBox4.Text);
            pro.ProductName = textBox3.Text;
            if (comboBox1.Text == "云锁")
            {
                pro.LicenseForm = 1;
            }
            pro.addModules(Convert.ToUInt32(textBox5.Text), textBox6.Text);
            int ret = pro.creatProduct(ref desc);

            textBox7.Text = "创建产品 ret = " + ret.ToString() + "desc =" + desc;
            Console.WriteLine(ret.ToString());
        }