-
-
Notifications
You must be signed in to change notification settings - Fork 2
/
LLAReaderControl.xaml.cs
51 lines (45 loc) · 1.72 KB
/
LLAReaderControl.xaml.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
using Leosac.KeyManager.Library.KeyStore.NXP_SAM.UI.Domain;
using System.Windows;
using System.Windows.Controls;
namespace Leosac.KeyManager.Library.KeyStore.NXP_SAM.UI
{
/// <summary>
/// Interaction logic for LLAReaderControl.xaml
/// </summary>
public partial class LLAReaderControl : UserControl
{
public LLAReaderControl()
{
InitializeComponent();
DataContext = new LLAReaderViewModel();
}
public string ReaderProvider
{
get { return (string)GetValue(ReaderProviderProperty); }
set { SetValue(ReaderProviderProperty, value); }
}
public static readonly DependencyProperty ReaderProviderProperty = DependencyProperty.Register(nameof(ReaderProvider), typeof(string), typeof(LLAReaderControl),
new FrameworkPropertyMetadata("PCSC"));
public string ReaderUnit
{
get { return (string)GetValue(ReaderUnitProperty); }
set { SetValue(ReaderUnitProperty, value); }
}
public static readonly DependencyProperty ReaderUnitProperty = DependencyProperty.Register(nameof(ReaderUnit), typeof(string), typeof(LLAReaderControl),
new FrameworkPropertyMetadata(""));
private void cbReaderProvider_SelectionChanged(object sender, SelectionChangedEventArgs e)
{
if (DataContext is LLAReaderViewModel model)
{
model.RefreshReaderList(this);
}
}
private void btnRefreshReaderUnits_Click(object sender, RoutedEventArgs e)
{
if (DataContext is LLAReaderViewModel model)
{
model.RefreshReaderList(this);
}
}
}
}