31 lines
811 B
C#
31 lines
811 B
C#
using Avalonia.Controls;
|
|
using CommunityToolkit.Mvvm.Messaging;
|
|
using GazpromApp.Messages;
|
|
using GazpromApp.ViewModels;
|
|
|
|
namespace GazpromApp.Views;
|
|
|
|
public partial class EditPointDialog : Window
|
|
{
|
|
public EditPointDialog()
|
|
{
|
|
InitializeComponent();
|
|
|
|
if (Design.IsDesignMode)
|
|
return;
|
|
|
|
WeakReferenceMessenger.Default.Register<EditPointDialog, ViewImageMessage>(this, static (w, m) =>
|
|
{
|
|
ImageView dialog = new ImageView()
|
|
{
|
|
DataContext = m.Image
|
|
};
|
|
m.Reply(dialog.ShowDialog<ImageViewModel?>(w));
|
|
});
|
|
|
|
WeakReferenceMessenger.Default.Register<EditPointDialog, EditPointDone>(this, static (w, m) =>
|
|
{
|
|
w.Close(m.Point);
|
|
});
|
|
}
|
|
} |