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.
45 lines
1.5 KiB
45 lines
1.5 KiB
using BBWYB.Client.Models;
|
|
using BBWYB.Client.ViewModels;
|
|
using CommunityToolkit.Mvvm.Messaging;
|
|
using CommunityToolkit.Mvvm.Messaging.Messages;
|
|
using SJ.Controls;
|
|
using System.Collections.Generic;
|
|
|
|
namespace BBWYB.Client.Views.Purchase
|
|
{
|
|
/// <summary>
|
|
/// _1688Purchase.xaml 的交互逻辑
|
|
/// </summary>
|
|
public partial class OnlinePurchase : BWindow
|
|
{
|
|
public OnlinePurchase(Models.Order order, IList<PurchaseScheme> schemeList)
|
|
{
|
|
InitializeComponent();
|
|
(this.DataContext as OnlinePurchaseViewModel).SetData(order, schemeList);
|
|
this.Loaded += _1688Purchase_Loaded;
|
|
this.Unloaded += _1688Purchase_Unloaded;
|
|
}
|
|
|
|
private void _1688Purchase_Unloaded(object sender, System.Windows.RoutedEventArgs e)
|
|
{
|
|
//Messenger.Default.Unregister(this);
|
|
WeakReferenceMessenger.Default.UnregisterAll(this);
|
|
}
|
|
|
|
private void _1688Purchase_Loaded(object sender, System.Windows.RoutedEventArgs e)
|
|
{
|
|
//Messenger.Default.Register<object>(this, "OnlinePurchase_Close", (x) => this.Dispatcher.Invoke(() => this.Close()));
|
|
WeakReferenceMessenger.Default.Register<Message_OnlinePurchase_Close>(this, (o, x) =>
|
|
{
|
|
this.Dispatcher.Invoke(() => this.Close());
|
|
});
|
|
}
|
|
}
|
|
|
|
public class Message_OnlinePurchase_Close : ValueChangedMessage<object>
|
|
{
|
|
public Message_OnlinePurchase_Close(object value) : base(value)
|
|
{
|
|
}
|
|
}
|
|
}
|
|
|