24 lines
589 B
C#
24 lines
589 B
C#
using System;
|
|
using Avalonia.Controls;
|
|
using CommunityToolkit.Mvvm.Messaging;
|
|
using GazpromApp.Messages;
|
|
|
|
namespace GazpromApp.Views;
|
|
|
|
public partial class NewEquipmentDialog : Window
|
|
{
|
|
public NewEquipmentDialog()
|
|
{
|
|
InitializeComponent();
|
|
|
|
WeakReferenceMessenger.Default.Register<NewEquipmentDialog, NewEquipmentDone>(this, static (w, m) =>
|
|
{
|
|
w.Close(m.Equipment);
|
|
});
|
|
}
|
|
|
|
private void Window_OnClosed(object? sender, EventArgs e)
|
|
{
|
|
WeakReferenceMessenger.Default.Unregister<NewEquipmentDone>(this);
|
|
}
|
|
} |