private string checkVolName() { DataSet dataSet = new DataSet(); dataSet.ReadXml(Application.StartupPath + "\\p3.xml", XmlReadMode.ReadSchema); string text = dataSet.Tables["t1"].Rows[0]["c2"].ToString(); clsMe clsMe = new clsMe(); text = clsMe.Decrypt(text, "ja7z%$Or29W]", Encoding.Default); text = text.Substring(0, text.IndexOf("%")); return(text.CompareTo(clsMe.GetVolumeID()).ToString()); }
private string checkVolName() { DataSet dataSet = new DataSet(); dataSet.ReadXml(Application.StartupPath + "\\p3.xml", XmlReadMode.ReadSchema); string text = dataSet.Tables["t1"].Rows[0]["c2"].ToString(); clsMe clsMe = new clsMe(); text = clsMe.Decrypt(text, "ja7z%$Or29W]", Encoding.Default); text = text.Substring(0, text.IndexOf("%")); return text.CompareTo(clsMe.GetVolumeID()).ToString(); }
private void frmHao_Load(object sender, EventArgs e) { clsMe clsMe = new clsMe(); Random random = new Random(DateTime.Now.Millisecond); int num = random.Next(10); string text = ""; if (num == 0) { text = "A"; } if (num == 1) { text = "B"; } if (num == 2) { text = "c"; } if (num == 3) { text = "D"; } if (num == 4) { text = "f"; } if (num == 5) { text = "z"; } if (num == 6) { text = "R"; } if (num == 7) { text = "v"; } if (num == 8) { text = "Q"; } if (num == 9) { text = "L"; } string volumeID = clsMe.GetVolumeID(); string text2 = ""; text2 = text2 + text + "QW"; if (this.strflag == "init") { text2 += "0"; this.Text = "数据升级-初次安装"; } else { text2 += MDIParent.dsP.Tables["V"].Rows[0]["ver"].ToString(); } this.txtHao.Text = clsMe.Encrypt(string.Concat(new string[] { num.ToString(), volumeID.Substring(0, 4), text, volumeID.Substring(4), text2 }), "P&*GF12)"); }