public void ClearForm() { // clear the dates for all of time... mfbTIDateFrom.Date = mfbTIDateFrom.DefaultDate; mfbTIDateTo.Date = mfbTIDateTo.DefaultDate; UncheckDates(); rbAllTime.Checked = true; // Clear the text field and airport fields txtAirports.Text = txtRestrict.Text = string.Empty; rblFlightDistance.SelectedIndex = 0; // clear the aircraft foreach (ListItem li in cklAircraft.Items) { li.Selected = false; } // clear the makes foreach (ListItem li in cklMakes.Items) { li.Selected = false; } txtModelNameText.Text = string.Empty; // clear the types. ckComplex.Checked = ckCowl.Checked = ckHighPerf.Checked = ckProp.Checked = ckRetract.Checked = ckGlass.Checked = ckTAA.Checked = ckTailwheel.Checked = ckMotorGlider.Checked = ckMultiEngineHeli.Checked = false; // And clear the "contains times ckFSLanding.Checked = ckNightLandings.Checked = ckApproaches.Checked = ckHolds.Checked = ckXC.Checked = ckSimIMC.Checked = ckIMC.Checked = ckNight.Checked = ckDual.Checked = ckCFI.Checked = ckSIC.Checked = ckPIC.Checked = ckAnyInstrument.Checked = ckAnyLandings.Checked = ckGroundSim.Checked = ckTotal.Checked = ckPublic.Checked = ckIsSigned.Checked = ckHasTelemetry.Checked = ckHasImages.Checked = false; cmbFlightCharsConjunction.SelectedValue = GroupConjunction.All.ToString(); rbEngineAny.Checked = true; rbEngineJet.Checked = rbEnginePiston.Checked = rbEngineTurbine.Checked = rbEngineTurboprop.Checked = false; rbInstanceAny.Checked = true; rbInstanceReal.Checked = rbInstanceTrainingDevices.Checked = false; // clear the catclasses foreach (ListItem li in cklCatClass.Items) { li.Selected = false; } // Clear the flight properties foreach (ListItem li in cklCustomProps.Items) { li.Selected = false; } cmbPropertiesConjunction.SelectedValue = GroupConjunction.Any.ToString(); // reset any cached types TypeNames.Clear(); txtQueryName.Text = string.Empty; // Force the next "get" of the restriction to regenerate m_fq = null; }