优化读单卡顿问题
This commit is contained in:
1 parent
8e88e0f5d7
commit
bcc934c1ba
14 files changed
+586
-31
No files matched your search
@@ -0,0 +1,59 @@
|
||||
using AllBase.Model.DBModel;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows;
|
||||
using System.Windows.Controls;
|
||||
using System.Windows.Data;
|
||||
using System.Windows.Documents;
|
||||
using System.Windows.Input;
|
||||
using System.Windows.Media;
|
||||
using System.Windows.Media.Imaging;
|
||||
using System.Windows.Navigation;
|
||||
using System.Windows.Shapes;
|
||||
|
||||
namespace _29WxOrderWpf.Ctrls.OrderCtrls;
|
||||
|
||||
/// <summary>
|
||||
/// OrderTransitListCtrl.xaml 的交互逻辑
|
||||
/// </summary>
|
||||
public partial class OrderTransitListCtrl : UserControl
|
||||
{
|
||||
OrderTransitListCtrlViewModel ViewModel;
|
||||
|
||||
public OrderTransitListCtrl(oms_wei_order_item_transit_info transitInfo)
|
||||
{
|
||||
InitializeComponent();
|
||||
|
||||
ViewModel = new OrderTransitListCtrlViewModel(transitInfo);
|
||||
ViewModel.RequestClose += ViewModel_RequestClose;
|
||||
|
||||
DataContext = ViewModel;
|
||||
this.lbxTransitList.ItemsSource = ViewModel.TransitInfo.OrderItemTransitDetailList;
|
||||
}
|
||||
|
||||
private void ViewModel_RequestClose()
|
||||
{
|
||||
Window parentWindow = Window.GetWindow(this);
|
||||
if (this.IsLoaded && parentWindow != null)
|
||||
parentWindow.Close();
|
||||
}
|
||||
|
||||
private void OrderTransitListCtrl_Loaded(object sender, RoutedEventArgs e)
|
||||
{
|
||||
Window parentWindow = Window.GetWindow(this);
|
||||
if (parentWindow != null)
|
||||
{
|
||||
parentWindow.Closed += ChangeWaybillView_Closed;
|
||||
}
|
||||
ViewModel.Start();
|
||||
}
|
||||
|
||||
private void ChangeWaybillView_Closed(object sender, EventArgs e)
|
||||
{
|
||||
ViewModel.Stop();
|
||||
}
|
||||
|
||||
}
|
||||
Reference in new issue
Block a user