Initial commit

This commit is contained in:
Holger Börchers
2026-01-30 15:31:43 +01:00
commit 894fbbfa5a
22 changed files with 1701 additions and 0 deletions

View File

@@ -0,0 +1,48 @@
using System.Windows;
namespace ParentWpf;
/// <summary>
/// Interaction logic for MainWindow.xaml
/// </summary>
public partial class MainWindow : Window
{
private readonly MainViewModel _vm;
public MainWindow()
{
InitializeComponent();
_vm = new MainViewModel();
DataContext = _vm;
}
protected override async void OnClosed(EventArgs e)
{
base.OnClosed(e);
try { await _vm.DisposeAsync(); } catch { }
}
private async void StartChildren_Click(object sender, RoutedEventArgs e)
{
try { await _vm.StartChildrenAsync(count: 3); }
catch (Exception ex) { MessageBox.Show(this, ex.Message, "Error"); }
}
private async void PingSelected_Click(object sender, RoutedEventArgs e)
{
try { await _vm.PingSelectedAsync(); }
catch (Exception ex) { MessageBox.Show(this, ex.Message, "Error"); }
}
private async void StartWork_Click(object sender, RoutedEventArgs e)
{
try { await _vm.StartWorkSelectedAsync(); }
catch (Exception ex) { MessageBox.Show(this, ex.Message, "Error"); }
}
private async void CancelWork_Click(object sender, RoutedEventArgs e)
{
try { await _vm.CancelWorkSelectedAsync(); }
catch (Exception ex) { MessageBox.Show(this, ex.Message, "Error"); }
}
}