45 lines
1.6 KiB
C#
45 lines
1.6 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.IO;
|
|
using System.Linq;
|
|
using System.Net;
|
|
using System.Net.Http;
|
|
using System.Net.Http.Headers;
|
|
using System.Security.Claims;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
using System.Web.Http;
|
|
using Thermo.Active.Database.Controllers;
|
|
using Thermo.Active.Listeners;
|
|
using Thermo.Active.Model.DatabaseModels;
|
|
using Thermo.Active.Model.DTOModels.AlarmModels;
|
|
using Thermo.Active.Provider;
|
|
using Thermo.Active.Thermocamera;
|
|
using static Thermo.Active.Config.ServerConfig;
|
|
using static Thermo.Active.Model.Constants;
|
|
|
|
namespace Thermo.Active.Controllers.WebApi
|
|
{
|
|
[RoutePrefix("api/thermocamera")]
|
|
public class ThermocameraController : ApiController
|
|
{
|
|
[Route("show"), HttpPost]
|
|
public IHttpActionResult showCamera()
|
|
{
|
|
String ThermoCameraXpos = AdditionalParametersConfig["ThermoCameraXpos"];
|
|
String ThermoCameraYpos = AdditionalParametersConfig["ThermoCameraYpos"];
|
|
String ThermoCameraXdim = AdditionalParametersConfig["ThermoCameraXdim"];
|
|
String ThermoCameraYdim = AdditionalParametersConfig["ThermoCameraYdim"];
|
|
if(ThermoCameraXpos != null && ThermoCameraYpos != null && ThermoCameraXdim != null && ThermoCameraYdim != null)
|
|
{
|
|
|
|
if (ThermocameraComunicator.getInstance().showWindow(Int32.Parse(ThermoCameraXpos), Int32.Parse(ThermoCameraYpos), Int32.Parse(ThermoCameraXdim), Int32.Parse(ThermoCameraYdim), 3000))
|
|
return Ok();
|
|
else
|
|
return BadRequest();
|
|
|
|
}
|
|
return BadRequest();
|
|
}
|
|
}
|
|
} |