using BBWY.Client.APIServices; using BBWY.Client.Models.PackTask; using BBWY.Controls; using System; using System.Collections.Generic; using System.IO.Packaging; 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.Shapes; namespace BBWY.Client.Views.StorePickSelf { /// /// StorePickProductWindow.xaml 的交互逻辑 /// public partial class StorePickProductWindow : BWindow { public StorePickProductWindow(StoreGetSelfResponse model, Func SaveData,bool _isQuality) { this. SaveData=SaveData; StoreGetSelfResponse =model; InitializeComponent(); this.DataContext = this; IsQuality = _isQuality; } private bool isQuality; public bool IsQuality { get => isQuality; set { Set(ref isQuality, value); } } private string userName; /// /// 用户名 /// public string UserName { get => userName; set { Set(ref userName, value); } } private int count; public int Count { get => count; set { Set(ref count, value); } } private StoreGetSelfResponse storeGetSelfResponse; public StoreGetSelfResponse StoreGetSelfResponse { get=> storeGetSelfResponse; set {Set(ref storeGetSelfResponse,value); } } private void BButton_Click(object sender, RoutedEventArgs e) { if (SaveData != null&& SaveData(Count, UserName)) { this.Close(); } } private Func SaveData { get; set; } private void BButton_Click_1(object sender, RoutedEventArgs e) { Count = StoreGetSelfResponse.PickMaxCount; } } }