private void btnAdvanced_Click(object sender, EventArgs e) { PackageAdvancedOptionsDialog paoDialog = new PackageAdvancedOptionsDialog(); DialogResult result = paoDialog.ShowDialog(); if (result == System.Windows.Forms.DialogResult.OK) { if (paoDialog.Salt.Length == 32 && paoDialog.InitVector.Length == 16) { customSalt = paoDialog.Salt; customInitVector = paoDialog.InitVector; customIterations = paoDialog.Iterations; } } }
/// <summary> /// Handles the click event for the Advanced button. /// </summary> /// <param name="sender">Object that fired the event</param> /// <param name="e">.NET supplied event parameters</param> private void btnAdvanced_Click(object sender, EventArgs e) { if (cmbPackageForm.SelectedIndex != -1) { PackageAdvancedOptionsDialog paoDialog = new PackageAdvancedOptionsDialog(IncludeCodeTables, IncludeGridData, FormInclusionType); if (this.customSalt.Length == 32 && this.customInitVector.Length == 16) { paoDialog = new PackageAdvancedOptionsDialog(IncludeCodeTables, IncludeGridData, FormInclusionType, customInitVector, customSalt, customIterations); } DialogResult result = paoDialog.ShowDialog(); if (result == System.Windows.Forms.DialogResult.OK) { if (paoDialog.Salt.Length == 32 && paoDialog.InitVector.Length == 16) { customSalt = paoDialog.Salt; customInitVector = paoDialog.InitVector; customIterations = paoDialog.Iterations; } this.FormInclusionType = paoDialog.FormInclusionType; this.IncludeCodeTables = paoDialog.IncludeCodeTables; this.IncludeGridData = paoDialog.IncludeGridData; } } }