using Common.Models;
using System;
using System.Collections.Generic;
using System.ComponentModel;
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.Shapes;

namespace MegaRobo.C00225155App.MenuViews
{
    /// <summary>
    /// 粉末原液瓶属性编辑窗口
    /// </summary>
    public partial class EditPowderBottlePropertiesWindow : Window, INotifyPropertyChanged
    {
        public event PropertyChangedEventHandler PropertyChanged;
        protected void OnPropertyChanged(string propertyName)
        {
            PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName));
        }

        private SourcePowderBottleModel _powderBottle;
        public SourcePowderBottleModel PowderBottle
        {
            get => _powderBottle;
            set
            {
                if (_powderBottle != value)
                {
                    _powderBottle = value;
                    OnPropertyChanged(nameof(PowderBottle));
                }
            }
        }

        public EditPowderBottlePropertiesWindow()
        {
            InitializeComponent();
            DataContext = this;
        }


        private void SaveButton_Click(object sender, RoutedEventArgs e)
        {
            DialogResult = true;
            Close();
        }

    }
}
