private string BuildMyHTMLResponse(string thequery)
        {
            string htmlresponse = String.Empty;

            htmlresponse += @"<html><head><title>Farm Controller</title><meta http-equiv=""refresh"" content=""30;URL='/home.htm'""></head><body>";
            //<meta http-equiv=""refresh"" content=""30;URL='/home.htm'"">
            htmlresponse += PumptStatusHTMLResponse();


            if (webFarmController.isPumpRunning() == false)
            {
                //Duration in Minutes: <input type = ""text"" name = ""Duration"" value = ""20"" style=""height: 50px; width: 100px; font-size: 30px"">
                htmlresponse +=
                    @"
                    <form action=""/Start?"" method=""get"">
                           <input type = ""hidden"" name = ""PumpName"" value = ""Pump1"" style=""height: 50px; width: 100px; font-size: 25px""><br>
                            <font color=""black"" size=""7"">Duration : </font>
                            <Select name =""Duration"" value=""20"" style=""height: 50px; width: 250px; font-size: 50px"">
                                <option value=""180"">180 Minutes</option>
                                <option value=""60"">60 Minutes</option>
                                <option value=""5"">5 Minutes</option>
                            </Select>
                            <input type=""hidden"" name= ""Action"" value=""Start"">
                            <input type = ""submit"" value = ""Start"" style=""height: 75px; width: 300px; font-size: 50px"">
                    </form>
                    ";
            }

            htmlresponse += @"<br>
                <form action=""/Stop?"" method=""get"">
                            <input type = ""hidden"" name = ""PumpName"" value = ""Pump1"" style=""height: 50px; width: 100px; font-size: 30px"">
                            <input type=""hidden"" name= ""Action"" value=""Stop"">
                            <input type = ""submit"" value = ""Stop"" style=""height: 75px; width: 300px; font-size: 50px"">
               </form>

                <br>
                <br>

                <form action=""/"" method=""get"">
                            <input type = ""submit"" value = ""Refresh"" style=""height: 75px; width: 300px; font-size: 50px"">
                </form>
                <br>
                <a href=""http://192.168.1.240:8080"">Pi3 Management Page</a>
                ";

            htmlresponse += "</body></html>";
            return(htmlresponse);
        }
 private void UpdateStatus()
 {
     if (MyFarmController.isPumpRunning() == true)
     {
         LED.Fill           = greenBrush;
         txt_Info.Text      = "Running";
         txt_StartTime.Text = "Start Time: " + MyFarmController.PumpStartTime.ToString("dd/MM/yyyy hh:mm:ss tt");
         txt_EndTime.Text   = "End Time: " + MyFarmController.PumpEndTime.ToString("dd/MM/yyyy hh:mm:ss tt");
     }
     else
     {
         LED.Fill           = grayBrush;
         txt_Info.Text      = "Stopped";
         txt_StartTime.Text = "Start Time:";
         txt_EndTime.Text   = "End Time";
     }
     txt_CurrentTime.Text = "Current Time: " + DateTime.Now.ToString("dd/MM/yyyy hh:mm:ss tt");
 }