示例#1
0
        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);
                }
            }
        }
示例#2
0
		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);
				}
			}
		}