Exemplo n.º 1
0
        public ActionResult Index(RecordSelectList model)
        {
            var process = new RecordProcess();

            model.Records.AddRange(process.GetRecords(obj =>
                                                      obj.RecordStartDateTime >= model.Selection.StartDate &&
                                                      obj.RecordStartDateTime <= model.Selection.EndDate &&
                                                      obj.Finalized));

            return(View(model));
        }
        public ActionResult Record()
        {
            if (string.IsNullOrWhiteSpace(Request["recordId"]))
            {
                return(Redirect("/"));
            }
            var id = long.Parse(Request["recordId"]);

            var process = new RecordProcess();
            var model   = process.GetRecordInfo(id);

            return(View(model));
        }
        public ActionResult VoltageCurrentThreeSecond(RecordDataRequest request)
        {
            var range = new RequestRange()
            {
                StartIndex   = int.Parse(Request["StartIndex"]),
                RequestCount = int.Parse(Request["RequestCount"]),
                RecordId     = long.Parse(Request["RecordId"])
            };
            var process        = new RecordProcess();
            var voltageCurrent = process.LoadVoltageCurrentThreeSecond(range);
            var jsonResult     = Json(new
            {
                recordData = voltageCurrent
            }, JsonRequestBehavior.AllowGet);

            jsonResult.MaxJsonLength = int.MaxValue;
            return(jsonResult);
        }
        public ActionResult RecordData(RecordDataRequest request)
        {
            var range = new RequestRange()
            {
                StartIndex   = int.Parse(Request["StartIndex"]),
                RequestCount = int.Parse(Request["RequestCount"]),
                RecordId     = long.Parse(Request["RecordId"])
            };
            var process      = new RecordProcess();
            var activeValues = process.LoadActiveValues(range);
            var jsonResult   = Json(new
            {
                recordData = activeValues
            }, JsonRequestBehavior.AllowGet);

            jsonResult.MaxJsonLength = int.MaxValue;
            return(jsonResult);
        }
Exemplo n.º 5
0
        public ActionResult Index()
        {
            var model = new RecordSelectList()
            {
                Selection = new RecordSelect
                {
                    StartDate = DateTime.Now.AddMonths(-1),
                    EndDate   = DateTime.Now
                }
            };

            var process = new RecordProcess();

            model.Records.AddRange(process.GetRecords(obj =>
                                                      obj.RecordStartDateTime >= model.Selection.StartDate &&
                                                      obj.RecordStartDateTime <= model.Selection.EndDate &&
                                                      obj.Finalized));

            return(View(model));
        }
Exemplo n.º 6
0
        public MainWindow()
        {
            InitializeComponent();
            this.FormClosed += MainWindow_FormClosed;

            this.pictureBox1.SizeMode = PictureBoxSizeMode.StretchImage;

            Process[] processlist = Process.GetProcesses();

            foreach (Process process in processlist)
            {
                if (!string.IsNullOrEmpty(process.MainWindowTitle) && process.ProcessName == "chrome")
                {
                    this.actualwindow = process.MainWindowHandle;
                }
            }

            rec = new RecordProcess(actualwindow, Environment.GetFolderPath(Environment.SpecialFolder.MyVideos));
            Console.WriteLine(Environment.GetFolderPath(Environment.SpecialFolder.MyVideos));
        }