This commit is contained in:
Wesley Hofman
2025-08-29 17:28:56 +02:00
parent 6a44bd4fd2
commit 07753f3984
26 changed files with 220 additions and 92 deletions

View File

@@ -613,7 +613,7 @@ namespace HalCheck
this.tpProjectData.Margin = new System.Windows.Forms.Padding(2);
this.tpProjectData.Name = "tpProjectData";
this.tpProjectData.Padding = new System.Windows.Forms.Padding(2);
this.tpProjectData.Size = new System.Drawing.Size(1680, 972);
this.tpProjectData.Size = new System.Drawing.Size(1680, 1003);
this.tpProjectData.TabIndex = 0;
this.tpProjectData.Text = "Project data check";
this.tpProjectData.UseVisualStyleBackColor = true;
@@ -812,7 +812,7 @@ namespace HalCheck
this.tpGeneralDataCheck.Margin = new System.Windows.Forms.Padding(2);
this.tpGeneralDataCheck.Name = "tpGeneralDataCheck";
this.tpGeneralDataCheck.Padding = new System.Windows.Forms.Padding(2);
this.tpGeneralDataCheck.Size = new System.Drawing.Size(1680, 972);
this.tpGeneralDataCheck.Size = new System.Drawing.Size(1680, 1003);
this.tpGeneralDataCheck.TabIndex = 1;
this.tpGeneralDataCheck.Text = "General data check";
this.tpGeneralDataCheck.UseVisualStyleBackColor = true;
@@ -911,7 +911,7 @@ namespace HalCheck
this.tpDataView.Margin = new System.Windows.Forms.Padding(2);
this.tpDataView.Name = "tpDataView";
this.tpDataView.Padding = new System.Windows.Forms.Padding(2);
this.tpDataView.Size = new System.Drawing.Size(1680, 972);
this.tpDataView.Size = new System.Drawing.Size(1680, 1003);
this.tpDataView.TabIndex = 2;
this.tpDataView.Text = "Data viewer";
this.tpDataView.UseVisualStyleBackColor = true;
@@ -1196,10 +1196,10 @@ namespace HalCheck
this.label3.AutoSize = true;
this.label3.Location = new System.Drawing.Point(10, 1058);
this.label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(727, 13);
this.label3.Size = new System.Drawing.Size(694, 13);
this.label3.TabIndex = 33;
this.label3.Text = "Nieuw aangesloten kamers op CMS2 verwijderen uit txt bestand: \\\\silicium\\projects" +
"\\2020\\P201339\\sub1\\4. Software\\1. Feanor\\excluded_chambers.txt";
this.label3.Text = "Nieuw aangesloten kamers op CMS2 verwijderen uit txt bestand: Z:\\projects\\2020\\P2" +
"01339\\sub1\\4. Software\\1. Feanor\\excluded_chambers.txt";
//
// HalControle
//
@@ -1211,6 +1211,7 @@ namespace HalCheck
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
this.Name = "HalControle";
this.Text = "Feanor - HalControle";
this.WindowState = System.Windows.Forms.FormWindowState.Maximized;
this.Load += new System.EventHandler(this.HalControle_Load);
((System.ComponentModel.ISupportInitialize)(this.dgvProjects)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.fileSystemWatcher1)).EndInit();

View File

