private void UpdateChildren() { if (control.ShowCheckBox) { if (checkBox == null) { checkBox = new DateTimePickerCheckBoxProvider(this); InsertChildProvider(checkBox, 0); } } else { if (checkBox != null) { RemoveChildProvider(checkBox); checkBox.Terminate(); checkBox = null; } } if (control.ShowUpDown) { if (dropDownButton != null) { RemoveChildProvider(dropDownButton); dropDownButton.Terminate(); dropDownButton = null; } } else { if (dropDownButton == null) { dropDownButton = new DateTimePickerButtonProvider(this); AddChildProvider(dropDownButton); } } }
private void UpdateChildren () { if (control.ShowCheckBox) { if (checkBox == null) { checkBox = new DateTimePickerCheckBoxProvider (this); InsertChildProvider (checkBox, 0); } } else { if (checkBox != null) { RemoveChildProvider (checkBox); checkBox.Terminate (); checkBox = null; } } if (control.ShowUpDown) { if (dropDownButton != null) { RemoveChildProvider (dropDownButton); dropDownButton.Terminate (); dropDownButton = null; } } else { if (dropDownButton == null) { dropDownButton = new DateTimePickerButtonProvider (this); AddChildProvider (dropDownButton); } } }