mirror of
https://github.com/mRemoteNG/mRemoteNG.git
synced 2026-02-17 22:11:48 +08:00
25 lines
705 B
C#
25 lines
705 B
C#
using System.Collections.Generic;
|
|
using System.Windows.Forms;
|
|
using mRemoteNG.Credential;
|
|
|
|
namespace mRemoteNG.UI.Controls
|
|
{
|
|
public partial class CredentialRecordComboBox : ComboBox
|
|
{
|
|
public IEnumerable<ICredentialRecord> CredentialRecords { get; set; }
|
|
|
|
public CredentialRecordComboBox()
|
|
{
|
|
InitializeComponent();
|
|
PopulateItems(CredentialRecords);
|
|
}
|
|
|
|
private void PopulateItems(IEnumerable<ICredentialRecord> credentialRecords)
|
|
{
|
|
if (credentialRecords == null) return;
|
|
Items.Clear();
|
|
foreach (var credential in credentialRecords)
|
|
Items.Add(credential);
|
|
}
|
|
}
|
|
} |