42 lines
1.5 KiB
C#
42 lines
1.5 KiB
C#
using CMS_CORE_Library.Models;
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.Web.Http;
|
|
using System.Web.Http.Description;
|
|
using Thermo.Active.Model.DTOModels.ThWarmers;
|
|
using Thermo.Active.NC;
|
|
using Thermo.Active.Provider;
|
|
using Thermo.Active.Thermocamera;
|
|
using Thermo.Active.Utils;
|
|
using static Thermo.Active.Config.ServerConfig;
|
|
using static Thermo.Active.Model.Constants;
|
|
|
|
namespace Thermo.Active.Controllers.WebApi
|
|
{
|
|
// FIXME TODO ELIMINARE CLASSE!!!
|
|
|
|
[RoutePrefix("api/thermocamera")]
|
|
public class ThermocameraController : ApiController
|
|
{
|
|
#region Public Methods
|
|
|
|
[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();
|
|
}
|
|
|
|
#endregion Public Methods
|
|
}
|
|
} |