/* ----------------------------------------------------------------- */ /// /// ArchiveRtSettingsForm /// /// <summary> /// オブジェクトを初期化します。 /// </summary> /// /* ----------------------------------------------------------------- */ public ArchiveRtSettingsForm() { InitializeComponent(); _password = new PasswordBehavior(PasswordTextBox, ConfirmTextBox, ShowPasswordCheckBox); _password.Updated += (s, e) => UpdateEncryptionCondition(); UpdateThreadCount(); UpdateFormat(); UpdateCompressionLevel(); UpdateCompressionMethod(); UpdateEncryptionMethod(); UpdateEncryptionCondition(); ExecuteButton.Enabled = false; ExecuteButton.Click += (s, e) => Close(); ExitButton.Click += (s, e) => Close(); EncryptionCheckBox.CheckedChanged += (s, e) => UpdateEncryptionCondition(); OutputButton.Click += WhenPathRequested; OutputTextBox.TextChanged += WhenPathChanged; FormatComboBox.SelectedValueChanged += WhenFormatChanged; CompressionMethodComboBox.SelectedValueChanged += WhenCompressionMethodChanged; }
/* ----------------------------------------------------------------- */ /// /// PasswordForm /// /// <summary> /// オブジェクトを初期化します。 /// </summary> /// /* ----------------------------------------------------------------- */ public PasswordConfirmForm() { InitializeComponent(); IconPictureBox.Image = StockIcons.Warning.GetIcon(IconSize.Large).ToBitmap(); ExecuteButton.Click += (s, e) => Close(); ExitButton.Click += (s, e) => Close(); _behavior = new PasswordBehavior(PasswordTextBox, ConfirmTextBox, ShowPasswordCheckBox); _behavior.Updated += (s, e) => ExecuteButton.Enabled = _behavior.IsValid; }