-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathPeopleViewerWindow.xaml.cs
More file actions
38 lines (31 loc) · 890 Bytes
/
PeopleViewerWindow.xaml.cs
File metadata and controls
38 lines (31 loc) · 890 Bytes
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
using PeopleViewer.Presentation;
using System.Windows;
namespace PeopleViewer;
public partial class PeopleViewerWindow : Window
{
PeopleViewModel viewModel { get; init; }
public PeopleViewerWindow(PeopleViewModel peopleViewModel)
{
InitializeComponent();
viewModel = peopleViewModel;
this.DataContext = viewModel;
}
private async void FetchButton_Click(object sender, RoutedEventArgs e)
{
await viewModel.RefreshPeople();
ShowRepositoryType();
}
private void ClearButton_Click(object sender, RoutedEventArgs e)
{
viewModel.ClearPeople();
ClearRepositoryType();
}
private void ShowRepositoryType()
{
RepositoryTypeTextBlock.Text = viewModel.DataReaderType;
}
private void ClearRepositoryType()
{
RepositoryTypeTextBlock.Text = string.Empty;
}
}