private void frmDateRangePicker_Load(object sender, EventArgs e) { //set the Month View Calendar size. to the values specified in the constructor. RangePicker.CalendarDimensions = useDimensions; RangePicker.SetSelectionRange(CurrentDateRange.StartDate, CurrentDateRange.EndDate); Text = _useTitle; //resize the form to accomodate the RangePicker. this.ClientSize = new Size(RangePicker.Right, RangePicker.Height + cmdCancel.Height + 10); //now, move the controls. First, the OK button. cmdOK.Location = new Point(ClientSize.Width - cmdOK.Width - 5, ClientSize.Height - cmdOK.Height - 5); //now the cancel button... cmdCancel.Location = new Point(cmdOK.Left - 3 - cmdCancel.Width, cmdOK.Top); //we want about 5 pixels between the buttons and the rangepicker, as well as the bottom of the form. Height += 10; }
public char GetRandomCharacter(RangePicker rangePicker) { return rangePicker.GetRandomFrom(_characters); }