111 lines
3.1 KiB
C#
111 lines
3.1 KiB
C#
using Microsoft.AspNetCore.Mvc;
|
|
using System.Text.RegularExpressions;
|
|
using Emgu.CV;
|
|
using Emgu.CV.CvEnum;
|
|
using Emgu.CV.Structure;
|
|
using static System.Net.Mime.MediaTypeNames;
|
|
using System.Net.Http.Headers;
|
|
|
|
namespace Parking_spaces.Controllers
|
|
{
|
|
public class EngineeringController : Controller
|
|
{
|
|
private VideoCapture _capture;
|
|
private static int count = 0;
|
|
public IActionResult Engineering_total_table()
|
|
{
|
|
return View();
|
|
}
|
|
public IActionResult Engineering_Index()
|
|
{
|
|
return View();
|
|
}
|
|
public IActionResult Engineering_Index_()
|
|
{
|
|
return View();
|
|
}
|
|
public IActionResult Engineering_Interview()
|
|
{
|
|
//傳送line
|
|
HttpClient httpClient = new HttpClient();
|
|
httpClient.DefaultRequestHeaders.Accept.Add(new MediaTypeWithQualityHeaderValue("application/x-www-form-urlencoded"));
|
|
httpClient.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", "ykmUs2ZECQ9LDiNR4waT8w6NLXjWuYE9P8safG5xTZ6");
|
|
var content = new Dictionary<string, string>();
|
|
content.Add("message","有"+ count.ToString()+"人瀏覽過");
|
|
httpClient.PostAsync("https://notify-api.line.me/api/notify", new FormUrlEncodedContent(content));
|
|
count++;
|
|
return View();
|
|
}
|
|
public IActionResult Engineering_CAM()
|
|
{
|
|
return View();
|
|
}
|
|
public IActionResult Engineering_LED()
|
|
{
|
|
return View();
|
|
}
|
|
public IActionResult Engineering_LED_detail(string id)
|
|
{
|
|
ViewBag.parking_spaces_name = id;
|
|
return View();
|
|
}
|
|
public IActionResult Engineering_CAM_detail(string id)
|
|
{
|
|
ViewBag.parking_spaces_name = "";
|
|
ViewBag.ip = "";
|
|
ViewBag.port = "";
|
|
string[] str_list = Regex.Split(id, ":");
|
|
if (str_list.Length >= 2)
|
|
{
|
|
ViewBag.parking_spaces_name = str_list[0];
|
|
ViewBag.ip = str_list[1];
|
|
ViewBag.port = str_list[2];
|
|
}
|
|
else
|
|
{
|
|
ViewBag.ip = str_list[0];
|
|
}
|
|
|
|
//ViewBag.parking_spaces_name = id;
|
|
|
|
|
|
return View();
|
|
}
|
|
|
|
public IActionResult Engineering_Violation()
|
|
{
|
|
return View();
|
|
}
|
|
public IActionResult Engineering_parking_user_list_index()
|
|
{
|
|
return View();
|
|
}
|
|
|
|
public IActionResult Engineering_RTSP()
|
|
{
|
|
return View();
|
|
}
|
|
public IActionResult Single_violation_detail(string id)
|
|
{
|
|
ViewBag.parking_spaces_name = id;
|
|
return View();
|
|
}
|
|
public IActionResult Bootstrap_test(string id)
|
|
{
|
|
return View();
|
|
}
|
|
|
|
public IActionResult Map_RTSP(string id)
|
|
{
|
|
return View();
|
|
}
|
|
|
|
public IActionResult Yuntech_in_car()
|
|
{
|
|
return View();
|
|
}
|
|
|
|
|
|
}
|
|
}
|