fixed cred id showing up in config window

This commit is contained in:
David Sparer
2017-07-29 22:07:51 -05:00
parent edb5dff064
commit c4900f5a66
2 changed files with 3 additions and 4 deletions

View File

@@ -3,8 +3,7 @@ using System.ComponentModel;
using System.Drawing.Design;
using System.Windows.Forms.Design;
using mRemoteNG.App;
using mRemoteNG.Credential;
using mRemoteNG.Tools;
namespace mRemoteNG.UI.Controls
{
@@ -38,7 +37,7 @@ namespace mRemoteNG.UI.Controls
//return newCred;
}
return listBox.SelectedItem ?? value;
return listBox.SelectedItem.Id.Maybe() ?? value;
}
private void ListBoxOnSelectedValueChanged(object sender, EventArgs eventArgs)

View File

@@ -3,11 +3,11 @@ using System.ComponentModel;
using System.Windows.Forms;
using mRemoteNG.Credential;
namespace mRemoteNG.UI.Controls
{
public partial class CredentialRecordListBox : ListBox
{
public new ICredentialRecord SelectedItem => (ICredentialRecord)base.SelectedItem;
public ICredentialRecord NoneSelection { get; } = new CredentialRecord { Title = $"--{Language.strNone}--" };
public ICredentialRecord AddNewSelection { get; } = new CredentialRecord { Title = $"--{Language.strAdd}--" };