From ecb076ce8b9f3c29f81ff30505fceae87c631268 Mon Sep 17 00:00:00 2001 From: Wesley Hofman Date: Fri, 29 Aug 2025 18:13:03 +0200 Subject: [PATCH] First Commit --- .gitattributes | 63 + .gitignore | 363 +++++ FileHandler.cs | 8 + daq_testing.sln | 27 + daq_testing/App.config | 14 + daq_testing/DataTableHelper.cs | 40 + daq_testing/FileHandler.cs | 43 + daq_testing/Instrument.cs | 145 ++ daq_testing/MainForm.Designer.cs | 125 ++ daq_testing/MainForm.cs | 784 +++++++++++ daq_testing/MainForm.resx | 120 ++ daq_testing/MeasuredPosition.cs | 20 + daq_testing/OpenTK.dll.config | 25 + daq_testing/Program.cs | 22 + daq_testing/Properties/AssemblyInfo.cs | 36 + daq_testing/Properties/Resources.Designer.cs | 70 + daq_testing/Properties/Resources.resx | 117 ++ daq_testing/Properties/Settings.Designer.cs | 29 + daq_testing/Properties/Settings.settings | 7 + daq_testing/PslineConfig.cs | 38 + daq_testing/PslineMapping.cs | 25 + daq_testing/Result.cs | 32 + daq_testing/UserControlDMM.Designer.cs | 100 ++ daq_testing/UserControlDMM.cs | 159 +++ daq_testing/UserControlDMM.resx | 120 ++ daq_testing/UserControlInstrument.Designer.cs | 140 ++ daq_testing/UserControlInstrument.cs | 93 ++ daq_testing/UserControlInstrument.resx | 519 +++++++ daq_testing/UserControlMeasure.Designer.cs | 1200 +++++++++++++++++ daq_testing/UserControlMeasure.cs | 977 ++++++++++++++ daq_testing/UserControlMeasure.resx | 120 ++ .../UserControlMeasureHeader.Designer.cs | 379 ++++++ daq_testing/UserControlMeasureHeader.cs | 246 ++++ daq_testing/UserControlMeasureHeader.resx | 120 ++ .../UserControlPslineConfig.Designer.cs | 94 ++ daq_testing/UserControlPslineConfig.cs | 111 ++ daq_testing/UserControlPslineConfig.resx | 120 ++ daq_testing/daq_testing.csproj | 300 +++++ daq_testing/packages.config | 31 + 39 files changed, 6982 insertions(+) create mode 100644 .gitattributes create mode 100644 .gitignore create mode 100644 FileHandler.cs create mode 100644 daq_testing.sln create mode 100644 daq_testing/App.config create mode 100644 daq_testing/DataTableHelper.cs create mode 100644 daq_testing/FileHandler.cs create mode 100644 daq_testing/Instrument.cs create mode 100644 daq_testing/MainForm.Designer.cs create mode 100644 daq_testing/MainForm.cs create mode 100644 daq_testing/MainForm.resx create mode 100644 daq_testing/MeasuredPosition.cs create mode 100644 daq_testing/OpenTK.dll.config create mode 100644 daq_testing/Program.cs create mode 100644 daq_testing/Properties/AssemblyInfo.cs create mode 100644 daq_testing/Properties/Resources.Designer.cs create mode 100644 daq_testing/Properties/Resources.resx create mode 100644 daq_testing/Properties/Settings.Designer.cs create mode 100644 daq_testing/Properties/Settings.settings create mode 100644 daq_testing/PslineConfig.cs create mode 100644 daq_testing/PslineMapping.cs create mode 100644 daq_testing/Result.cs create mode 100644 daq_testing/UserControlDMM.Designer.cs create mode 100644 daq_testing/UserControlDMM.cs create mode 100644 daq_testing/UserControlDMM.resx create mode 100644 daq_testing/UserControlInstrument.Designer.cs create mode 100644 daq_testing/UserControlInstrument.cs create mode 100644 daq_testing/UserControlInstrument.resx create mode 100644 daq_testing/UserControlMeasure.Designer.cs create mode 100644 daq_testing/UserControlMeasure.cs create mode 100644 daq_testing/UserControlMeasure.resx create mode 100644 daq_testing/UserControlMeasureHeader.Designer.cs create mode 100644 daq_testing/UserControlMeasureHeader.cs create mode 100644 daq_testing/UserControlMeasureHeader.resx create mode 100644 daq_testing/UserControlPslineConfig.Designer.cs create mode 100644 daq_testing/UserControlPslineConfig.cs create mode 100644 daq_testing/UserControlPslineConfig.resx create mode 100644 daq_testing/daq_testing.csproj create mode 100644 daq_testing/packages.config diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..1ff0c42 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,63 @@ +############################################################################### +# Set default behavior to automatically normalize line endings. +############################################################################### +* text=auto + +############################################################################### +# Set default behavior for command prompt diff. +# +# This is need for earlier builds of msysgit that does not have it on by +# default for csharp files. +# Note: This is only used by command line +############################################################################### +#*.cs diff=csharp + +############################################################################### +# Set the merge driver for project and solution files +# +# Merging from the command prompt will add diff markers to the files if there +# are conflicts (Merging from VS is not affected by the settings below, in VS +# the diff markers are never inserted). Diff markers may cause the following +# file extensions to fail to load in VS. An alternative would be to treat +# these files as binary and thus will always conflict and require user +# intervention with every merge. To do so, just uncomment the entries below +############################################################################### +#*.sln merge=binary +#*.csproj merge=binary +#*.vbproj merge=binary +#*.vcxproj merge=binary +#*.vcproj merge=binary +#*.dbproj merge=binary +#*.fsproj merge=binary +#*.lsproj merge=binary +#*.wixproj merge=binary +#*.modelproj merge=binary +#*.sqlproj merge=binary +#*.wwaproj merge=binary + +############################################################################### +# behavior for image files +# +# image files are treated as binary by default. +############################################################################### +#*.jpg binary +#*.png binary +#*.gif binary + +############################################################################### +# diff behavior for common document formats +# +# Convert binary document formats to text before diffing them. This feature +# is only available from the command line. Turn it on by uncommenting the +# entries below. +############################################################################### +#*.doc diff=astextplain +#*.DOC diff=astextplain +#*.docx diff=astextplain +#*.DOCX diff=astextplain +#*.dot diff=astextplain +#*.DOT diff=astextplain +#*.pdf diff=astextplain +#*.PDF diff=astextplain +#*.rtf diff=astextplain +#*.RTF diff=astextplain diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..9491a2f --- /dev/null +++ b/.gitignore @@ -0,0 +1,363 @@ +## Ignore Visual Studio temporary files, build results, and +## files generated by popular Visual Studio add-ons. +## +## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore + +# User-specific files +*.rsuser +*.suo +*.user +*.userosscache +*.sln.docstates + +# User-specific files (MonoDevelop/Xamarin Studio) +*.userprefs + +# Mono auto generated files +mono_crash.* + +# Build results +[Dd]ebug/ +[Dd]ebugPublic/ +[Rr]elease/ +[Rr]eleases/ +x64/ +x86/ +[Ww][Ii][Nn]32/ +[Aa][Rr][Mm]/ +[Aa][Rr][Mm]64/ +bld/ +[Bb]in/ +[Oo]bj/ +[Oo]ut/ +[Ll]og/ +[Ll]ogs/ + +# Visual Studio 2015/2017 cache/options directory +.vs/ +# Uncomment if you have tasks that create the project's static files in wwwroot +#wwwroot/ + +# Visual Studio 2017 auto generated files +Generated\ Files/ + +# MSTest test Results +[Tt]est[Rr]esult*/ +[Bb]uild[Ll]og.* + +# NUnit +*.VisualState.xml +TestResult.xml +nunit-*.xml + +# Build Results of an ATL Project +[Dd]ebugPS/ +[Rr]eleasePS/ +dlldata.c + +# Benchmark Results +BenchmarkDotNet.Artifacts/ + +# .NET Core +project.lock.json +project.fragment.lock.json +artifacts/ + +# ASP.NET Scaffolding +ScaffoldingReadMe.txt + +# StyleCop +StyleCopReport.xml + +# Files built by Visual Studio +*_i.c +*_p.c +*_h.h +*.ilk +*.meta +*.obj +*.iobj +*.pch +*.pdb +*.ipdb +*.pgc +*.pgd +*.rsp +*.sbr +*.tlb +*.tli +*.tlh +*.tmp +*.tmp_proj +*_wpftmp.csproj +*.log +*.vspscc +*.vssscc +.builds +*.pidb +*.svclog +*.scc + +# Chutzpah Test files +_Chutzpah* + +# Visual C++ cache files +ipch/ +*.aps +*.ncb +*.opendb +*.opensdf +*.sdf +*.cachefile +*.VC.db +*.VC.VC.opendb + +# Visual Studio profiler +*.psess +*.vsp +*.vspx +*.sap + +# Visual Studio Trace Files +*.e2e + +# TFS 2012 Local Workspace +$tf/ + +# Guidance Automation Toolkit +*.gpState + +# ReSharper is a .NET coding add-in +_ReSharper*/ +*.[Rr]e[Ss]harper +*.DotSettings.user + +# TeamCity is a build add-in +_TeamCity* + +# DotCover is a Code Coverage Tool +*.dotCover + +# AxoCover is a Code Coverage Tool +.axoCover/* +!.axoCover/settings.json + +# Coverlet is a free, cross platform Code Coverage Tool +coverage*.json +coverage*.xml +coverage*.info + +# Visual Studio code coverage results +*.coverage +*.coveragexml + +# NCrunch +_NCrunch_* +.*crunch*.local.xml +nCrunchTemp_* + +# MightyMoose +*.mm.* +AutoTest.Net/ + +# Web workbench (sass) +.sass-cache/ + +# Installshield output folder +[Ee]xpress/ + +# DocProject is a documentation generator add-in +DocProject/buildhelp/ +DocProject/Help/*.HxT +DocProject/Help/*.HxC +DocProject/Help/*.hhc +DocProject/Help/*.hhk +DocProject/Help/*.hhp +DocProject/Help/Html2 +DocProject/Help/html + +# Click-Once directory +publish/ + +# Publish Web Output +*.[Pp]ublish.xml +*.azurePubxml +# Note: Comment the next line if you want to checkin your web deploy settings, +# but database connection strings (with potential passwords) will be unencrypted +*.pubxml +*.publishproj + +# Microsoft Azure Web App publish settings. Comment the next line if you want to +# checkin your Azure Web App publish settings, but sensitive information contained +# in these scripts will be unencrypted +PublishScripts/ + +# NuGet Packages +*.nupkg +# NuGet Symbol Packages +*.snupkg +# The packages folder can be ignored because of Package Restore +**/[Pp]ackages/* +# except build/, which is used as an MSBuild target. +!**/[Pp]ackages/build/ +# Uncomment if necessary however generally it will be regenerated when needed +#!**/[Pp]ackages/repositories.config +# NuGet v3's project.json files produces more ignorable files +*.nuget.props +*.nuget.targets + +# Microsoft Azure Build Output +csx/ +*.build.csdef + +# Microsoft Azure Emulator +ecf/ +rcf/ + +# Windows Store app package directories and files +AppPackages/ +BundleArtifacts/ +Package.StoreAssociation.xml +_pkginfo.txt +*.appx +*.appxbundle +*.appxupload + +# Visual Studio cache files +# files ending in .cache can be ignored +*.[Cc]ache +# but keep track of directories ending in .cache +!?*.[Cc]ache/ + +# Others +ClientBin/ +~$* +*~ +*.dbmdl +*.dbproj.schemaview +*.jfm +*.pfx +*.publishsettings +orleans.codegen.cs + +# Including strong name files can present a security risk +# (https://github.com/github/gitignore/pull/2483#issue-259490424) +#*.snk + +# Since there are multiple workflows, uncomment next line to ignore bower_components +# (https://github.com/github/gitignore/pull/1529#issuecomment-104372622) +#bower_components/ + +# RIA/Silverlight projects +Generated_Code/ + +# Backup & report files from converting an old project file +# to a newer Visual Studio version. Backup files are not needed, +# because we have git ;-) +_UpgradeReport_Files/ +Backup*/ +UpgradeLog*.XML +UpgradeLog*.htm +ServiceFabricBackup/ +*.rptproj.bak + +# SQL Server files +*.mdf +*.ldf +*.ndf + +# Business Intelligence projects +*.rdl.data +*.bim.layout +*.bim_*.settings +*.rptproj.rsuser +*- [Bb]ackup.rdl +*- [Bb]ackup ([0-9]).rdl +*- [Bb]ackup ([0-9][0-9]).rdl + +# Microsoft Fakes +FakesAssemblies/ + +# GhostDoc plugin setting file +*.GhostDoc.xml + +# Node.js Tools for Visual Studio +.ntvs_analysis.dat +node_modules/ + +# Visual Studio 6 build log +*.plg + +# Visual Studio 6 workspace options file +*.opt + +# Visual Studio 6 auto-generated workspace file (contains which files were open etc.) +*.vbw + +# Visual Studio LightSwitch build output +**/*.HTMLClient/GeneratedArtifacts +**/*.DesktopClient/GeneratedArtifacts +**/*.DesktopClient/ModelManifest.xml +**/*.Server/GeneratedArtifacts +**/*.Server/ModelManifest.xml +_Pvt_Extensions + +# Paket dependency manager +.paket/paket.exe +paket-files/ + +# FAKE - F# Make +.fake/ + +# CodeRush personal settings +.cr/personal + +# Python Tools for Visual Studio (PTVS) +__pycache__/ +*.pyc + +# Cake - Uncomment if you are using it +# tools/** +# !tools/packages.config + +# Tabs Studio +*.tss + +# Telerik's JustMock configuration file +*.jmconfig + +# BizTalk build output +*.btp.cs +*.btm.cs +*.odx.cs +*.xsd.cs + +# OpenCover UI analysis results +OpenCover/ + +# Azure Stream Analytics local run output +ASALocalRun/ + +# MSBuild Binary and Structured Log +*.binlog + +# NVidia Nsight GPU debugger configuration file +*.nvuser + +# MFractors (Xamarin productivity tool) working folder +.mfractor/ + +# Local History for Visual Studio +.localhistory/ + +# BeatPulse healthcheck temp database +healthchecksdb + +# Backup folder for Package Reference Convert tool in Visual Studio 2017 +MigrationBackup/ + +# Ionide (cross platform F# VS Code tools) working folder +.ionide/ + +# Fody - auto-generated XML schema +FodyWeavers.xsd \ No newline at end of file diff --git a/FileHandler.cs b/FileHandler.cs new file mode 100644 index 0000000..d555ecb --- /dev/null +++ b/FileHandler.cs @@ -0,0 +1,8 @@ +using System; + +public class Class1 +{ + public Class1() + { + } +} diff --git a/daq_testing.sln b/daq_testing.sln new file mode 100644 index 0000000..78f293f --- /dev/null +++ b/daq_testing.sln @@ -0,0 +1,27 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 16 +VisualStudioVersion = 16.0.34114.132 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "daq_testing", "daq_testing\daq_testing.csproj", "{F871696A-881E-4EDB-BC23-EC1DCBA11A5A}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{243C241C-A1C9-4B6A-9C4D-39BD27E7C89A}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {F871696A-881E-4EDB-BC23-EC1DCBA11A5A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {F871696A-881E-4EDB-BC23-EC1DCBA11A5A}.Debug|Any CPU.Build.0 = Debug|Any CPU + {F871696A-881E-4EDB-BC23-EC1DCBA11A5A}.Release|Any CPU.ActiveCfg = Release|Any CPU + {F871696A-881E-4EDB-BC23-EC1DCBA11A5A}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {22F2AE7D-9D35-4763-B4FF-A7A83930B0D9} + EndGlobalSection +EndGlobal diff --git a/daq_testing/App.config b/daq_testing/App.config new file mode 100644 index 0000000..7d84477 --- /dev/null +++ b/daq_testing/App.config @@ -0,0 +1,14 @@ + + + + + + + + + + + + + + \ No newline at end of file diff --git a/daq_testing/DataTableHelper.cs b/daq_testing/DataTableHelper.cs new file mode 100644 index 0000000..89fb04e --- /dev/null +++ b/daq_testing/DataTableHelper.cs @@ -0,0 +1,40 @@ +using System; +using System.Collections.Generic; +using System.Data; +using System.Linq; +using System.Reflection; +using System.Text; +using System.Threading.Tasks; + +namespace WindowsFormsApp5 +{ + public static class DataTableHelper + { + public static DataTable ToDataTable(List items) + { + var dataTable = new DataTable(typeof(T).Name); + + // Get all properties of the class + PropertyInfo[] properties = typeof(T).GetProperties(BindingFlags.Public | BindingFlags.Instance); + + // Create DataTable columns based on properties + foreach (var prop in properties) + { + dataTable.Columns.Add(prop.Name, Nullable.GetUnderlyingType(prop.PropertyType) ?? prop.PropertyType); + } + + // Add rows to DataTable + foreach (var item in items) + { + var values = new object[properties.Length]; + for (int i = 0; i < properties.Length; i++) + { + values[i] = properties[i].GetValue(item, null); + } + dataTable.Rows.Add(values); + } + + return dataTable; + } + } +} diff --git a/daq_testing/FileHandler.cs b/daq_testing/FileHandler.cs new file mode 100644 index 0000000..5b1b33b --- /dev/null +++ b/daq_testing/FileHandler.cs @@ -0,0 +1,43 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.IO; +using daq_testing; +using Newtonsoft.Json; + +public class FileHandler +{ + private readonly string filePath; + + public FileHandler(string filePath) + { + this.filePath = filePath; + } + + public BindingList LoadData() + { + if (File.Exists(filePath)) + { + var jsonData = File.ReadAllText(filePath); + var data = JsonConvert.DeserializeObject>(jsonData); + return new BindingList(data ?? new List()); + } + return new BindingList(); + } + + public List GetPslineConfig() + { + if (File.Exists(filePath)) + { + var jsonData = File.ReadAllText(filePath); + var data = JsonConvert.DeserializeObject>(jsonData); + return data; + } + return new List(); + } + public void SaveData(BindingList data) + { + var jsonData = JsonConvert.SerializeObject(data, Formatting.Indented); + File.WriteAllText(filePath, jsonData); + } +} diff --git a/daq_testing/Instrument.cs b/daq_testing/Instrument.cs new file mode 100644 index 0000000..d5084bc --- /dev/null +++ b/daq_testing/Instrument.cs @@ -0,0 +1,145 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Agilent.Agilent34970.Interop; + +namespace daq_testing +{ + public class Instrument + { + + public Agilent34970 DAQInstrument = new Agilent34970(); + + public string ResourceDesc { get; set; } + public string InitOptions { get; set; } + public bool IdQuery { get; set; } + public bool Reset { get; set; } + public string ScanList { get; set; } + + public string SerialNumber { get; set; } + + public Instrument() + { + + + } + + public void CheckCardConfig () + { + const int NUMBEROFCARDS = 3; + string cardType; + + for (int card = 0; card < NUMBEROFCARDS; card++) + { + + cardType = DAQInstrument.System.CardType[0]; + Console.WriteLine($"Cardtype slot {card}: {cardType}"); + } + + } + + public bool InitializeInstrument () + { +#if DEBUG + this.InitOptions = "QueryInstrStatus=true, Simulate=true, DriverSetup= Model=, Trace=false, TraceName=c:\\temp\\traceOut"; +#else + this.InitOptions = "QueryInstrStatus=true, Simulate=false, DriverSetup= Model=, Trace=false, TraceName=c:\\temp\\traceOut"; +#endif + + this.IdQuery = true; + this.Reset = true; + + try + { + DAQInstrument.Initialize(ResourceDesc, IdQuery, Reset, InitOptions); + GetSerialNumber(); + //CheckCardConfig(); + Console.WriteLine("Driver Initialized"); + + return true; + + } + catch (Exception) + { + Console.WriteLine("Cannot Initialize Instrument"); + return false; + } + + } + + private void GetSerialNumber () + { + try + { + SerialNumber = DAQInstrument.Identity.Description; + } + catch (Exception) + { + SerialNumber = null; + throw; + } + } + public string DummyList() + { + List myList = new List(); + string joinedlist; + //Sled 1 + for (int i = 101; i < 139 +1; i++) + { + myList.Add(i.ToString()); + } + //Sled 2 + //for (int i = 201; i < 240 + 1; i++) + //{ + // myList.Add(i.ToString()); + //} + //Sled 3 + //for (int i = 301; i < 340 + 1; i++) + //{ + // myList.Add(i.ToString()); + //} + + joinedlist = string.Join(",", myList); + + return joinedlist; + } + + public void SetScanlist() + { + //string scanList ="@" + DummyList(); + //this.ScanList = "@121:140,221:240,321:340"; + //this.ScanList = "101:120"; + this.ScanList = ScanList; + // Console.WriteLine(String.Format("@{0}",scanList)); + } + + public void ConfigInstrument() + { + SetScanlist(); + DAQInstrument.Voltage.DCVoltage.Configure(ScanList, 10, 0.01); + //DAQInstrument.Voltage.DCVoltage.AutoRangeListConfig(ScanList, true); + DAQInstrument.Scan.SweepCount = 1; + } + + public string[] GetMeasurementByScanList (string scanList) + { + this.ScanList = scanList; + string[] result; + DAQInstrument.Scan.Initiate(); + DAQInstrument.System.WaitForOperationComplete(10000); // Wait for scan to complete + try + { + result = DAQInstrument.Scan.Fetch(); + } + catch (Exception) + { + + throw; + } + return result; + } + + } +} diff --git a/daq_testing/MainForm.Designer.cs b/daq_testing/MainForm.Designer.cs new file mode 100644 index 0000000..7fcd970 --- /dev/null +++ b/daq_testing/MainForm.Designer.cs @@ -0,0 +1,125 @@ + +namespace daq_testing +{ + partial class MainForm + { + /// + /// 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.panelRight = new System.Windows.Forms.Panel(); + this.btnInstrument = new System.Windows.Forms.Button(); + this.btnConfigPslines = new System.Windows.Forms.Button(); + this.btnMeasure = new System.Windows.Forms.Button(); + this.btn_MeasureHeader = new System.Windows.Forms.Button(); + this.btnDMM = new System.Windows.Forms.Button(); + this.SuspendLayout(); + // + // panelRight + // + this.panelRight.Location = new System.Drawing.Point(190, 12); + this.panelRight.Name = "panelRight"; + this.panelRight.Size = new System.Drawing.Size(1347, 795); + this.panelRight.TabIndex = 0; + // + // btnInstrument + // + this.btnInstrument.Location = new System.Drawing.Point(12, 12); + this.btnInstrument.Name = "btnInstrument"; + this.btnInstrument.Size = new System.Drawing.Size(134, 51); + this.btnInstrument.TabIndex = 1; + this.btnInstrument.Text = "INSTRUMENT"; + this.btnInstrument.UseVisualStyleBackColor = true; + this.btnInstrument.Click += new System.EventHandler(this.btnInstrument_Click); + // + // btnConfigPslines + // + this.btnConfigPslines.Location = new System.Drawing.Point(12, 69); + this.btnConfigPslines.Name = "btnConfigPslines"; + this.btnConfigPslines.Size = new System.Drawing.Size(134, 51); + this.btnConfigPslines.TabIndex = 2; + this.btnConfigPslines.Text = "CONFIG PSLINES"; + this.btnConfigPslines.UseVisualStyleBackColor = true; + this.btnConfigPslines.Click += new System.EventHandler(this.btnConfigPslines_Click); + // + // btnMeasure + // + this.btnMeasure.Location = new System.Drawing.Point(12, 126); + this.btnMeasure.Name = "btnMeasure"; + this.btnMeasure.Size = new System.Drawing.Size(134, 51); + this.btnMeasure.TabIndex = 3; + this.btnMeasure.Text = "MEASURE"; + this.btnMeasure.UseVisualStyleBackColor = true; + this.btnMeasure.Click += new System.EventHandler(this.btnMeasure_Click); + // + // btn_MeasureHeader + // + this.btn_MeasureHeader.Location = new System.Drawing.Point(12, 183); + this.btn_MeasureHeader.Name = "btn_MeasureHeader"; + this.btn_MeasureHeader.Size = new System.Drawing.Size(134, 51); + this.btn_MeasureHeader.TabIndex = 4; + this.btn_MeasureHeader.Text = "MEASURE_ HEADER"; + this.btn_MeasureHeader.UseVisualStyleBackColor = true; + this.btn_MeasureHeader.Click += new System.EventHandler(this.btn_MeasureHeader_Click); + // + // btnDMM + // + this.btnDMM.Location = new System.Drawing.Point(12, 240); + this.btnDMM.Name = "btnDMM"; + this.btnDMM.Size = new System.Drawing.Size(134, 51); + this.btnDMM.TabIndex = 5; + this.btnDMM.Text = "DMM"; + this.btnDMM.UseVisualStyleBackColor = true; + this.btnDMM.Click += new System.EventHandler(this.btnDMM_Click); + // + // MainForm + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.ClientSize = new System.Drawing.Size(1443, 817); + this.Controls.Add(this.btnDMM); + this.Controls.Add(this.btn_MeasureHeader); + this.Controls.Add(this.btnMeasure); + this.Controls.Add(this.btnConfigPslines); + this.Controls.Add(this.btnInstrument); + this.Controls.Add(this.panelRight); + this.Name = "MainForm"; + this.Text = "Advanced HTOL Voltage Verifier"; + this.Load += new System.EventHandler(this.Form1_Load); + this.ResumeLayout(false); + + } + + #endregion + + private System.Windows.Forms.Panel panelRight; + private System.Windows.Forms.Button btnInstrument; + private System.Windows.Forms.Button btnConfigPslines; + private System.Windows.Forms.Button btnMeasure; + private System.Windows.Forms.Button btn_MeasureHeader; + private System.Windows.Forms.Button btnDMM; + } +} + diff --git a/daq_testing/MainForm.cs b/daq_testing/MainForm.cs new file mode 100644 index 0000000..9ef4c06 --- /dev/null +++ b/daq_testing/MainForm.cs @@ -0,0 +1,784 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.IO; +using System.Linq; +using System.Text; +using System.Text.Json; +using System.Threading.Tasks; +using System.Windows.Forms; + +namespace daq_testing +{ + public partial class MainForm : Form + { + public Instrument DAQ; + List pslineMapping; + List pslineConfigs; + UserControlMeasure MeasureUserControl = new UserControlMeasure(); + UserControlPslineConfig PslineConfigUserControl = new UserControlPslineConfig(); + UserControlInstrument InstrumentUsercontrol = new UserControlInstrument(); + UserControlMeasureHeader MeasureHeaderUsercontrol = new UserControlMeasureHeader(); + + UserControlDMM DMMUserControl = new UserControlDMM(); + + public List DaqSled1List = new List(); + public List DaqSled2List = new List(); + public List DaqSled3List = new List(); + + List Results = new List(); + //public string DataloggerSerial { get; set; } + + + public List MeasuredPositionList = new List(); + public List MeasuredHeaderPinsPositionList = new List(); + + + + public MainForm() + { + InitializeComponent(); + + btnMeasure.Enabled = false; + btnConfigPslines.Enabled = false; + + this.WindowState = FormWindowState.Maximized; + + DAQ = new Instrument(); + GetMapping(); + GetPsLineConfigFromJson(); + //GetPsLineConfigFromCsv(); + //GetDefaultPsLineConfig(); + + panelRight.Controls.Add(InstrumentUsercontrol); + panelRight.Controls.Add(PslineConfigUserControl); + panelRight.Controls.Add(MeasureUserControl); + panelRight.Controls.Add(MeasureHeaderUsercontrol); + panelRight.Controls.Add(DMMUserControl); + + + PslineConfigUserControl.Data = pslineConfigs; + + panelRight.Controls[0].Show(); + panelRight.Controls[1].Hide(); + panelRight.Controls[2].Hide(); + panelRight.Controls[3].Hide(); + panelRight.Controls[4].Hide(); + + + InstrumentUsercontrol.InstrumentConnectButtonClicked += ConnectInstrument; + PslineConfigUserControl.UpdateBtnClick += UpdateButton; + + MeasureUserControl.MeasureButtonClick += Measure; + MeasureUserControl.ClearAllMeasurementsBtnClick += ClearAllMeasurements; + + MeasureHeaderUsercontrol.MeasureButtonClick += MeasureHeader; + MeasureHeaderUsercontrol.ClearAllMeasurementsBtnClick += ClearAllMeasurementsHeader; + MeasureHeaderUsercontrol.PopuplateHeaderEvent += PopulateHeaders; + + + } + + public void PopulateHeaders(object sender, EventArgs e) + { + + } + public List FakeResults() + { + List results = new List(); + Random random = new Random(); + for (int i = 1; i < 40; i++) + { + Result result = new Result() { + ID = i, + PsLine = random.Next(4)+1, + Position = i, + TimeStamp = DateTime.Now, + Value =(random.NextDouble()+0.1)*2 , + + }; + + results.Add(result); + } + return results; + } + public List FakeResultsHeader() + { + List results = new List(); + Random random = new Random(); + for (int i = 1; i < 40; i++) + { + Result result = new Result() + { + ID = i, + PsLine = random.Next(4) + 1, + Position = i, + TimeStamp = DateTime.Now, + Value = (random.NextDouble() + 0.1) * 2, + BiB = MeasureHeaderUsercontrol.BiBID, + DriverID = "Simulation Driver", + + }; + + results.Add(result); + } + return results; + } + + private void ConnectInstrument(object sender, EventArgs e) + { + DAQ.ResourceDesc = InstrumentUsercontrol.VisaAddress; + + if (DAQ.InitializeInstrument()) + { + InstrumentUsercontrol.SetConnectButtonActive(); + MeasureUserControl.DataloggerSerial = DAQ.SerialNumber; + btnConfigPslines.Enabled = true; + } + else + { + InstrumentUsercontrol.SetConnectButtonNonActive(); + btnConfigPslines.Enabled = false; + } + } + + public void UpdateButton(object sender, EventArgs e) + { + btnMeasure.Enabled = true; + GetPsLineConfigFromJson(); + } + + public void Measure(object sender, EventArgs e) + { + + PositionListToDataloggerChannels(); + //var data = DAQ.GetMeasurementByScanList(scanlist); + GetDataFromDaq(); + MeasureUserControl.PopulateVoltage( this.Results); + + + } + public void MeasureHeader( object sender, EventArgs e) + { + + var headerList = MeasureHeaderUsercontrol.CheckedItems; + HeaderPinsListToDataloggerChannels(headerList); + #if DEBUG + this.Results = FakeResultsHeader(); + #else + GetDataFromDaqHeader(); + #endif + MeasureHeaderUsercontrol.PopulateVoltage(this.Results); + + } + public void ClearAllMeasurements(object sender, EventArgs e) + { + DialogResult dialogResult = MessageBox.Show("Are you sure?", "Clear All Measurements", MessageBoxButtons.YesNo); + if (dialogResult == DialogResult.Yes) + { + //do something + foreach (var result in Results) + { + result.Value = 0.0; + } + MeasureUserControl.PopulateVoltage(this.Results); + } + else if (dialogResult == DialogResult.No) + { + //do something else + } + + + + } + public void ClearAllMeasurementsHeader(object sender, EventArgs e) + { + DialogResult dialogResult = MessageBox.Show("Are you sure?", "Clear All Measurements", MessageBoxButtons.YesNo); + if (dialogResult == DialogResult.Yes) + { + //do something + this.Results.Clear(); + MeasureHeaderUsercontrol.PopulateVoltage(this.Results); + } + else if (dialogResult == DialogResult.No) + { + //do something else + } + + + + } + public void GetDataFromDaq() + { + if (DaqSled1List.Count >=1) + { + List sled1 = new List(); + foreach (var item in DaqSled1List) + { + sled1.Add(item.daqchannel.ToString()); + } + Console.WriteLine("bla"); + string scanlist = String.Join(",", sled1); + DAQ.ScanList = scanlist; + DAQ.ConfigInstrument(); + var datasled1 = DAQ.GetMeasurementByScanList(scanlist); + SaveResults(DaqSled1List, datasled1); + } + + if (DaqSled2List.Count >= 1) + { + List sled2 = new List(); + foreach (var item in DaqSled2List) + { + sled2.Add(item.daqchannel.ToString()); + } + + string scanlist = String.Join(",", sled2); + DAQ.ScanList = scanlist; + DAQ.ConfigInstrument(); + var datasled2 = DAQ.GetMeasurementByScanList(scanlist); + SaveResults(DaqSled2List, datasled2); + } + + if (DaqSled3List.Count >= 1) + { + List sled3 = new List(); + foreach (var item in DaqSled3List) + { + sled3.Add(item.daqchannel.ToString()); + } + + string scanlist = String.Join(",", sled3); + DAQ.ScanList = scanlist; + DAQ.ConfigInstrument(); + var datasled3 = DAQ.GetMeasurementByScanList(scanlist); + SaveResults(DaqSled3List, datasled3); + } + + + string fileName = string.Format("{0}_Result.json", MeasureUserControl.ProjectNumber); + string jsonString = JsonSerializer.Serialize(this.Results); + File.WriteAllText(fileName, jsonString); + } + public void GetDataFromDaqHeaderOld() + { + if (DaqSled1List.Count >= 1) + { + List sled1 = new List(); + foreach (var item in DaqSled1List) + { + sled1.Add(item.daqchannel.ToString()); + } + Console.WriteLine("bla"); + string scanlist = String.Join(",", sled1); + DAQ.ScanList = scanlist; + DAQ.ConfigInstrument(); + var datasled1 = DAQ.GetMeasurementByScanList(scanlist); + SaveResultsHeader(DaqSled1List, datasled1); + } + + + string fileName = string.Format("{0}_Result.json", MeasureUserControl.ProjectNumber); + string jsonString = JsonSerializer.Serialize(this.Results); + File.WriteAllText(fileName, jsonString); + } + public void ShowContinueMessageBox() + { + // Display the message box + DialogResult result = MessageBox.Show("Please move header", "Confirmation", MessageBoxButtons.OK, MessageBoxIcon.Question); + + // Check the result + if (result == DialogResult.Yes) + { + // User clicked Yes + MessageBox.Show("You chose to continue."); + // Add your logic to continue here + } + else if (result == DialogResult.No) + { + // User clicked No + MessageBox.Show("You chose not to continue."); + // Add your logic for cancellation here + } + } + public void GetDataFromDaqHeader() + { + if (DaqSled1List.Count >= 1) + { + List sled1 = new List(); + foreach (var item in DaqSled1List) + { + sled1.Add(item.daqchannel.ToString()); + } + //Console.WriteLine("bla"); + //string scanlist = String.Join(",", sled1); + List value = new List(); + + + var maxChannel = DaqSled1List.Max(x => x.position); + Console.WriteLine(maxChannel); + + + + if (maxChannel>9) + { + List list1 = DaqSled1List.Where(x => x.position <= 9).ToList(); + List list2 = DaqSled1List.Where(x => x.position > 9).ToList(); + + foreach (var item in list2) + { + DAQ.DAQInstrument.Voltage.DCVoltage.AutoRange[item.daqchannel] = true; + value.Add(DAQ.DAQInstrument.Measure.DCVoltMeasure(item.daqchannel.ToString(),10, 0.01)[0].ToString()); + + + } + + ShowContinueMessageBox(); + + foreach (var item in list1) + { + DAQ.DAQInstrument.Voltage.DCVoltage.AutoRange[item.daqchannel] = true; + value.Add(DAQ.DAQInstrument.Measure.DCVoltMeasure(item.daqchannel.ToString(), 10, 0.01)[0].ToString()); + } + + } + else + { + foreach (var item in DaqSled1List) + { + DAQ.DAQInstrument.Voltage.DCVoltage.AutoRange[item.daqchannel] = true; + value.Add(DAQ.DAQInstrument.Measure.DCVoltMeasure(item.daqchannel.ToString(), 10, 0.01)[0].ToString()); + } + } + + + + var datasled1 = value.ToArray(); + SaveResultsHeader(DaqSled1List, datasled1); + } + + + string fileName = string.Format("{0}_Result.json", MeasureUserControl.ProjectNumber); + string jsonString = JsonSerializer.Serialize(this.Results); + File.WriteAllText(fileName, jsonString); + } + + public void SaveResults(List DaqSledList, string[] data) + { + List SortedDaqSledList = DaqSledList.OrderBy(o => o.daqchannel).ToList(); + + int counter = 0; + foreach (var item in SortedDaqSledList) + { + CheckIfItemExists(item); + + var powerSupplyEnabled = pslineConfigs.Where(x => x.Psline == item.psline).Any(x => x.Enabled); + + if (powerSupplyEnabled) + { + double measuredVoltage = Convert.ToDouble(data[counter]); + //if (Math.Abs(measuredVoltage) < 0.1) { measuredVoltage = 0.0; } + + Result result = new Result() + { + Position = item.position, + PsLine = item.psline, + TimeStamp = DateTime.UtcNow, + MeasureLocation = MeasureUserControl.MeasurementLocation, + BiB = MeasureHeaderUsercontrol.BiBID, + Value = measuredVoltage + }; + Results.Add(result); + } + + counter++; + } + } + + public void SaveResultsHeader(List DaqSledList, string[] data) + { + // List SortedDaqSledList = DaqSledList.OrderBy(o => o.daqchannel).ToList(); + List SortedDaqSledList = DaqSledList.OrderBy(o => o.position).ToList(); + int counter = 0; + foreach (var item in SortedDaqSledList) + { + CheckIfItemExistsHeader(item); + + //var powerSupplyEnabled = pslineConfigs.Where(x => x.Psline == item.psline).Any(x => x.Enabled); + + if (1==1) + //if (powerSupplyEnabled) + { + double measuredVoltage = Convert.ToDouble(data[counter]); + //if (Math.Abs(measuredVoltage) < 0.1) { measuredVoltage = 0.0; } + + Result result = new Result() + { + ID = Results.Select(x => x.ID).DefaultIfEmpty(0).Max() + 1, + Position = Convert.ToInt16(MeasureHeaderUsercontrol.CurrentMeasurePosition), + PsLine = item.position, + DriverID = MeasureHeaderUsercontrol.DriverID, + BiB = MeasureHeaderUsercontrol.BiBID, + Description = pslineConfigs.Where(x => x.Psline == item.position).Select(x => x.Description).First(), + TimeStamp = DateTime.UtcNow, + MeasureLocation = MeasureHeaderUsercontrol.MeasurementLocation ?? "N/A", + Value = measuredVoltage + }; + Results.Add(result); + Console.WriteLine("HELLO?"); + } + + counter++; + } + } + + public void CheckIfItemExists(PslineMapping item) + { + Results.RemoveAll(x => x.Position == item.position & x.PsLine == item.psline); + } + + public void CheckIfItemExistsHeader(PslineMapping item) + { + //Results.RemoveAll(x => x.Position == item.position & x.PsLine == Convert.ToInt16(MeasureHeaderUsercontrol.CurrentMeasurePosition)); + Results.RemoveAll(x => x.PsLine == item.position & x.Position == Convert.ToInt32(MeasureHeaderUsercontrol.CurrentMeasurePosition) & x.BiB == MeasureHeaderUsercontrol.BiBID); + } + + public void HeaderPinsListToDataloggerChannelsOld(List positionList) + { + MeasuredPositionList.Clear(); + + int prevPosition = 0; + foreach (PslineMapping mapping in pslineMapping) + { + + if (positionList.Contains(mapping.position)) + { + if (mapping.position != prevPosition) + { + MeasuredPositionList.Add(mapping); + } + + } + prevPosition = mapping.position; + } + + //Console.WriteLine("bla"); + DaqSled1List.Clear(); + foreach (var position in MeasuredPositionList) + { + + if (position.daqchannel > 0 & position.daqchannel < 141) + { + DaqSled1List.Add(position); + } + } + + DaqSled2List.Clear(); + foreach (var position in MeasuredPositionList) + { + + if (position.daqchannel > 200 & position.daqchannel < 241) + { + DaqSled2List.Add(position); + } + } + + DaqSled3List.Clear(); + foreach (var position in MeasuredPositionList) + { + if (position.daqchannel > 300 & position.daqchannel < 341) + { + DaqSled3List.Add(position); + } + } + } + public void HeaderPinsListToDataloggerChannels(List positionList) + { + MeasuredPositionList.Clear(); + Dictionary HeaderMapping = new Dictionary() + { + {1,101 }, + {2,121 }, + {3,102 }, + {4,122 }, + {5,103 }, + {6,123 }, + {7,104 }, + {8,124 }, + {9,105 }, + + }; //headerpin,daqchannel + + foreach (var position in positionList) + { + const int HEADERSIZE = 9; + PslineMapping mapping= new PslineMapping(); + mapping.position = position; + if (position > HEADERSIZE) + { + HeaderMapping.TryGetValue(position - HEADERSIZE, out mapping.daqchannel); + } + else + { + HeaderMapping.TryGetValue(position, out mapping.daqchannel); + } + + + MeasuredPositionList.Add(mapping); + } + + //Console.WriteLine("bla"); + DaqSled1List.Clear(); + foreach (var position in MeasuredPositionList) + { + + if (position.daqchannel > 0 & position.daqchannel < 141) + { + DaqSled1List.Add(position); + } + } + + + } + + public void PositionListToDataloggerChannels() + { + MeasuredPositionList.Clear(); + var positionList = MeasureUserControl.PositionList; + foreach (PslineMapping mapping in pslineMapping) + { + if(positionList.Contains(mapping.position)) + { + MeasuredPositionList.Add(mapping); + } + } + //Console.WriteLine("bla"); + DaqSled1List.Clear(); + foreach (var position in MeasuredPositionList) + { + + if(position.daqchannel > 0 & position.daqchannel < 141) + { + DaqSled1List.Add(position); + } + } + + DaqSled2List.Clear(); + foreach (var position in MeasuredPositionList) + { + + if (position.daqchannel > 200 & position.daqchannel < 241) + { + DaqSled2List.Add(position); + } + } + + DaqSled3List.Clear(); + foreach (var position in MeasuredPositionList) + { + if (position.daqchannel > 300 & position.daqchannel < 341) + { + DaqSled3List.Add(position); + } + } + } + + public void GetPsLineConfigFromJson() + { + string filePath = @"c:\configs\data.json"; + var fileHandler = new FileHandler(filePath); + + pslineConfigs = fileHandler.GetPslineConfig(); + MeasureUserControl.pslineConfigs = pslineConfigs; + MeasureHeaderUsercontrol.pslineConfigs = pslineConfigs; + + } + public void GetPsLineConfigFromCsv() + { + string path = Path.Combine(Directory.GetParent(System.IO.Directory.GetCurrentDirectory()).Parent.Parent.Parent.FullName, "pslineconfig.csv"); + pslineConfigs = File.ReadAllLines(path) + .Skip(1) + .Select(v => PslineConfig.GetPslineConfigFromCsv(v)) + .ToList(); + + MeasureUserControl.pslineConfigs = pslineConfigs; + } + public void GetDefaultPsLineConfig() + { + + pslineConfigs = new List(); + + PslineConfig pc1 = new PslineConfig() + { + Psline = 1, + Description = "vcc1", + Setpoint = 1.00, + Tolerance = 1.00, + Enabled = true + }; + PslineConfig pc2 = new PslineConfig() + { + Psline = 2, + Description = "vcc2", + Setpoint = 1.00, + Tolerance = 1.00, + Enabled = true + }; + PslineConfig pc3 = new PslineConfig() + { + Psline = 3, + Description = "vcc3", + Setpoint = 1.00, + Tolerance = 1.00, + Enabled = true + }; + PslineConfig pc4 = new PslineConfig() + { + Psline = 4, + Description = "vcc4", + Setpoint = 1.00, + Tolerance = 1.00, + Enabled = true + }; + PslineConfig pc5 = new PslineConfig() + { + Psline = 5, + Description = "vcc5", + Setpoint = 1.00, + Tolerance = 1.00, + Enabled = true + }; + PslineConfig pc6 = new PslineConfig() + { + Psline = 6, + Description = "vcc5", + Setpoint = 1.00, + Tolerance = 1.00, + Enabled = false + }; + PslineConfig pc7 = new PslineConfig() + { + Psline = 7, + Description = "vcc7", + Setpoint = 1.00, + Tolerance = 1.00, + Enabled = true + }; + PslineConfig pc8 = new PslineConfig() + { + Psline = 8, + Description = "vcc8", + Setpoint = 1.00, + Tolerance = 1.00, + Enabled = true + }; + PslineConfig pc9 = new PslineConfig() + { + Psline = 9, + Description = "vcc9", + Setpoint = 1.00, + Tolerance = 1.00, + Enabled = true + }; + PslineConfig pc10 = new PslineConfig() + { + Psline = 10, + Description = "vcc10", + Setpoint = 1.00, + Tolerance = 1.00, + Enabled = false + }; + + pslineConfigs.Add(pc1); + pslineConfigs.Add(pc2); + pslineConfigs.Add(pc3); + pslineConfigs.Add(pc4); + pslineConfigs.Add(pc5); + pslineConfigs.Add(pc6); + pslineConfigs.Add(pc7); + pslineConfigs.Add(pc8); + pslineConfigs.Add(pc9); + pslineConfigs.Add(pc10); + + MeasureUserControl.pslineConfigs = pslineConfigs; + + } + private void GetMapping() + { + try + { + //string path = Path.Combine(Directory.GetParent(System.IO.Directory.GetCurrentDirectory()).Parent.Parent.Parent.FullName, "pslinemapping.csv"); + string path = @"c:\configs\pslinemapping.csv"; + pslineMapping = File.ReadAllLines(path) + .Skip(1) + .Select(v => PslineMapping.FromCsv(v)) + .ToList(); + } + catch (Exception) + { + + throw; + } + + } + + + private void Form1_Load(object sender, EventArgs e) + { + + + } + + private void btnInstrument_Click(object sender, EventArgs e) + { + panelRight.Controls[0].Show(); + panelRight.Controls[1].Hide(); + panelRight.Controls[2].Hide(); + panelRight.Controls[3].Hide(); + panelRight.Controls[4].Hide(); + } + + private void btnConfigPslines_Click(object sender, EventArgs e) + { + panelRight.Controls[1].Show(); + panelRight.Controls[0].Hide(); + panelRight.Controls[2].Hide(); + panelRight.Controls[3].Hide(); + panelRight.Controls[4].Hide(); + + PslineConfigUserControl.OnUpdateBtnClick(EventArgs.Empty); + + } + + private void btnMeasure_Click(object sender, EventArgs e) + { + panelRight.Controls[2].Show(); + panelRight.Controls[0].Hide(); + panelRight.Controls[1].Hide(); + panelRight.Controls[3].Hide(); + panelRight.Controls[4].Hide(); + } + + private void btn_MeasureHeader_Click(object sender, EventArgs e) + { + panelRight.Controls[3].Show(); + panelRight.Controls[0].Hide(); + panelRight.Controls[1].Hide(); + panelRight.Controls[2].Hide(); + panelRight.Controls[4].Hide(); + MeasureHeaderUsercontrol.PopulateMeasureHeader(); + + } + + private void btnDMM_Click(object sender, EventArgs e) + { + panelRight.Controls[4].Show(); + panelRight.Controls[0].Hide(); + panelRight.Controls[1].Hide(); + panelRight.Controls[2].Hide(); + panelRight.Controls[3].Hide(); + } + } +} diff --git a/daq_testing/MainForm.resx b/daq_testing/MainForm.resx new file mode 100644 index 0000000..1af7de1 --- /dev/null +++ b/daq_testing/MainForm.resx @@ -0,0 +1,120 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 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/daq_testing/MeasuredPosition.cs b/daq_testing/MeasuredPosition.cs new file mode 100644 index 0000000..89616e6 --- /dev/null +++ b/daq_testing/MeasuredPosition.cs @@ -0,0 +1,20 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace daq_testing +{ + public class MeasuredPosition + { + public int Position { get; set; } + public int PsLine { get; set; } + public int DaqChannel { get; set; } + + public MeasuredPosition() + { + + } + } +} diff --git a/daq_testing/OpenTK.dll.config b/daq_testing/OpenTK.dll.config new file mode 100644 index 0000000..7098d39 --- /dev/null +++ b/daq_testing/OpenTK.dll.config @@ -0,0 +1,25 @@ + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/daq_testing/Program.cs b/daq_testing/Program.cs new file mode 100644 index 0000000..b2835df --- /dev/null +++ b/daq_testing/Program.cs @@ -0,0 +1,22 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Threading.Tasks; +using System.Windows.Forms; + +namespace daq_testing +{ + static class Program + { + /// + /// The main entry point for the application. + /// + [STAThread] + static void Main() + { + Application.EnableVisualStyles(); + Application.SetCompatibleTextRenderingDefault(false); + Application.Run(new MainForm()); + } + } +} diff --git a/daq_testing/Properties/AssemblyInfo.cs b/daq_testing/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..646e84d --- /dev/null +++ b/daq_testing/Properties/AssemblyInfo.cs @@ -0,0 +1,36 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("daq_testing")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("daq_testing")] +[assembly: AssemblyCopyright("Copyright © 2024")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(false)] + +// The following GUID is for the ID of the typelib if this project is exposed to COM +[assembly: Guid("f871696a-881e-4edb-bc23-ec1dcba11a5a")] + +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +// You can specify all the values or you can default the Build and Revision Numbers +// by using the '*' as shown below: +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/daq_testing/Properties/Resources.Designer.cs b/daq_testing/Properties/Resources.Designer.cs new file mode 100644 index 0000000..fccb610 --- /dev/null +++ b/daq_testing/Properties/Resources.Designer.cs @@ -0,0 +1,70 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Runtime Version:4.0.30319.42000 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + + +namespace daq_testing.Properties +{ + /// + /// A strongly-typed resource class, for looking up localized strings, etc. + /// + // This class was auto-generated by the StronglyTypedResourceBuilder + // class via a tool like ResGen or Visual Studio. + // To add or remove a member, edit your .ResX file then rerun ResGen + // with the /str option, or rebuild your VS project. + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + internal class Resources + { + + private static global::System.Resources.ResourceManager resourceMan; + + private static global::System.Globalization.CultureInfo resourceCulture; + + [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] + internal Resources() + { + } + + /// + /// Returns the cached ResourceManager instance used by this class. + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Resources.ResourceManager ResourceManager + { + get + { + if ((resourceMan == null)) + { + global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("daq_testing.Properties.Resources", typeof(Resources).Assembly); + resourceMan = temp; + } + return resourceMan; + } + } + + /// + /// Overrides the current thread's CurrentUICulture property for all + /// resource lookups using this strongly typed resource class. + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Globalization.CultureInfo Culture + { + get + { + return resourceCulture; + } + set + { + resourceCulture = value; + } + } + } +} diff --git a/daq_testing/Properties/Resources.resx b/daq_testing/Properties/Resources.resx new file mode 100644 index 0000000..af7dbeb --- /dev/null +++ b/daq_testing/Properties/Resources.resx @@ -0,0 +1,117 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file diff --git a/daq_testing/Properties/Settings.Designer.cs b/daq_testing/Properties/Settings.Designer.cs new file mode 100644 index 0000000..9e1b7b7 --- /dev/null +++ b/daq_testing/Properties/Settings.Designer.cs @@ -0,0 +1,29 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Runtime Version:4.0.30319.42000 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + + +namespace daq_testing.Properties +{ + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0")] + internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase + { + + private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); + + public static Settings Default + { + get + { + return defaultInstance; + } + } + } +} diff --git a/daq_testing/Properties/Settings.settings b/daq_testing/Properties/Settings.settings new file mode 100644 index 0000000..3964565 --- /dev/null +++ b/daq_testing/Properties/Settings.settings @@ -0,0 +1,7 @@ + + + + + + + diff --git a/daq_testing/PslineConfig.cs b/daq_testing/PslineConfig.cs new file mode 100644 index 0000000..4c0e1c8 --- /dev/null +++ b/daq_testing/PslineConfig.cs @@ -0,0 +1,38 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace daq_testing +{ + public class PslineConfig + { + public int Psline { get; set; } + public string Description { get; set; } + public double Setpoint { get; set; } + public double Tolerance { get; set; } + public bool Enabled { get; set; } + + + public PslineConfig() + { + + } + + public static PslineConfig GetPslineConfigFromCsv(string csvLine) + { + string[] values = csvLine.Split(','); + PslineConfig pslineConfig = new PslineConfig (); + pslineConfig.Psline = Convert.ToInt16(values[0]); + pslineConfig.Description = Convert.ToString(values[1]); + pslineConfig.Setpoint = Convert.ToDouble(values[2]); + pslineConfig.Tolerance = Convert.ToDouble(values[3]); + pslineConfig.Enabled = Convert.ToBoolean(values[4]); + return pslineConfig; + + } + + } +} diff --git a/daq_testing/PslineMapping.cs b/daq_testing/PslineMapping.cs new file mode 100644 index 0000000..469ea9a --- /dev/null +++ b/daq_testing/PslineMapping.cs @@ -0,0 +1,25 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace daq_testing +{ + public class PslineMapping + { + public int position; + public int psline; + public int daqchannel; + + public static PslineMapping FromCsv(string csvLine) + { + string[] values = csvLine.Split(','); + PslineMapping pslineMapping = new PslineMapping(); + pslineMapping.position = Convert.ToInt16(values[0]); + pslineMapping.psline = Convert.ToInt16(values[1]); + pslineMapping.daqchannel = Convert.ToInt16(values[2]); + return pslineMapping; + } + } +} diff --git a/daq_testing/Result.cs b/daq_testing/Result.cs new file mode 100644 index 0000000..f5791ff --- /dev/null +++ b/daq_testing/Result.cs @@ -0,0 +1,32 @@ +using System; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace daq_testing +{ + public class Result + { + public int ID { get; set; } + public DateTime TimeStamp { get; set; } + public int PsLine { get; set; } + public string Description { get; set; } + public int Position { get; set; } + public double Value { get; set; } + public string MeasureLocation { get; set; } + + public string DriverID { get; set; } + public int BiB { get; set; } + + public Result() + { + + } + + + } + + +} diff --git a/daq_testing/UserControlDMM.Designer.cs b/daq_testing/UserControlDMM.Designer.cs new file mode 100644 index 0000000..a4ef149 --- /dev/null +++ b/daq_testing/UserControlDMM.Designer.cs @@ -0,0 +1,100 @@ + +namespace daq_testing +{ + partial class UserControlDMM + { + /// + /// 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 Component Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + this.lbMeasurementValue = new System.Windows.Forms.Label(); + this.btnMonitor = new System.Windows.Forms.Button(); + this.formsPlot1 = new ScottPlot.WinForms.FormsPlot(); + this.tbDataloggerChannel = new System.Windows.Forms.TextBox(); + this.SuspendLayout(); + // + // lbMeasurementValue + // + this.lbMeasurementValue.AutoSize = true; + this.lbMeasurementValue.Font = new System.Drawing.Font("Courier New", 48F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.lbMeasurementValue.Location = new System.Drawing.Point(65, 32); + this.lbMeasurementValue.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + this.lbMeasurementValue.Name = "lbMeasurementValue"; + this.lbMeasurementValue.Size = new System.Drawing.Size(325, 85); + this.lbMeasurementValue.TabIndex = 0; + this.lbMeasurementValue.Text = "0.0000"; + // + // btnMonitor + // + this.btnMonitor.Location = new System.Drawing.Point(609, 559); + this.btnMonitor.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); + this.btnMonitor.Name = "btnMonitor"; + this.btnMonitor.Size = new System.Drawing.Size(199, 86); + this.btnMonitor.TabIndex = 1; + this.btnMonitor.Text = "Monitor"; + this.btnMonitor.UseVisualStyleBackColor = true; + this.btnMonitor.Click += new System.EventHandler(this.btnMonitor_ClickAsync); + // + // formsPlot1 + // + this.formsPlot1.DisplayScale = 0F; + this.formsPlot1.Location = new System.Drawing.Point(59, 134); + this.formsPlot1.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); + this.formsPlot1.Name = "formsPlot1"; + this.formsPlot1.Size = new System.Drawing.Size(749, 391); + this.formsPlot1.TabIndex = 2; + // + // tbDataloggerChannel + // + this.tbDataloggerChannel.Location = new System.Drawing.Point(921, 48); + this.tbDataloggerChannel.Name = "tbDataloggerChannel"; + this.tbDataloggerChannel.Size = new System.Drawing.Size(100, 22); + this.tbDataloggerChannel.TabIndex = 3; + this.tbDataloggerChannel.Text = "101"; + // + // UserControlDMM + // + this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 16F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.Controls.Add(this.tbDataloggerChannel); + this.Controls.Add(this.formsPlot1); + this.Controls.Add(this.btnMonitor); + this.Controls.Add(this.lbMeasurementValue); + this.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); + this.Name = "UserControlDMM"; + this.Size = new System.Drawing.Size(1167, 682); + this.ResumeLayout(false); + this.PerformLayout(); + + } + + #endregion + + private System.Windows.Forms.Label lbMeasurementValue; + private System.Windows.Forms.Button btnMonitor; + private ScottPlot.WinForms.FormsPlot formsPlot1; + private System.Windows.Forms.TextBox tbDataloggerChannel; + } +} diff --git a/daq_testing/UserControlDMM.cs b/daq_testing/UserControlDMM.cs new file mode 100644 index 0000000..bc43367 --- /dev/null +++ b/daq_testing/UserControlDMM.cs @@ -0,0 +1,159 @@ +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; +using ScottPlot; +using System.Diagnostics; + + +namespace daq_testing +{ + public partial class UserControlDMM : UserControl + { + public double MeasurementValue { get; set; } + + // Control variables + private bool isMonitoring = false; + private List dataPoints = new List(); + private List timePoints = new List(); + private double time = 0; + private const int MaxPoints = 100; + + // Tolerance band values + private double UpperTolerance = 1.0; + private double LowerTolerance = -1.0; + + // Histogram parameters + private int NumBins = 20; // Number of bins for the histogram + private double MaxVoltage = 1; // Maximum possible voltage for histogram scaling + private double MinVoltage = -1; // Minimum possible voltage for histogram scaling + + public UserControlDMM() + { + InitializeComponent(); + + // Initialize the graph + formsPlot1.Plot.Title("Real-Time Voltage"); + formsPlot1.Plot.YLabel("Voltage (V)"); + formsPlot1.Plot.XLabel("Time (s)"); + formsPlot1.Refresh(); + + // Set up the tolerance band once + UpdateToleranceBand(); + + } + private void UpdateToleranceBand() + { + // Generate tolerance band data + double[] xs = new double[MaxPoints]; + double[] upperValues = new double[MaxPoints]; + double[] lowerValues = new double[MaxPoints]; + + for (int i = 0; i < MaxPoints; i++) + { + xs[i] = i; + upperValues[i] = UpperTolerance; + lowerValues[i] = LowerTolerance; + } + + // Add the tolerance band as a shaded region between lower and upper bounds + var fill = formsPlot1.Plot.Add.FillY( + xs: xs, + ys1: lowerValues, + ys2: upperValues + ); + fill.FillColor = Colors.Green.WithAlpha(20); + fill.LineColor = Colors.Green; + fill.MarkerColor = Colors.Green; + fill.LineWidth = 1; + + } + + + + private async void btnMonitor_ClickAsync(object sender, EventArgs e) + { + var mainForm = this.FindForm() as MainForm; + if (mainForm == null) return; + + formsPlot1.Plot.Clear(); + dataPoints.Clear(); + timePoints.Clear(); + + // Toggle the monitoring state + isMonitoring = !isMonitoring; + + if (isMonitoring) + { + // Change button text to indicate stopping + btnMonitor.Text = "Stop Monitoring"; + + // Start the monitoring configuration + mainForm.DAQ.DAQInstrument.Voltage.DCVoltage.AutoRangeListConfig(tbDataloggerChannel.Text, true); + mainForm.DAQ.DAQInstrument.Voltage.DCVoltage.Configure(tbDataloggerChannel.Text, 10, 0.01); + mainForm.DAQ.DAQInstrument.Route.Monitor = Convert.ToInt32(tbDataloggerChannel.Text); + mainForm.DAQ.DAQInstrument.Route.MonitorEnable = true; + + Stopwatch sw = new Stopwatch(); + + // Start the loop + while (isMonitoring) + { + + sw.Start(); + // Get the voltage value + double voltage = mainForm.DAQ.DAQInstrument.Route.MonitorData; + + // Update the Label + lbMeasurementValue.Text = $"{voltage:F3} V"; + + // Update the data points + dataPoints.Add(voltage); + timePoints.Add(time); + + if (dataPoints.Count > 100) // Limit to 100 points for better performance + { + dataPoints.RemoveAt(0); + timePoints.RemoveAt(0); + } + + // Clear previous plots + formsPlot1.Plot.Clear(); + + // Re-add the tolerance band + // UpdateToleranceBand(); + // Update the histogram and plot + + // Add the updated scatter plot + formsPlot1.Plot.Add.ScatterPoints(timePoints.ToArray(), dataPoints.ToArray()); + + // Autoscroll: Set X-axis to show the latest MaxPoints data + formsPlot1.Plot.Axes.SetLimits(timePoints[0], timePoints[timePoints.Count - 1]); + + + // Refresh the plot + formsPlot1.Refresh(); + + // Increment time + time += 0.100; + + // Wait asynchronously for 100 ms + await Task.Delay(100); + } + } + else + { + // Change button text to indicate starting + btnMonitor.Text = "Start Monitoring"; + + // Stop the monitoring + mainForm.DAQ.DAQInstrument.Route.MonitorEnable = false; + } + } + } +} diff --git a/daq_testing/UserControlDMM.resx b/daq_testing/UserControlDMM.resx new file mode 100644 index 0000000..1af7de1 --- /dev/null +++ b/daq_testing/UserControlDMM.resx @@ -0,0 +1,120 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 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/daq_testing/UserControlInstrument.Designer.cs b/daq_testing/UserControlInstrument.Designer.cs new file mode 100644 index 0000000..04f58dd --- /dev/null +++ b/daq_testing/UserControlInstrument.Designer.cs @@ -0,0 +1,140 @@ + +namespace daq_testing +{ + partial class UserControlInstrument + { + /// + /// 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 Component Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(UserControlInstrument)); + this.label1 = new System.Windows.Forms.Label(); + this.label2 = new System.Windows.Forms.Label(); + this.tbVisaAddress = new System.Windows.Forms.TextBox(); + this.btnConnectInstrument = new System.Windows.Forms.Button(); + this.pictureBox1 = new System.Windows.Forms.PictureBox(); + this.cmbComPorts = new System.Windows.Forms.ComboBox(); + this.btnSearch = new System.Windows.Forms.Button(); + ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit(); + this.SuspendLayout(); + // + // label1 + // + this.label1.AutoSize = true; + this.label1.Location = new System.Drawing.Point(23, 22); + this.label1.Name = "label1"; + this.label1.Size = new System.Drawing.Size(59, 13); + this.label1.TabIndex = 0; + this.label1.Text = "Datalogger"; + // + // label2 + // + this.label2.AutoSize = true; + this.label2.Location = new System.Drawing.Point(23, 74); + this.label2.Name = "label2"; + this.label2.Size = new System.Drawing.Size(68, 13); + this.label2.TabIndex = 1; + this.label2.Text = "VisaAddress:"; + // + // tbVisaAddress + // + this.tbVisaAddress.Location = new System.Drawing.Point(98, 74); + this.tbVisaAddress.Name = "tbVisaAddress"; + this.tbVisaAddress.Size = new System.Drawing.Size(159, 20); + this.tbVisaAddress.TabIndex = 2; + this.tbVisaAddress.Text = "Search for Comport"; + // + // btnConnectInstrument + // + this.btnConnectInstrument.Location = new System.Drawing.Point(182, 120); + this.btnConnectInstrument.Name = "btnConnectInstrument"; + this.btnConnectInstrument.Size = new System.Drawing.Size(75, 23); + this.btnConnectInstrument.TabIndex = 3; + this.btnConnectInstrument.Text = "CONNECT"; + this.btnConnectInstrument.UseVisualStyleBackColor = true; + this.btnConnectInstrument.Click += new System.EventHandler(this.btnConnectInstrument_Click); + // + // pictureBox1 + // + this.pictureBox1.Image = ((System.Drawing.Image)(resources.GetObject("pictureBox1.Image"))); + this.pictureBox1.InitialImage = null; + this.pictureBox1.Location = new System.Drawing.Point(52, 170); + this.pictureBox1.Margin = new System.Windows.Forms.Padding(2); + this.pictureBox1.Name = "pictureBox1"; + this.pictureBox1.Size = new System.Drawing.Size(205, 102); + this.pictureBox1.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage; + this.pictureBox1.TabIndex = 4; + this.pictureBox1.TabStop = false; + // + // cmbComPorts + // + this.cmbComPorts.FormattingEnabled = true; + this.cmbComPorts.Location = new System.Drawing.Point(98, 47); + this.cmbComPorts.Name = "cmbComPorts"; + this.cmbComPorts.Size = new System.Drawing.Size(159, 21); + this.cmbComPorts.TabIndex = 5; + this.cmbComPorts.SelectedIndexChanged += new System.EventHandler(this.cmbComPorts_SelectedIndexChanged); + // + // btnSearch + // + this.btnSearch.Location = new System.Drawing.Point(285, 47); + this.btnSearch.Name = "btnSearch"; + this.btnSearch.Size = new System.Drawing.Size(75, 23); + this.btnSearch.TabIndex = 6; + this.btnSearch.Text = "Search"; + this.btnSearch.UseVisualStyleBackColor = true; + this.btnSearch.Click += new System.EventHandler(this.btnSearch_Click); + // + // UserControlInstrument + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.Controls.Add(this.btnSearch); + this.Controls.Add(this.cmbComPorts); + this.Controls.Add(this.pictureBox1); + this.Controls.Add(this.btnConnectInstrument); + this.Controls.Add(this.tbVisaAddress); + this.Controls.Add(this.label2); + this.Controls.Add(this.label1); + this.Name = "UserControlInstrument"; + this.Size = new System.Drawing.Size(371, 303); + this.Load += new System.EventHandler(this.UserControlInstrument_Load); + ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit(); + this.ResumeLayout(false); + this.PerformLayout(); + + } + + #endregion + + private System.Windows.Forms.Label label1; + private System.Windows.Forms.Label label2; + private System.Windows.Forms.TextBox tbVisaAddress; + private System.Windows.Forms.Button btnConnectInstrument; + private System.Windows.Forms.PictureBox pictureBox1; + private System.Windows.Forms.ComboBox cmbComPorts; + private System.Windows.Forms.Button btnSearch; + } +} diff --git a/daq_testing/UserControlInstrument.cs b/daq_testing/UserControlInstrument.cs new file mode 100644 index 0000000..c9cb239 --- /dev/null +++ b/daq_testing/UserControlInstrument.cs @@ -0,0 +1,93 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.IO.Ports; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Forms; + +namespace daq_testing +{ + public partial class UserControlInstrument : UserControl + { + public event EventHandler InstrumentConnectButtonClicked; + public string VisaAddress { get => tbVisaAddress.Text; set => VisaAddress = value; } + + + private protected void OnInsturmentConnectButtonClicked ( EventArgs e) + { + InstrumentConnectButtonClicked?.Invoke(this, e); + } + + public UserControlInstrument() + { + InitializeComponent(); +#if DEBUG + btnConnectInstrument.Enabled = true; +#else + btnConnectInstrument.Enabled = false; +#endif + } + + // Load available COM ports into ComboBox + private void LoadComPorts() + { + string[] ports = SerialPort.GetPortNames(); + cmbComPorts.Items.Clear(); + foreach (string port in ports) + { + cmbComPorts.Items.Add(port); + } + if (cmbComPorts.Items.Count > 0) + { + cmbComPorts.SelectedIndex = 0; + } + } + + + + private void UserControlInstrument_Load(object sender, EventArgs e) + { + + } + + private void btnConnectInstrument_Click(object sender, EventArgs e) + { + OnInsturmentConnectButtonClicked(EventArgs.Empty); + } + + public void SetConnectButtonActive() + { + btnConnectInstrument.BackColor = Color.Green; + } + + public void SetConnectButtonNonActive() + { + btnConnectInstrument.BackColor = Color.Red; + } + + private void btnSearch_Click(object sender, EventArgs e) + { + LoadComPorts(); + } + + private void cmbComPorts_SelectedIndexChanged(object sender, EventArgs e) + { + if (cmbComPorts.SelectedItem != null) + { + string selectedPort = cmbComPorts.SelectedItem.ToString(); + string address = $"ASRL{selectedPort.Substring(3)}::INSTR"; + Console.WriteLine(address); + tbVisaAddress.Text = address; + btnConnectInstrument.Enabled = true; + } + else + { + MessageBox.Show("Please select a COM port.", "No COM Port Selected", MessageBoxButtons.OK, MessageBoxIcon.Warning); + } + } + } +} diff --git a/daq_testing/UserControlInstrument.resx b/daq_testing/UserControlInstrument.resx new file mode 100644 index 0000000..0b31ec7 --- /dev/null +++ b/daq_testing/UserControlInstrument.resx @@ -0,0 +1,519 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 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 + + + + + /9j/4AAQSkZJRgABAQEASABIAAD/2wBDAAgGBgcGBQgHBwcJCQgK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POMgecdJLXduIVsaTW5J9/I4uunSq70eMXk9T29YKvaVIKOq1ieZ3scy3sNPGq7+ZErZ2 + FdPDT0ktGdlW12NYvtpfxZ51suticqb/ACdV6j0Le3+juzpcc0mv9zJVaG5eq0MWRlXOjMR8wLdP+sqP + rO2sfmI4mn/WNL1nbWPzESDa09S+ixSZfiaFRJBJAInNRjkkxq8m6m7ySANubzIrUKs1mnRnNdqWniX7 + G3jVm5VFmEeXay7tK/haW8kpqNVrzI4JbJNo106kqEsV6dSl3zXmv2l2D14GXb3VG9oaOM8pKcWufejW + NKyv/JM/epw36Odca6x9g2X7gzk+YEfmZBQBAAkhgAUTXmt66GvqPM21qnzNkYVxaU5yco5hLtg8AYrj + FppxWr3npxfaW4W9vTio06NOCXBRj35K5Wk0/wANW94jyWp9LV94aLiedXy4sxbOO/eXNZawqVW4vtWE + i67JS+e5z7pSePAyaNHca7louwDLhoXMluCwi4uAEggnIAiMlFyTeMxWO/UkpnFTjhrQC3OnCc96UIuW + HHL7HxRbpW1GhLepUowbWG0uK7+0t1KdWL8ytUS7M5LWLlf28/BDaMidrQqV1XnSjKosJSfdw8CnaM18 + H14tpOcXFet8izi4enXz8EUeTyclKblOS4OTy16iKqs4bkEsYaSyZ6e64yfBSTZj0obqSMlcC4iZvV4e + j5mJKwtJTnOVvTcpvLbWuf4E1aMk26dScO5PQsSV0v7xPwQEvZNi61Kp5PBOlvbiXBZxl49iM+L1/ea1 + eVfTz8ERKnVqLFWrOa7M4Q0WqKU725qJ5jOq3FrmbWnwMOlR3OSS7jMitCQXEySlaEookpZIAxKzUZ1I + 51cYtd6NfcW9C5UVXpRmovMc8mbetShWhuzWVya4r1GuqWdSLe5XqJdmjAxHs6yct/yampbrjlLGhNCy + tLaanQoU6UlHdW4saF129f6aXuohUK/Drpe6hopvXmyqR4OeIrveUZVpHdjjsLMbXE95uUpcpSecGZRh + urGMATWe7CE28RjUi23yWSxOTU20+ehmpJrDSaaw0zBrWLTzRq1Ka7E8r7QMSFh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V + aKfIwp2ib4G3cclDpoDVRtEnwMulQUeRldUipQwBQoJIoqU01wMjBDiBralsm+BbVos8DaOHcOrXYBhU + rdLkZcIJFahgqSwAUUMIkARhDCJAEYQwiQBGEMIkARhDCJAEYQwiQBGEMIkARhDCJAEYQwiQBGEMIkAR + hDCJAEYQcUSALFSCa4GFWt1LkbJoolTTA0krJN8C5TtEnwNp1KJVJICxSopLgX+rWC4o4JwBhVaClyMK + dom+BuXHJQ6SA1MLNJ8DMo0FHkZSpLsK1DAFtU1gtVaKaMvBS45A09W0TfAtKyWeBunSTKepQGBRtVHk + Z0KSSLkaaXIrUQLE6aaMCtbKXI2ziW5U0wNG7LXgXqVok+Bs+pXYVKkkBZpUUlwLrprBdUcE7oGvrW6l + yMOVmm+BunDJR1S7ANVTs0nwM2lQS5GSqS7CtQwBEIJFeEEsEgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD//2Q== + + + \ No newline at end of file diff --git a/daq_testing/UserControlMeasure.Designer.cs b/daq_testing/UserControlMeasure.Designer.cs new file mode 100644 index 0000000..fee55f6 --- /dev/null +++ b/daq_testing/UserControlMeasure.Designer.cs @@ -0,0 +1,1200 @@ + +namespace daq_testing +{ + partial class UserControlMeasure + { + /// + /// 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 Component Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + this.flowLayoutPanelPositionButtons = new System.Windows.Forms.FlowLayoutPanel(); + this.checkBox1 = new System.Windows.Forms.CheckBox(); + this.checkBox2 = new System.Windows.Forms.CheckBox(); + this.checkBox3 = new System.Windows.Forms.CheckBox(); + this.checkBox4 = new System.Windows.Forms.CheckBox(); + this.checkBox5 = new System.Windows.Forms.CheckBox(); + this.checkBox6 = new System.Windows.Forms.CheckBox(); + this.checkBox7 = new System.Windows.Forms.CheckBox(); + this.checkBox8 = new System.Windows.Forms.CheckBox(); + this.checkBox9 = new System.Windows.Forms.CheckBox(); + this.checkBox10 = new System.Windows.Forms.CheckBox(); + this.checkBox11 = new System.Windows.Forms.CheckBox(); + this.checkBox12 = new System.Windows.Forms.CheckBox(); + this.checkBox13 = new System.Windows.Forms.CheckBox(); + this.checkBox14 = new System.Windows.Forms.CheckBox(); + this.checkBox15 = new System.Windows.Forms.CheckBox(); + this.checkBox16 = new System.Windows.Forms.CheckBox(); + this.checkBox17 = new System.Windows.Forms.CheckBox(); + this.checkBox18 = new System.Windows.Forms.CheckBox(); + this.checkBox19 = new System.Windows.Forms.CheckBox(); + this.checkBox20 = new System.Windows.Forms.CheckBox(); + this.checkBox21 = new System.Windows.Forms.CheckBox(); + this.checkBox22 = new System.Windows.Forms.CheckBox(); + this.checkBox23 = new System.Windows.Forms.CheckBox(); + this.checkBox24 = new System.Windows.Forms.CheckBox(); + this.checkBox25 = new System.Windows.Forms.CheckBox(); + this.checkBox26 = new System.Windows.Forms.CheckBox(); + this.checkBox27 = new System.Windows.Forms.CheckBox(); + this.checkBox28 = new System.Windows.Forms.CheckBox(); + this.checkBox29 = new System.Windows.Forms.CheckBox(); + this.checkBox30 = new System.Windows.Forms.CheckBox(); + this.checkBox31 = new System.Windows.Forms.CheckBox(); + this.checkBox32 = new System.Windows.Forms.CheckBox(); + this.checkBox33 = new System.Windows.Forms.CheckBox(); + this.checkBox34 = new System.Windows.Forms.CheckBox(); + this.checkBox35 = new System.Windows.Forms.CheckBox(); + this.checkBox36 = new System.Windows.Forms.CheckBox(); + this.checkBox37 = new System.Windows.Forms.CheckBox(); + this.checkBox38 = new System.Windows.Forms.CheckBox(); + this.checkBox39 = new System.Windows.Forms.CheckBox(); + this.checkBox40 = new System.Windows.Forms.CheckBox(); + this.label1 = new System.Windows.Forms.Label(); + this.label2 = new System.Windows.Forms.Label(); + this.label3 = new System.Windows.Forms.Label(); + this.tbProjectNumber = new System.Windows.Forms.TextBox(); + this.tbSub = new System.Windows.Forms.TextBox(); + this.label4 = new System.Windows.Forms.Label(); + this.label5 = new System.Windows.Forms.Label(); + this.tbStep = new System.Windows.Forms.TextBox(); + this.tbDriverID = new System.Windows.Forms.TextBox(); + this.tbBibID = new System.Windows.Forms.TextBox(); + this.label6 = new System.Windows.Forms.Label(); + this.lbLocation = new System.Windows.Forms.ListBox(); + this.button1 = new System.Windows.Forms.Button(); + this.btnRow1 = new System.Windows.Forms.CheckBox(); + this.btnRow2 = new System.Windows.Forms.CheckBox(); + this.btnRow3 = new System.Windows.Forms.CheckBox(); + this.btnRow4 = new System.Windows.Forms.CheckBox(); + this.btnRow5 = new System.Windows.Forms.CheckBox(); + this.btnCol1 = new System.Windows.Forms.CheckBox(); + this.bntCol2 = new System.Windows.Forms.CheckBox(); + this.btnCol3 = new System.Windows.Forms.CheckBox(); + this.btnCol4 = new System.Windows.Forms.CheckBox(); + this.btnCol5 = new System.Windows.Forms.CheckBox(); + this.btnCol6 = new System.Windows.Forms.CheckBox(); + this.btnCol7 = new System.Windows.Forms.CheckBox(); + this.btnCol8 = new System.Windows.Forms.CheckBox(); + this.btnAll = new System.Windows.Forms.CheckBox(); + this.lvRow1Front = new System.Windows.Forms.ListView(); + this.item0 = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader())); + this.lvRow2Front = new System.Windows.Forms.ListView(); + this.columnHeader1 = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader())); + this.lvRow3Front = new System.Windows.Forms.ListView(); + this.columnHeader2 = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader())); + this.lvRow4Front = new System.Windows.Forms.ListView(); + this.columnHeader3 = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader())); + this.lvRow5Front = new System.Windows.Forms.ListView(); + this.columnHeader4 = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader())); + this.lvRow1Back = new System.Windows.Forms.ListView(); + this.columnHeader5 = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader())); + this.lvRow2Back = new System.Windows.Forms.ListView(); + this.columnHeader6 = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader())); + this.lvRow3Back = new System.Windows.Forms.ListView(); + this.columnHeader7 = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader())); + this.lvRow4Back = new System.Windows.Forms.ListView(); + this.columnHeader8 = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader())); + this.lvRow5Back = new System.Windows.Forms.ListView(); + this.columnHeader9 = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader())); + this.btnSaveToExcel = new System.Windows.Forms.Button(); + this.btnMeasure = new System.Windows.Forms.Button(); + this.progressBar = new System.Windows.Forms.ProgressBar(); + this.flowLayoutPanelPositionButtons.SuspendLayout(); + this.SuspendLayout(); + // + // flowLayoutPanelPositionButtons + // + this.flowLayoutPanelPositionButtons.Controls.Add(this.checkBox1); + this.flowLayoutPanelPositionButtons.Controls.Add(this.checkBox2); + this.flowLayoutPanelPositionButtons.Controls.Add(this.checkBox3); + this.flowLayoutPanelPositionButtons.Controls.Add(this.checkBox4); + this.flowLayoutPanelPositionButtons.Controls.Add(this.checkBox5); + this.flowLayoutPanelPositionButtons.Controls.Add(this.checkBox6); + this.flowLayoutPanelPositionButtons.Controls.Add(this.checkBox7); + this.flowLayoutPanelPositionButtons.Controls.Add(this.checkBox8); + this.flowLayoutPanelPositionButtons.Controls.Add(this.checkBox9); + this.flowLayoutPanelPositionButtons.Controls.Add(this.checkBox10); + this.flowLayoutPanelPositionButtons.Controls.Add(this.checkBox11); + this.flowLayoutPanelPositionButtons.Controls.Add(this.checkBox12); + this.flowLayoutPanelPositionButtons.Controls.Add(this.checkBox13); + this.flowLayoutPanelPositionButtons.Controls.Add(this.checkBox14); + this.flowLayoutPanelPositionButtons.Controls.Add(this.checkBox15); + this.flowLayoutPanelPositionButtons.Controls.Add(this.checkBox16); + this.flowLayoutPanelPositionButtons.Controls.Add(this.checkBox17); + this.flowLayoutPanelPositionButtons.Controls.Add(this.checkBox18); + this.flowLayoutPanelPositionButtons.Controls.Add(this.checkBox19); + this.flowLayoutPanelPositionButtons.Controls.Add(this.checkBox20); + this.flowLayoutPanelPositionButtons.Controls.Add(this.checkBox21); + this.flowLayoutPanelPositionButtons.Controls.Add(this.checkBox22); + this.flowLayoutPanelPositionButtons.Controls.Add(this.checkBox23); + this.flowLayoutPanelPositionButtons.Controls.Add(this.checkBox24); + this.flowLayoutPanelPositionButtons.Controls.Add(this.checkBox25); + this.flowLayoutPanelPositionButtons.Controls.Add(this.checkBox26); + this.flowLayoutPanelPositionButtons.Controls.Add(this.checkBox27); + this.flowLayoutPanelPositionButtons.Controls.Add(this.checkBox28); + this.flowLayoutPanelPositionButtons.Controls.Add(this.checkBox29); + this.flowLayoutPanelPositionButtons.Controls.Add(this.checkBox30); + this.flowLayoutPanelPositionButtons.Controls.Add(this.checkBox31); + this.flowLayoutPanelPositionButtons.Controls.Add(this.checkBox32); + this.flowLayoutPanelPositionButtons.Controls.Add(this.checkBox33); + this.flowLayoutPanelPositionButtons.Controls.Add(this.checkBox34); + this.flowLayoutPanelPositionButtons.Controls.Add(this.checkBox35); + this.flowLayoutPanelPositionButtons.Controls.Add(this.checkBox36); + this.flowLayoutPanelPositionButtons.Controls.Add(this.checkBox37); + this.flowLayoutPanelPositionButtons.Controls.Add(this.checkBox38); + this.flowLayoutPanelPositionButtons.Controls.Add(this.checkBox39); + this.flowLayoutPanelPositionButtons.Controls.Add(this.checkBox40); + this.flowLayoutPanelPositionButtons.Location = new System.Drawing.Point(497, 100); + this.flowLayoutPanelPositionButtons.Name = "flowLayoutPanelPositionButtons"; + this.flowLayoutPanelPositionButtons.Size = new System.Drawing.Size(569, 599); + this.flowLayoutPanelPositionButtons.TabIndex = 0; + // + // checkBox1 + // + this.checkBox1.Appearance = System.Windows.Forms.Appearance.Button; + this.checkBox1.Location = new System.Drawing.Point(3, 3); + this.checkBox1.Name = "checkBox1"; + this.checkBox1.Size = new System.Drawing.Size(63, 112); + this.checkBox1.TabIndex = 14; + this.checkBox1.Text = "checkBox1"; + this.checkBox1.UseVisualStyleBackColor = true; + // + // checkBox2 + // + this.checkBox2.Appearance = System.Windows.Forms.Appearance.Button; + this.checkBox2.Location = new System.Drawing.Point(72, 3); + this.checkBox2.Name = "checkBox2"; + this.checkBox2.Size = new System.Drawing.Size(63, 112); + this.checkBox2.TabIndex = 15; + this.checkBox2.Text = "checkBox2"; + this.checkBox2.UseVisualStyleBackColor = true; + // + // checkBox3 + // + this.checkBox3.Appearance = System.Windows.Forms.Appearance.Button; + this.checkBox3.Location = new System.Drawing.Point(141, 3); + this.checkBox3.Name = "checkBox3"; + this.checkBox3.Size = new System.Drawing.Size(63, 112); + this.checkBox3.TabIndex = 16; + this.checkBox3.Text = "checkBox3"; + this.checkBox3.UseVisualStyleBackColor = true; + // + // checkBox4 + // + this.checkBox4.Appearance = System.Windows.Forms.Appearance.Button; + this.checkBox4.Location = new System.Drawing.Point(210, 3); + this.checkBox4.Name = "checkBox4"; + this.checkBox4.Size = new System.Drawing.Size(63, 112); + this.checkBox4.TabIndex = 17; + this.checkBox4.Text = "checkBox4"; + this.checkBox4.UseVisualStyleBackColor = true; + // + // checkBox5 + // + this.checkBox5.Appearance = System.Windows.Forms.Appearance.Button; + this.checkBox5.Location = new System.Drawing.Point(279, 3); + this.checkBox5.Name = "checkBox5"; + this.checkBox5.Size = new System.Drawing.Size(63, 112); + this.checkBox5.TabIndex = 18; + this.checkBox5.Text = "checkBox5"; + this.checkBox5.UseVisualStyleBackColor = true; + // + // checkBox6 + // + this.checkBox6.Appearance = System.Windows.Forms.Appearance.Button; + this.checkBox6.Location = new System.Drawing.Point(348, 3); + this.checkBox6.Name = "checkBox6"; + this.checkBox6.Size = new System.Drawing.Size(63, 112); + this.checkBox6.TabIndex = 19; + this.checkBox6.Text = "checkBox6"; + this.checkBox6.UseVisualStyleBackColor = true; + // + // checkBox7 + // + this.checkBox7.Appearance = System.Windows.Forms.Appearance.Button; + this.checkBox7.Location = new System.Drawing.Point(417, 3); + this.checkBox7.Name = "checkBox7"; + this.checkBox7.Size = new System.Drawing.Size(63, 112); + this.checkBox7.TabIndex = 20; + this.checkBox7.Text = "checkBox7"; + this.checkBox7.UseVisualStyleBackColor = true; + // + // checkBox8 + // + this.checkBox8.Appearance = System.Windows.Forms.Appearance.Button; + this.checkBox8.Location = new System.Drawing.Point(486, 3); + this.checkBox8.Name = "checkBox8"; + this.checkBox8.Size = new System.Drawing.Size(63, 112); + this.checkBox8.TabIndex = 21; + this.checkBox8.Text = "checkBox8"; + this.checkBox8.UseVisualStyleBackColor = true; + // + // checkBox9 + // + this.checkBox9.Appearance = System.Windows.Forms.Appearance.Button; + this.checkBox9.Location = new System.Drawing.Point(3, 121); + this.checkBox9.Name = "checkBox9"; + this.checkBox9.Size = new System.Drawing.Size(63, 112); + this.checkBox9.TabIndex = 22; + this.checkBox9.Text = "checkBox9"; + this.checkBox9.UseVisualStyleBackColor = true; + // + // checkBox10 + // + this.checkBox10.Appearance = System.Windows.Forms.Appearance.Button; + this.checkBox10.Location = new System.Drawing.Point(72, 121); + this.checkBox10.Name = "checkBox10"; + this.checkBox10.Size = new System.Drawing.Size(63, 112); + this.checkBox10.TabIndex = 23; + this.checkBox10.Text = "checkBox10"; + this.checkBox10.UseVisualStyleBackColor = true; + // + // checkBox11 + // + this.checkBox11.Appearance = System.Windows.Forms.Appearance.Button; + this.checkBox11.Location = new System.Drawing.Point(141, 121); + this.checkBox11.Name = "checkBox11"; + this.checkBox11.Size = new System.Drawing.Size(63, 112); + this.checkBox11.TabIndex = 24; + this.checkBox11.Text = "checkBox11"; + this.checkBox11.UseVisualStyleBackColor = true; + // + // checkBox12 + // + this.checkBox12.Appearance = System.Windows.Forms.Appearance.Button; + this.checkBox12.Location = new System.Drawing.Point(210, 121); + this.checkBox12.Name = "checkBox12"; + this.checkBox12.Size = new System.Drawing.Size(63, 112); + this.checkBox12.TabIndex = 25; + this.checkBox12.Text = "checkBox12"; + this.checkBox12.UseVisualStyleBackColor = true; + // + // checkBox13 + // + this.checkBox13.Appearance = System.Windows.Forms.Appearance.Button; + this.checkBox13.Location = new System.Drawing.Point(279, 121); + this.checkBox13.Name = "checkBox13"; + this.checkBox13.Size = new System.Drawing.Size(63, 112); + this.checkBox13.TabIndex = 26; + this.checkBox13.Text = "checkBox13"; + this.checkBox13.UseVisualStyleBackColor = true; + // + // checkBox14 + // + this.checkBox14.Appearance = System.Windows.Forms.Appearance.Button; + this.checkBox14.Location = new System.Drawing.Point(348, 121); + this.checkBox14.Name = "checkBox14"; + this.checkBox14.Size = new System.Drawing.Size(63, 112); + this.checkBox14.TabIndex = 27; + this.checkBox14.Text = "checkBox14"; + this.checkBox14.UseVisualStyleBackColor = true; + // + // checkBox15 + // + this.checkBox15.Appearance = System.Windows.Forms.Appearance.Button; + this.checkBox15.Location = new System.Drawing.Point(417, 121); + this.checkBox15.Name = "checkBox15"; + this.checkBox15.Size = new System.Drawing.Size(63, 112); + this.checkBox15.TabIndex = 28; + this.checkBox15.Text = "checkBox15"; + this.checkBox15.UseVisualStyleBackColor = true; + // + // checkBox16 + // + this.checkBox16.Appearance = System.Windows.Forms.Appearance.Button; + this.checkBox16.Location = new System.Drawing.Point(486, 121); + this.checkBox16.Name = "checkBox16"; + this.checkBox16.Size = new System.Drawing.Size(63, 112); + this.checkBox16.TabIndex = 29; + this.checkBox16.Text = "checkBox16"; + this.checkBox16.UseVisualStyleBackColor = true; + // + // checkBox17 + // + this.checkBox17.Appearance = System.Windows.Forms.Appearance.Button; + this.checkBox17.Location = new System.Drawing.Point(3, 239); + this.checkBox17.Name = "checkBox17"; + this.checkBox17.Size = new System.Drawing.Size(63, 112); + this.checkBox17.TabIndex = 30; + this.checkBox17.Text = "checkBox17"; + this.checkBox17.UseVisualStyleBackColor = true; + // + // checkBox18 + // + this.checkBox18.Appearance = System.Windows.Forms.Appearance.Button; + this.checkBox18.Location = new System.Drawing.Point(72, 239); + this.checkBox18.Name = "checkBox18"; + this.checkBox18.Size = new System.Drawing.Size(63, 112); + this.checkBox18.TabIndex = 31; + this.checkBox18.Text = "checkBox18"; + this.checkBox18.UseVisualStyleBackColor = true; + // + // checkBox19 + // + this.checkBox19.Appearance = System.Windows.Forms.Appearance.Button; + this.checkBox19.Location = new System.Drawing.Point(141, 239); + this.checkBox19.Name = "checkBox19"; + this.checkBox19.Size = new System.Drawing.Size(63, 112); + this.checkBox19.TabIndex = 32; + this.checkBox19.Text = "checkBox19"; + this.checkBox19.UseVisualStyleBackColor = true; + // + // checkBox20 + // + this.checkBox20.Appearance = System.Windows.Forms.Appearance.Button; + this.checkBox20.Location = new System.Drawing.Point(210, 239); + this.checkBox20.Name = "checkBox20"; + this.checkBox20.Size = new System.Drawing.Size(63, 112); + this.checkBox20.TabIndex = 33; + this.checkBox20.Text = "checkBox20"; + this.checkBox20.UseVisualStyleBackColor = true; + // + // checkBox21 + // + this.checkBox21.Appearance = System.Windows.Forms.Appearance.Button; + this.checkBox21.Location = new System.Drawing.Point(279, 239); + this.checkBox21.Name = "checkBox21"; + this.checkBox21.Size = new System.Drawing.Size(63, 112); + this.checkBox21.TabIndex = 34; + this.checkBox21.Text = "checkBox21"; + this.checkBox21.UseVisualStyleBackColor = true; + // + // checkBox22 + // + this.checkBox22.Appearance = System.Windows.Forms.Appearance.Button; + this.checkBox22.Location = new System.Drawing.Point(348, 239); + this.checkBox22.Name = "checkBox22"; + this.checkBox22.Size = new System.Drawing.Size(63, 112); + this.checkBox22.TabIndex = 35; + this.checkBox22.Text = "checkBox22"; + this.checkBox22.UseVisualStyleBackColor = true; + // + // checkBox23 + // + this.checkBox23.Appearance = System.Windows.Forms.Appearance.Button; + this.checkBox23.Location = new System.Drawing.Point(417, 239); + this.checkBox23.Name = "checkBox23"; + this.checkBox23.Size = new System.Drawing.Size(63, 112); + this.checkBox23.TabIndex = 36; + this.checkBox23.Text = "checkBox23"; + this.checkBox23.UseVisualStyleBackColor = true; + // + // checkBox24 + // + this.checkBox24.Appearance = System.Windows.Forms.Appearance.Button; + this.checkBox24.Location = new System.Drawing.Point(486, 239); + this.checkBox24.Name = "checkBox24"; + this.checkBox24.Size = new System.Drawing.Size(63, 112); + this.checkBox24.TabIndex = 37; + this.checkBox24.Text = "checkBox24"; + this.checkBox24.UseVisualStyleBackColor = true; + // + // checkBox25 + // + this.checkBox25.Appearance = System.Windows.Forms.Appearance.Button; + this.checkBox25.Location = new System.Drawing.Point(3, 357); + this.checkBox25.Name = "checkBox25"; + this.checkBox25.Size = new System.Drawing.Size(63, 112); + this.checkBox25.TabIndex = 38; + this.checkBox25.Text = "checkBox25"; + this.checkBox25.UseVisualStyleBackColor = true; + // + // checkBox26 + // + this.checkBox26.Appearance = System.Windows.Forms.Appearance.Button; + this.checkBox26.Location = new System.Drawing.Point(72, 357); + this.checkBox26.Name = "checkBox26"; + this.checkBox26.Size = new System.Drawing.Size(63, 112); + this.checkBox26.TabIndex = 39; + this.checkBox26.Text = "checkBox26"; + this.checkBox26.UseVisualStyleBackColor = true; + // + // checkBox27 + // + this.checkBox27.Appearance = System.Windows.Forms.Appearance.Button; + this.checkBox27.Location = new System.Drawing.Point(141, 357); + this.checkBox27.Name = "checkBox27"; + this.checkBox27.Size = new System.Drawing.Size(63, 112); + this.checkBox27.TabIndex = 40; + this.checkBox27.Text = "checkBox27"; + this.checkBox27.UseVisualStyleBackColor = true; + // + // checkBox28 + // + this.checkBox28.Appearance = System.Windows.Forms.Appearance.Button; + this.checkBox28.Location = new System.Drawing.Point(210, 357); + this.checkBox28.Name = "checkBox28"; + this.checkBox28.Size = new System.Drawing.Size(63, 112); + this.checkBox28.TabIndex = 41; + this.checkBox28.Text = "checkBox28"; + this.checkBox28.UseVisualStyleBackColor = true; + // + // checkBox29 + // + this.checkBox29.Appearance = System.Windows.Forms.Appearance.Button; + this.checkBox29.Location = new System.Drawing.Point(279, 357); + this.checkBox29.Name = "checkBox29"; + this.checkBox29.Size = new System.Drawing.Size(63, 112); + this.checkBox29.TabIndex = 42; + this.checkBox29.Text = "checkBox29"; + this.checkBox29.UseVisualStyleBackColor = true; + // + // checkBox30 + // + this.checkBox30.Appearance = System.Windows.Forms.Appearance.Button; + this.checkBox30.Location = new System.Drawing.Point(348, 357); + this.checkBox30.Name = "checkBox30"; + this.checkBox30.Size = new System.Drawing.Size(63, 112); + this.checkBox30.TabIndex = 43; + this.checkBox30.Text = "checkBox30"; + this.checkBox30.UseVisualStyleBackColor = true; + // + // checkBox31 + // + this.checkBox31.Appearance = System.Windows.Forms.Appearance.Button; + this.checkBox31.Location = new System.Drawing.Point(417, 357); + this.checkBox31.Name = "checkBox31"; + this.checkBox31.Size = new System.Drawing.Size(63, 112); + this.checkBox31.TabIndex = 44; + this.checkBox31.Text = "checkBox31"; + this.checkBox31.UseVisualStyleBackColor = true; + // + // checkBox32 + // + this.checkBox32.Appearance = System.Windows.Forms.Appearance.Button; + this.checkBox32.Location = new System.Drawing.Point(486, 357); + this.checkBox32.Name = "checkBox32"; + this.checkBox32.Size = new System.Drawing.Size(63, 112); + this.checkBox32.TabIndex = 45; + this.checkBox32.Text = "checkBox32"; + this.checkBox32.UseVisualStyleBackColor = true; + // + // checkBox33 + // + this.checkBox33.Appearance = System.Windows.Forms.Appearance.Button; + this.checkBox33.Location = new System.Drawing.Point(3, 475); + this.checkBox33.Name = "checkBox33"; + this.checkBox33.Size = new System.Drawing.Size(63, 112); + this.checkBox33.TabIndex = 46; + this.checkBox33.Text = "checkBox33"; + this.checkBox33.UseVisualStyleBackColor = true; + // + // checkBox34 + // + this.checkBox34.Appearance = System.Windows.Forms.Appearance.Button; + this.checkBox34.Location = new System.Drawing.Point(72, 475); + this.checkBox34.Name = "checkBox34"; + this.checkBox34.Size = new System.Drawing.Size(63, 112); + this.checkBox34.TabIndex = 47; + this.checkBox34.Text = "checkBox34"; + this.checkBox34.UseVisualStyleBackColor = true; + // + // checkBox35 + // + this.checkBox35.Appearance = System.Windows.Forms.Appearance.Button; + this.checkBox35.Location = new System.Drawing.Point(141, 475); + this.checkBox35.Name = "checkBox35"; + this.checkBox35.Size = new System.Drawing.Size(63, 112); + this.checkBox35.TabIndex = 48; + this.checkBox35.Text = "checkBox35"; + this.checkBox35.UseVisualStyleBackColor = true; + // + // checkBox36 + // + this.checkBox36.Appearance = System.Windows.Forms.Appearance.Button; + this.checkBox36.Location = new System.Drawing.Point(210, 475); + this.checkBox36.Name = "checkBox36"; + this.checkBox36.Size = new System.Drawing.Size(63, 112); + this.checkBox36.TabIndex = 49; + this.checkBox36.Text = "checkBox36"; + this.checkBox36.UseVisualStyleBackColor = true; + // + // checkBox37 + // + this.checkBox37.Appearance = System.Windows.Forms.Appearance.Button; + this.checkBox37.Location = new System.Drawing.Point(279, 475); + this.checkBox37.Name = "checkBox37"; + this.checkBox37.Size = new System.Drawing.Size(63, 112); + this.checkBox37.TabIndex = 50; + this.checkBox37.Text = "checkBox37"; + this.checkBox37.UseVisualStyleBackColor = true; + // + // checkBox38 + // + this.checkBox38.Appearance = System.Windows.Forms.Appearance.Button; + this.checkBox38.Location = new System.Drawing.Point(348, 475); + this.checkBox38.Name = "checkBox38"; + this.checkBox38.Size = new System.Drawing.Size(63, 112); + this.checkBox38.TabIndex = 51; + this.checkBox38.Text = "checkBox38"; + this.checkBox38.UseVisualStyleBackColor = true; + // + // checkBox39 + // + this.checkBox39.Appearance = System.Windows.Forms.Appearance.Button; + this.checkBox39.Location = new System.Drawing.Point(417, 475); + this.checkBox39.Name = "checkBox39"; + this.checkBox39.Size = new System.Drawing.Size(63, 112); + this.checkBox39.TabIndex = 52; + this.checkBox39.Text = "checkBox39"; + this.checkBox39.UseVisualStyleBackColor = true; + // + // checkBox40 + // + this.checkBox40.Appearance = System.Windows.Forms.Appearance.Button; + this.checkBox40.Location = new System.Drawing.Point(486, 475); + this.checkBox40.Name = "checkBox40"; + this.checkBox40.Size = new System.Drawing.Size(63, 112); + this.checkBox40.TabIndex = 53; + this.checkBox40.Text = "checkBox40"; + this.checkBox40.UseVisualStyleBackColor = true; + // + // label1 + // + this.label1.AutoSize = true; + this.label1.Location = new System.Drawing.Point(3, 43); + this.label1.Name = "label1"; + this.label1.Size = new System.Drawing.Size(77, 13); + this.label1.TabIndex = 2; + this.label1.Text = "ProjectNumber"; + // + // label2 + // + this.label2.AutoSize = true; + this.label2.Location = new System.Drawing.Point(3, 74); + this.label2.Name = "label2"; + this.label2.Size = new System.Drawing.Size(46, 13); + this.label2.TabIndex = 3; + this.label2.Text = "DriverID"; + // + // label3 + // + this.label3.AutoSize = true; + this.label3.Location = new System.Drawing.Point(3, 98); + this.label3.Name = "label3"; + this.label3.Size = new System.Drawing.Size(24, 13); + this.label3.TabIndex = 4; + this.label3.Text = "BIB"; + // + // tbProjectNumber + // + this.tbProjectNumber.Location = new System.Drawing.Point(87, 43); + this.tbProjectNumber.Name = "tbProjectNumber"; + this.tbProjectNumber.Size = new System.Drawing.Size(44, 20); + this.tbProjectNumber.TabIndex = 5; + this.tbProjectNumber.Text = "240000"; + // + // tbSub + // + this.tbSub.Location = new System.Drawing.Point(160, 43); + this.tbSub.Name = "tbSub"; + this.tbSub.Size = new System.Drawing.Size(30, 20); + this.tbSub.TabIndex = 6; + this.tbSub.Text = "1"; + // + // label4 + // + this.label4.AutoSize = true; + this.label4.Location = new System.Drawing.Point(137, 46); + this.label4.Name = "label4"; + this.label4.Size = new System.Drawing.Size(26, 13); + this.label4.TabIndex = 7; + this.label4.Text = "Sub"; + // + // label5 + // + this.label5.AutoSize = true; + this.label5.Location = new System.Drawing.Point(196, 46); + this.label5.Name = "label5"; + this.label5.Size = new System.Drawing.Size(29, 13); + this.label5.TabIndex = 8; + this.label5.Text = "Step"; + // + // tbStep + // + this.tbStep.Location = new System.Drawing.Point(231, 43); + this.tbStep.Name = "tbStep"; + this.tbStep.Size = new System.Drawing.Size(30, 20); + this.tbStep.TabIndex = 9; + this.tbStep.Text = "1"; + // + // tbDriverID + // + this.tbDriverID.Location = new System.Drawing.Point(87, 69); + this.tbDriverID.Name = "tbDriverID"; + this.tbDriverID.Size = new System.Drawing.Size(44, 20); + this.tbDriverID.TabIndex = 10; + this.tbDriverID.Text = "1"; + // + // tbBibID + // + this.tbBibID.Location = new System.Drawing.Point(87, 95); + this.tbBibID.Name = "tbBibID"; + this.tbBibID.Size = new System.Drawing.Size(44, 20); + this.tbBibID.TabIndex = 11; + this.tbBibID.Text = "1"; + // + // label6 + // + this.label6.AutoSize = true; + this.label6.Location = new System.Drawing.Point(3, 154); + this.label6.Name = "label6"; + this.label6.Size = new System.Drawing.Size(48, 13); + this.label6.TabIndex = 12; + this.label6.Text = "Location"; + // + // lbLocation + // + this.lbLocation.FormattingEnabled = true; + this.lbLocation.Items.AddRange(new object[] { + "BENCH DEV1", + "BENCH DEV2", + "CUBE1 UPPER", + "CUBE2 LOWER", + "MSL UPPER", + "MSL LOWER"}); + this.lbLocation.Location = new System.Drawing.Point(87, 154); + this.lbLocation.Name = "lbLocation"; + this.lbLocation.Size = new System.Drawing.Size(103, 82); + this.lbLocation.TabIndex = 13; + // + // button1 + // + this.button1.Location = new System.Drawing.Point(940, 708); + this.button1.Name = "button1"; + this.button1.Size = new System.Drawing.Size(106, 58); + this.button1.TabIndex = 14; + this.button1.Text = "Clear All Measurements"; + this.button1.UseVisualStyleBackColor = true; + this.button1.Click += new System.EventHandler(this.button1_Click); + // + // btnRow1 + // + this.btnRow1.Appearance = System.Windows.Forms.Appearance.Button; + this.btnRow1.Checked = true; + this.btnRow1.CheckState = System.Windows.Forms.CheckState.Checked; + this.btnRow1.Location = new System.Drawing.Point(306, 145); + this.btnRow1.Name = "btnRow1"; + this.btnRow1.Size = new System.Drawing.Size(50, 28); + this.btnRow1.TabIndex = 15; + this.btnRow1.Text = "ROW1"; + this.btnRow1.UseVisualStyleBackColor = true; + this.btnRow1.CheckedChanged += new System.EventHandler(this.btnRow1_CheckedChanged); + // + // btnRow2 + // + this.btnRow2.Appearance = System.Windows.Forms.Appearance.Button; + this.btnRow2.Checked = true; + this.btnRow2.CheckState = System.Windows.Forms.CheckState.Checked; + this.btnRow2.Location = new System.Drawing.Point(306, 264); + this.btnRow2.Name = "btnRow2"; + this.btnRow2.Size = new System.Drawing.Size(50, 28); + this.btnRow2.TabIndex = 16; + this.btnRow2.Text = "ROW2"; + this.btnRow2.UseVisualStyleBackColor = true; + this.btnRow2.CheckedChanged += new System.EventHandler(this.btnRow2_CheckedChanged); + // + // btnRow3 + // + this.btnRow3.Appearance = System.Windows.Forms.Appearance.Button; + this.btnRow3.Checked = true; + this.btnRow3.CheckState = System.Windows.Forms.CheckState.Checked; + this.btnRow3.Location = new System.Drawing.Point(306, 383); + this.btnRow3.Name = "btnRow3"; + this.btnRow3.Size = new System.Drawing.Size(50, 28); + this.btnRow3.TabIndex = 17; + this.btnRow3.Text = "ROW3"; + this.btnRow3.UseVisualStyleBackColor = true; + this.btnRow3.CheckedChanged += new System.EventHandler(this.btnRow3_CheckedChanged); + // + // btnRow4 + // + this.btnRow4.Appearance = System.Windows.Forms.Appearance.Button; + this.btnRow4.Checked = true; + this.btnRow4.CheckState = System.Windows.Forms.CheckState.Checked; + this.btnRow4.Location = new System.Drawing.Point(306, 501); + this.btnRow4.Name = "btnRow4"; + this.btnRow4.Size = new System.Drawing.Size(50, 28); + this.btnRow4.TabIndex = 18; + this.btnRow4.Text = "ROW4"; + this.btnRow4.UseVisualStyleBackColor = true; + this.btnRow4.CheckedChanged += new System.EventHandler(this.btnRow4_CheckedChanged); + // + // btnRow5 + // + this.btnRow5.Appearance = System.Windows.Forms.Appearance.Button; + this.btnRow5.Checked = true; + this.btnRow5.CheckState = System.Windows.Forms.CheckState.Checked; + this.btnRow5.Location = new System.Drawing.Point(306, 620); + this.btnRow5.Name = "btnRow5"; + this.btnRow5.Size = new System.Drawing.Size(50, 28); + this.btnRow5.TabIndex = 19; + this.btnRow5.Text = "ROW5"; + this.btnRow5.UseVisualStyleBackColor = true; + this.btnRow5.CheckedChanged += new System.EventHandler(this.btnRow5_CheckedChanged); + // + // btnCol1 + // + this.btnCol1.Appearance = System.Windows.Forms.Appearance.Button; + this.btnCol1.Checked = true; + this.btnCol1.CheckState = System.Windows.Forms.CheckState.Checked; + this.btnCol1.Location = new System.Drawing.Point(500, 46); + this.btnCol1.Name = "btnCol1"; + this.btnCol1.Size = new System.Drawing.Size(50, 28); + this.btnCol1.TabIndex = 20; + this.btnCol1.Text = "COL1"; + this.btnCol1.UseVisualStyleBackColor = true; + this.btnCol1.CheckedChanged += new System.EventHandler(this.btnCol1_CheckedChanged); + // + // bntCol2 + // + this.bntCol2.Appearance = System.Windows.Forms.Appearance.Button; + this.bntCol2.Checked = true; + this.bntCol2.CheckState = System.Windows.Forms.CheckState.Checked; + this.bntCol2.Location = new System.Drawing.Point(569, 46); + this.bntCol2.Name = "bntCol2"; + this.bntCol2.Size = new System.Drawing.Size(50, 28); + this.bntCol2.TabIndex = 21; + this.bntCol2.Text = "COL2"; + this.bntCol2.UseVisualStyleBackColor = true; + this.bntCol2.CheckedChanged += new System.EventHandler(this.bntCol2_CheckedChanged); + // + // btnCol3 + // + this.btnCol3.Appearance = System.Windows.Forms.Appearance.Button; + this.btnCol3.Checked = true; + this.btnCol3.CheckState = System.Windows.Forms.CheckState.Checked; + this.btnCol3.Location = new System.Drawing.Point(638, 45); + this.btnCol3.Name = "btnCol3"; + this.btnCol3.Size = new System.Drawing.Size(50, 28); + this.btnCol3.TabIndex = 22; + this.btnCol3.Text = "COL3"; + this.btnCol3.UseVisualStyleBackColor = true; + this.btnCol3.CheckedChanged += new System.EventHandler(this.btnCol3_CheckedChanged); + // + // btnCol4 + // + this.btnCol4.Appearance = System.Windows.Forms.Appearance.Button; + this.btnCol4.Checked = true; + this.btnCol4.CheckState = System.Windows.Forms.CheckState.Checked; + this.btnCol4.Location = new System.Drawing.Point(707, 46); + this.btnCol4.Name = "btnCol4"; + this.btnCol4.Size = new System.Drawing.Size(50, 28); + this.btnCol4.TabIndex = 23; + this.btnCol4.Text = "COL4"; + this.btnCol4.UseVisualStyleBackColor = true; + this.btnCol4.CheckedChanged += new System.EventHandler(this.btnCol4_CheckedChanged); + // + // btnCol5 + // + this.btnCol5.Appearance = System.Windows.Forms.Appearance.Button; + this.btnCol5.Checked = true; + this.btnCol5.CheckState = System.Windows.Forms.CheckState.Checked; + this.btnCol5.Location = new System.Drawing.Point(776, 46); + this.btnCol5.Name = "btnCol5"; + this.btnCol5.Size = new System.Drawing.Size(50, 28); + this.btnCol5.TabIndex = 24; + this.btnCol5.Text = "COL5"; + this.btnCol5.UseVisualStyleBackColor = true; + this.btnCol5.CheckedChanged += new System.EventHandler(this.btnCol5_CheckedChanged); + // + // btnCol6 + // + this.btnCol6.Appearance = System.Windows.Forms.Appearance.Button; + this.btnCol6.Checked = true; + this.btnCol6.CheckState = System.Windows.Forms.CheckState.Checked; + this.btnCol6.Location = new System.Drawing.Point(845, 46); + this.btnCol6.Name = "btnCol6"; + this.btnCol6.Size = new System.Drawing.Size(50, 28); + this.btnCol6.TabIndex = 25; + this.btnCol6.Text = "COL6"; + this.btnCol6.UseVisualStyleBackColor = true; + this.btnCol6.CheckedChanged += new System.EventHandler(this.btnCol6_CheckedChanged); + // + // btnCol7 + // + this.btnCol7.Appearance = System.Windows.Forms.Appearance.Button; + this.btnCol7.Checked = true; + this.btnCol7.CheckState = System.Windows.Forms.CheckState.Checked; + this.btnCol7.Location = new System.Drawing.Point(914, 46); + this.btnCol7.Name = "btnCol7"; + this.btnCol7.Size = new System.Drawing.Size(50, 28); + this.btnCol7.TabIndex = 26; + this.btnCol7.Text = "COL7"; + this.btnCol7.UseVisualStyleBackColor = true; + this.btnCol7.CheckedChanged += new System.EventHandler(this.btnCol7_CheckedChanged); + // + // btnCol8 + // + this.btnCol8.Appearance = System.Windows.Forms.Appearance.Button; + this.btnCol8.Checked = true; + this.btnCol8.CheckState = System.Windows.Forms.CheckState.Checked; + this.btnCol8.Location = new System.Drawing.Point(983, 46); + this.btnCol8.Name = "btnCol8"; + this.btnCol8.Size = new System.Drawing.Size(50, 28); + this.btnCol8.TabIndex = 27; + this.btnCol8.Text = "COL8"; + this.btnCol8.UseVisualStyleBackColor = true; + this.btnCol8.CheckedChanged += new System.EventHandler(this.btnCol8_CheckedChanged); + // + // btnAll + // + this.btnAll.Appearance = System.Windows.Forms.Appearance.Button; + this.btnAll.Checked = true; + this.btnAll.CheckState = System.Windows.Forms.CheckState.Checked; + this.btnAll.Location = new System.Drawing.Point(306, 46); + this.btnAll.Name = "btnAll"; + this.btnAll.Size = new System.Drawing.Size(50, 28); + this.btnAll.TabIndex = 28; + this.btnAll.Text = "ALL"; + this.btnAll.UseVisualStyleBackColor = true; + this.btnAll.CheckedChanged += new System.EventHandler(this.btnAll_CheckedChanged); + // + // lvRow1Front + // + this.lvRow1Front.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] { + this.item0}); + this.lvRow1Front.HideSelection = false; + this.lvRow1Front.Location = new System.Drawing.Point(404, 103); + this.lvRow1Front.Name = "lvRow1Front"; + this.lvRow1Front.Size = new System.Drawing.Size(87, 113); + this.lvRow1Front.TabIndex = 39; + this.lvRow1Front.UseCompatibleStateImageBehavior = false; + this.lvRow1Front.SelectedIndexChanged += new System.EventHandler(this.lvRow1Front_SelectedIndexChanged); + // + // item0 + // + this.item0.Text = "Val"; + // + // lvRow2Front + // + this.lvRow2Front.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] { + this.columnHeader1}); + this.lvRow2Front.HideSelection = false; + this.lvRow2Front.Location = new System.Drawing.Point(405, 222); + this.lvRow2Front.Name = "lvRow2Front"; + this.lvRow2Front.Size = new System.Drawing.Size(87, 110); + this.lvRow2Front.TabIndex = 40; + this.lvRow2Front.UseCompatibleStateImageBehavior = false; + // + // columnHeader1 + // + this.columnHeader1.Text = "Val"; + // + // lvRow3Front + // + this.lvRow3Front.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] { + this.columnHeader2}); + this.lvRow3Front.HideSelection = false; + this.lvRow3Front.Location = new System.Drawing.Point(404, 340); + this.lvRow3Front.Name = "lvRow3Front"; + this.lvRow3Front.Size = new System.Drawing.Size(87, 112); + this.lvRow3Front.TabIndex = 41; + this.lvRow3Front.UseCompatibleStateImageBehavior = false; + // + // columnHeader2 + // + this.columnHeader2.Text = "Val"; + // + // lvRow4Front + // + this.lvRow4Front.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] { + this.columnHeader3}); + this.lvRow4Front.HideSelection = false; + this.lvRow4Front.Location = new System.Drawing.Point(404, 459); + this.lvRow4Front.Name = "lvRow4Front"; + this.lvRow4Front.Size = new System.Drawing.Size(87, 113); + this.lvRow4Front.TabIndex = 42; + this.lvRow4Front.UseCompatibleStateImageBehavior = false; + // + // columnHeader3 + // + this.columnHeader3.Text = "Val"; + // + // lvRow5Front + // + this.lvRow5Front.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] { + this.columnHeader4}); + this.lvRow5Front.HideSelection = false; + this.lvRow5Front.Location = new System.Drawing.Point(404, 578); + this.lvRow5Front.Name = "lvRow5Front"; + this.lvRow5Front.Size = new System.Drawing.Size(87, 113); + this.lvRow5Front.TabIndex = 43; + this.lvRow5Front.UseCompatibleStateImageBehavior = false; + // + // columnHeader4 + // + this.columnHeader4.Text = "Val"; + // + // lvRow1Back + // + this.lvRow1Back.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] { + this.columnHeader5}); + this.lvRow1Back.HideSelection = false; + this.lvRow1Back.Location = new System.Drawing.Point(1072, 103); + this.lvRow1Back.Name = "lvRow1Back"; + this.lvRow1Back.Size = new System.Drawing.Size(87, 113); + this.lvRow1Back.TabIndex = 44; + this.lvRow1Back.UseCompatibleStateImageBehavior = false; + // + // columnHeader5 + // + this.columnHeader5.Text = "Val"; + // + // lvRow2Back + // + this.lvRow2Back.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] { + this.columnHeader6}); + this.lvRow2Back.HideSelection = false; + this.lvRow2Back.Location = new System.Drawing.Point(1072, 222); + this.lvRow2Back.Name = "lvRow2Back"; + this.lvRow2Back.Size = new System.Drawing.Size(87, 110); + this.lvRow2Back.TabIndex = 45; + this.lvRow2Back.UseCompatibleStateImageBehavior = false; + // + // columnHeader6 + // + this.columnHeader6.Text = "Val"; + // + // lvRow3Back + // + this.lvRow3Back.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] { + this.columnHeader7}); + this.lvRow3Back.HideSelection = false; + this.lvRow3Back.Location = new System.Drawing.Point(1072, 340); + this.lvRow3Back.Name = "lvRow3Back"; + this.lvRow3Back.Size = new System.Drawing.Size(87, 112); + this.lvRow3Back.TabIndex = 46; + this.lvRow3Back.UseCompatibleStateImageBehavior = false; + // + // columnHeader7 + // + this.columnHeader7.Text = "Val"; + // + // lvRow4Back + // + this.lvRow4Back.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] { + this.columnHeader8}); + this.lvRow4Back.HideSelection = false; + this.lvRow4Back.Location = new System.Drawing.Point(1072, 459); + this.lvRow4Back.Name = "lvRow4Back"; + this.lvRow4Back.Size = new System.Drawing.Size(87, 113); + this.lvRow4Back.TabIndex = 47; + this.lvRow4Back.UseCompatibleStateImageBehavior = false; + // + // columnHeader8 + // + this.columnHeader8.Text = "Val"; + // + // lvRow5Back + // + this.lvRow5Back.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] { + this.columnHeader9}); + this.lvRow5Back.HideSelection = false; + this.lvRow5Back.Location = new System.Drawing.Point(1072, 578); + this.lvRow5Back.Name = "lvRow5Back"; + this.lvRow5Back.Size = new System.Drawing.Size(87, 113); + this.lvRow5Back.TabIndex = 48; + this.lvRow5Back.UseCompatibleStateImageBehavior = false; + // + // columnHeader9 + // + this.columnHeader9.Text = "Val"; + // + // btnSaveToExcel + // + this.btnSaveToExcel.Location = new System.Drawing.Point(612, 705); + this.btnSaveToExcel.Name = "btnSaveToExcel"; + this.btnSaveToExcel.Size = new System.Drawing.Size(107, 58); + this.btnSaveToExcel.TabIndex = 49; + this.btnSaveToExcel.Text = "SAVE"; + this.btnSaveToExcel.UseVisualStyleBackColor = true; + this.btnSaveToExcel.Click += new System.EventHandler(this.btnSaveToExcel_Click); + // + // btnMeasure + // + this.btnMeasure.Location = new System.Drawing.Point(500, 705); + this.btnMeasure.Name = "btnMeasure"; + this.btnMeasure.Size = new System.Drawing.Size(106, 58); + this.btnMeasure.TabIndex = 50; + this.btnMeasure.Text = "Measure"; + this.btnMeasure.UseVisualStyleBackColor = true; + this.btnMeasure.Click += new System.EventHandler(this.btnMeasure_Click_1); + // + // progressBar + // + this.progressBar.Location = new System.Drawing.Point(36, 370); + this.progressBar.Name = "progressBar"; + this.progressBar.Size = new System.Drawing.Size(209, 82); + this.progressBar.TabIndex = 51; + // + // UserControlMeasure + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.Controls.Add(this.progressBar); + this.Controls.Add(this.btnMeasure); + this.Controls.Add(this.btnSaveToExcel); + this.Controls.Add(this.lvRow5Back); + this.Controls.Add(this.lvRow4Back); + this.Controls.Add(this.lvRow3Back); + this.Controls.Add(this.lvRow2Back); + this.Controls.Add(this.lvRow1Back); + this.Controls.Add(this.lvRow5Front); + this.Controls.Add(this.lvRow4Front); + this.Controls.Add(this.lvRow3Front); + this.Controls.Add(this.lvRow2Front); + this.Controls.Add(this.lvRow1Front); + this.Controls.Add(this.btnAll); + this.Controls.Add(this.btnCol8); + this.Controls.Add(this.btnCol7); + this.Controls.Add(this.btnCol6); + this.Controls.Add(this.btnCol5); + this.Controls.Add(this.btnCol4); + this.Controls.Add(this.btnCol3); + this.Controls.Add(this.bntCol2); + this.Controls.Add(this.btnCol1); + this.Controls.Add(this.btnRow5); + this.Controls.Add(this.btnRow4); + this.Controls.Add(this.btnRow3); + this.Controls.Add(this.btnRow2); + this.Controls.Add(this.btnRow1); + this.Controls.Add(this.button1); + this.Controls.Add(this.lbLocation); + this.Controls.Add(this.label6); + this.Controls.Add(this.tbBibID); + this.Controls.Add(this.tbDriverID); + this.Controls.Add(this.tbStep); + this.Controls.Add(this.label5); + this.Controls.Add(this.label4); + this.Controls.Add(this.tbSub); + this.Controls.Add(this.tbProjectNumber); + this.Controls.Add(this.label3); + this.Controls.Add(this.label2); + this.Controls.Add(this.label1); + this.Controls.Add(this.flowLayoutPanelPositionButtons); + this.Name = "UserControlMeasure"; + this.Size = new System.Drawing.Size(1245, 800); + this.Load += new System.EventHandler(this.UserControlMeasure_Load); + this.flowLayoutPanelPositionButtons.ResumeLayout(false); + this.ResumeLayout(false); + this.PerformLayout(); + + } + + #endregion + + private System.Windows.Forms.FlowLayoutPanel flowLayoutPanelPositionButtons; + private System.Windows.Forms.Label label1; + private System.Windows.Forms.Label label2; + private System.Windows.Forms.Label label3; + private System.Windows.Forms.TextBox tbProjectNumber; + private System.Windows.Forms.TextBox tbSub; + private System.Windows.Forms.Label label4; + private System.Windows.Forms.Label label5; + private System.Windows.Forms.TextBox tbStep; + private System.Windows.Forms.TextBox tbDriverID; + private System.Windows.Forms.TextBox tbBibID; + private System.Windows.Forms.Label label6; + private System.Windows.Forms.ListBox lbLocation; + private System.Windows.Forms.CheckBox checkBox1; + private System.Windows.Forms.CheckBox checkBox2; + private System.Windows.Forms.CheckBox checkBox3; + private System.Windows.Forms.CheckBox checkBox4; + private System.Windows.Forms.CheckBox checkBox5; + private System.Windows.Forms.CheckBox checkBox6; + private System.Windows.Forms.CheckBox checkBox7; + private System.Windows.Forms.CheckBox checkBox8; + private System.Windows.Forms.CheckBox checkBox9; + private System.Windows.Forms.CheckBox checkBox10; + private System.Windows.Forms.CheckBox checkBox11; + private System.Windows.Forms.CheckBox checkBox12; + private System.Windows.Forms.CheckBox checkBox13; + private System.Windows.Forms.CheckBox checkBox14; + private System.Windows.Forms.CheckBox checkBox15; + private System.Windows.Forms.CheckBox checkBox16; + private System.Windows.Forms.CheckBox checkBox17; + private System.Windows.Forms.CheckBox checkBox18; + private System.Windows.Forms.CheckBox checkBox19; + private System.Windows.Forms.CheckBox checkBox20; + private System.Windows.Forms.CheckBox checkBox21; + private System.Windows.Forms.CheckBox checkBox22; + private System.Windows.Forms.CheckBox checkBox23; + private System.Windows.Forms.CheckBox checkBox24; + private System.Windows.Forms.CheckBox checkBox25; + private System.Windows.Forms.CheckBox checkBox26; + private System.Windows.Forms.CheckBox checkBox27; + private System.Windows.Forms.CheckBox checkBox28; + private System.Windows.Forms.CheckBox checkBox29; + private System.Windows.Forms.CheckBox checkBox30; + private System.Windows.Forms.CheckBox checkBox31; + private System.Windows.Forms.CheckBox checkBox32; + private System.Windows.Forms.CheckBox checkBox33; + private System.Windows.Forms.CheckBox checkBox34; + private System.Windows.Forms.CheckBox checkBox35; + private System.Windows.Forms.CheckBox checkBox36; + private System.Windows.Forms.CheckBox checkBox37; + private System.Windows.Forms.CheckBox checkBox38; + private System.Windows.Forms.CheckBox checkBox39; + private System.Windows.Forms.CheckBox checkBox40; + private System.Windows.Forms.Button button1; + private System.Windows.Forms.CheckBox btnRow1; + private System.Windows.Forms.CheckBox btnRow2; + private System.Windows.Forms.CheckBox btnRow3; + private System.Windows.Forms.CheckBox btnRow4; + private System.Windows.Forms.CheckBox btnRow5; + private System.Windows.Forms.CheckBox btnCol1; + private System.Windows.Forms.CheckBox bntCol2; + private System.Windows.Forms.CheckBox btnCol3; + private System.Windows.Forms.CheckBox btnCol4; + private System.Windows.Forms.CheckBox btnCol5; + private System.Windows.Forms.CheckBox btnCol6; + private System.Windows.Forms.CheckBox btnCol7; + private System.Windows.Forms.CheckBox btnCol8; + private System.Windows.Forms.CheckBox btnAll; + private System.Windows.Forms.ListView lvRow1Front; + private System.Windows.Forms.ListView lvRow2Front; + private System.Windows.Forms.ColumnHeader columnHeader1; + private System.Windows.Forms.ListView lvRow3Front; + private System.Windows.Forms.ColumnHeader columnHeader2; + private System.Windows.Forms.ListView lvRow4Front; + private System.Windows.Forms.ColumnHeader columnHeader3; + private System.Windows.Forms.ListView lvRow5Front; + private System.Windows.Forms.ColumnHeader columnHeader4; + private System.Windows.Forms.ListView lvRow1Back; + private System.Windows.Forms.ColumnHeader columnHeader5; + private System.Windows.Forms.ListView lvRow2Back; + private System.Windows.Forms.ColumnHeader columnHeader6; + private System.Windows.Forms.ListView lvRow3Back; + private System.Windows.Forms.ColumnHeader columnHeader7; + private System.Windows.Forms.ListView lvRow4Back; + private System.Windows.Forms.ColumnHeader columnHeader8; + private System.Windows.Forms.ListView lvRow5Back; + private System.Windows.Forms.ColumnHeader columnHeader9; + private System.Windows.Forms.Button btnSaveToExcel; + private System.Windows.Forms.Button btnMeasure; + private System.Windows.Forms.ColumnHeader item0; + private System.Windows.Forms.ProgressBar progressBar; + } +} diff --git a/daq_testing/UserControlMeasure.cs b/daq_testing/UserControlMeasure.cs new file mode 100644 index 0000000..5b9f8d1 --- /dev/null +++ b/daq_testing/UserControlMeasure.cs @@ -0,0 +1,977 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Forms; +using Excel = Microsoft.Office.Interop.Excel; + +namespace daq_testing +{ + public partial class UserControlMeasure : UserControl + { + public List PositionList { get; set; } + public string ProjectNumber { get => tbProjectNumber.Text; set => tbProjectNumber.Text = value; } + public string MeasurementLocation { get => lbLocation.SelectedItem.ToString(); } + + public event EventHandler MeasureButtonClick; + + public event EventHandler ClearAllMeasurementsBtnClick; + + public string DataloggerSerial { get; set; } + + + public List results = new List(); + + + public List pslineConfigs = new List(); + + public void OnClearAllMeasurementsBtnClick(EventArgs e) + { + ClearAllMeasurementsBtnClick?.Invoke(this, EventArgs.Empty); + } + + + public void OnMeasureButtonClick(EventArgs e) + { + MeasureButtonClick?.Invoke(this, EventArgs.Empty); + } + + public UserControlMeasure() + { + + InitializeComponent(); + //PopulateButtons(); + InitializePositions(); + lbLocation.SetSelected(0, true); + progressBar.Visible = false; + } + + + public void InitializePositions() + { + int posCounter = 0; + foreach (var control in flowLayoutPanelPositionButtons.Controls) + { + if (control is CheckBox) + { + posCounter++; + CheckBox cb = (CheckBox)control; + cb.Name = string.Format("{0:00}", posCounter); + cb.Checked = true; + } + } + } + + + public void OnPositionButtonClicked(object sender, EventArgs e) + { + CheckBox checkbox = (CheckBox)sender; + UpdatePositionList(); + foreach (var item in PositionList) + { + Console.WriteLine(item); + } + } + + public void UpdatePositionList() + + { + List positionList = new List(); + + foreach (var control in flowLayoutPanelPositionButtons.Controls) + { + if (control is CheckBox) + { + CheckBox checkbox = (CheckBox)control; + if (checkbox.Checked) + { + positionList.Add(checkbox.Name); + } + } + + } + + PositionList = positionList.Select(int.Parse).ToList(); + Console.WriteLine("bla"); + } + + + + public void PopulateButtons() + { + const int MAXPOSITIONS = 40; + flowLayoutPanelPositionButtons.Controls.Clear(); + for (int position = 1; position < MAXPOSITIONS + 1; position++) + { + CheckBox checkBox = new CheckBox(); + checkBox.Height = 120; + checkBox.Width = 70; + + checkBox.Name = string.Format("Position_{0}", position); + checkBox.Text = string.Format("P{0}", position); + checkBox.Appearance = Appearance.Button; + checkBox.Click += OnPositionButtonClicked; + flowLayoutPanelPositionButtons.Controls.Add(checkBox); + } + + } + + private void btnMeasure_Click(object sender, EventArgs e) + { + + } + + + private List GenFakeList() + { + List values = new List(); + + Random rnd = new Random(); + + + for (int i = 0; i < 10; i++) + { + double dummyvalue = rnd.NextDouble(); + values.Add(string.Format("{0:0.00}",dummyvalue)); + + } + + return values; + } + + public double GetResultValueByPositionAndPsline(int position, int Psline) + { + double value = 99999999; + foreach (var result in this.results) + { + if ((result.Position == position) & (Psline == result.PsLine)) + { + value = result.Value; + } + } + return value; + } + + + public void PopulateVoltage( List Results) + { + this.results = Results; + + + lvRow1Front.View = View.Details; + lvRow2Front.View = View.Details; + lvRow3Front.View = View.Details; + lvRow4Front.View = View.Details; + lvRow5Front.View = View.Details; + + + lvRow1Front.Items.Clear(); + lvRow2Front.Items.Clear(); + lvRow3Front.Items.Clear(); + lvRow4Front.Items.Clear(); + lvRow5Front.Items.Clear(); + + lvRow1Back.View = View.Details; + lvRow2Back.View = View.Details; + lvRow3Back.View = View.Details; + lvRow4Back.View = View.Details; + lvRow5Back.View = View.Details; + + lvRow1Back.Items.Clear(); + lvRow2Back.Items.Clear(); + lvRow3Back.Items.Clear(); + lvRow4Back.Items.Clear(); + lvRow5Back.Items.Clear(); + + + + foreach (var result in results) + { + if (result.Position == 1 & result.PsLine !=1) + { + + lvRow1Front.Items.Add(new ListViewItem(new string[] { string.Format("PS:{0}:{1:0.00}",result.PsLine,result.Value) })); + lvRow1Front.Items[lvRow1Front.Items.Count-1].BackColor = GetPassFailColor(result); + + } + if (result.Position == 9 & result.PsLine != 1) + { + lvRow2Front.Items.Add(new ListViewItem(new string[] { string.Format("PS:{0}:{1:0.00}", result.PsLine, result.Value) })); + lvRow2Front.Items[lvRow2Front.Items.Count - 1].BackColor = GetPassFailColor(result); + } + if (result.Position == 17 & result.PsLine != 1) + { + lvRow3Front.Items.Add(new ListViewItem(new string[] { string.Format("PS:{0}:{1:0.00}", result.PsLine, result.Value) })); + lvRow3Front.Items[lvRow3Front.Items.Count - 1].BackColor = GetPassFailColor(result); + } + if (result.Position == 25 & result.PsLine != 1) + { + lvRow4Front.Items.Add(new ListViewItem(new string[] { string.Format("PS:{0}:{1:0.00}", result.PsLine, result.Value) })); + lvRow4Front.Items[lvRow4Front.Items.Count - 1].BackColor = GetPassFailColor(result); + } + if (result.Position == 33 & result.PsLine != 1) + { + lvRow5Front.Items.Add(new ListViewItem(new string[] { string.Format("PS:{0}:{1:0.00}", result.PsLine, result.Value) })); + lvRow5Front.Items[lvRow5Front.Items.Count - 1].BackColor = GetPassFailColor(result); + } + + if (result.Position == 8 & result.PsLine != 1) + { + lvRow1Back.Items.Add(new ListViewItem(new string[] { string.Format("PS:{0}:{1:0.00}", result.PsLine, result.Value) })); + lvRow1Back.Items[lvRow1Back.Items.Count - 1].BackColor = GetPassFailColor(result); + } + if (result.Position == 16 & result.PsLine != 1) + { + lvRow2Back.Items.Add(new ListViewItem(new string[] { string.Format("PS:{0}:{1:0.00}", result.PsLine, result.Value) })); + lvRow2Back.Items[lvRow2Back.Items.Count - 1].BackColor = GetPassFailColor(result); + } + if (result.Position == 24 & result.PsLine != 1) + { + lvRow3Back.Items.Add(new ListViewItem(new string[] { string.Format("PS:{0}:{1:0.00}", result.PsLine, result.Value) })); + lvRow3Back.Items[lvRow3Back.Items.Count - 1].BackColor = GetPassFailColor(result); + } + if (result.Position == 32 & result.PsLine != 1) + { + lvRow4Back.Items.Add(new ListViewItem(new string[] { string.Format("PS:{0}:{1:0.00}", result.PsLine, result.Value) })); + lvRow4Back.Items[lvRow4Back.Items.Count - 1].BackColor = GetPassFailColor(result); + } + if (result.Position == 40 & result.PsLine != 1) + { + lvRow5Back.Items.Add(new ListViewItem(new string[] { string.Format("PS:{0}:{1:0.00}", result.PsLine, result.Value) })); + lvRow5Back.Items[lvRow5Back.Items.Count - 1].BackColor = GetPassFailColor(result); + } + + + } + + + + + + foreach (var control in flowLayoutPanelPositionButtons.Controls) + { + if (control is CheckBox) + { + CheckBox checkbox = (CheckBox)control; + + int position = Convert.ToInt32(checkbox.Name); + int psline = 1; + + var value = GetResultValueByPositionAndPsline(position, psline); + var isInTolerance = CheckIfWithinTolerance(psline,value); + + if (isInTolerance) + { + + checkbox.ForeColor = Color.Green; + } + else + { + checkbox.ForeColor = Color.Red; + } + + checkbox.Text = String.Format("Pos:{0} {1:0.000}V", position, value); + } + + } + } + + public Color GetPassFailColor(Result result) + { + var isInTolerance = CheckIfWithinTolerance(result.PsLine, result.Value); + if (isInTolerance) + { + return Color.Green; + } + else + { + return Color.Red; + } + } + + public bool CheckIfWithinTolerance(int psline, double value) + { + var tolerances = this.pslineConfigs.Where(x => x.Psline == psline).Select(x => x.Tolerance).ToList(); + var setpoints = this.pslineConfigs.Where(x => x.Psline == psline).Select(x => x.Setpoint).ToList(); + + var tolerance = tolerances[0]/100; + var setpoint = setpoints[0]; + + var upperlimit = setpoint + (tolerance * setpoint); + var lowerlimit = setpoint - (tolerance * setpoint); + + if ( value < upperlimit & value > lowerlimit) + { + return true; + } + else + { + return false; + } + } + + private void btnRow1_CheckedChanged(object sender, EventArgs e) + { + List buttons = new List {0,1,2,3,4,5,6,7}; + foreach (int button in buttons) + { + CheckBox cb = (CheckBox)flowLayoutPanelPositionButtons.Controls[button]; + cb.Checked = btnRow1.Checked; + } + } + + private void btnRow2_CheckedChanged(object sender, EventArgs e) + { + List buttons = new List { 8, 9, 10, 11, 12, 13, 14, 15 }; + foreach (int button in buttons) + { + CheckBox cb = (CheckBox)flowLayoutPanelPositionButtons.Controls[button]; + cb.Checked = btnRow2.Checked; + } + + } + + private void btnRow3_CheckedChanged(object sender, EventArgs e) + { + List buttons = new List { 16, 17, 18, 19, 20, 21, 22, 23 }; + foreach (int button in buttons) + { + CheckBox cb = (CheckBox)flowLayoutPanelPositionButtons.Controls[button]; + cb.Checked = btnRow3.Checked; + } + } + + private void btnRow4_CheckedChanged(object sender, EventArgs e) + { + List buttons = new List { 24, 25, 26, 27, 28, 29, 30, 31 }; + foreach (int button in buttons) + { + CheckBox cb = (CheckBox)flowLayoutPanelPositionButtons.Controls[button]; + cb.Checked = btnRow4.Checked; + } + } + + private void btnRow5_CheckedChanged(object sender, EventArgs e) + { + List buttons = new List { 32, 33, 34, 35, 36, 37, 38, 39 }; + foreach (int button in buttons) + { + CheckBox cb = (CheckBox)flowLayoutPanelPositionButtons.Controls[button]; + cb.Checked = btnRow5.Checked; + } + } + + private void btnCol1_CheckedChanged(object sender, EventArgs e) + { + List buttons = new List { 0,8,16,24,32 }; + foreach (int button in buttons) + { + CheckBox cb = (CheckBox)flowLayoutPanelPositionButtons.Controls[button]; + cb.Checked = btnCol1.Checked; + } + } + + private void bntCol2_CheckedChanged(object sender, EventArgs e) + { + List buttons = new List { 1, 9, 17, 25, 33 }; + foreach (int button in buttons) + { + CheckBox cb = (CheckBox)flowLayoutPanelPositionButtons.Controls[button]; + cb.Checked = bntCol2.Checked; + } + } + + private void btnCol3_CheckedChanged(object sender, EventArgs e) + { + List buttons = new List { 2, 10, 18, 26, 34 }; + foreach (int button in buttons) + { + CheckBox cb = (CheckBox)flowLayoutPanelPositionButtons.Controls[button]; + cb.Checked = btnCol3.Checked; + } + } + + private void btnCol4_CheckedChanged(object sender, EventArgs e) + { + List buttons = new List { 3, 11, 19, 27, 35 }; + foreach (int button in buttons) + { + CheckBox cb = (CheckBox)flowLayoutPanelPositionButtons.Controls[button]; + cb.Checked = btnCol4.Checked; + } + } + + private void btnCol5_CheckedChanged(object sender, EventArgs e) + { + List buttons = new List { 4, 12, 20, 28, 36 }; + foreach (int button in buttons) + { + CheckBox cb = (CheckBox)flowLayoutPanelPositionButtons.Controls[button]; + cb.Checked = btnCol5.Checked; + } + } + + private void btnCol6_CheckedChanged(object sender, EventArgs e) + { + List buttons = new List { 5, 13, 21, 29, 37 }; + foreach (int button in buttons) + { + CheckBox cb = (CheckBox)flowLayoutPanelPositionButtons.Controls[button]; + cb.Checked = btnCol6.Checked; + } + } + + private void btnCol7_CheckedChanged(object sender, EventArgs e) + { + List buttons = new List { 6, 14, 22, 30, 38 }; + foreach (int button in buttons) + { + CheckBox cb = (CheckBox)flowLayoutPanelPositionButtons.Controls[button]; + cb.Checked = btnCol7.Checked; + } + } + + private void btnCol8_CheckedChanged(object sender, EventArgs e) + { + List buttons = new List { 7, 15, 23, 31, 39 }; + foreach (int button in buttons) + { + CheckBox cb = (CheckBox)flowLayoutPanelPositionButtons.Controls[button]; + cb.Checked = btnCol8.Checked; + } + } + + private void btnAll_CheckedChanged(object sender, EventArgs e) + { + + btnRow1.Checked = btnAll.Checked; + btnRow2.Checked = btnAll.Checked; + btnRow3.Checked = btnAll.Checked; + btnRow4.Checked = btnAll.Checked; + btnRow5.Checked = btnAll.Checked; + + btnCol1.Checked = btnAll.Checked; + bntCol2.Checked = btnAll.Checked; + btnCol3.Checked = btnAll.Checked; + btnCol4.Checked = btnAll.Checked; + btnCol5.Checked = btnAll.Checked; + btnCol6.Checked = btnAll.Checked; + btnCol7.Checked = btnAll.Checked; + btnCol8.Checked = btnAll.Checked; + + + foreach (var control in flowLayoutPanelPositionButtons.Controls) + { + if (control is CheckBox) + { + CheckBox cb = (CheckBox)control; + cb.Checked = btnAll.Checked; + + } + + } + } + + private void lvRow1Front_SelectedIndexChanged(object sender, EventArgs e) + { + + } + + private void btnSaveToExcel_Click_old(object sender, EventArgs e) + { + // Path to the desired Excel file (the file we want to check) + string filePath = string.Format(@"C:\configs\P{0}_sub{1}.xlsx", tbProjectNumber.Text, tbSub.Text); + //string filePath = @"C:\configs\" + tbProjectNumber.Text + ".xlsx"; + + // Path to the source file that will be copied if the target file doesn't exist + string sourceFilePath = @"C:\configs\P240262-3 RF_JESD22-6-A108 appendix.xlsx"; ; + + // Check if the file exists + if (!File.Exists(filePath)) + { + // If the file doesn't exist, copy the source file to the desired path + File.Copy(sourceFilePath, filePath); + Console.WriteLine($"File did not exist. Copied from {sourceFilePath} to {filePath}."); + } + else + { + Console.WriteLine("File exists, proceeding to open."); + } + + // Create Excel Application instance + Excel.Application excelApp = new Excel.Application(); + + // Set the application to be invisible (optional) + excelApp.Visible = true; + excelApp.DisplayAlerts = false; + + // Open the Excel workbook + Excel.Workbook workbook = excelApp.Workbooks.Open(filePath); + + // Check if workbook "monkey" exists and open it + bool workbookFound = false; + string copiedSheetName = ""; + + foreach (Excel.Worksheet sheet in workbook.Sheets) + { + if (sheet.Name == "TEMPLATE") + { + Console.WriteLine("Workbook 'TEMPLATE' found. You can start editing."); + + // Copy the sheet + sheet.Copy(After: workbook.Sheets[workbook.Sheets.Count]); + Excel.Worksheet copiedSheet = (Excel.Worksheet)workbook.Sheets[workbook.Sheets.Count]; + copiedSheet.Name = "BIB" + workbook.Sheets.Count.ToString(); + copiedSheetName = copiedSheet.Name; + Console.WriteLine("Sheet copied and renamed"); + } + + + + } + + foreach (Excel.Worksheet sheet in workbook.Sheets) + { + workbookFound = true; + if (sheet.Name == copiedSheetName) + { + WriteDataToExcel(sheet,progressBar); + } + } + + + // Save the workbook if the sheet was found and edited + if (workbookFound) + { + workbook.Save(); + Console.WriteLine("Changes saved successfully."); + MessageBox.Show("Results Saved Successfully"); + } + else + { + Console.WriteLine("Workbook 'monkey' not found."); + } + + // Close the workbook and quit Excel application + workbook.Close(); + excelApp.Quit(); + + // Release COM objects to avoid memory leaks + ReleaseObject(workbook); + ReleaseObject(excelApp); + + + + + } + private bool SheetExists(Excel.Workbook workbook, string sheetName) + { + foreach (Excel.Worksheet sheet in workbook.Sheets) + { + if (sheet.Name.Equals(sheetName, StringComparison.OrdinalIgnoreCase)) + { + return true; + } + } + return false; + } + + private void btnSaveToExcel_Click(object sender, EventArgs e) + { + string filePath = $@"C:\configs\P{tbProjectNumber.Text}_sub{tbSub.Text}_step{tbStep.Text}.xlsx"; + string sourceFilePath = $@"C:\configs\P240262-3 RF_JESD22-6-A108 appendix.xlsx"; + + if (!File.Exists(filePath)) + { + File.Copy(sourceFilePath, filePath); + Console.WriteLine($"File did not exist. Copied from {sourceFilePath} to {filePath}."); + } + else + { + Console.WriteLine("File exists, proceeding to open."); + } + + Excel.Application excelApp = new Excel.Application + { + Visible = false, + DisplayAlerts = false + }; + + Excel.Workbook workbook = excelApp.Workbooks.Open(filePath); + string copiedSheetName = ""; + + List AllSheetNamesInWorkbook = new List(); + AllSheetNamesInWorkbook.Clear(); + + foreach (Excel.Worksheet sheet in workbook.Sheets) + { + AllSheetNamesInWorkbook.Add(sheet.Name); + } + + foreach (Excel.Worksheet sheet in workbook.Sheets) + { + if (sheet.Name == "TEMPLATE") + { + Console.WriteLine("Workbook 'TEMPLATE' found. You can start editing."); + sheet.Copy(After: workbook.Sheets[workbook.Sheets.Count]); + Excel.Worksheet copiedSheet = (Excel.Worksheet)workbook.Sheets[workbook.Sheets.Count]; + + char postfix = 'A'; + copiedSheetName = $@"BIB{tbBibID.Text}_{postfix}"; + + while (AllSheetNamesInWorkbook.Contains(copiedSheetName)) + { + postfix += (char) 1; + copiedSheetName = $@"BIB{tbBibID.Text}_{postfix}"; + } + copiedSheet.Name = copiedSheetName; + + Console.WriteLine("Sheet copied and renamed"); + /* + // Copy conditional formatting + Excel.Range sourceRange = sheet.UsedRange; + Excel.Range targetRange = copiedSheet.UsedRange; + + //sourceRange.Copy(); + //targetRange.PasteSpecial(Excel.XlPasteType.xlPasteFormats); + + sourceRange.Copy(Type.Missing); // Still needed for PasteSpecial to work sometimes + targetRange.PasteSpecial( + Excel.XlPasteType.xlPasteFormats, + Excel.XlPasteSpecialOperation.xlPasteSpecialOperationNone, + false, false); + break; + */ + } + } + + if (!string.IsNullOrEmpty(copiedSheetName)) + { + Excel.Worksheet sheet = workbook.Sheets[copiedSheetName]; + WriteDataToExcel(sheet,progressBar); + workbook.Save(); + Console.WriteLine("Changes saved successfully."); + MessageBox.Show("Results Saved Successfully"); + } + else + { + Console.WriteLine("Workbook 'TEMPLATE' not found."); + } + + workbook.Close(); + excelApp.Quit(); + + ReleaseObject(workbook); + ReleaseObject(excelApp); + } + + private static long GetUnixTimestamp() + { + DateTimeOffset now = DateTimeOffset.Now; + return now.ToUnixTimeSeconds(); + } + + // Utility function to release COM objects + static void ReleaseObject(object obj) + { + try + { + System.Runtime.InteropServices.Marshal.ReleaseComObject(obj); + obj = null; + } + catch (Exception ex) + { + obj = null; + Console.WriteLine("Unable to release object: " + ex.ToString()); + } + finally + { + GC.Collect(); + } + } + + public void WriteDataToExcel(Excel.Worksheet sheet, ProgressBar progressBar) + { + // Initialize the progress bar + progressBar.Minimum = 0; + progressBar.Maximum = results.Count; + progressBar.Value = 0; + + progressBar.Visible = true; + + foreach (var result in results) + { + //PS1 + if (result.Position == 1 & result.PsLine == 1) { sheet.Cells[8, 3] = result.Value; } + if (result.Position == 2 & result.PsLine == 1) { sheet.Cells[8, 4] = result.Value; } + if (result.Position == 3 & result.PsLine == 1) { sheet.Cells[8, 5] = result.Value; } + if (result.Position == 4 & result.PsLine == 1) { sheet.Cells[8, 6] = result.Value; } + if (result.Position == 5 & result.PsLine == 1) { sheet.Cells[8, 7] = result.Value; } + if (result.Position == 6 & result.PsLine == 1) { sheet.Cells[8, 8] = result.Value; } + if (result.Position == 7 & result.PsLine == 1) { sheet.Cells[8, 9] = result.Value; } + if (result.Position == 8 & result.PsLine == 1) { sheet.Cells[8, 10] = result.Value; } + + if (result.Position == 9 & result.PsLine == 1) { sheet.Cells[9, 3] = result.Value; } + if (result.Position == 10 & result.PsLine == 1) { sheet.Cells[9, 4] = result.Value; } + if (result.Position == 11 & result.PsLine == 1) { sheet.Cells[9, 5] = result.Value; } + if (result.Position == 12 & result.PsLine == 1) { sheet.Cells[9, 6] = result.Value; } + if (result.Position == 13 & result.PsLine == 1) { sheet.Cells[9, 7] = result.Value; } + if (result.Position == 14 & result.PsLine == 1) { sheet.Cells[9, 8] = result.Value; } + if (result.Position == 15 & result.PsLine == 1) { sheet.Cells[9, 9] = result.Value; } + if (result.Position == 16 & result.PsLine == 1) { sheet.Cells[9, 10] = result.Value; } + + if (result.Position == 17 & result.PsLine == 1) { sheet.Cells[10, 3] = result.Value; } + if (result.Position == 18 & result.PsLine == 1) { sheet.Cells[10, 4] = result.Value; } + if (result.Position == 19 & result.PsLine == 1) { sheet.Cells[10, 5] = result.Value; } + if (result.Position == 20 & result.PsLine == 1) { sheet.Cells[10, 6] = result.Value; } + if (result.Position == 21 & result.PsLine == 1) { sheet.Cells[10, 7] = result.Value; } + if (result.Position == 22 & result.PsLine == 1) { sheet.Cells[10, 8] = result.Value; } + if (result.Position == 23 & result.PsLine == 1) { sheet.Cells[10, 9] = result.Value; } + if (result.Position == 24 & result.PsLine == 1) { sheet.Cells[10, 10] = result.Value; } + + if (result.Position == 25 & result.PsLine == 1) { sheet.Cells[11, 3] = result.Value; } + if (result.Position == 26 & result.PsLine == 1) { sheet.Cells[11, 4] = result.Value; } + if (result.Position == 27 & result.PsLine == 1) { sheet.Cells[11, 5] = result.Value; } + if (result.Position == 28 & result.PsLine == 1) { sheet.Cells[11, 6] = result.Value; } + if (result.Position == 29 & result.PsLine == 1) { sheet.Cells[11, 7] = result.Value; } + if (result.Position == 30 & result.PsLine == 1) { sheet.Cells[11, 8] = result.Value; } + if (result.Position == 31 & result.PsLine == 1) { sheet.Cells[11, 9] = result.Value; } + if (result.Position == 32 & result.PsLine == 1) { sheet.Cells[11, 10] = result.Value; } + + if (result.Position == 33 & result.PsLine == 1) { sheet.Cells[12, 3] = result.Value; } + if (result.Position == 34 & result.PsLine == 1) { sheet.Cells[12, 4] = result.Value; } + if (result.Position == 35 & result.PsLine == 1) { sheet.Cells[12, 5] = result.Value; } + if (result.Position == 36 & result.PsLine == 1) { sheet.Cells[12, 6] = result.Value; } + if (result.Position == 37 & result.PsLine == 1) { sheet.Cells[12, 7] = result.Value; } + if (result.Position == 38 & result.PsLine == 1) { sheet.Cells[12, 8] = result.Value; } + if (result.Position == 39 & result.PsLine == 1) { sheet.Cells[12, 9] = result.Value; } + if (result.Position == 40 & result.PsLine == 1) { sheet.Cells[12, 10] = result.Value; } + + //PS2 + if (result.Position == 1 & result.PsLine == 2) { sheet.Cells[8, 11] = result.Value; } + if (result.Position == 8 & result.PsLine == 2) { sheet.Cells[8, 12] = result.Value; } + if (result.Position == 9 & result.PsLine == 2) { sheet.Cells[9, 11] = result.Value; } + if (result.Position == 16 & result.PsLine == 2) { sheet.Cells[9, 12] = result.Value; } + if (result.Position == 17 & result.PsLine == 2) { sheet.Cells[10, 11] = result.Value; } + if (result.Position == 24 & result.PsLine == 2) { sheet.Cells[10, 12] = result.Value; } + if (result.Position == 25 & result.PsLine == 2) { sheet.Cells[11, 11] = result.Value; } + if (result.Position == 32 & result.PsLine == 2) { sheet.Cells[11, 12] = result.Value; } + if (result.Position == 33 & result.PsLine == 2) { sheet.Cells[12, 11] = result.Value; } + if (result.Position == 40 & result.PsLine == 2) { sheet.Cells[12, 12] = result.Value; } + + //PS3 + if (result.Position == 1 & result.PsLine == 3) { sheet.Cells[8, 13] = result.Value; } + if (result.Position == 8 & result.PsLine == 3) { sheet.Cells[8, 14] = result.Value; } + if (result.Position == 9 & result.PsLine == 3) { sheet.Cells[9, 13] = result.Value; } + if (result.Position == 16 & result.PsLine == 3) { sheet.Cells[9, 14] = result.Value; } + if (result.Position == 17 & result.PsLine == 3) { sheet.Cells[10, 13] = result.Value; } + if (result.Position == 24 & result.PsLine == 3) { sheet.Cells[10, 14] = result.Value; } + if (result.Position == 25 & result.PsLine == 3) { sheet.Cells[11, 13] = result.Value; } + if (result.Position == 32 & result.PsLine == 3) { sheet.Cells[11, 14] = result.Value; } + if (result.Position == 33 & result.PsLine == 3) { sheet.Cells[12, 13] = result.Value; } + if (result.Position == 40 & result.PsLine == 3) { sheet.Cells[12, 14] = result.Value; } + + //PS4 + if (result.Position == 1 & result.PsLine == 4) { sheet.Cells[8, 15] = result.Value; } + if (result.Position == 8 & result.PsLine == 4) { sheet.Cells[8, 16] = result.Value; } + if (result.Position == 9 & result.PsLine == 4) { sheet.Cells[9, 15] = result.Value; } + if (result.Position == 16 & result.PsLine == 4) { sheet.Cells[9, 16] = result.Value; } + if (result.Position == 17 & result.PsLine == 4) { sheet.Cells[10, 15] = result.Value; } + if (result.Position == 24 & result.PsLine == 4) { sheet.Cells[10, 16] = result.Value; } + if (result.Position == 25 & result.PsLine == 4) { sheet.Cells[11, 15] = result.Value; } + if (result.Position == 32 & result.PsLine == 4) { sheet.Cells[11, 16] = result.Value; } + if (result.Position == 33 & result.PsLine == 4) { sheet.Cells[12, 15] = result.Value; } + if (result.Position == 40 & result.PsLine == 4) { sheet.Cells[12, 16] = result.Value; } + + //PS5 + if (result.Position == 1 & result.PsLine == 5) { sheet.Cells[8, 17] = result.Value; } + if (result.Position == 8 & result.PsLine == 5) { sheet.Cells[8, 18] = result.Value; } + if (result.Position == 9 & result.PsLine == 5) { sheet.Cells[9, 17] = result.Value; } + if (result.Position == 16 & result.PsLine == 5) { sheet.Cells[9, 18] = result.Value; } + if (result.Position == 17 & result.PsLine == 5) { sheet.Cells[10, 17] = result.Value; } + if (result.Position == 24 & result.PsLine == 5) { sheet.Cells[10, 18] = result.Value; } + if (result.Position == 25 & result.PsLine == 5) { sheet.Cells[11, 17] = result.Value; } + if (result.Position == 32 & result.PsLine == 5) { sheet.Cells[11, 18] = result.Value; } + if (result.Position == 33 & result.PsLine == 5) { sheet.Cells[12, 17] = result.Value; } + if (result.Position == 40 & result.PsLine == 5) { sheet.Cells[12, 18] = result.Value; } + + //PS6 + if (result.Position == 1 & result.PsLine == 6) { sheet.Cells[26, 3] = result.Value; } + if (result.Position == 8 & result.PsLine == 6) { sheet.Cells[26, 4] = result.Value; } + if (result.Position == 9 & result.PsLine == 6) { sheet.Cells[27, 3] = result.Value; } + if (result.Position == 16 & result.PsLine == 6) { sheet.Cells[27, 4] = result.Value; } + if (result.Position == 17 & result.PsLine == 6) { sheet.Cells[28, 3] = result.Value; } + if (result.Position == 24 & result.PsLine == 6) { sheet.Cells[28, 4] = result.Value; } + if (result.Position == 25 & result.PsLine == 6) { sheet.Cells[29, 3] = result.Value; } + if (result.Position == 32 & result.PsLine == 6) { sheet.Cells[29, 4] = result.Value; } + if (result.Position == 33 & result.PsLine == 6) { sheet.Cells[30, 3] = result.Value; } + if (result.Position == 40 & result.PsLine == 6) { sheet.Cells[30, 4] = result.Value; } + + //PS7 + if (result.Position == 1 & result.PsLine == 7) { sheet.Cells[26, 5] = result.Value; } + if (result.Position == 8 & result.PsLine == 7) { sheet.Cells[26, 6] = result.Value; } + if (result.Position == 9 & result.PsLine == 7) { sheet.Cells[27, 5] = result.Value; } + if (result.Position == 16 & result.PsLine == 7) { sheet.Cells[27, 6] = result.Value; } + if (result.Position == 17 & result.PsLine == 7) { sheet.Cells[28, 5] = result.Value; } + if (result.Position == 24 & result.PsLine == 7) { sheet.Cells[28, 6] = result.Value; } + if (result.Position == 25 & result.PsLine == 7) { sheet.Cells[29, 5] = result.Value; } + if (result.Position == 32 & result.PsLine == 7) { sheet.Cells[29, 6] = result.Value; } + if (result.Position == 33 & result.PsLine == 7) { sheet.Cells[30, 5] = result.Value; } + if (result.Position == 40 & result.PsLine == 7) { sheet.Cells[30, 6] = result.Value; } + + //PS8 + if (result.Position == 1 & result.PsLine == 8) { sheet.Cells[26, 7] = result.Value; } + if (result.Position == 8 & result.PsLine == 8) { sheet.Cells[26, 8] = result.Value; } + if (result.Position == 9 & result.PsLine == 8) { sheet.Cells[27, 7] = result.Value; } + if (result.Position == 16 & result.PsLine == 8) { sheet.Cells[27, 8] = result.Value; } + if (result.Position == 17 & result.PsLine == 8) { sheet.Cells[28, 7] = result.Value; } + if (result.Position == 24 & result.PsLine == 8) { sheet.Cells[28, 8] = result.Value; } + if (result.Position == 25 & result.PsLine == 8) { sheet.Cells[29, 7] = result.Value; } + if (result.Position == 32 & result.PsLine == 8) { sheet.Cells[29, 8] = result.Value; } + if (result.Position == 33 & result.PsLine == 8) { sheet.Cells[30, 7] = result.Value; } + if (result.Position == 40 & result.PsLine == 8) { sheet.Cells[30, 8] = result.Value; } + + //PS9 + if (result.Position == 1 & result.PsLine == 9) { sheet.Cells[26, 9] = result.Value; } + if (result.Position == 8 & result.PsLine == 9) { sheet.Cells[26, 10] = result.Value; } + if (result.Position == 9 & result.PsLine == 9) { sheet.Cells[27, 9] = result.Value; } + if (result.Position == 16 & result.PsLine == 9) { sheet.Cells[27, 10] = result.Value; } + if (result.Position == 17 & result.PsLine == 9) { sheet.Cells[28, 9] = result.Value; } + if (result.Position == 24 & result.PsLine == 9) { sheet.Cells[28, 10] = result.Value; } + if (result.Position == 25 & result.PsLine == 9) { sheet.Cells[29, 9] = result.Value; } + if (result.Position == 32 & result.PsLine == 9) { sheet.Cells[29, 10] = result.Value; } + if (result.Position == 33 & result.PsLine == 9) { sheet.Cells[30, 9] = result.Value; } + if (result.Position == 40 & result.PsLine == 9) { sheet.Cells[30, 10] = result.Value; } + + //PS10 + if (result.Position == 1 & result.PsLine == 10) { sheet.Cells[26, 11] = result.Value; } + if (result.Position == 8 & result.PsLine == 10) { sheet.Cells[26, 12] = result.Value; } + if (result.Position == 9 & result.PsLine == 10) { sheet.Cells[27, 11] = result.Value; } + if (result.Position == 16 & result.PsLine == 10) { sheet.Cells[27, 12] = result.Value; } + if (result.Position == 17 & result.PsLine == 10) { sheet.Cells[28, 11] = result.Value; } + if (result.Position == 24 & result.PsLine == 10) { sheet.Cells[28, 12] = result.Value; } + if (result.Position == 25 & result.PsLine == 10) { sheet.Cells[29, 11] = result.Value; } + if (result.Position == 32 & result.PsLine == 10) { sheet.Cells[29, 12] = result.Value; } + if (result.Position == 33 & result.PsLine == 10) { sheet.Cells[30, 11] = result.Value; } + if (result.Position == 40 & result.PsLine == 10) { sheet.Cells[30, 12] = result.Value; } + + // Update the progress bar + progressBar.Value++; + + } + sheet.Unprotect(); + WritePsuConfigData(sheet); + WriteStaticData(sheet); + + + progressBar.Visible = false; + + } + private void WriteStaticData(Excel.Worksheet sheet) + { + sheet.Cells[57, 17] = DateTime.UtcNow.ToString(); + sheet.Cells[58, 17] = DataloggerSerial; + sheet.Cells[59, 17] = tbProjectNumber.Text; + sheet.Cells[60, 17] = tbBibID.Text; + sheet.Cells[61, 17] = tbDriverID.Text; + sheet.Cells[62, 17] = lbLocation.SelectedItem.ToString(); + } + + private void WritePsuConfigData(Excel.Worksheet sheet) + { + foreach (var psuline in pslineConfigs) + { + switch (psuline.Psline) + { + case 1: + sheet.Cells[5, 3] = psuline.Description; + sheet.Cells[6, 3] = psuline.Setpoint; + sheet.Cells[7, 3] = psuline.Tolerance/100; + break; + case 2: + sheet.Cells[5, 11] = psuline.Description; + sheet.Cells[6, 11] = psuline.Setpoint; + sheet.Cells[7, 11] = psuline.Tolerance/100; + break; + case 3: + sheet.Cells[5, 13] = psuline.Description; + sheet.Cells[6, 13] = psuline.Setpoint; + sheet.Cells[7, 13] = psuline.Tolerance/100; + break; + case 4: + sheet.Cells[5, 15] = psuline.Description; + sheet.Cells[6, 15] = psuline.Setpoint; + sheet.Cells[7, 15] = psuline.Tolerance/100; + break; + case 5: + sheet.Cells[5, 17] = psuline.Description; + sheet.Cells[6, 17] = psuline.Setpoint; + sheet.Cells[7, 17] = psuline.Tolerance/100; + break; + case 6: + sheet.Cells[23, 3] = psuline.Description; + sheet.Cells[24, 3] = psuline.Setpoint; + sheet.Cells[25, 3] = psuline.Tolerance/100; + break; + case 7: + sheet.Cells[23, 5] = psuline.Description; + sheet.Cells[24, 5] = psuline.Setpoint; + sheet.Cells[25, 5] = psuline.Tolerance/100; + break; + case 8: + sheet.Cells[23, 7] = psuline.Description; + sheet.Cells[24, 7] = psuline.Setpoint; + sheet.Cells[25, 7] = psuline.Tolerance/100; + break; + case 9: + sheet.Cells[23, 9] = psuline.Description; + sheet.Cells[24, 9] = psuline.Setpoint; + sheet.Cells[25, 9] = psuline.Tolerance/100; + break; + case 10: + sheet.Cells[23, 11] = psuline.Description; + sheet.Cells[24, 11] = psuline.Setpoint; + sheet.Cells[25, 11] = psuline.Tolerance/100; + break; + case 11: + sheet.Cells[23, 13] = psuline.Description; + sheet.Cells[24, 13] = psuline.Setpoint; + sheet.Cells[25, 13] = psuline.Tolerance/100; + break; + case 12: + sheet.Cells[23, 15] = psuline.Description; + sheet.Cells[24, 15] = psuline.Setpoint; + sheet.Cells[25, 15] = psuline.Tolerance/100; + break; + default: + break; + } + + } + + + } + + private void button1_Click(object sender, EventArgs e) + { + OnClearAllMeasurementsBtnClick(EventArgs.Empty); + } + + private void btnMeasure_Click_1(object sender, EventArgs e) + { + UpdatePositionList(); + OnMeasureButtonClick(EventArgs.Empty); + + } + + private void UserControlMeasure_Load(object sender, EventArgs e) + { + + } + } +} diff --git a/daq_testing/UserControlMeasure.resx b/daq_testing/UserControlMeasure.resx new file mode 100644 index 0000000..1af7de1 --- /dev/null +++ b/daq_testing/UserControlMeasure.resx @@ -0,0 +1,120 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 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/daq_testing/UserControlMeasureHeader.Designer.cs b/daq_testing/UserControlMeasureHeader.Designer.cs new file mode 100644 index 0000000..3b865f9 --- /dev/null +++ b/daq_testing/UserControlMeasureHeader.Designer.cs @@ -0,0 +1,379 @@ + +namespace daq_testing +{ + partial class UserControlMeasureHeader + { + /// + /// 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 Component Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + this.dataGridView1 = new System.Windows.Forms.DataGridView(); + this.lbLocation = new System.Windows.Forms.ListBox(); + this.label6 = new System.Windows.Forms.Label(); + this.tbBibID = new System.Windows.Forms.TextBox(); + this.tbDriverID = new System.Windows.Forms.TextBox(); + this.tbStep = new System.Windows.Forms.TextBox(); + this.label5 = new System.Windows.Forms.Label(); + this.label4 = new System.Windows.Forms.Label(); + this.tbSub = new System.Windows.Forms.TextBox(); + this.tbProjectNumber = new System.Windows.Forms.TextBox(); + this.label3 = new System.Windows.Forms.Label(); + this.label2 = new System.Windows.Forms.Label(); + this.label1 = new System.Windows.Forms.Label(); + this.btnMeasure = new System.Windows.Forms.Button(); + this.btnSaveToExcel = new System.Windows.Forms.Button(); + this.btnClearAllMeasurements = new System.Windows.Forms.Button(); + this.btnNextPosition = new System.Windows.Forms.Button(); + this.tbCurrentPosition = new System.Windows.Forms.TextBox(); + this.label7 = new System.Windows.Forms.Label(); + this.lbMeasuredPins = new System.Windows.Forms.CheckedListBox(); + this.btnInvertListboxMeasuredPins = new System.Windows.Forms.Button(); + this.label8 = new System.Windows.Forms.Label(); + this.tbIncrement = new System.Windows.Forms.TextBox(); + this.lbIncrement = new System.Windows.Forms.Label(); + ((System.ComponentModel.ISupportInitialize)(this.dataGridView1)).BeginInit(); + this.SuspendLayout(); + // + // dataGridView1 + // + this.dataGridView1.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; + this.dataGridView1.Location = new System.Drawing.Point(421, 161); + this.dataGridView1.Margin = new System.Windows.Forms.Padding(4); + this.dataGridView1.Name = "dataGridView1"; + this.dataGridView1.RowHeadersWidth = 51; + this.dataGridView1.Size = new System.Drawing.Size(1265, 471); + this.dataGridView1.TabIndex = 0; + this.dataGridView1.CellContentClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dataGridView1_CellContentClick); + // + // lbLocation + // + this.lbLocation.FormattingEnabled = true; + this.lbLocation.ItemHeight = 16; + this.lbLocation.Items.AddRange(new object[] { + "BENCH DEV1", + "BENCH DEV2", + "CUBE1 UPPER", + "CUBE2 LOWER", + "MSL UPPER", + "MSL LOWER"}); + this.lbLocation.Location = new System.Drawing.Point(137, 161); + this.lbLocation.Margin = new System.Windows.Forms.Padding(4); + this.lbLocation.Name = "lbLocation"; + this.lbLocation.Size = new System.Drawing.Size(136, 100); + this.lbLocation.TabIndex = 25; + // + // label6 + // + this.label6.AutoSize = true; + this.label6.Location = new System.Drawing.Point(25, 161); + this.label6.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + this.label6.Name = "label6"; + this.label6.Size = new System.Drawing.Size(62, 17); + this.label6.TabIndex = 24; + this.label6.Text = "Location"; + // + // tbBibID + // + this.tbBibID.Location = new System.Drawing.Point(137, 89); + this.tbBibID.Margin = new System.Windows.Forms.Padding(4); + this.tbBibID.Name = "tbBibID"; + this.tbBibID.Size = new System.Drawing.Size(57, 22); + this.tbBibID.TabIndex = 23; + this.tbBibID.Text = "1"; + // + // tbDriverID + // + this.tbDriverID.Location = new System.Drawing.Point(137, 57); + this.tbDriverID.Margin = new System.Windows.Forms.Padding(4); + this.tbDriverID.Name = "tbDriverID"; + this.tbDriverID.Size = new System.Drawing.Size(57, 22); + this.tbDriverID.TabIndex = 22; + this.tbDriverID.Text = "1"; + // + // tbStep + // + this.tbStep.Location = new System.Drawing.Point(329, 25); + this.tbStep.Margin = new System.Windows.Forms.Padding(4); + this.tbStep.Name = "tbStep"; + this.tbStep.Size = new System.Drawing.Size(39, 22); + this.tbStep.TabIndex = 21; + this.tbStep.Text = "1"; + // + // label5 + // + this.label5.AutoSize = true; + this.label5.Location = new System.Drawing.Point(283, 28); + this.label5.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + this.label5.Name = "label5"; + this.label5.Size = new System.Drawing.Size(37, 17); + this.label5.TabIndex = 20; + this.label5.Text = "Step"; + // + // label4 + // + this.label4.AutoSize = true; + this.label4.Location = new System.Drawing.Point(204, 28); + this.label4.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + this.label4.Name = "label4"; + this.label4.Size = new System.Drawing.Size(33, 17); + this.label4.TabIndex = 19; + this.label4.Text = "Sub"; + // + // tbSub + // + this.tbSub.Location = new System.Drawing.Point(235, 25); + this.tbSub.Margin = new System.Windows.Forms.Padding(4); + this.tbSub.Name = "tbSub"; + this.tbSub.Size = new System.Drawing.Size(39, 22); + this.tbSub.TabIndex = 18; + this.tbSub.Text = "1"; + // + // tbProjectNumber + // + this.tbProjectNumber.Location = new System.Drawing.Point(137, 25); + this.tbProjectNumber.Margin = new System.Windows.Forms.Padding(4); + this.tbProjectNumber.Name = "tbProjectNumber"; + this.tbProjectNumber.Size = new System.Drawing.Size(57, 22); + this.tbProjectNumber.TabIndex = 17; + this.tbProjectNumber.Text = "240000"; + // + // label3 + // + this.label3.AutoSize = true; + this.label3.Location = new System.Drawing.Point(25, 92); + this.label3.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + this.label3.Name = "label3"; + this.label3.Size = new System.Drawing.Size(29, 17); + this.label3.TabIndex = 16; + this.label3.Text = "BIB"; + // + // label2 + // + this.label2.AutoSize = true; + this.label2.Location = new System.Drawing.Point(25, 63); + this.label2.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + this.label2.Name = "label2"; + this.label2.Size = new System.Drawing.Size(59, 17); + this.label2.TabIndex = 15; + this.label2.Text = "DriverID"; + // + // label1 + // + this.label1.AutoSize = true; + this.label1.Location = new System.Drawing.Point(25, 25); + this.label1.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + this.label1.Name = "label1"; + this.label1.Size = new System.Drawing.Size(102, 17); + this.label1.TabIndex = 14; + this.label1.Text = "ProjectNumber"; + // + // btnMeasure + // + this.btnMeasure.Location = new System.Drawing.Point(958, 671); + this.btnMeasure.Margin = new System.Windows.Forms.Padding(4); + this.btnMeasure.Name = "btnMeasure"; + this.btnMeasure.Size = new System.Drawing.Size(141, 71); + this.btnMeasure.TabIndex = 53; + this.btnMeasure.Text = "Measure"; + this.btnMeasure.UseVisualStyleBackColor = true; + this.btnMeasure.Click += new System.EventHandler(this.btnMeasure_Click); + // + // btnSaveToExcel + // + this.btnSaveToExcel.Location = new System.Drawing.Point(1318, 675); + this.btnSaveToExcel.Margin = new System.Windows.Forms.Padding(4); + this.btnSaveToExcel.Name = "btnSaveToExcel"; + this.btnSaveToExcel.Size = new System.Drawing.Size(143, 71); + this.btnSaveToExcel.TabIndex = 52; + this.btnSaveToExcel.Text = "SAVE"; + this.btnSaveToExcel.UseVisualStyleBackColor = true; + this.btnSaveToExcel.Click += new System.EventHandler(this.btnSaveToExcel_Click); + // + // btnClearAllMeasurements + // + this.btnClearAllMeasurements.Location = new System.Drawing.Point(1545, 675); + this.btnClearAllMeasurements.Margin = new System.Windows.Forms.Padding(4); + this.btnClearAllMeasurements.Name = "btnClearAllMeasurements"; + this.btnClearAllMeasurements.Size = new System.Drawing.Size(141, 71); + this.btnClearAllMeasurements.TabIndex = 51; + this.btnClearAllMeasurements.Text = "Clear All Measurements"; + this.btnClearAllMeasurements.UseVisualStyleBackColor = true; + this.btnClearAllMeasurements.Click += new System.EventHandler(this.btnClearAllMeasurements_Click); + // + // btnNextPosition + // + this.btnNextPosition.Location = new System.Drawing.Point(1108, 671); + this.btnNextPosition.Margin = new System.Windows.Forms.Padding(4); + this.btnNextPosition.Name = "btnNextPosition"; + this.btnNextPosition.Size = new System.Drawing.Size(141, 71); + this.btnNextPosition.TabIndex = 54; + this.btnNextPosition.Text = "Next Position"; + this.btnNextPosition.UseVisualStyleBackColor = true; + this.btnNextPosition.Click += new System.EventHandler(this.btnNextPosition_Click); + // + // tbCurrentPosition + // + this.tbCurrentPosition.Location = new System.Drawing.Point(1494, 106); + this.tbCurrentPosition.Margin = new System.Windows.Forms.Padding(4); + this.tbCurrentPosition.Name = "tbCurrentPosition"; + this.tbCurrentPosition.Size = new System.Drawing.Size(76, 22); + this.tbCurrentPosition.TabIndex = 55; + this.tbCurrentPosition.Text = "1"; + // + // label7 + // + this.label7.AutoSize = true; + this.label7.Location = new System.Drawing.Point(1579, 110); + this.label7.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + this.label7.Name = "label7"; + this.label7.Size = new System.Drawing.Size(109, 17); + this.label7.TabIndex = 56; + this.label7.Text = "Current Position"; + // + // lbMeasuredPins + // + this.lbMeasuredPins.FormattingEnabled = true; + this.lbMeasuredPins.Items.AddRange(new object[] { + "1", + "2", + "3", + "4", + "5", + "6", + "7", + "8", + "9"}); + this.lbMeasuredPins.Location = new System.Drawing.Point(137, 406); + this.lbMeasuredPins.Margin = new System.Windows.Forms.Padding(4); + this.lbMeasuredPins.Name = "lbMeasuredPins"; + this.lbMeasuredPins.Size = new System.Drawing.Size(100, 225); + this.lbMeasuredPins.TabIndex = 57; + this.lbMeasuredPins.ItemCheck += new System.Windows.Forms.ItemCheckEventHandler(this.lbMeasuredPins_ItemCheck); + // + // btnInvertListboxMeasuredPins + // + this.btnInvertListboxMeasuredPins.Location = new System.Drawing.Point(248, 604); + this.btnInvertListboxMeasuredPins.Margin = new System.Windows.Forms.Padding(4); + this.btnInvertListboxMeasuredPins.Name = "btnInvertListboxMeasuredPins"; + this.btnInvertListboxMeasuredPins.Size = new System.Drawing.Size(100, 28); + this.btnInvertListboxMeasuredPins.TabIndex = 58; + this.btnInvertListboxMeasuredPins.Text = "Invert"; + this.btnInvertListboxMeasuredPins.UseVisualStyleBackColor = true; + this.btnInvertListboxMeasuredPins.Click += new System.EventHandler(this.btnInvertListboxMeasuredPins_Click); + // + // label8 + // + this.label8.AutoSize = true; + this.label8.Location = new System.Drawing.Point(137, 383); + this.label8.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + this.label8.Name = "label8"; + this.label8.Size = new System.Drawing.Size(101, 17); + this.label8.TabIndex = 59; + this.label8.Text = "Measured pins"; + // + // tbIncrement + // + this.tbIncrement.Location = new System.Drawing.Point(1286, 107); + this.tbIncrement.Margin = new System.Windows.Forms.Padding(4); + this.tbIncrement.Name = "tbIncrement"; + this.tbIncrement.Size = new System.Drawing.Size(76, 22); + this.tbIncrement.TabIndex = 60; + this.tbIncrement.Text = "1"; + // + // lbIncrement + // + this.lbIncrement.AutoSize = true; + this.lbIncrement.Location = new System.Drawing.Point(1370, 111); + this.lbIncrement.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + this.lbIncrement.Name = "lbIncrement"; + this.lbIncrement.Size = new System.Drawing.Size(70, 17); + this.lbIncrement.TabIndex = 61; + this.lbIncrement.Text = "Increment"; + // + // UserControlMeasureHeader + // + this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 16F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.Controls.Add(this.lbIncrement); + this.Controls.Add(this.tbIncrement); + this.Controls.Add(this.label8); + this.Controls.Add(this.btnInvertListboxMeasuredPins); + this.Controls.Add(this.lbMeasuredPins); + this.Controls.Add(this.label7); + this.Controls.Add(this.tbCurrentPosition); + this.Controls.Add(this.btnNextPosition); + this.Controls.Add(this.btnMeasure); + this.Controls.Add(this.btnSaveToExcel); + this.Controls.Add(this.btnClearAllMeasurements); + this.Controls.Add(this.lbLocation); + this.Controls.Add(this.label6); + this.Controls.Add(this.tbBibID); + this.Controls.Add(this.tbDriverID); + this.Controls.Add(this.tbStep); + this.Controls.Add(this.label5); + this.Controls.Add(this.label4); + this.Controls.Add(this.tbSub); + this.Controls.Add(this.tbProjectNumber); + this.Controls.Add(this.label3); + this.Controls.Add(this.label2); + this.Controls.Add(this.label1); + this.Controls.Add(this.dataGridView1); + this.Margin = new System.Windows.Forms.Padding(4); + this.Name = "UserControlMeasureHeader"; + this.Size = new System.Drawing.Size(1767, 842); + ((System.ComponentModel.ISupportInitialize)(this.dataGridView1)).EndInit(); + this.ResumeLayout(false); + this.PerformLayout(); + + } + + #endregion + + private System.Windows.Forms.DataGridView dataGridView1; + private System.Windows.Forms.ListBox lbLocation; + private System.Windows.Forms.Label label6; + private System.Windows.Forms.TextBox tbBibID; + private System.Windows.Forms.TextBox tbDriverID; + private System.Windows.Forms.TextBox tbStep; + private System.Windows.Forms.Label label5; + private System.Windows.Forms.Label label4; + private System.Windows.Forms.TextBox tbSub; + private System.Windows.Forms.TextBox tbProjectNumber; + private System.Windows.Forms.Label label3; + private System.Windows.Forms.Label label2; + private System.Windows.Forms.Label label1; + private System.Windows.Forms.Button btnMeasure; + private System.Windows.Forms.Button btnSaveToExcel; + private System.Windows.Forms.Button btnClearAllMeasurements; + private System.Windows.Forms.Button btnNextPosition; + private System.Windows.Forms.TextBox tbCurrentPosition; + private System.Windows.Forms.Label label7; + private System.Windows.Forms.CheckedListBox lbMeasuredPins; + private System.Windows.Forms.Button btnInvertListboxMeasuredPins; + private System.Windows.Forms.Label label8; + private System.Windows.Forms.TextBox tbIncrement; + private System.Windows.Forms.Label lbIncrement; + } +} diff --git a/daq_testing/UserControlMeasureHeader.cs b/daq_testing/UserControlMeasureHeader.cs new file mode 100644 index 0000000..b663ec3 --- /dev/null +++ b/daq_testing/UserControlMeasureHeader.cs @@ -0,0 +1,246 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Forms; +using WindowsFormsApp5; +using Excel = Microsoft.Office.Interop.Excel; + +namespace daq_testing +{ + public partial class UserControlMeasureHeader : UserControl + { + public string ProjectNumber { get => tbProjectNumber.Text; set => tbProjectNumber.Text = value; } + public string MeasurementLocation { get => lbLocation.SelectedItem.ToString(); } + public string CurrentMeasurePosition { get => tbCurrentPosition.Text; set => tbCurrentPosition.Text = value; } + + public int BiBID + { + get => int.TryParse(tbBibID.Text, out int result) ? result : 0; + set => tbBibID.Text = value.ToString(); + } + + public string DriverID + { + get => tbDriverID.Text; + set => tbBibID.Text = value; + } + + public List pslineConfigs = new List(); + + public List CheckedItems = new List(); + + public event EventHandler MeasureButtonClick; + public event EventHandler ClearAllMeasurementsBtnClick; + public event EventHandler PopuplateHeaderEvent; + + public void PopulateMeasureHeader() + { + lbMeasuredPins.Items.Clear(); + foreach (var item in pslineConfigs) + { + if (item.Enabled) + { + lbMeasuredPins.Items.Add(item.Psline); + } + + } + } + + public void OnPopulateHeaderEvent(EventArgs e) + { + PopuplateHeaderEvent?.Invoke(this, EventArgs.Empty); + } + public UserControlMeasureHeader() + { + InitializeComponent(); + dataGridView1.AutoGenerateColumns = true; + PopulateHeaders(); + lbLocation.SetSelected(0, true); + lbMeasuredPins.CheckOnClick = true; // Enables to single click. + } + + private void PopulateHeaders () + { + OnPopulateHeaderEvent(EventArgs.Empty); + } + public void OnClearAllMeasurementsBtnClick(EventArgs e) + { + ClearAllMeasurementsBtnClick?.Invoke(this, EventArgs.Empty); + } + + public void OnMeasureButtonClick(EventArgs e) + { + MeasureButtonClick?.Invoke(this, EventArgs.Empty); + } + + private void btnMeasure_Click(object sender, EventArgs e) + { + OnMeasureButtonClick(EventArgs.Empty); + } + + private void btnNextPosition_Click(object sender, EventArgs e) + { + int position; + int increment; + int.TryParse(this.CurrentMeasurePosition,out position); + int.TryParse(tbIncrement.Text, out increment); + position+=increment; + this.CurrentMeasurePosition = position.ToString(); + } + + public void PopulateVoltageOld(List results) + { + results = results.OrderBy(o => o.PsLine).ToList(); + + dataGridView1.DataSource = null; + dataGridView1.DataSource = results; + dataGridView1.Refresh(); + + } + + public void PopulateVoltage(List results) + { + // Convert the list to a DataTable + var dataTable = DataTableHelper.ToDataTable(results); + + // Bind the DataTable to DataGridView + dataGridView1.DataSource = dataTable; + + dataGridView1.CellFormatting += DataGridView_CellFormatting; + + // Enable sorting for all columns + foreach (DataGridViewColumn column in dataGridView1.Columns) + { + column.SortMode = DataGridViewColumnSortMode.Automatic; + } + + // Sort the DataGridView by the first column (assuming it's "ID") + if (dataGridView1.Columns.Count > 0) + { + dataGridView1.Sort(dataGridView1.Columns[0], ListSortDirection.Descending); + } + } + + private void DataGridView_CellFormatting(object sender, DataGridViewCellFormattingEventArgs e) + { + // Check if the column is "Value" + if (dataGridView1.Columns[e.ColumnIndex].Name == "Value") + { + // Get the value from the cell + if (e.Value is double value) + { + // Get Psline + var PsLine = (int)dataGridView1.Rows[e.RowIndex].Cells["PsLine"].Value; + var tolerance = pslineConfigs.Where(x => x.Psline == PsLine).Select(x => x.Tolerance).FirstOrDefault(); + // Get setpoint + var setpoint = pslineConfigs.Where(x => x.Psline == PsLine).Select(x => x.Setpoint).FirstOrDefault(); + + //Calculate limit + var limit = setpoint * (tolerance/100); + + // check if exceeding tolerance limit + if (Math.Abs(setpoint-value) > limit) + { + // Change the background color + e.CellStyle.BackColor = System.Drawing.Color.Orange; + } + else + { + e.CellStyle.BackColor = System.Drawing.Color.Green; + } + } + } + } + + private void btnSaveToExcel_Click(object sender, EventArgs e) + { + string filePath = $@"C:\configs\P{tbProjectNumber.Text}_sub{tbSub.Text}_step_{tbStep.Text}_Header.xlsx"; + string sourceFilePath = @"C:\configs\Header.xlsx"; + + + + if (!File.Exists(filePath)) + { + File.Copy(sourceFilePath, filePath); + Console.WriteLine($"File did not exist. Copied from {sourceFilePath} to {filePath}."); + } + else + { + Console.WriteLine("File exists, proceeding to open."); + } + + Excel.Application excelApp = new Excel.Application + { + Visible = true, + DisplayAlerts = false + }; + + Excel.Workbook workbook = excelApp.Workbooks.Open(filePath); + + string copiedSheetName = "Measurements"; + + Excel.Worksheet worksheet = workbook.Sheets[1]; + // Add column headers + for (int i = 0; i < dataGridView1.Columns.Count; i++) + { + worksheet.Cells[1, i + 1] = dataGridView1.Columns[i].HeaderText; + } + + // Add rows + for (int i = 0; i < dataGridView1.Rows.Count; i++) + { + for (int j = 0; j < dataGridView1.Columns.Count; j++) + { + worksheet.Cells[i + 2, j + 1] = dataGridView1.Rows[i].Cells[j].Value; + } + } + + workbook.Save(); + workbook.Close(); + excelApp.Quit(); + + //ReleaseObject(workbook); + //ReleaseObject(excelApp); + } + + private void lbMeasuredPins_ItemCheck(object sender, ItemCheckEventArgs e) + { + List checkedItems = new List(); + foreach (var item in lbMeasuredPins.CheckedItems) + { + checkedItems.Add(Convert.ToInt32(item)); + } + if (e.NewValue == CheckState.Checked) + checkedItems.Add(Convert.ToInt32(lbMeasuredPins.Items[e.Index])); + else + checkedItems.Remove(Convert.ToInt32(lbMeasuredPins.Items[e.Index])); + Console.WriteLine(checkedItems); + this.CheckedItems = checkedItems; + } + + private void btnInvertListboxMeasuredPins_Click(object sender, EventArgs e) + { + for (int i = 0; i < lbMeasuredPins.Items.Count; i++) + { + bool isChecked = lbMeasuredPins.GetItemChecked(i); + lbMeasuredPins.SetItemChecked(i, !isChecked); + } + } + + private void btnClearAllMeasurements_Click(object sender, EventArgs e) + { + OnClearAllMeasurementsBtnClick(EventArgs.Empty); + } + + private void dataGridView1_CellContentClick(object sender, DataGridViewCellEventArgs e) + { + + } + } +} diff --git a/daq_testing/UserControlMeasureHeader.resx b/daq_testing/UserControlMeasureHeader.resx new file mode 100644 index 0000000..1af7de1 --- /dev/null +++ b/daq_testing/UserControlMeasureHeader.resx @@ -0,0 +1,120 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 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/daq_testing/UserControlPslineConfig.Designer.cs b/daq_testing/UserControlPslineConfig.Designer.cs new file mode 100644 index 0000000..bbc4d76 --- /dev/null +++ b/daq_testing/UserControlPslineConfig.Designer.cs @@ -0,0 +1,94 @@ + +namespace daq_testing +{ + partial class UserControlPslineConfig + { + /// + /// 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 Component Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + this.dgvPslinesConfig = new System.Windows.Forms.DataGridView(); + this.btnSave = new System.Windows.Forms.Button(); + this.button1 = new System.Windows.Forms.Button(); + ((System.ComponentModel.ISupportInitialize)(this.dgvPslinesConfig)).BeginInit(); + this.SuspendLayout(); + // + // dgvPslinesConfig + // + this.dgvPslinesConfig.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; + this.dgvPslinesConfig.Location = new System.Drawing.Point(64, 77); + this.dgvPslinesConfig.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); + this.dgvPslinesConfig.Name = "dgvPslinesConfig"; + this.dgvPslinesConfig.RowHeadersWidth = 51; + this.dgvPslinesConfig.Size = new System.Drawing.Size(751, 383); + this.dgvPslinesConfig.TabIndex = 0; + this.dgvPslinesConfig.CellContentClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dgvPslinesConfig_CellContentClick); + + // + // btnSave + // + this.btnSave.Location = new System.Drawing.Point(651, 521); + this.btnSave.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); + this.btnSave.Name = "btnSave"; + this.btnSave.Size = new System.Drawing.Size(164, 59); + this.btnSave.TabIndex = 1; + this.btnSave.Text = "Save"; + this.btnSave.UseVisualStyleBackColor = true; + this.btnSave.Click += new System.EventHandler(this.btnSave_Click); + // + // button1 + // + this.button1.Enabled = false; + this.button1.Location = new System.Drawing.Point(715, 468); + this.button1.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); + this.button1.Name = "button1"; + this.button1.Size = new System.Drawing.Size(100, 28); + this.button1.TabIndex = 2; + this.button1.Text = "Update"; + this.button1.UseVisualStyleBackColor = true; + this.button1.Click += new System.EventHandler(this.button1_Click); + // + // UserControlPslineConfig + // + this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 16F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.Controls.Add(this.button1); + this.Controls.Add(this.btnSave); + this.Controls.Add(this.dgvPslinesConfig); + this.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); + this.Name = "UserControlPslineConfig"; + this.Size = new System.Drawing.Size(967, 655); + ((System.ComponentModel.ISupportInitialize)(this.dgvPslinesConfig)).EndInit(); + this.ResumeLayout(false); + + } + + #endregion + + private System.Windows.Forms.DataGridView dgvPslinesConfig; + private System.Windows.Forms.Button btnSave; + private System.Windows.Forms.Button button1; + } +} diff --git a/daq_testing/UserControlPslineConfig.cs b/daq_testing/UserControlPslineConfig.cs new file mode 100644 index 0000000..ef51300 --- /dev/null +++ b/daq_testing/UserControlPslineConfig.cs @@ -0,0 +1,111 @@ +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 daq_testing +{ + public partial class UserControlPslineConfig : UserControl + { + private BindingList gridData; + private FileHandler fileHandler; + + public event EventHandler UpdateBtnClick; + + public void OnUpdateBtnClick(EventArgs e) + { + LoadDgv(); + UpdateBtnClick?.Invoke(this, EventArgs.Empty); + } + + public List Data { get; set; } + public UserControlPslineConfig() + { + InitializeComponent(); + + dgvPslinesConfig.CellContentClick += dgvPslinesConfig_CellContentClick; + dgvPslinesConfig.CurrentCellDirtyStateChanged += dgvPslinesConfig_CurrentCellDirtyStateChanged; + } + + public void button1_Click(object sender, EventArgs e) + { + LoadDgv(); + OnUpdateBtnClick(EventArgs.Empty); + } + + public void LoadDgv_old() + { + BindingSource bs = new BindingSource(); + bs.DataSource = Data; + dgvPslinesConfig.DataSource = bs; + dgvPslinesConfig.Update(); + } + + public void LoadDgv() + { + string filePath = @"c:\configs\data.json"; + + fileHandler = new FileHandler(filePath); + // Load data + gridData = fileHandler.LoadData(); + + // Bind data to DataGridView + dgvPslinesConfig.DataSource = gridData; + + // Set column properties + dgvPslinesConfig.Columns["Psline"].HeaderText = "Psline"; + dgvPslinesConfig.Columns["Description"].HeaderText = "Description"; + dgvPslinesConfig.Columns["Setpoint"].HeaderText = "Setpoint"; + dgvPslinesConfig.Columns["Tolerance"].HeaderText = "Tolerance"; + dgvPslinesConfig.Columns["Enabled"].HeaderText = "Enabled"; + + } + + private void btnSave_Click(object sender, EventArgs e) + { + fileHandler.SaveData(gridData); + OnUpdateBtnClick(EventArgs.Empty); + } + + private void dgvPslinesConfig_CellContentClick(object sender, DataGridViewCellEventArgs e) + { + if (e.ColumnIndex == dgvPslinesConfig.Columns["Enabled"].Index) + { + // Check if the Enabled cell was set to true + if (Convert.ToBoolean(dgvPslinesConfig.Rows[e.RowIndex].Cells["Enabled"].Value) == true) + { + // Check for duplicates + var pslineValue = dgvPslinesConfig.Rows[e.RowIndex].Cells["Psline"].Value; + var hasDuplicate = dgvPslinesConfig.Rows + .Cast() + .Where(row => Convert.ToBoolean(row.Cells["Enabled"].Value) == true && + row.Cells["Psline"].Value.Equals(pslineValue) && + row.Index != e.RowIndex) // Exclude the current row + .Any(); + + if (hasDuplicate) + { + // Revert the change and notify the user + dgvPslinesConfig.Rows[e.RowIndex].Cells["Enabled"].Value = false; // Set back to false + MessageBox.Show("Cannot enable this row because a duplicate Psline entry exists.", "Duplicate Entry", MessageBoxButtons.OK, MessageBoxIcon.Warning); + } + } + } + } + + private void dgvPslinesConfig_CurrentCellDirtyStateChanged(object sender, EventArgs e) + { + if (dgvPslinesConfig.IsCurrentCellDirty) + { + dgvPslinesConfig.CommitEdit(DataGridViewDataErrorContexts.Commit); + } + } + + + } +} diff --git a/daq_testing/UserControlPslineConfig.resx b/daq_testing/UserControlPslineConfig.resx new file mode 100644 index 0000000..1af7de1 --- /dev/null +++ b/daq_testing/UserControlPslineConfig.resx @@ -0,0 +1,120 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 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/daq_testing/daq_testing.csproj b/daq_testing/daq_testing.csproj new file mode 100644 index 0000000..b1125d4 --- /dev/null +++ b/daq_testing/daq_testing.csproj @@ -0,0 +1,300 @@ + + + + + Debug + AnyCPU + {F871696A-881E-4EDB-BC23-EC1DCBA11A5A} + WinExe + daq_testing + daq_testing + v4.7.2 + 512 + true + true + + + false + D:\deploy\ + false + Unc + true + Foreground + 7 + Days + false + false + true + \\silicium\software\ + 1 + 1.0.0.%2a + false + true + true + + + x64 + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + false + + + x64 + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + false + + + 8C7D832975646199C4D1F0FE99E67DE3A1873D22 + + + daq_testing_TemporaryKey.pfx + + + true + + + true + + + + ..\packages\HarfBuzzSharp.7.3.0.3\lib\net462\HarfBuzzSharp.dll + + + ..\packages\Microsoft.Bcl.AsyncInterfaces.8.0.0\lib\net462\Microsoft.Bcl.AsyncInterfaces.dll + + + ..\packages\Microsoft.Office.Interop.Excel.15.0.4795.1001\lib\net20\Microsoft.Office.Interop.Excel.dll + True + + + ..\packages\Newtonsoft.Json.13.0.3\lib\net45\Newtonsoft.Json.dll + + + ..\packages\OpenTK.3.1.0\lib\net20\OpenTK.dll + + + ..\packages\OpenTK.GLControl.3.1.0\lib\net20\OpenTK.GLControl.dll + + + ..\packages\ScottPlot.5.0.54\lib\net462\ScottPlot.dll + + + ..\packages\ScottPlot.WinForms.5.0.54\lib\net462\ScottPlot.WinForms.dll + + + ..\packages\SkiaSharp.2.88.9\lib\net462\SkiaSharp.dll + + + ..\packages\SkiaSharp.HarfBuzz.2.88.9\lib\net462\SkiaSharp.HarfBuzz.dll + + + ..\packages\SkiaSharp.Views.Desktop.Common.2.88.9\lib\net462\SkiaSharp.Views.Desktop.Common.dll + + + ..\packages\SkiaSharp.Views.WindowsForms.2.88.9\lib\net462\SkiaSharp.Views.WindowsForms.dll + + + + ..\packages\System.Buffers.4.5.1\lib\net461\System.Buffers.dll + + + + ..\packages\System.Drawing.Common.4.7.3\lib\net461\System.Drawing.Common.dll + + + ..\packages\System.Memory.4.5.5\lib\net461\System.Memory.dll + + + + ..\packages\System.Numerics.Vectors.4.5.0\lib\net46\System.Numerics.Vectors.dll + + + ..\packages\System.Runtime.CompilerServices.Unsafe.6.0.0\lib\net461\System.Runtime.CompilerServices.Unsafe.dll + + + ..\packages\System.Runtime.InteropServices.RuntimeInformation.4.3.0\lib\net45\System.Runtime.InteropServices.RuntimeInformation.dll + True + True + + + ..\packages\System.Text.Encodings.Web.8.0.0\lib\net462\System.Text.Encodings.Web.dll + + + ..\packages\System.Text.Json.8.0.4\lib\net462\System.Text.Json.dll + + + ..\packages\System.Threading.Tasks.Extensions.4.5.4\lib\net461\System.Threading.Tasks.Extensions.dll + + + ..\packages\System.ValueTuple.4.5.0\lib\net47\System.ValueTuple.dll + + + + + + + + + + + + + + + + Form + + + MainForm.cs + + + + + + + + + + UserControl + + + UserControlDMM.cs + + + UserControl + + + UserControlInstrument.cs + + + UserControl + + + UserControlMeasure.cs + + + UserControl + + + UserControlMeasureHeader.cs + + + UserControl + + + UserControlPslineConfig.cs + + + MainForm.cs + + + ResXFileCodeGenerator + Resources.Designer.cs + Designer + + + True + Resources.resx + + + UserControlDMM.cs + + + UserControlInstrument.cs + Designer + + + UserControlMeasure.cs + + + UserControlMeasureHeader.cs + + + UserControlPslineConfig.cs + + + + + + SettingsSingleFileGenerator + Settings.Designer.cs + + + True + Settings.settings + True + + + + + + + + {9C2645D3-6791-4A84-80AA-30E529FA54EF} + 1 + 4 + 0 + primary + False + True + + + {47ED5120-A398-11D4-BA58-000064657374} + 1 + 0 + 0 + primary + False + True + + + {DB8CBF00-D6D3-11D4-AA51-00A024EE30BD} + 5 + 14 + 0 + primary + False + True + + + + + False + Microsoft .NET Framework 4.7.2 %28x86 and x64%29 + true + + + False + .NET Framework 3.5 SP1 + false + + + + + + + This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. + + + + + + + + + + + + + + \ No newline at end of file diff --git a/daq_testing/packages.config b/daq_testing/packages.config new file mode 100644 index 0000000..ab91e7f --- /dev/null +++ b/daq_testing/packages.config @@ -0,0 +1,31 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file