internal IndirectReference AddImage(DictionaryToken dictionary, byte[] bytes) { var reserved = context.ReserveNumber(); var stored = new ImageStored(dictionary, bytes, reserved); images[stored.Id] = stored; return(new IndirectReference(reserved, 0)); }
private async void OnTouchEffectAction(object sender, TouchActionEventArgs args) { if (!App.IsWorks) { App.IsWorks = true; var viewPoint = args.Location; SKPoint point = new SKPoint((float)(canvasView.CanvasSize.Width * viewPoint.X / canvasView.Width), (float)(canvasView.CanvasSize.Height * viewPoint.Y / canvasView.Height)); var actionType = args.Type; _touchGestureRecognizer.ProcessTouchEvent(args.Id, actionType, point); ICommanderReceivedData commanderReceivedData = new ImageStored(); RequestClass requestClass = RequestClass.Instance(commanderReceivedData); ImageData image = new ImageData(); image.CoordinateXY = new int[] { (int)point.X, (int)point.Y }; image.Base64 = Convert.ToBase64String(targetImageByte); image.Id = 1; image = requestClass.SendAndTakeImage(image); if (image.Base64 != null) { targetImageByte = Convert.FromBase64String(image.Base64); imgCam.Source = ImagePreprocessing.GetImageSourceFromByteArray(targetImageByte); // App.IsWorks = false; } else { IsBusy = false; // App.IsWorks = false; } CurrentReport.Instance.Date = DateTime.UtcNow; // CurrentReport.Instance.ThermoImagePath = "icon_about.png"; CurrentReport.Instance.Length = Math.Round(double.Parse(image.Matlab.Height), 2); CurrentReport.Instance.Width = Math.Round(double.Parse(image.Matlab.Width), 2); CurrentReport.Instance.Surface = Math.Round(double.Parse(image.Matlab.Arena), 2); CurrentReport.Instance.GranulationTissuePercentage = Math.Round(double.Parse(image.Matlab.MatrixC1), 2); CurrentReport.Instance.SludgePercentage = Math.Round(double.Parse(image.Matlab.MatrixC2), 2); CurrentReport.Instance.NecrosisPercentage = Math.Round(double.Parse(image.Matlab.MatrixC3), 2); //CurrentReport.Instance.WoundBaseTemperature = 0; // CurrentReport.Instance.SurroundingsTemperature = 0; var secondPage = new NewItemPage(); await Navigation.PushAsync(secondPage); } }