private void cmdGeoNear_Click(object sender, EventArgs e)
{
GeoNearOptionsBuilder GeoOption = new GeoNearOptionsBuilder();
GeoOption.SetDistanceMultiplier(double.Parse(NumDistanceMultiplier.Text));
GeoOption.SetMaxDistance(double.Parse(NumMaxDistance.Text));
GeoOption.SetSpherical(chkSpherical.Checked);
try
{
BsonDocument mGeoNearAs = SystemManager.GetCurrentCollection().GeoNearAs<BsonDocument>
(null, double.Parse(NumGeoX.Text), double.Parse(NumGeoY.Text), (int)NumResultCount.Value, GeoOption).Response;
MongoDBHelper.FillDataToTreeView("Result", this.trvGeoResult, mGeoNearAs);
this.trvGeoResult.DatatreeView.Nodes[0].Expand();
}
catch (Exception ex)
{
SystemManager.ExceptionDeal(ex);
}
}