protected TransferPromptModel(TransferPromptController controller, SessionPool source, SessionPool destination, Transfer transfer) { _controller = controller; _source = source; _destination = destination; Transfer = transfer; _action = TransferAction.forName( PreferencesFactory.get() .getProperty(String.Format("queue.prompt.{0}.action.default", transfer.getType().name()))); }
private void PopulateActions() { View.PopulateActions(GetTransferActions()); TransferAction defaultAction = TransferAction.forName( PreferencesFactory.get() .getProperty(String.Format("queue.prompt.{0}.action.default", Transfer.getType().name()))); View.SelectedAction = defaultAction; Action = defaultAction; }
protected virtual void PopulateActions() { IDictionary <TransferAction, string> actions = new Dictionary <TransferAction, string>(); if (Transfer.isResumable()) { actions.Add(TransferAction.ACTION_RESUME, TransferAction.ACTION_RESUME.getLocalizableString()); } actions.Add(TransferAction.ACTION_OVERWRITE, TransferAction.ACTION_OVERWRITE.getLocalizableString()); actions.Add(TransferAction.ACTION_RENAME, TransferAction.ACTION_RENAME.getLocalizableString()); actions.Add(TransferAction.ACTION_SKIP, TransferAction.ACTION_SKIP.getLocalizableString()); if (Transfer.getSession().isRenameSupported(Transfer.getRoot())) { actions.Add(TransferAction.ACTION_RENAME_EXISTING, TransferAction.ACTION_RENAME_EXISTING.getLocalizableString()); } View.PopulateActions(actions); TransferAction defaultAction = TransferAction.forName( Preferences.instance().getProperty("queue.prompt.action.default")); View.SelectedAction = defaultAction; Action = defaultAction; }