using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
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;
using System.ComponentModel;

namespace ThickTcpUiInWindow
{
    /// <summary>
    /// Window_ADScale.xaml 的交互逻辑
    /// </summary>
    public partial class Window_ADScale : FLY.ControlLibrary.WindowBigClose, INotifyPropertyChanged
    {
        private int old = 0;
        public int Old { get 
        {
            return old;
        }
            set {
                if (old != value) 
                {
                    old = value;
                    NotifyPropertyChanged("Old");
                }
            }
        }
        private int _new = 0;
        public int New
        {
            get
            {
                return _new;
            }
            set
            {
                if (_new != value)
                {
                    _new = value;
                    NotifyPropertyChanged("New");
                }
            }
        }
        public Window_ADScale()
        {
            InitializeComponent();
            this.DataContext = this;
        }

        private void button_apply_Click(object sender, RoutedEventArgs e)
        {
            this.DialogResult = true;
            this.Close();
        }
        protected void NotifyPropertyChanged(string propertyname) 
        {
            if (PropertyChanged != null) 
            {
                PropertyChanged.Invoke(this, new PropertyChangedEventArgs(propertyname));
            }
        }
        public event PropertyChangedEventHandler PropertyChanged;
    }
}
