-
-
Notifications
You must be signed in to change notification settings - Fork 2
/
SAM_SEKeyStorePropertiesControl.xaml.cs
57 lines (53 loc) · 1.67 KB
/
SAM_SEKeyStorePropertiesControl.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
52
53
54
55
56
57
/*
** File Name: SAM_SEKeyStorePropertiesControl.cs
** Author: s_eva
** Creation date: January 2024
** Description: This file corresponds of the .cs hidden behind SAM_SEKeyStorePropertiesControl.xaml.
** Licence: LGPLv3
** Copyright (c) 2023-Present Synchronic
*/
using Leosac.KeyManager.Library.KeyStore.SAM_SE.UI.Domain;
using System.Windows;
using System.Windows.Controls;
namespace Leosac.KeyManager.Library.KeyStore.SAM_SE.UI
{
/// <summary>
/// Logique d'interaction pour SAM_SEKeyStorePropertiesControl.xaml
/// </summary>
public partial class SAM_SEKeyStorePropertiesControl : UserControl
{
public SAM_SEKeyStorePropertiesControl()
{
InitializeComponent();
}
private void RefreshReaderUnitsButton(object sender, RoutedEventArgs e)
{
if (DataContext is SAM_SEKeyStorePropertiesControlViewModel model)
{
RefreshReaderUnits((Button)sender);
}
}
private void RefreshReaderUnitsComboBox(object sender, RoutedEventArgs e)
{
if (DataContext is SAM_SEKeyStorePropertiesControlViewModel model)
{
RefreshReaderUnits((ComboBox)sender);
}
}
private async void RefreshReaderUnits(UIElement ele)
{
if (DataContext is SAM_SEKeyStorePropertiesControlViewModel model)
{
ele.IsEnabled = false;
try
{
await model.RefreshStationProgrammationList();
}
finally
{
ele.IsEnabled = true;
}
}
}
}
}