public static SaveInRegistery ( string key, string value ) : void | ||
key | string | |
value | string | |
return | void |
private void button1_Click(object sender, EventArgs e) { CredentialHelper.SaveInRegistery(CredentialHelper.SourceRepoUserName, SourceRepoUserName.Text); CredentialHelper.SaveInRegistery(CredentialHelper.SourceRepoPassword, SourceRepoPassword.Text); CredentialHelper.SaveInRegistery(CredentialHelper.TargetRepoUserName, TargetRepoUserName.Text); CredentialHelper.SaveInRegistery(CredentialHelper.TargetRepoPassword, TargetRepoPassword.Text); this.Close(); }
private static string GetScriptName() { string script; SHA1 sha = new SHA1CryptoServiceProvider(); using (var stream = File.OpenRead(AppDomain.CurrentDomain.SetupInformation.ConfigurationFile)) { var hash = BitConverter.ToString(sha.ComputeHash(stream)); if (hash == CredentialHelper.GetFormRegistery("ConfigHash")) { script = "UpdateSource.ps1"; } else { CredentialHelper.SaveInRegistery("ConfigHash", hash); script = "CheckoutSource.ps1"; } } return(script); }