diff --git a/MVPLearning/BaseLibrary/BaseDateTimePicker.cs b/MVPLearning/BaseLibrary/BaseDateTimePicker.cs index f222c0f..4dc072e 100644 --- a/MVPLearning/BaseLibrary/BaseDateTimePicker.cs +++ b/MVPLearning/BaseLibrary/BaseDateTimePicker.cs @@ -18,7 +18,7 @@ namespace MVPLearning.BaseLibrary } public void Bind(object datasource, string dataproperty) { - var oldBinding = this.DataBindings[nameof(BoundValue)]; + var oldBinding = DataBindings[nameof(BoundValue)]; if (oldBinding != null) { DataBindings.Remove(oldBinding); } var newBinding = new Binding(nameof(BoundValue), datasource, dataproperty, true); @@ -50,23 +50,11 @@ namespace MVPLearning.BaseLibrary } protected override void OnValueChanged(EventArgs eventargs) { - System.Diagnostics.Debug.WriteLine("OnValueChanged"); base.OnValueChanged(eventargs); BoundValue = Value; Format = DateTimePickerFormat.Custom; CustomFormat = Checked ? "MM/dd/yyyy" : " "; } - protected override void OnValidated(EventArgs e) - { - base.OnValidated(e); - } - protected override void OnValidating(CancelEventArgs e) - { - base.OnValidating(e); - System.Diagnostics.Debug.WriteLine("OnValidating"); - System.Diagnostics.Debug.WriteLine($"Value: {Value}"); - System.Diagnostics.Debug.WriteLine($"BoundValue: {BoundValue}"); - } } }