コード例 #1
0
        public ApplicationGeneralPropertyPageUI( ApplicationGeneralPropertyPage page )
        {
            InitializeComponent();
            this.Page = page;

            // If values change mark this as dirty.

            foreach( var tb in this.Controls.OfType<TextBox>() )
                tb.TextChanged += ( s, a ) => this.IsDirty = true;

            foreach( var cb in this.Controls.OfType<CheckBox>() )
                cb.CheckedChanged += ( s, a ) => this.IsDirty = true;
        }
コード例 #2
0
        public ApplicationGeneralPropertyPageUI(ApplicationGeneralPropertyPage page)
        {
            InitializeComponent();
            this.Page = page;

            // If values change mark this as dirty.

            foreach (var tb in this.Controls.OfType <TextBox>())
            {
                tb.TextChanged += (s, a) => this.IsDirty = true;
            }

            foreach (var cb in this.Controls.OfType <CheckBox>())
            {
                cb.CheckedChanged += (s, a) => this.IsDirty = true;
            }
        }