You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
46 lines
1.3 KiB
46 lines
1.3 KiB
using BBWYB.Client.Models;
|
|
using BBWYB.Client.ViewModels;
|
|
using CommunityToolkit.Mvvm.Messaging;
|
|
using CommunityToolkit.Mvvm.Messaging.Messages;
|
|
using SJ.Controls;
|
|
|
|
namespace BBWYB.Client.Views.Order
|
|
{
|
|
/// <summary>
|
|
/// EditPrice.xaml 的交互逻辑
|
|
/// </summary>
|
|
public partial class EditPrice : BWindow
|
|
{
|
|
public EditPrice(Models.Order order)
|
|
{
|
|
InitializeComponent();
|
|
(this.DataContext as EditPriceViewModel).SetData(order);
|
|
this.Loaded += EditPrice_Loaded;
|
|
this.Unloaded += EditPrice_Unloaded;
|
|
}
|
|
|
|
private void EditPrice_Unloaded(object sender, System.Windows.RoutedEventArgs e)
|
|
{
|
|
WeakReferenceMessenger.Default.UnregisterAll(this);
|
|
}
|
|
|
|
private void EditPrice_Loaded(object sender, System.Windows.RoutedEventArgs e)
|
|
{
|
|
WeakReferenceMessenger.Default.Register<Message_EditPrice_Close>(this, (o, x) =>
|
|
{
|
|
this.Dispatcher.Invoke(() =>
|
|
{
|
|
this.DialogResult = true;
|
|
this.Close();
|
|
});
|
|
});
|
|
}
|
|
}
|
|
|
|
public class Message_EditPrice_Close : ValueChangedMessage<object>
|
|
{
|
|
public Message_EditPrice_Close(object value) : base(value)
|
|
{
|
|
}
|
|
}
|
|
}
|
|
|