Widow – Rev 14

Subversion Repositories:
Rev:
using System.ComponentModel;
using System.Runtime.CompilerServices;
using System.Xml.Serialization;
using Windows.Annotations;

namespace Windows
{
    [XmlRoot(ElementName = "Window")]
    public class Window : INotifyPropertyChanged
    {
        #region Public Enums, Properties and Fields

        [XmlElement(ElementName = "Process")]
        public string Class
        {
            get => _class;
            set
            {
                if (value == _class)
                {
                    return;
                }

                _class = value;
                OnPropertyChanged();
            }
        }

        [XmlElement(ElementName = "Name")]
        public string Title
        {
            get => _title;
            set
            {
                if (value == _title)
                {
                    return;
                }

                _title = value;
                OnPropertyChanged();
            }
        }

        [XmlElement(ElementName = "IgnoreWidth")]
        public bool IgnoreWidth
        {
            get => _ignoreWidth;
            set
            {
                if (value == _ignoreWidth)
                {
                    return;
                }

                _ignoreWidth = value;
                OnPropertyChanged();
            }
        }

        [XmlElement(ElementName = "Width")]
        public int Width
        {
            get => _width;
            set
            {
                if (value == _width)
                {
                    return;
                }

                _width = value;
                OnPropertyChanged();
            }
        }

        [XmlElement(ElementName = "IgnoreHeight")]
        public bool IgnoreHeight
        {
            get => _ignoreHeight;
            set
            {
                if (value == _ignoreHeight)
                {
                    return;
                }

                _ignoreHeight = value;
                OnPropertyChanged();
            }
        }

        [XmlElement(ElementName = "Height")]
        public int Height
        {
            get => _height;
            set
            {
                if (value == _height)
                {
                    return;
                }

                _height = value;
                OnPropertyChanged();
            }
        }

        [XmlElement(ElementName = "IgnoreLeft")]
        public bool IgnoreLeft
        {
            get => _ignoreLeft;
            set
            {
                if (value == _ignoreLeft)
                {
                    return;
                }

                _ignoreLeft = value;
                OnPropertyChanged();
            }
        }

        [XmlElement(ElementName = "Left")]
        public int Left
        {
            get => _left;
            set
            {
                if (value == _left)
                {
                    return;
                }

                _left = value;
                OnPropertyChanged();
            }
        }

        [XmlElement(ElementName = "IgnoreTop")]
        public bool IgnoreTop
        {
            get => _ignoreTop;
            set
            {
                if (value == _ignoreTop)
                {
                    return;
                }

                _ignoreTop = value;
                OnPropertyChanged();
            }
        }

        [XmlElement(ElementName = "Top")]
        public int Top
        {
            get => _top;
            set
            {
                if (value == _top)
                {
                    return;
                }

                _top = value;
                OnPropertyChanged();
            }
        }

        #endregion

        #region Private Delegates, Events, Enums, Properties, Indexers and Fields

        private string _class;

        private int _height;

        private bool _ignoreHeight;

        private bool _ignoreLeft;

        private bool _ignoreTop;

        private bool _ignoreWidth;

        private int _left;

        private string _title;

        private int _top;

        private int _width;

        #endregion

        #region Constructors, Destructors and Finalizers

        [UsedImplicitly]
        public Window()
        {
        }

        public Window(string @class, string title, int top, int left, int width, int height) : this()
        {
            Class = @class;
            Title = title;
            Top = top;
            Left = left;
            Width = width;
            Height = height;
        }

        #endregion

        #region Interface

        public event PropertyChangedEventHandler PropertyChanged;

        #endregion

        #region Private Methods

        [NotifyPropertyChangedInvocator]
        protected virtual void OnPropertyChanged([CallerMemberName] string propertyName = null)
        {
            PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName));
        }

        #endregion
    }
}

Generated by GNU Enscript 1.6.5.90.