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_ThickScale : FLY.ControlLibrary.WindowBigClose, INotifyPropertyChanged
    {
        private double old = 0;
        public double Old
        {
            get
            {
                return old;
            }
            set
            {
                if (old != value)
                {
                    old = value;
                    NotifyPropertyChanged("Old");
                }
            }
        }
        private double _new = 0;
        public double New
        {
            get
            {
                return _new;
            }
            set
            {
                if (_new != value)
                {
                    _new = value;
                    NotifyPropertyChanged("New");
                }
            }
        }
        public Window_ThickScale()
        {
            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;
    }
}
