Removed dialogs for editing equipment and points, and their related resources
This commit is contained in:
@@ -0,0 +1,42 @@
|
||||
using Avalonia.Controls;
|
||||
using CommunityToolkit.Mvvm.ComponentModel;
|
||||
using CommunityToolkit.Mvvm.Input;
|
||||
using CommunityToolkit.Mvvm.Messaging;
|
||||
using GazpromApp.Enums;
|
||||
using GazpromApp.Messages;
|
||||
using GazpromApp.Models;
|
||||
using GazpromApp.Views;
|
||||
|
||||
namespace GazpromApp.ViewModels;
|
||||
|
||||
public partial class SaveChangesViewModel : ViewModelBase
|
||||
{
|
||||
[ObservableProperty]
|
||||
private bool _isSave;
|
||||
[ObservableProperty]
|
||||
private bool _isCancel;
|
||||
|
||||
[RelayCommand]
|
||||
private void Cancel(Window w)
|
||||
{
|
||||
((SaveChangesView)w).CanClose = true;
|
||||
WeakReferenceMessenger.Default.Send(new SaveChangesResult(false, true));
|
||||
w.Close(this);
|
||||
}
|
||||
|
||||
[RelayCommand]
|
||||
private void Save(Window w)
|
||||
{
|
||||
((SaveChangesView)w).CanClose = true;
|
||||
WeakReferenceMessenger.Default.Send(new SaveChangesResult(true, false));
|
||||
w.Close(this);
|
||||
}
|
||||
|
||||
[RelayCommand]
|
||||
private void DontSave(Window w)
|
||||
{
|
||||
((SaveChangesView)w).CanClose = true;
|
||||
WeakReferenceMessenger.Default.Send(new SaveChangesResult(false, false));
|
||||
w.Close(this);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user