nbsp; bool bPasswordRight = false;
76 if( strPassword.Length > 2 )
77 {
78 //读取密码中包含的随机字母
79 strPasswordFrontTwoChars = strPassword.Substring( 0, 2 );
80 if( CreateCryPassword( strPasswordFrontTwoChars, txtOldPassword.Text ) == strPassword )
81 {//密码符合
82 bPasswordRight = true;
83 }
84 else
85 {//密码不符
86 bPasswordRight = false;
87 }
88 }
89 else if( strPassword == txtOldPassword.Text ) //原密码为空
90 {
91 bPasswordRight = true;
92 }
93 else
94 {
95 bPasswordRight = false;
96 }
97
98 if( bPasswordRight )
99 {
100 //密码正确,写入新的密码,并设置自动加载新的设置,以便下一次更改时仍有效
101 ini.WriteString( strSectionValue, "Password", CreateCryPassword( GetRandomString(), txtNewPassword.Text ) );
102 &nb
76 if( strPassword.Length > 2 )
77 {
78 //读取密码中包含的随机字母
79 strPasswordFrontTwoChars = strPassword.Substring( 0, 2 );
80 if( CreateCryPassword( strPasswordFrontTwoChars, txtOldPassword.Text ) == strPassword )
81 {//密码符合
82 bPasswordRight = true;
83 }
84 else
85 {//密码不符
86 bPasswordRight = false;
87 }
88 }
89 else if( strPassword == txtOldPassword.Text ) //原密码为空
90 {
91 bPasswordRight = true;
92 }
93 else
94 {
95 bPasswordRight = false;
96 }
97
98 if( bPasswordRight )
99 {
100 //密码正确,写入新的密码,并设置自动加载新的设置,以便下一次更改时仍有效
101 ini.WriteString( strSectionValue, "Password", CreateCryPassword( GetRandomString(), txtNewPassword.Text ) );
102 &nb
| 对此文章发表了评论 |

