private void btnOk_Click(object sender, EventArgs e) { if (this.DestinationItem == CopyDestinationItem.Ask) { this.DestFolderNeeded(); int num = this.Selection.Count<IVirtualItem>(); if (((num > 1) && (this.RenameFilter != null)) && (Path.GetFileName(this.CopyTo).IndexOfAny(FileMaskChars) < 0)) { bool checkBoxChecked = false; switch (MessageDialog.Show(this, PluralInfo.Format(Resources.sAskCopyToSingleFile, new object[] { num }), Resources.sConfirmCopyToFile, Resources.sRememberQuestionAnswer, ref checkBoxChecked, MessageDialog.ButtonsYesNoCancel, MessageBoxIcon.Question)) { case MessageDialogResult.Yes: this.DestinationItem = CopyDestinationItem.Folder; this.FDestFolder = null; break; case MessageDialogResult.No: break; default: return; } if (checkBoxChecked) { ConfirmationSettings.Default.CopyDestinationItem = this.DestinationItem; } } } if (this.Validator.Validate(true)) { base.DialogResult = DialogResult.OK; } else if (!this.Validator.GetIsValid(this.cmbCopyTo)) { this.cmbCopyTo.Select(); } }
private string Write190_CopyDestinationItem(CopyDestinationItem v) { switch (v) { case CopyDestinationItem.Ask: return "Ask"; case CopyDestinationItem.File: return "File"; case CopyDestinationItem.Folder: return "Folder"; } long num = (long) v; throw base.CreateInvalidEnumValueException(num.ToString(CultureInfo.InvariantCulture), "Nomad.Dialogs.CopyDestinationItem"); }