@@ -51,7 +51,7 @@ namespace HalCheck
private Dictionary<object, int> sensorAttempts = new Dictionary<object, int>();
// save location for dgvProjects information xml file
string filePath = @"\\silicium.maser.nl\projects\2025\P250082\sub1\dgvProjects.xml";
string filePath = @"Z:\projects\2025\P250082\sub1\dgvProjects.xml";
bool isLoadingData = true; // Vlag om aan te geven of data wordt geladen
@@ -67,11 +67,11 @@ namespace HalCheck
new CabinetStatus { Name = "3097", Position = new Point(160, 470), StatusColor = Color.Purple },
new CabinetStatus { Name = "986", Position = new Point(340, 470), StatusColor = Color.Purple },
new CabinetStatus { Name = "1593", Position = new Point(260, 320), StatusColor = Color.Purple },
new CabinetStatus { Name = "1593", Position = new Point(260, 330), StatusColor = Color.Purple },
new CabinetStatus { Name = "1586", Position = new Point(260, 380), StatusColor = Color.Purple },
new CabinetStatus { Name = "2249", Position = new Point(340, 320), StatusColor = Color.Purple },
new CabinetStatus { Name = "2249", Position = new Point(340, 330), StatusColor = Color.Purple },
new CabinetStatus { Name = "2250", Position = new Point(340, 380), StatusColor = Color.Purple },
new CabinetStatus { Name = "2798", Position = new Point(415, 320), StatusColor = Color.Purple },
new CabinetStatus { Name = "2798", Position = new Point(415, 330), StatusColor = Color.Purple },
new CabinetStatus { Name = "2799", Position = new Point(415, 380), StatusColor = Color.Purple },
new CabinetStatus { Name = "2443", Position = new Point(490, 370), StatusColor = Color.Purple },
new CabinetStatus { Name = "77", Position = new Point(560, 370), StatusColor = Color.Purple },
@@ -86,6 +86,9 @@ namespace HalCheck
new CabinetStatus { Name = "3095", Position = new Point(530, 630), StatusColor = Color.Purple },
new CabinetStatus { Name = "1056", Position = new Point(620, 630), StatusColor = Color.Purple },
new CabinetStatus { Name = "3098", Position = new Point(530, 700), StatusColor = Color.Purple },
new CabinetStatus { Name = "3140", Position = new Point(430, 700), StatusColor = Color.Purple },
new CabinetStatus { Name = "38", Position = new Point(830, 300), StatusColor = Color.Purple },
new CabinetStatus { Name = "1232", Position = new Point(830, 400), StatusColor = Color.Purple },
new CabinetStatus { Name = "1233", Position = new Point(830, 500), StatusColor = Color.Purple },
@@ -93,8 +96,10 @@ namespace HalCheck
new CabinetStatus { Name = "1238", Position = new Point(1020, 50), StatusColor = Color.Purple },
new CabinetStatus { Name = "1728", Position = new Point(1020, 150), StatusColor = Color.Purple },
new CabinetStatus { Name = "2222", Position = new Point(1020, 260), StatusColor = Color.Purple },
new CabinetStatus { Name = "25467", Position = new Point(1020, 360), StatusColor = Color.Purple },
new CabinetStatus { Name = "30501", Position = new Point(1020,510), StatusColor = Color.Purple },
new CabinetStatus { Name = "2546", Position = new Point(1020, 360), StatusColor = Color.Purple },//
new CabinetStatus { Name = "2547", Position = new Point(1020, 410), StatusColor = Color.Purple },//
new CabinetStatus { Name = "3050", Position = new Point(1020,490), StatusColor = Color.Purple },//
new CabinetStatus { Name = "3051", Position = new Point(1020,540), StatusColor = Color.Purple },//
new CabinetStatus { Name = "1880", Position = new Point(1120, 80), StatusColor = Color.Purple },
new CabinetStatus { Name = "987", Position = new Point(1120, 160), StatusColor = Color.Purple },
@@ -107,8 +112,12 @@ namespace HalCheck
new CabinetStatus { Name = "1991", Position = new Point(1280, 80), StatusColor = Color.Purple },
new CabinetStatus { Name = "2183", Position = new Point(1280, 160), StatusColor = Color.Purple },
new CabinetStatus { Name = "2420", Position = new Point(1280, 250), StatusColor = Color.Purple },
new CabinetStatus { Name = "3111", Position = new Point(1280, 330), StatusColor = Color.Purple },
new CabinetStatus { Name = "3112", Position = new Point(1280, 380), StatusColor = Color.Purple },
new CabinetStatus { Name = "2745", Position = new Point(1380, 250), StatusColor = Color.Purple },
new CabinetStatus { Name = "2998", Position = new Point(1380, 160), StatusColor = Color.Purple },
new CabinetStatus { Name = "1999", Position = new Point(1185, 630), StatusColor = Color.Purple },
@@ -485,8 +494,7 @@ namespace HalCheck
selectedSensorList.Add(sensor.PK.ToString());
SqlConnection connection = new SqlConnection("Data Source=tcp:192.168.0.241,1434; Initial Catalog = FEANOR; Persist Security Info=True; User " +
"ID = sa; Password=resam; connection timeout=15; TrustServerCertificate=True");
SqlConnection connection = new SqlConnection("Data Source=tcp:10.126.21.47\\FEANOR,1434; Initial Catalog=FEANOR; User ID=sa; Password=resam@123resam; timeout=15; Persist Security Info=True; TrustServerCertificate=True");
try
{
using (connection)
@@ -996,8 +1004,7 @@ namespace HalCheck
foreach (var sensor in sensors)
{
SqlConnection connection = new SqlConnection("Data Source=tcp:192.168.0.241,1434; Initial Catalog = FEANOR; Persist Security Info=True; User " +
"ID = sa; Password=resam; connection timeout=15; TrustServerCertificate=True");
SqlConnection connection = new SqlConnection("Data Source=tcp:10.126.21.47\\FEANOR,1434; Initial Catalog=FEANOR; User ID=sa; Password=resam@123resam; timeout=15; Persist Security Info=True; TrustServerCertificate=True");
try
{
using (connection)
@@ -1148,7 +1155,7 @@ namespace HalCheck
try
{
// Lees uitgesloten kamernummers vanuit bestand
var excludedChambers = File.ReadAllLines(@"\\silicium\projects\2020\P201339\sub1\4. Software\1. Feanor\excluded_chambers.txt")
var excludedChambers = File.ReadAllLines(@"Z:\projects\2020\P201339\sub1\4. Software\1. Feanor\excluded_chambers.txt")
.Select(line => line.Trim())
.Where(line => !string.IsNullOrEmpty(line))
.ToHashSet(); // Snelle lookup
@@ -1252,8 +1259,7 @@ namespace HalCheck
foreach (var sensor in sensors)
{
SqlConnection connection = new SqlConnection("Data Source=tcp:192.168.0.241,1434; Initial Catalog = FEANOR; Persist Security Info=True; User " +
"ID = sa; Password=resam; connection timeout=15; TrustServerCertificate=True");
SqlConnection connection = new SqlConnection("Data Source=tcp:10.126.21.47\\FEANOR,1434; Initial Catalog=FEANOR; User ID=sa; Password=resam@123resam; timeout=15; Persist Security Info=True; TrustServerCertificate=True");
try
{
using (connection)
@@ -1461,9 +1467,12 @@ namespace HalCheck
previousValue = value;
}
try
{
DateTime mostRecentTimestamp = mostRecentReading.Timestamp;
// controleer of spanning wegzakt naar 0
DateTime mostRecentTimestamp = mostRecentReading.Timestamp;
if (readings.Count > 0)
{
DateTime lastTimestamp = readings.Last().Timestamp; // Haal de timestamp van de laatste reading
@@ -1475,6 +1484,8 @@ namespace HalCheck
dgvProjectErrors.Rows.Add(chamber.MIDS, sensor.PK, lastTimestamp, 0.0, sensorname[sensorid], 1);
}
}
}
catch { }
}
}
@@ -2178,7 +2189,7 @@ namespace HalCheck
const string UserID = "mids_userquery";
const string Password = "23uRUVfq6dXXHMWN";
const string Catalog = "mids_maser";
const string Server = "enterprise.maser.nl";
const string Server = "meeu001sqvp007.itiz-me-eu.local";
private static MySqlConnection GetConnection()
{