update
This commit is contained in:
2
FeanorProjects/FeanorProjects.Designer.cs
generated
2
FeanorProjects/FeanorProjects.Designer.cs
generated
@@ -1631,9 +1631,9 @@
|
||||
this.BackColor = System.Drawing.Color.DimGray;
|
||||
this.ClientSize = new System.Drawing.Size(1452, 1013);
|
||||
this.Controls.Add(this.pnlViewProjects);
|
||||
this.Controls.Add(this.pnlExport);
|
||||
this.Controls.Add(this.pnlNewProject);
|
||||
this.Controls.Add(this.menu);
|
||||
this.Controls.Add(this.pnlExport);
|
||||
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
|
||||
this.MainMenuStrip = this.menu;
|
||||
this.Name = "FeanorProjects";
|
||||
|
||||
@@ -43,13 +43,28 @@ namespace FeanorProjects
|
||||
|
||||
public FeanorProjects()
|
||||
{
|
||||
|
||||
try
|
||||
{
|
||||
|
||||
using (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"))
|
||||
{
|
||||
connection.Open();
|
||||
Console.WriteLine("Succesvolle verbinding!");
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Console.WriteLine("Fout bij verbinden: " + ex.Message);
|
||||
}
|
||||
|
||||
InitializeComponent();
|
||||
|
||||
try
|
||||
{
|
||||
string hostName = Dns.GetHostName(); // retrieve host name
|
||||
Console.WriteLine(hostName);
|
||||
if (hostName != "MASER-02874") // only show NodeStatus button for CMS2 PC
|
||||
if (hostName != "MEEU010LAB00003") // only show NodeStatus button for CMS2 PC
|
||||
CMS2PC = false;
|
||||
|
||||
}
|
||||
@@ -669,9 +684,9 @@ namespace FeanorProjects
|
||||
{
|
||||
|
||||
Console.WriteLine("Calibration");
|
||||
Console.WriteLine(String.Format("\\\\silicium\\inventory\\{0:00000}\\calibration\\{1}.{2} calibration", Int32.Parse(devID), project, sub));
|
||||
Console.WriteLine(String.Format("Z:\\inventory\\{0:00000}\\calibration\\{1}.{2} calibration", Int32.Parse(devID), project, sub));
|
||||
|
||||
if (!Directory.Exists(String.Format("\\\\silicium\\inventory\\{0:00000}\\calibration", Int32.Parse(devID), project, project, sub)))
|
||||
if (!Directory.Exists(String.Format("Z:\\inventory\\{0:00000}\\calibration", Int32.Parse(devID), project, project, sub)))
|
||||
{
|
||||
DialogResult dr_path = MessageBox.Show("The inventory project folder is not found.\nAre you sure the project information is correct?", "New project", MessageBoxButtons.YesNoCancel, MessageBoxIcon.Warning);
|
||||
if (dr_path != DialogResult.Yes)
|
||||
@@ -683,10 +698,10 @@ namespace FeanorProjects
|
||||
else // service project
|
||||
{
|
||||
Console.WriteLine("Service");
|
||||
Console.WriteLine(String.Format("\\\\silicium\\inventory\\{0:00000}\\service", Int32.Parse(devID), project, sub));
|
||||
Console.WriteLine(String.Format("Z:\\inventory\\{0:00000}\\service", Int32.Parse(devID), project, sub));
|
||||
|
||||
|
||||
if (!Directory.Exists(String.Format("\\\\silicium\\inventory\\{0:00000}\\service", Int32.Parse(devID), project, sub)))
|
||||
if (!Directory.Exists(String.Format("Z:\\inventory\\{0:00000}\\service", Int32.Parse(devID), project, sub)))
|
||||
{
|
||||
DialogResult dr_path = MessageBox.Show("The inventory project folder is not found.\nAre you sure the project information is correct?", "New project", MessageBoxButtons.YesNoCancel, MessageBoxIcon.Warning);
|
||||
if (dr_path != DialogResult.Yes)
|
||||
@@ -702,10 +717,10 @@ namespace FeanorProjects
|
||||
Console.WriteLine("Check directory for Project (P)");
|
||||
// Check if map exists on server, if not is project info ok?
|
||||
Int32 Year = (Int32)Math.Floor((double)project / 10000) + 2000;
|
||||
Console.WriteLine((String.Format("\\\\silicium\\projects\\{0}\\P{1:00000}\\sub{2}", Year, project, sub)));
|
||||
if (!Directory.Exists(String.Format("\\\\silicium\\projects\\{0}\\P{1:00000}\\sub{2}",Year, project, sub)))
|
||||
Console.WriteLine((String.Format("Z:\\projects\\{0}\\P{1:00000}\\sub{2}", Year, project, sub)));
|
||||
if (!Directory.Exists(String.Format("Z:\\projects\\{0}\\P{1:00000}\\sub{2}",Year, project, sub)))
|
||||
{
|
||||
DialogResult dr_path = MessageBox.Show("The inventory project folder is not found.\nAre you sure the project information is correct?", "New project", MessageBoxButtons.YesNoCancel, MessageBoxIcon.Warning);
|
||||
DialogResult dr_path = MessageBox.Show("The project folder is not found.\nAre you sure the project information is correct?", "New project", MessageBoxButtons.YesNoCancel, MessageBoxIcon.Warning);
|
||||
if (dr_path != DialogResult.Yes)
|
||||
{
|
||||
return;
|
||||
@@ -1040,7 +1055,7 @@ namespace FeanorProjects
|
||||
timerProjectDetails.Start();
|
||||
try
|
||||
{
|
||||
Chamber chamber = _ChambersContent[lboxChambersDetails.SelectedIndex];
|
||||
Chamber chamber = _ChambersContent[lboxChambersDetails.SelectedIndex];
|
||||
if (Directory.Exists(chamber.PathToFolderOnServer))
|
||||
System.Diagnostics.Process.Start(chamber.PathToFolderOnServer);
|
||||
}
|
||||
@@ -1065,13 +1080,13 @@ namespace FeanorProjects
|
||||
{
|
||||
string devID = SelectedProject.ProjectID.ToString();
|
||||
devID = devID.Substring(2);
|
||||
System.Diagnostics.Process.Start(String.Format("\\\\silicium\\inventory\\{0:00000}\\service", Int32.Parse(devID)));
|
||||
System.Diagnostics.Process.Start(String.Format("Z:\\inventory\\{0:00000}\\service", Int32.Parse(devID)));
|
||||
}
|
||||
else
|
||||
{
|
||||
string devID = SelectedProject.ProjectID.ToString();
|
||||
devID = devID.Substring(2);
|
||||
System.Diagnostics.Process.Start(String.Format("\\\\silicium\\inventory\\{0:00000}\\calibration", Int32.Parse(devID)));
|
||||
System.Diagnostics.Process.Start(String.Format("Z:\\inventory\\{0:00000}\\calibration", Int32.Parse(devID)));
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1269,9 +1284,10 @@ namespace FeanorProjects
|
||||
{
|
||||
if (_SensorsContent[i].Type == SensorType.Voltage)
|
||||
{
|
||||
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=MEEU010LAB00003\\FEANOR; Initial Catalog = FEANOR; Persist Security Info=True; User " +
|
||||
//"ID = sa; Password=resam@123resam; 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)
|
||||
@@ -1343,15 +1359,15 @@ namespace FeanorProjects
|
||||
if (project.SubProjectDescription == "Calibration" || project.SubProjectDescription == "calibration")
|
||||
{
|
||||
Console.WriteLine("Calibration");
|
||||
Console.WriteLine(String.Format("\\\\silicium\\inventory\\{0:00000}\\calibration\\I{1}.{2} calibration", Int32.Parse(devID), project.ProjectID, project.SubProject));
|
||||
txtbExportPath.Text = String.Format("\\\\silicium\\inventory\\{0:00000}\\calibration\\I{1}.{2} calibration", Int32.Parse(devID), project.ProjectID, project.SubProject);
|
||||
Console.WriteLine(String.Format("Z:\\inventory\\{0:00000}\\calibration\\I{1}.{2} calibration", Int32.Parse(devID), project.ProjectID, project.SubProject));
|
||||
txtbExportPath.Text = String.Format("Z:\\inventory\\{0:00000}\\calibration\\I{1}.{2} calibration", Int32.Parse(devID), project.ProjectID, project.SubProject);
|
||||
txtbFilename.Text = String.Format("I{0}.{1} step {2} calibration.csv",project.ProjectID, project.SubProject, project.Step);
|
||||
}
|
||||
else if (project.SubProjectDescription == "Service" || project.SubProjectDescription == "service")
|
||||
{
|
||||
Console.WriteLine("Service");
|
||||
Console.WriteLine(String.Format("\\\\silicium\\inventory\\{0:00000}\\service\\I{1}.{2} service", Int32.Parse(devID), project.ProjectID, project.SubProject));
|
||||
txtbExportPath.Text = String.Format("\\\\silicium\\inventory\\{0:00000}\\service\\I{1}.{2} service", Int32.Parse(devID), project.ProjectID, project.SubProject);
|
||||
Console.WriteLine(String.Format("Z:\\inventory\\{0:00000}\\service\\I{1}.{2} service", Int32.Parse(devID), project.ProjectID, project.SubProject));
|
||||
txtbExportPath.Text = String.Format("Z:\\inventory\\{0:00000}\\service\\I{1}.{2} service", Int32.Parse(devID), project.ProjectID, project.SubProject);
|
||||
txtbFilename.Text = String.Format("I{0}.{1} step {2} service.csv", project.ProjectID, project.SubProject, project.Step);
|
||||
}
|
||||
}
|
||||
@@ -1609,7 +1625,7 @@ namespace FeanorProjects
|
||||
|
||||
private void btnExportPath_Click(object sender, EventArgs e)
|
||||
{
|
||||
string folder = String.Format("\\\\silicium\\projects\\{0}", DateTime.Now.Year);
|
||||
string folder = String.Format("Z:\\projects\\{0}", DateTime.Now.Year);
|
||||
if (Directory.Exists(folder))
|
||||
FolderBrowserDialog.SelectedPath = folder;
|
||||
|
||||
@@ -1789,7 +1805,7 @@ namespace FeanorProjects
|
||||
try
|
||||
{
|
||||
Project project = SelectedProject;
|
||||
String target = "https://mids.maser.nl/legacy/index.php?section=projects&subsection=subprojects&action=view&action=view&id=";
|
||||
String target = "https://mids.itiz-me-eu.local/legacy/index.php?section=projects&subsection=subprojects&action=view&action=view&id=";
|
||||
Int32 MIDStableID = MIDSinterface.SubINVProjectMIDSTableID(Convert.ToInt32(project.ProjectID), Convert.ToInt32(project.SubProject));
|
||||
target += MIDStableID.ToString();
|
||||
Console.WriteLine(target);
|
||||
@@ -1804,7 +1820,7 @@ namespace FeanorProjects
|
||||
try
|
||||
{
|
||||
Project project = SelectedProject;
|
||||
String target = "https://mids.maser.nl/legacy/index.php?section=projects&subsection=subprojects&action=view&action=view&id=";
|
||||
String target = "https://mids.itiz-me-eu.local/legacy/index.php?section=projects&subsection=subprojects&action=view&action=view&id=";
|
||||
Int32 MIDStableID = MIDSinterface.SubProjectMIDSTableID(Convert.ToInt32(project.ProjectID), Convert.ToInt32(project.SubProject));
|
||||
target += MIDStableID.ToString();
|
||||
Console.WriteLine(target);
|
||||
@@ -2086,13 +2102,13 @@ namespace FeanorProjects
|
||||
|
||||
String UrlString = "http://" + chamber.Network + ":8080/status";
|
||||
|
||||
// voor niet CMS2 PC's kan de NodeStatus niet direct opgehaald worden (omweg door de Nodestatus html op te slaan op silicium)
|
||||
// voor niet CMS2 PC's kan de NodeStatus niet direct opgehaald worden (omweg door de Nodestatus html op te slaan op Z:)
|
||||
if (CMS2PC == false)
|
||||
{
|
||||
try
|
||||
{
|
||||
string fileName = $"Node_{chamber.MIDS}_status.html";
|
||||
string filePath = Path.Combine("\\\\silicium\\projects\\2020\\P201339\\sub1\\4. Software\\8. Nodestatus\\", fileName);
|
||||
string filePath = Path.Combine("Z:\\projects\\2020\\P201339\\sub1\\4. Software\\8. Nodestatus\\", fileName);
|
||||
|
||||
if (File.Exists(filePath))
|
||||
{
|
||||
@@ -2336,12 +2352,11 @@ namespace FeanorProjects
|
||||
|
||||
|
||||
for (int i = 0; i < sensors.Count; i++)
|
||||
{
|
||||
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)
|
||||
{
|
||||
string query = " ";
|
||||
|
||||
Reference in New Issue
Block a user