From b61174614a972a9e300c72ce5bae7617785995f9 Mon Sep 17 00:00:00 2001 From: JiaHao Liu Date: Thu, 5 Aug 2021 02:42:34 +0800 Subject: [PATCH] add solar.AP --- slnSolarPower.sln | 6 + solarApp/App.config | 9 + solarApp/Form1.Designer.cs | 48 ++ solarApp/Form1.cs | 21 + solarApp/Form1.resx | 60 +++ solarApp/Model/inv_hour.cs | 106 ++++ solarApp/Model/station_model.cs | 59 +++ solarApp/Program.cs | 23 + solarApp/Service/getInvSvc.cs | 107 ++++ solarApp/Service/getStationSvc.cs | 92 ++++ solarApp/Service/procInvSvc.cs | 222 +++++++++ solarApp/fmArchive.Designer.cs | 799 ++++++++++++++++++++++++++++++ solarApp/fmArchive.cs | 23 + solarApp/fmArchive.resx | 60 +++ solarApp/fmMain.Designer.cs | 796 +++++++++++++++++++++++++++++ solarApp/fmMain.cs | 209 ++++++++ solarApp/fmMain.resx | 60 +++ solarApp/solarApp.csproj | 14 + solarApp/solarApp.sln | 25 + 19 files changed, 2739 insertions(+) create mode 100644 solarApp/App.config create mode 100644 solarApp/Form1.Designer.cs create mode 100644 solarApp/Form1.cs create mode 100644 solarApp/Form1.resx create mode 100644 solarApp/Model/inv_hour.cs create mode 100644 solarApp/Model/station_model.cs create mode 100644 solarApp/Program.cs create mode 100644 solarApp/Service/getInvSvc.cs create mode 100644 solarApp/Service/getStationSvc.cs create mode 100644 solarApp/Service/procInvSvc.cs create mode 100644 solarApp/fmArchive.Designer.cs create mode 100644 solarApp/fmArchive.cs create mode 100644 solarApp/fmArchive.resx create mode 100644 solarApp/fmMain.Designer.cs create mode 100644 solarApp/fmMain.cs create mode 100644 solarApp/fmMain.resx create mode 100644 solarApp/solarApp.csproj create mode 100644 solarApp/solarApp.sln diff --git a/slnSolarPower.sln b/slnSolarPower.sln index 2531625..731c6d0 100644 --- a/slnSolarPower.sln +++ b/slnSolarPower.sln @@ -5,6 +5,8 @@ VisualStudioVersion = 16.0.31005.135 MinimumVisualStudioVersion = 10.0.40219.1 Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "SolarPower", "SolarPower\SolarPower.csproj", "{6C88BBD7-5A1F-47B8-BF46-9CBDC73EF2E9}" EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "solarApp", "solarApp\solarApp.csproj", "{3D54E7DA-4EF8-42A3-85D3-39DD08AC9A0C}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -15,6 +17,10 @@ Global {6C88BBD7-5A1F-47B8-BF46-9CBDC73EF2E9}.Debug|Any CPU.Build.0 = Debug|Any CPU {6C88BBD7-5A1F-47B8-BF46-9CBDC73EF2E9}.Release|Any CPU.ActiveCfg = Release|Any CPU {6C88BBD7-5A1F-47B8-BF46-9CBDC73EF2E9}.Release|Any CPU.Build.0 = Release|Any CPU + {3D54E7DA-4EF8-42A3-85D3-39DD08AC9A0C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {3D54E7DA-4EF8-42A3-85D3-39DD08AC9A0C}.Debug|Any CPU.Build.0 = Debug|Any CPU + {3D54E7DA-4EF8-42A3-85D3-39DD08AC9A0C}.Release|Any CPU.ActiveCfg = Release|Any CPU + {3D54E7DA-4EF8-42A3-85D3-39DD08AC9A0C}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/solarApp/App.config b/solarApp/App.config new file mode 100644 index 0000000..83106d1 --- /dev/null +++ b/solarApp/App.config @@ -0,0 +1,9 @@ + + + + + + + + + \ No newline at end of file diff --git a/solarApp/Form1.Designer.cs b/solarApp/Form1.Designer.cs new file mode 100644 index 0000000..fec4d26 --- /dev/null +++ b/solarApp/Form1.Designer.cs @@ -0,0 +1,48 @@ + +namespace solarApp +{ + partial class Form1 + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + this.SuspendLayout(); + // + // Form1 + // + this.AutoScaleDimensions = new System.Drawing.SizeF(9F, 19F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.ClientSize = new System.Drawing.Size(1269, 751); + this.Name = "Form1"; + this.Text = "Form1"; + this.ResumeLayout(false); + + } + + #endregion + } +} + diff --git a/solarApp/Form1.cs b/solarApp/Form1.cs new file mode 100644 index 0000000..27bbbb4 --- /dev/null +++ b/solarApp/Form1.cs @@ -0,0 +1,21 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Forms; + +namespace solarApp +{ + public partial class Form1 : Form + { + public Form1() + { + InitializeComponent(); + } + + } +} diff --git a/solarApp/Form1.resx b/solarApp/Form1.resx new file mode 100644 index 0000000..f298a7b --- /dev/null +++ b/solarApp/Form1.resx @@ -0,0 +1,60 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file diff --git a/solarApp/Model/inv_hour.cs b/solarApp/Model/inv_hour.cs new file mode 100644 index 0000000..d5163e1 --- /dev/null +++ b/solarApp/Model/inv_hour.cs @@ -0,0 +1,106 @@ +using System; +using System.Collections.Generic; +using System.Text; + +namespace solarApp.Model +{ + //public class raw_inv + //{ + // // public string ID { get; set; } + // // public string TIMESTAMP { get; set; } + // // public string SITEID { get; set; } + // // public string SITETYPE { get; set; } + // // public string CONTROLLERID { get; set; } + // public string INVERTERID { get; set; } + // public string reportdate { get; set; } + // //public double SN { get; set; } + // //public double AC1V { get; set; } + // //public double AC1A { get; set; } + // //public double AC1W { get; set; } + // //public double AC1F { get; set; } + // //public double AC1WH { get; set; } + // //public double AC2V { get; set; } + // //public double AC2A { get; set; } + // //public double AC2W { get; set; } + // //public double AC2F { get; set; } + // //public double AC2WH { get; set; } + // //public double AC3V { get; set; } + // //public double AC3A { get; set; } + // //public double AC3W { get; set; } + // //public double AC3F { get; set; } + // //public double AC3WH { get; set; } + // //public double ACRUNTIME { get; set; } + // //public double DC1V { get; set; } + // //public double DC1A { get; set; } + // //public double DC1W { get; set; } + // //public double DC1WH { get; set; } + // //public double DC2V { get; set; } + // //public double DC2A { get; set; } + // //public double DC2W { get; set; } + // //public double DC2WH { get; set; } + // //public double DC3V { get; set; } + // //public double DC3A { get; set; } + // //public double DC3W { get; set; } + // //public double DC3WH { get; set; } + // //public double DC4V { get; set; } + // //public double DC4A { get; set; } + // //public double DC4W { get; set; } + // //public double DC4WH { get; set; } + // //public double DC5V { get; set; } + // //public double DC5A { get; set; } + // //public double DC5W { get; set; } + // //public double DC5WH { get; set; } + // //public double DCRUNTIME { get; set; } + // public double WH { get; set; } + // public double TODAYKWH { get; set; } + // public double TOTALKWH { get; set; } + // public double PR { get; set; } + + // public int ct { get; set; } + // //public double RA1 { get; set; } + // //public double RA2 { get; set; } + // //public double RA3 { get; set; } + // //public double RA4 { get; set; } + // //public double RA5 { get; set; } + //} + + public class raw_inv + { + public string INVERTERID { get; set; } + public string reportdate { get; set; } + + public double WH { get; set; } + public double TODAYKWH { get; set; } + public double TOTALKWH { get; set; } + public double PR { get; set; } + } + + public class raw_inv_hour + { + public string INVERTERID { get; set; } + public string reportdate { get; set; } + + public double KWH { get; set; } + public double TODAYKWH { get; set; } + public double TOTALKWH { get; set; } + public double PR { get; set; } + public int count { get; set; } + } + + public class web_inv_hour + { + public string INVERTERID { get; set; } + public string reportdate { get; set; } + + public double KWH { get; set; } + public double TODAYKWH { get; set; } + public double TOTALKWH { get; set; } + public double PR { get; set; } + } + + public class web_inv_list + { + public string dbName { get; set; } + public string inverterid { get; set; } + } +} diff --git a/solarApp/Model/station_model.cs b/solarApp/Model/station_model.cs new file mode 100644 index 0000000..eac28f3 --- /dev/null +++ b/solarApp/Model/station_model.cs @@ -0,0 +1,59 @@ +using System; +using System.Collections.Generic; +using System.Text; + +namespace solarApp.Model +{ + public class raw_statino + { + // public string siteid { get; set; } + public string reportdate { get; set; } + public double KWH { get; set; } + public double TODAYKWH { get; set; } + public double TOTALKWH { get; set; } + public double PR { get; set; } + public double SOLARHOUR { get; set; } + public double kwhkwp { get; set; } + } + + public class raw_station_day + { + // public string siteid { get; set; } + public string reportdate { get; set; } + + public double KWH { get; set; } + public double TODAYKWH { get; set; } + public double TOTALKWH { get; set; } + public double PR { get; set; } + public double SOLARHOUR { get; set; } + public double kwhkwp { get; set; } + public int count { get; set; } + } + + public class web_station_hour + { + // public string siteid { get; set; } + public string reportdate { get; set; } + public double KWH { get; set; } + public double TODAYKWH { get; set; } + public double TOTALKWH { get; set; } + public double PR { get; set; } + public double SOLARHOUR { get; set; } + public double kwhkwp { get; set; } + //public double MONEY { get; set; } + //public double TODAYMONEY { get; set; } + //public double CARBON { get; set; } + //public double TODAYCARBON { get; set; } + } + + public class web_station_day + { + // public string siteid { get; set; } + public string reportdate { get; set; } + public double TODAYKWH { get; set; } + public double TOTALKWH { get; set; } + public double PR { get; set; } + public double SOLARHOUR { get; set; } + public double kwhkwp { get; set; } + } +} diff --git a/solarApp/Program.cs b/solarApp/Program.cs new file mode 100644 index 0000000..21ecdcb --- /dev/null +++ b/solarApp/Program.cs @@ -0,0 +1,23 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Threading.Tasks; +using System.Windows.Forms; + +namespace solarApp +{ + static class Program + { + /// + /// The main entry point for the application. + /// + [STAThread] + static void Main() + { + Application.SetHighDpiMode(HighDpiMode.SystemAware); + Application.EnableVisualStyles(); + Application.SetCompatibleTextRenderingDefault(false); + Application.Run(new fmMain()); + } + } +} diff --git a/solarApp/Service/getInvSvc.cs b/solarApp/Service/getInvSvc.cs new file mode 100644 index 0000000..8a047f4 --- /dev/null +++ b/solarApp/Service/getInvSvc.cs @@ -0,0 +1,107 @@ +using System; +using System.Collections.Generic; +using System.Text; +using MySql.Data.MySqlClient; +using Dapper; +using solarApp.Model; +using System.Configuration; +using System.Threading.Tasks; + +namespace solarApp.Service +{ + public class get_inv_svc + { + string Connection1 = ConfigurationManager.ConnectionStrings["mySql"].ConnectionString; + /// + /// inverter 原始資料 - 5 min + /// + /// + /// + /// + public List Get_rawInv(string reportDate, string invID) + { + using (MySqlConnection conn = new MySqlConnection(Connection1)) + { + conn.Open(); + //string sql = @"select ID, TIMESTAMP, SITEID, SITETYPE, CONTROLLERID, INVERTERID, SN, AC1V, AC1A, AC1W, AC1F, AC1WH, AC2V, AC2A, AC2W, AC2F, AC2WH, AC3V, AC3A, AC3W, AC3F, AC3WH, ACRUNTIME, DC1V, DC1A, DC1W, DC1WH, DC2V, DC2A, DC2W, DC2WH, DC3V, DC3A, DC3W, DC3WH, DC4V, DC4A, DC4W, DC4WH, DC5V, DC5A, DC5W, DC5WH, DCRUNTIME, WH, TODAYKWH, TOTALKWH, PR, RA1, RA2, RA3, RA4, RA5 + // from solar_com0002.s02202000101_inv order by id desc limit 100; "; + string sql = @"select id , reportdate, inverterid, WH, TODAYKWH, TOTALKWH, PR, RA1 from v_inv_temp where left(reportdate, 10) = '" + reportDate + "' and inverterid = '" + invID + "'"; + + //List ds = conn.Query(sql, new { kind = kind }).ToList(); + List ds = conn.Query(sql).AsList(); + conn.Close(); + return ds; + } + } + /// + /// 每小時平均值 inverter 原始資料 - hour + /// + /// + /// + /// + public List get_Inv_rawAvg(string reportDate, string invID) + { + using (MySqlConnection conn = new MySqlConnection(Connection1)) + { + conn.Open(); + //string sql = @"select left(reportdate, 13)reportdate, inverterid, round((sum(WH)/1000), 2) KWH, round(max(TODAYKWH), 2) TODAYKWH, + // round(max(TOTALKWH), 2) TOTALKWH, round(max(PR), 2) PR, count(*) count + // from v_inv_temp where left(reportdate, 10) = '" + reportDate + "' and inverterid = '" + invID + "' " + + // "group by left(reportdate, 13), inverterid"; //round(avg(PR), 2) PR, + string sql = @" select a.reportdate, a.inverterid, a.KWH, b.TODAYKWH, b.TOTALKWH, b.PR, a.count from + ( + select left(reportdate, 13)reportdate, inverterid + ,round((sum(WH)/1000), 2) KWH, count(*) count + from v_inv_temp + where left(reportdate, 10) = '" + reportDate + "' and inverterid = '" + invID + @"' + + group by left(reportdate, 13), inverterid + )a join ( + select reportdate, round(TODAYKWH, 2) TODAYKWH, round(TOTALKWH, 2) TOTALKWH, inverterid, round(PR, 2) PR + from v_inv_temp + where left(reportdate, 10) = '" + reportDate + @"' and right(reportdate, 2) = '55' and inverterid = '" + invID + @"' + )b on a.reportdate = left(b.reportdate, 13) and a.inverterid = b.inverterid "; + List ds = conn.Query(sql).AsList(); + conn.Close(); + return ds; + } + } + + /// + /// web 呈現值 每小時平均值 inverter - hour + /// + /// + /// + /// + public List get_web_Inv_hour(string reportDate, string invID) + { + using (MySqlConnection conn = new MySqlConnection(Connection1)) + { + conn.Open(); + string sql = @"select `TIMESTAMP` reportdate, inverterid, KWH, TODAYKWH, TOTALKWH, round(PR, 2) PR + from inverter_history_hour where left(`TIMESTAMP`, 10) = '" + reportDate + "' and inverterid = '" + invID + "' "; + List ds = conn.Query(sql).AsList(); + conn.Close(); + return ds; + } + } + + /// + /// + /// + /// + /// + /// + public List get_Inv_list() + { + using (MySqlConnection conn = new MySqlConnection(Connection1)) + { + conn.Open(); + string sql = @"select dbname, inverterid from v_company_inv"; + List ds = conn.Query(sql).AsList(); + conn.Close(); + return ds; + } + } + } +} diff --git a/solarApp/Service/getStationSvc.cs b/solarApp/Service/getStationSvc.cs new file mode 100644 index 0000000..345abfb --- /dev/null +++ b/solarApp/Service/getStationSvc.cs @@ -0,0 +1,92 @@ +using System; +using System.Collections.Generic; +using System.Text; +using MySql.Data.MySqlClient; +using Dapper; +using solarApp.Model; +using System.Configuration; + +namespace solarApp.Service +{ + /// + /// 電站原始資料 rawData + /// + public class getStationSvc + { + string Connection1 = ConfigurationManager.ConnectionStrings["mySql"].ConnectionString; + public List get_station_raw(string reportDate) + { + using (MySqlConnection conn = new MySqlConnection(Connection1)) + { + conn.Open(); + string sql = @"select id , reportdate, siteid, KWH, TODAYKWH, TOTALKWH, PR, SOLARHOUR, kwhkwp + from v_station_temp + where siteid = '022020001' and left(reportdate, 10) = @reportDate"; + List ds = conn.Query(sql, new { reportDate = reportDate }).AsList(); + conn.Close(); + return ds; + } + } + + /// + /// 電站每天平均 from RawData + /// + /// + /// + /// + public List get_station_rawAvg(string date1, string date2) + { + using (MySqlConnection conn = new MySqlConnection(Connection1)) + { + conn.Open(); + string sql = @" select siteid, left(reportdate, 10) reportdate, round((sum(KWH)), 2) KWH, round((max(TODAYKWH)), 2) TODAYKWH, round((max(TOTALKWH)), 2) TOTALKWH, + round((max(PR)), 2) PR, round((max(SOLARHOUR)), 2) SOLARHOUR, round((max(KWHKWP)), 2) KWHKWP, count(*) count + from v_station_temp + where left(reportdate, 10) between @date1 and @date2 + group by siteid, left(reportdate, 10)"; + List ds = conn.Query(sql, new { date1 = date1, date2 = date2 }).AsList(); + conn.Close(); + return ds; + } + } + + /// + /// web 呈現值 station - hour + /// + /// + /// + public List get_web_station_hour(string reportDate) + { + using (MySqlConnection conn = new MySqlConnection(Connection1)) + { + conn.Open(); + string sql = @" select DATE_FORMAT(`TIMESTAMP`,'%Y-%m-%d %H') reportdate, siteid, round(KWH, 2) KWH, round(TODAYKWH, 2) TODAYKWH, round(TOTALKWH, 2) TOTALKWH, + round(PR, 3) PR, round(KWHKWP, 3) KWHKWP, money + from power_station_history_hour where left(`TIMESTAMP`, 10) = '" + reportDate + "' "; + List ds = conn.Query(sql).AsList(); + conn.Close(); + return ds; + } + } + + /// + /// web 呈現值 station - day + /// + /// + /// + /// + public List get_web_station_day(string date1, string date2) + { + using (MySqlConnection conn = new MySqlConnection(Connection1)) + { + conn.Open(); + string sql = @" select DATE_FORMAT(`TIMESTAMP`,'%Y-%m-%d') reportdate, siteid, round(TODAYKWH, 2) TODAYKWH, round(TOTALKWH, 2) TOTALKWH, + round(PR, 3) PR, round(KWHKWP, 3) KWHKWP, money + from power_station_history_day where left(`TIMESTAMP`, 10) between @date1 and @date2 "; + List ds = conn.Query(sql, new { date1 = date1, date2 = date2 }).AsList(); + conn.Close(); + return ds; + } + } + } +} diff --git a/solarApp/Service/procInvSvc.cs b/solarApp/Service/procInvSvc.cs new file mode 100644 index 0000000..215ff4e --- /dev/null +++ b/solarApp/Service/procInvSvc.cs @@ -0,0 +1,222 @@ +using System; +using System.Collections.Generic; +using System.Text; +using MySql.Data.MySqlClient; +using Dapper; +using solarApp.Model; +using System.Configuration; +using System.Threading.Tasks; + +namespace solarApp.Service +{ + public class procInvSvc + { + string Connection1 = ConfigurationManager.ConnectionStrings["mySql"].ConnectionString; + /// + /// 每小時平均值 inverter 原始資料 - hour + /// + /// + /// + /// + public List proc_Inv_hour(string reportDate) + { + using (MySqlConnection conn = new MySqlConnection(Connection1)) + { + conn.Open(); + //string sql = @" select a.reportdate, a.inverterid, a.KWH, b.TODAYKWH, b.TOTALKWH, b.PR, a.count from + // ( + // select left(reportdate, 13)reportdate, inverterid + // ,round((sum(WH)/1000), 2) KWH, count(*) count + // from v_inv_temp + // where left(reportdate, 10) = '" + reportDate + "' and inverterid = '" + invID + @"' + + // group by left(reportdate, 13), inverterid + // )a join ( + // select reportdate, round(TODAYKWH, 2) TODAYKWH, round(TOTALKWH, 2) TOTALKWH, inverterid, round(PR, 2) PR + // from v_inv_temp + // where left(reportdate, 10) = '" + reportDate + @"' and right(reportdate, 2) = '55' and inverterid = '" + invID + @"' + // )b on a.reportdate = left(b.reportdate, 13) and a.inverterid = b.inverterid "; + string sql = @" +INSERT INTO `solar_master`.`inverter_history_hour`(`PowerStationId`, `INVERTERID`, `TIMESTAMP`, Irradiance, `AC1V`, `AC1A`, `AC1W`, `AC1F`, `AC1WH`, `AC2V`, `AC2A`, `AC2W`, `AC2F`, `AC2WH`, +`AC3V`, `AC3A`, `AC3W`, `AC3F`, `AC3WH`, `DC1V`, `DC1A`, `DC1W`, `DC1WH`, `DC2V`, `DC2A`, `DC2W`, `DC2WH`, `DC3V`, `DC3A`, `DC3W`, +`DC3WH`, `DC4V`, `DC4A`, `DC4W`, `DC4WH`, `DC5V`, `DC5A`, `DC5W`, `DC5WH`, `PR`, `RA1`, `RA2`, `RA3`, `RA4`, `RA5`, `ACKW`, `KWH`, `TODAYKWH`, `TOTALKWH`, `KWHKWP`) +SELECT 1 powerStationID, a.INVERTERID, concat(a.reportDate,':00:00') reportDate, IFNULL(Irradiance, 0), a.AC1V, a.AC1A, a.AC1W, a.AC1F, a.AC1WH, a.AC2V, a.AC2A, a.AC2W, a.AC2F, a.AC2WH, + a.AC3V, a.AC3A, a.AC3W, a.AC3F, a.AC3WH, a.DC1V, a.DC1A, a.DC1W, a.DC1WH, a.DC2V, a.DC2A, a.DC2W, a.DC2WH, a.DC3V, a.DC3A, a.DC3W, + a.DC3WH, a.DC4V, a.DC4A, a.DC4W, a.DC4WH, a.DC5V, a.DC5A, a.DC5W, a.DC5WH, inv_pr.PR, a.RA1, a.RA2, a.RA3, a.RA4, a.RA5, a.KWH, a.TODAYKWH, a.TOTALKWH, + i.Capacity, (a.KWH / i.Capacity) AS KWHKWP +from +( -- 取得該時間區間的KWH + SELECT FROM_UNIXTIME(a.TIMESTAMP / 1000, '%Y-%m-%d %H') AS reportDate, a.INVERTERID, + AVG(a.AC1V) AS AC1V, AVG(a.AC1A) AS AC1A, SUM(a.AC1W) AS AC1W, + AVG(a.AC1F) AS AC1F, SUM(a.AC1WH) AS AC1WH, AVG(a.AC2V) AS AC2V, + AVG(a.AC2A) AS AC2A, SUM(a.AC2W) AS AC2W, AVG(a.AC2F) AS AC2F, + SUM(a.AC2WH) AS AC2WH,AVG(a.AC3V) AS AC3V, AVG(a.AC3A) AS AC3A, + SUM(a.AC3W) AS AC3W, AVG(a.AC3F) AS AC3F, SUM(a.AC3WH) AS AC3WH, + AVG(a.DC1V) AS DC1V, AVG(a.DC1A) AS DC1A, SUM(a.DC1W) AS DC1W, + SUM(a.DC1WH) AS DC1WH, AVG(a.DC2V) AS DC2V, AVG(a.DC2A) AS DC2A, + SUM(a.DC2W) AS DC2W, SUM(a.DC2WH) AS DC2WH, AVG(a.DC3V) AS DC3V, + AVG(a.DC3A) AS DC3A, AVG(a.DC3W) AS DC3W, AVG(a.DC3WH) AS DC3WH, + AVG(a.DC4V) AS DC4V, AVG(a.DC4A) AS DC4A, SUM(a.DC4W) AS DC4W, + SUM(a.DC4WH) AS DC4WH,AVG(a.DC5V) AS DC5V, AVG(a.DC5A) AS DC5A, + SUM(a.DC5W) AS DC5W, SUM(a.DC5WH) AS DC5WH, #inv_pr.PR AS PR, + AVG(a.RA1) AS RA1, AVG(a.RA2) AS RA2, AVG(a.RA3) AS RA3, + AVG(a.RA4) AS RA4, AVG(a.RA5) AS RA5, # a.KWH, + MAX(a.TODAYKWH) AS TODAYKWH, MAX(a.TOTALKWH) AS TOTALKWH, (SUM(a.WH)/1000) AS KWH + FROM s02202000101_inv a + WHERE left(FROM_UNIXTIME(a.TIMESTAMP / 1000, '%Y-%m-%d'), 10) = '2021-08-04' + GROUP BY left(FROM_UNIXTIME(a.TIMESTAMP/ 1000, '%Y-%m-%d %H'), 13), a.INVERTERID +) a +LEFT JOIN( -- 取得整點值PR + SELECT FROM_UNIXTIME(inv.TIMESTAMP / 1000, '%Y-%m-%d %H') AS reportDate, inv.INVERTERID, inv.PR + FROM s02202000101_inv inv + WHERE left(DATE_FORMAT(FROM_UNIXTIME(inv.TIMESTAMP / 1000), '%Y-%m-%d %H:%i'), 10) = '2021-08-04' + and right(DATE_FORMAT(FROM_UNIXTIME(inv.TIMESTAMP / 1000), '%Y-%m-%d %H:%i'), 2) = '55' + GROUP BY FROM_UNIXTIME(inv.TIMESTAMP/ 1000, '%Y-%m-%d %H'), inv.INVERTERID +) inv_pr +ON a.reportDate = inv_pr.reportDate AND a.INVERTERID = inv_pr.INVERTERID +-- 取得逆變器容量 +LEFT JOIN solar_com0002.inverter i ON a.INVERTERID = i.InverterId +-- 取日照度 ----------------------臨時做法 +left join ( + select FROM_UNIXTIME(a.TIMESTAMP / 1000, '%Y-%m-%d %H') AS reportDate, round(avg(SENSORAVG01),3) Irradiance + from s02202000101_sensoravg a + where left(FROM_UNIXTIME(a.TIMESTAMP / 1000, '%Y-%m-%d'), 10) = '2021-08-04' and SENSORAVG01 <> 0 + group by FROM_UNIXTIME(a.TIMESTAMP / 1000, '%Y-%m-%d %H') +)irr on a.reportDate = irr.reportDate ;"; + List ds = conn.Query(sql).AsList(); + conn.Close(); + return ds; + } + } + + public List proc_Inv_day(string reportDate) + { + using (MySqlConnection conn = new MySqlConnection(Connection1)) + { + conn.Open(); + string sql = @" +INSERT INTO `solar_master`.`inverter_history_day`(`PowerStationId`, `INVERTERID`, `TIMESTAMP`, Irradiance, `AC1V`, `AC1A`, `AC1W`, `AC1F`, `AC1WH`, `AC2V`, `AC2A`, `AC2W`, `AC2F`, `AC2WH`, +`AC3V`, `AC3A`, `AC3W`, `AC3F`, `AC3WH`, `DC1V`, `DC1A`, `DC1W`, `DC1WH`, `DC2V`, `DC2A`, `DC2W`, `DC2WH`, `DC3V`, `DC3A`, `DC3W`, +`DC3WH`, `DC4V`, `DC4A`, `DC4W`, `DC4WH`, `DC5V`, `DC5A`, `DC5W`, `DC5WH`, `PR`, `RA1`, `RA2`, `RA3`, `RA4`, `RA5`, `ACKW`, `KWH`, `TODAYKWH`, `TOTALKWH`, `KWHKWP`) + +SELECT 1 powerStationID, a.INVERTERID, concat(a.reportDate,':00:00') reportDate, IFNULL(Irradiance, 0), a.AC1V, a.AC1A, a.AC1W, a.AC1F, a.AC1WH, a.AC2V, a.AC2A, a.AC2W, a.AC2F, a.AC2WH, + a.AC3V, a.AC3A, a.AC3W, a.AC3F, a.AC3WH, a.DC1V, a.DC1A, a.DC1W, a.DC1WH, a.DC2V, a.DC2A, a.DC2W, a.DC2WH, a.DC3V, a.DC3A, a.DC3W, + a.DC3WH, a.DC4V, a.DC4A, a.DC4W, a.DC4WH, a.DC5V, a.DC5A, a.DC5W, a.DC5WH, a.PR, a.RA1, a.RA2, a.RA3, a.RA4, a.RA5, a.KWH, a.TODAYKWH, a.TOTALKWH, + i.Capacity, (a.KWH / i.Capacity) AS KWHKWP +from +( -- 取得該時間區間的KWH + SELECT FROM_UNIXTIME(a.TIMESTAMP / 1000, '%Y-%m-%d') AS reportDate, a.INVERTERID, + AVG(a.AC1V) AS AC1V, AVG(a.AC1A) AS AC1A, SUM(a.AC1W) AS AC1W, + AVG(a.AC1F) AS AC1F, SUM(a.AC1WH) AS AC1WH, AVG(a.AC2V) AS AC2V, + AVG(a.AC2A) AS AC2A, SUM(a.AC2W) AS AC2W, AVG(a.AC2F) AS AC2F, + SUM(a.AC2WH) AS AC2WH,AVG(a.AC3V) AS AC3V, AVG(a.AC3A) AS AC3A, + SUM(a.AC3W) AS AC3W, AVG(a.AC3F) AS AC3F, SUM(a.AC3WH) AS AC3WH, + AVG(a.DC1V) AS DC1V, AVG(a.DC1A) AS DC1A, SUM(a.DC1W) AS DC1W, + SUM(a.DC1WH) AS DC1WH, AVG(a.DC2V) AS DC2V, AVG(a.DC2A) AS DC2A, + SUM(a.DC2W) AS DC2W, SUM(a.DC2WH) AS DC2WH, AVG(a.DC3V) AS DC3V, + AVG(a.DC3A) AS DC3A, AVG(a.DC3W) AS DC3W, AVG(a.DC3WH) AS DC3WH, + AVG(a.DC4V) AS DC4V, AVG(a.DC4A) AS DC4A, SUM(a.DC4W) AS DC4W, + SUM(a.DC4WH) AS DC4WH,AVG(a.DC5V) AS DC5V, AVG(a.DC5A) AS DC5A, + SUM(a.DC5W) AS DC5W, SUM(a.DC5WH) AS DC5WH, #inv_pr.PR AS PR, + AVG(a.RA1) AS RA1, AVG(a.RA2) AS RA2, AVG(a.RA3) AS RA3, + AVG(a.RA4) AS RA4, AVG(a.RA5) AS RA5, # a.KWH, + AVG(a.PR) as PR, + MAX(a.TODAYKWH) AS TODAYKWH, MAX(a.TOTALKWH) AS TOTALKWH, (SUM(a.WH)/1000) AS KWH + FROM solar_com0002.s02202000101_inv a + WHERE left(FROM_UNIXTIME(a.TIMESTAMP / 1000, '%Y-%m-%d'), 10) = '2021-08-04' + GROUP BY left(FROM_UNIXTIME(a.TIMESTAMP/ 1000, '%Y-%m-%d'), 10), a.INVERTERID +) a +-- LEFT JOIN( -- 取得整點值PR +-- SELECT FROM_UNIXTIME(inv.TIMESTAMP / 1000, '%Y-%m-%d') AS reportDate, inv.INVERTERID, inv.PR +-- FROM s02202000101_inv inv +-- WHERE left(FROM_UNIXTIME(a.TIMESTAMP / 1000, '%Y-%m-%d'), 10) = '2021-08-04' +-- and right(DATE_FORMAT(FROM_UNIXTIME(inv.TIMESTAMP / 1000), '%Y-%m-%d %H:%i'), 2) = '55' +-- GROUP BY FROM_UNIXTIME(inv.TIMESTAMP/ 1000, '%Y-%m-%d %H'), inv.INVERTERID +-- ) inv_pr +-- ON a.reportDate = inv_pr.reportDate AND a.INVERTERID = inv_pr.INVERTERID +-- 取得逆變器容量 +LEFT JOIN solar_com0002.inverter i ON a.INVERTERID = i.InverterId +-- 取日照度 ----------------------臨時做法 +left join ( + select FROM_UNIXTIME(a.TIMESTAMP / 1000, '%Y-%m-%d') AS reportDate, round(avg(SENSORAVG01),3) Irradiance + from s02202000101_sensoravg a + where left(FROM_UNIXTIME(a.TIMESTAMP / 1000, '%Y-%m-%d'), 10) = '2021-08-04' and SENSORAVG01 <> 0 + group by FROM_UNIXTIME(a.TIMESTAMP / 1000, '%Y-%m-%d') +)irr on a.reportDate = irr.reportDate ;"; + List ds = conn.Query(sql).AsList(); + conn.Close(); + return ds; + } + } + + public List proc_station_hour(string reportDate) + { + using (MySqlConnection conn = new MySqlConnection(Connection1)) + { + conn.Open(); + string sql = @" +INSERT INTO `solar_master`.`power_station_history_hour`(`PowerStationId`, `TIMESTAMP`, `SITEID`, `SITETYPE`, `KWH`, `TODAYKWH`, `TOTALKWH`, `KWHKWP`, `PR`, `MP`, `SOLARHOUR`, `MONEY`, `TODAYMONEY`, `TOTALMONEY`, `CARBON`, `TODAYCARBON`, `TOTALCARBON`) + +select 1 PowerStationId, concat(FROM_UNIXTIME(`TIMESTAMP`/1000, '%Y-%m-%d %H'), ':00:00') reportdate, siteid, 0 SITETYPE, round((sum(KWH)), 2) KWH, round((max(TODAYKWH)), 2) TODAYKWH, round((max(TOTALKWH)), 2) TOTALKWH, round((max(KWHKWP)), 2) KWHKWP, round((max(PR)), 2) PR, 0 as MP, round((max(SOLARHOUR)), 2) SOLARHOUR, + 0, 0 , 0, 0, 0 , 0 +from solar_com0002.s02202000101_station +where FROM_UNIXTIME(`TIMESTAMP`/1000, '%Y-%m-%d') = '2021-08-04' +group by siteid, FROM_UNIXTIME(`TIMESTAMP`/1000, '%Y-%m-%d %H')"; + List ds = conn.Query(sql).AsList(); + conn.Close(); + return ds; + } + } + + public List proc_station_day(string reportDate) + { + using (MySqlConnection conn = new MySqlConnection(Connection1)) + { + conn.Open(); + string sql = @" +insert into solar_master.power_station_history_day(`PowerStationId`, `TIMESTAMP`, `SITEID`, `SITETYPE`, `TODAYKWH`, `TOTALKWH`, `KWHKWP`, `PR`, `MP`, `SOLARHOUR`, `MONEY`, `TOTALMONEY`, `CARBON`, `TOTALCARBON`) + +SELECT 1 as PowerStationId, FROM_UNIXTIME(s.TIMESTAMP/1000, '%Y-%m-%d %H') AS reportDate, s.SITEID, s.SITETYPE, + s.TodayKWh, s.TotalKWH, s.KWHKWP, s.PR, s.MP, s.SolarHour, 0, 0, 0, 0 + FROM solar_com0002.s02202000101_station s + WHERE DATE_FORMAT(FROM_UNIXTIME(s.TIMESTAMP/1000), '%Y-%m-%d') = '2021-08-04' + ORDER BY TIMESTAMP DESC + LIMIT 1 "; + List ds = conn.Query(sql).AsList(); + conn.Close(); + return ds; + } + } + + public List proc_sensor_hour(string reportDate) + { + using (MySqlConnection conn = new MySqlConnection(Connection1)) + { + conn.Open(); + string sql = @" + +INSERT INTO `solar_master`.`sensor_history_hour`(`PowerStationId`, `TIMESTAMP`, `Irradiance`, `Temperature`) + +select a.PowerStationId, a.reportDate, ifnull(b.Irradiance, 0) Irradiance, a.temperature +from +(#溫度 + select 1 as PowerStationId, concat(FROM_UNIXTIME(`TIMESTAMP`/1000, '%Y-%m-%d %H'), ':00:00') AS reportDate, + 0 Irradiance, round(avg(SENSORAVG02),3) temperature + from s02202000101_sensoravg a + where left(FROM_UNIXTIME(a.TIMESTAMP / 1000, '%Y-%m-%d'), 10) = '2021-08-04' + group by FROM_UNIXTIME(a.TIMESTAMP / 1000, '%Y-%m-%d %H') +)a left join ( + #日照 + select 1 as PowerStationId, concat(FROM_UNIXTIME(`TIMESTAMP`/1000, '%Y-%m-%d %H'), ':00:00') AS reportDate, + round(avg(SENSORAVG01),3) Irradiance, round(avg(SENSORAVG02),3) temperature + from s02202000101_sensoravg a + where left(FROM_UNIXTIME(a.TIMESTAMP / 1000, '%Y-%m-%d'), 10) = '2021-08-04' and SENSORAVG01 <> 0 + group by FROM_UNIXTIME(a.TIMESTAMP / 1000, '%Y-%m-%d %H') +)b on a.reportDate = b.reportDate ;"; + List ds = conn.Query(sql).AsList(); + conn.Close(); + return ds; + } + } + } +} diff --git a/solarApp/fmArchive.Designer.cs b/solarApp/fmArchive.Designer.cs new file mode 100644 index 0000000..2f5b495 --- /dev/null +++ b/solarApp/fmArchive.Designer.cs @@ -0,0 +1,799 @@ + +namespace solarApp +{ + partial class fmArchive + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle2 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle3 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle4 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle5 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle6 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle7 = new System.Windows.Forms.DataGridViewCellStyle(); + this.tb2 = new System.Windows.Forms.TabPage(); + this.sp_main_station = new System.Windows.Forms.SplitContainer(); + this.label12 = new System.Windows.Forms.Label(); + this.dtselect_station2 = new System.Windows.Forms.DateTimePicker(); + this.lbMsg_station = new System.Windows.Forms.Label(); + this.bt_find_station = new System.Windows.Forms.Button(); + this.dtselect_station1 = new System.Windows.Forms.DateTimePicker(); + this.flowLayoutPanel1 = new System.Windows.Forms.FlowLayoutPanel(); + this.label13 = new System.Windows.Forms.Label(); + this.sp_child_station = new System.Windows.Forms.SplitContainer(); + this.gv_web_station_day = new System.Windows.Forms.DataGridView(); + this.panel7 = new System.Windows.Forms.Panel(); + this.label10 = new System.Windows.Forms.Label(); + this.label11 = new System.Windows.Forms.Label(); + this.gv_web_station_hour = new System.Windows.Forms.DataGridView(); + this.panel4 = new System.Windows.Forms.Panel(); + this.label5 = new System.Windows.Forms.Label(); + this.label6 = new System.Windows.Forms.Label(); + this.gv_fic_station_day = new System.Windows.Forms.DataGridView(); + this.panel5 = new System.Windows.Forms.Panel(); + this.label7 = new System.Windows.Forms.Label(); + this.gv_fic_station_raw = new System.Windows.Forms.DataGridView(); + this.panel6 = new System.Windows.Forms.Panel(); + this.label8 = new System.Windows.Forms.Label(); + this.label9 = new System.Windows.Forms.Label(); + this.tb_inv = new System.Windows.Forms.TabPage(); + this.sp_main_inv = new System.Windows.Forms.SplitContainer(); + this.bt_inv_proc = new System.Windows.Forms.Button(); + this.lbMsg_inv = new System.Windows.Forms.Label(); + this.lbInverterID = new System.Windows.Forms.Label(); + this.fp_inv = new System.Windows.Forms.FlowLayoutPanel(); + this.bt_select1 = new System.Windows.Forms.Button(); + this.sp_child_inv = new System.Windows.Forms.SplitContainer(); + this.gv_web_inv_hour = new System.Windows.Forms.DataGridView(); + this.panel1 = new System.Windows.Forms.Panel(); + this.label3 = new System.Windows.Forms.Label(); + this.lb_inv_hour = new System.Windows.Forms.Label(); + this.gv_fic_inv_hour = new System.Windows.Forms.DataGridView(); + this.panel3 = new System.Windows.Forms.Panel(); + this.label1 = new System.Windows.Forms.Label(); + this.gv_fic_inv_raw = new System.Windows.Forms.DataGridView(); + this.panel2 = new System.Windows.Forms.Panel(); + this.label2 = new System.Windows.Forms.Label(); + this.lb_raw_inv_hour = new System.Windows.Forms.Label(); + this.tabControl1 = new System.Windows.Forms.TabControl(); + this.tb2.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.sp_main_station)).BeginInit(); + this.sp_main_station.Panel1.SuspendLayout(); + this.sp_main_station.Panel2.SuspendLayout(); + this.sp_main_station.SuspendLayout(); + this.flowLayoutPanel1.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.sp_child_station)).BeginInit(); + this.sp_child_station.Panel1.SuspendLayout(); + this.sp_child_station.Panel2.SuspendLayout(); + this.sp_child_station.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.gv_web_station_day)).BeginInit(); + this.panel7.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.gv_web_station_hour)).BeginInit(); + this.panel4.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.gv_fic_station_day)).BeginInit(); + this.panel5.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.gv_fic_station_raw)).BeginInit(); + this.panel6.SuspendLayout(); + this.tb_inv.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.sp_main_inv)).BeginInit(); + this.sp_main_inv.Panel1.SuspendLayout(); + this.sp_main_inv.Panel2.SuspendLayout(); + this.sp_main_inv.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.sp_child_inv)).BeginInit(); + this.sp_child_inv.Panel1.SuspendLayout(); + this.sp_child_inv.Panel2.SuspendLayout(); + this.sp_child_inv.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.gv_web_inv_hour)).BeginInit(); + this.panel1.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.gv_fic_inv_hour)).BeginInit(); + this.panel3.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.gv_fic_inv_raw)).BeginInit(); + this.panel2.SuspendLayout(); + this.tabControl1.SuspendLayout(); + this.SuspendLayout(); + // + // tb2 + // + this.tb2.Controls.Add(this.sp_main_station); + this.tb2.Location = new System.Drawing.Point(4, 28); + this.tb2.Name = "tb2"; + this.tb2.Padding = new System.Windows.Forms.Padding(3); + this.tb2.Size = new System.Drawing.Size(1774, 921); + this.tb2.TabIndex = 1; + this.tb2.Text = " site "; + this.tb2.UseVisualStyleBackColor = true; + // + // sp_main_station + // + this.sp_main_station.BackColor = System.Drawing.SystemColors.ActiveCaption; + this.sp_main_station.Dock = System.Windows.Forms.DockStyle.Fill; + this.sp_main_station.Location = new System.Drawing.Point(3, 3); + this.sp_main_station.Name = "sp_main_station"; + // + // sp_main_station.Panel1 + // + this.sp_main_station.Panel1.Controls.Add(this.label12); + this.sp_main_station.Panel1.Controls.Add(this.dtselect_station2); + this.sp_main_station.Panel1.Controls.Add(this.lbMsg_station); + this.sp_main_station.Panel1.Controls.Add(this.bt_find_station); + this.sp_main_station.Panel1.Controls.Add(this.dtselect_station1); + this.sp_main_station.Panel1.Controls.Add(this.flowLayoutPanel1); + // + // sp_main_station.Panel2 + // + this.sp_main_station.Panel2.BackColor = System.Drawing.Color.OldLace; + this.sp_main_station.Panel2.Controls.Add(this.sp_child_station); + this.sp_main_station.Size = new System.Drawing.Size(1768, 915); + this.sp_main_station.SplitterDistance = 262; + this.sp_main_station.TabIndex = 0; + // + // label12 + // + this.label12.AutoSize = true; + this.label12.Font = new System.Drawing.Font("Microsoft JhengHei UI", 11F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point); + this.label12.Location = new System.Drawing.Point(13, 44); + this.label12.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + this.label12.Name = "label12"; + this.label12.Size = new System.Drawing.Size(24, 24); + this.label12.TabIndex = 12; + this.label12.Text = "~"; + // + // dtselect_station2 + // + this.dtselect_station2.Font = new System.Drawing.Font("Microsoft JhengHei UI", 11F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point); + this.dtselect_station2.Location = new System.Drawing.Point(12, 76); + this.dtselect_station2.Name = "dtselect_station2"; + this.dtselect_station2.Size = new System.Drawing.Size(234, 31); + this.dtselect_station2.TabIndex = 10; + // + // lbMsg_station + // + this.lbMsg_station.AutoSize = true; + this.lbMsg_station.Font = new System.Drawing.Font("Microsoft JhengHei UI", 11F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point); + this.lbMsg_station.Location = new System.Drawing.Point(26, 162); + this.lbMsg_station.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + this.lbMsg_station.Name = "lbMsg_station"; + this.lbMsg_station.Size = new System.Drawing.Size(22, 24); + this.lbMsg_station.TabIndex = 9; + this.lbMsg_station.Text = "..."; + // + // bt_find_station + // + this.bt_find_station.Location = new System.Drawing.Point(12, 124); + this.bt_find_station.Name = "bt_find_station"; + this.bt_find_station.Size = new System.Drawing.Size(94, 29); + this.bt_find_station.TabIndex = 7; + this.bt_find_station.Text = "查詢"; + this.bt_find_station.UseVisualStyleBackColor = true; + // + // dtselect_station1 + // + this.dtselect_station1.Font = new System.Drawing.Font("Microsoft JhengHei UI", 11F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point); + this.dtselect_station1.Location = new System.Drawing.Point(14, 8); + this.dtselect_station1.Name = "dtselect_station1"; + this.dtselect_station1.Size = new System.Drawing.Size(234, 31); + this.dtselect_station1.TabIndex = 6; + // + // flowLayoutPanel1 + // + this.flowLayoutPanel1.BackColor = System.Drawing.Color.Azure; + this.flowLayoutPanel1.Controls.Add(this.label13); + this.flowLayoutPanel1.Dock = System.Windows.Forms.DockStyle.Bottom; + this.flowLayoutPanel1.FlowDirection = System.Windows.Forms.FlowDirection.TopDown; + this.flowLayoutPanel1.Location = new System.Drawing.Point(0, 270); + this.flowLayoutPanel1.Margin = new System.Windows.Forms.Padding(4); + this.flowLayoutPanel1.Name = "flowLayoutPanel1"; + this.flowLayoutPanel1.Size = new System.Drawing.Size(262, 645); + this.flowLayoutPanel1.TabIndex = 8; + // + // label13 + // + this.label13.AutoSize = true; + this.label13.Font = new System.Drawing.Font("Microsoft JhengHei UI", 11F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point); + this.label13.Location = new System.Drawing.Point(4, 0); + this.label13.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + this.label13.Name = "label13"; + this.label13.Size = new System.Drawing.Size(110, 24); + this.label13.TabIndex = 4; + this.label13.Text = "請選擇 電站"; + // + // sp_child_station + // + this.sp_child_station.Dock = System.Windows.Forms.DockStyle.Fill; + this.sp_child_station.Location = new System.Drawing.Point(0, 0); + this.sp_child_station.Margin = new System.Windows.Forms.Padding(4); + this.sp_child_station.Name = "sp_child_station"; + // + // sp_child_station.Panel1 + // + this.sp_child_station.Panel1.Controls.Add(this.gv_web_station_day); + this.sp_child_station.Panel1.Controls.Add(this.panel7); + this.sp_child_station.Panel1.Controls.Add(this.gv_web_station_hour); + this.sp_child_station.Panel1.Controls.Add(this.panel4); + // + // sp_child_station.Panel2 + // + this.sp_child_station.Panel2.Controls.Add(this.gv_fic_station_day); + this.sp_child_station.Panel2.Controls.Add(this.panel5); + this.sp_child_station.Panel2.Controls.Add(this.gv_fic_station_raw); + this.sp_child_station.Panel2.Controls.Add(this.panel6); + this.sp_child_station.Size = new System.Drawing.Size(1502, 915); + this.sp_child_station.SplitterDistance = 727; + this.sp_child_station.SplitterWidth = 13; + this.sp_child_station.TabIndex = 1; + // + // gv_web_station_day + // + this.gv_web_station_day.AllowUserToAddRows = false; + this.gv_web_station_day.AllowUserToDeleteRows = false; + dataGridViewCellStyle1.BackColor = System.Drawing.Color.Azure; + this.gv_web_station_day.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle1; + this.gv_web_station_day.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; + this.gv_web_station_day.Dock = System.Windows.Forms.DockStyle.Fill; + this.gv_web_station_day.Location = new System.Drawing.Point(0, 583); + this.gv_web_station_day.Margin = new System.Windows.Forms.Padding(4); + this.gv_web_station_day.Name = "gv_web_station_day"; + this.gv_web_station_day.ReadOnly = true; + this.gv_web_station_day.RowHeadersWidth = 51; + this.gv_web_station_day.RowTemplate.Height = 25; + this.gv_web_station_day.Size = new System.Drawing.Size(727, 332); + this.gv_web_station_day.TabIndex = 3; + // + // panel7 + // + this.panel7.Controls.Add(this.label10); + this.panel7.Controls.Add(this.label11); + this.panel7.Dock = System.Windows.Forms.DockStyle.Top; + this.panel7.Location = new System.Drawing.Point(0, 545); + this.panel7.Margin = new System.Windows.Forms.Padding(4); + this.panel7.Name = "panel7"; + this.panel7.Size = new System.Drawing.Size(727, 38); + this.panel7.TabIndex = 2; + // + // label10 + // + this.label10.AutoSize = true; + this.label10.Font = new System.Drawing.Font("Microsoft JhengHei UI", 11F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point); + this.label10.Location = new System.Drawing.Point(230, 8); + this.label10.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + this.label10.Name = "label10"; + this.label10.Size = new System.Drawing.Size(368, 24); + this.label10.TabIndex = 1; + this.label10.Text = "solar_master.power_station_history_day"; + // + // label11 + // + this.label11.AutoSize = true; + this.label11.Font = new System.Drawing.Font("Microsoft JhengHei UI", 11F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point); + this.label11.Location = new System.Drawing.Point(35, 8); + this.label11.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + this.label11.Name = "label11"; + this.label11.Size = new System.Drawing.Size(162, 24); + this.label11.TabIndex = 0; + this.label11.Text = "web: station 每天"; + // + // gv_web_station_hour + // + this.gv_web_station_hour.AllowUserToAddRows = false; + this.gv_web_station_hour.AllowUserToDeleteRows = false; + dataGridViewCellStyle2.BackColor = System.Drawing.Color.Azure; + this.gv_web_station_hour.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle2; + this.gv_web_station_hour.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; + this.gv_web_station_hour.Dock = System.Windows.Forms.DockStyle.Top; + this.gv_web_station_hour.Location = new System.Drawing.Point(0, 38); + this.gv_web_station_hour.Margin = new System.Windows.Forms.Padding(4); + this.gv_web_station_hour.Name = "gv_web_station_hour"; + this.gv_web_station_hour.ReadOnly = true; + this.gv_web_station_hour.RowHeadersWidth = 51; + this.gv_web_station_hour.RowTemplate.Height = 25; + this.gv_web_station_hour.Size = new System.Drawing.Size(727, 507); + this.gv_web_station_hour.TabIndex = 1; + // + // panel4 + // + this.panel4.Controls.Add(this.label5); + this.panel4.Controls.Add(this.label6); + this.panel4.Dock = System.Windows.Forms.DockStyle.Top; + this.panel4.Location = new System.Drawing.Point(0, 0); + this.panel4.Margin = new System.Windows.Forms.Padding(4); + this.panel4.Name = "panel4"; + this.panel4.Size = new System.Drawing.Size(727, 38); + this.panel4.TabIndex = 0; + // + // label5 + // + this.label5.AutoSize = true; + this.label5.Font = new System.Drawing.Font("Microsoft JhengHei UI", 11F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point); + this.label5.Location = new System.Drawing.Point(230, 8); + this.label5.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + this.label5.Name = "label5"; + this.label5.Size = new System.Drawing.Size(379, 24); + this.label5.TabIndex = 1; + this.label5.Text = "solar_master.power_station_history_hour"; + // + // label6 + // + this.label6.AutoSize = true; + this.label6.Font = new System.Drawing.Font("Microsoft JhengHei UI", 11F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point); + this.label6.Location = new System.Drawing.Point(35, 8); + this.label6.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + this.label6.Name = "label6"; + this.label6.Size = new System.Drawing.Size(156, 24); + this.label6.TabIndex = 0; + this.label6.Text = "web: site 每小時 "; + // + // gv_fic_station_day + // + this.gv_fic_station_day.AllowUserToAddRows = false; + this.gv_fic_station_day.AllowUserToDeleteRows = false; + dataGridViewCellStyle3.BackColor = System.Drawing.Color.LightCyan; + this.gv_fic_station_day.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle3; + this.gv_fic_station_day.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; + this.gv_fic_station_day.Dock = System.Windows.Forms.DockStyle.Fill; + this.gv_fic_station_day.Location = new System.Drawing.Point(0, 583); + this.gv_fic_station_day.Margin = new System.Windows.Forms.Padding(4); + this.gv_fic_station_day.Name = "gv_fic_station_day"; + this.gv_fic_station_day.ReadOnly = true; + this.gv_fic_station_day.RowHeadersWidth = 51; + this.gv_fic_station_day.RowTemplate.Height = 25; + this.gv_fic_station_day.Size = new System.Drawing.Size(762, 332); + this.gv_fic_station_day.TabIndex = 4; + // + // panel5 + // + this.panel5.Controls.Add(this.label7); + this.panel5.Dock = System.Windows.Forms.DockStyle.Top; + this.panel5.Location = new System.Drawing.Point(0, 545); + this.panel5.Margin = new System.Windows.Forms.Padding(4); + this.panel5.Name = "panel5"; + this.panel5.Size = new System.Drawing.Size(762, 38); + this.panel5.TabIndex = 3; + // + // label7 + // + this.label7.AutoSize = true; + this.label7.Font = new System.Drawing.Font("Microsoft JhengHei UI", 11F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point); + this.label7.Location = new System.Drawing.Point(15, 8); + this.label7.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + this.label7.Name = "label7"; + this.label7.Size = new System.Drawing.Size(152, 24); + this.label7.TabIndex = 2; + this.label7.Text = "FIC: station 每天"; + // + // gv_fic_station_raw + // + this.gv_fic_station_raw.AllowUserToAddRows = false; + this.gv_fic_station_raw.AllowUserToDeleteRows = false; + dataGridViewCellStyle4.BackColor = System.Drawing.Color.LightCyan; + this.gv_fic_station_raw.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle4; + this.gv_fic_station_raw.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; + this.gv_fic_station_raw.Dock = System.Windows.Forms.DockStyle.Top; + this.gv_fic_station_raw.Location = new System.Drawing.Point(0, 38); + this.gv_fic_station_raw.Margin = new System.Windows.Forms.Padding(4); + this.gv_fic_station_raw.Name = "gv_fic_station_raw"; + this.gv_fic_station_raw.ReadOnly = true; + this.gv_fic_station_raw.RowHeadersWidth = 51; + this.gv_fic_station_raw.RowTemplate.Height = 25; + this.gv_fic_station_raw.Size = new System.Drawing.Size(762, 507); + this.gv_fic_station_raw.TabIndex = 2; + // + // panel6 + // + this.panel6.Controls.Add(this.label8); + this.panel6.Controls.Add(this.label9); + this.panel6.Dock = System.Windows.Forms.DockStyle.Top; + this.panel6.Location = new System.Drawing.Point(0, 0); + this.panel6.Margin = new System.Windows.Forms.Padding(4); + this.panel6.Name = "panel6"; + this.panel6.Size = new System.Drawing.Size(762, 38); + this.panel6.TabIndex = 1; + // + // label8 + // + this.label8.AutoSize = true; + this.label8.Font = new System.Drawing.Font("Microsoft JhengHei UI", 11F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point); + this.label8.Location = new System.Drawing.Point(255, 8); + this.label8.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + this.label8.Name = "label8"; + this.label8.Size = new System.Drawing.Size(350, 24); + this.label8.TabIndex = 3; + this.label8.Text = "solar_com0002.s02202000101_station"; + // + // label9 + // + this.label9.AutoSize = true; + this.label9.Font = new System.Drawing.Font("Microsoft JhengHei UI", 11F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point); + this.label9.Location = new System.Drawing.Point(15, 8); + this.label9.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + this.label9.Name = "label9"; + this.label9.Size = new System.Drawing.Size(245, 24); + this.label9.TabIndex = 2; + this.label9.Text = "FIC: station 原始資料(hour)"; + // + // tb_inv + // + this.tb_inv.BackColor = System.Drawing.Color.LightSkyBlue; + this.tb_inv.Controls.Add(this.sp_main_inv); + this.tb_inv.Location = new System.Drawing.Point(4, 28); + this.tb_inv.Name = "tb_inv"; + this.tb_inv.Padding = new System.Windows.Forms.Padding(3); + this.tb_inv.Size = new System.Drawing.Size(1774, 921); + this.tb_inv.TabIndex = 0; + this.tb_inv.Text = " Inverter "; + // + // sp_main_inv + // + this.sp_main_inv.BackColor = System.Drawing.Color.LightSkyBlue; + this.sp_main_inv.Dock = System.Windows.Forms.DockStyle.Fill; + this.sp_main_inv.Location = new System.Drawing.Point(3, 3); + this.sp_main_inv.Name = "sp_main_inv"; + // + // sp_main_inv.Panel1 + // + this.sp_main_inv.Panel1.BackColor = System.Drawing.Color.LightSkyBlue; + this.sp_main_inv.Panel1.Controls.Add(this.bt_inv_proc); + this.sp_main_inv.Panel1.Controls.Add(this.lbMsg_inv); + this.sp_main_inv.Panel1.Controls.Add(this.lbInverterID); + this.sp_main_inv.Panel1.Controls.Add(this.fp_inv); + this.sp_main_inv.Panel1.Controls.Add(this.bt_select1); + // + // sp_main_inv.Panel2 + // + this.sp_main_inv.Panel2.Controls.Add(this.sp_child_inv); + this.sp_main_inv.Size = new System.Drawing.Size(1768, 915); + this.sp_main_inv.SplitterDistance = 357; + this.sp_main_inv.TabIndex = 0; + // + // bt_inv_proc + // + this.bt_inv_proc.Location = new System.Drawing.Point(22, 83); + this.bt_inv_proc.Name = "bt_inv_proc"; + this.bt_inv_proc.Size = new System.Drawing.Size(94, 29); + this.bt_inv_proc.TabIndex = 6; + this.bt_inv_proc.Text = "查詢"; + this.bt_inv_proc.UseVisualStyleBackColor = true; + this.bt_inv_proc.Click += new System.EventHandler(this.bt_inv_proc_Click); + // + // lbMsg_inv + // + this.lbMsg_inv.AutoSize = true; + this.lbMsg_inv.Font = new System.Drawing.Font("Microsoft JhengHei UI", 11F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point); + this.lbMsg_inv.Location = new System.Drawing.Point(136, 28); + this.lbMsg_inv.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + this.lbMsg_inv.Name = "lbMsg_inv"; + this.lbMsg_inv.Size = new System.Drawing.Size(22, 24); + this.lbMsg_inv.TabIndex = 5; + this.lbMsg_inv.Text = "..."; + // + // lbInverterID + // + this.lbInverterID.AutoSize = true; + this.lbInverterID.Dock = System.Windows.Forms.DockStyle.Bottom; + this.lbInverterID.Font = new System.Drawing.Font("Microsoft JhengHei UI", 11F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point); + this.lbInverterID.Location = new System.Drawing.Point(0, 246); + this.lbInverterID.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + this.lbInverterID.Name = "lbInverterID"; + this.lbInverterID.Size = new System.Drawing.Size(105, 24); + this.lbInverterID.TabIndex = 3; + this.lbInverterID.Text = "待處理設備"; + // + // fp_inv + // + this.fp_inv.BackColor = System.Drawing.Color.GhostWhite; + this.fp_inv.Dock = System.Windows.Forms.DockStyle.Bottom; + this.fp_inv.FlowDirection = System.Windows.Forms.FlowDirection.TopDown; + this.fp_inv.Location = new System.Drawing.Point(0, 270); + this.fp_inv.Margin = new System.Windows.Forms.Padding(4); + this.fp_inv.Name = "fp_inv"; + this.fp_inv.Size = new System.Drawing.Size(357, 645); + this.fp_inv.TabIndex = 2; + // + // bt_select1 + // + this.bt_select1.Location = new System.Drawing.Point(22, 23); + this.bt_select1.Name = "bt_select1"; + this.bt_select1.Size = new System.Drawing.Size(94, 29); + this.bt_select1.TabIndex = 1; + this.bt_select1.Text = "查詢"; + this.bt_select1.UseVisualStyleBackColor = true; + // + // sp_child_inv + // + this.sp_child_inv.Dock = System.Windows.Forms.DockStyle.Fill; + this.sp_child_inv.Location = new System.Drawing.Point(0, 0); + this.sp_child_inv.Margin = new System.Windows.Forms.Padding(4); + this.sp_child_inv.Name = "sp_child_inv"; + // + // sp_child_inv.Panel1 + // + this.sp_child_inv.Panel1.Controls.Add(this.gv_web_inv_hour); + this.sp_child_inv.Panel1.Controls.Add(this.panel1); + // + // sp_child_inv.Panel2 + // + this.sp_child_inv.Panel2.Controls.Add(this.gv_fic_inv_hour); + this.sp_child_inv.Panel2.Controls.Add(this.panel3); + this.sp_child_inv.Panel2.Controls.Add(this.gv_fic_inv_raw); + this.sp_child_inv.Panel2.Controls.Add(this.panel2); + this.sp_child_inv.Size = new System.Drawing.Size(1407, 915); + this.sp_child_inv.SplitterDistance = 678; + this.sp_child_inv.SplitterWidth = 13; + this.sp_child_inv.TabIndex = 0; + // + // gv_web_inv_hour + // + this.gv_web_inv_hour.AllowUserToAddRows = false; + this.gv_web_inv_hour.AllowUserToDeleteRows = false; + dataGridViewCellStyle5.BackColor = System.Drawing.Color.Azure; + this.gv_web_inv_hour.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle5; + this.gv_web_inv_hour.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; + this.gv_web_inv_hour.Dock = System.Windows.Forms.DockStyle.Fill; + this.gv_web_inv_hour.Location = new System.Drawing.Point(0, 38); + this.gv_web_inv_hour.Margin = new System.Windows.Forms.Padding(4); + this.gv_web_inv_hour.Name = "gv_web_inv_hour"; + this.gv_web_inv_hour.ReadOnly = true; + this.gv_web_inv_hour.RowHeadersWidth = 51; + this.gv_web_inv_hour.RowTemplate.Height = 25; + this.gv_web_inv_hour.Size = new System.Drawing.Size(678, 877); + this.gv_web_inv_hour.TabIndex = 1; + // + // panel1 + // + this.panel1.Controls.Add(this.label3); + this.panel1.Controls.Add(this.lb_inv_hour); + this.panel1.Dock = System.Windows.Forms.DockStyle.Top; + this.panel1.Location = new System.Drawing.Point(0, 0); + this.panel1.Name = "panel1"; + this.panel1.Size = new System.Drawing.Size(678, 38); + this.panel1.TabIndex = 0; + // + // label3 + // + this.label3.AutoSize = true; + this.label3.Font = new System.Drawing.Font("Microsoft JhengHei UI", 11F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point); + this.label3.Location = new System.Drawing.Point(230, 8); + this.label3.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + this.label3.Name = "label3"; + this.label3.Size = new System.Drawing.Size(321, 24); + this.label3.TabIndex = 1; + this.label3.Text = "solar_master.inverter_history_hour"; + // + // lb_inv_hour + // + this.lb_inv_hour.AutoSize = true; + this.lb_inv_hour.Font = new System.Drawing.Font("Microsoft JhengHei UI", 11F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point); + this.lb_inv_hour.Location = new System.Drawing.Point(35, 8); + this.lb_inv_hour.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + this.lb_inv_hour.Name = "lb_inv_hour"; + this.lb_inv_hour.Size = new System.Drawing.Size(151, 24); + this.lb_inv_hour.TabIndex = 0; + this.lb_inv_hour.Text = "web: inv 每小時 "; + // + // gv_fic_inv_hour + // + this.gv_fic_inv_hour.AllowUserToAddRows = false; + this.gv_fic_inv_hour.AllowUserToDeleteRows = false; + dataGridViewCellStyle6.BackColor = System.Drawing.Color.LightCyan; + this.gv_fic_inv_hour.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle6; + this.gv_fic_inv_hour.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; + this.gv_fic_inv_hour.Dock = System.Windows.Forms.DockStyle.Fill; + this.gv_fic_inv_hour.Location = new System.Drawing.Point(0, 583); + this.gv_fic_inv_hour.Margin = new System.Windows.Forms.Padding(4); + this.gv_fic_inv_hour.Name = "gv_fic_inv_hour"; + this.gv_fic_inv_hour.ReadOnly = true; + this.gv_fic_inv_hour.RowHeadersWidth = 51; + this.gv_fic_inv_hour.RowTemplate.Height = 25; + this.gv_fic_inv_hour.Size = new System.Drawing.Size(716, 332); + this.gv_fic_inv_hour.TabIndex = 4; + // + // panel3 + // + this.panel3.Controls.Add(this.label1); + this.panel3.Dock = System.Windows.Forms.DockStyle.Top; + this.panel3.Location = new System.Drawing.Point(0, 545); + this.panel3.Margin = new System.Windows.Forms.Padding(4); + this.panel3.Name = "panel3"; + this.panel3.Size = new System.Drawing.Size(716, 38); + this.panel3.TabIndex = 3; + // + // label1 + // + this.label1.AutoSize = true; + this.label1.Font = new System.Drawing.Font("Microsoft JhengHei UI", 11F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point); + this.label1.Location = new System.Drawing.Point(15, 8); + this.label1.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + this.label1.Name = "label1"; + this.label1.Size = new System.Drawing.Size(141, 24); + this.label1.TabIndex = 2; + this.label1.Text = "FIC: inv 每小時 "; + // + // gv_fic_inv_raw + // + this.gv_fic_inv_raw.AllowUserToAddRows = false; + this.gv_fic_inv_raw.AllowUserToDeleteRows = false; + dataGridViewCellStyle7.BackColor = System.Drawing.Color.LightCyan; + this.gv_fic_inv_raw.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle7; + this.gv_fic_inv_raw.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; + this.gv_fic_inv_raw.Dock = System.Windows.Forms.DockStyle.Top; + this.gv_fic_inv_raw.Location = new System.Drawing.Point(0, 38); + this.gv_fic_inv_raw.Margin = new System.Windows.Forms.Padding(4); + this.gv_fic_inv_raw.Name = "gv_fic_inv_raw"; + this.gv_fic_inv_raw.ReadOnly = true; + this.gv_fic_inv_raw.RowHeadersWidth = 51; + this.gv_fic_inv_raw.RowTemplate.Height = 25; + this.gv_fic_inv_raw.Size = new System.Drawing.Size(716, 507); + this.gv_fic_inv_raw.TabIndex = 2; + // + // panel2 + // + this.panel2.Controls.Add(this.label2); + this.panel2.Controls.Add(this.lb_raw_inv_hour); + this.panel2.Dock = System.Windows.Forms.DockStyle.Top; + this.panel2.Location = new System.Drawing.Point(0, 0); + this.panel2.Name = "panel2"; + this.panel2.Size = new System.Drawing.Size(716, 38); + this.panel2.TabIndex = 1; + // + // label2 + // + this.label2.AutoSize = true; + this.label2.Font = new System.Drawing.Font("Microsoft JhengHei UI", 11F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point); + this.label2.Location = new System.Drawing.Point(255, 8); + this.label2.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + this.label2.Name = "label2"; + this.label2.Size = new System.Drawing.Size(315, 24); + this.label2.TabIndex = 3; + this.label2.Text = "solar_com0002.s02202000101_inv"; + // + // lb_raw_inv_hour + // + this.lb_raw_inv_hour.AutoSize = true; + this.lb_raw_inv_hour.Font = new System.Drawing.Font("Microsoft JhengHei UI", 11F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point); + this.lb_raw_inv_hour.Location = new System.Drawing.Point(15, 8); + this.lb_raw_inv_hour.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + this.lb_raw_inv_hour.Name = "lb_raw_inv_hour"; + this.lb_raw_inv_hour.Size = new System.Drawing.Size(155, 24); + this.lb_raw_inv_hour.TabIndex = 2; + this.lb_raw_inv_hour.Text = "FIC: inv 原始資料"; + // + // tabControl1 + // + this.tabControl1.Controls.Add(this.tb_inv); + this.tabControl1.Controls.Add(this.tb2); + this.tabControl1.Dock = System.Windows.Forms.DockStyle.Fill; + this.tabControl1.Location = new System.Drawing.Point(0, 0); + this.tabControl1.Name = "tabControl1"; + this.tabControl1.SelectedIndex = 0; + this.tabControl1.Size = new System.Drawing.Size(1782, 953); + this.tabControl1.TabIndex = 1; + // + // fmArchive + // + this.AutoScaleDimensions = new System.Drawing.SizeF(9F, 19F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.ClientSize = new System.Drawing.Size(1782, 953); + this.Controls.Add(this.tabControl1); + this.Name = "fmArchive"; + this.Text = "fmArchive"; + this.tb2.ResumeLayout(false); + this.sp_main_station.Panel1.ResumeLayout(false); + this.sp_main_station.Panel1.PerformLayout(); + this.sp_main_station.Panel2.ResumeLayout(false); + ((System.ComponentModel.ISupportInitialize)(this.sp_main_station)).EndInit(); + this.sp_main_station.ResumeLayout(false); + this.flowLayoutPanel1.ResumeLayout(false); + this.flowLayoutPanel1.PerformLayout(); + this.sp_child_station.Panel1.ResumeLayout(false); + this.sp_child_station.Panel2.ResumeLayout(false); + ((System.ComponentModel.ISupportInitialize)(this.sp_child_station)).EndInit(); + this.sp_child_station.ResumeLayout(false); + ((System.ComponentModel.ISupportInitialize)(this.gv_web_station_day)).EndInit(); + this.panel7.ResumeLayout(false); + this.panel7.PerformLayout(); + ((System.ComponentModel.ISupportInitialize)(this.gv_web_station_hour)).EndInit(); + this.panel4.ResumeLayout(false); + this.panel4.PerformLayout(); + ((System.ComponentModel.ISupportInitialize)(this.gv_fic_station_day)).EndInit(); + this.panel5.ResumeLayout(false); + this.panel5.PerformLayout(); + ((System.ComponentModel.ISupportInitialize)(this.gv_fic_station_raw)).EndInit(); + this.panel6.ResumeLayout(false); + this.panel6.PerformLayout(); + this.tb_inv.ResumeLayout(false); + this.sp_main_inv.Panel1.ResumeLayout(false); + this.sp_main_inv.Panel1.PerformLayout(); + this.sp_main_inv.Panel2.ResumeLayout(false); + ((System.ComponentModel.ISupportInitialize)(this.sp_main_inv)).EndInit(); + this.sp_main_inv.ResumeLayout(false); + this.sp_child_inv.Panel1.ResumeLayout(false); + this.sp_child_inv.Panel2.ResumeLayout(false); + ((System.ComponentModel.ISupportInitialize)(this.sp_child_inv)).EndInit(); + this.sp_child_inv.ResumeLayout(false); + ((System.ComponentModel.ISupportInitialize)(this.gv_web_inv_hour)).EndInit(); + this.panel1.ResumeLayout(false); + this.panel1.PerformLayout(); + ((System.ComponentModel.ISupportInitialize)(this.gv_fic_inv_hour)).EndInit(); + this.panel3.ResumeLayout(false); + this.panel3.PerformLayout(); + ((System.ComponentModel.ISupportInitialize)(this.gv_fic_inv_raw)).EndInit(); + this.panel2.ResumeLayout(false); + this.panel2.PerformLayout(); + this.tabControl1.ResumeLayout(false); + this.ResumeLayout(false); + + } + + #endregion + + private System.Windows.Forms.TabPage tb2; + private System.Windows.Forms.SplitContainer sp_main_station; + private System.Windows.Forms.Label label12; + private System.Windows.Forms.DateTimePicker dtselect_station2; + private System.Windows.Forms.Label lbMsg_station; + private System.Windows.Forms.Button bt_find_station; + private System.Windows.Forms.DateTimePicker dtselect_station1; + private System.Windows.Forms.FlowLayoutPanel flowLayoutPanel1; + private System.Windows.Forms.Label label13; + private System.Windows.Forms.SplitContainer sp_child_station; + private System.Windows.Forms.DataGridView gv_web_station_day; + private System.Windows.Forms.Panel panel7; + private System.Windows.Forms.Label label10; + private System.Windows.Forms.Label label11; + private System.Windows.Forms.DataGridView gv_web_station_hour; + private System.Windows.Forms.Panel panel4; + private System.Windows.Forms.Label label5; + private System.Windows.Forms.Label label6; + private System.Windows.Forms.DataGridView gv_fic_station_day; + private System.Windows.Forms.Panel panel5; + private System.Windows.Forms.Label label7; + private System.Windows.Forms.DataGridView gv_fic_station_raw; + private System.Windows.Forms.Panel panel6; + private System.Windows.Forms.Label label8; + private System.Windows.Forms.Label label9; + private System.Windows.Forms.TabPage tb_inv; + private System.Windows.Forms.SplitContainer sp_main_inv; + private System.Windows.Forms.Button bt_inv_proc; + private System.Windows.Forms.Label lbMsg_inv; + private System.Windows.Forms.Label lbInverterID; + private System.Windows.Forms.FlowLayoutPanel fp_inv; + private System.Windows.Forms.Button bt_select1; + private System.Windows.Forms.SplitContainer sp_child_inv; + private System.Windows.Forms.DataGridView gv_web_inv_hour; + private System.Windows.Forms.Panel panel1; + private System.Windows.Forms.Label label3; + private System.Windows.Forms.Label lb_inv_hour; + private System.Windows.Forms.DataGridView gv_fic_inv_hour; + private System.Windows.Forms.Panel panel3; + private System.Windows.Forms.Label label1; + private System.Windows.Forms.DataGridView gv_fic_inv_raw; + private System.Windows.Forms.Panel panel2; + private System.Windows.Forms.Label label2; + private System.Windows.Forms.Label lb_raw_inv_hour; + private System.Windows.Forms.TabControl tabControl1; + } +} \ No newline at end of file diff --git a/solarApp/fmArchive.cs b/solarApp/fmArchive.cs new file mode 100644 index 0000000..7c2ab47 --- /dev/null +++ b/solarApp/fmArchive.cs @@ -0,0 +1,23 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.Text; +using System.Windows.Forms; + +namespace solarApp +{ + public partial class fmArchive : Form + { + public fmArchive() + { + InitializeComponent(); + } + + private void bt_inv_proc_Click(object sender, EventArgs e) + { + + } + } +} diff --git a/solarApp/fmArchive.resx b/solarApp/fmArchive.resx new file mode 100644 index 0000000..f298a7b --- /dev/null +++ b/solarApp/fmArchive.resx @@ -0,0 +1,60 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file diff --git a/solarApp/fmMain.Designer.cs b/solarApp/fmMain.Designer.cs new file mode 100644 index 0000000..86299d6 --- /dev/null +++ b/solarApp/fmMain.Designer.cs @@ -0,0 +1,796 @@ + +namespace solarApp +{ + partial class fmMain + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle2 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle3 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle4 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle5 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle6 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle7 = new System.Windows.Forms.DataGridViewCellStyle(); + this.tabControl1 = new System.Windows.Forms.TabControl(); + this.tb_inv = new System.Windows.Forms.TabPage(); + this.sp_main_inv = new System.Windows.Forms.SplitContainer(); + this.lbMsg_inv = new System.Windows.Forms.Label(); + this.lbInverterID = new System.Windows.Forms.Label(); + this.fp_inv = new System.Windows.Forms.FlowLayoutPanel(); + this.label4 = new System.Windows.Forms.Label(); + this.bt_select1 = new System.Windows.Forms.Button(); + this.dtselect_inv = new System.Windows.Forms.DateTimePicker(); + this.sp_child_inv = new System.Windows.Forms.SplitContainer(); + this.gv_web_inv_hour = new System.Windows.Forms.DataGridView(); + this.panel1 = new System.Windows.Forms.Panel(); + this.label3 = new System.Windows.Forms.Label(); + this.lb_inv_hour = new System.Windows.Forms.Label(); + this.gv_fic_inv_hour = new System.Windows.Forms.DataGridView(); + this.panel3 = new System.Windows.Forms.Panel(); + this.label1 = new System.Windows.Forms.Label(); + this.gv_fic_inv_raw = new System.Windows.Forms.DataGridView(); + this.panel2 = new System.Windows.Forms.Panel(); + this.label2 = new System.Windows.Forms.Label(); + this.lb_raw_inv_hour = new System.Windows.Forms.Label(); + this.tb2 = new System.Windows.Forms.TabPage(); + this.sp_main_station = new System.Windows.Forms.SplitContainer(); + this.label12 = new System.Windows.Forms.Label(); + this.dtselect_station2 = new System.Windows.Forms.DateTimePicker(); + this.lbMsg_station = new System.Windows.Forms.Label(); + this.bt_find_station = new System.Windows.Forms.Button(); + this.dtselect_station1 = new System.Windows.Forms.DateTimePicker(); + this.flowLayoutPanel1 = new System.Windows.Forms.FlowLayoutPanel(); + this.label13 = new System.Windows.Forms.Label(); + this.sp_child_station = new System.Windows.Forms.SplitContainer(); + this.gv_web_station_day = new System.Windows.Forms.DataGridView(); + this.panel7 = new System.Windows.Forms.Panel(); + this.label10 = new System.Windows.Forms.Label(); + this.label11 = new System.Windows.Forms.Label(); + this.gv_web_station_hour = new System.Windows.Forms.DataGridView(); + this.panel4 = new System.Windows.Forms.Panel(); + this.label5 = new System.Windows.Forms.Label(); + this.label6 = new System.Windows.Forms.Label(); + this.gv_fic_station_day = new System.Windows.Forms.DataGridView(); + this.panel5 = new System.Windows.Forms.Panel(); + this.label7 = new System.Windows.Forms.Label(); + this.gv_fic_station_raw = new System.Windows.Forms.DataGridView(); + this.panel6 = new System.Windows.Forms.Panel(); + this.label8 = new System.Windows.Forms.Label(); + this.label9 = new System.Windows.Forms.Label(); + this.tabControl1.SuspendLayout(); + this.tb_inv.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.sp_main_inv)).BeginInit(); + this.sp_main_inv.Panel1.SuspendLayout(); + this.sp_main_inv.Panel2.SuspendLayout(); + this.sp_main_inv.SuspendLayout(); + this.fp_inv.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.sp_child_inv)).BeginInit(); + this.sp_child_inv.Panel1.SuspendLayout(); + this.sp_child_inv.Panel2.SuspendLayout(); + this.sp_child_inv.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.gv_web_inv_hour)).BeginInit(); + this.panel1.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.gv_fic_inv_hour)).BeginInit(); + this.panel3.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.gv_fic_inv_raw)).BeginInit(); + this.panel2.SuspendLayout(); + this.tb2.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.sp_main_station)).BeginInit(); + this.sp_main_station.Panel1.SuspendLayout(); + this.sp_main_station.Panel2.SuspendLayout(); + this.sp_main_station.SuspendLayout(); + this.flowLayoutPanel1.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.sp_child_station)).BeginInit(); + this.sp_child_station.Panel1.SuspendLayout(); + this.sp_child_station.Panel2.SuspendLayout(); + this.sp_child_station.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.gv_web_station_day)).BeginInit(); + this.panel7.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.gv_web_station_hour)).BeginInit(); + this.panel4.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.gv_fic_station_day)).BeginInit(); + this.panel5.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.gv_fic_station_raw)).BeginInit(); + this.panel6.SuspendLayout(); + this.SuspendLayout(); + // + // tabControl1 + // + this.tabControl1.Controls.Add(this.tb_inv); + this.tabControl1.Controls.Add(this.tb2); + this.tabControl1.Dock = System.Windows.Forms.DockStyle.Fill; + this.tabControl1.Location = new System.Drawing.Point(0, 0); + this.tabControl1.Margin = new System.Windows.Forms.Padding(2); + this.tabControl1.Name = "tabControl1"; + this.tabControl1.SelectedIndex = 0; + this.tabControl1.Size = new System.Drawing.Size(1356, 848); + this.tabControl1.TabIndex = 0; + // + // tb_inv + // + this.tb_inv.BackColor = System.Drawing.Color.Azure; + this.tb_inv.Controls.Add(this.sp_main_inv); + this.tb_inv.Location = new System.Drawing.Point(4, 24); + this.tb_inv.Margin = new System.Windows.Forms.Padding(2); + this.tb_inv.Name = "tb_inv"; + this.tb_inv.Padding = new System.Windows.Forms.Padding(2); + this.tb_inv.Size = new System.Drawing.Size(1348, 820); + this.tb_inv.TabIndex = 0; + this.tb_inv.Text = " Inverter "; + // + // sp_main_inv + // + this.sp_main_inv.Dock = System.Windows.Forms.DockStyle.Fill; + this.sp_main_inv.Location = new System.Drawing.Point(2, 2); + this.sp_main_inv.Margin = new System.Windows.Forms.Padding(2); + this.sp_main_inv.Name = "sp_main_inv"; + // + // sp_main_inv.Panel1 + // + this.sp_main_inv.Panel1.BackColor = System.Drawing.Color.LightCyan; + this.sp_main_inv.Panel1.Controls.Add(this.lbMsg_inv); + this.sp_main_inv.Panel1.Controls.Add(this.lbInverterID); + this.sp_main_inv.Panel1.Controls.Add(this.fp_inv); + this.sp_main_inv.Panel1.Controls.Add(this.bt_select1); + this.sp_main_inv.Panel1.Controls.Add(this.dtselect_inv); + // + // sp_main_inv.Panel2 + // + this.sp_main_inv.Panel2.Controls.Add(this.sp_child_inv); + this.sp_main_inv.Size = new System.Drawing.Size(1344, 816); + this.sp_main_inv.SplitterDistance = 273; + this.sp_main_inv.SplitterWidth = 3; + this.sp_main_inv.TabIndex = 0; + // + // lbMsg_inv + // + this.lbMsg_inv.AutoSize = true; + this.lbMsg_inv.Font = new System.Drawing.Font("Microsoft JhengHei UI", 11F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point); + this.lbMsg_inv.Location = new System.Drawing.Point(111, 59); + this.lbMsg_inv.Name = "lbMsg_inv"; + this.lbMsg_inv.Size = new System.Drawing.Size(18, 19); + this.lbMsg_inv.TabIndex = 5; + this.lbMsg_inv.Text = "..."; + // + // lbInverterID + // + this.lbInverterID.AutoSize = true; + this.lbInverterID.Dock = System.Windows.Forms.DockStyle.Bottom; + this.lbInverterID.Font = new System.Drawing.Font("Microsoft JhengHei UI", 11F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point); + this.lbInverterID.Location = new System.Drawing.Point(0, 288); + this.lbInverterID.Name = "lbInverterID"; + this.lbInverterID.Size = new System.Drawing.Size(112, 19); + this.lbInverterID.TabIndex = 3; + this.lbInverterID.Text = "請選擇 Inverter"; + // + // fp_inv + // + this.fp_inv.BackColor = System.Drawing.Color.Azure; + this.fp_inv.Controls.Add(this.label4); + this.fp_inv.Dock = System.Windows.Forms.DockStyle.Bottom; + this.fp_inv.FlowDirection = System.Windows.Forms.FlowDirection.TopDown; + this.fp_inv.Location = new System.Drawing.Point(0, 307); + this.fp_inv.Name = "fp_inv"; + this.fp_inv.Size = new System.Drawing.Size(273, 509); + this.fp_inv.TabIndex = 2; + // + // label4 + // + this.label4.AutoSize = true; + this.label4.Font = new System.Drawing.Font("Microsoft JhengHei UI", 11F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point); + this.label4.Location = new System.Drawing.Point(3, 0); + this.label4.Name = "label4"; + this.label4.Size = new System.Drawing.Size(112, 19); + this.label4.TabIndex = 4; + this.label4.Text = "請選擇 Inverter"; + // + // bt_select1 + // + this.bt_select1.Location = new System.Drawing.Point(19, 57); + this.bt_select1.Margin = new System.Windows.Forms.Padding(2); + this.bt_select1.Name = "bt_select1"; + this.bt_select1.Size = new System.Drawing.Size(73, 23); + this.bt_select1.TabIndex = 1; + this.bt_select1.Text = "查詢"; + this.bt_select1.UseVisualStyleBackColor = true; + this.bt_select1.Click += new System.EventHandler(this.button1_Click); + // + // dtselect_inv + // + this.dtselect_inv.Font = new System.Drawing.Font("Microsoft JhengHei UI", 11F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point); + this.dtselect_inv.Location = new System.Drawing.Point(19, 20); + this.dtselect_inv.Margin = new System.Windows.Forms.Padding(2); + this.dtselect_inv.Name = "dtselect_inv"; + this.dtselect_inv.Size = new System.Drawing.Size(195, 26); + this.dtselect_inv.TabIndex = 0; + this.dtselect_inv.ValueChanged += new System.EventHandler(this.dtselect_ValueChanged); + // + // sp_child_inv + // + this.sp_child_inv.Dock = System.Windows.Forms.DockStyle.Fill; + this.sp_child_inv.Location = new System.Drawing.Point(0, 0); + this.sp_child_inv.Name = "sp_child_inv"; + // + // sp_child_inv.Panel1 + // + this.sp_child_inv.Panel1.Controls.Add(this.gv_web_inv_hour); + this.sp_child_inv.Panel1.Controls.Add(this.panel1); + // + // sp_child_inv.Panel2 + // + this.sp_child_inv.Panel2.Controls.Add(this.gv_fic_inv_hour); + this.sp_child_inv.Panel2.Controls.Add(this.panel3); + this.sp_child_inv.Panel2.Controls.Add(this.gv_fic_inv_raw); + this.sp_child_inv.Panel2.Controls.Add(this.panel2); + this.sp_child_inv.Size = new System.Drawing.Size(1068, 816); + this.sp_child_inv.SplitterDistance = 518; + this.sp_child_inv.SplitterWidth = 10; + this.sp_child_inv.TabIndex = 0; + // + // gv_web_inv_hour + // + this.gv_web_inv_hour.AllowUserToAddRows = false; + this.gv_web_inv_hour.AllowUserToDeleteRows = false; + dataGridViewCellStyle1.BackColor = System.Drawing.Color.Azure; + this.gv_web_inv_hour.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle1; + this.gv_web_inv_hour.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; + this.gv_web_inv_hour.Dock = System.Windows.Forms.DockStyle.Fill; + this.gv_web_inv_hour.Location = new System.Drawing.Point(0, 30); + this.gv_web_inv_hour.Name = "gv_web_inv_hour"; + this.gv_web_inv_hour.ReadOnly = true; + this.gv_web_inv_hour.RowTemplate.Height = 25; + this.gv_web_inv_hour.Size = new System.Drawing.Size(518, 786); + this.gv_web_inv_hour.TabIndex = 1; + // + // panel1 + // + this.panel1.Controls.Add(this.label3); + this.panel1.Controls.Add(this.lb_inv_hour); + this.panel1.Dock = System.Windows.Forms.DockStyle.Top; + this.panel1.Location = new System.Drawing.Point(0, 0); + this.panel1.Name = "panel1"; + this.panel1.Size = new System.Drawing.Size(518, 30); + this.panel1.TabIndex = 0; + // + // label3 + // + this.label3.AutoSize = true; + this.label3.Font = new System.Drawing.Font("Microsoft JhengHei UI", 11F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point); + this.label3.Location = new System.Drawing.Point(179, 6); + this.label3.Name = "label3"; + this.label3.Size = new System.Drawing.Size(250, 19); + this.label3.TabIndex = 1; + this.label3.Text = "solar_master.inverter_history_hour"; + // + // lb_inv_hour + // + this.lb_inv_hour.AutoSize = true; + this.lb_inv_hour.Font = new System.Drawing.Font("Microsoft JhengHei UI", 11F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point); + this.lb_inv_hour.Location = new System.Drawing.Point(27, 6); + this.lb_inv_hour.Name = "lb_inv_hour"; + this.lb_inv_hour.Size = new System.Drawing.Size(119, 19); + this.lb_inv_hour.TabIndex = 0; + this.lb_inv_hour.Text = "web: inv 每小時 "; + // + // gv_fic_inv_hour + // + this.gv_fic_inv_hour.AllowUserToAddRows = false; + this.gv_fic_inv_hour.AllowUserToDeleteRows = false; + dataGridViewCellStyle2.BackColor = System.Drawing.Color.LightCyan; + this.gv_fic_inv_hour.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle2; + this.gv_fic_inv_hour.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; + this.gv_fic_inv_hour.Dock = System.Windows.Forms.DockStyle.Fill; + this.gv_fic_inv_hour.Location = new System.Drawing.Point(0, 460); + this.gv_fic_inv_hour.Name = "gv_fic_inv_hour"; + this.gv_fic_inv_hour.ReadOnly = true; + this.gv_fic_inv_hour.RowTemplate.Height = 25; + this.gv_fic_inv_hour.Size = new System.Drawing.Size(540, 356); + this.gv_fic_inv_hour.TabIndex = 4; + this.gv_fic_inv_hour.CellFormatting += new System.Windows.Forms.DataGridViewCellFormattingEventHandler(this.gv_fic_inv_hour_CellFormatting); + // + // panel3 + // + this.panel3.Controls.Add(this.label1); + this.panel3.Dock = System.Windows.Forms.DockStyle.Top; + this.panel3.Location = new System.Drawing.Point(0, 430); + this.panel3.Name = "panel3"; + this.panel3.Size = new System.Drawing.Size(540, 30); + this.panel3.TabIndex = 3; + // + // label1 + // + this.label1.AutoSize = true; + this.label1.Font = new System.Drawing.Font("Microsoft JhengHei UI", 11F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point); + this.label1.Location = new System.Drawing.Point(12, 6); + this.label1.Name = "label1"; + this.label1.Size = new System.Drawing.Size(112, 19); + this.label1.TabIndex = 2; + this.label1.Text = "FIC: inv 每小時 "; + // + // gv_fic_inv_raw + // + this.gv_fic_inv_raw.AllowUserToAddRows = false; + this.gv_fic_inv_raw.AllowUserToDeleteRows = false; + dataGridViewCellStyle3.BackColor = System.Drawing.Color.LightCyan; + this.gv_fic_inv_raw.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle3; + this.gv_fic_inv_raw.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; + this.gv_fic_inv_raw.Dock = System.Windows.Forms.DockStyle.Top; + this.gv_fic_inv_raw.Location = new System.Drawing.Point(0, 30); + this.gv_fic_inv_raw.Name = "gv_fic_inv_raw"; + this.gv_fic_inv_raw.ReadOnly = true; + this.gv_fic_inv_raw.RowTemplate.Height = 25; + this.gv_fic_inv_raw.Size = new System.Drawing.Size(540, 400); + this.gv_fic_inv_raw.TabIndex = 2; + // + // panel2 + // + this.panel2.Controls.Add(this.label2); + this.panel2.Controls.Add(this.lb_raw_inv_hour); + this.panel2.Dock = System.Windows.Forms.DockStyle.Top; + this.panel2.Location = new System.Drawing.Point(0, 0); + this.panel2.Name = "panel2"; + this.panel2.Size = new System.Drawing.Size(540, 30); + this.panel2.TabIndex = 1; + // + // label2 + // + this.label2.AutoSize = true; + this.label2.Font = new System.Drawing.Font("Microsoft JhengHei UI", 11F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point); + this.label2.Location = new System.Drawing.Point(198, 6); + this.label2.Name = "label2"; + this.label2.Size = new System.Drawing.Size(253, 19); + this.label2.TabIndex = 3; + this.label2.Text = "solar_com0002.s02202000101_inv"; + // + // lb_raw_inv_hour + // + this.lb_raw_inv_hour.AutoSize = true; + this.lb_raw_inv_hour.Font = new System.Drawing.Font("Microsoft JhengHei UI", 11F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point); + this.lb_raw_inv_hour.Location = new System.Drawing.Point(12, 6); + this.lb_raw_inv_hour.Name = "lb_raw_inv_hour"; + this.lb_raw_inv_hour.Size = new System.Drawing.Size(123, 19); + this.lb_raw_inv_hour.TabIndex = 2; + this.lb_raw_inv_hour.Text = "FIC: inv 原始資料"; + // + // tb2 + // + this.tb2.Controls.Add(this.sp_main_station); + this.tb2.Location = new System.Drawing.Point(4, 24); + this.tb2.Margin = new System.Windows.Forms.Padding(2); + this.tb2.Name = "tb2"; + this.tb2.Padding = new System.Windows.Forms.Padding(2); + this.tb2.Size = new System.Drawing.Size(1348, 820); + this.tb2.TabIndex = 1; + this.tb2.Text = " site "; + this.tb2.UseVisualStyleBackColor = true; + // + // sp_main_station + // + this.sp_main_station.BackColor = System.Drawing.SystemColors.ActiveCaption; + this.sp_main_station.Dock = System.Windows.Forms.DockStyle.Fill; + this.sp_main_station.Location = new System.Drawing.Point(2, 2); + this.sp_main_station.Margin = new System.Windows.Forms.Padding(2); + this.sp_main_station.Name = "sp_main_station"; + // + // sp_main_station.Panel1 + // + this.sp_main_station.Panel1.Controls.Add(this.label12); + this.sp_main_station.Panel1.Controls.Add(this.dtselect_station2); + this.sp_main_station.Panel1.Controls.Add(this.lbMsg_station); + this.sp_main_station.Panel1.Controls.Add(this.bt_find_station); + this.sp_main_station.Panel1.Controls.Add(this.dtselect_station1); + this.sp_main_station.Panel1.Controls.Add(this.flowLayoutPanel1); + // + // sp_main_station.Panel2 + // + this.sp_main_station.Panel2.BackColor = System.Drawing.Color.OldLace; + this.sp_main_station.Panel2.Controls.Add(this.sp_child_station); + this.sp_main_station.Size = new System.Drawing.Size(1344, 816); + this.sp_main_station.SplitterDistance = 200; + this.sp_main_station.SplitterWidth = 3; + this.sp_main_station.TabIndex = 0; + // + // label12 + // + this.label12.AutoSize = true; + this.label12.Font = new System.Drawing.Font("Microsoft JhengHei UI", 11F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point); + this.label12.Location = new System.Drawing.Point(10, 35); + this.label12.Name = "label12"; + this.label12.Size = new System.Drawing.Size(20, 19); + this.label12.TabIndex = 12; + this.label12.Text = "~"; + // + // dtselect_station2 + // + this.dtselect_station2.Font = new System.Drawing.Font("Microsoft JhengHei UI", 11F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point); + this.dtselect_station2.Location = new System.Drawing.Point(9, 60); + this.dtselect_station2.Margin = new System.Windows.Forms.Padding(2); + this.dtselect_station2.Name = "dtselect_station2"; + this.dtselect_station2.Size = new System.Drawing.Size(183, 26); + this.dtselect_station2.TabIndex = 10; + this.dtselect_station2.ValueChanged += new System.EventHandler(this.dateTimePicker1_ValueChanged); + // + // lbMsg_station + // + this.lbMsg_station.AutoSize = true; + this.lbMsg_station.Font = new System.Drawing.Font("Microsoft JhengHei UI", 11F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point); + this.lbMsg_station.Location = new System.Drawing.Point(20, 128); + this.lbMsg_station.Name = "lbMsg_station"; + this.lbMsg_station.Size = new System.Drawing.Size(18, 19); + this.lbMsg_station.TabIndex = 9; + this.lbMsg_station.Text = "..."; + // + // bt_find_station + // + this.bt_find_station.Location = new System.Drawing.Point(9, 98); + this.bt_find_station.Margin = new System.Windows.Forms.Padding(2); + this.bt_find_station.Name = "bt_find_station"; + this.bt_find_station.Size = new System.Drawing.Size(73, 23); + this.bt_find_station.TabIndex = 7; + this.bt_find_station.Text = "查詢"; + this.bt_find_station.UseVisualStyleBackColor = true; + this.bt_find_station.Click += new System.EventHandler(this.bt_find_station_Click); + // + // dtselect_station1 + // + this.dtselect_station1.Font = new System.Drawing.Font("Microsoft JhengHei UI", 11F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point); + this.dtselect_station1.Location = new System.Drawing.Point(11, 6); + this.dtselect_station1.Margin = new System.Windows.Forms.Padding(2); + this.dtselect_station1.Name = "dtselect_station1"; + this.dtselect_station1.Size = new System.Drawing.Size(183, 26); + this.dtselect_station1.TabIndex = 6; + this.dtselect_station1.ValueChanged += new System.EventHandler(this.dtselect_station_ValueChanged); + // + // flowLayoutPanel1 + // + this.flowLayoutPanel1.BackColor = System.Drawing.Color.Azure; + this.flowLayoutPanel1.Controls.Add(this.label13); + this.flowLayoutPanel1.Dock = System.Windows.Forms.DockStyle.Bottom; + this.flowLayoutPanel1.FlowDirection = System.Windows.Forms.FlowDirection.TopDown; + this.flowLayoutPanel1.Location = new System.Drawing.Point(0, 307); + this.flowLayoutPanel1.Name = "flowLayoutPanel1"; + this.flowLayoutPanel1.Size = new System.Drawing.Size(200, 509); + this.flowLayoutPanel1.TabIndex = 8; + // + // label13 + // + this.label13.AutoSize = true; + this.label13.Font = new System.Drawing.Font("Microsoft JhengHei UI", 11F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point); + this.label13.Location = new System.Drawing.Point(3, 0); + this.label13.Name = "label13"; + this.label13.Size = new System.Drawing.Size(88, 19); + this.label13.TabIndex = 4; + this.label13.Text = "請選擇 電站"; + // + // sp_child_station + // + this.sp_child_station.Dock = System.Windows.Forms.DockStyle.Fill; + this.sp_child_station.Location = new System.Drawing.Point(0, 0); + this.sp_child_station.Name = "sp_child_station"; + // + // sp_child_station.Panel1 + // + this.sp_child_station.Panel1.Controls.Add(this.gv_web_station_day); + this.sp_child_station.Panel1.Controls.Add(this.panel7); + this.sp_child_station.Panel1.Controls.Add(this.gv_web_station_hour); + this.sp_child_station.Panel1.Controls.Add(this.panel4); + // + // sp_child_station.Panel2 + // + this.sp_child_station.Panel2.Controls.Add(this.gv_fic_station_day); + this.sp_child_station.Panel2.Controls.Add(this.panel5); + this.sp_child_station.Panel2.Controls.Add(this.gv_fic_station_raw); + this.sp_child_station.Panel2.Controls.Add(this.panel6); + this.sp_child_station.Size = new System.Drawing.Size(1141, 816); + this.sp_child_station.SplitterDistance = 553; + this.sp_child_station.SplitterWidth = 10; + this.sp_child_station.TabIndex = 1; + // + // gv_web_station_day + // + this.gv_web_station_day.AllowUserToAddRows = false; + this.gv_web_station_day.AllowUserToDeleteRows = false; + dataGridViewCellStyle4.BackColor = System.Drawing.Color.Azure; + this.gv_web_station_day.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle4; + this.gv_web_station_day.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; + this.gv_web_station_day.Dock = System.Windows.Forms.DockStyle.Fill; + this.gv_web_station_day.Location = new System.Drawing.Point(0, 460); + this.gv_web_station_day.Name = "gv_web_station_day"; + this.gv_web_station_day.ReadOnly = true; + this.gv_web_station_day.RowTemplate.Height = 25; + this.gv_web_station_day.Size = new System.Drawing.Size(553, 356); + this.gv_web_station_day.TabIndex = 3; + // + // panel7 + // + this.panel7.Controls.Add(this.label10); + this.panel7.Controls.Add(this.label11); + this.panel7.Dock = System.Windows.Forms.DockStyle.Top; + this.panel7.Location = new System.Drawing.Point(0, 430); + this.panel7.Name = "panel7"; + this.panel7.Size = new System.Drawing.Size(553, 30); + this.panel7.TabIndex = 2; + // + // label10 + // + this.label10.AutoSize = true; + this.label10.Font = new System.Drawing.Font("Microsoft JhengHei UI", 11F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point); + this.label10.Location = new System.Drawing.Point(179, 6); + this.label10.Name = "label10"; + this.label10.Size = new System.Drawing.Size(287, 19); + this.label10.TabIndex = 1; + this.label10.Text = "solar_master.power_station_history_day"; + // + // label11 + // + this.label11.AutoSize = true; + this.label11.Font = new System.Drawing.Font("Microsoft JhengHei UI", 11F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point); + this.label11.Location = new System.Drawing.Point(27, 6); + this.label11.Name = "label11"; + this.label11.Size = new System.Drawing.Size(126, 19); + this.label11.TabIndex = 0; + this.label11.Text = "web: station 每天"; + // + // gv_web_station_hour + // + this.gv_web_station_hour.AllowUserToAddRows = false; + this.gv_web_station_hour.AllowUserToDeleteRows = false; + dataGridViewCellStyle5.BackColor = System.Drawing.Color.Azure; + this.gv_web_station_hour.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle5; + this.gv_web_station_hour.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; + this.gv_web_station_hour.Dock = System.Windows.Forms.DockStyle.Top; + this.gv_web_station_hour.Location = new System.Drawing.Point(0, 30); + this.gv_web_station_hour.Name = "gv_web_station_hour"; + this.gv_web_station_hour.ReadOnly = true; + this.gv_web_station_hour.RowTemplate.Height = 25; + this.gv_web_station_hour.Size = new System.Drawing.Size(553, 400); + this.gv_web_station_hour.TabIndex = 1; + // + // panel4 + // + this.panel4.Controls.Add(this.label5); + this.panel4.Controls.Add(this.label6); + this.panel4.Dock = System.Windows.Forms.DockStyle.Top; + this.panel4.Location = new System.Drawing.Point(0, 0); + this.panel4.Name = "panel4"; + this.panel4.Size = new System.Drawing.Size(553, 30); + this.panel4.TabIndex = 0; + // + // label5 + // + this.label5.AutoSize = true; + this.label5.Font = new System.Drawing.Font("Microsoft JhengHei UI", 11F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point); + this.label5.Location = new System.Drawing.Point(179, 6); + this.label5.Name = "label5"; + this.label5.Size = new System.Drawing.Size(294, 19); + this.label5.TabIndex = 1; + this.label5.Text = "solar_master.power_station_history_hour"; + // + // label6 + // + this.label6.AutoSize = true; + this.label6.Font = new System.Drawing.Font("Microsoft JhengHei UI", 11F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point); + this.label6.Location = new System.Drawing.Point(27, 6); + this.label6.Name = "label6"; + this.label6.Size = new System.Drawing.Size(122, 19); + this.label6.TabIndex = 0; + this.label6.Text = "web: site 每小時 "; + // + // gv_fic_station_day + // + this.gv_fic_station_day.AllowUserToAddRows = false; + this.gv_fic_station_day.AllowUserToDeleteRows = false; + dataGridViewCellStyle6.BackColor = System.Drawing.Color.LightCyan; + this.gv_fic_station_day.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle6; + this.gv_fic_station_day.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; + this.gv_fic_station_day.Dock = System.Windows.Forms.DockStyle.Fill; + this.gv_fic_station_day.Location = new System.Drawing.Point(0, 460); + this.gv_fic_station_day.Name = "gv_fic_station_day"; + this.gv_fic_station_day.ReadOnly = true; + this.gv_fic_station_day.RowTemplate.Height = 25; + this.gv_fic_station_day.Size = new System.Drawing.Size(578, 356); + this.gv_fic_station_day.TabIndex = 4; + // + // panel5 + // + this.panel5.Controls.Add(this.label7); + this.panel5.Dock = System.Windows.Forms.DockStyle.Top; + this.panel5.Location = new System.Drawing.Point(0, 430); + this.panel5.Name = "panel5"; + this.panel5.Size = new System.Drawing.Size(578, 30); + this.panel5.TabIndex = 3; + // + // label7 + // + this.label7.AutoSize = true; + this.label7.Font = new System.Drawing.Font("Microsoft JhengHei UI", 11F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point); + this.label7.Location = new System.Drawing.Point(12, 6); + this.label7.Name = "label7"; + this.label7.Size = new System.Drawing.Size(119, 19); + this.label7.TabIndex = 2; + this.label7.Text = "FIC: station 每天"; + // + // gv_fic_station_raw + // + this.gv_fic_station_raw.AllowUserToAddRows = false; + this.gv_fic_station_raw.AllowUserToDeleteRows = false; + dataGridViewCellStyle7.BackColor = System.Drawing.Color.LightCyan; + this.gv_fic_station_raw.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle7; + this.gv_fic_station_raw.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; + this.gv_fic_station_raw.Dock = System.Windows.Forms.DockStyle.Top; + this.gv_fic_station_raw.Location = new System.Drawing.Point(0, 30); + this.gv_fic_station_raw.Name = "gv_fic_station_raw"; + this.gv_fic_station_raw.ReadOnly = true; + this.gv_fic_station_raw.RowTemplate.Height = 25; + this.gv_fic_station_raw.Size = new System.Drawing.Size(578, 400); + this.gv_fic_station_raw.TabIndex = 2; + // + // panel6 + // + this.panel6.Controls.Add(this.label8); + this.panel6.Controls.Add(this.label9); + this.panel6.Dock = System.Windows.Forms.DockStyle.Top; + this.panel6.Location = new System.Drawing.Point(0, 0); + this.panel6.Name = "panel6"; + this.panel6.Size = new System.Drawing.Size(578, 30); + this.panel6.TabIndex = 1; + // + // label8 + // + this.label8.AutoSize = true; + this.label8.Font = new System.Drawing.Font("Microsoft JhengHei UI", 11F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point); + this.label8.Location = new System.Drawing.Point(198, 6); + this.label8.Name = "label8"; + this.label8.Size = new System.Drawing.Size(279, 19); + this.label8.TabIndex = 3; + this.label8.Text = "solar_com0002.s02202000101_station"; + // + // label9 + // + this.label9.AutoSize = true; + this.label9.Font = new System.Drawing.Font("Microsoft JhengHei UI", 11F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point); + this.label9.Location = new System.Drawing.Point(12, 6); + this.label9.Name = "label9"; + this.label9.Size = new System.Drawing.Size(192, 19); + this.label9.TabIndex = 2; + this.label9.Text = "FIC: station 原始資料(hour)"; + // + // fmMain + // + this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 15F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.ClientSize = new System.Drawing.Size(1356, 848); + this.Controls.Add(this.tabControl1); + this.Margin = new System.Windows.Forms.Padding(2); + this.Name = "fmMain"; + this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; + this.Text = "太陽能電站數據檢核 V0729"; + this.Load += new System.EventHandler(this.fmMain_Load); + this.tabControl1.ResumeLayout(false); + this.tb_inv.ResumeLayout(false); + this.sp_main_inv.Panel1.ResumeLayout(false); + this.sp_main_inv.Panel1.PerformLayout(); + this.sp_main_inv.Panel2.ResumeLayout(false); + ((System.ComponentModel.ISupportInitialize)(this.sp_main_inv)).EndInit(); + this.sp_main_inv.ResumeLayout(false); + this.fp_inv.ResumeLayout(false); + this.fp_inv.PerformLayout(); + this.sp_child_inv.Panel1.ResumeLayout(false); + this.sp_child_inv.Panel2.ResumeLayout(false); + ((System.ComponentModel.ISupportInitialize)(this.sp_child_inv)).EndInit(); + this.sp_child_inv.ResumeLayout(false); + ((System.ComponentModel.ISupportInitialize)(this.gv_web_inv_hour)).EndInit(); + this.panel1.ResumeLayout(false); + this.panel1.PerformLayout(); + ((System.ComponentModel.ISupportInitialize)(this.gv_fic_inv_hour)).EndInit(); + this.panel3.ResumeLayout(false); + this.panel3.PerformLayout(); + ((System.ComponentModel.ISupportInitialize)(this.gv_fic_inv_raw)).EndInit(); + this.panel2.ResumeLayout(false); + this.panel2.PerformLayout(); + this.tb2.ResumeLayout(false); + this.sp_main_station.Panel1.ResumeLayout(false); + this.sp_main_station.Panel1.PerformLayout(); + this.sp_main_station.Panel2.ResumeLayout(false); + ((System.ComponentModel.ISupportInitialize)(this.sp_main_station)).EndInit(); + this.sp_main_station.ResumeLayout(false); + this.flowLayoutPanel1.ResumeLayout(false); + this.flowLayoutPanel1.PerformLayout(); + this.sp_child_station.Panel1.ResumeLayout(false); + this.sp_child_station.Panel2.ResumeLayout(false); + ((System.ComponentModel.ISupportInitialize)(this.sp_child_station)).EndInit(); + this.sp_child_station.ResumeLayout(false); + ((System.ComponentModel.ISupportInitialize)(this.gv_web_station_day)).EndInit(); + this.panel7.ResumeLayout(false); + this.panel7.PerformLayout(); + ((System.ComponentModel.ISupportInitialize)(this.gv_web_station_hour)).EndInit(); + this.panel4.ResumeLayout(false); + this.panel4.PerformLayout(); + ((System.ComponentModel.ISupportInitialize)(this.gv_fic_station_day)).EndInit(); + this.panel5.ResumeLayout(false); + this.panel5.PerformLayout(); + ((System.ComponentModel.ISupportInitialize)(this.gv_fic_station_raw)).EndInit(); + this.panel6.ResumeLayout(false); + this.panel6.PerformLayout(); + this.ResumeLayout(false); + + } + + #endregion + + private System.Windows.Forms.TabControl tabControl1; + private System.Windows.Forms.TabPage tb_inv; + private System.Windows.Forms.TabPage tb2; + private System.Windows.Forms.SplitContainer sp_main_inv; + private System.Windows.Forms.SplitContainer sp_main_station; + private System.Windows.Forms.Button bt_select1; + private System.Windows.Forms.DateTimePicker dtselect_inv; + private System.Windows.Forms.SplitContainer sp_child_inv; + private System.Windows.Forms.DataGridView gv_web_inv_hour; + private System.Windows.Forms.Panel panel1; + private System.Windows.Forms.Label lb_inv_hour; + private System.Windows.Forms.DataGridView gv_fic_inv_raw; + private System.Windows.Forms.Panel panel2; + private System.Windows.Forms.Label lb_raw_inv_hour; + private System.Windows.Forms.FlowLayoutPanel fp_inv; + private System.Windows.Forms.Panel panel3; + private System.Windows.Forms.Label label1; + private System.Windows.Forms.DataGridView gv_fic_inv_hour; + private System.Windows.Forms.Label label2; + private System.Windows.Forms.Label label3; + private System.Windows.Forms.Label lbInverterID; + private System.Windows.Forms.Label label4; + private System.Windows.Forms.Label lbMsg; + private System.Windows.Forms.SplitContainer sp_child_station; + private System.Windows.Forms.DataGridView gv_web_station_hour; + private System.Windows.Forms.Panel panel4; + private System.Windows.Forms.Label label5; + private System.Windows.Forms.Label label6; + private System.Windows.Forms.DataGridView gv_fic_station_day; + private System.Windows.Forms.Panel panel5; + private System.Windows.Forms.Label label7; + private System.Windows.Forms.DataGridView gv_fic_station_raw; + private System.Windows.Forms.Panel panel6; + private System.Windows.Forms.Label label8; + private System.Windows.Forms.Label label9; + private System.Windows.Forms.Panel panel7; + private System.Windows.Forms.Label label10; + private System.Windows.Forms.Label label11; + private System.Windows.Forms.DataGridView gv_web_station_day; + private System.Windows.Forms.Label lbMsg_station; + private System.Windows.Forms.Button bt_find_station; + private System.Windows.Forms.DateTimePicker dtselect_station; + private System.Windows.Forms.FlowLayoutPanel flowLayoutPanel1; + private System.Windows.Forms.Label label13; + private System.Windows.Forms.Label lbMsg_inv; + private System.Windows.Forms.DateTimePicker dateTimePicker1; + private System.Windows.Forms.Label label12; + private System.Windows.Forms.DateTimePicker dtselect_station1; + private System.Windows.Forms.DateTimePicker dtselect_station2; + } +} \ No newline at end of file diff --git a/solarApp/fmMain.cs b/solarApp/fmMain.cs new file mode 100644 index 0000000..9e7d898 --- /dev/null +++ b/solarApp/fmMain.cs @@ -0,0 +1,209 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.Text; +using System.Threading; +using System.Windows.Forms; +using solarApp.Service; + +namespace solarApp +{ + public partial class fmMain : Form + { + get_inv_svc inv_svc = new get_inv_svc(); + getStationSvc stationSvc = new getStationSvc(); + public fmMain() + { + InitializeComponent(); + // init_GridView(); + } + + private async void button1_Click(object sender, EventArgs e) + { + lbMsg_inv.Text = "loading ... "; + + gv_fic_inv_raw.DataSource = inv_svc.Get_rawInv(dtselect_inv.Value.ToString("yyyy-MM-dd"), lbInverterID.Text); + + gv_fic_inv_hour.DataSource = inv_svc.get_Inv_rawAvg(dtselect_inv.Value.ToString("yyyy-MM-dd"), lbInverterID.Text); + + gv_web_inv_hour.DataSource = inv_svc.get_web_Inv_hour(dtselect_inv.Value.ToString("yyyy-MM-dd"), lbInverterID.Text); + + lbMsg_inv.Text = " done " + System.DateTime.Now.ToShortTimeString(); + } + + + private void fmMain_Load(object sender, EventArgs e) + { + dtselect_station1.Value = DateTime.Today.AddDays(-7); + dtselect_station2.Value = DateTime.Today.AddDays(-1); + dtselect_inv.Value = DateTime.Today.AddDays(-1); + + Cursor.Current = Cursors.Default; + add_inv_list(); + } + + void add_inv_list() { + //fp_inv + var inv_list = inv_svc.get_Inv_list(); + int i = 0; + foreach (var item in inv_list) + { + RadioButton rb = new RadioButton(); + rb.Name = "rb" + item.inverterid; + rb.Text = item.inverterid; + //rb.Dock = DockStyle.Top; + rb.Width = 200; + rb.CheckedChanged += radio_inv_click; + if (i == 0) rb.Checked = true; //預設第一個勾選 + fp_inv.Controls.Add(rb); + i++; + } + } + + void init_GridView() { + // Create an unbound DataGridView by declaring a column count. + //gv_fic_inv_raw.ColumnCount = 6; + + //// Set the column header style. + //DataGridViewCellStyle columnHeaderStyle = new DataGridViewCellStyle(); + + ////columnHeaderStyle.BackColor = Color.Beige; + ////columnHeaderStyle.Font = new Font("Verdana", 10, FontStyle.Bold); + ////dataGridView1.ColumnHeadersDefaultCellStyle = columnHeaderStyle; + + //// Set the column header names. + //gv_fic_inv_raw.Columns[0].Name = "INVERTERID"; + //gv_fic_inv_raw.Columns[1].Name = "reportdate"; + //gv_fic_inv_raw.Columns[2].Name = "WH"; + //gv_fic_inv_raw.Columns[3].Name = "TODAYKWH"; + //gv_fic_inv_raw.Columns[4].Name = "TOTALKWH"; + //gv_fic_inv_raw.Columns[5].Name = "PR"; + + //DataGridViewColumn newCol1 = new DataGridViewColumn(); // add a column to the grid + //DataGridViewCell cell = new DataGridViewCell(); //Specify which type of cell in this column + //newCol.CellTemplate = cell; + + for (int i = 0; i < 6; i++) + { + DataGridViewColumn newCol = new DataGridViewColumn(); // add a column to the grid + DataGridViewCell cell = new DataGridViewTextBoxCell(); //Specify which type of cell in this column + newCol.CellTemplate = cell; + switch (i) + { + case 0: + newCol.HeaderText = "INVERTERID"; + newCol.Name = "INVERTERID"; + newCol.Visible = true; + newCol.Width = 40; break; + case 1: + newCol.HeaderText = "reportdate"; + newCol.Name = "reportdate"; + newCol.Visible = true; + newCol.Width = 40; break; + case 2: + newCol.HeaderText = "WH"; + newCol.Name = "WH"; + newCol.Visible = true; + newCol.Width = 40; break; + case 3: + newCol.HeaderText = "TODAYKWH"; + newCol.Name = "TODAYKWH"; + newCol.Visible = true; + newCol.Width = 40; break; + case 4: + newCol.HeaderText = "TOTALKWH"; + newCol.Name = "TOTALKWH"; + newCol.Visible = true; + newCol.Width = 40; break; + case 5: + newCol.HeaderText = "PR"; + newCol.Name = "PR"; + newCol.Visible = true; + newCol.Width = 40; break; + case 6: + newCol.HeaderText = "ct"; + newCol.Name = "ct"; + newCol.Visible = false; + newCol.Width = 40; break; + } + gv_fic_inv_raw.Columns.Add(newCol); + } + } + + private void radio_inv_click(object sender, EventArgs e) + { + RadioButton rb = sender as RadioButton; + if (rb.Checked) + { + lbInverterID.Text = rb.Text; + lbMsg_inv.Text = "..."; + } + } + + private void gv_fic_inv_hour_CellFormatting(object sender, DataGridViewCellFormattingEventArgs e) + { + //int rowindex = e.RowIndex; e.ColumnIndex + if (gv_fic_inv_hour.Rows[e.RowIndex].Cells["count"].Value != null && !string.IsNullOrWhiteSpace(gv_fic_inv_hour.Rows[e.RowIndex].Cells["count"].Value.ToString())) + { + if (gv_fic_inv_hour.Rows[e.RowIndex].Cells["count"].Value.ToString() != "12") + { + gv_fic_inv_hour.Rows[e.RowIndex].Cells["count"].Style = new DataGridViewCellStyle { ForeColor = Color.Red, BackColor = Color.White }; + } + } + //else + //{ + // gv_fic_inv_hour.Rows[e.RowIndex].Cells[e.ColumnIndex].Style = gv_fic_inv_hour.DefaultCellStyle; + //} + } + + private void fmMain_Shown(object sender, EventArgs e) + { + + } + + private void dtselect_ValueChanged(object sender, EventArgs e) + { + lbMsg_inv.Text = "..."; + } + + /// + /// 電站 + /// + /// + /// + private void bt_find_station_Click(object sender, EventArgs e) + { + lbMsg_station.Text = "loading ... "; + + string date1 = dtselect_station1.Value.ToString("yyyy-MM-dd"); + string date2 = dtselect_station2.Value.ToString("yyyy-MM-dd"); + + gv_fic_station_raw.DataSource = stationSvc.get_station_raw(date1); + + gv_fic_station_day.DataSource = stationSvc.get_station_rawAvg(date1, date2); + + gv_web_station_hour.DataSource = stationSvc.get_web_station_hour( date1 ); + + gv_web_station_day.DataSource = stationSvc.get_web_station_day(date1, date2); + + lbMsg_station.Text = " done " + System.DateTime.Now.ToShortTimeString(); + } + + private void dtselect_station_ValueChanged(object sender, EventArgs e) + { + + } + + private void dateTimePicker1_ValueChanged(object sender, EventArgs e) + { + + } + + private void label12_Click(object sender, EventArgs e) + { + + } + } +} diff --git a/solarApp/fmMain.resx b/solarApp/fmMain.resx new file mode 100644 index 0000000..f298a7b --- /dev/null +++ b/solarApp/fmMain.resx @@ -0,0 +1,60 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file diff --git a/solarApp/solarApp.csproj b/solarApp/solarApp.csproj new file mode 100644 index 0000000..3ac3235 --- /dev/null +++ b/solarApp/solarApp.csproj @@ -0,0 +1,14 @@ + + + + WinExe + netcoreapp3.1 + true + + + + + + + + \ No newline at end of file diff --git a/solarApp/solarApp.sln b/solarApp/solarApp.sln new file mode 100644 index 0000000..f35c416 --- /dev/null +++ b/solarApp/solarApp.sln @@ -0,0 +1,25 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 16 +VisualStudioVersion = 16.0.31313.79 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "solarApp", "solarApp.csproj", "{1C20C2D4-3303-454C-AB7A-8E670527D3B1}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {1C20C2D4-3303-454C-AB7A-8E670527D3B1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {1C20C2D4-3303-454C-AB7A-8E670527D3B1}.Debug|Any CPU.Build.0 = Debug|Any CPU + {1C20C2D4-3303-454C-AB7A-8E670527D3B1}.Release|Any CPU.ActiveCfg = Release|Any CPU + {1C20C2D4-3303-454C-AB7A-8E670527D3B1}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {FD3EC354-1C59-4048-9617-5D0913EFB0F7} + EndGlobalSection +EndGlobal