public bool Commit(IProtocolOptions options, IKeyAgentOptions agent)
{
StringResource sr = OptionDialogPlugin.Instance.Strings;
//暗号アルゴリズム順序はoptionsを直接いじっているのでここでは何もしなくてよい
try {
options.HostKeyAlgorithmOrder = GetHostKeyAlgorithmOrder();
try {
options.SSHWindowSize = Int32.Parse(_windowSizeBox.Text);
}
catch (FormatException) {
GUtil.Warning(this, sr.GetString("Message.OptionDialog.InvalidWindowSize"));
return false;
}
options.RetainsPassphrase = _retainsPassphrase.Checked;
options.SSHCheckMAC = _sshCheckMAC.Checked;
options.CipherAlgorithmOrder = GetCipherAlgorithmOrder();
options.LogSSHEvents = _sshEventLog.Checked;
return true;
}
catch (Exception ex) {
GUtil.Warning(this, ex.Message);
return false;
}
}