Ejemplo n.º 1
0
        private void setdefaultUserInfo()
        {
            string      version = Application.ProductVersion;
            INIOperater INIOper = new INIOperater(Application.StartupPath + "\\");

            if (INIOper.isFileExists())
            {
                if (version != INIOper.GetKey("infomation", "version"))
                {
                    File.Delete(Application.StartupPath + "\\" + "config.ini"); return;
                }
                UserId.Text = INIOper.GetKey("user", "atmfuser");
                //GGPassword.Text = INIOper.GetKey("user", "ggpass");
                GGuserId.Text        = INIOper.GetKey("user", "gguserid");
                savePath             = INIOper.GetKey("export", "path");
                SavePathViewBox.Text = savePath = savePath == "" ? "d:\\" : savePath;
                string keyt = INIOper.GetKey("user", "keyt");
                //********************************************************
                if (keyt == "" | keyt == null)
                {
                    return;
                }
                EncryptClass e     = new EncryptClass();
                UnEncryptRES UERes = e.UnEncryptProcess(keyt);
                if (UERes.Success)
                {
                    GGPassword.Text = UERes.Value.Replace(GGuserId.Text + " ", "");
                }
                else
                {
                    MessageBox.Show(UERes.Message);
                }
            }
        }
Ejemplo n.º 2
0
        private EncryptRES doEncrypt(string part1, string part2)
        {
            string       PassStr     = part1 + " " + part2;
            EncryptClass encryptProc = new EncryptClass();
            EncryptRES   ENCRes      = encryptProc.EncryptProcess(PassStr);

            return(ENCRes);
        }