コード例 #1
0
        public MyPropPage1()
        {
            InitializeComponent();

            textBoxHost.Text              = Properties.Settings.Default.Host;
            textBoxBase.Text              = Properties.Settings.Default.Base;
            textBoxPort.Text              = Properties.Settings.Default.Port;
            textBoxFilter1.Text           = Properties.Settings.Default.Filter1;
            textBoxFilter2.Text           = Properties.Settings.Default.Filter2;
            numericUpDownMaxRecords.Value = Properties.Settings.Default.MaxRecords;

            textBoxHost.TextChanged              += TextBoxChanged;
            textBoxBase.TextChanged              += TextBoxChanged;
            textBoxPort.TextChanged              += TextBoxChanged;
            textBoxFilter1.TextChanged           += TextBoxChanged;
            textBoxFilter2.TextChanged           += TextBoxChanged;
            numericUpDownMaxRecords.ValueChanged += numericUpDownChanged;

            void TextBoxChanged(object sender, EventArgs e)
            {
                if (_propertyPageSite != null)
                {
                    _propertyPageSite.OnStatusChange();
                }
            }

            void numericUpDownChanged(object sender, EventArgs e)
            {
                if (_propertyPageSite != null)
                {
                    _propertyPageSite.OnStatusChange();
                }
            }
        }
コード例 #2
0
        public MyPropPage1()
        {
            InitializeComponent();

            numericUpDownWaitingTime.Value         = Properties.Settings.Default.WaitingTime;
            numericUpDownWaitingTime.ValueChanged += numericUpDownChanged;

            void numericUpDownChanged(object sender, EventArgs e)
            {
                if (_propertyPageSite != null)
                {
                    _propertyPageSite.OnStatusChange();
                }
            }
        }
コード例 #3
0
        public MyPropPage2()
        {
            InitializeComponent();

            numericUpDownOffsetX.Value = Properties.Settings.Default.Offset_X;
            numericUpDownOffsetY.Value = Properties.Settings.Default.Offset_Y;

            numericUpDownOffsetX.ValueChanged += numericUpDownChanged;
            numericUpDownOffsetY.ValueChanged += numericUpDownChanged;

            void numericUpDownChanged(object sender, EventArgs e)
            {
                if (_propertyPageSite != null)
                {
                    _propertyPageSite.OnStatusChange();
                }
            }
        }