${iServer2_EditResult_Title}
${iServer2_EditResult_Description}
/// <summary>${iServer2_EditResult_method_FromJson_D}</summary> /// <param name="jsonObject">${iServer2_EditResult_method_FromJson_param_jsonObject}</param> /// <returns>${iServer2_EditResult_method_FromJson_return}</returns> public static EditResult FromJson(JsonObject jsonObject) { if (jsonObject == null) { return null; } EditResult result = new EditResult(); result.Succeed = (bool)jsonObject["succeed"]; JsonArray idsInJson = (JsonArray)jsonObject["ids"]; if (idsInJson.Count > 0 && idsInJson != null) { result.IDs = new List<int>(); for (int i = 0; i < idsInJson.Count; i++) { result.IDs.Add(idsInJson[i]); } } if (jsonObject["editBounds"] != null) { double mbMinX = (double)jsonObject["editBounds"]["leftBottom"]["x"]; double mbMinY = (double)jsonObject["editBounds"]["leftBottom"]["y"]; double mbMaxX = (double)jsonObject["editBounds"]["rightTop"]["x"]; double mbMaxY = (double)jsonObject["editBounds"]["rightTop"]["y"]; result.EditBounds = new Rectangle2D(mbMinX, mbMinY, mbMaxX, mbMaxY); } result.Message = (string)jsonObject["message"]; return result; }
private void request_Completed(object sender, RequestEventArgs e) { JsonObject jsonObject = (JsonObject)JsonObject.Parse(e.Result); EditResult result = EditResult.FromJson(jsonObject); LastResult = result; EditEventArgs args = new EditEventArgs(result, e.Result, e.UserState); OnProcessCompleted(args); }
/// <summary>${iServer2_EditEventArgs_constructor_D}</summary> public EditEventArgs(EditResult result, string originResult, object token) : base(token) { Result = result; OriginResult = originResult; }