From 7c6f4d89e1872a89c10fa0136a8398c646630a64 Mon Sep 17 00:00:00 2001 From: Andrew Date: Tue, 26 Apr 2022 22:01:41 +0100 Subject: [PATCH] Heatmaps & Graphs - complete (I hope). So so many changes, more than I can remember. --- Hardware/OSRTT_Full_Code/OSRTT_Full_Code.ino | 9 +- OSRTT Launcher/OSRTT Launcher/App.config | 65 +- OSRTT Launcher/OSRTT Launcher/CFuncs.cs | 49 + OSRTT Launcher/OSRTT Launcher/DataUpload.cs | 140 + .../OSRTT Launcher/Form1.Designer.cs | 285 ++ OSRTT Launcher/OSRTT Launcher/Form1.cs | 327 ++ OSRTT Launcher/OSRTT Launcher/Form1.resx | 123 + .../OSRTT Launcher/Heatmaps.Designer.cs | 929 +++++ OSRTT Launcher/OSRTT Launcher/Heatmaps.cs | 890 +++++ OSRTT Launcher/OSRTT Launcher/Heatmaps.resx | 120 + .../OSRTT Launcher/HelpView.Designer.cs | 383 ++ OSRTT Launcher/OSRTT Launcher/HelpView.cs | 32 + OSRTT Launcher/OSRTT Launcher/HelpView.resx | 130 + .../OSRTT Launcher/Main.Designer.cs | 823 ++-- OSRTT Launcher/OSRTT Launcher/Main.cs | 3554 +++-------------- OSRTT Launcher/OSRTT Launcher/Main.resx | 6 + .../OSRTT Launcher/OSRTT Launcher.csproj | 54 +- OSRTT Launcher/OSRTT Launcher/ProcessData.cs | 1431 +++++++ .../Properties/Resources.Designer.cs | 20 + .../OSRTT Launcher/Properties/Resources.resx | 6 + .../Properties/Settings.Designer.cs | 214 +- .../Properties/Settings.settings | 59 +- .../Resources/arrow-rotate-right.png | Bin 0 -> 57148 bytes .../OSRTT Launcher/Resources/check.png | Bin 0 -> 22900 bytes .../OSRTT Launcher/Results.Designer.cs | 61 + OSRTT Launcher/OSRTT Launcher/Results.cs | 25 + OSRTT Launcher/OSRTT Launcher/Results.resx | 120 + .../ResultsSettings.Designer.cs | 681 ++++ .../OSRTT Launcher/ResultsSettings.cs | 659 +++ .../OSRTT Launcher/ResultsSettings.resx | 120 + .../OSRTT Launcher/ResultsView.Designer.cs | 686 ++-- OSRTT Launcher/OSRTT Launcher/ResultsView.cs | 2558 +++++------- .../OSRTT Launcher/ResultsView.resx | 21 +- OSRTT Launcher/OSRTT Launcher/SaveToExcel.cs | 130 + OSRTT Launcher/OSRTT Launcher/packages.config | 5 +- 35 files changed, 9165 insertions(+), 5550 deletions(-) create mode 100644 OSRTT Launcher/OSRTT Launcher/CFuncs.cs create mode 100644 OSRTT Launcher/OSRTT Launcher/DataUpload.cs create mode 100644 OSRTT Launcher/OSRTT Launcher/Form1.Designer.cs create mode 100644 OSRTT Launcher/OSRTT Launcher/Form1.cs create mode 100644 OSRTT Launcher/OSRTT Launcher/Form1.resx create mode 100644 OSRTT Launcher/OSRTT Launcher/Heatmaps.Designer.cs create mode 100644 OSRTT Launcher/OSRTT Launcher/Heatmaps.cs create mode 100644 OSRTT Launcher/OSRTT Launcher/Heatmaps.resx create mode 100644 OSRTT Launcher/OSRTT Launcher/HelpView.Designer.cs create mode 100644 OSRTT Launcher/OSRTT Launcher/HelpView.cs create mode 100644 OSRTT Launcher/OSRTT Launcher/HelpView.resx create mode 100644 OSRTT Launcher/OSRTT Launcher/ProcessData.cs create mode 100644 OSRTT Launcher/OSRTT Launcher/Resources/arrow-rotate-right.png create mode 100644 OSRTT Launcher/OSRTT Launcher/Resources/check.png create mode 100644 OSRTT Launcher/OSRTT Launcher/Results.Designer.cs create mode 100644 OSRTT Launcher/OSRTT Launcher/Results.cs create mode 100644 OSRTT Launcher/OSRTT Launcher/Results.resx create mode 100644 OSRTT Launcher/OSRTT Launcher/ResultsSettings.Designer.cs create mode 100644 OSRTT Launcher/OSRTT Launcher/ResultsSettings.cs create mode 100644 OSRTT Launcher/OSRTT Launcher/ResultsSettings.resx create mode 100644 OSRTT Launcher/OSRTT Launcher/SaveToExcel.cs diff --git a/Hardware/OSRTT_Full_Code/OSRTT_Full_Code.ino b/Hardware/OSRTT_Full_Code/OSRTT_Full_Code.ino index 0b25355..6078f63 100644 --- a/Hardware/OSRTT_Full_Code/OSRTT_Full_Code.ino +++ b/Hardware/OSRTT_Full_Code/OSRTT_Full_Code.ino @@ -35,7 +35,7 @@ SPISettings settingsA(10000000, MSBFIRST, SPI_MODE0); //Serial connection values bool connected = false; -String firmware = "2.2"; +String firmware = "2.3"; int testRuns = 4; bool vsync = true; bool extendedGamma = true; @@ -219,7 +219,7 @@ void digitalPotWrite(int value) int checkUSBVoltage() // Check USB voltage is between 4.8V and 5.2V { int counter = 0; - while (counter < 1000) + while (counter < 2000) { ADC1->SWTRIG.bit.START = 1; //Start ADC1 while(!ADC1->INTFLAG.bit.RESRDY); //wait for ADC to have a new value @@ -558,10 +558,7 @@ void loop() { { Serial.setTimeout(300); Keyboard.print(fpsLimit); - if (vsync == false) - { - Keyboard.print('V'); - } + Keyboard.print(fpsLimit); // Check USB voltage level //int voltageTest = checkUSBVoltage(); //if (voltageTest == 0) diff --git a/OSRTT Launcher/OSRTT Launcher/App.config b/OSRTT Launcher/OSRTT Launcher/App.config index 89b0157..a595ab2 100644 --- a/OSRTT Launcher/OSRTT Launcher/App.config +++ b/OSRTT Launcher/OSRTT Launcher/App.config @@ -1,7 +1,7 @@ - + - +
@@ -11,6 +11,10 @@ + + + + @@ -24,21 +28,6 @@ False - - False - - - False - - - True - - - False - - - True - False @@ -48,12 +37,6 @@ False - - False - - - True - False @@ -61,7 +44,7 @@ False - True + False False @@ -91,7 +74,7 @@ True - 0 + True True @@ -103,7 +86,37 @@ 5,15,20 - 95, 85, 75 + 75, 85, 95 + + + RGB 5 Tolerance + + + 5 + + + True + + + False + + + RGB Values + + + False + + + False + + + True + + + True + + + diff --git a/OSRTT Launcher/OSRTT Launcher/CFuncs.cs b/OSRTT Launcher/OSRTT Launcher/CFuncs.cs new file mode 100644 index 0000000..ffddd8a --- /dev/null +++ b/OSRTT Launcher/OSRTT Launcher/CFuncs.cs @@ -0,0 +1,49 @@ +using Newtonsoft.Json; +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Forms; + +namespace OSRTT_Launcher +{ + class CFuncs + { + public DialogResult showMessageBox(string title, string message, MessageBoxButtons buttons, MessageBoxIcon icon) + { + if (!Properties.Settings.Default.SuppressDiagBox) + { + DialogResult d = MessageBox.Show(title, message, buttons, icon); + return d; + } + else + { + return DialogResult.None; + } + } + + public string createFileName(string resultsFolderPath, string searchParams) + { + decimal fileNumber = 001; + // search /Results folder for existing file names, pick new name + string[] existingFiles = Directory.GetFiles(resultsFolderPath, "*" + searchParams); + // Search \Results folder for existing results to not overwrite existing or have save conflict errors + foreach (var s in existingFiles) + { + decimal num = 0; + try + { num = decimal.Parse(Path.GetFileNameWithoutExtension(s).Remove(3)); } + catch + { Console.WriteLine("Non-standard file name found"); } + if (num >= fileNumber) + { + fileNumber = num + 1; + } + } + return fileNumber.ToString("000") + searchParams; + } + + } +} diff --git a/OSRTT Launcher/OSRTT Launcher/DataUpload.cs b/OSRTT Launcher/OSRTT Launcher/DataUpload.cs new file mode 100644 index 0000000..058e194 --- /dev/null +++ b/OSRTT Launcher/OSRTT Launcher/DataUpload.cs @@ -0,0 +1,140 @@ +using Newtonsoft.Json; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Net.Http; +using System.Text; +using System.Threading; +using System.Management; + +namespace OSRTT_Launcher +{ + class DataUpload + { + public class SystemInfo + { + public string boardSerial { get; set; } + public CPU cpu { get; set; } + public GPU gpu { get; set; } + public RAM ram { get; set; } + public string MACAddress { get; set; } + } + public class CPU + { + public string CPUName { get; set; } + public int Cores { get; set; } + public int LogicalProcessors { get; set; } + } + public class GPU + { + public string GPUName { get; set; } + public Int64 VRAM { get; set; } + public string GPUDriver { get; set; } + } + public class RAM + { + public Int64 totalCapcity { get; set; } + public int sticks { get; set; } + public int FormFactor { get; set; } + public string PartNumber { get; set; } + public int RamSpeed { get; set; } + public int RamVolts { get; set; } + } + Thread uploadThread; + public async void UploadData(object data, string url) + { + string json = JsonConvert.SerializeObject(data); + var httpContent = new StringContent(json, Encoding.UTF8, "application/json"); + var httpClient = new HttpClient(); + var httpResponse = await httpClient.PostAsync(url, httpContent); + } + + public void systemInfo() + { + SystemInfo si = new SystemInfo + { + boardSerial = Properties.Settings.Default.serialNumber, + cpu = new CPU(), + gpu = new GPU(), + ram = new RAM() + }; + ManagementObjectSearcher cpu = new ManagementObjectSearcher("select * from Win32_Processor"); + foreach (ManagementObject cpuObj in cpu.Get()) + { + si.cpu.CPUName = cpuObj["Name"].ToString(); + si.cpu.Cores = Convert.ToInt32(cpuObj["NumberOfCores"]); + si.cpu.LogicalProcessors = Convert.ToInt32(cpuObj["NumberOfLogicalProcessors"]); + } + ManagementObjectSearcher gpu = new ManagementObjectSearcher("select * from Win32_VideoController"); + foreach (ManagementObject gpuObj in gpu.Get()) + { + si.gpu.GPUName = gpuObj["Name"].ToString(); + si.gpu.VRAM = Convert.ToInt64(gpuObj["AdapterRAM"]); + si.gpu.GPUDriver = gpuObj["DriverVersion"].ToString(); + } + ManagementObjectSearcher ram = new ManagementObjectSearcher("select * from Win32_PhysicalMemory "); + Int64 capacity = 0; + int sticks = 0; + foreach (ManagementObject ramObj in ram.Get()) + { + capacity += Convert.ToInt64(ramObj["Capacity"]); + sticks += 1; + si.ram.FormFactor = Convert.ToInt32(ramObj["FormFactor"]); + si.ram.PartNumber = ramObj["PartNumber"].ToString(); + si.ram.RamSpeed = Convert.ToInt32(ramObj["ConfiguredClockSpeed"]); + si.ram.RamVolts = Convert.ToInt32(ramObj["ConfiguredVoltage"]); + } + si.ram.totalCapcity = capacity; + si.ram.sticks = sticks; + ManagementObjectSearcher nac = new ManagementObjectSearcher("select * from Win32_NetworkAdapterConfiguration"); + foreach (ManagementObject nacObj in nac.Get()) + { + bool enabled = (bool)nacObj["IPEnabled"]; + if (enabled) + { + si.MACAddress = nacObj["MACAddress"].ToString(); + } + } + //UploadData(si, "https://api.osrtt.com/systemInfo"); + } + public void UploadRawData(List> rawData) + { + // thread this + string url = "https://api.osrtt.com/rawData"; + UploadData(rawData, url); + } + public void UploadGammaData(List gamma) + { + string url = "https://api.osrtt.com/gammaData"; + UploadData(gamma, url); + } + public void UploadTestLatency(List testLatency) + { + string url = "https://api.osrtt.com/testLatency"; + UploadData(testLatency, url); + } + public void UploadRunSettings(ProcessData.runSettings testLatency) + { + string url = "https://api.osrtt.com/runSetting"; + UploadData(testLatency, url); + } + + // PC config... + + public void ShareResults( + List> rawData, + List gamma, + List testLatency, + ProcessData.runSettings runSetting + // PC config + ) + { + Guid g = Guid.NewGuid(); + // put guid in request _somewhere_ + UploadRawData(rawData); + UploadGammaData(gamma); + UploadTestLatency(testLatency); + UploadRunSettings(runSetting); + } + } +} diff --git a/OSRTT Launcher/OSRTT Launcher/Form1.Designer.cs b/OSRTT Launcher/OSRTT Launcher/Form1.Designer.cs new file mode 100644 index 0000000..eded705 --- /dev/null +++ b/OSRTT Launcher/OSRTT Launcher/Form1.Designer.cs @@ -0,0 +1,285 @@ +namespace OSRTT_Launcher +{ + partial class Form1 + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + this.launchBtn = new System.Windows.Forms.Button(); + this.resultsBtn = new System.Windows.Forms.Button(); + this.richTextBox1 = new System.Windows.Forms.RichTextBox(); + this.menuStrip1 = new System.Windows.Forms.MenuStrip(); + this.deviceToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.reconnectDeviceToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.checkDeviceFirmwareVersionToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.resultsSettingsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.devStatLbl = new System.Windows.Forms.Label(); + this.devStat = new System.Windows.Forms.Label(); + this.label1 = new System.Windows.Forms.Label(); + this.measFrm = new System.Windows.Forms.TextBox(); + this.measTo = new System.Windows.Forms.TextBox(); + this.label2 = new System.Windows.Forms.Label(); + this.updateTable = new System.Windows.Forms.Button(); + this.label3 = new System.Windows.Forms.Label(); + this.analyseResultsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.panel1 = new System.Windows.Forms.Panel(); + this.panel2 = new System.Windows.Forms.Panel(); + this.debugModeToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.menuStrip1.SuspendLayout(); + this.panel1.SuspendLayout(); + this.panel2.SuspendLayout(); + this.SuspendLayout(); + // + // launchBtn + // + this.launchBtn.Font = new System.Drawing.Font("Arial Black", 16F, System.Drawing.FontStyle.Bold); + this.launchBtn.Location = new System.Drawing.Point(18, 59); + this.launchBtn.Name = "launchBtn"; + this.launchBtn.Size = new System.Drawing.Size(551, 46); + this.launchBtn.TabIndex = 0; + this.launchBtn.Text = "Launch Test"; + this.launchBtn.UseVisualStyleBackColor = true; + this.launchBtn.Click += new System.EventHandler(this.launchBtn_Click); + // + // resultsBtn + // + this.resultsBtn.Font = new System.Drawing.Font("Arial Black", 16F, System.Drawing.FontStyle.Bold); + this.resultsBtn.Location = new System.Drawing.Point(17, 89); + this.resultsBtn.Name = "resultsBtn"; + this.resultsBtn.Size = new System.Drawing.Size(552, 75); + this.resultsBtn.TabIndex = 1; + this.resultsBtn.Text = "Analyse Results"; + this.resultsBtn.UseVisualStyleBackColor = true; + this.resultsBtn.Click += new System.EventHandler(this.resultsBtn_Click); + // + // richTextBox1 + // + this.richTextBox1.Location = new System.Drawing.Point(723, 36); + this.richTextBox1.Name = "richTextBox1"; + this.richTextBox1.Size = new System.Drawing.Size(369, 760); + this.richTextBox1.TabIndex = 2; + this.richTextBox1.Text = ""; + // + // menuStrip1 + // + this.menuStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { + this.deviceToolStripMenuItem, + this.analyseResultsToolStripMenuItem, + this.resultsSettingsToolStripMenuItem, + this.debugModeToolStripMenuItem}); + this.menuStrip1.Location = new System.Drawing.Point(0, 0); + this.menuStrip1.Name = "menuStrip1"; + this.menuStrip1.Size = new System.Drawing.Size(1104, 24); + this.menuStrip1.TabIndex = 4; + this.menuStrip1.Text = "menuStrip1"; + // + // deviceToolStripMenuItem + // + this.deviceToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { + this.reconnectDeviceToolStripMenuItem, + this.checkDeviceFirmwareVersionToolStripMenuItem}); + this.deviceToolStripMenuItem.Name = "deviceToolStripMenuItem"; + this.deviceToolStripMenuItem.Size = new System.Drawing.Size(54, 20); + this.deviceToolStripMenuItem.Text = "Device"; + // + // reconnectDeviceToolStripMenuItem + // + this.reconnectDeviceToolStripMenuItem.Name = "reconnectDeviceToolStripMenuItem"; + this.reconnectDeviceToolStripMenuItem.Size = new System.Drawing.Size(238, 22); + this.reconnectDeviceToolStripMenuItem.Text = "Reconnect Device"; + this.reconnectDeviceToolStripMenuItem.Click += new System.EventHandler(this.reconnectDeviceToolStripMenuItem_Click); + // + // checkDeviceFirmwareVersionToolStripMenuItem + // + this.checkDeviceFirmwareVersionToolStripMenuItem.Name = "checkDeviceFirmwareVersionToolStripMenuItem"; + this.checkDeviceFirmwareVersionToolStripMenuItem.Size = new System.Drawing.Size(238, 22); + this.checkDeviceFirmwareVersionToolStripMenuItem.Text = "Check Device Firmware Version"; + this.checkDeviceFirmwareVersionToolStripMenuItem.Click += new System.EventHandler(this.checkDeviceFirmwareVersionToolStripMenuItem_Click); + // + // resultsSettingsToolStripMenuItem + // + this.resultsSettingsToolStripMenuItem.Name = "resultsSettingsToolStripMenuItem"; + this.resultsSettingsToolStripMenuItem.Size = new System.Drawing.Size(101, 20); + this.resultsSettingsToolStripMenuItem.Text = "Results Settings"; + // + // devStatLbl + // + this.devStatLbl.AutoSize = true; + this.devStatLbl.Font = new System.Drawing.Font("Microsoft Sans Serif", 15.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.devStatLbl.Location = new System.Drawing.Point(13, 12); + this.devStatLbl.Name = "devStatLbl"; + this.devStatLbl.Size = new System.Drawing.Size(298, 25); + this.devStatLbl.TabIndex = 5; + this.devStatLbl.Text = "Device Connection Status: "; + // + // devStat + // + this.devStat.AutoSize = true; + this.devStat.Font = new System.Drawing.Font("Microsoft Sans Serif", 15.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.devStat.Location = new System.Drawing.Point(317, 12); + this.devStat.Name = "devStat"; + this.devStat.Size = new System.Drawing.Size(252, 25); + this.devStat.TabIndex = 6; + this.devStat.Text = "Waiting for Connection"; + // + // label1 + // + this.label1.AutoSize = true; + this.label1.Location = new System.Drawing.Point(13, 55); + this.label1.Name = "label1"; + this.label1.Size = new System.Drawing.Size(77, 13); + this.label1.TabIndex = 8; + this.label1.Text = "Measure From:"; + // + // measFrm + // + this.measFrm.Location = new System.Drawing.Point(96, 52); + this.measFrm.Name = "measFrm"; + this.measFrm.Size = new System.Drawing.Size(100, 20); + this.measFrm.TabIndex = 9; + // + // measTo + // + this.measTo.Location = new System.Drawing.Point(290, 52); + this.measTo.Name = "measTo"; + this.measTo.Size = new System.Drawing.Size(100, 20); + this.measTo.TabIndex = 11; + // + // label2 + // + this.label2.AutoSize = true; + this.label2.Location = new System.Drawing.Point(217, 55); + this.label2.Name = "label2"; + this.label2.Size = new System.Drawing.Size(67, 13); + this.label2.TabIndex = 10; + this.label2.Text = "Measure To:"; + // + // updateTable + // + this.updateTable.Location = new System.Drawing.Point(422, 50); + this.updateTable.Name = "updateTable"; + this.updateTable.Size = new System.Drawing.Size(145, 23); + this.updateTable.TabIndex = 12; + this.updateTable.Text = "Update Results Table"; + this.updateTable.UseVisualStyleBackColor = true; + // + // label3 + // + this.label3.AutoSize = true; + this.label3.Font = new System.Drawing.Font("Microsoft Sans Serif", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.label3.Location = new System.Drawing.Point(192, 12); + this.label3.Name = "label3"; + this.label3.Size = new System.Drawing.Size(200, 24); + this.label3.TabIndex = 13; + this.label3.Text = "Measurement Controls"; + // + // analyseResultsToolStripMenuItem + // + this.analyseResultsToolStripMenuItem.Name = "analyseResultsToolStripMenuItem"; + this.analyseResultsToolStripMenuItem.Size = new System.Drawing.Size(100, 20); + this.analyseResultsToolStripMenuItem.Text = "Analyse Results"; + this.analyseResultsToolStripMenuItem.Click += new System.EventHandler(this.analyseResultsToolStripMenuItem_Click); + // + // panel1 + // + this.panel1.Controls.Add(this.launchBtn); + this.panel1.Controls.Add(this.devStatLbl); + this.panel1.Controls.Add(this.devStat); + this.panel1.Location = new System.Drawing.Point(12, 36); + this.panel1.Name = "panel1"; + this.panel1.Size = new System.Drawing.Size(588, 120); + this.panel1.TabIndex = 15; + this.panel1.Tag = ""; + // + // panel2 + // + this.panel2.Controls.Add(this.resultsBtn); + this.panel2.Controls.Add(this.label1); + this.panel2.Controls.Add(this.measFrm); + this.panel2.Controls.Add(this.label3); + this.panel2.Controls.Add(this.label2); + this.panel2.Controls.Add(this.updateTable); + this.panel2.Controls.Add(this.measTo); + this.panel2.Location = new System.Drawing.Point(12, 173); + this.panel2.Name = "panel2"; + this.panel2.Size = new System.Drawing.Size(588, 183); + this.panel2.TabIndex = 16; + // + // debugModeToolStripMenuItem + // + this.debugModeToolStripMenuItem.Name = "debugModeToolStripMenuItem"; + this.debugModeToolStripMenuItem.Size = new System.Drawing.Size(88, 20); + this.debugModeToolStripMenuItem.Text = "Debug mode"; + this.debugModeToolStripMenuItem.Click += new System.EventHandler(this.debugModeToolStripMenuItem_Click); + // + // Form1 + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.ClientSize = new System.Drawing.Size(1104, 811); + this.Controls.Add(this.panel2); + this.Controls.Add(this.panel1); + this.Controls.Add(this.menuStrip1); + this.Controls.Add(this.richTextBox1); + this.MainMenuStrip = this.menuStrip1; + this.Name = "Form1"; + this.Text = "OSRTT Launcher"; + this.menuStrip1.ResumeLayout(false); + this.menuStrip1.PerformLayout(); + this.panel1.ResumeLayout(false); + this.panel1.PerformLayout(); + this.panel2.ResumeLayout(false); + this.panel2.PerformLayout(); + this.ResumeLayout(false); + this.PerformLayout(); + + } + + #endregion + + private System.Windows.Forms.Button launchBtn; + private System.Windows.Forms.Button resultsBtn; + private System.Windows.Forms.RichTextBox richTextBox1; + private System.Windows.Forms.MenuStrip menuStrip1; + private System.Windows.Forms.ToolStripMenuItem deviceToolStripMenuItem; + private System.Windows.Forms.ToolStripMenuItem reconnectDeviceToolStripMenuItem; + private System.Windows.Forms.ToolStripMenuItem checkDeviceFirmwareVersionToolStripMenuItem; + private System.Windows.Forms.ToolStripMenuItem resultsSettingsToolStripMenuItem; + private System.Windows.Forms.Label devStatLbl; + private System.Windows.Forms.Label devStat; + private System.Windows.Forms.Label label1; + private System.Windows.Forms.TextBox measFrm; + private System.Windows.Forms.TextBox measTo; + private System.Windows.Forms.Label label2; + private System.Windows.Forms.Button updateTable; + private System.Windows.Forms.Label label3; + private System.Windows.Forms.ToolStripMenuItem analyseResultsToolStripMenuItem; + private System.Windows.Forms.Panel panel1; + private System.Windows.Forms.Panel panel2; + private System.Windows.Forms.ToolStripMenuItem debugModeToolStripMenuItem; + } +} + diff --git a/OSRTT Launcher/OSRTT Launcher/Form1.cs b/OSRTT Launcher/OSRTT Launcher/Form1.cs new file mode 100644 index 0000000..4a2525d --- /dev/null +++ b/OSRTT Launcher/OSRTT Launcher/Form1.cs @@ -0,0 +1,327 @@ +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 System.Diagnostics; +using System.IO.Ports; +using Microsoft.Management.Infrastructure; +using System.Management; +using System.Threading; + +namespace OSRTT_Launcher +{ + public partial class Form1 : Form + { + // TODO + // Get system refresh rate? + // + // Actually save data into Results dictionary + // Save contents of dictionary to CSV "000-OSRTT-RAW-RESULTS.csv" + // Low ish priority - fix get firmware version + // LOW PRIORITY - Possibly set RGB values in C# + // Ultra low priority - Find monitor name if possible to save results file under than name + + + + + public static System.IO.Ports.SerialPort port; + delegate void SetTextCallback(string text); + private bool boardConfirmed = false; + private bool portConnected = false; + private int[] RGBArr; + private int resultsCounter = 0; + private int resultsLimit = 110; + class Results + { + public int FromRGB { get; set; } + public int ToRGB { get; set; } + public int SampleTime { get; set; } + public int SampleNum { get; set; } + public int[] Vals { get; set; } + } + private Dictionary res; + + // This BackgroundWorker is used to demonstrate the + // preferred way of performing asynchronous operations. + private BackgroundWorker hardWorker; + + private Thread readThread = null; + private Thread connectThread = null; + + public Form1() + { + InitializeComponent(); + this.launchBtn.Enabled = false; + this.FormClosed += new FormClosedEventHandler(Form1_FormClosed); + hardWorker = new BackgroundWorker(); + connectThread = new Thread(new ThreadStart(this.findAndConnectToBoard)); + connectThread.Start(); + Size = new Size(630, 206); + + + + + + } + private void findAndConnectToBoard() + { + while (true) + { + if (!portConnected) + { + foreach (string s in SerialPort.GetPortNames().Reverse()) + { + Console.WriteLine(s); + if (!portConnected) + { + connectToBoard(s); + } + else + { + break; + } + + } + } + else + { + Thread.Sleep(2000); + } + + } + + } + + private void connectToBoard(String comPort) + { + + System.ComponentModel.IContainer components = + new System.ComponentModel.Container(); + port = new System.IO.Ports.SerialPort(components); + port.PortName = comPort; + port.BaudRate = 115200; + port.DtrEnable = true; + port.ReadTimeout = 5000; + port.WriteTimeout = 500; + Console.WriteLine("Port details set"); + try + { port.Open(); } + catch (Exception ex) + { Console.WriteLine(ex); } + + if (port.IsOpen) + { + portConnected = true; + readThread = new Thread(new ThreadStart(this.Read)); + readThread.Start(); + this.hardWorker.RunWorkerAsync(); + + + + + // Check if board is correct, reading verification string + + // Have board send RGB Array to load in C# + + } + else + { + SetDeviceStatus("Board Disconnected"); + } + } + + private void sendText(String textToSend) + { + if (port.IsOpen) + { + port.Write(textToSend); + } + } + + private void SetDeviceStatus(string text) + { + // InvokeRequired required compares the thread ID of the + // calling thread to the thread ID of the creating thread. + // If these threads are different, it returns true. + if (this.devStat.InvokeRequired) + { + SetTextCallback d = new SetTextCallback(SetDeviceStatus); + this.Invoke(d, new object[] { text }); //check if this needs to be an array + } + else + { + this.devStat.Text = text; + + } + } + + private void SetText(string text) + { + // InvokeRequired required compares the thread ID of the + // calling thread to the thread ID of the creating thread. + // If these threads are different, it returns true. + if (this.richTextBox1.InvokeRequired) + { + SetTextCallback d = new SetTextCallback(SetText); + this.Invoke(d, new object[] { text }); + } + else + { + this.richTextBox1.Text += text; + this.richTextBox1.Text += "\n"; + } + } + + public void Read() + { + + while (port.IsOpen) + { + try + { + string message = port.ReadLine(); + Console.WriteLine(message); + if (!boardConfirmed) + { + if (message.Contains("OSRTT")) + { + boardConfirmed = true; + SetDeviceStatus("Connected to Device!"); + this.launchBtn.Enabled = true; // Invoke this too + port.Write("1"); + } + else if (message.Contains("Established")) + { + Console.WriteLine("C# Check"); + port.Write("RST"); + } + } + else if (message.Contains("RGB Array")) + { + string newMessage = message.Remove(0, 12); + string[] values = newMessage.Split(','); + RGBArr = new int[values.Length - 1]; + int counter = 0; + foreach (string s in values) + { + Console.WriteLine("String = " + s); + if (s.Length == 1 && !s.Contains("0")) + { + Console.WriteLine("Filtered the bugger"); + } + else + { + RGBArr[counter] = int.Parse(s); + Console.WriteLine(RGBArr[counter]); // stop it from recording the last empty value + counter++; + } + + + } + Console.Write("RGBArr Length: "); + Console.WriteLine(RGBArr.Length); + + resultsLimit = RGBArr.Length * (RGBArr.Length - 1); + Console.Write("Results Limit: "); + Console.WriteLine(resultsLimit); + } + else if (message.Contains("Result")) + { + // Split results + String newMessage = message.Remove(0, 7); + string[] values = newMessage.Split(','); + int[] intValues = Array.ConvertAll(values, int.Parse); + int fromRGBVal = intValues[0]; + int toRGBVal = intValues[1]; + int sampleTimeVal = intValues[2]; + int sampleNumVal = intValues[3]; + intValues = intValues.Where((source, index) => index > 3).ToArray(); + // Check if this shit works. + // + res = new Dictionary(); + res.Add(resultsCounter, new Results { FromRGB = fromRGBVal, ToRGB = toRGBVal, SampleTime = sampleTimeVal, SampleNum = sampleTimeVal, Vals = intValues }); + resultsCounter++; + Console.WriteLine(res[resultsCounter].FromRGB + " " + res[0].Vals.Length); + if (resultsCounter == resultsLimit) + { + resultsCounter = 0; + // Flush dictionary + } + } + else if (message.Contains("FW:")) + { + MessageBox.Show(message, "Firmware Version", MessageBoxButtons.OK, MessageBoxIcon.Information); + } + else + { + this.SetText(message); + } + } + catch (Exception ex) { + Console.WriteLine(ex); + Console.WriteLine("Trying to reconnect"); + port.Close(); + portConnected = false; + boardConfirmed = false; + this.launchBtn.Enabled = false; // invoke via thread... + SetDeviceStatus("Board Disconnected"); + readThread.Abort(); + // findAndConnectToBoard(); + } + } + } + + private void Form1_FormClosed(object sender, FormClosedEventArgs e) + { + // When form is closed halt read thread & close Serial Port + readThread.Abort(); + connectThread.Abort(); + port.Close(); + + } + + private void launchBtn_Click(object sender, EventArgs e) + { + Size = new Size(1145, 868); + // richTextBox1.Text = sb.ToString(); + } + + private void resultsBtn_Click(object sender, EventArgs e) + { + // Save results table to csv + } + + private void reconnectDeviceToolStripMenuItem_Click(object sender, EventArgs e) + { + findAndConnectToBoard(); + } + + private void checkDeviceFirmwareVersionToolStripMenuItem_Click(object sender, EventArgs e) + { + if (port.IsOpen) + { + Console.WriteLine("Checking Firmware version..."); + port.Write("FW"); + } + else + { + MessageBox.Show("Please connect to the device first!", "Firmware Version", MessageBoxButtons.OK, MessageBoxIcon.Error); + } + } + + private void analyseResultsToolStripMenuItem_Click(object sender, EventArgs e) + { + Size = new Size(630, 406); + } + + private void debugModeToolStripMenuItem_Click(object sender, EventArgs e) + { + Size = new Size(1120, 850); + } + } +} diff --git a/OSRTT Launcher/OSRTT Launcher/Form1.resx b/OSRTT Launcher/OSRTT Launcher/Form1.resx new file mode 100644 index 0000000..9c7af5a --- /dev/null +++ b/OSRTT Launcher/OSRTT Launcher/Form1.resx @@ -0,0 +1,123 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 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 + + + 34, 22 + + \ No newline at end of file diff --git a/OSRTT Launcher/OSRTT Launcher/Heatmaps.Designer.cs b/OSRTT Launcher/OSRTT Launcher/Heatmaps.Designer.cs new file mode 100644 index 0000000..14fae2f --- /dev/null +++ b/OSRTT Launcher/OSRTT Launcher/Heatmaps.Designer.cs @@ -0,0 +1,929 @@ + +namespace OSRTT_Launcher +{ + partial class Heatmaps + { + /// + /// 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.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle2 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle3 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle4 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle5 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle6 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle7 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle8 = new System.Windows.Forms.DataGridViewCellStyle(); + this.standardResultsPanel = new System.Windows.Forms.Panel(); + this.runSettingsView = new System.Windows.Forms.DataGridView(); + this.panel5 = new System.Windows.Forms.Panel(); + this.panel6 = new System.Windows.Forms.Panel(); + this.vrrGreenLbl = new System.Windows.Forms.Label(); + this.panel7 = new System.Windows.Forms.Panel(); + this.vrrOrangeLbl = new System.Windows.Forms.Label(); + this.panel8 = new System.Windows.Forms.Panel(); + this.vrrRedLbl = new System.Windows.Forms.Label(); + this.label11 = new System.Windows.Forms.Label(); + this.panel1 = new System.Windows.Forms.Panel(); + this.panel2 = new System.Windows.Forms.Panel(); + this.osGreenLbl = new System.Windows.Forms.Label(); + this.panel3 = new System.Windows.Forms.Panel(); + this.osOrangeLbl = new System.Windows.Forms.Label(); + this.panel4 = new System.Windows.Forms.Panel(); + this.osRedLbl = new System.Windows.Forms.Label(); + this.label5 = new System.Windows.Forms.Label(); + this.rtKeyPanel = new System.Windows.Forms.Panel(); + this.rtGreen = new System.Windows.Forms.Panel(); + this.rtGreenLbl = new System.Windows.Forms.Label(); + this.rtOrange = new System.Windows.Forms.Panel(); + this.rtOrangeLbl = new System.Windows.Forms.Label(); + this.rtRed = new System.Windows.Forms.Panel(); + this.rtRedLbl = new System.Windows.Forms.Label(); + this.label1 = new System.Windows.Forms.Label(); + this.rtStatsRefreshGridView = new System.Windows.Forms.DataGridView(); + this.vrrSubTitle = new System.Windows.Forms.Label(); + this.vrrTitle = new System.Windows.Forms.Label(); + this.osSubTitle = new System.Windows.Forms.Label(); + this.osTitle = new System.Windows.Forms.Label(); + this.rtSubTitle = new System.Windows.Forms.Label(); + this.vrrStatsGridView = new System.Windows.Forms.DataGridView(); + this.osStatsGridView = new System.Windows.Forms.DataGridView(); + this.rtStatsGridView = new System.Windows.Forms.DataGridView(); + this.pictureBox1 = new System.Windows.Forms.PictureBox(); + this.rtTitle = new System.Windows.Forms.Label(); + this.vrrGridView = new System.Windows.Forms.DataGridView(); + this.osGridView = new System.Windows.Forms.DataGridView(); + this.rtGridView = new System.Windows.Forms.DataGridView(); + this.from2 = new System.Windows.Forms.Label(); + this.from3 = new System.Windows.Forms.Label(); + this.from1 = new System.Windows.Forms.Label(); + this.label12 = new System.Windows.Forms.Label(); + this.label10 = new System.Windows.Forms.Label(); + this.label9 = new System.Windows.Forms.Label(); + this.standardResultsPanel.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.runSettingsView)).BeginInit(); + this.panel5.SuspendLayout(); + this.panel6.SuspendLayout(); + this.panel7.SuspendLayout(); + this.panel8.SuspendLayout(); + this.panel1.SuspendLayout(); + this.panel2.SuspendLayout(); + this.panel3.SuspendLayout(); + this.panel4.SuspendLayout(); + this.rtKeyPanel.SuspendLayout(); + this.rtGreen.SuspendLayout(); + this.rtOrange.SuspendLayout(); + this.rtRed.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.rtStatsRefreshGridView)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.vrrStatsGridView)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.osStatsGridView)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.rtStatsGridView)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.vrrGridView)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.osGridView)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.rtGridView)).BeginInit(); + this.SuspendLayout(); + // + // standardResultsPanel + // + this.standardResultsPanel.BackColor = System.Drawing.Color.Transparent; + this.standardResultsPanel.Controls.Add(this.runSettingsView); + this.standardResultsPanel.Controls.Add(this.panel5); + this.standardResultsPanel.Controls.Add(this.panel1); + this.standardResultsPanel.Controls.Add(this.rtKeyPanel); + this.standardResultsPanel.Controls.Add(this.rtStatsRefreshGridView); + this.standardResultsPanel.Controls.Add(this.vrrSubTitle); + this.standardResultsPanel.Controls.Add(this.vrrTitle); + this.standardResultsPanel.Controls.Add(this.osSubTitle); + this.standardResultsPanel.Controls.Add(this.osTitle); + this.standardResultsPanel.Controls.Add(this.rtSubTitle); + this.standardResultsPanel.Controls.Add(this.vrrStatsGridView); + this.standardResultsPanel.Controls.Add(this.osStatsGridView); + this.standardResultsPanel.Controls.Add(this.rtStatsGridView); + this.standardResultsPanel.Controls.Add(this.pictureBox1); + this.standardResultsPanel.Controls.Add(this.rtTitle); + this.standardResultsPanel.Controls.Add(this.vrrGridView); + this.standardResultsPanel.Controls.Add(this.osGridView); + this.standardResultsPanel.Controls.Add(this.rtGridView); + this.standardResultsPanel.Controls.Add(this.from2); + this.standardResultsPanel.Controls.Add(this.from3); + this.standardResultsPanel.Controls.Add(this.from1); + this.standardResultsPanel.Controls.Add(this.label12); + this.standardResultsPanel.Controls.Add(this.label10); + this.standardResultsPanel.Controls.Add(this.label9); + this.standardResultsPanel.Location = new System.Drawing.Point(0, 0); + this.standardResultsPanel.Name = "standardResultsPanel"; + this.standardResultsPanel.Size = new System.Drawing.Size(1775, 950); + this.standardResultsPanel.TabIndex = 3; + // + // runSettingsView + // + this.runSettingsView.AllowUserToAddRows = false; + this.runSettingsView.AllowUserToDeleteRows = false; + this.runSettingsView.AllowUserToResizeColumns = false; + this.runSettingsView.AllowUserToResizeRows = false; + this.runSettingsView.BackgroundColor = System.Drawing.SystemColors.WindowFrame; + this.runSettingsView.ColumnHeadersHeight = 40; + this.runSettingsView.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.DisableResizing; + this.runSettingsView.ColumnHeadersVisible = false; + dataGridViewCellStyle1.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; + dataGridViewCellStyle1.BackColor = System.Drawing.SystemColors.Window; + dataGridViewCellStyle1.Font = new System.Drawing.Font("Calibri", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + dataGridViewCellStyle1.ForeColor = System.Drawing.SystemColors.ControlText; + dataGridViewCellStyle1.SelectionBackColor = System.Drawing.SystemColors.Highlight; + dataGridViewCellStyle1.SelectionForeColor = System.Drawing.SystemColors.HighlightText; + dataGridViewCellStyle1.WrapMode = System.Windows.Forms.DataGridViewTriState.False; + this.runSettingsView.DefaultCellStyle = dataGridViewCellStyle1; + this.runSettingsView.EditMode = System.Windows.Forms.DataGridViewEditMode.EditProgrammatically; + this.runSettingsView.EnableHeadersVisualStyles = false; + this.runSettingsView.GridColor = System.Drawing.Color.White; + this.runSettingsView.Location = new System.Drawing.Point(636, 603); + this.runSettingsView.MultiSelect = false; + this.runSettingsView.Name = "runSettingsView"; + this.runSettingsView.ReadOnly = true; + this.runSettingsView.RowHeadersVisible = false; + this.runSettingsView.RowHeadersWidth = 65; + this.runSettingsView.RowHeadersWidthSizeMode = System.Windows.Forms.DataGridViewRowHeadersWidthSizeMode.DisableResizing; + this.runSettingsView.RowTemplate.Height = 35; + this.runSettingsView.RowTemplate.ReadOnly = true; + this.runSettingsView.RowTemplate.Resizable = System.Windows.Forms.DataGridViewTriState.False; + this.runSettingsView.ScrollBars = System.Windows.Forms.ScrollBars.None; + this.runSettingsView.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.CellSelect; + this.runSettingsView.ShowCellToolTips = false; + this.runSettingsView.ShowEditingIcon = false; + this.runSettingsView.Size = new System.Drawing.Size(450, 105); + this.runSettingsView.TabIndex = 41; + // + // panel5 + // + this.panel5.BackColor = System.Drawing.Color.White; + this.panel5.Controls.Add(this.panel6); + this.panel5.Controls.Add(this.panel7); + this.panel5.Controls.Add(this.panel8); + this.panel5.Controls.Add(this.label11); + this.panel5.Location = new System.Drawing.Point(1258, 816); + this.panel5.Name = "panel5"; + this.panel5.Size = new System.Drawing.Size(200, 66); + this.panel5.TabIndex = 40; + // + // panel6 + // + this.panel6.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(58)))), ((int)(((byte)(186)))), ((int)(((byte)(92))))); + this.panel6.Controls.Add(this.vrrGreenLbl); + this.panel6.Location = new System.Drawing.Point(133, 32); + this.panel6.Name = "panel6"; + this.panel6.Size = new System.Drawing.Size(67, 34); + this.panel6.TabIndex = 3; + // + // vrrGreenLbl + // + this.vrrGreenLbl.Font = new System.Drawing.Font("Calibri", 16F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.vrrGreenLbl.ForeColor = System.Drawing.Color.White; + this.vrrGreenLbl.Location = new System.Drawing.Point(0, 1); + this.vrrGreenLbl.Name = "vrrGreenLbl"; + this.vrrGreenLbl.Size = new System.Drawing.Size(67, 33); + this.vrrGreenLbl.TabIndex = 2; + this.vrrGreenLbl.Text = "95"; + this.vrrGreenLbl.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + // + // panel7 + // + this.panel7.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(213)))), ((int)(((byte)(183)))), ((int)(((byte)(98))))); + this.panel7.Controls.Add(this.vrrOrangeLbl); + this.panel7.Location = new System.Drawing.Point(66, 32); + this.panel7.Name = "panel7"; + this.panel7.Size = new System.Drawing.Size(67, 34); + this.panel7.TabIndex = 2; + // + // vrrOrangeLbl + // + this.vrrOrangeLbl.Font = new System.Drawing.Font("Calibri", 16F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.vrrOrangeLbl.ForeColor = System.Drawing.Color.White; + this.vrrOrangeLbl.Location = new System.Drawing.Point(0, 1); + this.vrrOrangeLbl.Name = "vrrOrangeLbl"; + this.vrrOrangeLbl.Size = new System.Drawing.Size(67, 33); + this.vrrOrangeLbl.TabIndex = 2; + this.vrrOrangeLbl.Text = "85"; + this.vrrOrangeLbl.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + // + // panel8 + // + this.panel8.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(213)))), ((int)(((byte)(73)))), ((int)(((byte)(70))))); + this.panel8.Controls.Add(this.vrrRedLbl); + this.panel8.Location = new System.Drawing.Point(-1, 32); + this.panel8.Name = "panel8"; + this.panel8.Size = new System.Drawing.Size(67, 34); + this.panel8.TabIndex = 1; + // + // vrrRedLbl + // + this.vrrRedLbl.Font = new System.Drawing.Font("Calibri", 16F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.vrrRedLbl.ForeColor = System.Drawing.Color.White; + this.vrrRedLbl.Location = new System.Drawing.Point(0, 0); + this.vrrRedLbl.Name = "vrrRedLbl"; + this.vrrRedLbl.Size = new System.Drawing.Size(67, 33); + this.vrrRedLbl.TabIndex = 1; + this.vrrRedLbl.Text = "75"; + this.vrrRedLbl.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + // + // label11 + // + this.label11.AutoSize = true; + this.label11.Font = new System.Drawing.Font("Calibri", 16F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.label11.Location = new System.Drawing.Point(0, 1); + this.label11.Name = "label11"; + this.label11.Size = new System.Drawing.Size(201, 27); + this.label11.TabIndex = 0; + this.label11.Text = "Response Rating Key"; + // + // panel1 + // + this.panel1.BackColor = System.Drawing.Color.White; + this.panel1.Controls.Add(this.panel2); + this.panel1.Controls.Add(this.panel3); + this.panel1.Controls.Add(this.panel4); + this.panel1.Controls.Add(this.label5); + this.panel1.Location = new System.Drawing.Point(951, 818); + this.panel1.Name = "panel1"; + this.panel1.Size = new System.Drawing.Size(200, 66); + this.panel1.TabIndex = 40; + // + // panel2 + // + this.panel2.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(58)))), ((int)(((byte)(186)))), ((int)(((byte)(92))))); + this.panel2.Controls.Add(this.osGreenLbl); + this.panel2.Location = new System.Drawing.Point(133, 32); + this.panel2.Name = "panel2"; + this.panel2.Size = new System.Drawing.Size(67, 34); + this.panel2.TabIndex = 3; + // + // osGreenLbl + // + this.osGreenLbl.Font = new System.Drawing.Font("Calibri", 16F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.osGreenLbl.ForeColor = System.Drawing.Color.White; + this.osGreenLbl.Location = new System.Drawing.Point(0, 1); + this.osGreenLbl.Name = "osGreenLbl"; + this.osGreenLbl.Size = new System.Drawing.Size(67, 33); + this.osGreenLbl.TabIndex = 2; + this.osGreenLbl.Text = "5"; + this.osGreenLbl.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + // + // panel3 + // + this.panel3.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(213)))), ((int)(((byte)(183)))), ((int)(((byte)(98))))); + this.panel3.Controls.Add(this.osOrangeLbl); + this.panel3.Location = new System.Drawing.Point(66, 32); + this.panel3.Name = "panel3"; + this.panel3.Size = new System.Drawing.Size(67, 34); + this.panel3.TabIndex = 2; + // + // osOrangeLbl + // + this.osOrangeLbl.Font = new System.Drawing.Font("Calibri", 16F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.osOrangeLbl.ForeColor = System.Drawing.Color.White; + this.osOrangeLbl.Location = new System.Drawing.Point(0, 1); + this.osOrangeLbl.Name = "osOrangeLbl"; + this.osOrangeLbl.Size = new System.Drawing.Size(67, 33); + this.osOrangeLbl.TabIndex = 2; + this.osOrangeLbl.Text = "10"; + this.osOrangeLbl.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + // + // panel4 + // + this.panel4.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(213)))), ((int)(((byte)(73)))), ((int)(((byte)(70))))); + this.panel4.Controls.Add(this.osRedLbl); + this.panel4.Location = new System.Drawing.Point(-1, 32); + this.panel4.Name = "panel4"; + this.panel4.Size = new System.Drawing.Size(67, 34); + this.panel4.TabIndex = 1; + // + // osRedLbl + // + this.osRedLbl.Font = new System.Drawing.Font("Calibri", 16F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.osRedLbl.ForeColor = System.Drawing.Color.White; + this.osRedLbl.Location = new System.Drawing.Point(0, 0); + this.osRedLbl.Name = "osRedLbl"; + this.osRedLbl.Size = new System.Drawing.Size(67, 33); + this.osRedLbl.TabIndex = 1; + this.osRedLbl.Text = "15"; + this.osRedLbl.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + // + // label5 + // + this.label5.AutoSize = true; + this.label5.Font = new System.Drawing.Font("Calibri", 16F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.label5.Location = new System.Drawing.Point(27, 1); + this.label5.Name = "label5"; + this.label5.Size = new System.Drawing.Size(147, 27); + this.label5.TabIndex = 0; + this.label5.Text = "Overshoot Key"; + // + // rtKeyPanel + // + this.rtKeyPanel.BackColor = System.Drawing.Color.White; + this.rtKeyPanel.Controls.Add(this.rtGreen); + this.rtKeyPanel.Controls.Add(this.rtOrange); + this.rtKeyPanel.Controls.Add(this.rtRed); + this.rtKeyPanel.Controls.Add(this.label1); + this.rtKeyPanel.Location = new System.Drawing.Point(636, 817); + this.rtKeyPanel.Name = "rtKeyPanel"; + this.rtKeyPanel.Size = new System.Drawing.Size(200, 66); + this.rtKeyPanel.TabIndex = 39; + // + // rtGreen + // + this.rtGreen.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(58)))), ((int)(((byte)(186)))), ((int)(((byte)(92))))); + this.rtGreen.Controls.Add(this.rtGreenLbl); + this.rtGreen.Location = new System.Drawing.Point(133, 32); + this.rtGreen.Name = "rtGreen"; + this.rtGreen.Size = new System.Drawing.Size(67, 34); + this.rtGreen.TabIndex = 3; + // + // rtGreenLbl + // + this.rtGreenLbl.Font = new System.Drawing.Font("Calibri", 16F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.rtGreenLbl.ForeColor = System.Drawing.Color.White; + this.rtGreenLbl.Location = new System.Drawing.Point(0, 1); + this.rtGreenLbl.Name = "rtGreenLbl"; + this.rtGreenLbl.Size = new System.Drawing.Size(67, 33); + this.rtGreenLbl.TabIndex = 2; + this.rtGreenLbl.Text = "1"; + this.rtGreenLbl.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + // + // rtOrange + // + this.rtOrange.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(213)))), ((int)(((byte)(183)))), ((int)(((byte)(98))))); + this.rtOrange.Controls.Add(this.rtOrangeLbl); + this.rtOrange.Location = new System.Drawing.Point(66, 32); + this.rtOrange.Name = "rtOrange"; + this.rtOrange.Size = new System.Drawing.Size(67, 34); + this.rtOrange.TabIndex = 2; + // + // rtOrangeLbl + // + this.rtOrangeLbl.Font = new System.Drawing.Font("Calibri", 16F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.rtOrangeLbl.ForeColor = System.Drawing.Color.White; + this.rtOrangeLbl.Location = new System.Drawing.Point(0, 1); + this.rtOrangeLbl.Name = "rtOrangeLbl"; + this.rtOrangeLbl.Size = new System.Drawing.Size(67, 33); + this.rtOrangeLbl.TabIndex = 2; + this.rtOrangeLbl.Text = "5"; + this.rtOrangeLbl.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + // + // rtRed + // + this.rtRed.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(213)))), ((int)(((byte)(73)))), ((int)(((byte)(70))))); + this.rtRed.Controls.Add(this.rtRedLbl); + this.rtRed.Location = new System.Drawing.Point(-1, 32); + this.rtRed.Name = "rtRed"; + this.rtRed.Size = new System.Drawing.Size(67, 34); + this.rtRed.TabIndex = 1; + // + // rtRedLbl + // + this.rtRedLbl.Font = new System.Drawing.Font("Calibri", 16F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.rtRedLbl.ForeColor = System.Drawing.Color.White; + this.rtRedLbl.Location = new System.Drawing.Point(0, 0); + this.rtRedLbl.Name = "rtRedLbl"; + this.rtRedLbl.Size = new System.Drawing.Size(67, 33); + this.rtRedLbl.TabIndex = 1; + this.rtRedLbl.Text = "10"; + this.rtRedLbl.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + // + // label1 + // + this.label1.AutoSize = true; + this.label1.Font = new System.Drawing.Font("Calibri", 16F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.label1.Location = new System.Drawing.Point(6, 1); + this.label1.Name = "label1"; + this.label1.Size = new System.Drawing.Size(188, 27); + this.label1.TabIndex = 0; + this.label1.Text = "Response Time Key"; + // + // rtStatsRefreshGridView + // + this.rtStatsRefreshGridView.AllowUserToAddRows = false; + this.rtStatsRefreshGridView.AllowUserToDeleteRows = false; + this.rtStatsRefreshGridView.AllowUserToResizeColumns = false; + this.rtStatsRefreshGridView.AllowUserToResizeRows = false; + this.rtStatsRefreshGridView.BackgroundColor = System.Drawing.SystemColors.WindowFrame; + this.rtStatsRefreshGridView.ColumnHeadersHeight = 40; + this.rtStatsRefreshGridView.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.DisableResizing; + this.rtStatsRefreshGridView.ColumnHeadersVisible = false; + dataGridViewCellStyle2.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; + dataGridViewCellStyle2.BackColor = System.Drawing.SystemColors.Window; + dataGridViewCellStyle2.Font = new System.Drawing.Font("Calibri", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + dataGridViewCellStyle2.ForeColor = System.Drawing.SystemColors.ControlText; + dataGridViewCellStyle2.SelectionBackColor = System.Drawing.SystemColors.Highlight; + dataGridViewCellStyle2.SelectionForeColor = System.Drawing.SystemColors.HighlightText; + dataGridViewCellStyle2.WrapMode = System.Windows.Forms.DataGridViewTriState.False; + this.rtStatsRefreshGridView.DefaultCellStyle = dataGridViewCellStyle2; + this.rtStatsRefreshGridView.EditMode = System.Windows.Forms.DataGridViewEditMode.EditProgrammatically; + this.rtStatsRefreshGridView.EnableHeadersVisualStyles = false; + this.rtStatsRefreshGridView.GridColor = System.Drawing.Color.White; + this.rtStatsRefreshGridView.Location = new System.Drawing.Point(57, 462); + this.rtStatsRefreshGridView.MultiSelect = false; + this.rtStatsRefreshGridView.Name = "rtStatsRefreshGridView"; + this.rtStatsRefreshGridView.ReadOnly = true; + this.rtStatsRefreshGridView.RowHeadersVisible = false; + this.rtStatsRefreshGridView.RowHeadersWidth = 65; + this.rtStatsRefreshGridView.RowHeadersWidthSizeMode = System.Windows.Forms.DataGridViewRowHeadersWidthSizeMode.DisableResizing; + this.rtStatsRefreshGridView.RowTemplate.Height = 35; + this.rtStatsRefreshGridView.RowTemplate.ReadOnly = true; + this.rtStatsRefreshGridView.RowTemplate.Resizable = System.Windows.Forms.DataGridViewTriState.False; + this.rtStatsRefreshGridView.ScrollBars = System.Windows.Forms.ScrollBars.None; + this.rtStatsRefreshGridView.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.CellSelect; + this.rtStatsRefreshGridView.ShowCellToolTips = false; + this.rtStatsRefreshGridView.ShowEditingIcon = false; + this.rtStatsRefreshGridView.Size = new System.Drawing.Size(450, 105); + this.rtStatsRefreshGridView.TabIndex = 38; + // + // vrrSubTitle + // + this.vrrSubTitle.Font = new System.Drawing.Font("Calibri", 16F, System.Drawing.FontStyle.Italic, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.vrrSubTitle.ForeColor = System.Drawing.Color.Black; + this.vrrSubTitle.Location = new System.Drawing.Point(1264, 69); + this.vrrSubTitle.Name = "vrrSubTitle"; + this.vrrSubTitle.Size = new System.Drawing.Size(377, 28); + this.vrrSubTitle.TabIndex = 37; + this.vrrSubTitle.Text = "Score out of 100 on visible performance"; + this.vrrSubTitle.TextAlign = System.Drawing.ContentAlignment.TopCenter; + // + // vrrTitle + // + this.vrrTitle.Font = new System.Drawing.Font("Calibri", 20F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.vrrTitle.ForeColor = System.Drawing.Color.Black; + this.vrrTitle.Location = new System.Drawing.Point(1264, 36); + this.vrrTitle.Name = "vrrTitle"; + this.vrrTitle.Size = new System.Drawing.Size(377, 36); + this.vrrTitle.TabIndex = 36; + this.vrrTitle.Text = "Visual Response Rating"; + this.vrrTitle.TextAlign = System.Drawing.ContentAlignment.TopCenter; + // + // osSubTitle + // + this.osSubTitle.Font = new System.Drawing.Font("Calibri", 16F, System.Drawing.FontStyle.Italic, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.osSubTitle.ForeColor = System.Drawing.Color.Black; + this.osSubTitle.Location = new System.Drawing.Point(676, 69); + this.osSubTitle.Name = "osSubTitle"; + this.osSubTitle.Size = new System.Drawing.Size(377, 28); + this.osSubTitle.TabIndex = 35; + this.osSubTitle.Text = "RGB Values above the target"; + this.osSubTitle.TextAlign = System.Drawing.ContentAlignment.TopCenter; + // + // osTitle + // + this.osTitle.Font = new System.Drawing.Font("Calibri", 20F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.osTitle.ForeColor = System.Drawing.Color.Black; + this.osTitle.Location = new System.Drawing.Point(676, 36); + this.osTitle.Name = "osTitle"; + this.osTitle.Size = new System.Drawing.Size(377, 36); + this.osTitle.TabIndex = 34; + this.osTitle.Text = "RGB Overshoot"; + this.osTitle.TextAlign = System.Drawing.ContentAlignment.TopCenter; + // + // rtSubTitle + // + this.rtSubTitle.Font = new System.Drawing.Font("Calibri", 16F, System.Drawing.FontStyle.Italic, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.rtSubTitle.ForeColor = System.Drawing.Color.Black; + this.rtSubTitle.Location = new System.Drawing.Point(100, 69); + this.rtSubTitle.Name = "rtSubTitle"; + this.rtSubTitle.Size = new System.Drawing.Size(377, 28); + this.rtSubTitle.TabIndex = 33; + this.rtSubTitle.Text = "Fixed RGB 5 Tolerance"; + this.rtSubTitle.TextAlign = System.Drawing.ContentAlignment.TopCenter; + // + // vrrStatsGridView + // + this.vrrStatsGridView.AllowUserToAddRows = false; + this.vrrStatsGridView.AllowUserToDeleteRows = false; + this.vrrStatsGridView.AllowUserToResizeColumns = false; + this.vrrStatsGridView.AllowUserToResizeRows = false; + this.vrrStatsGridView.BackgroundColor = System.Drawing.SystemColors.WindowFrame; + this.vrrStatsGridView.ColumnHeadersHeight = 40; + this.vrrStatsGridView.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.DisableResizing; + this.vrrStatsGridView.ColumnHeadersVisible = false; + dataGridViewCellStyle3.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; + dataGridViewCellStyle3.BackColor = System.Drawing.SystemColors.Window; + dataGridViewCellStyle3.Font = new System.Drawing.Font("Calibri", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + dataGridViewCellStyle3.ForeColor = System.Drawing.SystemColors.ControlText; + dataGridViewCellStyle3.SelectionBackColor = System.Drawing.SystemColors.Highlight; + dataGridViewCellStyle3.SelectionForeColor = System.Drawing.SystemColors.HighlightText; + dataGridViewCellStyle3.WrapMode = System.Windows.Forms.DataGridViewTriState.False; + this.vrrStatsGridView.DefaultCellStyle = dataGridViewCellStyle3; + this.vrrStatsGridView.EditMode = System.Windows.Forms.DataGridViewEditMode.EditProgrammatically; + this.vrrStatsGridView.EnableHeadersVisualStyles = false; + this.vrrStatsGridView.GridColor = System.Drawing.Color.White; + this.vrrStatsGridView.Location = new System.Drawing.Point(1225, 464); + this.vrrStatsGridView.MultiSelect = false; + this.vrrStatsGridView.Name = "vrrStatsGridView"; + this.vrrStatsGridView.ReadOnly = true; + this.vrrStatsGridView.RowHeadersVisible = false; + this.vrrStatsGridView.RowHeadersWidth = 65; + this.vrrStatsGridView.RowHeadersWidthSizeMode = System.Windows.Forms.DataGridViewRowHeadersWidthSizeMode.DisableResizing; + this.vrrStatsGridView.RowTemplate.Height = 35; + this.vrrStatsGridView.RowTemplate.ReadOnly = true; + this.vrrStatsGridView.RowTemplate.Resizable = System.Windows.Forms.DataGridViewTriState.False; + this.vrrStatsGridView.ScrollBars = System.Windows.Forms.ScrollBars.None; + this.vrrStatsGridView.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.CellSelect; + this.vrrStatsGridView.ShowCellToolTips = false; + this.vrrStatsGridView.ShowEditingIcon = false; + this.vrrStatsGridView.Size = new System.Drawing.Size(450, 173); + this.vrrStatsGridView.TabIndex = 32; + // + // osStatsGridView + // + this.osStatsGridView.AllowUserToAddRows = false; + this.osStatsGridView.AllowUserToDeleteRows = false; + this.osStatsGridView.AllowUserToResizeColumns = false; + this.osStatsGridView.AllowUserToResizeRows = false; + this.osStatsGridView.BackgroundColor = System.Drawing.SystemColors.WindowFrame; + this.osStatsGridView.ColumnHeadersHeight = 40; + this.osStatsGridView.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.DisableResizing; + this.osStatsGridView.ColumnHeadersVisible = false; + dataGridViewCellStyle4.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; + dataGridViewCellStyle4.BackColor = System.Drawing.SystemColors.Window; + dataGridViewCellStyle4.Font = new System.Drawing.Font("Calibri", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + dataGridViewCellStyle4.ForeColor = System.Drawing.SystemColors.ControlText; + dataGridViewCellStyle4.SelectionBackColor = System.Drawing.SystemColors.Highlight; + dataGridViewCellStyle4.SelectionForeColor = System.Drawing.SystemColors.HighlightText; + dataGridViewCellStyle4.WrapMode = System.Windows.Forms.DataGridViewTriState.False; + this.osStatsGridView.DefaultCellStyle = dataGridViewCellStyle4; + this.osStatsGridView.EditMode = System.Windows.Forms.DataGridViewEditMode.EditProgrammatically; + this.osStatsGridView.EnableHeadersVisualStyles = false; + this.osStatsGridView.GridColor = System.Drawing.Color.White; + this.osStatsGridView.Location = new System.Drawing.Point(636, 463); + this.osStatsGridView.MultiSelect = false; + this.osStatsGridView.Name = "osStatsGridView"; + this.osStatsGridView.ReadOnly = true; + this.osStatsGridView.RowHeadersVisible = false; + this.osStatsGridView.RowHeadersWidth = 65; + this.osStatsGridView.RowHeadersWidthSizeMode = System.Windows.Forms.DataGridViewRowHeadersWidthSizeMode.DisableResizing; + this.osStatsGridView.RowTemplate.Height = 35; + this.osStatsGridView.RowTemplate.ReadOnly = true; + this.osStatsGridView.RowTemplate.Resizable = System.Windows.Forms.DataGridViewTriState.False; + this.osStatsGridView.ScrollBars = System.Windows.Forms.ScrollBars.None; + this.osStatsGridView.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.CellSelect; + this.osStatsGridView.ShowCellToolTips = false; + this.osStatsGridView.ShowEditingIcon = false; + this.osStatsGridView.Size = new System.Drawing.Size(450, 105); + this.osStatsGridView.TabIndex = 31; + // + // rtStatsGridView + // + this.rtStatsGridView.AllowUserToAddRows = false; + this.rtStatsGridView.AllowUserToDeleteRows = false; + this.rtStatsGridView.AllowUserToResizeColumns = false; + this.rtStatsGridView.AllowUserToResizeRows = false; + this.rtStatsGridView.BackgroundColor = System.Drawing.SystemColors.WindowFrame; + this.rtStatsGridView.ColumnHeadersHeight = 40; + this.rtStatsGridView.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.DisableResizing; + this.rtStatsGridView.ColumnHeadersVisible = false; + dataGridViewCellStyle5.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; + dataGridViewCellStyle5.BackColor = System.Drawing.SystemColors.Window; + dataGridViewCellStyle5.Font = new System.Drawing.Font("Calibri", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + dataGridViewCellStyle5.ForeColor = System.Drawing.SystemColors.ControlText; + dataGridViewCellStyle5.SelectionBackColor = System.Drawing.SystemColors.Highlight; + dataGridViewCellStyle5.SelectionForeColor = System.Drawing.SystemColors.HighlightText; + dataGridViewCellStyle5.WrapMode = System.Windows.Forms.DataGridViewTriState.False; + this.rtStatsGridView.DefaultCellStyle = dataGridViewCellStyle5; + this.rtStatsGridView.EditMode = System.Windows.Forms.DataGridViewEditMode.EditProgrammatically; + this.rtStatsGridView.EnableHeadersVisualStyles = false; + this.rtStatsGridView.GridColor = System.Drawing.Color.White; + this.rtStatsGridView.Location = new System.Drawing.Point(57, 603); + this.rtStatsGridView.MultiSelect = false; + this.rtStatsGridView.Name = "rtStatsGridView"; + this.rtStatsGridView.ReadOnly = true; + this.rtStatsGridView.RowHeadersVisible = false; + this.rtStatsGridView.RowHeadersWidth = 65; + this.rtStatsGridView.RowHeadersWidthSizeMode = System.Windows.Forms.DataGridViewRowHeadersWidthSizeMode.DisableResizing; + this.rtStatsGridView.RowTemplate.Height = 35; + this.rtStatsGridView.RowTemplate.ReadOnly = true; + this.rtStatsGridView.RowTemplate.Resizable = System.Windows.Forms.DataGridViewTriState.False; + this.rtStatsGridView.ScrollBars = System.Windows.Forms.ScrollBars.None; + this.rtStatsGridView.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.CellSelect; + this.rtStatsGridView.ShowCellToolTips = false; + this.rtStatsGridView.ShowEditingIcon = false; + this.rtStatsGridView.Size = new System.Drawing.Size(450, 280); + this.rtStatsGridView.TabIndex = 30; + // + // pictureBox1 + // + this.pictureBox1.Image = global::OSRTT_Launcher.Properties.Resources.icon_wide; + this.pictureBox1.Location = new System.Drawing.Point(1587, 791); + this.pictureBox1.Name = "pictureBox1"; + this.pictureBox1.Size = new System.Drawing.Size(163, 93); + this.pictureBox1.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom; + this.pictureBox1.TabIndex = 29; + this.pictureBox1.TabStop = false; + // + // rtTitle + // + this.rtTitle.Font = new System.Drawing.Font("Calibri", 20.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.rtTitle.ForeColor = System.Drawing.Color.Black; + this.rtTitle.Location = new System.Drawing.Point(100, 36); + this.rtTitle.Name = "rtTitle"; + this.rtTitle.Size = new System.Drawing.Size(377, 36); + this.rtTitle.TabIndex = 28; + this.rtTitle.Text = "Perceived Response Time"; + this.rtTitle.TextAlign = System.Drawing.ContentAlignment.TopCenter; + // + // vrrGridView + // + this.vrrGridView.AllowUserToAddRows = false; + this.vrrGridView.AllowUserToDeleteRows = false; + this.vrrGridView.AllowUserToResizeColumns = false; + this.vrrGridView.AllowUserToResizeRows = false; + this.vrrGridView.BackgroundColor = System.Drawing.SystemColors.WindowFrame; + this.vrrGridView.BorderStyle = System.Windows.Forms.BorderStyle.None; + this.vrrGridView.ColumnHeadersHeight = 50; + this.vrrGridView.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.DisableResizing; + dataGridViewCellStyle6.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; + dataGridViewCellStyle6.BackColor = System.Drawing.SystemColors.Window; + dataGridViewCellStyle6.Font = new System.Drawing.Font("Calibri", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + dataGridViewCellStyle6.ForeColor = System.Drawing.SystemColors.ControlText; + dataGridViewCellStyle6.SelectionBackColor = System.Drawing.SystemColors.Highlight; + dataGridViewCellStyle6.SelectionForeColor = System.Drawing.SystemColors.HighlightText; + dataGridViewCellStyle6.WrapMode = System.Windows.Forms.DataGridViewTriState.False; + this.vrrGridView.DefaultCellStyle = dataGridViewCellStyle6; + this.vrrGridView.EditMode = System.Windows.Forms.DataGridViewEditMode.EditProgrammatically; + this.vrrGridView.EnableHeadersVisualStyles = false; + this.vrrGridView.GridColor = System.Drawing.Color.White; + this.vrrGridView.Location = new System.Drawing.Point(1186, 100); + this.vrrGridView.MultiSelect = false; + this.vrrGridView.Name = "vrrGridView"; + this.vrrGridView.ReadOnly = true; + this.vrrGridView.RowHeadersWidth = 75; + this.vrrGridView.RowHeadersWidthSizeMode = System.Windows.Forms.DataGridViewRowHeadersWidthSizeMode.DisableResizing; + this.vrrGridView.RowTemplate.Height = 35; + this.vrrGridView.RowTemplate.ReadOnly = true; + this.vrrGridView.RowTemplate.Resizable = System.Windows.Forms.DataGridViewTriState.False; + this.vrrGridView.ScrollBars = System.Windows.Forms.ScrollBars.None; + this.vrrGridView.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.CellSelect; + this.vrrGridView.ShowCellToolTips = false; + this.vrrGridView.ShowEditingIcon = false; + this.vrrGridView.Size = new System.Drawing.Size(525, 290); + this.vrrGridView.TabIndex = 9; + // + // osGridView + // + this.osGridView.AllowUserToAddRows = false; + this.osGridView.AllowUserToDeleteRows = false; + this.osGridView.AllowUserToResizeColumns = false; + this.osGridView.AllowUserToResizeRows = false; + this.osGridView.BackgroundColor = System.Drawing.SystemColors.WindowFrame; + this.osGridView.BorderStyle = System.Windows.Forms.BorderStyle.None; + this.osGridView.CellBorderStyle = System.Windows.Forms.DataGridViewCellBorderStyle.None; + this.osGridView.ColumnHeadersBorderStyle = System.Windows.Forms.DataGridViewHeaderBorderStyle.None; + this.osGridView.ColumnHeadersHeight = 50; + this.osGridView.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.DisableResizing; + dataGridViewCellStyle7.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; + dataGridViewCellStyle7.BackColor = System.Drawing.SystemColors.Window; + dataGridViewCellStyle7.Font = new System.Drawing.Font("Calibri", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + dataGridViewCellStyle7.ForeColor = System.Drawing.SystemColors.ControlText; + dataGridViewCellStyle7.SelectionBackColor = System.Drawing.SystemColors.Highlight; + dataGridViewCellStyle7.SelectionForeColor = System.Drawing.SystemColors.HighlightText; + dataGridViewCellStyle7.WrapMode = System.Windows.Forms.DataGridViewTriState.False; + this.osGridView.DefaultCellStyle = dataGridViewCellStyle7; + this.osGridView.EditMode = System.Windows.Forms.DataGridViewEditMode.EditProgrammatically; + this.osGridView.EnableHeadersVisualStyles = false; + this.osGridView.GridColor = System.Drawing.Color.White; + this.osGridView.Location = new System.Drawing.Point(603, 100); + this.osGridView.MultiSelect = false; + this.osGridView.Name = "osGridView"; + this.osGridView.ReadOnly = true; + this.osGridView.RowHeadersBorderStyle = System.Windows.Forms.DataGridViewHeaderBorderStyle.None; + this.osGridView.RowHeadersWidth = 75; + this.osGridView.RowHeadersWidthSizeMode = System.Windows.Forms.DataGridViewRowHeadersWidthSizeMode.DisableResizing; + this.osGridView.RowTemplate.Height = 35; + this.osGridView.RowTemplate.ReadOnly = true; + this.osGridView.RowTemplate.Resizable = System.Windows.Forms.DataGridViewTriState.False; + this.osGridView.ScrollBars = System.Windows.Forms.ScrollBars.None; + this.osGridView.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.CellSelect; + this.osGridView.ShowCellErrors = false; + this.osGridView.ShowCellToolTips = false; + this.osGridView.ShowEditingIcon = false; + this.osGridView.Size = new System.Drawing.Size(525, 290); + this.osGridView.TabIndex = 8; + // + // rtGridView + // + this.rtGridView.AllowUserToAddRows = false; + this.rtGridView.AllowUserToDeleteRows = false; + this.rtGridView.AllowUserToResizeColumns = false; + this.rtGridView.AllowUserToResizeRows = false; + this.rtGridView.BackgroundColor = System.Drawing.SystemColors.WindowFrame; + this.rtGridView.BorderStyle = System.Windows.Forms.BorderStyle.None; + this.rtGridView.ColumnHeadersHeight = 50; + this.rtGridView.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.DisableResizing; + dataGridViewCellStyle8.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; + dataGridViewCellStyle8.BackColor = System.Drawing.SystemColors.Window; + dataGridViewCellStyle8.Font = new System.Drawing.Font("Calibri", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + dataGridViewCellStyle8.ForeColor = System.Drawing.SystemColors.ControlText; + dataGridViewCellStyle8.SelectionBackColor = System.Drawing.SystemColors.Highlight; + dataGridViewCellStyle8.SelectionForeColor = System.Drawing.SystemColors.HighlightText; + dataGridViewCellStyle8.WrapMode = System.Windows.Forms.DataGridViewTriState.False; + this.rtGridView.DefaultCellStyle = dataGridViewCellStyle8; + this.rtGridView.EditMode = System.Windows.Forms.DataGridViewEditMode.EditProgrammatically; + this.rtGridView.EnableHeadersVisualStyles = false; + this.rtGridView.GridColor = System.Drawing.Color.White; + this.rtGridView.Location = new System.Drawing.Point(26, 100); + this.rtGridView.MultiSelect = false; + this.rtGridView.Name = "rtGridView"; + this.rtGridView.ReadOnly = true; + this.rtGridView.RowHeadersWidth = 75; + this.rtGridView.RowHeadersWidthSizeMode = System.Windows.Forms.DataGridViewRowHeadersWidthSizeMode.DisableResizing; + this.rtGridView.RowTemplate.Height = 35; + this.rtGridView.RowTemplate.ReadOnly = true; + this.rtGridView.RowTemplate.Resizable = System.Windows.Forms.DataGridViewTriState.False; + this.rtGridView.ScrollBars = System.Windows.Forms.ScrollBars.None; + this.rtGridView.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.CellSelect; + this.rtGridView.ShowCellErrors = false; + this.rtGridView.ShowCellToolTips = false; + this.rtGridView.ShowEditingIcon = false; + this.rtGridView.Size = new System.Drawing.Size(525, 290); + this.rtGridView.TabIndex = 7; + // + // from2 + // + this.from2.AutoSize = true; + this.from2.BackColor = System.Drawing.Color.Transparent; + this.from2.Font = new System.Drawing.Font("Microsoft Sans Serif", 16F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.from2.ForeColor = System.Drawing.Color.Black; + this.from2.Location = new System.Drawing.Point(605, 393); + this.from2.Name = "from2"; + this.from2.Size = new System.Drawing.Size(67, 26); + this.from2.TabIndex = 24; + this.from2.Text = "From"; + // + // from3 + // + this.from3.AutoSize = true; + this.from3.BackColor = System.Drawing.Color.Transparent; + this.from3.Font = new System.Drawing.Font("Microsoft Sans Serif", 16F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.from3.ForeColor = System.Drawing.Color.Black; + this.from3.Location = new System.Drawing.Point(1189, 393); + this.from3.Name = "from3"; + this.from3.Size = new System.Drawing.Size(67, 26); + this.from3.TabIndex = 26; + this.from3.Text = "From"; + // + // from1 + // + this.from1.AutoSize = true; + this.from1.BackColor = System.Drawing.Color.Transparent; + this.from1.Font = new System.Drawing.Font("Microsoft Sans Serif", 16F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.from1.ForeColor = System.Drawing.Color.Black; + this.from1.Location = new System.Drawing.Point(28, 393); + this.from1.Name = "from1"; + this.from1.Size = new System.Drawing.Size(67, 26); + this.from1.TabIndex = 22; + this.from1.Text = "From"; + // + // label12 + // + this.label12.AutoSize = true; + this.label12.BackColor = System.Drawing.Color.Transparent; + this.label12.Font = new System.Drawing.Font("Microsoft Sans Serif", 16F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.label12.ForeColor = System.Drawing.Color.Black; + this.label12.Location = new System.Drawing.Point(1715, 106); + this.label12.Name = "label12"; + this.label12.Size = new System.Drawing.Size(38, 26); + this.label12.TabIndex = 27; + this.label12.Text = "To"; + // + // label10 + // + this.label10.AutoSize = true; + this.label10.BackColor = System.Drawing.Color.Transparent; + this.label10.Font = new System.Drawing.Font("Microsoft Sans Serif", 16F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.label10.ForeColor = System.Drawing.Color.Black; + this.label10.Location = new System.Drawing.Point(1129, 106); + this.label10.Name = "label10"; + this.label10.Size = new System.Drawing.Size(38, 26); + this.label10.TabIndex = 25; + this.label10.Text = "To"; + // + // label9 + // + this.label9.AutoSize = true; + this.label9.BackColor = System.Drawing.Color.Transparent; + this.label9.Font = new System.Drawing.Font("Microsoft Sans Serif", 16F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.label9.ForeColor = System.Drawing.Color.Black; + this.label9.Location = new System.Drawing.Point(554, 106); + this.label9.Name = "label9"; + this.label9.Size = new System.Drawing.Size(38, 26); + this.label9.TabIndex = 23; + this.label9.Text = "To"; + // + // Heatmaps + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.Controls.Add(this.standardResultsPanel); + this.Name = "Heatmaps"; + this.Size = new System.Drawing.Size(1775, 950); + this.Load += new System.EventHandler(this.Heatmaps_Load); + this.standardResultsPanel.ResumeLayout(false); + this.standardResultsPanel.PerformLayout(); + ((System.ComponentModel.ISupportInitialize)(this.runSettingsView)).EndInit(); + this.panel5.ResumeLayout(false); + this.panel5.PerformLayout(); + this.panel6.ResumeLayout(false); + this.panel7.ResumeLayout(false); + this.panel8.ResumeLayout(false); + this.panel1.ResumeLayout(false); + this.panel1.PerformLayout(); + this.panel2.ResumeLayout(false); + this.panel3.ResumeLayout(false); + this.panel4.ResumeLayout(false); + this.rtKeyPanel.ResumeLayout(false); + this.rtKeyPanel.PerformLayout(); + this.rtGreen.ResumeLayout(false); + this.rtOrange.ResumeLayout(false); + this.rtRed.ResumeLayout(false); + ((System.ComponentModel.ISupportInitialize)(this.rtStatsRefreshGridView)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.vrrStatsGridView)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.osStatsGridView)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.rtStatsGridView)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.vrrGridView)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.osGridView)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.rtGridView)).EndInit(); + this.ResumeLayout(false); + + } + + #endregion + + private System.Windows.Forms.Panel standardResultsPanel; + private System.Windows.Forms.Label vrrSubTitle; + private System.Windows.Forms.Label vrrTitle; + private System.Windows.Forms.Label osSubTitle; + private System.Windows.Forms.Label osTitle; + private System.Windows.Forms.Label rtSubTitle; + private System.Windows.Forms.DataGridView vrrStatsGridView; + private System.Windows.Forms.DataGridView osStatsGridView; + private System.Windows.Forms.DataGridView rtStatsGridView; + private System.Windows.Forms.PictureBox pictureBox1; + private System.Windows.Forms.Label rtTitle; + private System.Windows.Forms.DataGridView vrrGridView; + private System.Windows.Forms.DataGridView osGridView; + private System.Windows.Forms.DataGridView rtGridView; + private System.Windows.Forms.Label from2; + private System.Windows.Forms.Label from3; + private System.Windows.Forms.Label from1; + private System.Windows.Forms.Label label12; + private System.Windows.Forms.Label label10; + private System.Windows.Forms.Label label9; + private System.Windows.Forms.DataGridView rtStatsRefreshGridView; + private System.Windows.Forms.Panel rtKeyPanel; + private System.Windows.Forms.Panel rtGreen; + private System.Windows.Forms.Panel rtOrange; + private System.Windows.Forms.Panel rtRed; + private System.Windows.Forms.Label label1; + private System.Windows.Forms.Panel panel5; + private System.Windows.Forms.Panel panel6; + private System.Windows.Forms.Label vrrGreenLbl; + private System.Windows.Forms.Panel panel7; + private System.Windows.Forms.Label vrrOrangeLbl; + private System.Windows.Forms.Panel panel8; + private System.Windows.Forms.Label vrrRedLbl; + private System.Windows.Forms.Label label11; + private System.Windows.Forms.Panel panel1; + private System.Windows.Forms.Panel panel2; + private System.Windows.Forms.Label osGreenLbl; + private System.Windows.Forms.Panel panel3; + private System.Windows.Forms.Label osOrangeLbl; + private System.Windows.Forms.Panel panel4; + private System.Windows.Forms.Label osRedLbl; + private System.Windows.Forms.Label label5; + private System.Windows.Forms.Label rtGreenLbl; + private System.Windows.Forms.Label rtOrangeLbl; + private System.Windows.Forms.Label rtRedLbl; + private System.Windows.Forms.DataGridView runSettingsView; + } +} diff --git a/OSRTT Launcher/OSRTT Launcher/Heatmaps.cs b/OSRTT Launcher/OSRTT Launcher/Heatmaps.cs new file mode 100644 index 0000000..d7fe054 --- /dev/null +++ b/OSRTT Launcher/OSRTT Launcher/Heatmaps.cs @@ -0,0 +1,890 @@ +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 OSRTT_Launcher +{ + public partial class Heatmaps : UserControl + { + public List averageData = new List(); + public List RGBArr = new List { 0, 51, 102, 153, 204, 255 }; + public int rtIndex = 4; + public class colourKey + { + public int keyType { get; set; } + public double min { get; set; } + public double middle { get; set; } + public double max { get; set; } + } + List colourKeys = new List(); + public ProcessData.rtMethods rtMethod; + public ProcessData.osMethods osMethod; + public ProcessData.runSettings runSettings; + public void setAverageData(List ad) + { + if (ad != null) + { + averageData.Clear(); + averageData.AddRange(ad); + } + } + public void setRGBArr(List RGB) + { + if (RGB != null) + { + RGBArr.Clear(); + RGBArr.AddRange(RGB); + } + } + public void setRtIndex(int i) + { + rtIndex = i; + } + public void setRtMethod(ProcessData.rtMethods rt) + { + if (rt != null) + { + rtMethod = rt; + } + } + public void setOsMethod(ProcessData.osMethods os) + { + if (os != null) + { + osMethod = os; + } + } + public void setRunSettings(ProcessData.runSettings run) + { + if (run != null) + { + runSettings = run; + } + } + public void hideText(bool state) + { + from1.Visible = state; + from2.Visible = state; + from3.Visible = state; + label12.Visible = state; + label10.Visible = state; + label9.Visible = state; + rtTitle.Visible = state; + rtSubTitle.Visible = state; + osTitle.Visible = state; + osSubTitle.Visible = state; + vrrTitle.Visible = state; + vrrSubTitle.Visible = state; + } + public Heatmaps() + { + Graphics g = this.CreateGraphics(); + g.TextRenderingHint = System.Drawing.Text.TextRenderingHint.AntiAliasGridFit; + InitializeComponent(); + this.SetStyle(ControlStyles.SupportsTransparentBackColor, true); + string[] rtKey = Properties.Settings.Default.rtKey.Split(','); + if (rtKey.Length == 3) + { + colourKeys.Add(new colourKey { keyType = 0, min = double.Parse(rtKey[0]), middle = double.Parse(rtKey[1]), max = double.Parse(rtKey[2]) }); + rtGreenLbl.Text = rtKey[0]; + rtOrangeLbl.Text = rtKey[1]; + rtRedLbl.Text = rtKey[2]; + } + string[] osKey = Properties.Settings.Default.osKey.Split(','); + if (osKey.Length == 3) + { + colourKeys.Add(new colourKey { keyType = 1, min = double.Parse(osKey[0]), middle = double.Parse(osKey[1]), max = double.Parse(osKey[2]) }); + osGreenLbl.Text = osKey[0]; + osOrangeLbl.Text = osKey[1]; + osRedLbl.Text = osKey[2]; + } + string[] vrrKey = Properties.Settings.Default.vrrKey.Split(','); + if (vrrKey.Length == 3) + { + colourKeys.Add(new colourKey { keyType = 2, min = double.Parse(vrrKey[0]), middle = double.Parse(vrrKey[1]), max = double.Parse(vrrKey[2]) }); + vrrGreenLbl.Text = vrrKey[2]; + vrrOrangeLbl.Text = vrrKey[1]; + vrrRedLbl.Text = vrrKey[0]; + } + } + + private void Heatmaps_Load(object sender, EventArgs e) + { + + } + + private void drawTable(DataGridView dgv, string type) + { + // Create string arrays for rows + List data = new List(); + for (int i = 0; i < RGBArr.Count; i++) + { + // Fill list with sized empty string arrays to address later + string[] line = new string[6]; + data.Add(line); + } + int current = 0; + int next = 1; + for (int k = 0; k < averageData.Count; k++) + { + if (next < RGBArr.Count) + { + if (averageData[k].StartingRGB == RGBArr[current]) + { + if (type == "perceived") { data[current][next] = averageData[k].perTime.ToString(); } + else if (type == "initial") { data[current][next] = averageData[k].initTime.ToString(); } + else if (type == "complete") { data[current][next] = averageData[k].compTime.ToString(); } + else if (type == "overshoot") { data[current][next] = averageData[k].Overshoot.ToString(); } + else if (type == "vrr") { data[current][next] = averageData[k].visualResponseRating.ToString(); } + } + else + { + if (type == "perceived") { data[next][current] = averageData[k].perTime.ToString(); } + else if (type == "initial") { data[next][current] = averageData[k].initTime.ToString(); } + else if (type == "complete") { data[next][current] = averageData[k].compTime.ToString(); } + else if (type == "overshoot") { data[next][current] = averageData[k].Overshoot.ToString(); } + else if (type == "vrr") { data[next][current] = averageData[k].visualResponseRating.ToString(); } + next++; + } + } + else + { + current++; + next = current + 1; + if (averageData[k].StartingRGB == RGBArr[current]) + { + if (type == "perceived") { data[current][next] = averageData[k].perTime.ToString(); } + else if (type == "initial") { data[current][next] = averageData[k].initTime.ToString(); } + else if (type == "complete") { data[current][next] = averageData[k].compTime.ToString(); } + else if (type == "overshoot") { data[current][next] = averageData[k].Overshoot.ToString(); } + else if (type == "vrr") { data[current][next] = averageData[k].visualResponseRating.ToString(); } + } + else + { + if (type == "perceived") { data[next][current] = averageData[k].perTime.ToString(); } + else if (type == "initial") { data[next][current] = averageData[k].initTime.ToString(); } + else if (type == "complete") { data[next][current] = averageData[k].compTime.ToString(); } + else if (type == "overshoot") { data[next][current] = averageData[k].Overshoot.ToString(); } + else if (type == "vrr") { data[next][current] = averageData[k].visualResponseRating.ToString(); } + next++; + } + } + } + // Add string array to rows + foreach (var item in data) + { + dgv.Rows.Add(item); + } + for (int l = 0; l < dgv.Rows.Count; l++) + { + dgv.Rows[l].Height += 5; + dgv.Rows[l].HeaderCell.Value = RGBArr[l].ToString(); + Console.WriteLine(dgv.Rows[l].HeaderCell.Value); + } + } + + private void drawStatsTable(DataGridView dgv, string type) + { + // Average function + + // part average (rise or fall) - bundle into main average with if (start < end) += riseAvg + + // Best / worst + + // 0 - 255 - 0 - again roll through main loop. + Console.WriteLine(type); + // Basically just loop through the list, add value to any relevant sums then divide/round at the end. + if (type == "overshoot") + { + + double averageError = 0; + double errorOver10 = 0; + double worstRT = 0; + for (int l = 0; l < averageData.Count; l++) + { + averageError += averageData[l].Overshoot; + if (averageData[l].Overshoot > worstRT) + { + worstRT = averageData[l].Overshoot; + } + if (averageData[l].Overshoot > 10) + { + errorOver10++; + } + } + errorOver10 = (errorOver10 / averageData.Count) * 100; + errorOver10 = Math.Round(errorOver10, 2); + averageError = averageError / averageData.Count; + averageError = Math.Round(averageError, 2); + + // Create string arrays for rows + List data = new List(); + for (int i = 0; i < 3; i++) + { + // Fill list with sized empty string arrays to address later + string[] line = new string[2]; + data.Add(line); + } + data[0][0] = "Average Error"; + data[0][1] = averageError.ToString(); + data[1][0] = "Worst Error"; + data[1][1] = worstRT.ToString(); + string ostype = "Percent Above 10"; + if (osMethod.endPercent || osMethod.rangePercent) + { + ostype += "%"; + } + else + { + ostype += " RGB"; + } + data[2][0] = ostype; + data[2][1] = errorOver10.ToString(); + + foreach (var item in data) + { + dgv.Rows.Add(item); + } + } + else if (type == "vrr") + { + double averageRating = 0; + double averageFall = 0; + double averageRise = 0; + double worst = averageData[0].visualResponseRating; + double best = averageData[0].visualResponseRating; + for (int l = 0; l < averageData.Count; l++) + { + averageRating += averageData[l].visualResponseRating; + if (averageData[l].visualResponseRating < worst) + { + worst = averageData[l].visualResponseRating; + } + if (averageData[l].visualResponseRating > best) + { + best = averageData[l].visualResponseRating; + } + if (averageData[l].StartingRGB < averageData[l].EndRGB) + { + averageRise += averageData[l].visualResponseRating; + } + else + { + averageFall += averageData[l].visualResponseRating; + } + } + averageRating = (averageRating / averageData.Count); + averageRating = Math.Round(averageRating, 2); + double div2 = averageData.Count / 2; + averageFall = (averageFall / div2); + averageFall = Math.Round(averageFall, 2); + averageRise = (averageRise / div2); + averageRise = Math.Round(averageRise, 2); + List data = new List(); + for (int i = 0; i < 5; i++) + { + // Fill list with sized empty string arrays to address later + string[] line = new string[2]; + data.Add(line); + } + data[0][0] = "Average Rating"; + data[0][1] = averageRating.ToString(); + data[1][0] = "Average Rise"; + data[1][1] = averageRise.ToString(); + data[2][0] = "Average Fall"; + data[2][1] = averageFall.ToString(); + data[3][0] = "Best"; + data[3][1] = best.ToString(); + data[4][0] = "Worst"; + data[4][1] = worst.ToString(); + foreach (var item in data) + { + dgv.Rows.Add(item); + } + } + else if (dgv.Name.Contains("Refresh")) + { + int indexToUse = 0; + if (type == "perceived") { indexToUse = 0; } + else if (type == "initial") { indexToUse = 1; } + else if (type == "complete") { indexToUse = 2; } + double refreshRate = 60; + if (runSettings != null) + { + refreshRate = runSettings.RefreshRate; + } + double refreshWindow = Math.Round((1000 / refreshRate), 2); + double percentInWindow = 0; + for (int l = 0; l < averageData.Count; l++) + { + double[] rtTimes = { averageData[l].perTime, averageData[l].initTime, averageData[l].compTime }; + if (rtTimes[indexToUse] < refreshWindow) + { + percentInWindow++; + } + } + percentInWindow = (percentInWindow / averageData.Count) * 100; + percentInWindow = Math.Round(percentInWindow, 2); + // Create string arrays for rows + List data = new List(); + for (int i = 0; i < 3; i++) + { + // Fill list with sized empty string arrays to address later + string[] line = new string[2]; + data.Add(line); + } + data[0][0] = "Refresh Rate"; + data[0][1] = refreshRate.ToString(); + data[1][0] = "Refresh Window"; + data[1][1] = refreshWindow.ToString(); + data[2][0] = "Percent in Window"; + data[2][1] = percentInWindow.ToString(); + foreach (var item in data) + { + dgv.Rows.Add(item); + } + } + else if (dgv.Name.Contains("Settings")) + { + List data = new List(); + for (int i = 0; i < 3; i++) + { + // Fill list with sized empty string arrays to address later + string[] line = new string[2]; + data.Add(line); + } + data[0][0] = "Monitor Name"; + data[0][1] = runSettings.MonitorName.Remove(0,4); + data[1][0] = "FPS Limit"; + data[1][1] = runSettings.FPSLimit.ToString(); + data[2][0] = "V-Sync"; + data[2][1] = runSettings.Vsync.ToString(); + foreach (var item in data) + { + dgv.Rows.Add(item); + } + } + else + { + int indexToUse = 0; + if (type == "perceived") { indexToUse = 0; } + else if (type == "initial") { indexToUse = 1; } + else if (type == "complete") { indexToUse = 2; } + double averageInitialRT = 0; + double averageCompleteRT = 0; + double averagePerceivedRT = 0; + double averageRise = 0; + double averageFall = 0; + double roundTrip = 0; + double bestRT = averageData[0].perTime; + double worstRT = averageData[0].perTime; + for (int l = 0; l < averageData.Count; l++) + { + double[] rtTimes = { averageData[l].perTime, averageData[l].initTime, averageData[l].compTime }; + averageCompleteRT += averageData[l].compTime; + averageInitialRT += averageData[l].initTime; + averagePerceivedRT += averageData[l].perTime; + if (averageData[l].StartingRGB < averageData[l].EndRGB) + { + averageRise += rtTimes[indexToUse]; + } + else + { + averageFall += rtTimes[indexToUse]; + } + if ((averageData[l].StartingRGB == 0 && averageData[l].EndRGB == 255) || (averageData[l].StartingRGB == 255 && averageData[l].EndRGB == 0)) + { + roundTrip += rtTimes[indexToUse]; + } + if (rtTimes[indexToUse] < bestRT) + { + bestRT = rtTimes[indexToUse]; + } + if (rtTimes[indexToUse] > worstRT) + { + worstRT = rtTimes[indexToUse]; + } + + } + averageInitialRT = averageInitialRT / averageData.Count; + averageInitialRT = Math.Round(averageInitialRT, 2); + averageCompleteRT = averageCompleteRT / averageData.Count; + averageCompleteRT = Math.Round(averageCompleteRT, 2); + averagePerceivedRT = averagePerceivedRT / averageData.Count; + averagePerceivedRT = Math.Round(averagePerceivedRT, 2); + averageRise = averageRise / (averageData.Count / 2); + averageRise = Math.Round(averageRise, 2); + averageFall = averageFall / (averageData.Count / 2); + averageFall = Math.Round(averageFall, 2); + // Create string arrays for rows + List data = new List(); + for (int i = 0; i < 8; i++) + { + // Fill list with sized empty string arrays to address later + string[] line = new string[2]; + data.Add(line); + } + data[0][0] = "Average Initial Time"; + data[0][1] = averageInitialRT.ToString(); + data[1][0] = "Average Complete Time"; + data[1][1] = averageCompleteRT.ToString(); + data[2][0] = "Average Perceived Time"; + data[2][1] = averagePerceivedRT.ToString(); + data[3][0] = "Average Rise Time"; + data[3][1] = averageRise.ToString(); + data[4][0] = "Average Fall Time"; + data[4][1] = averageFall.ToString(); + data[5][0] = "0-255-0"; + data[5][1] = roundTrip.ToString(); + data[6][0] = "Best"; + data[6][1] = bestRT.ToString(); + data[7][0] = "Worst"; + data[7][1] = worstRT.ToString(); + foreach (var item in data) + { + dgv.Rows.Add(item); + } + } + } + + void dataGridView_CellPainting(object sender, DataGridViewCellPaintingEventArgs e) + { + if (e.ColumnIndex == -1 && e.RowIndex > -1) + { + e.PaintBackground(e.CellBounds, true); + using (SolidBrush br = new SolidBrush(Color.White)) + { + StringFormat sf = new StringFormat(); + sf.Alignment = StringAlignment.Far; + sf.LineAlignment = StringAlignment.Center; + e.Graphics.TextRenderingHint = System.Drawing.Text.TextRenderingHint.AntiAliasGridFit; + e.Graphics.SmoothingMode = System.Drawing.Drawing2D.SmoothingMode.AntiAlias; + e.Graphics.InterpolationMode = System.Drawing.Drawing2D.InterpolationMode.HighQualityBilinear; + e.Graphics.DrawString(e.Value.ToString(), + e.CellStyle.Font, br, e.CellBounds, sf); + } + e.Handled = true; + } + } + + private void initGridViewColumns(DataGridView dgv) + { + if (dgv.Columns.Count != 0) + { + dgv.Columns.Clear(); + } + if (dgv.Rows.Count != 0) + { + dgv.Rows.Clear(); + } + dgv.SelectionChanged += gridView_SelectionChanged; + dgv.CellPainting += dataGridView_CellPainting; + dgv.ColumnCount = 6; + dgv.BorderStyle = BorderStyle.None; + dgv.ColumnHeadersDefaultCellStyle.BackColor = ColorTranslator.FromHtml("#ACAEAE"); + dgv.RowHeadersDefaultCellStyle.BackColor = ColorTranslator.FromHtml("#ACAEAE"); + dgv.ColumnHeadersDefaultCellStyle.Font = new Font("Calibri", 22, FontStyle.Bold); + dgv.RowHeadersDefaultCellStyle.Font = new Font("Calibri", 22, FontStyle.Bold); + dgv.AdvancedColumnHeadersBorderStyle.All = DataGridViewAdvancedCellBorderStyle.None; + dgv.AdvancedRowHeadersBorderStyle.All = DataGridViewAdvancedCellBorderStyle.None; + dgv.DefaultCellStyle.BackColor = Color.FromArgb(84, 157, 178, 189); + dgv.ColumnHeadersDefaultCellStyle.ForeColor = Color.FromArgb(255, 255, 255, 255); + dgv.RowHeadersDefaultCellStyle.ForeColor = ColorTranslator.FromHtml("#FFFFFF"); + dgv.RowsDefaultCellStyle.Font = new Font("Calibri", 21); + dgv.AdvancedCellBorderStyle.All = DataGridViewAdvancedCellBorderStyle.None; + dgv.RowsDefaultCellStyle.ForeColor = ColorTranslator.FromHtml("#FFFFFF"); + if (dgv.Name.Contains("vrr")) + { + dgv.CellFormatting += new DataGridViewCellFormattingEventHandler(dgvVRR_CellFormatting); + } + else + { + dgv.CellFormatting += new DataGridViewCellFormattingEventHandler(dgv_CellFormatting); + } + for (int i = 0; i < RGBArr.Count; i++) + { + dgv.Columns[i].Name = RGBArr[i].ToString(); + } + + for (int k = 0; k < dgv.Columns.Count; k++) + { + dgv.Columns[k].Width = 75; + dgv.Columns[k].SortMode = DataGridViewColumnSortMode.NotSortable; + } + } + + + private void dgv_CellFormatting(object sender, DataGridViewCellFormattingEventArgs e) + { + //Compare the value of second Column i.e. Column with Index 1. + DataGridView dgv = sender as DataGridView; + Color cellColour; + double min = colourKeys[0].min; + double middle = colourKeys[0].middle; + double max = colourKeys[0].max; + if (dgv.Name.Contains("os")) + { + min = colourKeys[1].min; + middle = colourKeys[1].middle; + max = colourKeys[1].max; + } + if (e.Value != null) + { + if (dgv.Name.Contains("Refresh")) + { + if ((e.RowIndex == 0 || e.RowIndex == 1) && dgv.Name.Contains("Refresh")) + { + cellColour = Color.SteelBlue; + } + else if (e.ColumnIndex == 0) + { + cellColour = Color.LightGray; + } + else + { + double val = Convert.ToDouble(e.Value); + if (val <= 60) + { + int r = 213; + int g = 73; + int b = 70; + cellColour = ColorTranslator.FromHtml("#" + r.ToString("X") + g.ToString("X") + b.ToString("X")); + } + else if (val > 60 && val <= 80) + { + int r = 213; + int g = 183; + int b = 98; + cellColour = ColorTranslator.FromHtml("#" + r.ToString("X") + g.ToString("X") + b.ToString("X")); + } + else + { + int r = 58; + int g = 186; + int b = 92; + cellColour = ColorTranslator.FromHtml("#" + r.ToString("X") + g.ToString("X") + b.ToString("X")); + } + } + } + else if (dgv.Name.Contains("Stats") && e.ColumnIndex == 0 ) + { + cellColour = Color.LightGray; + } + else if (dgv.Name.Contains("Settings")) + { + cellColour = Color.LightGray; + e.CellStyle.ForeColor = Color.White; + } + else + { + double val = Convert.ToDouble(e.Value); + if (dgv.Name.Contains("Stats") && e.RowIndex == 5) + { + val *= 2; + } + if (val == middle) + { + int r = 213; + int g = 183; + int b = 98; + cellColour = ColorTranslator.FromHtml("#" + r.ToString("X") + g.ToString("X") + b.ToString("X")); + } + else if (val < middle) + { + if (val < min) + { + // set min colour + int r = 58; + int g = 186; + int b = 92; + cellColour = ColorTranslator.FromHtml("#" + r.ToString("X") + g.ToString("X") + b.ToString("X")); + } + else + { + double range = middle - min; + double time = val - min; + double result = time / range; + int greenRGB = 205; + int redRGB = Convert.ToInt32((160 * result) + 55); + int blueRGB = 80; + cellColour = ColorTranslator.FromHtml("#" + redRGB.ToString("X") + greenRGB.ToString("X") + blueRGB.ToString("X")); + } + } + else + { + if (val > max) + { + // set max colour + int r = 213; + int g = 73; + int b = 70; + cellColour = ColorTranslator.FromHtml("#" + r.ToString("X") + g.ToString("X") + b.ToString("X")); + } + else + { + double range = max - middle; + double time = max - val; + double result = time / range; + int greenRGB = Convert.ToInt32((135 * result) + 75); + int redRGB = 213; + int blueRGB = 70; + cellColour = ColorTranslator.FromHtml("#" + redRGB.ToString("X") + greenRGB.ToString("X") + blueRGB.ToString("X")); + } + } + } + } + else + { + cellColour = Color.LightGray; + } + e.CellStyle.BackColor = cellColour; + } + + private void dgvVRR_CellFormatting(object sender, DataGridViewCellFormattingEventArgs e) + { + //Compare the value of second Column i.e. Column with Index 1. + DataGridView dgv = sender as DataGridView; + int colourKeyIndex = 0; + Color cellColour = Color.LightGray; + double min = colourKeys[2].min; + double middle = colourKeys[2].middle; + double max = colourKeys[2].max; + if (e.Value != null) + { + if (dgv.Name.Contains("Stats") && e.ColumnIndex == 0) + { + cellColour = Color.LightGray; + } + else + { + double val = Convert.ToDouble(e.Value); + if (dgv.Name.Contains("Stats") && e.RowIndex == 5) + { + val /= 2; + } + if (val == colourKeys[colourKeyIndex].middle) + { + int r = 213; + int g = 183; + int b = 98; + cellColour = ColorTranslator.FromHtml("#" + r.ToString("X") + g.ToString("X") + b.ToString("X")); + } + else if (val < middle) + { + if (val < min) + { + int r = 213; + int g = 73; + int b = 70; + cellColour = ColorTranslator.FromHtml("#" + r.ToString("X") + g.ToString("X") + b.ToString("X")); + } + else + { + double range = middle - min; + double time = val - min; + double result = time / range; + + int greenRGB = Convert.ToInt32((135 * result) + 75); + int redRGB = 213; + int blueRGB = 70; + cellColour = ColorTranslator.FromHtml("#" + redRGB.ToString("X") + greenRGB.ToString("X") + blueRGB.ToString("X")); + } + } + else + { + if (val > max) + { + int r = 58; + int g = 186; + int b = 92; + cellColour = ColorTranslator.FromHtml("#" + r.ToString("X") + g.ToString("X") + b.ToString("X")); + } + else + { + double range = max - middle; + double time = max - val; + double result = time / range; + + int greenRGB = 205; + int redRGB = Convert.ToInt32((160 * result) + 55); + int blueRGB = 80; + cellColour = ColorTranslator.FromHtml("#" + redRGB.ToString("X") + greenRGB.ToString("X") + blueRGB.ToString("X")); + } + } + } + } + else + { + cellColour = Color.LightGray; + } + e.CellStyle.BackColor = cellColour; + } + + + private void initStatsGridViewColumns(DataGridView dgv) + { + if (dgv.Columns.Count != 0) + { + dgv.Columns.Clear(); + } + if (dgv.Rows.Count != 0) + { + dgv.Rows.Clear(); + } + dgv.SelectionChanged += gridView_SelectionChanged; + dgv.ColumnCount = 2; + dgv.BorderStyle = BorderStyle.None; + dgv.ColumnHeadersVisible = false; + dgv.RowHeadersVisible = false; + dgv.AdvancedCellBorderStyle.All = DataGridViewAdvancedCellBorderStyle.None; + dgv.RowsDefaultCellStyle.ForeColor = Color.White; + dgv.RowsDefaultCellStyle.BackColor = Color.Gray; + dgv.RowsDefaultCellStyle.Font = new Font("Calibri", 22); + if (dgv.Name.Contains("vrr")) + { + dgv.CellFormatting += new DataGridViewCellFormattingEventHandler(dgvVRR_CellFormatting); + } + else + { + dgv.CellFormatting += new DataGridViewCellFormattingEventHandler(dgv_CellFormatting); + } + + // rtGridView.RowHeadersDefaultCellStyle.Padding = new Padding(rtGridView.RowHeadersWidth / 2 ); + for (int k = 0; k < dgv.Columns.Count; k++) + { + if (k == 0) + { + if (dgv.Name.Contains("Settings")) + { + dgv.Columns[k].Width = 200; + } + else + { + dgv.Columns[k].Width = 325; + } + dgv.Columns[k].DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight; + } + else + { + if (dgv.Name.Contains("Settings")) + { + dgv.Columns[k].Width = 250; + } + else + { + dgv.Columns[k].Width = 125; + } + } + dgv.Columns[k].SortMode = DataGridViewColumnSortMode.NotSortable; + } + + } + + private void gridView_SelectionChanged(Object sender, EventArgs e) + { + DataGridView dgv = sender as DataGridView; + dgv.ClearSelection(); + dgv.CurrentRow.Selected = false; + } + + public void standardView() + { + vrrTitle.Text = "Visual Response Rating"; + vrrSubTitle.Text = "Score out of 100 of visible performance"; + try + { + initGridViewColumns(rtGridView); + initGridViewColumns(osGridView); + initGridViewColumns(vrrGridView); + } + catch (Exception e) + { + Console.WriteLine(e.Message + e.StackTrace); + } + string rtType = "perceived"; + rtTitle.Text = "Perceived Response Time"; + if (rtIndex == 3) + { + rtType = "initial"; + rtTitle.Text = "Initial Response Time"; + } + else if (rtIndex == 2) + { + rtType = "complete"; + rtTitle.Text = "Complete Response Time"; + } + rtSubTitle.Text = rtMethod.Name; + if (osMethod.gammaCorrected && (!osMethod.endPercent || !osMethod.rangePercent)) + { + osTitle.Text = "RGB Overshoot"; + osSubTitle.Text = "RGB values over/under target"; + } + else if (osMethod.gammaCorrected && (osMethod.endPercent || osMethod.rangePercent)) + { + osTitle.Text = "Percent RGB Overshoot"; + if (osMethod.rangePercent) + { + osSubTitle.Text = "Percentage of RGB values over/under transition range"; + } + else + { + osSubTitle.Text = "Percentage of RGB values over/under target"; + } + } + else if (!osMethod.gammaCorrected && (osMethod.endPercent || osMethod.rangePercent)) + { + osTitle.Text = "Percent Overshoot"; + if (osMethod.rangePercent) + { + osSubTitle.Text = "Percent of light level over/under transition range"; + } + else + { + osSubTitle.Text = "Percent of light level over/under target"; + } + } + try + { + drawTable(rtGridView, rtType); + drawTable(osGridView, "overshoot"); + drawTable(vrrGridView, "vrr"); + } + catch (Exception ex) + { + Console.WriteLine(ex.Message + ex.StackTrace); + } + try + { + initStatsGridViewColumns(rtStatsRefreshGridView); + initStatsGridViewColumns(rtStatsGridView); + initStatsGridViewColumns(osStatsGridView); + initStatsGridViewColumns(vrrStatsGridView); + initStatsGridViewColumns(runSettingsView); + } + catch (Exception e) + { + Console.WriteLine(e.Message + e.StackTrace); + } + try + { + drawStatsTable(rtStatsRefreshGridView, rtType); + drawStatsTable(rtStatsGridView, rtType); + drawStatsTable(osStatsGridView, "overshoot"); + drawStatsTable(vrrStatsGridView, "vrr"); + drawStatsTable(runSettingsView, "runSettings"); + } + catch (Exception ex) + { + Console.WriteLine(ex.Message + ex.StackTrace); + } + // Set location, size, enabled/clickable/editable + // Draw averages + } + } +} diff --git a/OSRTT Launcher/OSRTT Launcher/Heatmaps.resx b/OSRTT Launcher/OSRTT Launcher/Heatmaps.resx new file mode 100644 index 0000000..1af7de1 --- /dev/null +++ b/OSRTT Launcher/OSRTT Launcher/Heatmaps.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/OSRTT Launcher/OSRTT Launcher/HelpView.Designer.cs b/OSRTT Launcher/OSRTT Launcher/HelpView.Designer.cs new file mode 100644 index 0000000..571bb98 --- /dev/null +++ b/OSRTT Launcher/OSRTT Launcher/HelpView.Designer.cs @@ -0,0 +1,383 @@ + +namespace OSRTT_Launcher +{ + partial class HelpView + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(HelpView)); + this.panel2 = new System.Windows.Forms.Panel(); + this.label1 = new System.Windows.Forms.Label(); + this.label3 = new System.Windows.Forms.Label(); + this.label7 = new System.Windows.Forms.Label(); + this.panel1 = new System.Windows.Forms.Panel(); + this.label8 = new System.Windows.Forms.Label(); + this.label2 = new System.Windows.Forms.Label(); + this.label13 = new System.Windows.Forms.Label(); + this.panel10 = new System.Windows.Forms.Panel(); + this.label4 = new System.Windows.Forms.Label(); + this.panel3 = new System.Windows.Forms.Panel(); + this.label5 = new System.Windows.Forms.Label(); + this.panel6 = new System.Windows.Forms.Panel(); + this.label14 = new System.Windows.Forms.Label(); + this.label12 = new System.Windows.Forms.Label(); + this.panel4 = new System.Windows.Forms.Panel(); + this.label6 = new System.Windows.Forms.Label(); + this.panel5 = new System.Windows.Forms.Panel(); + this.label9 = new System.Windows.Forms.Label(); + this.panel8 = new System.Windows.Forms.Panel(); + this.label15 = new System.Windows.Forms.Label(); + this.label16 = new System.Windows.Forms.Label(); + this.label18 = new System.Windows.Forms.Label(); + this.panel2.SuspendLayout(); + this.panel1.SuspendLayout(); + this.panel10.SuspendLayout(); + this.panel3.SuspendLayout(); + this.panel6.SuspendLayout(); + this.panel4.SuspendLayout(); + this.panel5.SuspendLayout(); + this.panel8.SuspendLayout(); + this.SuspendLayout(); + // + // panel2 + // + this.panel2.BackColor = System.Drawing.Color.Khaki; + this.panel2.Controls.Add(this.label1); + this.panel2.Location = new System.Drawing.Point(377, 65); + this.panel2.Name = "panel2"; + this.panel2.Size = new System.Drawing.Size(356, 54); + this.panel2.TabIndex = 1; + // + // label1 + // + this.label1.AutoSize = true; + this.label1.Font = new System.Drawing.Font("Arial", 20F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.label1.ForeColor = System.Drawing.Color.Black; + this.label1.Location = new System.Drawing.Point(4, 11); + this.label1.Name = "label1"; + this.label1.Size = new System.Drawing.Size(295, 32); + this.label1.TabIndex = 11; + this.label1.Text = "Number of Test Runs"; + // + // label3 + // + this.label3.AutoSize = true; + this.label3.Font = new System.Drawing.Font("Microsoft Sans Serif", 16F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.label3.ForeColor = System.Drawing.SystemColors.ButtonHighlight; + this.label3.Location = new System.Drawing.Point(381, 128); + this.label3.Name = "label3"; + this.label3.Size = new System.Drawing.Size(349, 130); + this.label3.TabIndex = 11; + this.label3.Text = "This controls how many times you\r\nwould like the test to repeat before\r\naveraging" + + " the data. The more runs,\r\nthe more accurate the data is likely\r\nto be. Current " + + "maximum is 10."; + // + // label7 + // + this.label7.AutoSize = true; + this.label7.Font = new System.Drawing.Font("Microsoft Sans Serif", 16F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.label7.ForeColor = System.Drawing.SystemColors.ButtonHighlight; + this.label7.Location = new System.Drawing.Point(10, 365); + this.label7.Name = "label7"; + this.label7.Size = new System.Drawing.Size(367, 130); + this.label7.TabIndex = 13; + this.label7.Text = "Adjust how long per transition the \r\ndevice should capture light samples.\r\nSlower" + + " monitors, or while testing \r\nwith VSync ON, should use a longer \r\ntime (i.e. 15" + + "0ms+)."; + // + // panel1 + // + this.panel1.BackColor = System.Drawing.Color.Khaki; + this.panel1.Controls.Add(this.label8); + this.panel1.Location = new System.Drawing.Point(6, 302); + this.panel1.Name = "panel1"; + this.panel1.Size = new System.Drawing.Size(356, 54); + this.panel1.TabIndex = 12; + // + // label8 + // + this.label8.AutoSize = true; + this.label8.Font = new System.Drawing.Font("Arial", 20F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.label8.ForeColor = System.Drawing.Color.Black; + this.label8.Location = new System.Drawing.Point(4, 10); + this.label8.Name = "label8"; + this.label8.Size = new System.Drawing.Size(194, 32); + this.label8.TabIndex = 11; + this.label8.Text = "Capture Time"; + // + // label2 + // + this.label2.AutoSize = true; + this.label2.Font = new System.Drawing.Font("Microsoft Sans Serif", 20F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.label2.ForeColor = System.Drawing.SystemColors.ButtonHighlight; + this.label2.Location = new System.Drawing.Point(12, 9); + this.label2.Name = "label2"; + this.label2.Size = new System.Drawing.Size(254, 31); + this.label2.TabIndex = 10; + this.label2.Text = "Main Window Help"; + // + // label13 + // + this.label13.AutoSize = true; + this.label13.Font = new System.Drawing.Font("Microsoft Sans Serif", 13F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.label13.ForeColor = System.Drawing.SystemColors.ButtonHighlight; + this.label13.Location = new System.Drawing.Point(11, 122); + this.label13.Name = "label13"; + this.label13.Size = new System.Drawing.Size(338, 176); + this.label13.TabIndex = 29; + this.label13.Text = resources.GetString("label13.Text"); + // + // panel10 + // + this.panel10.BackColor = System.Drawing.Color.Khaki; + this.panel10.Controls.Add(this.label14); + this.panel10.Location = new System.Drawing.Point(9, 65); + this.panel10.Name = "panel10"; + this.panel10.Size = new System.Drawing.Size(356, 54); + this.panel10.TabIndex = 28; + // + // label4 + // + this.label4.AutoSize = true; + this.label4.Font = new System.Drawing.Font("Microsoft Sans Serif", 16F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.label4.ForeColor = System.Drawing.SystemColors.ButtonHighlight; + this.label4.Location = new System.Drawing.Point(381, 365); + this.label4.Name = "label4"; + this.label4.Size = new System.Drawing.Size(355, 130); + this.label4.TabIndex = 31; + this.label4.Text = "Toggle VSync on or off. On means\r\nmore stable results, less prone to \r\ncapture er" + + "rors. Off means true input\r\nlatency results, but capture errors \r\nare more like" + + "ly. "; + // + // panel3 + // + this.panel3.BackColor = System.Drawing.Color.Khaki; + this.panel3.Controls.Add(this.label5); + this.panel3.Location = new System.Drawing.Point(377, 302); + this.panel3.Name = "panel3"; + this.panel3.Size = new System.Drawing.Size(356, 54); + this.panel3.TabIndex = 30; + // + // label5 + // + this.label5.AutoSize = true; + this.label5.Font = new System.Drawing.Font("Arial", 20F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.label5.ForeColor = System.Drawing.Color.Black; + this.label5.Location = new System.Drawing.Point(4, 10); + this.label5.Name = "label5"; + this.label5.Size = new System.Drawing.Size(172, 32); + this.label5.TabIndex = 11; + this.label5.Text = "VSync State"; + // + // panel6 + // + this.panel6.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.panel6.Controls.Add(this.label12); + this.panel6.Controls.Add(this.panel10); + this.panel6.Controls.Add(this.panel2); + this.panel6.Controls.Add(this.label3); + this.panel6.Controls.Add(this.panel1); + this.panel6.Controls.Add(this.label7); + this.panel6.Controls.Add(this.label4); + this.panel6.Controls.Add(this.label13); + this.panel6.Controls.Add(this.panel3); + this.panel6.Location = new System.Drawing.Point(12, 58); + this.panel6.Name = "panel6"; + this.panel6.Size = new System.Drawing.Size(758, 529); + this.panel6.TabIndex = 36; + // + // label14 + // + this.label14.AutoSize = true; + this.label14.Font = new System.Drawing.Font("Arial", 20F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.label14.ForeColor = System.Drawing.Color.Black; + this.label14.Location = new System.Drawing.Point(4, 11); + this.label14.Name = "label14"; + this.label14.Size = new System.Drawing.Size(225, 32); + this.label14.TabIndex = 11; + this.label14.Text = "Framerate Limit"; + // + // label12 + // + this.label12.AutoSize = true; + this.label12.Font = new System.Drawing.Font("Microsoft Sans Serif", 20F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.label12.ForeColor = System.Drawing.SystemColors.ButtonHighlight; + this.label12.Location = new System.Drawing.Point(10, 13); + this.label12.Name = "label12"; + this.label12.Size = new System.Drawing.Size(283, 31); + this.label12.TabIndex = 37; + this.label12.Text = "Response Time Test"; + // + // panel4 + // + this.panel4.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.panel4.Controls.Add(this.label6); + this.panel4.Controls.Add(this.panel5); + this.panel4.Controls.Add(this.panel8); + this.panel4.Controls.Add(this.label16); + this.panel4.Controls.Add(this.label18); + this.panel4.Location = new System.Drawing.Point(785, 58); + this.panel4.Name = "panel4"; + this.panel4.Size = new System.Drawing.Size(380, 529); + this.panel4.TabIndex = 38; + // + // label6 + // + this.label6.AutoSize = true; + this.label6.Font = new System.Drawing.Font("Microsoft Sans Serif", 20F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.label6.ForeColor = System.Drawing.SystemColors.ButtonHighlight; + this.label6.Location = new System.Drawing.Point(10, 13); + this.label6.Name = "label6"; + this.label6.Size = new System.Drawing.Size(202, 31); + this.label6.TabIndex = 37; + this.label6.Text = "Input Lag Test"; + // + // panel5 + // + this.panel5.BackColor = System.Drawing.Color.Khaki; + this.panel5.Controls.Add(this.label9); + this.panel5.Location = new System.Drawing.Point(9, 65); + this.panel5.Name = "panel5"; + this.panel5.Size = new System.Drawing.Size(356, 54); + this.panel5.TabIndex = 28; + // + // label9 + // + this.label9.AutoSize = true; + this.label9.Font = new System.Drawing.Font("Arial", 20F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.label9.ForeColor = System.Drawing.Color.Black; + this.label9.Location = new System.Drawing.Point(4, 11); + this.label9.Name = "label9"; + this.label9.Size = new System.Drawing.Size(291, 32); + this.label9.TabIndex = 11; + this.label9.Text = "Time Between Clicks"; + // + // panel8 + // + this.panel8.BackColor = System.Drawing.Color.Khaki; + this.panel8.Controls.Add(this.label15); + this.panel8.Location = new System.Drawing.Point(6, 302); + this.panel8.Name = "panel8"; + this.panel8.Size = new System.Drawing.Size(356, 54); + this.panel8.TabIndex = 12; + // + // label15 + // + this.label15.AutoSize = true; + this.label15.Font = new System.Drawing.Font("Arial", 20F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.label15.ForeColor = System.Drawing.Color.Black; + this.label15.Location = new System.Drawing.Point(4, 10); + this.label15.Name = "label15"; + this.label15.Size = new System.Drawing.Size(244, 32); + this.label15.TabIndex = 11; + this.label15.Text = "Number of Clicks"; + // + // label16 + // + this.label16.AutoSize = true; + this.label16.Font = new System.Drawing.Font("Microsoft Sans Serif", 20F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.label16.ForeColor = System.Drawing.SystemColors.ButtonHighlight; + this.label16.Location = new System.Drawing.Point(10, 365); + this.label16.Name = "label16"; + this.label16.Size = new System.Drawing.Size(349, 93); + this.label16.TabIndex = 13; + this.label16.Text = "How many clicks should the\r\ntest fire before finishing.\r\nDefault is 20."; + // + // label18 + // + this.label18.AutoSize = true; + this.label18.Font = new System.Drawing.Font("Microsoft Sans Serif", 19F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.label18.ForeColor = System.Drawing.SystemColors.ButtonHighlight; + this.label18.Location = new System.Drawing.Point(11, 122); + this.label18.Name = "label18"; + this.label18.Size = new System.Drawing.Size(349, 90); + this.label18.TabIndex = 29; + this.label18.Text = "How much time should be left\r\nbetween mouse clicks during\r\nthe test. 0.5s is defa" + + "ult."; + // + // HelpView + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.BackColor = System.Drawing.SystemColors.ControlDark; + this.ClientSize = new System.Drawing.Size(1177, 599); + this.Controls.Add(this.panel4); + this.Controls.Add(this.panel6); + this.Controls.Add(this.label2); + this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog; + this.MaximizeBox = false; + this.Name = "HelpView"; + this.SizeGripStyle = System.Windows.Forms.SizeGripStyle.Hide; + this.Text = "Help"; + this.Load += new System.EventHandler(this.ResultsSettings_Load); + this.panel2.ResumeLayout(false); + this.panel2.PerformLayout(); + this.panel1.ResumeLayout(false); + this.panel1.PerformLayout(); + this.panel10.ResumeLayout(false); + this.panel10.PerformLayout(); + this.panel3.ResumeLayout(false); + this.panel3.PerformLayout(); + this.panel6.ResumeLayout(false); + this.panel6.PerformLayout(); + this.panel4.ResumeLayout(false); + this.panel4.PerformLayout(); + this.panel5.ResumeLayout(false); + this.panel5.PerformLayout(); + this.panel8.ResumeLayout(false); + this.panel8.PerformLayout(); + this.ResumeLayout(false); + this.PerformLayout(); + + } + + #endregion + private System.Windows.Forms.Panel panel2; + private System.Windows.Forms.Label label1; + private System.Windows.Forms.Label label3; + private System.Windows.Forms.Label label7; + private System.Windows.Forms.Panel panel1; + private System.Windows.Forms.Label label8; + private System.Windows.Forms.Label label2; + private System.Windows.Forms.Label label13; + private System.Windows.Forms.Panel panel10; + private System.Windows.Forms.Label label14; + private System.Windows.Forms.Label label4; + private System.Windows.Forms.Panel panel3; + private System.Windows.Forms.Label label5; + private System.Windows.Forms.Panel panel6; + private System.Windows.Forms.Label label12; + private System.Windows.Forms.Panel panel4; + private System.Windows.Forms.Label label6; + private System.Windows.Forms.Panel panel5; + private System.Windows.Forms.Label label9; + private System.Windows.Forms.Panel panel8; + private System.Windows.Forms.Label label15; + private System.Windows.Forms.Label label16; + private System.Windows.Forms.Label label18; + } +} \ No newline at end of file diff --git a/OSRTT Launcher/OSRTT Launcher/HelpView.cs b/OSRTT Launcher/OSRTT Launcher/HelpView.cs new file mode 100644 index 0000000..ce62fe9 --- /dev/null +++ b/OSRTT Launcher/OSRTT Launcher/HelpView.cs @@ -0,0 +1,32 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Diagnostics; +using System.Drawing; +using System.Drawing.Drawing2D; +using System.Linq; +using System.Resources; +using System.Text; +using System.Threading; +using System.Threading.Tasks; +using System.Windows.Forms; + +namespace OSRTT_Launcher +{ + public partial class HelpView : Form + { + private ResourceManager rm = OSRTT_Launcher.Properties.Resources.ResourceManager; + public HelpView() + { + InitializeComponent(); + this.Icon = (Icon)rm.GetObject("osrttIcon"); + } + + private void ResultsSettings_Load(object sender, EventArgs e) + { + + } + + } +} diff --git a/OSRTT Launcher/OSRTT Launcher/HelpView.resx b/OSRTT Launcher/OSRTT Launcher/HelpView.resx new file mode 100644 index 0000000..f6db5ed --- /dev/null +++ b/OSRTT Launcher/OSRTT Launcher/HelpView.resx @@ -0,0 +1,130 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 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 + + + This setting limits the in-game framerate +during the test. This is most useful for +testing Variable Refresh Rate (VRR), as +you can set the FPS limit to below the +monitor's refresh rate, forcing it to refresh +slower than normal. Set this to equal or +above the quoted refresh rate for normal +testing. + + \ No newline at end of file diff --git a/OSRTT Launcher/OSRTT Launcher/Main.Designer.cs b/OSRTT Launcher/OSRTT Launcher/Main.Designer.cs index 8ab3328..ab7201d 100644 --- a/OSRTT Launcher/OSRTT Launcher/Main.Designer.cs +++ b/OSRTT Launcher/OSRTT Launcher/Main.Designer.cs @@ -30,43 +30,14 @@ private void InitializeComponent() { this.components = new System.ComponentModel.Container(); this.launchBtn = new System.Windows.Forms.Button(); - this.resultsBtn = new System.Windows.Forms.Button(); this.richTextBox1 = new System.Windows.Forms.RichTextBox(); this.menuStrip1 = new System.Windows.Forms.MenuStrip(); this.analyseResultsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.resultsSettingsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.outputSettingsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.saveXLSXMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.saveGraphsMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.verboseOutputToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.saveGammaTableToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.saveSmoothedDataToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.saveRawInputLagMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.toolStripSeparator4 = new System.Windows.Forms.ToolStripSeparator(); - this.convertRawGraphMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.toolStripSeparator2 = new System.Windows.Forms.ToolStripSeparator(); - this.recommendedSettingsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.advancedSettingsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.measurementsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.gamCorMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.toolStripSeparator1 = new System.Windows.Forms.ToolStripSeparator(); - this.fixedRGB5OffsetToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.fixedRGB10OffsetToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.toolStripSeparator3 = new System.Windows.Forms.ToolStripSeparator(); - this.threePercentMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.tenPercentMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.overshootSettingsMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.gammaCorrectedToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.percentageToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.differenceToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.endValueToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.extendedGammaTestToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.settingsMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.programSettingsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.aboutProgramToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.bugReportMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.minimiseToTrayToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.suppressDialogBoxesToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.IgnoreErrorsMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.BrightnessCalBtn = new System.Windows.Forms.ToolStripMenuItem(); this.deviceToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.debugModeToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); @@ -74,29 +45,21 @@ private void InitializeComponent() this.updateDeviceToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.testButtonMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.toolStripMenuItem1 = new System.Windows.Forms.ToolStripMenuItem(); - this.devStatLbl = new System.Windows.Forms.Label(); this.devStat = new System.Windows.Forms.Label(); - this.label3 = new System.Windows.Forms.Label(); this.controlsPanel = new System.Windows.Forms.Panel(); + this.testSettingsBtn = new System.Windows.Forms.Button(); this.vsyncStateList = new System.Windows.Forms.ComboBox(); - this.vsyncHelpBtn = new System.Windows.Forms.Button(); this.label15 = new System.Windows.Forms.Label(); - this.helpCaptureBtn = new System.Windows.Forms.Button(); - this.helpCyclesBtn = new System.Windows.Forms.Button(); - this.helpFramerateBtn = new System.Windows.Forms.Button(); this.captureTimeBox = new System.Windows.Forms.ComboBox(); this.label17 = new System.Windows.Forms.Label(); - this.label13 = new System.Windows.Forms.Label(); this.fpsLimitList = new System.Windows.Forms.ComboBox(); this.label4 = new System.Windows.Forms.Label(); this.testCount = new System.Windows.Forms.NumericUpDown(); this.label2 = new System.Windows.Forms.Label(); + this.helpBtn = new System.Windows.Forms.Button(); this.refreshMonitorListBtn = new System.Windows.Forms.Button(); this.monitorCB = new System.Windows.Forms.ComboBox(); this.label1 = new System.Windows.Forms.Label(); - this.analysePanel = new System.Windows.Forms.Panel(); - this.opnResultsBtn = new System.Windows.Forms.Button(); - this.importRawFolder = new System.Windows.Forms.Button(); this.rawValText = new System.Windows.Forms.Label(); this.label5 = new System.Windows.Forms.Label(); this.resetBtn = new System.Windows.Forms.Button(); @@ -131,15 +94,19 @@ private void InitializeComponent() this.numberOfClicksSlider = new System.Windows.Forms.TrackBar(); this.label16 = new System.Windows.Forms.Label(); this.timeBetweenSlider = new System.Windows.Forms.TrackBar(); - this.label18 = new System.Windows.Forms.Label(); this.deviceStatusPanel = new System.Windows.Forms.Panel(); + this.checkImg = new System.Windows.Forms.PictureBox(); this.monitorPanel = new System.Windows.Forms.Panel(); this.mainPanel = new System.Windows.Forms.Panel(); + this.resultsFolderBtn = new System.Windows.Forms.Button(); + this.resultsViewBtn = new System.Windows.Forms.Button(); this.progressBar1 = new System.Windows.Forms.ProgressBar(); + this.toolTipController = new System.Windows.Forms.ToolTip(this.components); + this.boardSerialLbl = new System.Windows.Forms.Label(); + this.label13 = new System.Windows.Forms.Label(); this.menuStrip1.SuspendLayout(); this.controlsPanel.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.testCount)).BeginInit(); - this.analysePanel.SuspendLayout(); this.brightnessPanel.SuspendLayout(); this.aboutPanel.SuspendLayout(); this.debugPanel.SuspendLayout(); @@ -147,42 +114,31 @@ private void InitializeComponent() ((System.ComponentModel.ISupportInitialize)(this.numberOfClicksSlider)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.timeBetweenSlider)).BeginInit(); this.deviceStatusPanel.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.checkImg)).BeginInit(); this.monitorPanel.SuspendLayout(); this.mainPanel.SuspendLayout(); this.SuspendLayout(); // // launchBtn // - this.launchBtn.BackColor = System.Drawing.SystemColors.ActiveCaption; - this.launchBtn.FlatStyle = System.Windows.Forms.FlatStyle.Popup; + this.launchBtn.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(105)))), ((int)(((byte)(180)))), ((int)(((byte)(76))))); + this.launchBtn.FlatStyle = System.Windows.Forms.FlatStyle.Flat; this.launchBtn.Font = new System.Drawing.Font("Consolas", 20F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.launchBtn.Location = new System.Drawing.Point(17, 194); + this.launchBtn.ForeColor = System.Drawing.Color.White; + this.launchBtn.Location = new System.Drawing.Point(-1, -1); this.launchBtn.Name = "launchBtn"; - this.launchBtn.Size = new System.Drawing.Size(248, 74); + this.launchBtn.Size = new System.Drawing.Size(289, 74); this.launchBtn.TabIndex = 5; this.launchBtn.Text = "Start Response Time Testing"; + this.toolTipController.SetToolTip(this.launchBtn, "Start Response Time Test"); this.launchBtn.UseVisualStyleBackColor = false; this.launchBtn.Click += new System.EventHandler(this.launchBtn_Click); // - // resultsBtn - // - this.resultsBtn.BackColor = System.Drawing.SystemColors.ActiveCaption; - this.resultsBtn.FlatAppearance.BorderSize = 0; - this.resultsBtn.FlatStyle = System.Windows.Forms.FlatStyle.Popup; - this.resultsBtn.Font = new System.Drawing.Font("Consolas", 18F, System.Drawing.FontStyle.Bold); - this.resultsBtn.Location = new System.Drawing.Point(206, 46); - this.resultsBtn.Name = "resultsBtn"; - this.resultsBtn.Size = new System.Drawing.Size(175, 75); - this.resultsBtn.TabIndex = 6; - this.resultsBtn.Text = "Import Raw Data File"; - this.resultsBtn.UseVisualStyleBackColor = false; - this.resultsBtn.Click += new System.EventHandler(this.resultsBtn_Click); - // // richTextBox1 // this.richTextBox1.Location = new System.Drawing.Point(15, 11); this.richTextBox1.Name = "richTextBox1"; - this.richTextBox1.Size = new System.Drawing.Size(364, 685); + this.richTextBox1.Size = new System.Drawing.Size(364, 309); this.richTextBox1.TabIndex = 2; this.richTextBox1.TabStop = false; this.richTextBox1.Text = ""; @@ -193,14 +149,14 @@ private void InitializeComponent() this.menuStrip1.Font = new System.Drawing.Font("Segoe UI", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.menuStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { this.analyseResultsToolStripMenuItem, - this.resultsSettingsToolStripMenuItem, + this.settingsMenuItem, this.programSettingsToolStripMenuItem, this.BrightnessCalBtn, this.deviceToolStripMenuItem, this.toolStripMenuItem1}); - this.menuStrip1.Location = new System.Drawing.Point(0, 0); + this.menuStrip1.Location = new System.Drawing.Point(5, 5); this.menuStrip1.Name = "menuStrip1"; - this.menuStrip1.Size = new System.Drawing.Size(1924, 24); + this.menuStrip1.Size = new System.Drawing.Size(2093, 24); this.menuStrip1.TabIndex = 0; this.menuStrip1.Text = "menuStrip1"; // @@ -209,268 +165,25 @@ private void InitializeComponent() this.analyseResultsToolStripMenuItem.CheckOnClick = true; this.analyseResultsToolStripMenuItem.ForeColor = System.Drawing.SystemColors.ButtonHighlight; this.analyseResultsToolStripMenuItem.Name = "analyseResultsToolStripMenuItem"; - this.analyseResultsToolStripMenuItem.Size = new System.Drawing.Size(100, 20); - this.analyseResultsToolStripMenuItem.Text = "Analyse Results"; + this.analyseResultsToolStripMenuItem.Size = new System.Drawing.Size(126, 20); + this.analyseResultsToolStripMenuItem.Text = "Heatmaps && Graphs"; this.analyseResultsToolStripMenuItem.Click += new System.EventHandler(this.analyseResultsToolStripMenuItem_Click); // - // resultsSettingsToolStripMenuItem - // - this.resultsSettingsToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { - this.outputSettingsToolStripMenuItem, - this.toolStripSeparator2, - this.recommendedSettingsToolStripMenuItem, - this.advancedSettingsToolStripMenuItem}); - this.resultsSettingsToolStripMenuItem.ForeColor = System.Drawing.SystemColors.ButtonHighlight; - this.resultsSettingsToolStripMenuItem.Name = "resultsSettingsToolStripMenuItem"; - this.resultsSettingsToolStripMenuItem.Size = new System.Drawing.Size(101, 20); - this.resultsSettingsToolStripMenuItem.Text = "Results Settings"; - // - // outputSettingsToolStripMenuItem - // - this.outputSettingsToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { - this.saveXLSXMenuItem, - this.saveGraphsMenuItem, - this.verboseOutputToolStripMenuItem, - this.saveGammaTableToolStripMenuItem, - this.saveSmoothedDataToolStripMenuItem, - this.saveRawInputLagMenuItem, - this.toolStripSeparator4, - this.convertRawGraphMenuItem}); - this.outputSettingsToolStripMenuItem.Name = "outputSettingsToolStripMenuItem"; - this.outputSettingsToolStripMenuItem.Size = new System.Drawing.Size(200, 22); - this.outputSettingsToolStripMenuItem.Text = "Output Settings"; - // - // saveXLSXMenuItem - // - this.saveXLSXMenuItem.Checked = true; - this.saveXLSXMenuItem.CheckOnClick = true; - this.saveXLSXMenuItem.CheckState = System.Windows.Forms.CheckState.Checked; - this.saveXLSXMenuItem.Name = "saveXLSXMenuItem"; - this.saveXLSXMenuItem.Size = new System.Drawing.Size(242, 22); - this.saveXLSXMenuItem.Text = "Save Heatmaps in XLSX File"; - this.saveXLSXMenuItem.Click += new System.EventHandler(this.saveXLSXMenuItem_Click); - // - // saveGraphsMenuItem - // - this.saveGraphsMenuItem.CheckOnClick = true; - this.saveGraphsMenuItem.Name = "saveGraphsMenuItem"; - this.saveGraphsMenuItem.Size = new System.Drawing.Size(242, 22); - this.saveGraphsMenuItem.Text = "Save Raw Data with Graphs"; - this.saveGraphsMenuItem.Click += new System.EventHandler(this.saveGraphsMenuItem_Click); - // - // verboseOutputToolStripMenuItem - // - this.verboseOutputToolStripMenuItem.CheckOnClick = true; - this.verboseOutputToolStripMenuItem.Name = "verboseOutputToolStripMenuItem"; - this.verboseOutputToolStripMenuItem.Size = new System.Drawing.Size(242, 22); - this.verboseOutputToolStripMenuItem.Text = "Verbose Output"; - this.verboseOutputToolStripMenuItem.ToolTipText = "Include all processed fields in each \"FULL\" CSV. \r\nIncludes transition start & en" + - "d position, sample time, overshoot light level and overshoot RGB value."; - this.verboseOutputToolStripMenuItem.Click += new System.EventHandler(this.verboseOutputToolStripMenuItem_Click); - // - // saveGammaTableToolStripMenuItem - // - this.saveGammaTableToolStripMenuItem.CheckOnClick = true; - this.saveGammaTableToolStripMenuItem.Name = "saveGammaTableToolStripMenuItem"; - this.saveGammaTableToolStripMenuItem.Size = new System.Drawing.Size(242, 22); - this.saveGammaTableToolStripMenuItem.Text = "Save Gamma Table"; - this.saveGammaTableToolStripMenuItem.Click += new System.EventHandler(this.saveGammaTableToolStripMenuItem_Click); - // - // saveSmoothedDataToolStripMenuItem - // - this.saveSmoothedDataToolStripMenuItem.CheckOnClick = true; - this.saveSmoothedDataToolStripMenuItem.Name = "saveSmoothedDataToolStripMenuItem"; - this.saveSmoothedDataToolStripMenuItem.Size = new System.Drawing.Size(242, 22); - this.saveSmoothedDataToolStripMenuItem.Text = "Save Raw Smoothed Data"; - this.saveSmoothedDataToolStripMenuItem.Click += new System.EventHandler(this.saveSmoothedDataToolStripMenuItem_Click); - // - // saveRawInputLagMenuItem - // - this.saveRawInputLagMenuItem.Checked = true; - this.saveRawInputLagMenuItem.CheckOnClick = true; - this.saveRawInputLagMenuItem.CheckState = System.Windows.Forms.CheckState.Checked; - this.saveRawInputLagMenuItem.Name = "saveRawInputLagMenuItem"; - this.saveRawInputLagMenuItem.Size = new System.Drawing.Size(242, 22); - this.saveRawInputLagMenuItem.Text = "Save Raw Input Lag Data"; - this.saveRawInputLagMenuItem.Click += new System.EventHandler(this.saveRawInputLagDataToolStripMenuItem_Click); - // - // toolStripSeparator4 - // - this.toolStripSeparator4.Name = "toolStripSeparator4"; - this.toolStripSeparator4.Size = new System.Drawing.Size(239, 6); - this.toolStripSeparator4.Visible = false; - // - // convertRawGraphMenuItem - // - this.convertRawGraphMenuItem.Name = "convertRawGraphMenuItem"; - this.convertRawGraphMenuItem.Size = new System.Drawing.Size(242, 22); - this.convertRawGraphMenuItem.Text = "Convert Raw CSV to Graph View"; - this.convertRawGraphMenuItem.Visible = false; - this.convertRawGraphMenuItem.Click += new System.EventHandler(this.convertRawGraphMenuItem_Click); - // - // toolStripSeparator2 - // - this.toolStripSeparator2.Name = "toolStripSeparator2"; - this.toolStripSeparator2.Size = new System.Drawing.Size(197, 6); - // - // recommendedSettingsToolStripMenuItem - // - this.recommendedSettingsToolStripMenuItem.Checked = true; - this.recommendedSettingsToolStripMenuItem.CheckOnClick = true; - this.recommendedSettingsToolStripMenuItem.CheckState = System.Windows.Forms.CheckState.Checked; - this.recommendedSettingsToolStripMenuItem.Name = "recommendedSettingsToolStripMenuItem"; - this.recommendedSettingsToolStripMenuItem.Size = new System.Drawing.Size(200, 22); - this.recommendedSettingsToolStripMenuItem.Text = "Recommended Settings"; - this.recommendedSettingsToolStripMenuItem.Click += new System.EventHandler(this.recommendedSettingsToolStripMenuItem_Click); - // - // advancedSettingsToolStripMenuItem - // - this.advancedSettingsToolStripMenuItem.CheckOnClick = true; - this.advancedSettingsToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { - this.measurementsToolStripMenuItem, - this.overshootSettingsMenuItem, - this.extendedGammaTestToolStripMenuItem}); - this.advancedSettingsToolStripMenuItem.Name = "advancedSettingsToolStripMenuItem"; - this.advancedSettingsToolStripMenuItem.Size = new System.Drawing.Size(200, 22); - this.advancedSettingsToolStripMenuItem.Text = "Advanced Settings"; - this.advancedSettingsToolStripMenuItem.Click += new System.EventHandler(this.advancedSettingsToolStripMenuItem_Click); - // - // measurementsToolStripMenuItem - // - this.measurementsToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { - this.gamCorMenuItem, - this.toolStripSeparator1, - this.fixedRGB5OffsetToolStripMenuItem, - this.fixedRGB10OffsetToolStripMenuItem, - this.toolStripSeparator3, - this.threePercentMenuItem, - this.tenPercentMenuItem}); - this.measurementsToolStripMenuItem.Name = "measurementsToolStripMenuItem"; - this.measurementsToolStripMenuItem.Size = new System.Drawing.Size(198, 22); - this.measurementsToolStripMenuItem.Text = "Response Time Settings"; - this.measurementsToolStripMenuItem.Visible = false; - // - // gamCorMenuItem - // - this.gamCorMenuItem.Checked = true; - this.gamCorMenuItem.CheckOnClick = true; - this.gamCorMenuItem.CheckState = System.Windows.Forms.CheckState.Checked; - this.gamCorMenuItem.Name = "gamCorMenuItem"; - this.gamCorMenuItem.Size = new System.Drawing.Size(253, 22); - this.gamCorMenuItem.Text = "Gamma Corrected Response Time"; - this.gamCorMenuItem.Click += new System.EventHandler(this.gamCorMenuItem_Click); - // - // toolStripSeparator1 - // - this.toolStripSeparator1.Name = "toolStripSeparator1"; - this.toolStripSeparator1.Size = new System.Drawing.Size(250, 6); - // - // fixedRGB5OffsetToolStripMenuItem - // - this.fixedRGB5OffsetToolStripMenuItem.Checked = true; - this.fixedRGB5OffsetToolStripMenuItem.CheckOnClick = true; - this.fixedRGB5OffsetToolStripMenuItem.CheckState = System.Windows.Forms.CheckState.Checked; - this.fixedRGB5OffsetToolStripMenuItem.Name = "fixedRGB5OffsetToolStripMenuItem"; - this.fixedRGB5OffsetToolStripMenuItem.Size = new System.Drawing.Size(253, 22); - this.fixedRGB5OffsetToolStripMenuItem.Text = "Fixed RGB 5 Offset"; - this.fixedRGB5OffsetToolStripMenuItem.Click += new System.EventHandler(this.fixedRGB5OffsetToolStripMenuItem_Click); - // - // fixedRGB10OffsetToolStripMenuItem - // - this.fixedRGB10OffsetToolStripMenuItem.CheckOnClick = true; - this.fixedRGB10OffsetToolStripMenuItem.Name = "fixedRGB10OffsetToolStripMenuItem"; - this.fixedRGB10OffsetToolStripMenuItem.Size = new System.Drawing.Size(253, 22); - this.fixedRGB10OffsetToolStripMenuItem.Text = "Fixed RGB 10 Offset"; - this.fixedRGB10OffsetToolStripMenuItem.Click += new System.EventHandler(this.fixedRGB10OffsetToolStripMenuItem_Click); - // - // toolStripSeparator3 - // - this.toolStripSeparator3.Name = "toolStripSeparator3"; - this.toolStripSeparator3.Size = new System.Drawing.Size(250, 6); - // - // threePercentMenuItem - // - this.threePercentMenuItem.CheckOnClick = true; - this.threePercentMenuItem.Name = "threePercentMenuItem"; - this.threePercentMenuItem.Size = new System.Drawing.Size(253, 22); - this.threePercentMenuItem.Text = "3% / 97% Response Time"; - this.threePercentMenuItem.Click += new System.EventHandler(this.threePercentMenuItem_Click); - // - // tenPercentMenuItem - // - this.tenPercentMenuItem.CheckOnClick = true; - this.tenPercentMenuItem.Name = "tenPercentMenuItem"; - this.tenPercentMenuItem.Size = new System.Drawing.Size(253, 22); - this.tenPercentMenuItem.Text = "10% / 90% Response Time"; - this.tenPercentMenuItem.Click += new System.EventHandler(this.tenPercentMenuItem_Click); - // - // overshootSettingsMenuItem - // - this.overshootSettingsMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { - this.gammaCorrectedToolStripMenuItem, - this.percentageToolStripMenuItem}); - this.overshootSettingsMenuItem.Name = "overshootSettingsMenuItem"; - this.overshootSettingsMenuItem.Size = new System.Drawing.Size(198, 22); - this.overshootSettingsMenuItem.Text = "Overshoot Settings"; - this.overshootSettingsMenuItem.Visible = false; - // - // gammaCorrectedToolStripMenuItem - // - this.gammaCorrectedToolStripMenuItem.Checked = true; - this.gammaCorrectedToolStripMenuItem.CheckOnClick = true; - this.gammaCorrectedToolStripMenuItem.CheckState = System.Windows.Forms.CheckState.Checked; - this.gammaCorrectedToolStripMenuItem.Name = "gammaCorrectedToolStripMenuItem"; - this.gammaCorrectedToolStripMenuItem.Size = new System.Drawing.Size(240, 22); - this.gammaCorrectedToolStripMenuItem.Text = "Gamma Corrected (RGB Values)"; - this.gammaCorrectedToolStripMenuItem.Click += new System.EventHandler(this.gammaCorrectedToolStripMenuItem_Click); - // - // percentageToolStripMenuItem - // - this.percentageToolStripMenuItem.CheckOnClick = true; - this.percentageToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { - this.differenceToolStripMenuItem, - this.endValueToolStripMenuItem}); - this.percentageToolStripMenuItem.Name = "percentageToolStripMenuItem"; - this.percentageToolStripMenuItem.Size = new System.Drawing.Size(240, 22); - this.percentageToolStripMenuItem.Text = "Percentage"; - this.percentageToolStripMenuItem.Click += new System.EventHandler(this.percentageToolStripMenuItem_Click); - // - // differenceToolStripMenuItem - // - this.differenceToolStripMenuItem.CheckOnClick = true; - this.differenceToolStripMenuItem.Name = "differenceToolStripMenuItem"; - this.differenceToolStripMenuItem.Size = new System.Drawing.Size(195, 22); - this.differenceToolStripMenuItem.Text = "Difference (end-start)"; - this.differenceToolStripMenuItem.Click += new System.EventHandler(this.differenceToolStripMenuItem_Click); - // - // endValueToolStripMenuItem - // - this.endValueToolStripMenuItem.CheckOnClick = true; - this.endValueToolStripMenuItem.Name = "endValueToolStripMenuItem"; - this.endValueToolStripMenuItem.Size = new System.Drawing.Size(195, 22); - this.endValueToolStripMenuItem.Text = "End Value (% over end)"; - this.endValueToolStripMenuItem.Click += new System.EventHandler(this.endValueToolStripMenuItem_Click); - // - // extendedGammaTestToolStripMenuItem - // - this.extendedGammaTestToolStripMenuItem.Checked = true; - this.extendedGammaTestToolStripMenuItem.CheckOnClick = true; - this.extendedGammaTestToolStripMenuItem.CheckState = System.Windows.Forms.CheckState.Checked; - this.extendedGammaTestToolStripMenuItem.Name = "extendedGammaTestToolStripMenuItem"; - this.extendedGammaTestToolStripMenuItem.Size = new System.Drawing.Size(198, 22); - this.extendedGammaTestToolStripMenuItem.Text = "Extended Gamma Test"; - this.extendedGammaTestToolStripMenuItem.ToolTipText = "Extended gamma test using 16 RGB shades instead of basic 6. Provides better accur" + - "acy, highly recommended."; - this.extendedGammaTestToolStripMenuItem.Click += new System.EventHandler(this.extendedGammaTestToolStripMenuItem_Click); + // settingsMenuItem + // + this.settingsMenuItem.CheckOnClick = true; + this.settingsMenuItem.ForeColor = System.Drawing.SystemColors.ButtonHighlight; + this.settingsMenuItem.Name = "settingsMenuItem"; + this.settingsMenuItem.Size = new System.Drawing.Size(84, 20); + this.settingsMenuItem.Text = "Test Settings"; + this.settingsMenuItem.Click += new System.EventHandler(this.settingsMenuItem_Click); // // programSettingsToolStripMenuItem // this.programSettingsToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { this.aboutProgramToolStripMenuItem, this.bugReportMenuItem, - this.minimiseToTrayToolStripMenuItem, - this.suppressDialogBoxesToolStripMenuItem, - this.IgnoreErrorsMenuItem}); + this.minimiseToTrayToolStripMenuItem}); this.programSettingsToolStripMenuItem.ForeColor = System.Drawing.SystemColors.ButtonHighlight; this.programSettingsToolStripMenuItem.Name = "programSettingsToolStripMenuItem"; this.programSettingsToolStripMenuItem.Size = new System.Drawing.Size(110, 20); @@ -482,7 +195,7 @@ private void InitializeComponent() this.aboutProgramToolStripMenuItem.CheckOnClick = true; this.aboutProgramToolStripMenuItem.ForeColor = System.Drawing.SystemColors.ButtonHighlight; this.aboutProgramToolStripMenuItem.Name = "aboutProgramToolStripMenuItem"; - this.aboutProgramToolStripMenuItem.Size = new System.Drawing.Size(192, 22); + this.aboutProgramToolStripMenuItem.Size = new System.Drawing.Size(162, 22); this.aboutProgramToolStripMenuItem.Text = "About Program"; this.aboutProgramToolStripMenuItem.Click += new System.EventHandler(this.aboutProgramToolStripMenuItem_Click); // @@ -492,7 +205,7 @@ private void InitializeComponent() this.bugReportMenuItem.CheckOnClick = true; this.bugReportMenuItem.ForeColor = System.Drawing.SystemColors.ButtonHighlight; this.bugReportMenuItem.Name = "bugReportMenuItem"; - this.bugReportMenuItem.Size = new System.Drawing.Size(192, 22); + this.bugReportMenuItem.Size = new System.Drawing.Size(162, 22); this.bugReportMenuItem.Text = "Report A Bug"; this.bugReportMenuItem.Click += new System.EventHandler(this.bugReportMenuItem_Click); // @@ -502,34 +215,10 @@ private void InitializeComponent() this.minimiseToTrayToolStripMenuItem.CheckOnClick = true; this.minimiseToTrayToolStripMenuItem.ForeColor = System.Drawing.SystemColors.ButtonFace; this.minimiseToTrayToolStripMenuItem.Name = "minimiseToTrayToolStripMenuItem"; - this.minimiseToTrayToolStripMenuItem.Size = new System.Drawing.Size(192, 22); + this.minimiseToTrayToolStripMenuItem.Size = new System.Drawing.Size(162, 22); this.minimiseToTrayToolStripMenuItem.Text = "Minimise To Tray"; this.minimiseToTrayToolStripMenuItem.Click += new System.EventHandler(this.minimiseToTrayToolStripMenuItem_Click); // - // suppressDialogBoxesToolStripMenuItem - // - this.suppressDialogBoxesToolStripMenuItem.BackColor = System.Drawing.SystemColors.ControlDarkDark; - this.suppressDialogBoxesToolStripMenuItem.CheckOnClick = true; - this.suppressDialogBoxesToolStripMenuItem.ForeColor = System.Drawing.SystemColors.ButtonHighlight; - this.suppressDialogBoxesToolStripMenuItem.Name = "suppressDialogBoxesToolStripMenuItem"; - this.suppressDialogBoxesToolStripMenuItem.Size = new System.Drawing.Size(192, 22); - this.suppressDialogBoxesToolStripMenuItem.Text = "Suppress Dialog Boxes"; - this.suppressDialogBoxesToolStripMenuItem.ToolTipText = "Suppress warning and mid-test error dialog boxes."; - this.suppressDialogBoxesToolStripMenuItem.Click += new System.EventHandler(this.suppressDialogBoxesToolStripMenuItem_Click); - // - // IgnoreErrorsMenuItem - // - this.IgnoreErrorsMenuItem.BackColor = System.Drawing.SystemColors.ControlDarkDark; - this.IgnoreErrorsMenuItem.Checked = true; - this.IgnoreErrorsMenuItem.CheckOnClick = true; - this.IgnoreErrorsMenuItem.CheckState = System.Windows.Forms.CheckState.Checked; - this.IgnoreErrorsMenuItem.ForeColor = System.Drawing.SystemColors.ButtonHighlight; - this.IgnoreErrorsMenuItem.Name = "IgnoreErrorsMenuItem"; - this.IgnoreErrorsMenuItem.Size = new System.Drawing.Size(192, 22); - this.IgnoreErrorsMenuItem.Text = "Ignore Mid Run Errors"; - this.IgnoreErrorsMenuItem.ToolTipText = "Ignore mid-run errors "; - this.IgnoreErrorsMenuItem.Click += new System.EventHandler(this.IgnoreErrorsMenuItem_Click); - // // BrightnessCalBtn // this.BrightnessCalBtn.ForeColor = System.Drawing.SystemColors.ButtonHighlight; @@ -593,132 +282,80 @@ private void InitializeComponent() this.toolStripMenuItem1.Name = "toolStripMenuItem1"; this.toolStripMenuItem1.Size = new System.Drawing.Size(12, 20); // - // devStatLbl - // - this.devStatLbl.AutoSize = true; - this.devStatLbl.Font = new System.Drawing.Font("Microsoft Sans Serif", 15.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.devStatLbl.Location = new System.Drawing.Point(16, 8); - this.devStatLbl.Name = "devStatLbl"; - this.devStatLbl.Size = new System.Drawing.Size(298, 25); - this.devStatLbl.TabIndex = 5; - this.devStatLbl.Text = "Device Connection Status: "; - // // devStat // - this.devStat.AutoSize = true; this.devStat.Font = new System.Drawing.Font("Microsoft Sans Serif", 15.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.devStat.Location = new System.Drawing.Point(320, 8); + this.devStat.Location = new System.Drawing.Point(12, 9); this.devStat.Name = "devStat"; - this.devStat.Size = new System.Drawing.Size(252, 25); + this.devStat.Size = new System.Drawing.Size(265, 25); this.devStat.TabIndex = 6; - this.devStat.Text = "Waiting for Connection"; - // - // label3 - // - this.label3.AutoSize = true; - this.label3.Font = new System.Drawing.Font("Microsoft Sans Serif", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.label3.Location = new System.Drawing.Point(228, 12); - this.label3.Name = "label3"; - this.label3.Size = new System.Drawing.Size(143, 24); - this.label3.TabIndex = 13; - this.label3.Text = "Analyse Results"; + this.devStat.Text = "Device Connected"; + this.devStat.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; // // controlsPanel // + this.controlsPanel.BackColor = System.Drawing.Color.White; this.controlsPanel.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.controlsPanel.Controls.Add(this.testSettingsBtn); this.controlsPanel.Controls.Add(this.vsyncStateList); - this.controlsPanel.Controls.Add(this.vsyncHelpBtn); this.controlsPanel.Controls.Add(this.label15); - this.controlsPanel.Controls.Add(this.helpCaptureBtn); - this.controlsPanel.Controls.Add(this.helpCyclesBtn); - this.controlsPanel.Controls.Add(this.helpFramerateBtn); this.controlsPanel.Controls.Add(this.captureTimeBox); + this.controlsPanel.Controls.Add(this.launchBtn); this.controlsPanel.Controls.Add(this.label17); - this.controlsPanel.Controls.Add(this.label13); this.controlsPanel.Controls.Add(this.fpsLimitList); this.controlsPanel.Controls.Add(this.label4); this.controlsPanel.Controls.Add(this.testCount); this.controlsPanel.Controls.Add(this.label2); - this.controlsPanel.Controls.Add(this.launchBtn); - this.controlsPanel.Location = new System.Drawing.Point(9, 121); + this.controlsPanel.Location = new System.Drawing.Point(8, 57); this.controlsPanel.Name = "controlsPanel"; - this.controlsPanel.Size = new System.Drawing.Size(286, 285); + this.controlsPanel.Size = new System.Drawing.Size(288, 296); this.controlsPanel.TabIndex = 15; this.controlsPanel.Tag = ""; // + // testSettingsBtn + // + this.testSettingsBtn.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(195)))), ((int)(((byte)(53))))); + this.testSettingsBtn.FlatStyle = System.Windows.Forms.FlatStyle.Popup; + this.testSettingsBtn.Font = new System.Drawing.Font("Consolas", 16F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.testSettingsBtn.ForeColor = System.Drawing.Color.White; + this.testSettingsBtn.Location = new System.Drawing.Point(19, 83); + this.testSettingsBtn.Name = "testSettingsBtn"; + this.testSettingsBtn.Size = new System.Drawing.Size(214, 36); + this.testSettingsBtn.TabIndex = 29; + this.testSettingsBtn.Text = "> Test Settings"; + this.toolTipController.SetToolTip(this.testSettingsBtn, "Open Test Settings Window"); + this.testSettingsBtn.UseVisualStyleBackColor = false; + this.testSettingsBtn.Click += new System.EventHandler(this.testSettingsBtn_Click); + // // vsyncStateList // this.vsyncStateList.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; this.vsyncStateList.Font = new System.Drawing.Font("Arial", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.vsyncStateList.FormattingEnabled = true; - this.vsyncStateList.Location = new System.Drawing.Point(158, 153); + this.vsyncStateList.Location = new System.Drawing.Point(157, 256); this.vsyncStateList.Name = "vsyncStateList"; - this.vsyncStateList.Size = new System.Drawing.Size(86, 26); + this.vsyncStateList.Size = new System.Drawing.Size(111, 26); this.vsyncStateList.TabIndex = 28; this.vsyncStateList.SelectedIndexChanged += new System.EventHandler(this.vsyncStateList_SelectedIndexChanged); // - // vsyncHelpBtn - // - this.vsyncHelpBtn.Font = new System.Drawing.Font("Consolas", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.vsyncHelpBtn.Location = new System.Drawing.Point(249, 152); - this.vsyncHelpBtn.Name = "vsyncHelpBtn"; - this.vsyncHelpBtn.Size = new System.Drawing.Size(28, 28); - this.vsyncHelpBtn.TabIndex = 27; - this.vsyncHelpBtn.Text = "?"; - this.vsyncHelpBtn.UseVisualStyleBackColor = true; - this.vsyncHelpBtn.Click += new System.EventHandler(this.vsyncHelpBtn_Click); - // // label15 // this.label15.AutoSize = true; this.label15.Font = new System.Drawing.Font("Microsoft Sans Serif", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.label15.Location = new System.Drawing.Point(13, 153); + this.label15.Location = new System.Drawing.Point(12, 256); this.label15.Name = "label15"; this.label15.Size = new System.Drawing.Size(116, 24); this.label15.TabIndex = 26; this.label15.Text = "VSync State:"; // - // helpCaptureBtn - // - this.helpCaptureBtn.Font = new System.Drawing.Font("Consolas", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.helpCaptureBtn.Location = new System.Drawing.Point(249, 114); - this.helpCaptureBtn.Name = "helpCaptureBtn"; - this.helpCaptureBtn.Size = new System.Drawing.Size(28, 28); - this.helpCaptureBtn.TabIndex = 25; - this.helpCaptureBtn.Text = "?"; - this.helpCaptureBtn.UseVisualStyleBackColor = true; - this.helpCaptureBtn.Click += new System.EventHandler(this.helpCaptureBtn_Click); - // - // helpCyclesBtn - // - this.helpCyclesBtn.Font = new System.Drawing.Font("Consolas", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.helpCyclesBtn.Location = new System.Drawing.Point(249, 77); - this.helpCyclesBtn.Name = "helpCyclesBtn"; - this.helpCyclesBtn.Size = new System.Drawing.Size(28, 28); - this.helpCyclesBtn.TabIndex = 24; - this.helpCyclesBtn.Text = "?"; - this.helpCyclesBtn.UseVisualStyleBackColor = true; - this.helpCyclesBtn.Click += new System.EventHandler(this.helpCyclesBtn_Click); - // - // helpFramerateBtn - // - this.helpFramerateBtn.Font = new System.Drawing.Font("Consolas", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.helpFramerateBtn.Location = new System.Drawing.Point(249, 42); - this.helpFramerateBtn.Name = "helpFramerateBtn"; - this.helpFramerateBtn.Size = new System.Drawing.Size(28, 28); - this.helpFramerateBtn.TabIndex = 23; - this.helpFramerateBtn.Text = "?"; - this.helpFramerateBtn.UseVisualStyleBackColor = true; - this.helpFramerateBtn.Click += new System.EventHandler(this.helpFramerateBtn_Click); - // // captureTimeBox // this.captureTimeBox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; this.captureTimeBox.Font = new System.Drawing.Font("Arial", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.captureTimeBox.FormattingEnabled = true; - this.captureTimeBox.Location = new System.Drawing.Point(158, 115); + this.captureTimeBox.Location = new System.Drawing.Point(157, 212); this.captureTimeBox.Name = "captureTimeBox"; - this.captureTimeBox.Size = new System.Drawing.Size(86, 26); + this.captureTimeBox.Size = new System.Drawing.Size(111, 26); this.captureTimeBox.TabIndex = 21; this.captureTimeBox.SelectedIndexChanged += new System.EventHandler(this.captureTimeBox_SelectedIndexChanged); // @@ -726,30 +363,20 @@ private void InitializeComponent() // this.label17.AutoSize = true; this.label17.Font = new System.Drawing.Font("Microsoft Sans Serif", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.label17.Location = new System.Drawing.Point(13, 115); + this.label17.Location = new System.Drawing.Point(12, 212); this.label17.Name = "label17"; this.label17.Size = new System.Drawing.Size(129, 24); this.label17.TabIndex = 22; this.label17.Text = "Capture Time:"; // - // label13 - // - this.label13.AutoSize = true; - this.label13.Font = new System.Drawing.Font("Microsoft Sans Serif", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.label13.Location = new System.Drawing.Point(37, 5); - this.label13.Name = "label13"; - this.label13.Size = new System.Drawing.Size(211, 24); - this.label13.TabIndex = 15; - this.label13.Text = "Response Time Testing"; - // // fpsLimitList // this.fpsLimitList.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; this.fpsLimitList.Font = new System.Drawing.Font("Arial", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.fpsLimitList.FormattingEnabled = true; - this.fpsLimitList.Location = new System.Drawing.Point(158, 43); + this.fpsLimitList.Location = new System.Drawing.Point(157, 129); this.fpsLimitList.Name = "fpsLimitList"; - this.fpsLimitList.Size = new System.Drawing.Size(86, 26); + this.fpsLimitList.Size = new System.Drawing.Size(111, 26); this.fpsLimitList.TabIndex = 3; this.fpsLimitList.SelectedIndexChanged += new System.EventHandler(this.fpsLimitList_SelectedIndexChanged); // @@ -757,7 +384,7 @@ private void InitializeComponent() // this.label4.AutoSize = true; this.label4.Font = new System.Drawing.Font("Microsoft Sans Serif", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.label4.Location = new System.Drawing.Point(13, 43); + this.label4.Location = new System.Drawing.Point(12, 129); this.label4.Name = "label4"; this.label4.Size = new System.Drawing.Size(138, 24); this.label4.TabIndex = 20; @@ -767,7 +394,7 @@ private void InitializeComponent() // this.testCount.Cursor = System.Windows.Forms.Cursors.Hand; this.testCount.Font = new System.Drawing.Font("Arial", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.testCount.Location = new System.Drawing.Point(196, 78); + this.testCount.Location = new System.Drawing.Point(212, 169); this.testCount.Maximum = new decimal(new int[] { 10, 0, @@ -779,7 +406,7 @@ private void InitializeComponent() 0, 0}); this.testCount.Name = "testCount"; - this.testCount.Size = new System.Drawing.Size(48, 26); + this.testCount.Size = new System.Drawing.Size(56, 26); this.testCount.TabIndex = 4; this.testCount.Value = new decimal(new int[] { 5, @@ -792,86 +419,64 @@ private void InitializeComponent() // this.label2.AutoSize = true; this.label2.Font = new System.Drawing.Font("Microsoft Sans Serif", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.label2.Location = new System.Drawing.Point(13, 80); + this.label2.Location = new System.Drawing.Point(12, 171); this.label2.Name = "label2"; - this.label2.Size = new System.Drawing.Size(165, 24); + this.label2.Size = new System.Drawing.Size(194, 24); this.label2.TabIndex = 17; - this.label2.Text = "Number of Cycles:"; + this.label2.Text = "Number of Test Runs:"; + // + // helpBtn + // + this.helpBtn.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(195)))), ((int)(((byte)(53))))); + this.helpBtn.FlatStyle = System.Windows.Forms.FlatStyle.Popup; + this.helpBtn.Font = new System.Drawing.Font("Calibri", 30F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.helpBtn.ForeColor = System.Drawing.Color.White; + this.helpBtn.Location = new System.Drawing.Point(598, 57); + this.helpBtn.Name = "helpBtn"; + this.helpBtn.Padding = new System.Windows.Forms.Padding(5, 0, 0, 0); + this.helpBtn.Size = new System.Drawing.Size(55, 55); + this.helpBtn.TabIndex = 23; + this.helpBtn.Text = "?"; + this.toolTipController.SetToolTip(this.helpBtn, "Open Help Window"); + this.helpBtn.UseVisualStyleBackColor = false; + this.helpBtn.Click += new System.EventHandler(this.helpBtn_Click); // // refreshMonitorListBtn // - this.refreshMonitorListBtn.BackColor = System.Drawing.SystemColors.ActiveCaption; + this.refreshMonitorListBtn.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(105)))), ((int)(((byte)(180)))), ((int)(((byte)(76))))); + this.refreshMonitorListBtn.BackgroundImage = global::OSRTT_Launcher.Properties.Resources.arrow_rotate_right; + this.refreshMonitorListBtn.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Zoom; this.refreshMonitorListBtn.FlatStyle = System.Windows.Forms.FlatStyle.Popup; this.refreshMonitorListBtn.Font = new System.Drawing.Font("Consolas", 12.5F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.refreshMonitorListBtn.Location = new System.Drawing.Point(442, 14); + this.refreshMonitorListBtn.Location = new System.Drawing.Point(307, 7); this.refreshMonitorListBtn.Name = "refreshMonitorListBtn"; - this.refreshMonitorListBtn.Size = new System.Drawing.Size(128, 26); + this.refreshMonitorListBtn.Padding = new System.Windows.Forms.Padding(10); + this.refreshMonitorListBtn.Size = new System.Drawing.Size(30, 30); this.refreshMonitorListBtn.TabIndex = 2; - this.refreshMonitorListBtn.Text = "Refresh List"; + this.toolTipController.SetToolTip(this.refreshMonitorListBtn, "Refresh Monitor List"); this.refreshMonitorListBtn.UseVisualStyleBackColor = false; this.refreshMonitorListBtn.Click += new System.EventHandler(this.refreshMonitorListBtn_Click); // // monitorCB // this.monitorCB.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; - this.monitorCB.Font = new System.Drawing.Font("Arial", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.monitorCB.Font = new System.Drawing.Font("Arial", 10F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.monitorCB.FormattingEnabled = true; - this.monitorCB.Location = new System.Drawing.Point(196, 14); + this.monitorCB.Location = new System.Drawing.Point(123, 10); this.monitorCB.Name = "monitorCB"; - this.monitorCB.Size = new System.Drawing.Size(238, 26); + this.monitorCB.Size = new System.Drawing.Size(176, 24); this.monitorCB.TabIndex = 1; this.monitorCB.SelectedIndexChanged += new System.EventHandler(this.monitorCB_SelectedIndexChanged); // // label1 // this.label1.AutoSize = true; - this.label1.Font = new System.Drawing.Font("Microsoft Sans Serif", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.label1.Location = new System.Drawing.Point(15, 14); + this.label1.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.label1.Location = new System.Drawing.Point(6, 11); this.label1.Name = "label1"; - this.label1.Size = new System.Drawing.Size(182, 24); + this.label1.Size = new System.Drawing.Size(119, 20); this.label1.TabIndex = 14; - this.label1.Text = "Select your monitor: "; - // - // analysePanel - // - this.analysePanel.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.analysePanel.Controls.Add(this.opnResultsBtn); - this.analysePanel.Controls.Add(this.importRawFolder); - this.analysePanel.Controls.Add(this.resultsBtn); - this.analysePanel.Controls.Add(this.label3); - this.analysePanel.Location = new System.Drawing.Point(9, 417); - this.analysePanel.Name = "analysePanel"; - this.analysePanel.Size = new System.Drawing.Size(588, 133); - this.analysePanel.TabIndex = 16; - // - // opnResultsBtn - // - this.opnResultsBtn.BackColor = System.Drawing.SystemColors.ActiveCaption; - this.opnResultsBtn.FlatAppearance.BorderSize = 0; - this.opnResultsBtn.FlatStyle = System.Windows.Forms.FlatStyle.Popup; - this.opnResultsBtn.Font = new System.Drawing.Font("Consolas", 16F, System.Drawing.FontStyle.Bold); - this.opnResultsBtn.ImageAlign = System.Drawing.ContentAlignment.TopRight; - this.opnResultsBtn.Location = new System.Drawing.Point(17, 47); - this.opnResultsBtn.Name = "opnResultsBtn"; - this.opnResultsBtn.Size = new System.Drawing.Size(175, 75); - this.opnResultsBtn.TabIndex = 15; - this.opnResultsBtn.Text = "Open Results Folder"; - this.opnResultsBtn.UseVisualStyleBackColor = false; - this.opnResultsBtn.Click += new System.EventHandler(this.opnResultsBtn_Click); - // - // importRawFolder - // - this.importRawFolder.BackColor = System.Drawing.SystemColors.ActiveCaption; - this.importRawFolder.FlatAppearance.BorderSize = 0; - this.importRawFolder.FlatStyle = System.Windows.Forms.FlatStyle.Popup; - this.importRawFolder.Font = new System.Drawing.Font("Consolas", 18F, System.Drawing.FontStyle.Bold); - this.importRawFolder.Location = new System.Drawing.Point(394, 47); - this.importRawFolder.Name = "importRawFolder"; - this.importRawFolder.Size = new System.Drawing.Size(175, 75); - this.importRawFolder.TabIndex = 7; - this.importRawFolder.Text = "Import Raw Data Folder"; - this.importRawFolder.UseVisualStyleBackColor = false; - this.importRawFolder.Click += new System.EventHandler(this.importRawFolder_Click); + this.label1.Text = "Select monitor: "; // // rawValText // @@ -1024,7 +629,7 @@ private void InitializeComponent() this.brightnessPanel.Controls.Add(this.brightnessText); this.brightnessPanel.Controls.Add(this.incPotValBtn); this.brightnessPanel.Controls.Add(this.label7); - this.brightnessPanel.Location = new System.Drawing.Point(1115, 36); + this.brightnessPanel.Location = new System.Drawing.Point(1099, 35); this.brightnessPanel.Name = "brightnessPanel"; this.brightnessPanel.Size = new System.Drawing.Size(994, 758); this.brightnessPanel.TabIndex = 28; @@ -1072,22 +677,24 @@ private void InitializeComponent() // aboutPanel // this.aboutPanel.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.aboutPanel.Controls.Add(this.boardSerialLbl); + this.aboutPanel.Controls.Add(this.label13); this.aboutPanel.Controls.Add(this.linkLabel1); this.aboutPanel.Controls.Add(this.firmVerLbl); this.aboutPanel.Controls.Add(this.label14); this.aboutPanel.Controls.Add(this.softVerLbl); this.aboutPanel.Controls.Add(this.label12); this.aboutPanel.Controls.Add(this.label10); - this.aboutPanel.Location = new System.Drawing.Point(9, 562); + this.aboutPanel.Location = new System.Drawing.Point(10, 402); this.aboutPanel.Name = "aboutPanel"; - this.aboutPanel.Size = new System.Drawing.Size(588, 109); + this.aboutPanel.Size = new System.Drawing.Size(645, 109); this.aboutPanel.TabIndex = 29; // // linkLabel1 // this.linkLabel1.AutoSize = true; this.linkLabel1.Font = new System.Drawing.Font("Microsoft Sans Serif", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.linkLabel1.Location = new System.Drawing.Point(197, 76); + this.linkLabel1.Location = new System.Drawing.Point(339, 10); this.linkLabel1.Name = "linkLabel1"; this.linkLabel1.Size = new System.Drawing.Size(197, 24); this.linkLabel1.TabIndex = 26; @@ -1099,7 +706,7 @@ private void InitializeComponent() // this.firmVerLbl.AutoSize = true; this.firmVerLbl.Font = new System.Drawing.Font("Microsoft Sans Serif", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.firmVerLbl.Location = new System.Drawing.Point(524, 43); + this.firmVerLbl.Location = new System.Drawing.Point(573, 43); this.firmVerLbl.Name = "firmVerLbl"; this.firmVerLbl.Size = new System.Drawing.Size(48, 24); this.firmVerLbl.TabIndex = 24; @@ -1109,7 +716,7 @@ private void InitializeComponent() // this.label14.AutoSize = true; this.label14.Font = new System.Drawing.Font("Microsoft Sans Serif", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.label14.Location = new System.Drawing.Point(300, 43); + this.label14.Location = new System.Drawing.Point(349, 43); this.label14.Name = "label14"; this.label14.Size = new System.Drawing.Size(227, 24); this.label14.TabIndex = 23; @@ -1139,7 +746,7 @@ private void InitializeComponent() // this.label10.AutoSize = true; this.label10.Font = new System.Drawing.Font("Microsoft Sans Serif", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.label10.Location = new System.Drawing.Point(192, 9); + this.label10.Location = new System.Drawing.Point(101, 10); this.label10.Name = "label10"; this.label10.Size = new System.Drawing.Size(214, 24); this.label10.TabIndex = 14; @@ -1151,9 +758,9 @@ private void InitializeComponent() this.debugPanel.Controls.Add(this.serialSendBtn); this.debugPanel.Controls.Add(this.serialSendBox); this.debugPanel.Controls.Add(this.richTextBox1); - this.debugPanel.Location = new System.Drawing.Point(619, 30); + this.debugPanel.Location = new System.Drawing.Point(673, 32); this.debugPanel.Name = "debugPanel"; - this.debugPanel.Size = new System.Drawing.Size(395, 737); + this.debugPanel.Size = new System.Drawing.Size(395, 361); this.debugPanel.TabIndex = 30; // // serialSendBtn @@ -1161,7 +768,7 @@ private void InitializeComponent() this.serialSendBtn.BackColor = System.Drawing.SystemColors.ActiveCaption; this.serialSendBtn.FlatStyle = System.Windows.Forms.FlatStyle.Popup; this.serialSendBtn.Font = new System.Drawing.Font("Consolas", 11F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.serialSendBtn.Location = new System.Drawing.Point(251, 702); + this.serialSendBtn.Location = new System.Drawing.Point(251, 327); this.serialSendBtn.Name = "serialSendBtn"; this.serialSendBtn.Size = new System.Drawing.Size(128, 26); this.serialSendBtn.TabIndex = 21; @@ -1172,13 +779,14 @@ private void InitializeComponent() // serialSendBox // this.serialSendBox.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.serialSendBox.Location = new System.Drawing.Point(15, 702); + this.serialSendBox.Location = new System.Drawing.Point(15, 327); this.serialSendBox.Name = "serialSendBox"; this.serialSendBox.Size = new System.Drawing.Size(230, 26); this.serialSendBox.TabIndex = 20; // // inputLagPanel // + this.inputLagPanel.BackColor = System.Drawing.Color.White; this.inputLagPanel.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; this.inputLagPanel.Controls.Add(this.inputLagButton); this.inputLagPanel.Controls.Add(this.numberOfClicksLabel); @@ -1187,22 +795,24 @@ private void InitializeComponent() this.inputLagPanel.Controls.Add(this.numberOfClicksSlider); this.inputLagPanel.Controls.Add(this.label16); this.inputLagPanel.Controls.Add(this.timeBetweenSlider); - this.inputLagPanel.Controls.Add(this.label18); - this.inputLagPanel.Location = new System.Drawing.Point(314, 121); + this.inputLagPanel.Location = new System.Drawing.Point(303, 118); this.inputLagPanel.Name = "inputLagPanel"; - this.inputLagPanel.Size = new System.Drawing.Size(283, 285); + this.inputLagPanel.Size = new System.Drawing.Size(350, 235); this.inputLagPanel.TabIndex = 30; // // inputLagButton // - this.inputLagButton.BackColor = System.Drawing.SystemColors.ActiveCaption; - this.inputLagButton.FlatStyle = System.Windows.Forms.FlatStyle.Popup; - this.inputLagButton.Font = new System.Drawing.Font("Consolas", 20F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.inputLagButton.Location = new System.Drawing.Point(20, 194); + this.inputLagButton.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(105)))), ((int)(((byte)(180)))), ((int)(((byte)(76))))); + this.inputLagButton.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.inputLagButton.Font = new System.Drawing.Font("Consolas", 20F, System.Drawing.FontStyle.Bold); + this.inputLagButton.ForeColor = System.Drawing.Color.White; + this.inputLagButton.Location = new System.Drawing.Point(-1, -1); this.inputLagButton.Name = "inputLagButton"; - this.inputLagButton.Size = new System.Drawing.Size(235, 74); - this.inputLagButton.TabIndex = 21; - this.inputLagButton.Text = "Start Latency Testing"; + this.inputLagButton.Padding = new System.Windows.Forms.Padding(20, 0, 10, 0); + this.inputLagButton.Size = new System.Drawing.Size(350, 74); + this.inputLagButton.TabIndex = 1; + this.inputLagButton.Text = "Start System Latency Testing"; + this.toolTipController.SetToolTip(this.inputLagButton, "Start Total System Latency Testing"); this.inputLagButton.UseVisualStyleBackColor = false; this.inputLagButton.Click += new System.EventHandler(this.inputLagButton_Click); // @@ -1210,7 +820,7 @@ private void InitializeComponent() // this.numberOfClicksLabel.AutoSize = true; this.numberOfClicksLabel.Font = new System.Drawing.Font("Microsoft Sans Serif", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.numberOfClicksLabel.Location = new System.Drawing.Point(211, 119); + this.numberOfClicksLabel.Location = new System.Drawing.Point(240, 163); this.numberOfClicksLabel.Name = "numberOfClicksLabel"; this.numberOfClicksLabel.Size = new System.Drawing.Size(20, 24); this.numberOfClicksLabel.TabIndex = 31; @@ -1220,7 +830,7 @@ private void InitializeComponent() // this.label20.AutoSize = true; this.label20.Font = new System.Drawing.Font("Microsoft Sans Serif", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.label20.Location = new System.Drawing.Point(48, 119); + this.label20.Location = new System.Drawing.Point(77, 163); this.label20.Name = "label20"; this.label20.Size = new System.Drawing.Size(158, 24); this.label20.TabIndex = 30; @@ -1230,7 +840,7 @@ private void InitializeComponent() // this.timeBetweenLabel.AutoSize = true; this.timeBetweenLabel.Font = new System.Drawing.Font("Microsoft Sans Serif", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.timeBetweenLabel.Location = new System.Drawing.Point(218, 44); + this.timeBetweenLabel.Location = new System.Drawing.Point(248, 88); this.timeBetweenLabel.Name = "timeBetweenLabel"; this.timeBetweenLabel.Size = new System.Drawing.Size(44, 24); this.timeBetweenLabel.TabIndex = 28; @@ -1238,14 +848,14 @@ private void InitializeComponent() // // numberOfClicksSlider // - this.numberOfClicksSlider.BackColor = System.Drawing.SystemColors.ControlDark; + this.numberOfClicksSlider.BackColor = System.Drawing.Color.White; this.numberOfClicksSlider.Cursor = System.Windows.Forms.Cursors.SizeWE; this.numberOfClicksSlider.LargeChange = 1; - this.numberOfClicksSlider.Location = new System.Drawing.Point(18, 141); + this.numberOfClicksSlider.Location = new System.Drawing.Point(17, 185); this.numberOfClicksSlider.Maximum = 50; this.numberOfClicksSlider.Minimum = 1; this.numberOfClicksSlider.Name = "numberOfClicksSlider"; - this.numberOfClicksSlider.Size = new System.Drawing.Size(248, 45); + this.numberOfClicksSlider.Size = new System.Drawing.Size(310, 45); this.numberOfClicksSlider.TabIndex = 16; this.numberOfClicksSlider.TickFrequency = 5; this.numberOfClicksSlider.TickStyle = System.Windows.Forms.TickStyle.Both; @@ -1256,7 +866,7 @@ private void InitializeComponent() // this.label16.AutoSize = true; this.label16.Font = new System.Drawing.Font("Microsoft Sans Serif", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.label16.Location = new System.Drawing.Point(14, 44); + this.label16.Location = new System.Drawing.Point(44, 88); this.label16.Name = "label16"; this.label16.Size = new System.Drawing.Size(191, 24); this.label16.TabIndex = 27; @@ -1265,85 +875,140 @@ private void InitializeComponent() // timeBetweenSlider // this.timeBetweenSlider.Cursor = System.Windows.Forms.Cursors.SizeWE; - this.timeBetweenSlider.Location = new System.Drawing.Point(18, 66); + this.timeBetweenSlider.Location = new System.Drawing.Point(17, 110); this.timeBetweenSlider.Minimum = 1; this.timeBetweenSlider.Name = "timeBetweenSlider"; - this.timeBetweenSlider.Size = new System.Drawing.Size(248, 45); + this.timeBetweenSlider.Size = new System.Drawing.Size(310, 45); this.timeBetweenSlider.TabIndex = 15; this.timeBetweenSlider.TickStyle = System.Windows.Forms.TickStyle.Both; this.timeBetweenSlider.Value = 1; this.timeBetweenSlider.Scroll += new System.EventHandler(this.timeBetweenSlider_Scroll); // - // label18 - // - this.label18.AutoSize = true; - this.label18.Font = new System.Drawing.Font("Microsoft Sans Serif", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.label18.Location = new System.Drawing.Point(14, 5); - this.label18.Name = "label18"; - this.label18.Size = new System.Drawing.Size(254, 24); - this.label18.TabIndex = 14; - this.label18.Text = "Total System Latency Testing"; - // // deviceStatusPanel // + this.deviceStatusPanel.BackColor = System.Drawing.Color.White; this.deviceStatusPanel.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.deviceStatusPanel.Controls.Add(this.devStatLbl); + this.deviceStatusPanel.Controls.Add(this.checkImg); this.deviceStatusPanel.Controls.Add(this.devStat); - this.deviceStatusPanel.Location = new System.Drawing.Point(9, 4); + this.deviceStatusPanel.Location = new System.Drawing.Point(8, 6); this.deviceStatusPanel.Name = "deviceStatusPanel"; - this.deviceStatusPanel.Size = new System.Drawing.Size(588, 43); + this.deviceStatusPanel.Size = new System.Drawing.Size(288, 45); this.deviceStatusPanel.TabIndex = 30; + this.toolTipController.SetToolTip(this.deviceStatusPanel, "Device Status"); + // + // checkImg + // + this.checkImg.Image = global::OSRTT_Launcher.Properties.Resources.check; + this.checkImg.Location = new System.Drawing.Point(219, 7); + this.checkImg.Name = "checkImg"; + this.checkImg.Size = new System.Drawing.Size(58, 29); + this.checkImg.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom; + this.checkImg.TabIndex = 7; + this.checkImg.TabStop = false; // // monitorPanel // + this.monitorPanel.BackColor = System.Drawing.Color.White; this.monitorPanel.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; this.monitorPanel.Controls.Add(this.monitorCB); this.monitorPanel.Controls.Add(this.label1); this.monitorPanel.Controls.Add(this.refreshMonitorListBtn); - this.monitorPanel.Location = new System.Drawing.Point(9, 56); + this.monitorPanel.Location = new System.Drawing.Point(303, 6); this.monitorPanel.Name = "monitorPanel"; - this.monitorPanel.Size = new System.Drawing.Size(588, 54); + this.monitorPanel.Size = new System.Drawing.Size(350, 45); this.monitorPanel.TabIndex = 31; // // mainPanel // - this.mainPanel.Controls.Add(this.deviceStatusPanel); + this.mainPanel.Controls.Add(this.resultsFolderBtn); + this.mainPanel.Controls.Add(this.resultsViewBtn); + this.mainPanel.Controls.Add(this.inputLagPanel); this.mainPanel.Controls.Add(this.controlsPanel); + this.mainPanel.Controls.Add(this.deviceStatusPanel); this.mainPanel.Controls.Add(this.monitorPanel); - this.mainPanel.Controls.Add(this.analysePanel); - this.mainPanel.Controls.Add(this.aboutPanel); - this.mainPanel.Controls.Add(this.inputLagPanel); - this.mainPanel.Location = new System.Drawing.Point(2, 26); + this.mainPanel.Controls.Add(this.helpBtn); + this.mainPanel.Location = new System.Drawing.Point(2, 29); this.mainPanel.Name = "mainPanel"; - this.mainPanel.Size = new System.Drawing.Size(611, 678); + this.mainPanel.Size = new System.Drawing.Size(662, 364); this.mainPanel.TabIndex = 32; // + // resultsFolderBtn + // + this.resultsFolderBtn.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(31)))), ((int)(((byte)(197)))), ((int)(((byte)(230))))); + this.resultsFolderBtn.FlatStyle = System.Windows.Forms.FlatStyle.Popup; + this.resultsFolderBtn.Font = new System.Drawing.Font("Consolas", 15F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.resultsFolderBtn.ForeColor = System.Drawing.Color.White; + this.resultsFolderBtn.Location = new System.Drawing.Point(481, 57); + this.resultsFolderBtn.Name = "resultsFolderBtn"; + this.resultsFolderBtn.Size = new System.Drawing.Size(111, 55); + this.resultsFolderBtn.TabIndex = 33; + this.resultsFolderBtn.Text = "Results Folder"; + this.toolTipController.SetToolTip(this.resultsFolderBtn, "Open Results Folder"); + this.resultsFolderBtn.UseVisualStyleBackColor = false; + this.resultsFolderBtn.Click += new System.EventHandler(this.ResultsFolderBtn_Click); + // + // resultsViewBtn + // + this.resultsViewBtn.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(31)))), ((int)(((byte)(197)))), ((int)(((byte)(230))))); + this.resultsViewBtn.FlatStyle = System.Windows.Forms.FlatStyle.Popup; + this.resultsViewBtn.Font = new System.Drawing.Font("Consolas", 15F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.resultsViewBtn.ForeColor = System.Drawing.Color.White; + this.resultsViewBtn.Location = new System.Drawing.Point(303, 57); + this.resultsViewBtn.Name = "resultsViewBtn"; + this.resultsViewBtn.Size = new System.Drawing.Size(172, 55); + this.resultsViewBtn.TabIndex = 32; + this.resultsViewBtn.Text = "Heatmaps && Graphs"; + this.toolTipController.SetToolTip(this.resultsViewBtn, "Open Results View to process && view existing results"); + this.resultsViewBtn.UseVisualStyleBackColor = false; + this.resultsViewBtn.Click += new System.EventHandler(this.resultsViewBtn_Click); + // // progressBar1 // - this.progressBar1.Location = new System.Drawing.Point(0, 710); + this.progressBar1.Location = new System.Drawing.Point(0, 514); this.progressBar1.MarqueeAnimationSpeed = 30; this.progressBar1.Maximum = 50; this.progressBar1.Name = "progressBar1"; - this.progressBar1.Size = new System.Drawing.Size(613, 23); + this.progressBar1.Size = new System.Drawing.Size(664, 23); this.progressBar1.Step = 50; this.progressBar1.Style = System.Windows.Forms.ProgressBarStyle.Marquee; this.progressBar1.TabIndex = 33; this.progressBar1.Visible = false; // + // boardSerialLbl + // + this.boardSerialLbl.Font = new System.Drawing.Font("Microsoft Sans Serif", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.boardSerialLbl.Location = new System.Drawing.Point(290, 75); + this.boardSerialLbl.Name = "boardSerialLbl"; + this.boardSerialLbl.Size = new System.Drawing.Size(271, 24); + this.boardSerialLbl.TabIndex = 28; + this.boardSerialLbl.Text = "Not Connected"; + // + // label13 + // + this.label13.AutoSize = true; + this.label13.Font = new System.Drawing.Font("Microsoft Sans Serif", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.label13.Location = new System.Drawing.Point(99, 75); + this.label13.Name = "label13"; + this.label13.Size = new System.Drawing.Size(191, 24); + this.label13.TabIndex = 27; + this.label13.Text = "Board Serial Number:"; + // // Main // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.BackColor = System.Drawing.SystemColors.ControlDark; - this.ClientSize = new System.Drawing.Size(1924, 809); + this.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(180)))), ((int)(((byte)(180)))), ((int)(((byte)(180))))); + this.ClientSize = new System.Drawing.Size(2103, 808); this.Controls.Add(this.progressBar1); this.Controls.Add(this.mainPanel); this.Controls.Add(this.debugPanel); this.Controls.Add(this.brightnessPanel); + this.Controls.Add(this.aboutPanel); this.Controls.Add(this.menuStrip1); this.MainMenuStrip = this.menuStrip1; this.MaximizeBox = false; this.Name = "Main"; + this.Padding = new System.Windows.Forms.Padding(5); this.SizeGripStyle = System.Windows.Forms.SizeGripStyle.Hide; this.Text = "OSRTT Launcher"; this.Load += new System.EventHandler(this.Main_Load); @@ -1352,8 +1017,6 @@ private void InitializeComponent() this.controlsPanel.ResumeLayout(false); this.controlsPanel.PerformLayout(); ((System.ComponentModel.ISupportInitialize)(this.testCount)).EndInit(); - this.analysePanel.ResumeLayout(false); - this.analysePanel.PerformLayout(); this.brightnessPanel.ResumeLayout(false); this.brightnessPanel.PerformLayout(); this.aboutPanel.ResumeLayout(false); @@ -1365,7 +1028,7 @@ private void InitializeComponent() ((System.ComponentModel.ISupportInitialize)(this.numberOfClicksSlider)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.timeBetweenSlider)).EndInit(); this.deviceStatusPanel.ResumeLayout(false); - this.deviceStatusPanel.PerformLayout(); + ((System.ComponentModel.ISupportInitialize)(this.checkImg)).EndInit(); this.monitorPanel.ResumeLayout(false); this.monitorPanel.PerformLayout(); this.mainPanel.ResumeLayout(false); @@ -1377,24 +1040,18 @@ private void InitializeComponent() #endregion private System.Windows.Forms.Button launchBtn; - private System.Windows.Forms.Button resultsBtn; private System.Windows.Forms.RichTextBox richTextBox1; private System.Windows.Forms.MenuStrip menuStrip1; private System.Windows.Forms.ToolStripMenuItem deviceToolStripMenuItem; private System.Windows.Forms.ToolStripMenuItem updateDeviceToolStripMenuItem; - private System.Windows.Forms.ToolStripMenuItem resultsSettingsToolStripMenuItem; - private System.Windows.Forms.Label devStatLbl; private System.Windows.Forms.Label devStat; - private System.Windows.Forms.Label label3; private System.Windows.Forms.ToolStripMenuItem analyseResultsToolStripMenuItem; private System.Windows.Forms.Panel controlsPanel; - private System.Windows.Forms.Panel analysePanel; private System.Windows.Forms.ComboBox monitorCB; private System.Windows.Forms.Label label1; private System.Windows.Forms.Button refreshMonitorListBtn; private System.Windows.Forms.Label label2; private System.Windows.Forms.NumericUpDown testCount; - private System.Windows.Forms.Button importRawFolder; private System.Windows.Forms.ComboBox fpsLimitList; private System.Windows.Forms.Label label4; private System.Windows.Forms.ToolStripMenuItem toolStripMenuItem1; @@ -1414,16 +1071,10 @@ private void InitializeComponent() private System.Windows.Forms.NotifyIcon notifyIcon; private System.Windows.Forms.Label potValLabel; private System.Windows.Forms.Label label11; - private System.Windows.Forms.ToolStripMenuItem outputSettingsToolStripMenuItem; - private System.Windows.Forms.ToolStripMenuItem verboseOutputToolStripMenuItem; - private System.Windows.Forms.ToolStripMenuItem saveGammaTableToolStripMenuItem; - private System.Windows.Forms.ToolStripMenuItem saveSmoothedDataToolStripMenuItem; - private System.Windows.Forms.ToolStripSeparator toolStripSeparator2; private System.Windows.Forms.ToolStripMenuItem debugModeToolStripMenuItem; private System.Windows.Forms.ToolStripMenuItem saveUSBOutputToolStripMenuItem; private System.Windows.Forms.ToolStripMenuItem programSettingsToolStripMenuItem; private System.Windows.Forms.ToolStripMenuItem minimiseToTrayToolStripMenuItem; - private System.Windows.Forms.ToolStripMenuItem suppressDialogBoxesToolStripMenuItem; private System.Windows.Forms.Button closeBrightnessBtn; private System.Windows.Forms.ToolStripMenuItem aboutProgramToolStripMenuItem; private System.Windows.Forms.Panel aboutPanel; @@ -1436,27 +1087,8 @@ private void InitializeComponent() private System.Windows.Forms.Panel debugPanel; private System.Windows.Forms.Button serialSendBtn; private System.Windows.Forms.TextBox serialSendBox; - private System.Windows.Forms.ToolStripMenuItem saveXLSXMenuItem; - private System.Windows.Forms.ToolStripMenuItem recommendedSettingsToolStripMenuItem; - private System.Windows.Forms.ToolStripMenuItem advancedSettingsToolStripMenuItem; - private System.Windows.Forms.ToolStripMenuItem measurementsToolStripMenuItem; - private System.Windows.Forms.ToolStripMenuItem gamCorMenuItem; - private System.Windows.Forms.ToolStripSeparator toolStripSeparator1; - private System.Windows.Forms.ToolStripMenuItem threePercentMenuItem; - private System.Windows.Forms.ToolStripMenuItem tenPercentMenuItem; - private System.Windows.Forms.ToolStripSeparator toolStripSeparator3; - private System.Windows.Forms.ToolStripMenuItem fixedRGB10OffsetToolStripMenuItem; - private System.Windows.Forms.ToolStripMenuItem fixedRGB5OffsetToolStripMenuItem; - private System.Windows.Forms.ToolStripMenuItem overshootSettingsMenuItem; - private System.Windows.Forms.ToolStripMenuItem gammaCorrectedToolStripMenuItem; - private System.Windows.Forms.ToolStripMenuItem percentageToolStripMenuItem; - private System.Windows.Forms.ToolStripMenuItem differenceToolStripMenuItem; - private System.Windows.Forms.ToolStripMenuItem endValueToolStripMenuItem; - private System.Windows.Forms.ToolStripMenuItem saveGraphsMenuItem; private System.Windows.Forms.Panel inputLagPanel; - private System.Windows.Forms.Label label18; private System.Windows.Forms.Panel deviceStatusPanel; - private System.Windows.Forms.Label label13; private System.Windows.Forms.Button inputLagButton; private System.Windows.Forms.Label numberOfClicksLabel; private System.Windows.Forms.Label label20; @@ -1468,21 +1100,20 @@ private void InitializeComponent() private System.Windows.Forms.Panel mainPanel; private System.Windows.Forms.ComboBox captureTimeBox; private System.Windows.Forms.Label label17; - private System.Windows.Forms.Button helpFramerateBtn; - private System.Windows.Forms.Button helpCyclesBtn; - private System.Windows.Forms.Button helpCaptureBtn; - private System.Windows.Forms.ToolStripMenuItem saveRawInputLagMenuItem; - private System.Windows.Forms.ToolStripMenuItem IgnoreErrorsMenuItem; + private System.Windows.Forms.Button helpBtn; private System.Windows.Forms.ToolStripMenuItem bugReportMenuItem; - private System.Windows.Forms.Button opnResultsBtn; private System.Windows.Forms.ComboBox vsyncStateList; - private System.Windows.Forms.Button vsyncHelpBtn; private System.Windows.Forms.Label label15; - private System.Windows.Forms.ToolStripSeparator toolStripSeparator4; - private System.Windows.Forms.ToolStripMenuItem convertRawGraphMenuItem; private System.Windows.Forms.ProgressBar progressBar1; private System.Windows.Forms.ToolStripMenuItem testButtonMenuItem; - private System.Windows.Forms.ToolStripMenuItem extendedGammaTestToolStripMenuItem; + private System.Windows.Forms.Button testSettingsBtn; + private System.Windows.Forms.PictureBox checkImg; + private System.Windows.Forms.Button resultsViewBtn; + private System.Windows.Forms.ToolStripMenuItem settingsMenuItem; + private System.Windows.Forms.Button resultsFolderBtn; + private System.Windows.Forms.ToolTip toolTipController; + private System.Windows.Forms.Label boardSerialLbl; + private System.Windows.Forms.Label label13; } } diff --git a/OSRTT Launcher/OSRTT Launcher/Main.cs b/OSRTT Launcher/OSRTT Launcher/Main.cs index 7f32dfe..3a913d6 100644 --- a/OSRTT Launcher/OSRTT Launcher/Main.cs +++ b/OSRTT Launcher/OSRTT Launcher/Main.cs @@ -16,6 +16,7 @@ using WindowsDisplayAPI.DisplayConfig; using AutoUpdaterDotNET; using Newtonsoft.Json; +using Newtonsoft.Json.Linq; using System.Resources; using System.Runtime.InteropServices; using Excel = Microsoft.Office.Interop.Excel; @@ -32,8 +33,6 @@ public partial class Main : Form private string softwareVersion = "2.3"; // TODO // - // Test new testing method (program run instead of device run) - // Save to results template // Denoising backlight strobing (gather data from gamma test) // // CANCEL TEST IF GAME CLOSED!!! (serial buffer still full of multiple results?? use checkfocusedwindow to also check if program is open? Although launchgame func should handle that and close..) @@ -66,6 +65,7 @@ public partial class Main : Form private bool paused = false; private bool testStarted = false; private bool triggerNextResult = false; + private bool vsyncTrigger = false; private List RGBArr = new List{0, 51, 102, 153, 204, 255}; private int currentStart = 0; @@ -79,26 +79,30 @@ public partial class Main : Form string path = System.Reflection.Assembly.GetExecutingAssembly().GetName().CodeBase; string resultsFolderPath = ""; - private List> results = new List>(); - private List singleResults = new List(); + public ProcessData.runSettings runSettings; + private List> results = new List>(); + private List singleResults = new List(); + private List smoothedData = new List(); private List gamma = new List(); private List noiseLevel = new List(); - private List inputLagRawData = new List(); - private List inputLagProcessed = new List(); + private List inputLagRawData = new List(); + private List inputLagProcessed = new List(); private List importedFile = new List(); private List testLatency = new List(); - private List> multipleRunData = new List>(); - private Excel.Application resultsTemplate; - private Excel._Workbook resultsTemplateWorkbook; - private Excel.Application graphTemplate; - private Excel._Workbook graphTemplateWorkbook; + public ProcessData.rtMethods rtMethod; + public ProcessData.osMethods osMethod; + + private List> multipleRunData = new List>(); + private List averageData = new List(); + private List processedGamma = new List(); private bool excelInstalled = false; public class Displays { public string Name { get; set; } public int Freq { get; set; } public string Connection { get; set; } + public string ManufacturerCode { get; set; } } public List displayList = new List(); public class FPS @@ -230,51 +234,14 @@ private void setupFormElements() private void initialiseSettings() { testCount.Value = Properties.Settings.Default.Runs; - verboseOutputToolStripMenuItem.Checked = Properties.Settings.Default.Verbose; - saveGammaTableToolStripMenuItem.Checked = Properties.Settings.Default.saveGammaTable; - saveSmoothedDataToolStripMenuItem.Checked = Properties.Settings.Default.saveSmoothData; - threePercentMenuItem.Checked = Properties.Settings.Default.threePercentSetting; - tenPercentMenuItem.Checked = Properties.Settings.Default.tenPercentSetting; - fixedRGB5OffsetToolStripMenuItem.Checked = Properties.Settings.Default.RGB5Offset; - fixedRGB10OffsetToolStripMenuItem.Checked = Properties.Settings.Default.RGB10Offset; - gammaCorrectedToolStripMenuItem.Checked = Properties.Settings.Default.gammaCorrectedSetting; - endValueToolStripMenuItem.Checked = Properties.Settings.Default.gammaPercentSetting; - differenceToolStripMenuItem.Checked = Properties.Settings.Default.gammaPercentDiff; - if (Properties.Settings.Default.gammaPercentSetting || Properties.Settings.Default.gammaPercentDiff) - { - percentageToolStripMenuItem.Checked = true; - } - gamCorMenuItem.Checked = Properties.Settings.Default.gammaCorrRT; saveUSBOutputToolStripMenuItem.Checked = Properties.Settings.Default.USBOutput; minimiseToTrayToolStripMenuItem.Checked = Properties.Settings.Default.MinToTray; - suppressDialogBoxesToolStripMenuItem.Checked = Properties.Settings.Default.SuppressDiagBox; - saveXLSXMenuItem.Checked = Properties.Settings.Default.saveXLSX; - saveGraphsMenuItem.Checked = Properties.Settings.Default.saveGraphs; - if (Properties.Settings.Default.advancedSettings) - { - recommendedSettingsToolStripMenuItem.Checked = false; - advancedSettingsToolStripMenuItem.Checked = true; - measurementsToolStripMenuItem.Visible = true; - overshootSettingsMenuItem.Visible = true; - extendedGammaTestToolStripMenuItem.Visible = true; - } - else - { - recommendedSettingsToolStripMenuItem.Checked = true; - advancedSettingsToolStripMenuItem.Checked = false; - measurementsToolStripMenuItem.Visible = false; - overshootSettingsMenuItem.Visible = false; - extendedGammaTestToolStripMenuItem.Visible = false; - } timeBetween = Properties.Settings.Default.timeBetween; timeBetweenLabel.Text = timeBetween.ToString(); timeBetweenSlider.Value = Convert.ToInt32(timeBetween * 2); numberOfClicks = Properties.Settings.Default.numberOfClicks; numberOfClicksLabel.Text = numberOfClicks.ToString(); numberOfClicksSlider.Value = numberOfClicks; - saveRawInputLagMenuItem.Checked = Properties.Settings.Default.saveInputLagRaw; - IgnoreErrorsMenuItem.Checked = Properties.Settings.Default.ignoreErrors; - extendedGammaTestToolStripMenuItem.Checked = Properties.Settings.Default.extendedGammaTest; } public Main() @@ -286,6 +253,7 @@ public Main() Thread.CurrentThread.CurrentCulture = customCulture; setupFormElements(); + SetDeviceStatus(0); ControlDeviceButtons(false); path = new Uri(System.IO.Path.GetDirectoryName(path)).LocalPath; path += @"\Results"; @@ -396,8 +364,6 @@ private void initialSetup() showMessageBox("Warning: Excel doesn't seem to be installed. Saving to the XLSX or XLSM templates (results or graph view templates) won't work and have been disabled.","Excel Not Installed",MessageBoxButtons.OK,MessageBoxIcon.Exclamation); Properties.Settings.Default.saveXLSX = false; Properties.Settings.Default.saveGraphs = false; - saveGraphsMenuItem.Checked = false; - saveXLSXMenuItem.Checked = false; Properties.Settings.Default.Save(); } } @@ -424,6 +390,7 @@ private void listMonitors(int selected) { monitorCB.Items.Clear(); // Clear existing array and list before filling them displayList.Clear(); + var i = WindowsDisplayAPI.Display.GetDisplays(); foreach (var target in WindowsDisplayAPI.DisplayConfig.PathInfo.GetActivePaths()) { @@ -440,11 +407,13 @@ private void listMonitors(int selected) } int refresh = ((int)item.FrequencyInMillihertz) / 1000; string name = item.DisplayTarget.ToString(); + string manCode = ""; if (name == "") { name = target.DisplaySource.ToString().Remove(0, 4); } - var data = new Displays { Name = name, Freq = refresh, Connection = con }; + else { manCode = item.DisplayTarget.EDIDManufactureCode; } + var data = new Displays { Name = name, Freq = refresh, Connection = con, ManufacturerCode = manCode }; displayList.Add(data); monitorCB.Items.Add(name); } @@ -489,7 +458,14 @@ private void listVsyncState() vsyncStateList.Items.Clear(); vsyncStateList.Items.Add("Disabled"); vsyncStateList.Items.Add("Enabled"); - vsyncStateList.SelectedIndex = Properties.Settings.Default.VSyncState; + if (Properties.Settings.Default.VSyncState) + { + vsyncStateList.SelectedIndex = 1; + } + else + { + vsyncStateList.SelectedIndex = 0; + } } private void checkFolderPermissions() @@ -526,7 +502,7 @@ private void findAndConnectToBoard() if (!portConnected) { ControlDeviceButtons(false); - SetDeviceStatus("Board Disconnected"); + SetDeviceStatus(0); testRunning = false; testStarted = false; testMode = false; @@ -534,6 +510,10 @@ private void findAndConnectToBoard() { this.firmVerLbl.Invoke((MethodInvoker)(() => this.firmVerLbl.Text = "N/A")); } + if (this.boardSerialLbl.IsHandleCreated) + { + this.boardSerialLbl.Invoke((MethodInvoker)(() => this.boardSerialLbl.Text = "Not Connected")); + } testRunning = false; if (!Properties.Settings.Default.updateInProgress) { @@ -579,8 +559,9 @@ private void findAndConnectToBoard() { connectToBoard(p); Thread.Sleep(1000); - SetDeviceStatus("Connected to Device!"); + SetDeviceStatus(1); ControlDeviceButtons(true); + getBoardSerial(); } catch (Exception e) { @@ -608,7 +589,7 @@ private void findAndConnectToBoard() } else { - SetDeviceStatus("Updating Firmware"); + SetDeviceStatus(2); setProgressBar(true); System.Diagnostics.Process process = new System.Diagnostics.Process(); process.StartInfo.WindowStyle = System.Diagnostics.ProcessWindowStyle.Hidden; @@ -630,12 +611,12 @@ private void findAndConnectToBoard() if (output.Contains("Error")) { MessageBox.Show("Firmware update failed. Error message: " + output, "Update Device Failed", MessageBoxButtons.OK, MessageBoxIcon.Error); - SetDeviceStatus("Update Failed"); + SetDeviceStatus(4); } else { MessageBox.Show("Device has been updated successfully!", "Updated Device", MessageBoxButtons.OK, MessageBoxIcon.Information); - SetDeviceStatus("Update Complete"); + SetDeviceStatus(3); } boardUpdate = false; } @@ -660,7 +641,7 @@ private void findAndConnectToBoard() } } - private void connectToBoard(String comPort) + private void connectToBoard(string comPort) { System.ComponentModel.IContainer components = new System.ComponentModel.Container(); @@ -686,7 +667,7 @@ private void connectToBoard(String comPort) //port.Write("X"); //Thread.Sleep(250); port.Write("I" + (this.testCount.Value - 1).ToString()); - setFPSLimit(); + //setFPSLimit(); if (displayList[0].Freq < 140) { if (Properties.Settings.Default.captureTime == 0) @@ -701,7 +682,7 @@ private void connectToBoard(String comPort) } else { - SetDeviceStatus("Board Disconnected"); + SetDeviceStatus(0); ControlDeviceButtons(false); } } @@ -718,6 +699,47 @@ private void compareFirmware() } } } + + private void getBoardSerial() + { + System.Diagnostics.Process process = new System.Diagnostics.Process(); + process.StartInfo.WindowStyle = System.Diagnostics.ProcessWindowStyle.Hidden; + process.StartInfo.FileName = "cmd.exe"; + process.StartInfo.Arguments = "/C .\\arduinoCLI\\arduino-cli.exe board list --format json"; + process.StartInfo.UseShellExecute = false; + process.StartInfo.RedirectStandardOutput = true; + process.StartInfo.CreateNoWindow = true; + process.Start(); + string output = process.StandardOutput.ReadToEnd(); + process.WaitForExit(); + Console.WriteLine(output); + var outputPreSplit = output.Replace("},", "#"); + var array = outputPreSplit.Split('#'); + for (int i = 0; i < array.Length; i++) + { + if (array[i].Contains("itsybitsy")) + { + var ports = array[i].Split(','); + foreach (var p in ports) + { + if (p.Contains("serialNumber")) + { + var sn = p.Split('\"'); + foreach (var s in sn) + { + if (s.Length > 15) + { + Properties.Settings.Default.serialNumber = s; + Properties.Settings.Default.Save(); + this.boardSerialLbl.Invoke((MethodInvoker)(() => this.boardSerialLbl.Text = s)); + } + } + } + } + } + } + + } private void ControlDeviceButtons(bool state) { @@ -770,19 +792,60 @@ private void setVsyncState(int state) else { this.vsyncStateList.SelectedIndex = state; } } - private void SetDeviceStatus(string text) + private void SetDeviceStatus(int state) { - // InvokeRequired required compares the thread ID of the - // calling thread to the thread ID of the creating thread. - // If these threads are different, it returns true. + string text = " Device Not Connected"; + Color bg = Color.FromArgb(255, 255, 131, 21); + Color btnBg = Color.Gray; + bool active = false; + bool check = false; + if (state == 1) + { + text = "Device Connected"; + bg = Color.White; + check = true; + active = true; + btnBg = Color.FromArgb(255, 105, 180, 76); + } + else if (state == 2) + { + text = "Updating Firmware Now"; + bg = Color.Violet; + } + else if (state == 3) + { + text = "Update Successful"; + bg = Color.FromArgb(255, 105, 180, 76); + check = true; + } + else if (state == 4) + { + text = "Firmware Update Failed"; + bg = Color.FromArgb(255, 255, 80, 80); + } if (this.devStat.InvokeRequired) { - SetTextCallback d = new SetTextCallback(SetDeviceStatus); - this.Invoke(d, new object[] { text }); //check if this needs to be an array - this.statusTrayBtn.Text = text; - this.notifyIcon.Text = text; + this.devStat.Invoke((MethodInvoker)(() => this.devStat.Text = text)); + this.checkImg.Invoke((MethodInvoker)(() => this.checkImg.Visible = check)); + this.deviceStatusPanel.Invoke((MethodInvoker)(() => this.deviceStatusPanel.BackColor = bg)); + this.controlsPanel.Invoke((MethodInvoker)(() => this.controlsPanel.Enabled = active)); + this.inputLagPanel.Invoke((MethodInvoker)(() => this.inputLagPanel.Enabled = active)); + this.launchBtn.Invoke((MethodInvoker)(() => this.launchBtn.BackColor = btnBg)); + this.inputLagButton.Invoke((MethodInvoker)(() => this.inputLagButton.BackColor = btnBg)); + } + else + { + this.devStat.Text = text; + this.checkImg.Visible = check; + this.deviceStatusPanel.BackColor = bg; + this.controlsPanel.Enabled = active; + this.inputLagPanel.Enabled = active; + this.launchBtn.BackColor = btnBg; + this.inputLagButton.BackColor = btnBg; } - else { this.devStat.Text = text; } + this.statusTrayBtn.Text = text; + this.notifyIcon.Text = text; + } private void SetText(string text) @@ -821,6 +884,33 @@ private string getSelectedFps() else { return fpsLimitList.SelectedItem.ToString(); } } + private bool getVsyncState() + { + if (vsyncStateList.InvokeRequired) + { + if ( (string)vsyncStateList.Invoke( + new Func(() => vsyncStateList.SelectedItem.ToString()) + ) == "Enabled") + { + return true; + } + else + { + return false; + } + } + else { + if (vsyncStateList.SelectedItem.ToString() == "Enabled") + { + return true; + } + else + { + return false; + } + } + } + private int getRunCount() { if (testCount.InvokeRequired) @@ -914,7 +1004,16 @@ public void Read() { if (start < end) { - singleResults.Add(intValues); + ProcessData.rawResultData rawResult = new ProcessData.rawResultData + { + StartingRGB = intValues[0], + EndRGB = intValues[1], + TimeTaken = intValues[2], + SampleCount = intValues[3], + SampleTime = ((double)intValues[2] / (double)intValues[3]), + Samples = intValues.Skip(4).ToList() + }; + results[currentRun].Add(rawResult); } else { @@ -932,7 +1031,16 @@ public void Read() } else { - singleResults.Add(intValues); + ProcessData.rawResultData rawResult = new ProcessData.rawResultData + { + StartingRGB = intValues[0], + EndRGB = intValues[1], + TimeTaken = intValues[2], + SampleCount = intValues[3], + SampleTime = ((double)intValues[2] / (double)intValues[3]), + Samples = intValues.Skip(4).ToList() + }; + results[currentRun].Add(rawResult); } } } @@ -940,7 +1048,16 @@ public void Read() { if (start > end) { - singleResults.Add(intValues); + ProcessData.rawResultData rawResult = new ProcessData.rawResultData + { + StartingRGB = intValues[0], + EndRGB = intValues[1], + TimeTaken = intValues[2], + SampleCount = intValues[3], + SampleTime = ((double)intValues[2] / (double)intValues[3]), + Samples = intValues.Skip(4).ToList() + }; + results[currentRun].Add(rawResult); } else { @@ -958,7 +1075,16 @@ public void Read() } else { - singleResults.Add(intValues); + ProcessData.rawResultData rawResult = new ProcessData.rawResultData + { + StartingRGB = intValues[0], + EndRGB = intValues[1], + TimeTaken = intValues[2], + SampleCount = intValues[3], + SampleTime = ((double)intValues[2] / (double)intValues[3]), + Samples = intValues.Skip(4).ToList() + }; + results[currentRun].Add(rawResult); } } } @@ -1033,19 +1159,6 @@ public void Read() "\n You are free to continue the test, but you may need to verify the results manually.", "Backlight Strobing Error", MessageBoxButtons.OK, MessageBoxIcon.Warning); } } - else if (message.Contains("STARTING RUN")) - { // EOL - singleResults.Clear(); - testRunning = true; - } - else if (message.Contains("STARTING TEST")) - { // EOL - testRunning = true; - makeResultsFolder(); - multipleRunData.Clear(); - results.Clear(); - singleResults.Clear(); - } else if (message.Contains("Test Started")) { testStarted = true; @@ -1055,10 +1168,6 @@ public void Read() triggerNextResult = true; //Console.WriteLine("trigger next result true"); } - else if (message.Contains("Run Complete")) - { // EOL - runComplete(); - } else if (message.Contains("G Test")) { if (message.Contains("Starting")) @@ -1068,32 +1177,10 @@ public void Read() } else if (message.Contains("Complete")) { - processGammaTable(); + //processGammaTable(); gammaTest = false; } } - else if (message.Contains("Test Complete")) - { // EOL - if (processingFailed) - { - showMessageBox("One or more set of results failed to process and won't be included in the multi-run averaging. Brightness may be too high - try calibrating the brightness and running the test again.", "Processing Failed", MessageBoxButtons.OK, MessageBoxIcon.Error); - processingFailed = false; - } - Thread.Sleep(500); //Had an issue with data processing not being finished by the time the command comes it to start averaging the data. - processMultipleRuns(); - //port.Write("T"); - DialogResult d = MessageBox.Show("Test complete, open results folder?","Test Complete", MessageBoxButtons.YesNo, MessageBoxIcon.Question); - if (d == DialogResult.Yes) - { - //open folder - Process.Start("explorer.exe", resultsFolderPath); - testRunning = false; - } - else - { - testRunning = false; - } - } else if (message.Contains("FW:")) { string[] sp = message.Split(':'); @@ -1103,12 +1190,12 @@ public void Read() } else if (message.Contains("Runs:")) { - string[] sp = message.Split(':'); + /*string[] sp = message.Split(':'); int runs = Int32.Parse(sp[1]); if (runs != (this.testCount.Value - 1)) { setRepeatCounter(runs); - } + }*/ } else if (message.Contains("FPS Key:")) { @@ -1234,7 +1321,7 @@ public void Read() { setCaptureTime(); setFPSLimit(); - port.Write("V" + Properties.Settings.Default.VSyncState.ToString()); + //port.Write("V" + Properties.Settings.Default.VSyncState.ToString()); } else if (message.Contains("IL")) { @@ -1263,7 +1350,15 @@ public void Read() } else { continue; } } - inputLagRawData.Add(intValues.ToArray()); + ProcessData.rawInputLagResult rawLag = new ProcessData.rawInputLagResult + { + ClickTime = intValues[0], + TimeTaken = intValues[1], + SampleCount = intValues[2], + SampleTime = (double)intValues[1] / (double)intValues[2], + Samples = intValues.Skip(3).ToList() + }; + inputLagRawData.Add(rawLag); } else if (message.Contains("Time")) { @@ -1454,9 +1549,22 @@ private void launchBtn_Click(object sender, EventArgs e) Properties.Settings.Default.Runs = Decimal.ToInt32(testCount.Value); Properties.Settings.Default.Save(); - // block game until brightness window closes - that done already thanks to dialog result? - launchGameThread = new Thread(new ThreadStart(this.launchGameAndWaitForExit)); - launchGameThread.Start(); + if (launchGameThread == null || !launchGameThread.IsAlive) + { + launchGameThread = new Thread(new ThreadStart(this.launchGameAndWaitForExit)); + launchGameThread.Start(); + } + else + { + CFuncs cf = new CFuncs(); + DialogResult d = cf.showMessageBox("Error: Can't run test with previous test results open. Close and continue?","Close Results",MessageBoxButtons.YesNo,MessageBoxIcon.Warning); + if (d == DialogResult.Yes) + { + launchGameThread.Abort(); + launchGameThread = new Thread(new ThreadStart(this.launchGameAndWaitForExit)); + launchGameThread.Start(); + } + } } private void launchGameAndWaitForExit() @@ -1480,7 +1588,7 @@ private void launchGameAndWaitForExit() } Thread.Sleep(200); testRunning = true; - + vsyncTrigger = false; // Launch UE4 game // thinking about it you can probably just bundle this into one process instead of launching, then finding it again... string ue4Path = System.Reflection.Assembly.GetExecutingAssembly().GetName().CodeBase; @@ -1492,7 +1600,7 @@ private void launchGameAndWaitForExit() int WinX = 0; int WinY = 0; string vsync = " VSync"; - if (Properties.Settings.Default.VSyncState == 0) + if (!Properties.Settings.Default.VSyncState) { vsync = " NoVSync"; } @@ -1533,7 +1641,16 @@ private void launchGameAndWaitForExit() try { gamma.Clear(); + processedGamma.Clear(); + results.Clear(); + multipleRunData.Clear(); + singleResults.Clear(); testLatency.Clear(); + int runCount = getRunCount(); + for (int r = 0; r < runCount; r++) + { + results.Add(new List()); + } testStarted = false; port.Write("T"); } @@ -1549,6 +1666,7 @@ private void launchGameAndWaitForExit() if (boardVersion > 1.5) { testRunning = true; + initRtOsMethods(); makeResultsFolder(); runTestThread = new Thread(new ThreadStart(this.runTest)); runTestThread.Start(); @@ -1570,11 +1688,41 @@ private void launchGameAndWaitForExit() Console.WriteLine("Game closed"); SetText("Game closed"); port.Write("X"); + ControlDeviceButtons(true); setProgressBar(false); testRunning = false; testStarted = false; testMode = false; + /*if (Properties.Settings.Default.shareResults) + { + DataUpload du = new DataUpload(); + Thread uploadThread = new Thread(() => du.ShareResults(results,processedGamma,testLatency,runSettings)); + uploadThread.Start(); + }*/ + if (results.Count != 0) + { + processThread = new Thread(new ThreadStart(runProcessing)); + processThread.Start(); + + while (processThread.IsAlive) + { + Thread.Sleep(100); + } + this.Invoke((MethodInvoker)delegate () + { + ResultsView rv = new ResultsView(); + rv.setRawData(results); + rv.setMultiRunData(multipleRunData); + rv.setAverageData(averageData); + rv.setResultsFolder(resultsFolderPath); + rv.setRtMethod(rtMethod); + rv.setOsMethod(osMethod); + rv.setRunSettings(runSettings); + rv.setStandardView(); + rv.Show(); + }); + } } catch (InvalidOperationException e) { @@ -1615,6 +1763,21 @@ private void checkFocusedWindow() } else { + if (!vsyncTrigger) + { + var item = fpsList.Find(x => x.FPSValue == getSelectedFps()); + SendKeys.SendWait(item.Key); + Thread.Sleep(100); + if (Properties.Settings.Default.VSyncState) + { + SendKeys.SendWait("{PGUP}"); + } + else + { + SendKeys.SendWait("{PGDN}"); + } + vsyncTrigger = true; + } if (paused) { //port.Write("S"); @@ -1660,9 +1823,6 @@ private void runTest() currentRun = 0; currentStart = 0; currentEnd = 0; - multipleRunData.Clear(); - results.Clear(); - singleResults.Clear(); int testPatternSize = RGBArr.Count * (RGBArr.Count - 1); for (int r = 0; r < testCount.Value; r++) { // how many runs to do @@ -1689,7 +1849,7 @@ private void runTest() sw.Start(); while (sw.ElapsedMilliseconds < 5000) { // wait for CORRECT result to come back - if ((currentStart == RGBArr[i] && currentEnd == RGBArr[k]) && triggerNextResult) + if (currentStart == RGBArr[i] && currentEnd == RGBArr[k] && triggerNextResult) { break; } @@ -1724,7 +1884,7 @@ private void runTest() sw.Start(); while (sw.ElapsedMilliseconds < 5000) { // wait for CORRECT result to come back - if ((currentStart == RGBArr[k] && currentEnd == RGBArr[i]) && triggerNextResult) + if (currentStart == RGBArr[k] && currentEnd == RGBArr[i] && triggerNextResult) { break; } @@ -1754,14 +1914,13 @@ private void runTest() } if (!testRunning) { break; } Thread.Sleep(200); - results.Add(singleResults); + //results.Add(singleResults); runComplete(); Thread.Sleep(500); currentRun++; singleResults.Clear(); } if (!testRunning) { break; } - processMultipleRuns(); port.Write("X"); Process.Start("explorer.exe", resultsFolderPath); testRunning = false; @@ -1797,319 +1956,30 @@ private void runComplete() } foreach (var res in results[currentRun]) { - csvString.AppendLine(string.Join(strSeparator, res)); - } - File.WriteAllText(filePath, csvString.ToString()); - - decimal gammaFileNumber = 001; - // search /Results folder for existing file names, pick new name - string[] existingGammaFiles = Directory.GetFiles(resultsFolderPath, "*-GAMMA-RAW-OSRTT.csv"); - //search files for number - foreach (var s in existingGammaFiles) - { - decimal num = decimal.Parse(Path.GetFileNameWithoutExtension(s).Remove(3)); - if (num >= gammaFileNumber) - { - gammaFileNumber = num + 1; - } + csvString.AppendLine( + res.StartingRGB + ","+ + res.EndRGB + "," + + res.TimeTaken + "," + + res.SampleCount + "," + + string.Join(strSeparator, res.Samples) + ); } - - /* - string gammaFilePath = resultsFolderPath + "\\" + gammaFileNumber.ToString("000") + "-GAMMA-RAW-OSRTT.csv"; - - StringBuilder gammaCsvString = new StringBuilder(); - foreach (var res in gamma) + if (runSettings != null) { - gammaCsvString.AppendLine(string.Join(strSeparator, res)); + csvString.AppendLine(JsonConvert.SerializeObject(runSettings)); } - File.WriteAllText(gammaFilePath, gammaCsvString.ToString()); - */ + File.WriteAllText(filePath, csvString.ToString()); - bool failed = false; - if (Properties.Settings.Default.saveGraphs) - { - string excelFilePath = resultsFolderPath + "\\" + fileNumber.ToString("000") + "-GRAPH-RAW-OSRTT.xlsm"; - try - { - File.Copy(path + "\\Graph View Template.xlsm", excelFilePath); - } - catch (IOException ioe) - { - if (ioe.StackTrace.Contains("exists")) - { - Console.WriteLine("File exists, skipping writing."); - } - } - catch (Exception ex) - { - showMessageBox(ex.Message + ex.StackTrace, ex.Message, MessageBoxButtons.OK, MessageBoxIcon.Error); - } - graphTemplate = new Excel.Application(); - try - { - graphTemplateWorkbook = graphTemplate.Workbooks.Open(excelFilePath); - } - catch - { - DialogResult d = showMessageBox("Error writing data to XLSX results file, file may be open already. Would you like to try again?", "Unable to Save to XLSX File", MessageBoxButtons.YesNo, MessageBoxIcon.Error); - if (d == DialogResult.Yes) - { - try - { - graphTemplateWorkbook = graphTemplate.Workbooks.Open(excelFilePath); - } - catch (Exception ex) - { - showMessageBox(ex.Message + ex.StackTrace, "Unable to Save to XLSX File", MessageBoxButtons.YesNo, MessageBoxIcon.Error); - failed = true; - } - } - else - { - failed = true; - } - } - if (!failed) - { - Excel._Worksheet graphTempSheet = graphTemplateWorkbook.Sheets[1]; - try - { - //Console.WriteLine("AverageData Count: " + averageData.Count); - for (int p = 0; p < results[currentRun].Count; p++) - { - for (int m = 0; m < results[currentRun][0].Length; m++) - { - //Console.WriteLine("M: " + m + " P: " + p); - graphTempSheet.Cells[p + 2, m + 1] = results[currentRun][p][m]; - } - } - graphTemplateWorkbook.Save(); - } - catch (Exception ex) - { - showMessageBox(ex.Message + ex.StackTrace, "Unable to Save to XLSX File", MessageBoxButtons.YesNo, MessageBoxIcon.Error); - failed = true; - } - GC.Collect(); - GC.WaitForPendingFinalizers(); - Marshal.ReleaseComObject(graphTempSheet); - - } - graphTemplateWorkbook.Close(); - Marshal.ReleaseComObject(graphTemplateWorkbook); - graphTemplate.Quit(); - Marshal.ReleaseComObject(graphTemplate); - if (failed) - { - File.Delete(excelFilePath); - } - } // Process that raw data //processThread = new Thread(new ThreadStart(this.processResponseTimeData)); //processThread.Start(); - processResponseTimeData(); + //processResponseTimeData(); } private void refreshMonitorListBtn_Click(object sender, EventArgs e) { listMonitors(0); } - - private void resultsBtn_Click(object sender, EventArgs e) - { - // Open file picker dialogue - var filePath = string.Empty; - - using (System.Windows.Forms.OpenFileDialog openFileDialog = new System.Windows.Forms.OpenFileDialog()) - { - openFileDialog.InitialDirectory = path; - openFileDialog.Filter = "csv files (*.csv)|*.csv"; - openFileDialog.FilterIndex = 2; - openFileDialog.RestoreDirectory = true; - - if (openFileDialog.ShowDialog() == DialogResult.OK) - { - //Get the path of specified file - filePath = openFileDialog.FileName; - results.Clear(); - gamma.Clear(); - if (filePath.Contains("GAMMA-RAW")) - { - //Read the contents of the file into a stream - try - { - var fileStream = openFileDialog.OpenFile(); - using (StreamReader reader = new StreamReader(fileStream)) - { - while (!reader.EndOfStream) - { - // This can probably be done better - string[] line = reader.ReadLine().Split(','); - int[] intLine = new int[line.Length]; - for (int i = 0; i < line.Length; i++) - { - if (line[i] == "0") - { - intLine[i] = 0; - } - else if (line[i] != "") - { - intLine[i] = int.Parse(line[i]); - } - else - { - continue; - } - } - Array.Resize(ref intLine, intLine.Length - 1); - gamma.Add(intLine); - } - } - resultsFolderPath = filePath.Substring(0, filePath.LastIndexOf('\\')); - // Save Gamma curve to a file too - decimal gammaFileNumber = 001; - // search /Results folder for existing file names, pick new name - string[] existingGammaFiles = Directory.GetFiles(resultsFolderPath, "*-GAMMA-OSRTT.csv"); - // Search \Results folder for existing results to not overwrite existing or have save conflict errors - foreach (var s in existingGammaFiles) - { - decimal num = decimal.Parse(Path.GetFileNameWithoutExtension(s).Remove(3)); - if (num >= gammaFileNumber) - { - gammaFileNumber = num + 1; - } - } - - string gammaFilePath = resultsFolderPath + "\\" + gammaFileNumber.ToString("000") + "-GAMMA-OSRTT.csv"; - StringBuilder gammaCsvString = new StringBuilder(); - gammaCsvString.AppendLine("RGB, Light Reading"); - string strSeparator = ","; - List fullGammaTable = processGammaTable(); - foreach (var res in fullGammaTable) - { - gammaCsvString.AppendLine(string.Join(strSeparator, res)); - } - File.WriteAllText(gammaFilePath, gammaCsvString.ToString()); - Process.Start("explorer.exe", resultsFolderPath); - - } - catch - { - DialogResult d = MessageBox.Show("File may be in use by another program, please make sure it's not open elsewhere and try again.", "Unable to open file", MessageBoxButtons.OK, MessageBoxIcon.Error); - } - } - else if (filePath.Contains("RAW-OSRTT")) - { - //Read the contents of the file into a stream - try - { - List tempRes = new List(); - List tempGamma = new List(); - var fileStream = openFileDialog.OpenFile(); - using (StreamReader reader = new StreamReader(fileStream)) - { - while (!reader.EndOfStream) - { - // This can probably be done better - string[] line = reader.ReadLine().Split(','); - int[] intLine = new int[line.Length]; - for (int i = 0; i < line.Length; i++) - { - if (line[i] == "0") - { - intLine[i] = 0; - } - else if (line[i] != "") - { - intLine[i] = int.Parse(line[i]); - } - else - { - continue; - } - } - Array.Resize(ref intLine, intLine.Length - 1); - if (intLine[0] == 1000) - { - testLatency.AddRange(intLine); - } - else if (intLine[0] == intLine[1]) - { - tempGamma.Add(intLine); - } - else - { - tempRes.Add(intLine); - } - } - } - results.AddRange(new List> { tempRes }); - gamma.AddRange(tempGamma); - resultsFolderPath = filePath.Substring(0, filePath.LastIndexOf('\\')); - //processGammaTable(); - //processThread = new Thread(new ThreadStart(this.processResponseTimeData)); - //processThread.Start(); - processResponseTimeData(); - Process.Start("explorer.exe", resultsFolderPath); - - } - catch - { - DialogResult d = MessageBox.Show("File may be in use by another program, please make sure it's not open elsewhere and try again.", "Unable to open file", MessageBoxButtons.OK, MessageBoxIcon.Error); - } - } - else if (filePath.Contains("LAG-RAW")) - { - //Read the contents of the file into a stream - try - { - var fileStream = openFileDialog.OpenFile(); - using (StreamReader reader = new StreamReader(fileStream)) - { - while (!reader.EndOfStream) - { - // This can probably be done better - string[] line = reader.ReadLine().Split(','); - int[] intLine = new int[line.Length]; - for (int i = 0; i < line.Length; i++) - { - if (line[i] == "0") - { - intLine[i] = 0; - } - else if (line[i] != "") - { - intLine[i] = int.Parse(line[i]); - } - else - { - continue; - } - } - Array.Resize(ref intLine, intLine.Length - 1); - inputLagRawData.Add(intLine); - } - } - resultsFolderPath = filePath.Substring(0, filePath.LastIndexOf('\\')); - - processInputLagData(); - - Process.Start("explorer.exe", resultsFolderPath); - - } - catch - { - DialogResult d = MessageBox.Show("File may be in use by another program, please make sure it's not open elsewhere and try again.", "Unable to open file", MessageBoxButtons.OK, MessageBoxIcon.Error); - } - } - else - { - MessageBox.Show("Sorry, only 'RAW' files can be imported. Please select either a 'RAW-OSRTT.csv' file, or 'INPUT-LAG-RAW.csv' file instead.", "Importer Error", MessageBoxButtons.OK, MessageBoxIcon.Error); - } - } - } - } - private void updateDeviceToolStripMenuItem_Click(object sender, EventArgs e) { compareFirmware(); @@ -2133,1533 +2003,21 @@ private void debugModeToolStripMenuItem_Click(object sender, EventArgs e) debugMode = debugModeToolStripMenuItem.Checked; } - PointF[] InterpolatePoints(PointF[] original, int numberRequired) + private void setRepeats() + { + decimal runs = getRunCount() - 1; + port.Write("M" + runs.ToString()); + } + + public static double GetMedian(double[] sourceNumbers) { - // The new array, ready to return. - PointF[] interpolated = new PointF[numberRequired]; + //Framework 2.0 version of this method. there is an easier way in F4 + if (sourceNumbers == null || sourceNumbers.Length == 0) + throw new System.Exception("Median of empty array not defined."); - // The number of interpolated points in between each pair of existing points. - int between = ((numberRequired - original.Length) / (original.Length - 1)) + 1; - - // Loop through the original list. - int index = 0; - for (int i = 0; i < original.Length - 1; i++) - { - // Add each original point to the interpolated points. - interpolated[index++] = original[i]; - - // The step distances in x and y directions between this original point and the next one. - float stepX = (original[i + 1].X - original[i].X) / ((float)between + 1); - float stepY = (original[i + 1].Y - original[i].Y) / ((float)between + 1); - - // Add the interpolated points at the given steps. - for (int j = 0; j < between; j++) - { - float x = original[i].X + stepX * (float)(j + 1); - float y = original[i].Y + stepY * (float)(j + 1); - - if (index < numberRequired) - { - interpolated[index++] = new PointF(x, y); - } - else - { - break; - } - } - } - return interpolated; - } - - private List processGammaTable() - { - if (gamma.Count == 0) - { - if (!Properties.Settings.Default.SuppressDiagBox) - { - MessageBox.Show("No Gamma data is stored in the program.", "Gamma Table Processing Failed", MessageBoxButtons.OK, MessageBoxIcon.Error); - } - return null; - } - else - { - noiseLevel.Clear(); - double[] rgbVals = new double[gamma.Count]; - double[] lightLevelVals = new double[gamma.Count]; - for (int i = 0; i < gamma.Count; i++) - { - int[] dataLine = gamma[i].Skip(300).ToArray(); - int lineAverage = 0; - for (int j = 0; j < (dataLine.Length - 100); j++) - { - lineAverage += dataLine[j]; - } - noiseLevel.Add(new int[] { gamma[i][0], (dataLine.Max() - dataLine.Min()) }); - lineAverage /= (dataLine.Length - 100); - rgbVals[i] = gamma[i][0]; - lightLevelVals[i] = lineAverage; - } - /*int gSize = tempGamma.Count; - PointF[] points = new PointF[gSize]; - for (int i = 0; i < gSize; i++) - { - points[i] = new PointF { X = tempGamma[i][0], Y = tempGamma[i][1] }; - }; - int numberOfPoints = 256; - PointF[] partGamma = InterpolatePoints(points, numberOfPoints);*/ - int pointsBetween = 51; - if (gamma.Count == 16) - { - pointsBetween = 17; - } - var interpPoints = new ScottPlot.Statistics.Interpolation.NaturalSpline(rgbVals, lightLevelVals, pointsBetween); - List x = new List(); - List y = new List(); - foreach (var p in interpPoints.interpolatedXs) - { - x.Add(Convert.ToInt32(p)); - } - foreach (var p in interpPoints.interpolatedYs) - { - y.Add(Convert.ToInt32(p)); - } - List xy = new List(); - for (int k = 0; k < x.Count; k++) - { - xy.Add(new int[] { x[k], y[k] }); - } - return xy; - } - } - - private void processResponseTimeData() - { - //This is a long one. This is the code that builds the gamma curve, finds the start/end points and calculates response times and overshoot % (gamma corrected) - List processedData = new List(); - - // First, create gamma array from the data - List localGamma = new List(); - List fullGammaTable = new List(); - List smoothedDataTable = new List(); - int noise = 0; - - try //Wrapped whole thing in try just in case - { - if (results[currentRun].Count == 30 || results[currentRun].Count == 110) - { - // CHECK IF GAMMA TABLE IS ALREADY PROCESSED AND IF SO DON'T BOTHER PROCESSING AGAIN + DON'T SAVE MORE THAN ONE GAMMA CSV IF USING A GAMMA-RAW-OSRTT.CSV FILE AS SOURCE (or from test) - if (gamma.Count == 6 || gamma.Count == 16) - { // if using the new test pattern (Constant step of 51) - fullGammaTable.AddRange(processGammaTable()); - } - else - { // if using old test pattern (Steps of 25 or 26) - noiseLevel.Clear(); - int steps = 0; - if (results[currentRun].Count == 30) - { - steps = 9; - } - else - { - steps = 20; - } - for (int i = 0; i < steps; i += 2) - { - int[] resLine = this.results[currentRun][i].Take(250).ToArray(); - int avg = 0; - if (resLine[0] == 0 && localGamma.Count == 0) - { - for (int j = 5; j < 250; j++) - { - avg += resLine[j]; - } - avg = avg / 245; - localGamma.Add(new int[] { resLine[0], avg }); - noiseLevel.Add(new int[] { resLine[1], (resLine.Max() - resLine.Min()) }); - for (int j = resLine.Length - 455; j < resLine.Length - 5; j++) - { - avg += resLine[j]; - } - avg = avg / 450; - localGamma.Add(new int[] { resLine[1], avg }); - } - else - { - for (int j = resLine.Length - 455; j < resLine.Length - 5; j++) - { - avg += resLine[j]; - } - avg = avg / 450; - noiseLevel.Add(new int[] { resLine[1], (resLine.Max() - resLine.Min()) }); - localGamma.Add(new int[] { resLine[1], avg }); - } - } - try - { - // Extrapolate rough values for every RGB value - for (int i = 0; i < localGamma.Count - 1; i++) - { - PointF[] points = new PointF[] - { - new PointF { X = localGamma[i][0], Y = localGamma[i][1]}, - new PointF { X = localGamma[i+1][0], Y = localGamma[i+1][1]} - }; - int numberOfPoints = localGamma[i + 1][0] - localGamma[i][0]; - - PointF[] partGamma = InterpolatePoints(points, numberOfPoints); - foreach (var p in partGamma) - { - int[] tempGamma = { - Convert.ToInt32(p.X), Convert.ToInt32(p.Y) - }; - fullGammaTable.Add(tempGamma); - } - } - if (results[currentRun].Count == 30) - { - fullGammaTable.Add(localGamma[5]); - } - else - { - fullGammaTable.Add(localGamma[10]); - } - } - catch (Exception ex) - { - if (ex.Message.Contains("Arithmetic")) - { - showMessageBox("Error: Results data may be incomplete or out of order. Please check the file or results and reimport.", "Unable to Process", MessageBoxButtons.OK, MessageBoxIcon.Error); - SetText(ex.Message + ex.StackTrace); - } - else - { - SetText(ex.Message + ex.StackTrace); - } - } - } - - int startDelay = 150; - if (testLatency.Count != 0) - { - int[] tl = testLatency.Skip(5).ToArray(); - for (int n = 0; n < tl.Length; n++) - { - if (tl[n] > 8000) - { - if (n <= 150 && n > 30) - { - startDelay = n - 30; - } - else if (n < 30) - { - n /= 2; - startDelay = n; - } - else if (n > 400) - { - startDelay = 250; - } - break; - } - } - } - - // Then process the lines - foreach (int[] item in this.results[currentRun]) - { - // Save start, end, time and sample count then clear the values from the array - int StartingRGB = item[0]; - int EndRGB = item[1]; - int TimeTaken = item[2]; - int SampleCount = item[3]; - int[] samples = item.Skip(4).ToArray(); - - double SampleTime = ((double)TimeTaken / (double)SampleCount); // Get the time taken between samples - - // Clean up noisy data using moving average function - int period = 10; - foreach (var n in noiseLevel) - { - if (n[0] == StartingRGB || n[0] == EndRGB) - { - noise = n[1]; - break; - } - } - if (noise < 250) - { - period = 20; - } - else if (noise < 500) - { - period = 30; - } - else if (noise < 750) - { - period = 40; - } - else - { - period = 50; - } - int[] buffer = new int[period]; - int[] averagedSamples = new int[samples.Length]; - int current_index = 0; - for (int a = 0; a < samples.Length; a++) - { - buffer[current_index] = samples[a] / period; - int movAvg = 0; - for (int b = 0; b < period; b++) - { - movAvg += buffer[b]; - } - averagedSamples[a] = movAvg; - current_index = (current_index + 1) % period; - } - - samples = averagedSamples.Skip(period).ToArray(); //Moving average spoils the first 10 samples so currently removing them. - - List fullSmoothedLine = new List { StartingRGB, EndRGB, TimeTaken, SampleCount }; - fullSmoothedLine.AddRange(samples); - smoothedDataTable.Add(fullSmoothedLine.ToArray()); - - int maxValue = samples.Max(); // Find the maximum value for overshoot - int minValue = samples.Min(); // Find the minimum value for undershoot - // Initialise in-use variables - int transStart = 0; - int transEnd = 0; - int initialTransStart = 0; - int initialTransEnd = 0; - int perceivedTransStart = 0; - int perceivedTransEnd = 0; - - double overUnderRGB = 0.0; - - int startMax = samples[5]; // Initialise these variables with a real value - int startMin = samples[5]; // Initialise these variables with a real value - int endMax = samples[samples.Length - 10]; // Initialise these variables with a real value - int endMin = samples[samples.Length - 10]; // Initialise these variables with a real value - - // Build start min/max to compare against - for (int l = 0; l < startDelay; l++) //CHANGE TO 180 FOR RUN 2 DATA - { - if (samples[l] < startMin) - { - startMin = samples[l]; - } - else if (samples[l] > startMax) - { - startMax = samples[l]; - } - } - - // Build end min/max to compare against - for (int m = samples.Length - 5; m > samples.Length - 150; m--) - { - if (samples[m] < endMin) - { - endMin = samples[m]; - } - else if (samples[m] > endMax) - { - endMax = samples[m]; - } - } - - // Search for where the result starts transitioning - start is almost always less sensitive - for (int j = 0; j < samples.Length; j++) - { - if (StartingRGB < EndRGB) - { - if (samples[j] > (startMax)) - { - if (StartingRGB == 0 && EndRGB == 26) - { - if ((samples[j + 50] > (samples[j] + 25) || samples[j + 56] > (samples[j] + 25)) - && (samples[j + 100] > (samples[j] + 50) || samples[j + 106] > (samples[j] + 50)) - && (samples[j + 125] > (samples[j] + 75) || samples[j + 131] > (samples[j] + 75)) - && (samples[j + 150] > (samples[j] + 100) || samples[j + 156] > (samples[j] + 100))) // check the trigger point is actually the trigger and not noise - { - transStart = j; - break; - } - else - { - if (samples[j] > startMax) - { - startMax = samples[j]; - } - } - } - else - { - if ((samples[j + 50] > (samples[j] + 50) || samples[j + 56] > (samples[j] + 50)) - && (samples[j + 100] > (samples[j] + 100) || samples[j + 106] > (samples[j] + 100)) - && (samples[j + 125] > (samples[j] + 100) || samples[j + 131] > (samples[j] + 100)) - && (samples[j + 150] > (samples[j] + 100) || samples[j + 156] > (samples[j] + 100))) // check the trigger point is actually the trigger and not noise - { - transStart = j; - break; - } - else - { - if (samples[j] > startMax) - { - startMax = samples[j]; - } - } - } - } - } - else - { - if (samples[j] < (startMin)) - { - if (StartingRGB == 26 && EndRGB == 0) - { - if ((samples[j + 50] < (samples[j] - 25) || samples[j + 56] < (samples[j] - 25)) - && (samples[j + 100] < (samples[j] - 50) || samples[j + 106] < (samples[j] - 50)) - && (samples[j + 125] < (samples[j] - 75) || samples[j + 131] < (samples[j] - 75)) - && (samples[j + 150] < (samples[j] - 100) || samples[j + 156] < (samples[j] - 100))) // check the trigger point is actually the trigger and not noise - { - transStart = j; - break; - } - else - { - if (samples[j] < startMin) - { - startMin = samples[j]; - } - } - } - else - { - if ((samples[j + 50] < (samples[j] - 50) || samples[j + 56] < (samples[j] - 50)) - && (samples[j + 100] < (samples[j] - 100) || samples[j + 106] < (samples[j] - 100)) - && (samples[j + 125] < (samples[j] - 100) || samples[j + 131] < (samples[j] - 100)) - && (samples[j + 150] < (samples[j] - 100) || samples[j + 156] < (samples[j] - 100))) // check the trigger point is actually the trigger and not noise - { - transStart = j; - break; - } - else - { - if (samples[j] < startMin) - { - startMin = samples[j]; - } - } - } - } - } - } - - // Search for where the result stops transitioning (from the end) - end position is almost always more sensitive hence lower values - also must account for over/undershoot - for (int j = samples.Length - 1; j > 0; j--) - { - if (StartingRGB < EndRGB) - { - if (maxValue > (endMax + 100)) //Check for overshoot - { - if (samples[j] > endMax) - { - if (samples[j - 100] > (samples[j] + 50) && samples[j - 125] > (samples[j] + 50)) // check the trigger point is actually the trigger and not noise - { - transEnd = j; - break; - } - else - { - if (samples[j] > endMax) - { - endMax = samples[j]; - } - } - } - } - else - { - if (samples[j] <= (endMin + 20)) //Check for regular finish point - { - if (StartingRGB == 0 && EndRGB == 26) - { - if ((samples[j - 100] < (samples[j] - 25) || samples[j - 106] < (samples[j] - 25)) - && (samples[j - 125] < (samples[j] - 50) || samples[j - 131] < (samples[j] - 50)) - && (samples[j - 150] < (samples[j] - 75) || samples[j - 156] < (samples[j] - 75))) // check the trigger point is actually the trigger and not noise - { - transEnd = j; - break; - } - else - { - if (samples[j] < endMin) - { - endMin = samples[j]; - } - } - } - else - { - if ((samples[j - 100] < (samples[j] - 50) || samples[j - 106] < (samples[j] - 50)) - && (samples[j - 125] < (samples[j] - 75) || samples[j - 131] < (samples[j] - 75)) - && (samples[j - 150] < (samples[j] - 100) || samples[j - 156] < (samples[j] - 100))) // check the trigger point is actually the trigger and not noise - { - transEnd = j; - break; - } - else - { - if (samples[j] < endMin) - { - endMin = samples[j]; - } - } - } - } - } - } - else - { - if (minValue < (endMin - 100)) //Check for undershoot - { - if (samples[j] < endMin) //Check for under-shot finish point - { - if (samples[j - 100] < (samples[j] - 50) && samples[j - 125] < (samples[j] - 50)) // check the trigger point is actually the trigger and not noise - { - transEnd = j; - break; - } - else - { - if (samples[j] < endMin) - { - endMin = samples[j]; - } - } - } - } - else - { - if (samples[j] > endMax) //Check for regular finish point - { - if (StartingRGB == 26 && EndRGB == 0) - { - if ((samples[j - 100] > (samples[j] + 25) || samples[j - 106] > (samples[j] + 25)) - && (samples[j - 125] > (samples[j] + 50) || samples[j - 131] > (samples[j] + 50)) - && (samples[j - 150] > (samples[j] + 75) || samples[j - 156] > (samples[j] + 75))) - { - transEnd = j; - break; - } - else - { - if (samples[j] > endMax) - { - endMax = samples[j]; - } - } - } - else - { - if ((samples[j - 100] > (samples[j] + 50) || samples[j - 106] > (samples[j] + 50)) - && (samples[j - 125] > (samples[j] + 75) || samples[j - 131] > (samples[j] + 75)) - && (samples[j - 150] > (samples[j] + 100) || samples[j - 156] > (samples[j] + 100))) - { - transEnd = j; - break; - } - else - { - if (samples[j] > endMax) - { - endMax = samples[j]; - } - } - } - } - } - } - } - double startAverage = 0; - double endAverage = 0; - int avgStart = transStart - 200; - int avgEnd = transEnd + 400; - if (transStart < 200) - { - int t = transStart / 5; - avgStart = transStart - t; - } - if ((samples.Length - transEnd) < 400) - { - int t = (samples.Length - transEnd) / 5; - avgEnd = transEnd + t; - } - for (int q = 0; q < avgStart; q++) - { - startAverage += samples[q]; - } - startAverage /= avgStart; - startAverage = Math.Round(startAverage, 0); - for (int q = avgEnd; q < samples.Length; q++) - { - endAverage += samples[q]; - } - endAverage /= (samples.Length - avgEnd); - endAverage = Math.Round(endAverage, 0); - int arrSize = (transEnd - transStart + 100); - if (samples.Length < (transEnd + 100)) - { - arrSize = samples.Length - transStart; - } - if (arrSize < 110) - { - arrSize = 200; - } - int[] transitionSamples = new int[arrSize]; - // Getting min/max from INSIDE the transition window - if ((transEnd - transStart) != 0) - { - Array.Copy(samples, transStart, transitionSamples, 0, arrSize); - maxValue = transitionSamples.Max(); - minValue = transitionSamples.Min(); - } - - /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - // Overshoot calculations - double overshootPercent = 0; - double overshootRGBDiff = 0; - double peakValue = 0; - if (StartingRGB < EndRGB) - { - peakValue = maxValue; - // Dark to light transition - if (maxValue > (endAverage + 100) && maxValue > (fullGammaTable[EndRGB][1] + 100)) - { - // undershoot may have occurred - Console.WriteLine("Overshoot found"); - // convert maxValue to RGB using gamma table - for (int i = 0; i < fullGammaTable.Count; i++) - { - // Find what RGB value matches or exceeds the peak light reading for this run - if (maxValue <= fullGammaTable[i][1]) - { - // Check if peak light reading is closer to upper or lower bound value - int diff1 = fullGammaTable[i][1] - maxValue; - int diff2 = maxValue - fullGammaTable[i - 1][1]; - if (diff1 < diff2) - { - overUnderRGB = fullGammaTable[i][0]; - } - else - { - overUnderRGB = fullGammaTable[i - 1][0]; - } - break; - } - else if (maxValue > fullGammaTable.Last()[1]) - { - if (maxValue > 65500) - { - overUnderRGB = 260; - break; - } - else - { - overUnderRGB = 256; - break; - } - } - } - if (overUnderRGB == -1) - { - //overshootPercent = 100; - } - else - { - overshootRGBDiff = overUnderRGB - EndRGB; - double os = 0; - if (endValueToolStripMenuItem.Checked) - { - os = (overUnderRGB - EndRGB) / EndRGB; - } - else - { - double range = EndRGB - StartingRGB; - os = overshootRGBDiff / range; - } - os *= 100; - overshootPercent = Math.Round(os, 1); - } - } - } - else - { - peakValue = minValue; - // Light to dark transistion - if (minValue < (endAverage - 100) && minValue < (fullGammaTable[EndRGB][1] - 100)) - { - // overshoot may have occurred - // convert minValue to RGB using gamma table - Console.WriteLine("Undershoot found"); - for (int i = 0; i < fullGammaTable.Count; i++) - { - // Find what RGB value matches or exceeds the peak light reading for this run - if (minValue <= fullGammaTable[i][1]) - { - if (i == 0) - { - overUnderRGB = 0; - break; - } - else - { - // Check if peak light reading is closer to upper or lower bound value - int diff1 = fullGammaTable[i][1] - minValue; - int diff2 = minValue - fullGammaTable[i - 1][1]; - if (diff1 < diff2) - { - overUnderRGB = fullGammaTable[i][0]; - } - else - { - overUnderRGB = fullGammaTable[i - 1][0]; - } - break; - } - } - } - overshootRGBDiff = EndRGB - overUnderRGB; - double os = 0; - if (endValueToolStripMenuItem.Checked) - { - os = (EndRGB - overUnderRGB) / EndRGB; - } - else - { - double range = StartingRGB - EndRGB; - os = overshootRGBDiff / range; - } - // os *= -1; - os *= 100; - overshootPercent = Math.Round(os, 1); - if (overshootPercent != 0 && overshootPercent < 1) - { - overshootPercent = 0; - } - } - } - - /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - // INITIAL AND PERCEIVED RESPONSE TIME MEASUREMENTS - if (StartingRGB < EndRGB) - { - // Setup variables for start/end trigger points - double start3 = 0; - double endOffsetRGB = 0; - double end3 = 0; - double endPer3 = 0; - double RGBTolerance = 5; - if ((Properties.Settings.Default.threePercentSetting || Properties.Settings.Default.tenPercentSetting) && !Properties.Settings.Default.gammaCorrRT) - { - double tol = 0; - if (Properties.Settings.Default.threePercentSetting) - { tol = 0.03; } - else - { tol = 0.1; } - double range3 = (endAverage - startAverage) * tol; // Subtract low value from high value to get light level range - start3 = startAverage + range3; // Start trigger value - end3 = endAverage - range3; - if (peakValue > (endAverage + range3)) - { endPer3 = endAverage + range3; } // End trigger value - else - { endPer3 = endAverage - range3; } // End trigger value - } - else - { - if (Properties.Settings.Default.RGB5Offset) - { RGBTolerance = 5; } - else if (Properties.Settings.Default.RGB10Offset) - { RGBTolerance = 10; } - else if (Properties.Settings.Default.threePercentSetting) - { - RGBTolerance = (EndRGB - StartingRGB) * 0.03; - RGBTolerance = Math.Round(RGBTolerance, 0); - } - else if (Properties.Settings.Default.tenPercentSetting) - { - RGBTolerance = (EndRGB - StartingRGB) * 0.1; - RGBTolerance = Math.Round(RGBTolerance, 0); - } - endOffsetRGB = EndRGB - RGBTolerance; - start3 = fullGammaTable[Convert.ToInt32(StartingRGB + RGBTolerance)][1]; - end3 = fullGammaTable[Convert.ToInt32(EndRGB - RGBTolerance)][1]; - if (overUnderRGB > (EndRGB + RGBTolerance) && overUnderRGB != 0) - { endOffsetRGB = EndRGB + RGBTolerance; } - else if (overUnderRGB == -1) - { endOffsetRGB = EndRGB; } - endPer3 = fullGammaTable[Convert.ToInt32(endOffsetRGB)][1]; - if (overUnderRGB == -1) - { endPer3 *= 1.02; } - - } - if (endPer3 >= 65520) - { endPer3 = 65500; } - - // Actually find the start/end points - for (int j = (transStart - 20); j < (transEnd + 20); j++) // search samples for start & end trigger points - { - if (samples[j] >= start3 && initialTransStart == 0) // save the FIRST time value exceeds start trigger - { - if ((samples[j + 50] > (start3 + 25) || samples[j + 60] > (start3 + 25)) - && (samples[j + 100] > (start3 + 50) || samples[j + 110] > (start3 + 50)) - && (samples[j + 150] > (start3 + 75) || samples[j + 160] > (start3 + 75))) - { - initialTransStart = j; - perceivedTransStart = j; - } - else if (j == transEnd) - { - initialTransStart = transStart; - perceivedTransStart = transStart; - } - } - else if (samples[j] >= end3) // Save when value exceeds end trigger then break. - { - if ((samples[j + 20] > (end3 + 25) || samples[j + 25] > (end3 + 25)) - && (samples[j + 30] > (end3 + 50) || samples[j + 35] > (end3 + 50)) - && (samples[j + 50] > (end3 + 75) || samples[j + 55] > (end3 + 75))) - { - initialTransEnd = j; - break; - } - else if (j == transEnd) - { - initialTransEnd = transEnd; - break; - } - } - else if (j == transEnd) - { - initialTransEnd = transEnd; - break; - } - } - for (int j = (transEnd + 20); j > (transStart - 20); j--) // search samples for end point - { - if (endOffsetRGB > EndRGB || overUnderRGB == -1 || (endOffsetRGB == 0 && endPer3 > endAverage && overshootPercent > 1)) // Including overshoot in the curve - { - if (samples[j] >= endPer3) // add the same sort of more detailed check like complete for finding this - { - if ((samples[j - 25] > (endPer3 + 25) || samples[j - 30] > (endPer3 + 25)) - && (samples[j - 35] > (endPer3 + 50) || samples[j - 40] > (endPer3 + 50))) - { - perceivedTransEnd = j; - break; - } - } - else if (j == transStart) - { - perceivedTransEnd = j; - break; - } - } - else // No overshoot found within RGB tolerance - { - if (samples[j] <= endPer3) - { - if ((samples[j - 50] < (endPer3 - 25) || samples[j - 60] < (endPer3 - 25)) - && (samples[j - 100] < (endPer3 - 50) || samples[j - 110] < (endPer3 - 50)) - && (samples[j - 150] < (endPer3 - 75) || samples[j - 160] < (endPer3 - 75))) - { - perceivedTransEnd = j; - break; - } - } - else if (j == transStart) - { - perceivedTransEnd = j; - break; - } - } - } - if (perceivedTransEnd < initialTransEnd) - { // just in case the two methods differ slightly and perceived would come out as shorter. - perceivedTransEnd = initialTransEnd; - } - } - else - { - // Setup variables for start/end trigger points - double start3 = 0; - double endOffsetRGB = 0; - double end3 = 0; - double endPer3 = 0; - double RGBTolerance = 5; - if ((Properties.Settings.Default.threePercentSetting || Properties.Settings.Default.tenPercentSetting) && !Properties.Settings.Default.gammaCorrRT) - { - double tol = 0; - if (Properties.Settings.Default.threePercentSetting) - { tol = 0.03; } - else - { tol = 0.1; } - double range3 = (startAverage - endAverage) * tol; // Subtract low value from high value to get light level range - start3 = startAverage - range3; // Start trigger value - end3 = endAverage + range3; - if (peakValue < (endAverage - range3)) - { endPer3 = endAverage - range3; } // End trigger value - else - { endPer3 = endAverage + range3; } // End trigger value - } - else - { - if (Properties.Settings.Default.RGB5Offset) - { RGBTolerance = 5; } - else if (Properties.Settings.Default.RGB10Offset) - { RGBTolerance = 10; } - else if (Properties.Settings.Default.threePercentSetting) - { - RGBTolerance = (StartingRGB - EndRGB) * 0.03; - RGBTolerance = Math.Round(RGBTolerance, 0); - } - else if (Properties.Settings.Default.tenPercentSetting) - { - RGBTolerance = (StartingRGB - EndRGB) * 0.1; - RGBTolerance = Math.Round(RGBTolerance, 0); - } - endOffsetRGB = EndRGB + RGBTolerance; - start3 = fullGammaTable[Convert.ToInt32(StartingRGB - RGBTolerance)][1]; - end3 = fullGammaTable[Convert.ToInt32(EndRGB + RGBTolerance)][1]; - if (overUnderRGB < (EndRGB - RGBTolerance) && overUnderRGB != 0) - { - endOffsetRGB = EndRGB - RGBTolerance; - } - endPer3 = fullGammaTable[Convert.ToInt32(endOffsetRGB)][1]; - } - - for (int j = (transStart - 20); j < (transEnd + 20); j++) // search samples for start point - { - if (samples[j] <= start3 && initialTransStart == 0) // save the FIRST time value exceeds start trigger - { - if ((samples[j + 50] < (start3 - 25) || samples[j + 60] < (start3 - 25)) - && (samples[j + 100] < (start3 - 50) || samples[j + 110] < (start3 - 50)) - && (samples[j + 150] < (start3 - 75) || samples[j + 160] < (start3 - 75))) - { - initialTransStart = j; - perceivedTransStart = j; - } - else if (j == transEnd) - { - initialTransStart = transStart; - perceivedTransStart = transStart; - } - } - else if (samples[j] <= end3) // Save when value exceeds end trigger then break. - { - if ((samples[j + 50] < (end3 - 25) || samples[j + 60] < (end3 - 25)) - && (samples[j + 100] < (end3 - 50) || samples[j + 110] < (end3 - 50)) - && (samples[j + 150] < (end3 - 75) || samples[j + 160] < (end3 - 75))) - { - initialTransEnd = j; - break; - } - else if (j == transEnd) - { - initialTransEnd = transEnd; - break; - } - } - else if (j == transEnd) - { - initialTransEnd = transEnd; - break; - } - } - for (int j = (transEnd + 20); j > (transStart - 20); j--) // search samples for end point - { - if ((endOffsetRGB < EndRGB && endOffsetRGB != 0) || (endPer3 < endAverage && endOffsetRGB == 0 && overshootPercent > 1)) // Including undershoot in the curve - { - if (samples[j] <= endPer3) - { - if ((samples[j - 20] < (endPer3 - 25) || samples[j - 25] < (endPer3 - 25)) - && (samples[j - 30] < (endPer3 - 50) || samples[j - 35] < (endPer3 - 50))) - { - perceivedTransEnd = j; - break; - } - } - else if (j == transStart) - { - perceivedTransEnd = j; - break; - } - } - else // No overshoot found within RGB tolerance - { - if (samples[j] >= endPer3) - { - - if ((samples[j - 50] > (endPer3 + 25) || samples[j - 60] > (endPer3 + 25)) - && (samples[j - 100] > (endPer3 + 50) || samples[j - 110] > (endPer3 + 50)) - && (samples[j - 150] > (endPer3 + 75) || samples[j - 160] > (endPer3 + 75))) - { - perceivedTransEnd = j; - break; - } - } - else if (j == transStart) - { - perceivedTransEnd = j; - break; - } - } - } - if (perceivedTransEnd < initialTransEnd) - { // just in case the two methods differ slightly and perceived would come out as shorter. - perceivedTransEnd = initialTransEnd; - } - } - - double transCount = transEnd - transStart; - double transTime = (transCount * SampleTime) / 1000; - - double initialTransCount = initialTransEnd - initialTransStart; - double initialTransTime = (initialTransCount * SampleTime) / 1000; - - double perceivedTransCount = perceivedTransEnd - perceivedTransStart; - double perceivedTransTime = (perceivedTransCount * SampleTime) / 1000; - - double inputLagTime = (transStart * SampleTime) / 1000; - - double responseTime = Math.Round(transTime, 1); - double initialResponseTime = Math.Round(initialTransTime, 1); - double perceivedResponseTime = Math.Round(perceivedTransTime, 1); - - double visualResponseRating = 100 - (initialResponseTime + perceivedResponseTime); - - double inputLag = Math.Round(inputLagTime, 1); - - if (verboseOutputToolStripMenuItem.Checked) - { - // Verbose output with ALLLL the data - double[] completeResult = new double[] { StartingRGB, EndRGB, responseTime, initialResponseTime, perceivedResponseTime, overshootPercent, visualResponseRating, inputLag, transStart, transEnd, SampleTime, endAverage, peakValue, overUnderRGB }; - processedData.Add(completeResult); - } - else if (!percentageToolStripMenuItem.Checked && gammaCorrectedToolStripMenuItem.Checked) - { - // Standard output with total transition time & gamma corrected overshoot value - if (overUnderRGB == -1) - { - overshootRGBDiff = 100; - } - double[] completeResult = new double[] { StartingRGB, EndRGB, responseTime, initialResponseTime, perceivedResponseTime, overshootRGBDiff, visualResponseRating, inputLag }; - processedData.Add(completeResult); - } - else if (!gammaCorrectedToolStripMenuItem.Checked && percentageToolStripMenuItem.Checked) - { - // Standard output with total transition time & overshoot light level percentage - double os = 0; - if (endValueToolStripMenuItem.Checked) - { - if (StartingRGB < EndRGB) - { - if (peakValue > (endAverage + 100)) - { - os = (peakValue - endAverage) / endAverage; - os *= 100; - os = Math.Round(os, 1); - } - } - else - { - if (peakValue < (endAverage - 100)) - { - os = (endAverage - peakValue) / endAverage; - // os *= -1; - os *= 100; - os = Math.Round(os, 1); - } - } - } - else - { - if (StartingRGB < EndRGB) - { - if (peakValue > (endAverage + 100)) - { - double range = endAverage - startAverage; - double peakRange = peakValue - endAverage; - os = peakRange / range; - os *= 100; - os = Math.Round(os, 1); - } - } - else - { - if (peakValue < (endAverage - 100)) - { - double range = startAverage - endAverage; - double peakRange = endAverage - peakValue; - os = peakRange / range; - // os *= -1; - os *= 100; - os = Math.Round(os, 1); - } - } - } - double[] completeResult = new double[] { StartingRGB, EndRGB, responseTime, initialResponseTime, perceivedResponseTime, os, visualResponseRating, inputLag }; - processedData.Add(completeResult); - } - else - { - // Standard output with total transition time & gamma corrected overshoot percentage - double[] completeResult = new double[] { StartingRGB, EndRGB, responseTime, initialResponseTime, perceivedResponseTime, overshootPercent, visualResponseRating, inputLag }; - processedData.Add(completeResult); - } - - } - List temp = new List(); //probably not needed now processedData is a local variable - temp.AddRange(processedData); - multipleRunData.Add(temp); - - // Write results to csv using new name - decimal fileNumber = 001; - // search /Results folder for existing file names, pick new name - string[] existingFiles = Directory.GetFiles(resultsFolderPath, "*-FULL-OSRTT.csv"); - // Search \Results folder for existing results to not overwrite existing or have save conflict errors - foreach (var s in existingFiles) - { - decimal num = 0; - try - { num = decimal.Parse(Path.GetFileNameWithoutExtension(s).Remove(3)); } - catch - { Console.WriteLine("Non-standard file name found"); } - if (num >= fileNumber) - { - fileNumber = num + 1; - } - } - - string filePath = resultsFolderPath + "\\" + fileNumber.ToString("000") + "-FULL-OSRTT.csv"; - - string strSeparator = ","; - StringBuilder csvString = new StringBuilder(); - string rtType = "Initial Response Time - 3% (ms)"; - string osType = "Overshoot"; - string osSign = "(%)"; - string perType = "Perceived Response Time - 3% (ms)"; - if (tenPercentMenuItem.Checked) - { - rtType = "Initial Response Time - 10% (ms)"; - perType = "Perceived Response Time - 10% (ms)"; - } - else if (fixedRGB10OffsetToolStripMenuItem.Checked) - { - rtType = "Initial Response Time - RGB10 (ms)"; - perType = "Perceived Response Time - RGB10 (ms)"; - } - else if (fixedRGB5OffsetToolStripMenuItem.Checked) - { - rtType = "Initial Response Time - RGB5 (ms)"; - perType = "Perceived Response Time - RGB5 (ms)"; - } - if (gammaCorrectedToolStripMenuItem.Checked) - { - osSign = "(RGB)"; - } - if (gammaCorrectedToolStripMenuItem.Checked && percentageToolStripMenuItem.Checked) - { - osSign = "(RGB %)"; - } - if (verboseOutputToolStripMenuItem.Checked) - { - csvString.AppendLine("Starting RGB,End RGB,Complete Response Time (ms)," + rtType + "," + perType + "," + osType + " " + osSign + ",Visual Response Rating,Input Lag (ms),Transition Start Position,Transition End Position,Sampling Time (ms),End Light Level,Min/Max Light Level,Overshoot/Undershoot RGB Value"); - } - else - { - csvString.AppendLine("Starting RGB,End RGB,Complete Response Time (ms)," + rtType + "," + perType + "," + osType + " " + osSign + ",Visual Response Rating,Input Lag (ms)"); - } - foreach (var res in processedData) - { - csvString.AppendLine(string.Join(strSeparator, res)); - } - Console.WriteLine(filePath); - File.WriteAllText(filePath, csvString.ToString()); - - if (saveGammaTableToolStripMenuItem.Checked) - { - // Save Gamma curve to a file too - decimal gammaFileNumber = 001; - // search /Results folder for existing file names, pick new name - string[] existingGammaFiles = Directory.GetFiles(resultsFolderPath, "*-GAMMA-OSRTT.csv"); - // Search \Results folder for existing results to not overwrite existing or have save conflict errors - foreach (var s in existingGammaFiles) - { - decimal num = decimal.Parse(Path.GetFileNameWithoutExtension(s).Remove(3)); - if (num >= gammaFileNumber) - { - gammaFileNumber = num + 1; - } - } - - string gammaFilePath = resultsFolderPath + "\\" + gammaFileNumber.ToString("000") + "-GAMMA-OSRTT.csv"; - StringBuilder gammaCsvString = new StringBuilder(); - gammaCsvString.AppendLine("RGB, Light Reading"); - foreach (var res in fullGammaTable) - { - gammaCsvString.AppendLine(string.Join(strSeparator, res)); - } - File.WriteAllText(gammaFilePath, gammaCsvString.ToString()); - } - if (saveSmoothedDataToolStripMenuItem.Checked) - { - //Save Smoothed Data To File - decimal smoothedFileNumber = 001; - // search /Results folder for existing file names, pick new name - string[] existingSmoothedFiles = Directory.GetFiles(resultsFolderPath, "*-CLEAN-OSRTT.csv"); - // Search \Results folder for existing results to not overwrite existing or have save conflict errors - foreach (var s in existingSmoothedFiles) - { - decimal num = decimal.Parse(Path.GetFileNameWithoutExtension(s).Remove(3)); - if (num >= smoothedFileNumber) - { - smoothedFileNumber = num + 1; - } - } - - string smoothedFilePath = resultsFolderPath + "\\" + smoothedFileNumber.ToString("000") + "-CLEAN-OSRTT.csv"; - StringBuilder smoothedCsvString = new StringBuilder(); - foreach (var res in smoothedDataTable) - { - smoothedCsvString.AppendLine(string.Join(strSeparator, res)); - } - File.WriteAllText(smoothedFilePath, smoothedCsvString.ToString()); - } - } - else - { - showMessageBox("Error: The program doesn't have a full list of results available to process. " + - "Please check the RAW files and analyse the results again.","Incomplete Results List",MessageBoxButtons.OK,MessageBoxIcon.Error); - } - } - catch (Exception procEx) - { - Console.WriteLine(procEx.Message + procEx.StackTrace); - processingFailed = true; - if (port != null) - { - if (port.IsOpen) - { - port.Write("X"); - showMessageBox("One or more set of results failed to process and won't be included in the multi-run averaging. \n " + - "Brightness may be too high or monitor may be strobing it's backlight. \n" + - "Try calibrating the brightness again, or use the Graph View Template to view the raw data.", "Processing Failed", MessageBoxButtons.OK, MessageBoxIcon.Error); - processingFailed = false; - } - } - } - } - - private void setRepeats() - { - decimal runs = getRunCount() - 1; - port.Write("M" + runs.ToString()); - } - - private void processMultipleRuns() - { - if (multipleRunData.Count == 0) - { - showMessageBox("No results are currently stored in the application. " + - "\n \n If you tried importing a folder, please try again ensuring the folder contains \"RAW-OSRTT.csv\" files." + - "\n \n If you ran a test and are seeing this, that means the program was not able to process the raw data. This may be due to too much noise or incorrect monitor settings. " + - "You can try importing any \"RAW-OSRTT.csv\" files it saved, or run the test again.", "No Results Found", MessageBoxButtons.OK, MessageBoxIcon.Error); - } - else - { - try - { - // Fill processed data with the first set of results then average from there - int resultCount = multipleRunData[0].Count(); - - List averageData = new List(); - for (int p = 0; p < resultCount; p++) - { - double[] row = { multipleRunData[0][p][0], multipleRunData[0][p][1], 0, 0, 0, 0, 0, 0 }; - averageData.Add(row); - } - - // Average the data, excluding outliers - for (int k = 0 ; k < resultCount; k++) - { - List rTLine = new List(); - List initRTLine = new List(); - List perRTLine = new List(); - List oSLine = new List(); - List vrrLine = new List(); - List iLLine = new List(); - foreach (var list in multipleRunData) - { - rTLine.Add(list[k][2]); - initRTLine.Add(list[k][3]); - perRTLine.Add(list[k][4]); - oSLine.Add(list[k][5]); - vrrLine.Add(list[k][6]); - iLLine.Add(list[k][7]); - } - double rtMedian = GetMedian(rTLine.ToArray()); - double initRtMedian = GetMedian(initRTLine.ToArray()); - double perRtMedian = GetMedian(perRTLine.ToArray()); - double osMedian = GetMedian(oSLine.ToArray()); - double vrrMedian = GetMedian(vrrLine.ToArray()); - double ilMedian = GetMedian(iLLine.ToArray()); - int validTimeResults = 0; - int validInitialTimeResults = 0; - int validPerceivedTimeResults = 0; - int validOvershootResults = 0; - int validVRRResults = 0; - int validILResults = 0; - foreach (var o in multipleRunData) - { - if (o[k][2] < (rtMedian * 1.2) && o[k][2] > (rtMedian * 0.8)) - { - averageData[k][2] += o[k][2]; - validTimeResults++; - } - if (o[k][3] < (initRtMedian * 1.2) && o[k][3] > (initRtMedian * 0.8)) - { - averageData[k][3] += o[k][3]; - validInitialTimeResults++; - } - if (o[k][4] < (perRtMedian * 1.2) && o[k][4] > (perRtMedian * 0.8)) - { - averageData[k][4] += o[k][4]; - validPerceivedTimeResults++; - } - if (o[k][5] < (osMedian * 1.2) && o[k][5] > (osMedian * 0.8) && o[k][5] != 0) - { - averageData[k][5] += o[k][5]; - validOvershootResults++; - } - if (o[k][6] < (vrrMedian * 1.2) && o[k][6] > (vrrMedian * 0.8)) - { - averageData[k][6] += o[k][6]; - validVRRResults++; - } - if (o[k][7] < (ilMedian * 1.2) && o[k][7] > (ilMedian * 0.8)) - { - averageData[k][7] += o[k][7]; - validILResults++; - } - } - averageData[k][2] = averageData[k][2] / validTimeResults; - averageData[k][2] = Math.Round(averageData[k][2], 1); - averageData[k][3] = averageData[k][3] / validInitialTimeResults; - averageData[k][3] = Math.Round(averageData[k][3], 1); - averageData[k][4] = averageData[k][4] / validPerceivedTimeResults; - averageData[k][4] = Math.Round(averageData[k][4], 1); - if (averageData[k][5] != 0) - { - averageData[k][5] = averageData[k][5] / validOvershootResults; - if (gammaCorrectedToolStripMenuItem.Checked && !percentageToolStripMenuItem.Checked) - { - averageData[k][5] = Math.Round(averageData[k][5], 0); - } - else - { - averageData[k][5] = Math.Round(averageData[k][5], 1); - } - } - averageData[k][6] = averageData[k][6] / validVRRResults; - averageData[k][6] = Math.Round(averageData[k][6], 1); - averageData[k][7] = averageData[k][7] / validILResults; - averageData[k][7] = Math.Round(averageData[k][7], 1); - } - - // Output averaged results to file using folder name/monitor info - string[] folders = resultsFolderPath.Split('\\'); - string monitorInfo = folders.Last(); - //monitorInfo = monitorInfo.Remove(0, 4); - string filePath = resultsFolderPath + "\\" + monitorInfo + "-FINAL-DATA-OSRTT.csv"; - string excelFilePath = resultsFolderPath + "\\" + monitorInfo + "-FINAL-DATA-OSRTT.xlsx"; - string strSeparator = ","; - StringBuilder csvString = new StringBuilder(); - string rtType = "Initial Response Time - 3% (ms)"; - string osType = "Overshoot"; - string osSign = "(%)"; - string perType = "Perceived Response Time - 3% (ms)"; - if (tenPercentMenuItem.Checked) - { - rtType = "Initial Response Time - 10% (ms)"; - perType = "Perceived Response Time - 10% (ms)"; - } - else if (fixedRGB10OffsetToolStripMenuItem.Checked) - { - rtType = "Initial Response Time - RGB10 (ms)"; - perType = "Perceived Response Time - RGB10 (ms)"; - } - else if (fixedRGB5OffsetToolStripMenuItem.Checked) - { - rtType = "Initial Response Time - RGB5 (ms)"; - perType = "Perceived Response Time - RGB5 (ms)"; - } - if (gammaCorrectedToolStripMenuItem.Checked) - { - osSign = "(RGB)"; - } - if (gammaCorrectedToolStripMenuItem.Checked && percentageToolStripMenuItem.Checked) - { - osSign = "(RGB %)"; - } - string[] headers = { "Starting RGB","End RGB","Complete Response Time (ms)", rtType , perType , osType + " " + osSign ,"Visual Response Rating","Input Lag (ms)" }; - csvString.AppendLine(string.Join(strSeparator, headers)); - foreach (var res in averageData) - { - csvString.AppendLine(string.Join(strSeparator, res)); - } - bool failed = false; - if (Properties.Settings.Default.saveXLSX) - { - try - { - File.Copy(path + "\\Results Template.xlsx", excelFilePath); - } - catch (IOException ioe) - { - if (ioe.StackTrace.Contains("exists")) - { - Console.WriteLine("File exists, skipping writing."); - } - } - catch (Exception ex) - { - showMessageBox(ex.Message + ex.StackTrace, ex.Message, MessageBoxButtons.OK, MessageBoxIcon.Error); - } - resultsTemplate = new Excel.Application(); - try - { - resultsTemplateWorkbook = resultsTemplate.Workbooks.Open(excelFilePath); - } - catch - { - DialogResult d = showMessageBox("Error writing data to XLSX results file, file may be open already. Would you like to try again?", "Unable to Save to XLSX File", MessageBoxButtons.YesNo, MessageBoxIcon.Error); - if (d == DialogResult.Yes) - { - try - { - resultsTemplateWorkbook = resultsTemplate.Workbooks.Open(excelFilePath); - } - catch (Exception ex) - { - showMessageBox(ex.Message + ex.StackTrace, "Unable to Save to XLSX File", MessageBoxButtons.OK, MessageBoxIcon.Error); - failed = true; - } - } - else - { - failed = true; - } - } - if (!failed) - { - Excel._Worksheet resTempSheet = resultsTemplateWorkbook.Sheets[1]; - Excel._Worksheet resTempSheet2 = resultsTemplateWorkbook.Sheets[2]; - Excel._Worksheet resTempSheet3 = resultsTemplateWorkbook.Sheets[3]; - try - { - for (int h = 0; h < headers.Length; h++) - { - resTempSheet.Cells[1, h + 1] = headers[h]; - } - //Console.WriteLine("AverageData Count: " + averageData.Count); - for (int p = 0; p < averageData.Count ; p++) - { - for (int m = 0; m < averageData[0].Length ; m++) - { - //Console.WriteLine("M: " + m + " P: " + p); - resTempSheet.Cells[p + 2, m + 1] = averageData[p][m]; - } - } - resultsTemplateWorkbook.Save(); - } - catch (Exception ex) - { - showMessageBox( ex.Message + ex.StackTrace, "Unable to Save to XLSX File", MessageBoxButtons.YesNo, MessageBoxIcon.Error); - failed = true; - } - GC.Collect(); - GC.WaitForPendingFinalizers(); - Marshal.ReleaseComObject(resTempSheet); - try - { - int monitor = getSelectedMonitor(); - resTempSheet2.Cells[4, 12] = displayList[monitor].Freq.ToString(); - - resTempSheet3.Activate(); - - resultsTemplateWorkbook.Save(); - } - catch (Exception ex) - { - showMessageBox(ex.Message + ex.StackTrace, "Unable to Save to XLSX File", MessageBoxButtons.YesNo, MessageBoxIcon.Error); - failed = true; - } - GC.Collect(); - GC.WaitForPendingFinalizers(); - Marshal.ReleaseComObject(resTempSheet2); - GC.Collect(); - GC.WaitForPendingFinalizers(); - Marshal.ReleaseComObject(resTempSheet3); - } - resultsTemplateWorkbook.Close(); - Marshal.ReleaseComObject(resultsTemplateWorkbook); - resultsTemplate.Quit(); - Marshal.ReleaseComObject(resultsTemplate); - if (failed) - { - File.Delete(excelFilePath); - } - } - if (!Properties.Settings.Default.saveXLSX || failed) - { - try - { - File.WriteAllText(filePath, csvString.ToString()); - } - catch (IOException) - { - DialogResult d = MessageBox.Show("Unable to write final results file as the file is open in another program. Please close it then hit retry.", "Unable to write file", MessageBoxButtons.RetryCancel, MessageBoxIcon.Warning); - if (d == DialogResult.Retry) - { - try - { - File.WriteAllText(filePath, csvString.ToString()); - } - catch - { - MessageBox.Show("Still can't write to the file. Please importing the folder or running the test again", "Write Cancelled", MessageBoxButtons.OK, MessageBoxIcon.Error); - } - } - } - } - } - catch (Exception ex) - { - showMessageBox(ex.Message + " " + ex.StackTrace, "Error Processing Multiple Runs", MessageBoxButtons.OK, MessageBoxIcon.Error); - } - } - } - - public static double GetMedian(double[] sourceNumbers) - { - //Framework 2.0 version of this method. there is an easier way in F4 - if (sourceNumbers == null || sourceNumbers.Length == 0) - throw new System.Exception("Median of empty array not defined."); - - //make sure the list is sorted, but use a new array - double[] sortedPNumbers = (double[])sourceNumbers.Clone(); - Array.Sort(sortedPNumbers); + //make sure the list is sorted, but use a new array + double[] sortedPNumbers = (double[])sourceNumbers.Clone(); + Array.Sort(sortedPNumbers); //get the median int size = sortedPNumbers.Length; @@ -3682,7 +2040,6 @@ private void makeResultsFolder() { foreach (var s in existingFiles) { - var name = new DirectoryInfo(s).Name; decimal num = decimal.Parse(name.Remove(3)); if (num >= fileNumber) @@ -3691,231 +2048,37 @@ private void makeResultsFolder() } } } - string filePath = path + "\\" + fileNumber.ToString("000") + "-" + monitorInfo; Directory.CreateDirectory(filePath); resultsFolderPath = filePath; + initRunSettingsFile(filePath, monitor); } - - private void importRawFolder_Click(object sender, EventArgs e) + private void initRunSettingsFile(string filePath, int monitor) { - // Open folder picker dialogue - var filePath = string.Empty; - - using (FolderBrowserDialog folderDiag = new FolderBrowserDialog()) - { - folderDiag.SelectedPath = path; - - if (folderDiag.ShowDialog() == DialogResult.OK) - { - //Get the path of specified file - filePath = folderDiag.SelectedPath; - resultsFolderPath = folderDiag.SelectedPath; - - if (filePath != path) - { - multipleRunData.Clear(); - gamma.Clear(); - //results.Clear(); - string[] files = Directory.GetFiles(filePath); - bool valid = false; - bool inputLag = false; - setProgressBar(true); - foreach (var f in files) - { - if (f.Contains("-GAMMA-RAW-OSRTT")) - { - valid = true; - try - { - using (System.Windows.Forms.OpenFileDialog OFD = new System.Windows.Forms.OpenFileDialog()) - { - OFD.FileName = f; - //Read the contents of the file into a stream - - var fileStream = OFD.OpenFile(); - using (StreamReader reader = new StreamReader(fileStream)) - { - gamma.Clear(); - while (!reader.EndOfStream) - { - - // This can probably be done better - string[] line = reader.ReadLine().Split(','); - int[] intLine = new int[line.Length]; - for (int i = 0; i < line.Length; i++) - { - if (line[i] == "0") - { - intLine[i] = 0; - } - else if (line[i] != "") - { - intLine[i] = int.Parse(line[i]); - } - else - { - continue; - } - } - Array.Resize(ref intLine, intLine.Length - 1); - gamma.Add(intLine); - } - } - } - processGammaTable(); - } - catch (IOException iex) - { - MessageBox.Show("Unable to open file - it may be in use in another program. Please close it out and try again.", "Unable to open file", MessageBoxButtons.OK, MessageBoxIcon.Error); - } - } - else if (f.Contains("-RAW-OSRTT")) - { - valid = true; - results.Clear(); - gamma.Clear(); - try - { - List tempRes = new List(); - List tempGamma = new List(); - using (System.Windows.Forms.OpenFileDialog OFD = new System.Windows.Forms.OpenFileDialog()) - { - OFD.FileName = f; - //Read the contents of the file into a stream - - var fileStream = OFD.OpenFile(); - using (StreamReader reader = new StreamReader(fileStream)) - { - while (!reader.EndOfStream) - { - // This can probably be done better - string[] line = reader.ReadLine().Split(','); - int[] intLine = new int[line.Length]; - for (int i = 0; i < line.Length; i++) - { - if (line[i] == "0") - { - intLine[i] = 0; - } - else if (line[i] != "") - { - intLine[i] = int.Parse(line[i]); - } - else - { - continue; - } - } - Array.Resize(ref intLine, intLine.Length - 1); - if (intLine[0] == 1000) - { - testLatency.AddRange(intLine); - } - else if (intLine[0] == intLine[1]) - { - tempGamma.Add(intLine); - } - else - { - tempRes.Add(intLine); - } - } - } - } - results.AddRange(new List> { tempRes }); - gamma.AddRange(tempGamma); - //processGammaTable(); - //processThread = new Thread(new ThreadStart(processResponseTimeData)); - //processThread.Start(); - //while (processThread.IsAlive) - //{ - //Thread.Sleep(100); - //} - processResponseTimeData(); - } - catch (IOException iex) - { - if (!iex.Message.Contains(".xlsx")) - { - MessageBox.Show("Unable to open file - it may be in use in another program. Please close it out and try again.", "Unable to open file", MessageBoxButtons.OK, MessageBoxIcon.Error); - } - else - { - Console.WriteLine(iex.Message + iex.StackTrace); - } - } - } - else if (filePath.Contains("LAG-RAW")) - { - //Read the contents of the file into a stream - try - { - using (System.Windows.Forms.OpenFileDialog OFD = new System.Windows.Forms.OpenFileDialog()) - { - OFD.FileName = f; - //Read the contents of the file into a stream - - var fileStream = OFD.OpenFile(); - using (StreamReader reader = new StreamReader(fileStream)) - { - while (!reader.EndOfStream) - { - // This can probably be done better - string[] line = reader.ReadLine().Split(','); - int[] intLine = new int[line.Length]; - for (int i = 0; i < line.Length; i++) - { - if (line[i] == "0") - { - intLine[i] = 0; - } - else if (line[i] != "") - { - intLine[i] = int.Parse(line[i]); - } - else - { - continue; - } - } - Array.Resize(ref intLine, intLine.Length - 1); - inputLagRawData.Add(intLine); - } - } - resultsFolderPath = filePath.Substring(0, filePath.LastIndexOf('\\')); - - processInputLagData(); - inputLag = true; - } - } - catch - { - DialogResult d = MessageBox.Show("File may be in use by another program, please make sure it's not open elsewhere and try again.", "Unable to open file", MessageBoxButtons.OK, MessageBoxIcon.Error); - } - } - } - if (valid) - { - processMultipleRuns(); - Process.Start("explorer.exe", resultsFolderPath); - } - else if (inputLag) - { - Process.Start("explorer.exe", resultsFolderPath); - } - else - { - MessageBox.Show("Please select a results folder with one or more raw data files", "Unable to load files", MessageBoxButtons.OK, MessageBoxIcon.Error); - } - setProgressBar(false); - } - else - { - MessageBox.Show("Please select a results folder with one or more raw data files", "Unable to load files", MessageBoxButtons.OK, MessageBoxIcon.Error); - } + string fileName = filePath.Substring(filePath.LastIndexOf('\\')); + runSettings = new ProcessData.runSettings + { + RunName = fileName, + DateAndTime = DateTime.Now.ToString(), + MonitorName = displayList[monitor].ManufacturerCode + " " + displayList[monitor].Name, + RefreshRate = displayList[monitor].Freq, + FPSLimit = Convert.ToInt32(getSelectedFps()), + Vsync = getVsyncState(), + rtMethod = new ProcessData.rtMethods + { + Name = Properties.Settings.Default.rtName, + Tolerance = Properties.Settings.Default.rtTolerance, + gammaCorrected = Properties.Settings.Default.rtGammaCorrected, + percentage = Properties.Settings.Default.rtPercentage + }, + osMethod = new ProcessData.osMethods + { + Name = Properties.Settings.Default.osName, + gammaCorrected = Properties.Settings.Default.osGammaCorrected, + endPercent = Properties.Settings.Default.osEndPercent, + rangePercent = Properties.Settings.Default.osRangePercent } - } + }; } private void Main_Load(object sender, EventArgs e) @@ -4075,18 +2238,10 @@ private void changeSizeAndState(string state) case "standard": if (progressBarActive) { - progressBar1.Location = new Point(0, 435); - Size = new Size(628, 498); - } - else { Size = new Size(628, 480); } - break; - case "analyse": - if (progressBarActive) - { - progressBar1.Location = new Point(0, 580); - Size = new Size(628, 643); + progressBar1.Location = new Point(0, 389); + Size = new Size(679, 451); } - else { Size = new Size(628, 625); } + else { Size = new Size(679, 429); } break; case "brightness": if (progressBarActive) @@ -4095,28 +2250,31 @@ private void changeSizeAndState(string state) } mainPanel.Location = new Point(1500, 26); brightnessPanel.Location = new Point(0, 0); + aboutPanel.Location = new Point(1500, 402); Size = new Size(1000, 800); debugPanel.Location = new Point(1500, 30); menuStrip1.Visible = false; break; case "close brightness": - mainPanel.Location = new Point(2, 26); + mainPanel.Location = new Point(2, 29); brightnessPanel.Location = new Point(1100, 36); - Size = new Size(628, 480); + aboutPanel.Location = new Point(10, 412); + Size = new Size(679, 429); debugPanel.Location = new Point(619, 30); break; case "about": + aboutPanel.Location = new Point(10, 395); if (progressBarActive) { - progressBar1.Location = new Point(0, 701); - Size = new Size(628, 764); + progressBar1.Location = new Point(0, 508); + Size = new Size(679, 569); } else - { Size = new Size(628, 746); } + { Size = new Size(679, 547); } break; case "debug": - Size = new Size(1120, 850); - debugPanel.Location = new Point(619, 30); + Size = new Size(1089, 436); + debugPanel.Location = new Point(673, 32); break; case "show progress bar": Size s = Size; @@ -4134,7 +2292,7 @@ private void changeSizeAndState(string state) Size = s2; break; default: - Size = new Size(628, 480); + Size = new Size(679, 429); break; } } @@ -4183,192 +2341,6 @@ static void IFailedYou(object sender, UnhandledExceptionEventArgs args) } } - private void verboseOutputToolStripMenuItem_Click(object sender, EventArgs e) - { - Properties.Settings.Default.Verbose = verboseOutputToolStripMenuItem.Checked; - Properties.Settings.Default.Save(); - } - - private void threePercentMenuItem_Click(object sender, EventArgs e) - { - if (!Properties.Settings.Default.threePercentSetting) - { - Properties.Settings.Default.threePercentSetting = threePercentMenuItem.Checked; - Properties.Settings.Default.tenPercentSetting = false; - tenPercentMenuItem.Checked = false; - Properties.Settings.Default.RGB10Offset = false; - fixedRGB10OffsetToolStripMenuItem.Checked = false; - Properties.Settings.Default.RGB5Offset = false; - fixedRGB5OffsetToolStripMenuItem.Checked = false; - Properties.Settings.Default.Save(); - } - else - { - threePercentMenuItem.Checked = true; - } - } - - private void tenPercentMenuItem_Click(object sender, EventArgs e) - { - if (!Properties.Settings.Default.tenPercentSetting) - { - Properties.Settings.Default.tenPercentSetting = tenPercentMenuItem.Checked; - Properties.Settings.Default.threePercentSetting = false; - threePercentMenuItem.Checked = false; - Properties.Settings.Default.RGB10Offset = false; - fixedRGB10OffsetToolStripMenuItem.Checked = false; - Properties.Settings.Default.RGB5Offset = false; - fixedRGB5OffsetToolStripMenuItem.Checked = false; - Properties.Settings.Default.Save(); - } - else - { - tenPercentMenuItem.Checked = true; - } - } - - private void fixedRGB10OffsetToolStripMenuItem_Click(object sender, EventArgs e) - { - if (!Properties.Settings.Default.RGB10Offset) - { - Properties.Settings.Default.RGB10Offset = fixedRGB10OffsetToolStripMenuItem.Checked; - Properties.Settings.Default.threePercentSetting = false; - threePercentMenuItem.Checked = false; - Properties.Settings.Default.tenPercentSetting = false; - tenPercentMenuItem.Checked = false; - Properties.Settings.Default.RGB5Offset = false; - fixedRGB5OffsetToolStripMenuItem.Checked = false; - Properties.Settings.Default.gammaCorrRT = true; - gamCorMenuItem.Checked = true; - Properties.Settings.Default.Save(); - } - else - { - fixedRGB10OffsetToolStripMenuItem.Checked = true; - } - } - - private void fixedRGB5OffsetToolStripMenuItem_Click(object sender, EventArgs e) - { - if (!Properties.Settings.Default.RGB5Offset) - { - Properties.Settings.Default.RGB5Offset = fixedRGB5OffsetToolStripMenuItem.Checked; - Properties.Settings.Default.threePercentSetting = false; - threePercentMenuItem.Checked = false; - Properties.Settings.Default.tenPercentSetting = false; - tenPercentMenuItem.Checked = false; - Properties.Settings.Default.RGB10Offset = false; - fixedRGB10OffsetToolStripMenuItem.Checked = false; - Properties.Settings.Default.gammaCorrRT = true; - gamCorMenuItem.Checked = true; - Properties.Settings.Default.Save(); - } - else - { - fixedRGB10OffsetToolStripMenuItem.Checked = true; - } - } - - private void gammaCorrectedToolStripMenuItem_Click(object sender, EventArgs e) - { - if ((Properties.Settings.Default.gammaPercentSetting || Properties.Settings.Default.gammaPercentDiff) && Properties.Settings.Default.gammaCorrectedSetting) - { - Properties.Settings.Default.gammaCorrectedSetting = gammaCorrectedToolStripMenuItem.Checked; - Properties.Settings.Default.Save(); - } - else if (Properties.Settings.Default.gammaPercentSetting || Properties.Settings.Default.gammaPercentDiff) - { - Properties.Settings.Default.gammaCorrectedSetting = gammaCorrectedToolStripMenuItem.Checked; - Properties.Settings.Default.Save(); - } - else if (Properties.Settings.Default.gammaCorrectedSetting) - { - gammaCorrectedToolStripMenuItem.Checked = true; - } - else - { - Properties.Settings.Default.gammaCorrectedSetting = true; - gammaCorrectedToolStripMenuItem.Checked = true; - Properties.Settings.Default.Save(); - } - } - - private void percentageToolStripMenuItem_Click(object sender, EventArgs e) - { - if ((Properties.Settings.Default.gammaPercentSetting || Properties.Settings.Default.gammaPercentDiff) && Properties.Settings.Default.gammaCorrectedSetting) - { - Properties.Settings.Default.gammaPercentSetting = percentageToolStripMenuItem.Checked; - if (!percentageToolStripMenuItem.Checked) - { - Properties.Settings.Default.gammaPercentDiff = percentageToolStripMenuItem.Checked; - endValueToolStripMenuItem.Checked = percentageToolStripMenuItem.Checked; - differenceToolStripMenuItem.Checked = percentageToolStripMenuItem.Checked; - } - Properties.Settings.Default.Save(); - } - else if (Properties.Settings.Default.gammaCorrectedSetting) - { - Properties.Settings.Default.gammaPercentSetting = percentageToolStripMenuItem.Checked; - endValueToolStripMenuItem.Checked = percentageToolStripMenuItem.Checked; - Properties.Settings.Default.Save(); - } - else if (Properties.Settings.Default.gammaPercentSetting || Properties.Settings.Default.gammaPercentDiff) - { - percentageToolStripMenuItem.Checked = true; - } - else - { - Properties.Settings.Default.gammaPercentSetting = true; - percentageToolStripMenuItem.Checked = true; - endValueToolStripMenuItem.Checked = true; - Properties.Settings.Default.Save(); - } - } - - private void gamCorMenuItem_Click(object sender, EventArgs e) - { - Properties.Settings.Default.gammaCorrRT = gamCorMenuItem.Checked; - Properties.Settings.Default.Save(); - } - - private void testRun() - { - string ue4Path = System.Reflection.Assembly.GetExecutingAssembly().GetName().CodeBase; - ue4Path = new Uri(System.IO.Path.GetDirectoryName(ue4Path)).LocalPath; - ue4Path += @"\OSRTT UE4\ResponseTimeTest.exe"; - Console.WriteLine(ue4Path); - // Move UE4 window to selected monitor if that isn't the primary (will open by default there). - int selectedDisplay = getSelectedMonitor(); - var display = Screen.AllScreens[selectedDisplay]; - int WinX = 0; - int WinY = 0; - if (display.Primary == false) - { - // Force UE4 window to selected display if selected is not primary - Console.WriteLine(display.Bounds.Location.X); - WinX = display.Bounds.Location.X; - WinY = display.Bounds.Location.Y; - Console.WriteLine(display.Bounds.Location.Y); - } - //System.Diagnostics.Process process = new System.Diagnostics.Process(); - Process ue4 = new Process(); - try - { - //ue4.StartInfo.UseShellExecute = true; - ue4.StartInfo.FileName = ue4Path; - ue4.StartInfo.Arguments = ue4Path + " WinX=" + WinX + " WinY=" + WinY; - ue4.Start(); - //Process.Start(ue4Path, "WinX=" + WinX + " WinY=" + WinY); - //Process.Start(ue4Path); - ue4.WaitForExit(); - } - catch (Exception strE) - { - Console.WriteLine(strE); - SetText(strE.Message + strE.StackTrace); - } - } - private void fpsLimitList_SelectedIndexChanged(object sender, EventArgs e) { Properties.Settings.Default.FPS = fpsLimitList.SelectedIndex; @@ -4394,19 +2366,6 @@ private void testCount_ValueChanged(object sender, EventArgs e) } } } - - private void saveGammaTableToolStripMenuItem_Click(object sender, EventArgs e) - { - Properties.Settings.Default.saveGammaTable = saveGammaTableToolStripMenuItem.Checked; - Properties.Settings.Default.Save(); - } - - private void saveSmoothedDataToolStripMenuItem_Click(object sender, EventArgs e) - { - Properties.Settings.Default.saveSmoothData = saveSmoothedDataToolStripMenuItem.Checked; - Properties.Settings.Default.Save(); - } - private void saveUSBOutputToolStripMenuItem_Click(object sender, EventArgs e) { Properties.Settings.Default.USBOutput = saveUSBOutputToolStripMenuItem.Checked; @@ -4438,11 +2397,6 @@ private void opnResultsBtn_Click(object sender, EventArgs e) Process.Start("explorer.exe", path); } - private void suppressDialogBoxesToolStripMenuItem_Click(object sender, EventArgs e) - { - Properties.Settings.Default.SuppressDiagBox = suppressDialogBoxesToolStripMenuItem.Checked; - Properties.Settings.Default.Save(); - } private DialogResult showMessageBox(string title, string message, MessageBoxButtons buttons, MessageBoxIcon icon) { @@ -4482,345 +2436,111 @@ private void closeBrightnessBtn_Click(object sender, EventArgs e) brightnessCanceled = true; } else - { - showMessageBox(ex.Message + ex.StackTrace, ex.Message, MessageBoxButtons.OK, MessageBoxIcon.Warning); - menuStrip1.Visible = true; - changeSizeAndState("close brightness"); - brightnessWindowOpen = false; - ready = false; - testRunning = false; - brightnessCanceled = true; - } - - } - } - - private void aboutProgramToolStripMenuItem_Click(object sender, EventArgs e) - { - if (aboutProgramToolStripMenuItem.Checked) - { - changeSizeAndState("about"); - } - else - { - changeSizeAndState("standard"); - } - } - - private void linkLabel1_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e) - { - Process.Start("https://github.com/andymanic/OSRTT/releases"); - } - - private void serialSendBtn_Click(object sender, EventArgs e) - { - if (port != null) - { - if (port.IsOpen) - { - port.Write(serialSendBox.Text); - serialSendBox.Clear(); - } - } - } - - private void richTextBox1_TextChanged(object sender, EventArgs e) - { - // set the current caret position to the end - richTextBox1.SelectionStart = richTextBox1.Text.Length; - // scroll it automatically - richTextBox1.ScrollToCaret(); - } - - private void saveXLSXMenuItem_Click(object sender, EventArgs e) - { - if (excelInstalled) - { - Properties.Settings.Default.saveXLSX = saveXLSXMenuItem.Checked; - } - else - { - Properties.Settings.Default.saveXLSX = false; - } - Properties.Settings.Default.Save(); - } + { + showMessageBox(ex.Message + ex.StackTrace, ex.Message, MessageBoxButtons.OK, MessageBoxIcon.Warning); + menuStrip1.Visible = true; + changeSizeAndState("close brightness"); + brightnessWindowOpen = false; + ready = false; + testRunning = false; + brightnessCanceled = true; + } - private void recommendedSettingsToolStripMenuItem_Click(object sender, EventArgs e) - { - if (Properties.Settings.Default.advancedSettings) - { - advancedSettingsToolStripMenuItem.Checked = false; - recommendedSettingsToolStripMenuItem.Checked = true; - Properties.Settings.Default.advancedSettings = false; - measurementsToolStripMenuItem.Visible = false; - overshootSettingsMenuItem.Visible = false; - extendedGammaTestToolStripMenuItem.Visible = false; - Properties.Settings.Default.gammaCorrectedSetting = true; - gammaCorrectedToolStripMenuItem.Checked = true; - Properties.Settings.Default.gammaCorrRT = true; - gamCorMenuItem.Checked = true; - Properties.Settings.Default.gammaPercentSetting = false; - percentageToolStripMenuItem.Checked = false; - endValueToolStripMenuItem.Checked = false; - differenceToolStripMenuItem.Checked = false; - Properties.Settings.Default.gammaPercentDiff = false; - Properties.Settings.Default.RGB10Offset = false; - fixedRGB10OffsetToolStripMenuItem.Checked = false; - Properties.Settings.Default.RGB5Offset = true; - fixedRGB5OffsetToolStripMenuItem.Checked = true; - Properties.Settings.Default.threePercentSetting = false; - threePercentMenuItem.Checked = false; - Properties.Settings.Default.tenPercentSetting = false; - tenPercentMenuItem.Checked = false; - Properties.Settings.Default.extendedGammaTest = true; - extendedGammaTestToolStripMenuItem.Checked = true; - Properties.Settings.Default.Save(); - } - else - { - recommendedSettingsToolStripMenuItem.Checked = true; } } - private void advancedSettingsToolStripMenuItem_Click(object sender, EventArgs e) + private void aboutProgramToolStripMenuItem_Click(object sender, EventArgs e) { - if (Properties.Settings.Default.advancedSettings) + if (aboutProgramToolStripMenuItem.Checked) { - advancedSettingsToolStripMenuItem.Checked = true; - recommendedSettingsToolStripMenuItem.Checked = false; - measurementsToolStripMenuItem.Visible = true; - overshootSettingsMenuItem.Visible = true; - extendedGammaTestToolStripMenuItem.Visible = true; + changeSizeAndState("about"); } else { - Properties.Settings.Default.advancedSettings = advancedSettingsToolStripMenuItem.Checked; - recommendedSettingsToolStripMenuItem.Checked = false; - measurementsToolStripMenuItem.Visible = true; - overshootSettingsMenuItem.Visible = true; - extendedGammaTestToolStripMenuItem.Visible = true; - Properties.Settings.Default.Save(); + changeSizeAndState("standard"); } } - private void differenceToolStripMenuItem_Click(object sender, EventArgs e) - { - if (Properties.Settings.Default.gammaPercentSetting) - { - Properties.Settings.Default.gammaPercentDiff = differenceToolStripMenuItem.Checked; - Properties.Settings.Default.gammaPercentSetting = false; - percentageToolStripMenuItem.Checked = true; - endValueToolStripMenuItem.Checked = false; - Properties.Settings.Default.Save(); - } - else - { - differenceToolStripMenuItem.Checked = true; - percentageToolStripMenuItem.Checked = true; - Properties.Settings.Default.gammaPercentDiff = differenceToolStripMenuItem.Checked; - Properties.Settings.Default.Save(); - } + private void linkLabel1_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e) + { + Process.Start("https://github.com/andymanic/OSRTT/releases"); } - private void endValueToolStripMenuItem_Click(object sender, EventArgs e) + private void serialSendBtn_Click(object sender, EventArgs e) { - if (Properties.Settings.Default.gammaPercentDiff) - { - Properties.Settings.Default.gammaPercentSetting = endValueToolStripMenuItem.Checked; - Properties.Settings.Default.gammaPercentDiff = false; - percentageToolStripMenuItem.Checked = true; - differenceToolStripMenuItem.Checked = false; - Properties.Settings.Default.Save(); - } - else + if (port != null) { - endValueToolStripMenuItem.Checked = true; - percentageToolStripMenuItem.Checked = true; - Properties.Settings.Default.gammaPercentSetting = endValueToolStripMenuItem.Checked; - Properties.Settings.Default.Save(); + if (port.IsOpen) + { + port.Write(serialSendBox.Text); + serialSendBox.Clear(); + } } } - private void saveGraphsMenuItem_Click(object sender, EventArgs e) + private void richTextBox1_TextChanged(object sender, EventArgs e) { - if (saveGraphsMenuItem.Checked && excelInstalled) - { - DialogResult d = MessageBox.Show("Warning: This option is incredibly slow and may break the test. " + - "It's much better to copy the raw data to the graph view template manually. Are you sure you want to enable this?", - "WARNING - UNSTABLE", MessageBoxButtons.YesNo, MessageBoxIcon.Question); - if (d == DialogResult.Yes) - { - Properties.Settings.Default.saveGraphs = saveGraphsMenuItem.Checked; - } - else - { - saveGraphsMenuItem.Checked = false; - Properties.Settings.Default.saveGraphs = false; - } - } - else - { - Properties.Settings.Default.saveGraphs = false; - } - Properties.Settings.Default.Save(); + // set the current caret position to the end + richTextBox1.SelectionStart = richTextBox1.Text.Length; + // scroll it automatically + richTextBox1.ScrollToCaret(); } // very unfinished private void processInputLagData() { - //This is a long one. This is the code that builds the gamma curve, finds the start/end points and calculates response times and overshoot % (gamma corrected) - List processedData = new List(); - - // First, create gamma array from the data - List smoothedDataTable = new List(); + inputLagProcessed.Clear(); try //Wrapped whole thing in try just in case { // Then process the lines - int shotNumber = 1; - foreach (int[] item in this.inputLagRawData) + ProcessData pd = new ProcessData(); + inputLagProcessed.AddRange(pd.processInputLagData(inputLagRawData)); + if (inputLagProcessed.Count == 0) { - // Save start, end, time and sample count then clear the values from the array - int ClickTime = item[0]; - Console.WriteLine("ClickTime: " + ClickTime); - int TimeTaken = item[1]; - int SampleCount = item[2]; - int[] samples = item.Skip(3).ToArray(); - - double SampleTime = ((double)TimeTaken / (double)SampleCount); // Get the time taken between samples + throw new Exception("Processing Failed"); + } - // Clean up noisy data using moving average function - int period = 20; - int[] buffer = new int[period]; - int[] averagedSamples = new int[samples.Length]; - int current_index = 0; - for (int a = 0; a < samples.Length; a++) + // convert to double array for each type of average + ProcessData.inputLagResult averageInputLag = new ProcessData.inputLagResult{ clickTimeMs = 0, inputLag = 0, totalInputLag = 0 }; + ProcessData.inputLagResult minInputLag = new ProcessData.inputLagResult { clickTimeMs = 1000, inputLag = 1000, totalInputLag = 1000 }; + ProcessData.inputLagResult maxInputLag = new ProcessData.inputLagResult { clickTimeMs = 0, inputLag = 0, totalInputLag = 0 }; + for (int i = 0; i < inputLagProcessed.Count; i++) + { + averageInputLag.clickTimeMs += inputLagProcessed[i].clickTimeMs; + averageInputLag.inputLag += inputLagProcessed[i].inputLag; + averageInputLag.totalInputLag += inputLagProcessed[i].totalInputLag; + if (inputLagProcessed[i].clickTimeMs < minInputLag.clickTimeMs) { - buffer[current_index] = samples[a] / period; - int movAvg = 0; - for (int b = 0; b < period; b++) - { - movAvg += buffer[b]; - } - averagedSamples[a] = movAvg; - current_index = (current_index + 1) % period; + minInputLag.clickTimeMs = inputLagProcessed[i].clickTimeMs; } - - samples = averagedSamples.Skip(period).ToArray(); //Moving average spoils the first 10 samples so currently removing them. - - List fullSmoothedLine = new List { ClickTime, TimeTaken, SampleCount }; - fullSmoothedLine.AddRange(samples); - smoothedDataTable.Add(fullSmoothedLine.ToArray()); - - // Initialise in-use variables - int transStart = 0; - int transEnd = 0; - - int startMax = samples[5]; // Initialise these variables with a real value - int startMin = samples[5]; // Initialise these variables with a real value - int endMax = samples[samples.Length - 10]; // Initialise these variables with a real value - int endMin = samples[samples.Length - 10]; // Initialise these variables with a real value - - // Build start min/max to compare against - for (int l = 0; l < 250; l++) //CHANGE TO 180 FOR RUN 2 DATA + else if (inputLagProcessed[i].clickTimeMs > maxInputLag.clickTimeMs) { - if (samples[l] < startMin) - { - startMin = samples[l]; - } - else if (samples[l] > startMax) - { - startMax = samples[l]; - } + maxInputLag.clickTimeMs = inputLagProcessed[i].clickTimeMs; } - - // Build end min/max to compare against - for (int m = samples.Length - 5; m > samples.Length - 450; m--) + if (inputLagProcessed[i].inputLag < minInputLag.inputLag) { - if (samples[m] < endMin) - { - endMin = samples[m]; - } - else if (samples[m] > endMax) - { - endMax = samples[m]; - } + minInputLag.inputLag = inputLagProcessed[i].inputLag; } - - // Search for where the result starts transitioning - start is almost always less sensitive - for (int j = 0; j < samples.Length; j++) + else if (inputLagProcessed[i].inputLag > maxInputLag.inputLag) { - if (samples[j] > (startMax)) - { - if ((samples[j + 50] > (samples[j] + 50) || samples[j + 56] > (samples[j] + 50)) - && (samples[j + 100] > (samples[j] + 100) || samples[j + 106] > (samples[j] + 100)) - && (samples[j + 125] > (samples[j] + 100) || samples[j + 131] > (samples[j] + 100)) - && (samples[j + 150] > (samples[j] + 100) || samples[j + 156] > (samples[j] + 100))) // check the trigger point is actually the trigger and not noise - { - transStart = j; - break; - } - else - { - if (samples[j] > startMax) - { - startMax = samples[j]; - } - } - } + maxInputLag.inputLag = inputLagProcessed[i].inputLag; } - - Console.WriteLine("ClickTime: " + ClickTime); - double clickTimeMs = ClickTime; - clickTimeMs /= 1000; - Console.WriteLine("ClickTimems: " + clickTimeMs); - double transTime = (transStart * SampleTime) / 1000; - double inputLag = Math.Round(transTime, 3); - - double totalInputLag = (ClickTime + (transStart * SampleTime)) / 1000; - totalInputLag = Math.Round(totalInputLag, 3); - /*if (verboseOutputToolStripMenuItem.Checked) + if (inputLagProcessed[i].totalInputLag < minInputLag.totalInputLag) { - // Verbose output with ALLLL the data - double[] completeResult = new double[] { StartingRGB, EndRGB, responseTime, initialResponseTime, perceivedResponseTime, overshootPercent, visualResponseRating, transStart, transEnd, SampleTime, endAverage, peakValue, overUnderRGB }; - processedData.Add(completeResult); - }*/ - - - double[] completeResult = new double[] { shotNumber, clickTimeMs, inputLag, totalInputLag }; - processedData.Add(completeResult); - shotNumber++; - - } - List temp = new List(); //probably not needed now processedData is a local variable - temp.AddRange(processedData); - inputLagProcessed.AddRange(temp); - - // convert to double array for each type of average - double[] averageInputLag = { 0, 0, 0 }; - double[] minInputLag = { 1000, 1000, 1000 }; - double[] maxInputLag = { 0, 0, 0 }; - for (int i = 0; i < processedData.Count; i++) - { - for (int j = 0; j < averageInputLag.Length; j++) + minInputLag.totalInputLag = inputLagProcessed[i].totalInputLag; + } + else if (inputLagProcessed[i].totalInputLag > maxInputLag.totalInputLag) { - averageInputLag[j] += processedData[i][j + 1]; - if (processedData[i][j + 1] < minInputLag[j]) - { - minInputLag[j] = processedData[i][j + 1]; - } - else if (processedData[i][j + 1] > maxInputLag[j]) - { - maxInputLag[j] = processedData[i][j + 1]; - } + maxInputLag.totalInputLag = inputLagProcessed[i].totalInputLag; } } - averageInputLag[0] /= processedData.Count; - averageInputLag[0] = Math.Round(averageInputLag[0], 3); - averageInputLag[1] /= processedData.Count; - averageInputLag[1] = Math.Round(averageInputLag[1], 3); - averageInputLag[2] /= processedData.Count; - averageInputLag[2] = Math.Round(averageInputLag[2], 3); + averageInputLag.clickTimeMs /= inputLagProcessed.Count; + averageInputLag.clickTimeMs = Math.Round(averageInputLag.clickTimeMs, 3); + averageInputLag.inputLag /= inputLagProcessed.Count; + averageInputLag.inputLag = Math.Round(averageInputLag.inputLag, 3); + averageInputLag.totalInputLag /= inputLagProcessed.Count; + averageInputLag.totalInputLag = Math.Round(averageInputLag.totalInputLag, 3); // Write results to csv using new name decimal fileNumber = 001; @@ -4848,13 +2568,18 @@ private void processInputLagData() StringBuilder csvString = new StringBuilder(); csvString.AppendLine("Shot Number,Click Time (ms),Processing & Display Latency(ms),Total System Input Lag (ms)"); - foreach (var res in processedData) - { - csvString.AppendLine(string.Join(strSeparator, res)); - } - csvString.AppendLine("AVERAGE," + averageInputLag[0].ToString() + "," + averageInputLag[1].ToString() + "," + averageInputLag[2].ToString()); - csvString.AppendLine("MINIMUM," + minInputLag[0].ToString() + "," + minInputLag[1].ToString() + "," + minInputLag[2].ToString()); - csvString.AppendLine("MAXIMUM," + maxInputLag[0].ToString() + "," + maxInputLag[1].ToString() + "," + maxInputLag[2].ToString()); + foreach (var res in inputLagProcessed) + { + csvString.AppendLine( + res.shotNumber.ToString() + "," + + res.clickTimeMs.ToString() + "," + + res.inputLag.ToString() + "," + + res.totalInputLag.ToString() + ); + } + csvString.AppendLine("AVERAGE," + averageInputLag.clickTimeMs.ToString() + "," + averageInputLag.inputLag.ToString() + "," + averageInputLag.totalInputLag.ToString()); + csvString.AppendLine("MINIMUM," + minInputLag.clickTimeMs.ToString() + "," + minInputLag.inputLag.ToString() + "," + minInputLag.totalInputLag.ToString()); + csvString.AppendLine("MAXIMUM," + maxInputLag.clickTimeMs.ToString() + "," + maxInputLag.inputLag.ToString() + "," + maxInputLag.totalInputLag.ToString()); Console.WriteLine(filePath); File.WriteAllText(filePath, csvString.ToString()); Process[] p = Process.GetProcessesByName("ResponseTimeTest-Win64-Shipping"); @@ -4942,7 +2667,7 @@ private void launchInputLagTest() { ControlDeviceButtons(false); ue4.StartInfo.FileName = ue4Path; - ue4.StartInfo.Arguments = ue4Path + " WinX=" + WinX + " WinY=" + WinY; + ue4.StartInfo.Arguments = ue4Path + " WinX=" + WinX + " WinY=" + WinY + " NoVSync"; ue4.Start(); // Process.Start(ue4Path); ue4.WaitForExit(); @@ -4970,36 +2695,10 @@ private void captureTimeBox_SelectedIndexChanged(object sender, EventArgs e) } } - private void helpFramerateBtn_Click(object sender, EventArgs e) - { - MessageBox.Show("The framerate limit is the in-engine FPS limit the test will run at." + - "\n \nYou should set this to 1000 FPS to get a 'best case' test run." + - "\n \nYou should set this to below the monitor's refresh rate if you want to test how it performs with Adaptive Sync / Variable Refresh Rate.", "Framerate Limit Help", MessageBoxButtons.OK, MessageBoxIcon.Information); - } - - private void helpCyclesBtn_Click(object sender, EventArgs e) - { - MessageBox.Show("This is how many times the test will run before averaging the data. Each run will still be processed independently, " + - "but to get the most accurate data you should run the test multiple times. Default is 5, max is 10.", "Number of Cycles Help", MessageBoxButtons.OK, MessageBoxIcon.Information); - } - - private void helpCaptureBtn_Click(object sender, EventArgs e) - { - MessageBox.Show("This is how long the board will spend capturing data for each transition. The longer the period, the more samples it will store per run. " + - "\n \nOnly increase this if the display you are testing has slow input lag and/or slow response times too. Most gaming displays should fit within the 50ms window." + - "\n \nThe default is 50ms, the maximum 250ms. At 50ms each run will save around 450KB of data, 100ms is double at 900KB, and so on.", "Capture Time Help", MessageBoxButtons.OK, MessageBoxIcon.Information); - } - - private void saveRawInputLagDataToolStripMenuItem_Click(object sender, EventArgs e) - { - Properties.Settings.Default.saveInputLagRaw = saveRawInputLagMenuItem.Checked; - Properties.Settings.Default.Save(); - } - - private void IgnoreErrorsMenuItem_Click(object sender, EventArgs e) + private void helpBtn_Click(object sender, EventArgs e) { - Properties.Settings.Default.ignoreErrors = IgnoreErrorsMenuItem.Checked; - Properties.Settings.Default.Save(); + HelpView hv = new HelpView(); + hv.Show(); } private void bugReportMenuItem_Click(object sender, EventArgs e) @@ -5021,182 +2720,19 @@ private void monitorCB_SelectedIndexChanged(object sender, EventArgs e) private void vsyncStateList_SelectedIndexChanged(object sender, EventArgs e) { - Properties.Settings.Default.VSyncState = vsyncStateList.SelectedIndex; - Properties.Settings.Default.Save(); - if (port != null) - { - port.Write("V" + vsyncStateList.SelectedIndex.ToString()); - } - } - - private void vsyncHelpBtn_Click(object sender, EventArgs e) - { - MessageBox.Show("VSync will limit the framerate to the display's refresh rate, regardless of if the FPS cap is set above that. " + - "The FPS cap will still function below the refresh rate. Default state is enabled.", "VSync State Help", MessageBoxButtons.OK, MessageBoxIcon.Information); - } - - private void convertRawGraphMenuItem_Click(object sender, EventArgs e) - { - - if (excelInstalled) + if (vsyncStateList.SelectedIndex == 0) { - // Open file picker dialogue - var filePath = string.Empty; - - using (System.Windows.Forms.OpenFileDialog openFileDialog = new System.Windows.Forms.OpenFileDialog()) - { - openFileDialog.InitialDirectory = path; - openFileDialog.Filter = "csv files (*.csv)|*.csv"; - openFileDialog.FilterIndex = 2; - openFileDialog.RestoreDirectory = true; - - if (openFileDialog.ShowDialog() == DialogResult.OK) - { - //Get the path of specified file - filePath = openFileDialog.FileName; - results.Clear(); - gamma.Clear(); - setProgressBar(true); - if (filePath.Contains("RAW-OSRTT")) - { - //Read the contents of the file into a stream - try - { - var fileStream = openFileDialog.OpenFile(); - using (StreamReader reader = new StreamReader(fileStream)) - { - while (!reader.EndOfStream) - { - // This can probably be done better - string[] line = reader.ReadLine().Split(','); - int[] intLine = new int[line.Length]; - for (int i = 0; i < line.Length; i++) - { - if (line[i] == "0") - { - intLine[i] = 0; - } - else if (line[i] != "") - { - intLine[i] = int.Parse(line[i]); - } - else - { - continue; - } - } - Array.Resize(ref intLine, intLine.Length - 1); - importedFile.Add(intLine); - } - } - Thread convertThread = new Thread(this.convertCSVtoGraph); - convertThread.Start(filePath); - } - catch - { - DialogResult d = MessageBox.Show("File may be in use by another program, please make sure it's not open elsewhere and try again.", "Unable to open file", MessageBoxButtons.OK, MessageBoxIcon.Error); - } - } - else - { - MessageBox.Show("Sorry, only 'RAW' files can be imported. Please select a RAW-OSRTT.csv' file instead.", "Importer Error", MessageBoxButtons.OK, MessageBoxIcon.Error); - } - setProgressBar(false); - } - } + Properties.Settings.Default.VSyncState = false; } else { - MessageBox.Show("Excel doesn't appear to be installed, so this operation can't continue.", "Excel Not Installed", MessageBoxButtons.OK, MessageBoxIcon.Warning); - } - } - private void convertCSVtoGraph(object data) - { - string filePath = data.ToString(); - resultsFolderPath = filePath.Substring(0, filePath.LastIndexOf('\\')); - string fileName = filePath.Substring(filePath.LastIndexOf('\\')); - //int fileNumber = Int32.Parse(fileName.Split('-')[0]); - string excelFilePath = resultsFolderPath + "\\" + fileName.Split('-')[0] + "-GRAPH-RAW-OSRTT.xlsm"; - Console.WriteLine(excelFilePath); - setProgressBar(true); - bool failed = false; - try - { - File.Copy(path + "\\Graph View Template.xlsm", excelFilePath); - } - catch (IOException ioe) - { - if (ioe.StackTrace.Contains("exists")) - { - Console.WriteLine("File exists, skipping writing."); - } - } - catch (Exception ex) - { - showMessageBox(ex.Message + ex.StackTrace, ex.Message, MessageBoxButtons.OK, MessageBoxIcon.Error); - } - graphTemplate = new Excel.Application(); - try - { - graphTemplateWorkbook = graphTemplate.Workbooks.Open(excelFilePath); - } - catch - { - DialogResult d = showMessageBox("Error writing data to XLSX results file, file may be open already. Would you like to try again?", "Unable to Save to XLSX File", MessageBoxButtons.YesNo, MessageBoxIcon.Error); - if (d == DialogResult.Yes) - { - try - { - graphTemplateWorkbook = graphTemplate.Workbooks.Open(excelFilePath); - } - catch (Exception ex) - { - showMessageBox(ex.Message + ex.StackTrace, "Unable to Save to XLSX File", MessageBoxButtons.YesNo, MessageBoxIcon.Error); - failed = true; - } - } - else - { - failed = true; - } - } - if (!failed) - { - Excel._Worksheet graphTempSheet = graphTemplateWorkbook.Sheets[1]; - try - { - for (int p = 0; p < importedFile.Count; p++) - { - - for (int m = 0; m < importedFile[p].Length; m++) - { - //Console.WriteLine("M: " + m + " P: " + p); - graphTempSheet.Cells[p + 1, m + 1] = importedFile[p][m]; - } - Console.WriteLine(p); - } - graphTemplateWorkbook.Save(); - } - catch (Exception ex) - { - showMessageBox(ex.Message + ex.StackTrace, "Unable to Save to XLSX File", MessageBoxButtons.OK, MessageBoxIcon.Error); - failed = true; - } - GC.Collect(); - GC.WaitForPendingFinalizers(); - Marshal.ReleaseComObject(graphTempSheet); - + Properties.Settings.Default.VSyncState = true; } - graphTemplateWorkbook.Close(); - Marshal.ReleaseComObject(graphTemplateWorkbook); - graphTemplate.Quit(); - Marshal.ReleaseComObject(graphTemplate); - if (failed) + Properties.Settings.Default.Save(); + if (port != null) { - File.Delete(excelFilePath); + port.Write("V" + vsyncStateList.SelectedIndex.ToString()); } - setProgressBar(false); - Process.Start("explorer.exe", resultsFolderPath); } private void setProgressBar(bool on) @@ -5232,28 +2768,232 @@ private void setProgressBar(bool on) } private void testButtonToolStripMenuItemToolStripMenuItem_Click(object sender, EventArgs e) + { + DataUpload d = new DataUpload(); + d.systemInfo(); + } + + private void resultsViewBtn_Click(object sender, EventArgs e) { ResultsView resultsView = new ResultsView(); resultsView.Show(); } - private void extendedGammaTestToolStripMenuItem_Click(object sender, EventArgs e) + private void settingsMenuItem_Click(object sender, EventArgs e) { - Properties.Settings.Default.extendedGammaTest = extendedGammaTestToolStripMenuItem.Checked; - Properties.Settings.Default.Save(); - if (port != null) + ResultsSettings rs = new ResultsSettings(); + rs.Show(); + } + + private void testSettingsBtn_Click(object sender, EventArgs e) + { + ResultsSettings rs = new ResultsSettings(); + rs.Show(); + } + + private void ResultsFolderBtn_Click(object sender, EventArgs e) + { + Process.Start("explorer.exe", path); + } + + private void processAllRuns(ProcessData.rtMethods rtMethod, ProcessData.osMethods osMethod) + { + averageData.Clear(); + multipleRunData.Clear(); + CFuncs cf = new CFuncs(); + ProcessData pd = new ProcessData(); + int startDelay = pd.processTestLatency(testLatency); + foreach (var i in results) { - if (Properties.Settings.Default.extendedGammaTest) + processedGamma.Clear(); + processedGamma.AddRange(pd.processGammaTable(gamma, i)); + } + // save gamma data to file + if (Properties.Settings.Default.saveGammaTable) + { + string gammaName = cf.createFileName(resultsFolderPath, "-GAMMA-OSRTT.csv"); + StringBuilder gammaCsv = new StringBuilder(); + gammaCsv.AppendLine("RGB,Light Level"); + foreach (ProcessData.gammaResult g in processedGamma) { - port.Write("Q1"); + gammaCsv.AppendLine(g.RGB.ToString() + "," + g.LightLevel.ToString()); } - else + File.WriteAllText(resultsFolderPath + "\\" + gammaName, gammaCsv.ToString()); + } + List> processedData = new List>(); + processedData.AddRange(pd.ProcessAllResults(results, new ProcessData.resultSelection + { + rtStyle = rtMethod, + osStyle = osMethod + }, startDelay, processedGamma)); + + foreach (var res in processedData) + { + StringBuilder csvString = new StringBuilder(); + string rtType = "Initial Response Time - 3% (ms)"; + string osType = "Overshoot"; + string osSign = "(%)"; + string perType = "Perceived Response Time - 3% (ms)"; + if (rtMethod.Tolerance == 10 && !rtMethod.gammaCorrected) + { + rtType = "Initial Response Time - 10% (ms)"; + perType = "Perceived Response Time - 10% (ms)"; + } + else if (rtMethod.Tolerance == 10 && rtMethod.gammaCorrected) + { + rtType = "Initial Response Time - RGB10 (ms)"; + perType = "Perceived Response Time - RGB10 (ms)"; + } + else if (rtMethod.Tolerance == 5 && rtMethod.gammaCorrected) + { + rtType = "Initial Response Time - RGB5 (ms)"; + perType = "Perceived Response Time - RGB5 (ms)"; + } + if (osMethod.gammaCorrected) + { + osSign = "(RGB)"; + } + if (osMethod.gammaCorrected && (osMethod.endPercent || osMethod.rangePercent)) + { + osSign = "(RGB %)"; + } + string fullFileName = cf.createFileName(resultsFolderPath, "-FULL-OSRTT.csv"); + csvString.AppendLine("Starting RGB,End RGB,Complete Response Time (ms)," + rtType + "," + perType + "," + osType + " " + osSign + ",Visual Response Rating,Input Lag (ms)"); + foreach (ProcessData.processedResult i in res) + { + // save each run to file + csvString.AppendLine( + i.StartingRGB.ToString() + "," + + i.EndRGB.ToString() + "," + + i.compTime.ToString() + "," + + i.initTime.ToString() + "," + + i.perTime.ToString() + "," + + i.Overshoot.ToString() + "," + + i.visualResponseRating.ToString() + "," + + i.inputLag.ToString() + ); + } + if (runSettings != null) { - port.Write("Q0"); + csvString.AppendLine(JsonConvert.SerializeObject(runSettings)); } + string fullFilePath = resultsFolderPath + "\\" + fullFileName; + File.WriteAllText(fullFilePath, csvString.ToString()); + multipleRunData.Add(res); + } + + averageData.AddRange(pd.AverageMultipleRuns(processedData, osMethod)); + // save averaged data to file + string[] folders = resultsFolderPath.Split('\\'); + string monitorInfo = folders.Last(); + StringBuilder avgCsvString = new StringBuilder(); + string avgRtType = "Initial Response Time - 3% (ms)"; + string avgOsType = "Overshoot"; + string avgOsSign = "(%)"; + string avgPerType = "Perceived Response Time - 3% (ms)"; + if (rtMethod.Tolerance == 10 && !rtMethod.gammaCorrected) + { + avgRtType = "Initial Response Time - 10% (ms)"; + avgPerType = "Perceived Response Time - 10% (ms)"; + } + else if (rtMethod.Tolerance == 10 && rtMethod.gammaCorrected) + { + avgRtType = "Initial Response Time - RGB10 (ms)"; + avgPerType = "Perceived Response Time - RGB10 (ms)"; + } + else if (rtMethod.Tolerance == 5 && rtMethod.gammaCorrected) + { + avgRtType = "Initial Response Time - RGB5 (ms)"; + avgPerType = "Perceived Response Time - RGB5 (ms)"; + } + if (osMethod.gammaCorrected) + { + avgOsSign = "(RGB)"; + } + if (osMethod.gammaCorrected && (osMethod.endPercent || osMethod.rangePercent)) + { + avgOsSign = "(RGB %)"; + } + string fileName = monitorInfo + ".csv"; + avgCsvString.AppendLine("Starting RGB,End RGB,Complete Response Time (ms)," + avgRtType + "," + avgPerType + "," + avgOsType + " " + avgOsSign + ",Visual Response Rating,Input Lag (ms)"); + foreach (ProcessData.processedResult i in averageData) + { + // save each run to file + avgCsvString.AppendLine( + i.StartingRGB.ToString() + "," + + i.EndRGB.ToString() + "," + + i.compTime.ToString() + "," + + i.initTime.ToString() + "," + + i.perTime.ToString() + "," + + i.Overshoot.ToString() + "," + + i.visualResponseRating.ToString() + "," + + i.inputLag.ToString() + ); + } + if (runSettings != null) + { + avgCsvString.AppendLine(JsonConvert.SerializeObject(runSettings)); + } + string filePath = resultsFolderPath + "\\" + fileName; + File.WriteAllText(filePath, avgCsvString.ToString()); + if (Properties.Settings.Default.saveXLSX) + { + string[] headers = { "Starting RGB", "End RGB", "Complete Response Time (ms)", avgRtType, avgPerType, avgOsType + " " + avgOsSign, "Visual Response Rating", "Input Lag (ms)" }; + SaveToExcel excel = new SaveToExcel(); + excel.SaveDataToHeatmap(averageData, runSettings, path, resultsFolderPath + "\\" + monitorInfo + ".XLSX", headers); } } + private void runProcessing() + { + ProcessData.rtMethods rt = new ProcessData.rtMethods + { + Name = Properties.Settings.Default.rtName, + Tolerance = Properties.Settings.Default.rtTolerance, + gammaCorrected = Properties.Settings.Default.rtGammaCorrected, + percentage = Properties.Settings.Default.rtPercentage + }; + ProcessData.osMethods os = new ProcessData.osMethods + { + Name = Properties.Settings.Default.osName, + gammaCorrected = Properties.Settings.Default.osGammaCorrected, + endPercent = Properties.Settings.Default.osEndPercent, + rangePercent = Properties.Settings.Default.osRangePercent + }; + int monitor = getSelectedMonitor(); + int fps = Convert.ToInt32(getSelectedFps()); + bool vsync = getVsyncState(); + string runName = resultsFolderPath.Substring(0, resultsFolderPath.LastIndexOf('\\')); + runSettings = new ProcessData.runSettings + { + RunName = runName, + RefreshRate = displayList[monitor].Freq, + FPSLimit = fps, + DateAndTime = DateTime.Now.ToString(), + MonitorName = displayList[monitor].ManufacturerCode + " " + displayList[monitor].Name, + Vsync = vsync, + osMethod = os, + rtMethod = rt + }; + processAllRuns(rt, os); + } + private void initRtOsMethods() + { + rtMethod = new ProcessData.rtMethods + { + Name = Properties.Settings.Default.rtName, + Tolerance = Properties.Settings.Default.rtTolerance, + gammaCorrected = Properties.Settings.Default.rtGammaCorrected, + percentage = Properties.Settings.Default.rtPercentage + }; + osMethod = new ProcessData.osMethods + { + Name = Properties.Settings.Default.osName, + gammaCorrected = Properties.Settings.Default.osGammaCorrected, + endPercent = Properties.Settings.Default.osEndPercent, + rangePercent = Properties.Settings.Default.osRangePercent + }; + } } } diff --git a/OSRTT Launcher/OSRTT Launcher/Main.resx b/OSRTT Launcher/OSRTT Launcher/Main.resx index cb9297c..40ce0da 100644 --- a/OSRTT Launcher/OSRTT Launcher/Main.resx +++ b/OSRTT Launcher/OSRTT Launcher/Main.resx @@ -117,12 +117,18 @@ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + 255, 22 + 34, 22 149, 22 + + 255, 22 + 42 diff --git a/OSRTT Launcher/OSRTT Launcher/OSRTT Launcher.csproj b/OSRTT Launcher/OSRTT Launcher/OSRTT Launcher.csproj index 3b31b5d..e6fc782 100644 --- a/OSRTT Launcher/OSRTT Launcher/OSRTT Launcher.csproj +++ b/OSRTT Launcher/OSRTT Launcher/OSRTT Launcher.csproj @@ -85,17 +85,15 @@ ..\packages\Newtonsoft.Json.13.0.1\lib\net45\Newtonsoft.Json.dll - - ..\packages\ObjectListView.Official.2.9.1\lib\net20\ObjectListView.dll - - - ..\packages\ScottPlot.4.1.33\lib\net461\ScottPlot.dll + + ..\packages\ScottPlot.4.1.41\lib\net461\ScottPlot.dll - - ..\packages\ScottPlot.WinForms.4.1.33\lib\net461\ScottPlot.WinForms.dll + + ..\packages\ScottPlot.WinForms.4.1.41\lib\net461\ScottPlot.WinForms.dll + ..\packages\System.Drawing.Common.6.0.0\lib\net461\System.Drawing.Common.dll @@ -126,6 +124,9 @@ + + + @@ -142,13 +143,35 @@ + + Form + + + HelpView.cs + + + Form + + + ResultsSettings.cs + Form ResultsView.cs + + + UserControl + + + Heatmaps.cs + + + Heatmaps.cs + Main.cs @@ -165,6 +188,12 @@ Resources.resx True + + HelpView.cs + + + ResultsSettings.cs + ResultsView.cs @@ -200,6 +229,8 @@ + + @@ -226,6 +257,15 @@ False True + + {50A7E9B0-70EF-11D1-B75A-00A0C90564FE} + 1 + 0 + 0 + tlbimp + False + True + {0002E157-0000-0000-C000-000000000046} 5 diff --git a/OSRTT Launcher/OSRTT Launcher/ProcessData.cs b/OSRTT Launcher/OSRTT Launcher/ProcessData.cs new file mode 100644 index 0000000..3f14df1 --- /dev/null +++ b/OSRTT Launcher/OSRTT Launcher/ProcessData.cs @@ -0,0 +1,1431 @@ +using System; +using System.Collections.Generic; +using System.Drawing; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace OSRTT_Launcher +{ + public class ProcessData + { + // scratch this shit. + // move all the processing code currently in resultsview to here and make resultsview work with that + // then copy the business logic of averaging the data to a function here + // then migrate main.cs processing & averaging functionality to here with just the primary logic. Handle saving etc in-file for now. + public class rtMethods + { + public string Type { get; set; } + public string Name { get; set; } + public int Tolerance { get; set; } + public bool gammaCorrected { get; set; } + public bool percentage { get; set; } + } + public class osMethods + { + public string Type { get; set; } + public string Name { get; set; } + public bool endPercent { get; set; } + public bool rangePercent { get; set; } + public bool gammaCorrected { get; set; } + } + public class resultSelection + { + public int arrayIndex { get; set; } + public int resultIndex { get; set; } + public rtMethods rtStyle { get; set; } + public osMethods osStyle { get; set; } + } + public class graphResult + { + public double Time { get; set; } + public int startIndex { get; set; } + public int endIndex { get; set; } + public double Overshoot { get; set; } + public int offset { get; set; } + } + public class processedResult + { + public int StartingRGB { get; set; } + public int EndRGB { get; set; } + public double SampleTime { get; set; } + public double initTime { get; set; } + public int initStartIndex { get; set; } + public int initEndIndex { get; set; } + public double perTime { get; set; } + public int perStartIndex { get; set; } + public int perEndIndex { get; set; } + public double compTime { get; set; } + public int compStartIndex { get; set; } + public int compEndIndex { get; set; } + public double Overshoot { get; set; } + public double overshootRGB { get; set; } + public double visualResponseRating { get; set; } + public double inputLag { get; set; } + public int offset { get; set; } + } + public class rawResultData + { + public int StartingRGB { get; set; } + public int EndRGB { get; set; } + public int TimeTaken { get; set; } + public int SampleCount { get; set; } + public double SampleTime { get; set; } + public List Samples { get; set; } + public int noiseLevel { get; set; } + } + public class gammaResult + { + public int RGB { get; set; } + public int LightLevel { get; set; } + } + public class runSettings + { + public string RunName { get; set; } + public string DateAndTime { get; set; } + public string MonitorName { get; set; } + public int RefreshRate { get; set; } + public int FPSLimit { get; set; } + public bool Vsync { get; set; } + public string OverdriveMode { get; set; } + public rtMethods rtMethod { get; set; } + public osMethods osMethod { get; set; } + } + + public graphResult processGraphResult(List> data, resultSelection res, int startDelay, List processedGamma, string rtType) + { + try + { + processedResult proc = ProcessResponseTimeData(data, res, startDelay, processedGamma); + graphResult gProc = new graphResult(); + if (rtType == "complete") + { + gProc.Time = proc.compTime; + gProc.startIndex = proc.compStartIndex; + gProc.endIndex = proc.compEndIndex; + } + else if (rtType == "perceived") + { + gProc.Time = proc.perTime; + gProc.startIndex = proc.perStartIndex; + gProc.endIndex = proc.perEndIndex; + } + else if (rtType == "initial") + { + gProc.Time = proc.initTime; + gProc.startIndex = proc.initStartIndex; + gProc.endIndex = proc.initEndIndex; + } + gProc.Overshoot = proc.Overshoot; + gProc.offset = proc.offset; + return gProc; + } + catch (Exception ex) + { + Console.WriteLine(ex.Message + ex.StackTrace); + return null; + } + } + + public List processGammaTable(List gamma, List data) + { + double[] rgbVals = new double[gamma.Count]; + double[] lightLevelVals = new double[gamma.Count]; + for (int i = 0; i < gamma.Count; i++) + { + int[] dataLine = gamma[i].Skip(300).ToArray(); + int lineAverage = 0; + for (int j = 0; j < (dataLine.Length - 100); j++) + { + lineAverage += dataLine[j]; + } + foreach (var result in data) + { + if (result.StartingRGB == gamma[i][0]) + { + result.noiseLevel = (dataLine.Max() - dataLine.Min()); + } + } + lineAverage /= (dataLine.Length - 100); + rgbVals[i] = gamma[i][0]; + lightLevelVals[i] = lineAverage; + } + int pointsBetween = 51; + if (gamma.Count == 16) + { + pointsBetween = 17; + } + var interpPoints = new ScottPlot.Statistics.Interpolation.NaturalSpline(rgbVals, lightLevelVals, pointsBetween); + List x = new List(); + List y = new List(); + foreach (var p in interpPoints.interpolatedXs) + { + x.Add(Convert.ToInt32(p)); + } + foreach (var p in interpPoints.interpolatedYs) + { + y.Add(Convert.ToInt32(p)); + } + List xy = new List(); + for (int k = 0; k < x.Count; k++) + { + xy.Add(new gammaResult { RGB = x[k], LightLevel = y[k] }); + } + return xy; + } + + PointF[] InterpolatePoints(PointF[] original, int numberRequired) + { + // The new array, ready to return. + PointF[] interpolated = new PointF[numberRequired]; + + // The number of interpolated points in between each pair of existing points. + int between = ((numberRequired - original.Length) / (original.Length - 1)) + 1; + + // Loop through the original list. + int index = 0; + for (int i = 0; i < original.Length - 1; i++) + { + // Add each original point to the interpolated points. + interpolated[index++] = original[i]; + + // The step distances in x and y directions between this original point and the next one. + float stepX = (original[i + 1].X - original[i].X) / ((float)between + 1); + float stepY = (original[i + 1].Y - original[i].Y) / ((float)between + 1); + + // Add the interpolated points at the given steps. + for (int j = 0; j < between; j++) + { + float x = original[i].X + stepX * (float)(j + 1); + float y = original[i].Y + stepY * (float)(j + 1); + + if (index < numberRequired) + { + interpolated[index++] = new PointF(x, y); + } + else + { + break; + } + } + } + return interpolated; + } + + public int processTestLatency(List testLatency) + { + int startDelay = 150; + if (testLatency.Count != 0) + { + int[] tl = testLatency.Skip(5).ToArray(); + for (int n = 0; n < tl.Length; n++) + { + if (tl[n] > 8000) + { + if (n <= 150 && n > 30) + { + startDelay = n - 30; + } + else if (n < 30) + { + n /= 2; + startDelay = n; + } + else if (n > 400) + { + startDelay = 250; + } + break; + } + } + } + return startDelay; + } + + public int[] smoothData(int[] samples, int period) + { + int[] buffer = new int[period]; + int[] averagedSamples = new int[samples.Length]; + int current_index = 0; + for (int a = 0; a < samples.Length; a++) + { + buffer[current_index] = samples[a] / period; + int movAvg = 0; + for (int b = 0; b < period; b++) + { + movAvg += buffer[b]; + } + averagedSamples[a] = movAvg; + current_index = (current_index + 1) % period; + } + return averagedSamples.Skip(period).ToArray(); + } + + public processedResult ProcessResponseTimeData(List> data, resultSelection res, int startDelay, List processedGamma) + { + //This is a long one. This is the code that builds the gamma curve, finds the start/end points and calculates response times and overshoot % (gamma corrected) + List processedData = new List(); + + // First, create gamma array from the data + List localGamma = new List(); + List fullGammaTable = new List(); + List smoothedDataTable = new List(); + + + try //Wrapped whole thing in try just in case + { + // Save start, end, time and sample count then clear the values from the array + int StartingRGB = data[res.arrayIndex][res.resultIndex].StartingRGB; + int EndRGB = data[res.arrayIndex][res.resultIndex].EndRGB; + int TimeTaken = data[res.arrayIndex][res.resultIndex].TimeTaken; + int SampleCount = data[res.arrayIndex][res.resultIndex].SampleCount; + int[] samples = data[res.arrayIndex][res.resultIndex].Samples.ToArray(); + + double SampleTime = ((double)TimeTaken / (double)SampleCount); // Get the time taken between samples + + // Clean up noisy data using moving average function + int period = 10; + int noise = data[res.arrayIndex][res.resultIndex].noiseLevel; + if (noise < 250) + { + period = 20; + } + else if (noise < 500) + { + period = 30; + } + else if (noise < 750) + { + period = 40; + } + else + { + period = 50; + } + + samples = smoothData(samples, period); //Moving average spoils the first 10 samples so currently removing them. + + List fullSmoothedLine = new List { StartingRGB, EndRGB, TimeTaken, SampleCount }; + fullSmoothedLine.AddRange(samples); + smoothedDataTable.Add(fullSmoothedLine.ToArray()); + + int maxValue = samples.Max(); // Find the maximum value for overshoot + int minValue = samples.Min(); // Find the minimum value for undershoot + // Initialise in-use variables + int transStart = 0; + int transEnd = 0; + int initialTransStart = 0; + int initialTransEnd = 0; + int perceivedTransStart = 0; + int perceivedTransEnd = 0; + + double overUnderRGB = 0.0; + + int startMax = samples[5]; // Initialise these variables with a real value + int startMin = samples[5]; // Initialise these variables with a real value + int endMax = samples[samples.Length - 10]; // Initialise these variables with a real value + int endMin = samples[samples.Length - 10]; // Initialise these variables with a real value + + // Build start min/max to compare against + for (int l = 0; l < startDelay; l++) //CHANGE TO 180 FOR RUN 2 DATA + { + if (samples[l] < startMin) + { + startMin = samples[l]; + } + else if (samples[l] > startMax) + { + startMax = samples[l]; + } + } + + // Build end min/max to compare against + for (int m = samples.Length - 5; m > samples.Length - 150; m--) + { + if (samples[m] < endMin) + { + endMin = samples[m]; + } + else if (samples[m] > endMax) + { + endMax = samples[m]; + } + } + + // Search for where the result starts transitioning - start is almost always less sensitive + for (int j = 0; j < samples.Length; j++) + { + if (StartingRGB < EndRGB) + { + if (samples[j] > (startMax)) + { + if (StartingRGB == 0 && EndRGB == 26) + { + if ((samples[j + 50] > (samples[j] + 25) || samples[j + 56] > (samples[j] + 25)) + && (samples[j + 100] > (samples[j] + 50) || samples[j + 106] > (samples[j] + 50)) + && (samples[j + 125] > (samples[j] + 75) || samples[j + 131] > (samples[j] + 75)) + && (samples[j + 150] > (samples[j] + 100) || samples[j + 156] > (samples[j] + 100))) // check the trigger point is actually the trigger and not noise + { + transStart = j; + break; + } + else + { + if (samples[j] > startMax) + { + startMax = samples[j]; + } + } + } + else + { + if ((samples[j + 50] > (samples[j] + 50) || samples[j + 56] > (samples[j] + 50)) + && (samples[j + 100] > (samples[j] + 100) || samples[j + 106] > (samples[j] + 100)) + && (samples[j + 125] > (samples[j] + 100) || samples[j + 131] > (samples[j] + 100)) + && (samples[j + 150] > (samples[j] + 100) || samples[j + 156] > (samples[j] + 100))) // check the trigger point is actually the trigger and not noise + { + transStart = j; + break; + } + else + { + if (samples[j] > startMax) + { + startMax = samples[j]; + } + } + } + } + } + else + { + if (samples[j] < (startMin)) + { + if (StartingRGB == 26 && EndRGB == 0) + { + if ((samples[j + 50] < (samples[j] - 25) || samples[j + 56] < (samples[j] - 25)) + && (samples[j + 100] < (samples[j] - 50) || samples[j + 106] < (samples[j] - 50)) + && (samples[j + 125] < (samples[j] - 75) || samples[j + 131] < (samples[j] - 75)) + && (samples[j + 150] < (samples[j] - 100) || samples[j + 156] < (samples[j] - 100))) // check the trigger point is actually the trigger and not noise + { + transStart = j; + break; + } + else + { + if (samples[j] < startMin) + { + startMin = samples[j]; + } + } + } + else + { + if ((samples[j + 50] < (samples[j] - 50) || samples[j + 56] < (samples[j] - 50)) + && (samples[j + 100] < (samples[j] - 100) || samples[j + 106] < (samples[j] - 100)) + && (samples[j + 125] < (samples[j] - 100) || samples[j + 131] < (samples[j] - 100)) + && (samples[j + 150] < (samples[j] - 100) || samples[j + 156] < (samples[j] - 100))) // check the trigger point is actually the trigger and not noise + { + transStart = j; + break; + } + else + { + if (samples[j] < startMin) + { + startMin = samples[j]; + } + } + } + } + } + } + + // Search for where the result stops transitioning (from the end) - end position is almost always more sensitive hence lower values - also must account for over/undershoot + for (int j = samples.Length - 1; j > 0; j--) + { + if (StartingRGB < EndRGB) + { + if (maxValue > (endMax + 100)) //Check for overshoot + { + if (samples[j] > endMax) + { + if (samples[j - 100] > (samples[j] + 50) && samples[j - 125] > (samples[j] + 50)) // check the trigger point is actually the trigger and not noise + { + transEnd = j; + break; + } + else + { + if (samples[j] > endMax) + { + endMax = samples[j]; + } + } + } + } + else + { + if (samples[j] <= (endMin + 20)) //Check for regular finish point + { + if (StartingRGB == 0 && EndRGB == 26) + { + if ((samples[j - 100] < (samples[j] - 25) || samples[j - 106] < (samples[j] - 25)) + && (samples[j - 125] < (samples[j] - 50) || samples[j - 131] < (samples[j] - 50)) + && (samples[j - 150] < (samples[j] - 75) || samples[j - 156] < (samples[j] - 75))) // check the trigger point is actually the trigger and not noise + { + transEnd = j; + break; + } + else + { + if (samples[j] < endMin) + { + endMin = samples[j]; + } + } + } + else + { + if ((samples[j - 100] < (samples[j] - 50) || samples[j - 106] < (samples[j] - 50)) + && (samples[j - 125] < (samples[j] - 75) || samples[j - 131] < (samples[j] - 75)) + && (samples[j - 150] < (samples[j] - 100) || samples[j - 156] < (samples[j] - 100))) // check the trigger point is actually the trigger and not noise + { + transEnd = j; + break; + } + else + { + if (samples[j] < endMin) + { + endMin = samples[j]; + } + } + } + } + } + } + else + { + if (minValue < (endMin - 100)) //Check for undershoot + { + if (samples[j] < endMin) //Check for under-shot finish point + { + if (samples[j - 100] < (samples[j] - 50) && samples[j - 125] < (samples[j] - 50)) // check the trigger point is actually the trigger and not noise + { + transEnd = j; + break; + } + else + { + if (samples[j] < endMin) + { + endMin = samples[j]; + } + } + } + } + else + { + if (samples[j] > endMax) //Check for regular finish point + { + if (StartingRGB == 26 && EndRGB == 0) + { + if ((samples[j - 100] > (samples[j] + 25) || samples[j - 106] > (samples[j] + 25)) + && (samples[j - 125] > (samples[j] + 50) || samples[j - 131] > (samples[j] + 50)) + && (samples[j - 150] > (samples[j] + 75) || samples[j - 156] > (samples[j] + 75))) + { + transEnd = j; + break; + } + else + { + if (samples[j] > endMax) + { + endMax = samples[j]; + } + } + } + else + { + if ((samples[j - 100] > (samples[j] + 50) || samples[j - 106] > (samples[j] + 50)) + && (samples[j - 125] > (samples[j] + 75) || samples[j - 131] > (samples[j] + 75)) + && (samples[j - 150] > (samples[j] + 100) || samples[j - 156] > (samples[j] + 100))) + { + transEnd = j; + break; + } + else + { + if (samples[j] > endMax) + { + endMax = samples[j]; + } + } + } + } + } + } + } + double startAverage = 0; + double endAverage = 0; + int avgStart = transStart - 200; + int avgEnd = transEnd + 400; + if (transStart < 200) + { + int t = transStart / 5; + avgStart = transStart - t; + } + if ((samples.Length - transEnd) < 400) + { + int t = (samples.Length - transEnd) / 5; + avgEnd = transEnd + t; + } + for (int q = 0; q < avgStart; q++) + { + startAverage += samples[q]; + } + startAverage /= avgStart; + startAverage = Math.Round(startAverage, 0); + for (int q = avgEnd; q < samples.Length; q++) + { + endAverage += samples[q]; + } + endAverage /= (samples.Length - avgEnd); + endAverage = Math.Round(endAverage, 0); + int arrSize = (transEnd - transStart + 100); + if (samples.Length < (transEnd + 100)) + { + arrSize = samples.Length - transStart; + } + if (arrSize < 110) + { + arrSize = 200; + } + int[] transitionSamples = new int[arrSize]; + // Getting min/max from INSIDE the transition window + if ((transEnd - transStart) != 0) + { + Array.Copy(samples, transStart, transitionSamples, 0, arrSize); + maxValue = transitionSamples.Max(); + minValue = transitionSamples.Min(); + } + + /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + // Overshoot calculations + double overshootPercent = 0; + double overshootRGBDiff = 0; + double peakValue = 0; + if (StartingRGB < EndRGB) + { + peakValue = maxValue; + // Dark to light transition + if (maxValue > (endAverage + 100) && maxValue > (processedGamma[EndRGB].LightLevel + 100)) + { + // undershoot may have occurred + Console.WriteLine("Overshoot found"); + // convert maxValue to RGB using gamma table + for (int i = 0; i < processedGamma.Count; i++) + { + // Find what RGB value matches or exceeds the peak light reading for this run + if (maxValue <= processedGamma[i].LightLevel) + { + // Check if peak light reading is closer to upper or lower bound value + int diff1 = processedGamma[i].LightLevel - maxValue; + int diff2 = maxValue - processedGamma[i - 1].LightLevel; + if (diff1 < diff2) + { + overUnderRGB = processedGamma[i].RGB; + } + else + { + overUnderRGB = processedGamma[i - 1].RGB; + } + break; + } + else if (maxValue > processedGamma.Last().LightLevel) + { + if (maxValue > 65500) + { + overUnderRGB = 260; + break; + } + else + { + overUnderRGB = 256; + break; + } + } + } + if (overUnderRGB == -1) + { + //overshootPercent = 100; + } + else + { + overshootRGBDiff = overUnderRGB - EndRGB; + double os = 0; + if (res.osStyle.endPercent) + { + os = (overUnderRGB - EndRGB) / EndRGB; + } + else + { + double range = EndRGB - StartingRGB; + os = overshootRGBDiff / range; + } + os *= 100; + overshootPercent = Math.Round(os, 1); + } + } + } + else + { + peakValue = minValue; + // Light to dark transistion + if (minValue < (endAverage - 100) && minValue < (processedGamma[EndRGB].LightLevel - 100)) + { + // overshoot may have occurred + // convert minValue to RGB using gamma table + Console.WriteLine("Undershoot found"); + for (int i = 0; i < processedGamma.Count; i++) + { + // Find what RGB value matches or exceeds the peak light reading for this run + if (minValue <= processedGamma[i].LightLevel) + { + if (i == 0) + { + overUnderRGB = 0; + break; + } + else + { + // Check if peak light reading is closer to upper or lower bound value + int diff1 = processedGamma[i].LightLevel - minValue; + int diff2 = minValue - processedGamma[i - 1].LightLevel; + if (diff1 < diff2) + { + overUnderRGB = processedGamma[i].RGB; + } + else + { + overUnderRGB = processedGamma[i - 1].RGB; + } + break; + } + } + } + overshootRGBDiff = EndRGB - overUnderRGB; + double os = 0; + if (res.osStyle.endPercent) + { + os = (EndRGB - overUnderRGB) / EndRGB; + } + else + { + double range = StartingRGB - EndRGB; + os = overshootRGBDiff / range; + } + // os *= -1; + os *= 100; + overshootPercent = Math.Round(os, 1); + if (overshootPercent != 0 && overshootPercent < 1) + { + overshootPercent = 0; + } + } + } + + /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + // INITIAL AND PERCEIVED RESPONSE TIME MEASUREMENTS + if (StartingRGB < EndRGB) + { + // Setup variables for start/end trigger points + double start3 = 0; + double endOffsetRGB = 0; + double end3 = 0; + double endPer3 = 0; + double RGBTolerance = res.rtStyle.Tolerance; + double tol = (RGBTolerance / 100); + if (!res.rtStyle.gammaCorrected) + { + double range3 = (endAverage - startAverage) * tol; // Subtract low value from high value to get light level range + start3 = startAverage + range3; // Start trigger value + end3 = endAverage - range3; + if (peakValue > (endAverage + range3)) + { endPer3 = endAverage + range3; } // End trigger value + else + { endPer3 = endAverage - range3; } // End trigger value + } + else + { + if (res.rtStyle.percentage) + { + RGBTolerance = (EndRGB - StartingRGB) * tol; + RGBTolerance = Math.Round(RGBTolerance, 0); + } + endOffsetRGB = EndRGB - RGBTolerance; + start3 = processedGamma[Convert.ToInt32(StartingRGB + RGBTolerance)].LightLevel; + end3 = processedGamma[Convert.ToInt32(EndRGB - RGBTolerance)].LightLevel; + if (overUnderRGB > (EndRGB + RGBTolerance) && overUnderRGB != 0) + { endOffsetRGB = EndRGB + RGBTolerance; } + else if (overUnderRGB == -1) + { endOffsetRGB = EndRGB; } + endPer3 = processedGamma[Convert.ToInt32(endOffsetRGB)].LightLevel; + if (overUnderRGB == -1) + { endPer3 *= 1.02; } + + } + if (endPer3 >= 65520) + { endPer3 = 65500; } + + // Actually find the start/end points + for (int j = (transStart - 20); j < (transEnd + 20); j++) // search samples for start & end trigger points + { + if (samples[j] >= start3 && initialTransStart == 0) // save the FIRST time value exceeds start trigger + { + if ((samples[j + 50] > (start3 + 25) || samples[j + 60] > (start3 + 25)) + && (samples[j + 100] > (start3 + 50) || samples[j + 110] > (start3 + 50)) + && (samples[j + 150] > (start3 + 75) || samples[j + 160] > (start3 + 75))) + { + initialTransStart = j; + perceivedTransStart = j; + } + else if (j == transEnd) + { + initialTransStart = transStart; + perceivedTransStart = transStart; + } + } + else if (samples[j] >= end3) // Save when value exceeds end trigger then break. + { + if ((samples[j + 20] > (end3 + 25) || samples[j + 25] > (end3 + 25)) + && (samples[j + 30] > (end3 + 50) || samples[j + 35] > (end3 + 50)) + && (samples[j + 50] > (end3 + 75) || samples[j + 55] > (end3 + 75))) + { + initialTransEnd = j; + break; + } + else if (j == transEnd) + { + initialTransEnd = transEnd; + break; + } + } + else if (j == transEnd) + { + initialTransEnd = transEnd; + break; + } + } + for (int j = (transEnd + 20); j > (transStart - 20); j--) // search samples for end point + { + if (endOffsetRGB > EndRGB || overUnderRGB == -1 || (endOffsetRGB == 0 && endPer3 > endAverage && overshootPercent > 1)) // Including overshoot in the curve + { + if (samples[j] >= endPer3) // add the same sort of more detailed check like complete for finding this + { + if ((samples[j - 25] > (endPer3 + 25) || samples[j - 30] > (endPer3 + 25)) + && (samples[j - 35] > (endPer3 + 50) || samples[j - 40] > (endPer3 + 50))) + { + perceivedTransEnd = j; + break; + } + } + else if (j == transStart) + { + perceivedTransEnd = j; + break; + } + } + else // No overshoot found within RGB tolerance + { + if (samples[j] <= endPer3) + { + if ((samples[j - 50] < (endPer3 - 25) || samples[j - 60] < (endPer3 - 25)) + && (samples[j - 100] < (endPer3 - 50) || samples[j - 110] < (endPer3 - 50)) + && (samples[j - 150] < (endPer3 - 75) || samples[j - 160] < (endPer3 - 75))) + { + perceivedTransEnd = j; + break; + } + } + else if (j == transStart) + { + perceivedTransEnd = j; + break; + } + } + } + if (perceivedTransEnd < initialTransEnd) + { // just in case the two methods differ slightly and perceived would come out as shorter. + perceivedTransEnd = initialTransEnd; + } + } + else + { + // Setup variables for start/end trigger points + double start3 = 0; + double endOffsetRGB = 0; + double end3 = 0; + double endPer3 = 0; + double RGBTolerance = res.rtStyle.Tolerance; + double tol = (RGBTolerance / 100); + if (!res.rtStyle.gammaCorrected) + { + double range3 = (startAverage - endAverage) * tol; // Subtract low value from high value to get light level range + start3 = startAverage - range3; // Start trigger value + end3 = endAverage + range3; + if (peakValue < (endAverage - range3)) + { endPer3 = endAverage - range3; } // End trigger value + else + { endPer3 = endAverage + range3; } // End trigger value + } + else + { + if (res.rtStyle.percentage) + { + RGBTolerance = (StartingRGB - EndRGB) * tol; + RGBTolerance = Math.Round(RGBTolerance, 0); + } + endOffsetRGB = EndRGB + RGBTolerance; + start3 = processedGamma[Convert.ToInt32(StartingRGB - RGBTolerance)].LightLevel; + end3 = processedGamma[Convert.ToInt32(EndRGB + RGBTolerance)].LightLevel; + if (overUnderRGB < (EndRGB - RGBTolerance) && overUnderRGB != 0) + { + endOffsetRGB = EndRGB - RGBTolerance; + } + endPer3 = processedGamma[Convert.ToInt32(endOffsetRGB)].LightLevel; + } + + for (int j = (transStart - 20); j < (transEnd + 20); j++) // search samples for start point + { + if (samples[j] <= start3 && initialTransStart == 0) // save the FIRST time value exceeds start trigger + { + if ((samples[j + 50] < (start3 - 25) || samples[j + 60] < (start3 - 25)) + && (samples[j + 100] < (start3 - 50) || samples[j + 110] < (start3 - 50)) + && (samples[j + 150] < (start3 - 75) || samples[j + 160] < (start3 - 75))) + { + initialTransStart = j; + perceivedTransStart = j; + } + else if (j == transEnd) + { + initialTransStart = transStart; + perceivedTransStart = transStart; + } + } + else if (samples[j] <= end3) // Save when value exceeds end trigger then break. + { + if ((samples[j + 50] < (end3 - 25) || samples[j + 60] < (end3 - 25)) + && (samples[j + 100] < (end3 - 50) || samples[j + 110] < (end3 - 50)) + && (samples[j + 150] < (end3 - 75) || samples[j + 160] < (end3 - 75))) + { + initialTransEnd = j; + break; + } + else if (j == transEnd) + { + initialTransEnd = transEnd; + break; + } + } + else if (j == transEnd) + { + initialTransEnd = transEnd; + break; + } + } + for (int j = (transEnd + 20); j > (transStart - 20); j--) // search samples for end point + { + if ((endOffsetRGB < EndRGB && endOffsetRGB != 0) || (endPer3 < endAverage && endOffsetRGB == 0 && overshootPercent > 1)) // Including undershoot in the curve + { + if (samples[j] <= endPer3) + { + if ((samples[j - 20] < (endPer3 - 25) || samples[j - 25] < (endPer3 - 25)) + && (samples[j - 30] < (endPer3 - 50) || samples[j - 35] < (endPer3 - 50))) + { + perceivedTransEnd = j; + break; + } + } + else if (j == transStart) + { + perceivedTransEnd = j; + break; + } + } + else // No overshoot found within RGB tolerance + { + if (samples[j] >= endPer3) + { + + if ((samples[j - 50] > (endPer3 + 25) || samples[j - 60] > (endPer3 + 25)) + && (samples[j - 100] > (endPer3 + 50) || samples[j - 110] > (endPer3 + 50)) + && (samples[j - 150] > (endPer3 + 75) || samples[j - 160] > (endPer3 + 75))) + { + perceivedTransEnd = j; + break; + } + } + else if (j == transStart) + { + perceivedTransEnd = j; + break; + } + } + } + if (perceivedTransEnd < initialTransEnd) + { // just in case the two methods differ slightly and perceived would come out as shorter. + perceivedTransEnd = initialTransEnd; + } + } + + double transCount = transEnd - transStart; + double transTime = (transCount * SampleTime) / 1000; + + double initialTransCount = initialTransEnd - initialTransStart; + double initialTransTime = (initialTransCount * SampleTime) / 1000; + + double perceivedTransCount = perceivedTransEnd - perceivedTransStart; + double perceivedTransTime = (perceivedTransCount * SampleTime) / 1000; + + double inputLagTime = (transStart * SampleTime) / 1000; + + double responseTime = Math.Round(transTime, 1); + double initialResponseTime = Math.Round(initialTransTime, 1); + double perceivedResponseTime = Math.Round(perceivedTransTime, 1); + + double visualResponseRating = 100 - (initialResponseTime + perceivedResponseTime); + + double inputLag = Math.Round(inputLagTime, 1); + + + if (res.osStyle.gammaCorrected && !res.osStyle.endPercent && !res.osStyle.rangePercent) + { + // Standard output with total transition time & gamma corrected overshoot value + if (overUnderRGB == -1) + { + overshootRGBDiff = 100; + } + double[] completeResult = new double[] { StartingRGB, EndRGB, responseTime, initialResponseTime, perceivedResponseTime, overshootRGBDiff, visualResponseRating, inputLag }; + processedData.Add(completeResult); + + return new processedResult { + StartingRGB = StartingRGB, + EndRGB = EndRGB, + SampleTime = SampleTime, + perTime = perceivedResponseTime, + perStartIndex = perceivedTransStart, + perEndIndex = perceivedTransEnd, + compTime = responseTime, + compStartIndex = transStart, + compEndIndex = transEnd, + initTime = initialResponseTime, + initStartIndex = initialTransStart, + initEndIndex = initialTransEnd, + Overshoot = overshootRGBDiff, + overshootRGB = overshootRGBDiff, + visualResponseRating = visualResponseRating, + inputLag = inputLag, + offset = period + }; + } + else if (res.osStyle.endPercent || res.osStyle.rangePercent) + { + // Standard output with total transition time & overshoot light level percentage + double os = 0; + if (res.osStyle.gammaCorrected) + { + peakValue = overUnderRGB; + endAverage = EndRGB; + startAverage = StartingRGB; + } + if (res.osStyle.endPercent) + { + if (StartingRGB < EndRGB) + { + if (peakValue > (endAverage + 100) || (res.osStyle.gammaCorrected && peakValue > endAverage)) + { + os = (peakValue - endAverage) / endAverage; + os *= 100; + os = Math.Round(os, 1); + } + } + else + { + if (peakValue < (endAverage - 100) || (res.osStyle.gammaCorrected && peakValue < endAverage)) + { + os = (endAverage - peakValue) / endAverage; + // os *= -1; + os *= 100; + os = Math.Round(os, 1); + } + } + } + else + { + if (StartingRGB < EndRGB) + { + if (peakValue > (endAverage + 100) || (res.osStyle.gammaCorrected && peakValue > endAverage)) + { + double range = endAverage - startAverage; + double peakRange = peakValue - endAverage; + os = peakRange / range; + os *= 100; + os = Math.Round(os, 1); + } + } + else + { + if (peakValue < (endAverage - 100) || (res.osStyle.gammaCorrected && peakValue < endAverage)) + { + double range = startAverage - endAverage; + double peakRange = endAverage - peakValue; + os = peakRange / range; + // os *= -1; + os *= 100; + os = Math.Round(os, 1); + } + } + } + double[] completeResult = new double[] { StartingRGB, EndRGB, responseTime, initialResponseTime, perceivedResponseTime, os, visualResponseRating, inputLag }; + processedData.Add(completeResult); + return new processedResult + { + StartingRGB = StartingRGB, + EndRGB = EndRGB, + SampleTime = SampleTime, + perTime = perceivedResponseTime, + perStartIndex = perceivedTransStart, + perEndIndex = perceivedTransEnd, + compTime = responseTime, + compStartIndex = transStart, + compEndIndex = transEnd, + initTime = initialResponseTime, + initStartIndex = initialTransStart, + initEndIndex = initialTransEnd, + Overshoot = os, + overshootRGB = overshootRGBDiff, + visualResponseRating = visualResponseRating, + inputLag = inputLag, + offset = period + }; + } + else + { + // Standard output with total transition time & gamma corrected overshoot percentage + double[] completeResult = new double[] { StartingRGB, EndRGB, responseTime, initialResponseTime, perceivedResponseTime, overshootPercent, visualResponseRating, inputLag }; + processedData.Add(completeResult); + + return new processedResult + { + StartingRGB = StartingRGB, + EndRGB = EndRGB, + SampleTime = SampleTime, + perTime = perceivedResponseTime, + perStartIndex = perceivedTransStart, + perEndIndex = perceivedTransEnd, + compTime = responseTime, + compStartIndex = transStart, + compEndIndex = transEnd, + initTime = initialResponseTime, + initStartIndex = initialTransStart, + initEndIndex = initialTransEnd, + Overshoot = overshootPercent, + overshootRGB = overshootRGBDiff, + visualResponseRating = visualResponseRating, + inputLag = inputLag, + offset = period + }; + } + } + catch (Exception procEx) + { + Console.WriteLine(procEx.Message + procEx.StackTrace); + return null; + } + } + + public List ProcessFullResults(List> data, resultSelection res, int startDelay, List processedGamma) + { + List processedResults = new List(); + for (int i = 0; i < data[res.arrayIndex].Count; i++) + { + resultSelection resSel = new resultSelection + { + arrayIndex = res.arrayIndex, + resultIndex = i, + rtStyle = res.rtStyle, + osStyle = res.osStyle, + }; + processedResults.Add(ProcessResponseTimeData(data, resSel, startDelay, processedGamma)); + } + return processedResults; + } + public List> ProcessAllResults(List> data, resultSelection res, int startDelay, List processedGamma) + { + List> multipleProcessedResults = new List>(); + for (int k = 0; k < data.Count; k++) + { + List processedResults = new List(); + for (int i = 0; i < data[k].Count; i++) + { + resultSelection resSel = new resultSelection + { + arrayIndex = k, + resultIndex = i, + rtStyle = res.rtStyle, + osStyle = res.osStyle, + }; + processedResults.Add(ProcessResponseTimeData(data, resSel, startDelay, processedGamma)); + } + multipleProcessedResults.Add(processedResults); + } + return multipleProcessedResults; + } + + public static double GetMedian(double[] sourceNumbers) + { + //Framework 2.0 version of this method. there is an easier way in F4 + if (sourceNumbers == null || sourceNumbers.Length == 0) + throw new System.Exception("Median of empty array not defined."); + + //make sure the list is sorted, but use a new array + double[] sortedPNumbers = (double[])sourceNumbers.Clone(); + Array.Sort(sortedPNumbers); + + //get the median + int size = sortedPNumbers.Length; + int mid = size / 2; + double median = (size % 2 != 0) ? (double)sortedPNumbers[mid] : ((double)sortedPNumbers[mid] + (double)sortedPNumbers[mid - 1]) / 2; + return median; + } + public List AverageMultipleRuns(List> multipleRunData, osMethods os) + { + int resultCount = multipleRunData[0].Count(); + List averageData = new List(); + + // Average the data, excluding outliers + for (int k = 0; k < resultCount; k++) + { + processedResult res = new processedResult(); + List rTLine = new List(); + List initRTLine = new List(); + List perRTLine = new List(); + List oSLine = new List(); + List vrrLine = new List(); + List iLLine = new List(); + foreach (var list in multipleRunData) + { + rTLine.Add(list[k].compTime); + initRTLine.Add(list[k].initTime); + perRTLine.Add(list[k].perTime); + oSLine.Add(list[k].Overshoot); + vrrLine.Add(list[k].visualResponseRating); + iLLine.Add(list[k].inputLag); + } + double rtMedian = GetMedian(rTLine.ToArray()); + double initRtMedian = GetMedian(initRTLine.ToArray()); + double perRtMedian = GetMedian(perRTLine.ToArray()); + double osMedian = GetMedian(oSLine.ToArray()); + double vrrMedian = GetMedian(vrrLine.ToArray()); + double ilMedian = GetMedian(iLLine.ToArray()); + int validTimeResults = 0; + int validInitialTimeResults = 0; + int validPerceivedTimeResults = 0; + int validOvershootResults = 0; + int validVRRResults = 0; + int validILResults = 0; + foreach (var o in multipleRunData) + { + if (o[k].compTime < (rtMedian * 1.2) && o[k].compTime > (rtMedian * 0.8)) + { + res.compTime += o[k].compTime; + validTimeResults++; + } + if (o[k].initTime < (initRtMedian * 1.2) && o[k].initTime > (initRtMedian * 0.8)) + { + res.initTime += o[k].initTime; + validInitialTimeResults++; + } + if (o[k].perTime < (perRtMedian * 1.2) && o[k].perTime > (perRtMedian * 0.8)) + { + res.perTime += o[k].perTime; + validPerceivedTimeResults++; + } + if (o[k].Overshoot < (osMedian * 1.2) && o[k].Overshoot > (osMedian * 0.8) && o[k].Overshoot != 0) + { + res.Overshoot += o[k].Overshoot; + validOvershootResults++; + } + if (o[k].visualResponseRating < (vrrMedian * 1.2) && o[k].visualResponseRating > (vrrMedian * 0.8)) + { + res.visualResponseRating += o[k].visualResponseRating; + validVRRResults++; + } + if (o[k].inputLag < (ilMedian * 1.2) && o[k].inputLag > (ilMedian * 0.8)) + { + res.inputLag += o[k].inputLag; + validILResults++; + } + } + res.StartingRGB = multipleRunData[0][k].StartingRGB; + res.EndRGB = multipleRunData[0][k].EndRGB; + res.compTime = res.compTime / validTimeResults; + res.compTime = Math.Round(res.compTime, 1); + res.initTime = res.initTime / validInitialTimeResults; + res.initTime = Math.Round(res.initTime, 1); + res.perTime = res.perTime / validPerceivedTimeResults; + res.perTime = Math.Round(res.perTime, 1); + if (res.Overshoot != 0) + { + res.Overshoot = res.Overshoot / validOvershootResults; + if (os.gammaCorrected && (!os.endPercent || !os.rangePercent)) + { + res.Overshoot = Math.Round(res.Overshoot, 0); + } + else + { + res.Overshoot = Math.Round(res.Overshoot, 1); + } + } + res.visualResponseRating = res.visualResponseRating / validVRRResults; + res.visualResponseRating = Math.Round(res.visualResponseRating, 1); + res.inputLag = res.inputLag / validILResults; + res.inputLag = Math.Round(res.inputLag, 1); + averageData.Add(res); + } + return averageData; + } + + ///////////////////////////////////////////////////////////////////////////// + // Input Lag + //////////////////////////////////////////////////////////////////////////// + + + public class rawInputLagResult + { + public double ClickTime { get; set; } + public int TimeTaken { get; set; } + public int SampleCount { get; set; } + public double SampleTime { get; set; } + public List Samples { get; set; } + } + public class inputLagResult + { + public int shotNumber { get; set; } + public double clickTimeMs { get; set; } + public double inputLag { get; set; } + public double totalInputLag { get; set; } + } + + public List processInputLagData(List inputLagRawData) + { + List inputLagProcessed = new List(); + + int shotNumber = 1; + foreach (rawInputLagResult item in inputLagRawData) + { + // Save start, end, time and sample count then clear the values from the array + double ClickTime = item.ClickTime; + int TimeTaken = item.TimeTaken; + int SampleCount = item.SampleCount; + int[] samples = item.Samples.ToArray(); + + double SampleTime = ((double)TimeTaken / (double)SampleCount); // Get the time taken between samples + + // Clean up noisy data using moving average function + int period = 20; + int[] buffer = new int[period]; + int[] averagedSamples = new int[samples.Length]; + int current_index = 0; + for (int a = 0; a < samples.Length; a++) + { + buffer[current_index] = samples[a] / period; + int movAvg = 0; + for (int b = 0; b < period; b++) + { + movAvg += buffer[b]; + } + averagedSamples[a] = movAvg; + current_index = (current_index + 1) % period; + } + + samples = averagedSamples.Skip(period).ToArray(); //Moving average spoils the first 10 samples so currently removing them. + + // Initialise in-use variables + int transStart = 0; + + int startMax = samples[5]; // Initialise these variables with a real value + int startMin = samples[5]; // Initialise these variables with a real value + int endMax = samples[samples.Length - 10]; // Initialise these variables with a real value + int endMin = samples[samples.Length - 10]; // Initialise these variables with a real value + + // Build start min/max to compare against + for (int l = 0; l < 250; l++) //CHANGE TO 180 FOR RUN 2 DATA + { + if (samples[l] < startMin) + { + startMin = samples[l]; + } + else if (samples[l] > startMax) + { + startMax = samples[l]; + } + } + + // Build end min/max to compare against + for (int m = samples.Length - 5; m > samples.Length - 450; m--) + { + if (samples[m] < endMin) + { + endMin = samples[m]; + } + else if (samples[m] > endMax) + { + endMax = samples[m]; + } + } + + // Search for where the result starts transitioning - start is almost always less sensitive + for (int j = 0; j < samples.Length; j++) + { + if (samples[j] > (startMax)) + { + if ((samples[j + 50] > (samples[j] + 50) || samples[j + 56] > (samples[j] + 50)) + && (samples[j + 100] > (samples[j] + 100) || samples[j + 106] > (samples[j] + 100)) + && (samples[j + 125] > (samples[j] + 100) || samples[j + 131] > (samples[j] + 100)) + && (samples[j + 150] > (samples[j] + 100) || samples[j + 156] > (samples[j] + 100))) // check the trigger point is actually the trigger and not noise + { + transStart = j; + break; + } + else + { + if (samples[j] > startMax) + { + startMax = samples[j]; + } + } + } + } + + Console.WriteLine("ClickTime: " + ClickTime); + double clickTimeMs = ClickTime; + clickTimeMs /= 1000; + Console.WriteLine("ClickTimems: " + clickTimeMs); + double transTime = (transStart * SampleTime) / 1000; + double inputLag = Math.Round(transTime, 3); + + double totalInputLag = (ClickTime + (transStart * SampleTime)) / 1000; + totalInputLag = Math.Round(totalInputLag, 3); + + inputLagResult completeResult = new inputLagResult { shotNumber = shotNumber, clickTimeMs = clickTimeMs, inputLag = inputLag, totalInputLag = totalInputLag }; + inputLagProcessed.Add(completeResult); + shotNumber++; + } + return inputLagProcessed; + } + + } +} diff --git a/OSRTT Launcher/OSRTT Launcher/Properties/Resources.Designer.cs b/OSRTT Launcher/OSRTT Launcher/Properties/Resources.Designer.cs index e3132b8..875fe2a 100644 --- a/OSRTT Launcher/OSRTT Launcher/Properties/Resources.Designer.cs +++ b/OSRTT Launcher/OSRTT Launcher/Properties/Resources.Designer.cs @@ -60,6 +60,26 @@ internal Resources() { } } + /// + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// + internal static System.Drawing.Bitmap arrow_rotate_right { + get { + object obj = ResourceManager.GetObject("arrow_rotate_right", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// + internal static System.Drawing.Bitmap check { + get { + object obj = ResourceManager.GetObject("check", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + /// /// Looks up a localized resource of type System.Drawing.Bitmap. /// diff --git a/OSRTT Launcher/OSRTT Launcher/Properties/Resources.resx b/OSRTT Launcher/OSRTT Launcher/Properties/Resources.resx index b118d1c..3af2a00 100644 --- a/OSRTT Launcher/OSRTT Launcher/Properties/Resources.resx +++ b/OSRTT Launcher/OSRTT Launcher/Properties/Resources.resx @@ -118,6 +118,12 @@ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + ..\Resources\arrow-rotate-right.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\check.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + ..\Resources\icon_small.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a diff --git a/OSRTT Launcher/OSRTT Launcher/Properties/Settings.Designer.cs b/OSRTT Launcher/OSRTT Launcher/Properties/Settings.Designer.cs index ae544fc..dcbfd83 100644 --- a/OSRTT Launcher/OSRTT Launcher/Properties/Settings.Designer.cs +++ b/OSRTT Launcher/OSRTT Launcher/Properties/Settings.Designer.cs @@ -59,66 +59,6 @@ public bool Verbose { } } - [global::System.Configuration.UserScopedSettingAttribute()] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.DefaultSettingValueAttribute("False")] - public bool threePercentSetting { - get { - return ((bool)(this["threePercentSetting"])); - } - set { - this["threePercentSetting"] = value; - } - } - - [global::System.Configuration.UserScopedSettingAttribute()] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.DefaultSettingValueAttribute("False")] - public bool tenPercentSetting { - get { - return ((bool)(this["tenPercentSetting"])); - } - set { - this["tenPercentSetting"] = value; - } - } - - [global::System.Configuration.UserScopedSettingAttribute()] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.DefaultSettingValueAttribute("True")] - public bool gammaCorrectedSetting { - get { - return ((bool)(this["gammaCorrectedSetting"])); - } - set { - this["gammaCorrectedSetting"] = value; - } - } - - [global::System.Configuration.UserScopedSettingAttribute()] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.DefaultSettingValueAttribute("False")] - public bool gammaPercentSetting { - get { - return ((bool)(this["gammaPercentSetting"])); - } - set { - this["gammaPercentSetting"] = value; - } - } - - [global::System.Configuration.UserScopedSettingAttribute()] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.DefaultSettingValueAttribute("True")] - public bool gammaCorrRT { - get { - return ((bool)(this["gammaCorrRT"])); - } - set { - this["gammaCorrRT"] = value; - } - } - [global::System.Configuration.UserScopedSettingAttribute()] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Configuration.DefaultSettingValueAttribute("False")] @@ -155,30 +95,6 @@ public bool USBOutput { } } - [global::System.Configuration.UserScopedSettingAttribute()] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.DefaultSettingValueAttribute("False")] - public bool RGB10Offset { - get { - return ((bool)(this["RGB10Offset"])); - } - set { - this["RGB10Offset"] = value; - } - } - - [global::System.Configuration.UserScopedSettingAttribute()] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.DefaultSettingValueAttribute("True")] - public bool RGB5Offset { - get { - return ((bool)(this["RGB5Offset"])); - } - set { - this["RGB5Offset"] = value; - } - } - [global::System.Configuration.UserScopedSettingAttribute()] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Configuration.DefaultSettingValueAttribute("False")] @@ -205,7 +121,7 @@ public bool SuppressDiagBox { [global::System.Configuration.UserScopedSettingAttribute()] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.DefaultSettingValueAttribute("True")] + [global::System.Configuration.DefaultSettingValueAttribute("False")] public bool saveXLSX { get { return ((bool)(this["saveXLSX"])); @@ -325,10 +241,10 @@ public bool ignoreErrors { [global::System.Configuration.UserScopedSettingAttribute()] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.DefaultSettingValueAttribute("0")] - public int VSyncState { + [global::System.Configuration.DefaultSettingValueAttribute("True")] + public bool VSyncState { get { - return ((int)(this["VSyncState"])); + return ((bool)(this["VSyncState"])); } set { this["VSyncState"] = value; @@ -373,7 +289,7 @@ public string osKey { [global::System.Configuration.UserScopedSettingAttribute()] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.DefaultSettingValueAttribute("95, 85, 75")] + [global::System.Configuration.DefaultSettingValueAttribute("75, 85, 95")] public string vrrKey { get { return ((string)(this["vrrKey"])); @@ -382,5 +298,125 @@ public string vrrKey { this["vrrKey"] = value; } } + + [global::System.Configuration.UserScopedSettingAttribute()] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Configuration.DefaultSettingValueAttribute("RGB 5 Tolerance")] + public string rtName { + get { + return ((string)(this["rtName"])); + } + set { + this["rtName"] = value; + } + } + + [global::System.Configuration.UserScopedSettingAttribute()] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Configuration.DefaultSettingValueAttribute("5")] + public int rtTolerance { + get { + return ((int)(this["rtTolerance"])); + } + set { + this["rtTolerance"] = value; + } + } + + [global::System.Configuration.UserScopedSettingAttribute()] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Configuration.DefaultSettingValueAttribute("True")] + public bool rtGammaCorrected { + get { + return ((bool)(this["rtGammaCorrected"])); + } + set { + this["rtGammaCorrected"] = value; + } + } + + [global::System.Configuration.UserScopedSettingAttribute()] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Configuration.DefaultSettingValueAttribute("False")] + public bool rtPercentage { + get { + return ((bool)(this["rtPercentage"])); + } + set { + this["rtPercentage"] = value; + } + } + + [global::System.Configuration.UserScopedSettingAttribute()] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Configuration.DefaultSettingValueAttribute("RGB Values")] + public string osName { + get { + return ((string)(this["osName"])); + } + set { + this["osName"] = value; + } + } + + [global::System.Configuration.UserScopedSettingAttribute()] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Configuration.DefaultSettingValueAttribute("False")] + public bool osEndPercent { + get { + return ((bool)(this["osEndPercent"])); + } + set { + this["osEndPercent"] = value; + } + } + + [global::System.Configuration.UserScopedSettingAttribute()] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Configuration.DefaultSettingValueAttribute("False")] + public bool osRangePercent { + get { + return ((bool)(this["osRangePercent"])); + } + set { + this["osRangePercent"] = value; + } + } + + [global::System.Configuration.UserScopedSettingAttribute()] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Configuration.DefaultSettingValueAttribute("True")] + public bool osGammaCorrected { + get { + return ((bool)(this["osGammaCorrected"])); + } + set { + this["osGammaCorrected"] = value; + } + } + + [global::System.Configuration.UserScopedSettingAttribute()] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Configuration.DefaultSettingValueAttribute("True")] + public bool shareResults { + get { + return ((bool)(this["shareResults"])); + } + set { + this["shareResults"] = value; + } + } + + [global::System.Configuration.UserScopedSettingAttribute()] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Configuration.DefaultSettingValueAttribute("")] + public string serialNumber { + get { + return ((string)(this["serialNumber"])); + } + set { + this["serialNumber"] = value; + } + } } } diff --git a/OSRTT Launcher/OSRTT Launcher/Properties/Settings.settings b/OSRTT Launcher/OSRTT Launcher/Properties/Settings.settings index 8f43aee..f192748 100644 --- a/OSRTT Launcher/OSRTT Launcher/Properties/Settings.settings +++ b/OSRTT Launcher/OSRTT Launcher/Properties/Settings.settings @@ -11,21 +11,6 @@ False - - False - - - False - - - True - - - False - - - True - False @@ -35,12 +20,6 @@ False - - False - - - True - False @@ -48,7 +27,7 @@ False - True + False False @@ -77,8 +56,8 @@ True - - 0 + + True True @@ -90,7 +69,37 @@ 5,15,20 - 95, 85, 75 + 75, 85, 95 + + + RGB 5 Tolerance + + + 5 + + + True + + + False + + + RGB Values + + + False + + + False + + + True + + + True + + + \ No newline at end of file diff --git a/OSRTT Launcher/OSRTT Launcher/Resources/arrow-rotate-right.png b/OSRTT Launcher/OSRTT Launcher/Resources/arrow-rotate-right.png new file mode 100644 index 0000000000000000000000000000000000000000..b563f54eb58e6fbcd3e30c710454d0c8e92ce44e GIT binary patch literal 57148 zcmeFZd011|)<1rbR$2$B)r!ib*juV1AjoV$>p&d>DkMQ65ClYI2m%2N1Y*6Gss(DT zqKviF06CCE5z#P3QBhH-#Uls;Dk5^2L^upV;J0?Py}rNaec$i*`TpHLx6cL6K6|hA zS>s-7ogUrp>@<7Eq8S*5&EEX&hMgFu@iY8;;*;s{mm3jxSHk~&8usn32n;h>ivCrL zIqw*SVIRK;baRh%r*E_K<%XE}_;L66o5X~K!D;~V53xppyvGR;GmY^HGhJn3hImpf^z;3DT^KJsSarCcuc?2qe~5o*WCW~T_4nGa zecVWH#6Ir-u=U@M|H}b@EuH@N8UHOUAt8Ss5fQmD3fOoL$bY*!!tG#~zv)i@2re(& z*MDOakhv6b6K1zQ+}|gX8}7#C2LC0g?SGNH*xcO2a`D%!z)(MKbi}d`Uhv=G6X{Pg z1gV*?G+VuLm5tjfb2|%jJ4?$IW~=PX%-$`fbNvGM9{g{YTG?4x{FkMmGk!jiKL5wX ze!g~lx#1x`z;IxQP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AZzc<#U<%UG1c`rMhCx}eD$q2;Gdi%@#riO9cO zM^#?j-Yhp$br9t05_sFOinKgrQKL3`-JA@p({WyukpdWJyTF3o3Nj=hQkxmf$L{4F zPutCY8Lep+qoEyrbeF3(n-$slbL^myw_i}&cjqNVlB9HfI50RSbuHkV5L1X4J**eq z)hGjuFVDq%UoV%fc$Sxfh=0= z3Ixb|A`L_f+iUMT`t|+$P3M8ce)p1}bG&od0MrKu4jeXsh~U71!v?mA!GQyZ4IDVI pS-^nVNMMT#Enz literal 0 HcmV?d00001 diff --git a/OSRTT Launcher/OSRTT Launcher/Resources/check.png b/OSRTT Launcher/OSRTT Launcher/Resources/check.png new file mode 100644 index 0000000000000000000000000000000000000000..9e3cdcd6f28c14a61a84aa94afa22df22ee7c78a GIT binary patch literal 22900 zcmYLR3tWs@8$UDCbTeI4C@P~1B5fp!kwFwu?PhK6lPK#txlRgih}@Dzij1*#)hOPC5p$@f3=zJuS7-E+=!KhJrdbIx<#*%%%gWMSUfoDgC$IymqL zLQKL45&N4Oqen7!>?-`nOc^|JF(F>A^shkm`_N^COzb{7aM*ZNR^7vKzc^m~W#9LQ zdo1*D{Qk_BT_=@A7wk-W+SzQ}BKgvHvCpl98|xls^-oLDh2IWyd3EgKm$vf)P{p6$ zTFUE&a{o(M^R|}8)yki6&F5B!%{f*E{(d98_Z1%du#(}4 zu2+rK9~s&vEbO(~x&_?9N%-<{=w72mbSe(1`PVh*f} zC}>>X*!kmbUbgTZJ+C-S>pe~;);6jK3EpZTex%g@DVP@tCE%%p-RG_-tt}Uc@7Rj7@VH zzHxe=K8B9i7SoYO{+fQCpD=dNn8bu_s`~}&4J3T$b;;7Un_QqabbS0()H9>3q<4AGvp>lC7p{OJaFXiGO8#`^Oz$fsZOnBw#Kf-6t&ozIXq z_SvC=4F>3dbrH{_|4SInYk4NjFS+1QezsvaVO>Pe;fAqLzvMXQ)vFB?ch@xA`_aL- zJ_hY%Rd(ve$`*qk`33nU|7xI9vo0c|W_y#G*H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c&rYLpdEn};8b9RGuK>4n?nLC_HfN2 z+Pn~0(Q2dzcA-uCz=}j}bOvok2AKGF^X;zZujvUrrCwh;`&#}(HPB#(N2CE?Ixp?Y zjkl-mPTiIUaKj$7`CYfAj`}8@F^y@r_m0OYE`y72ypb;0Fs$#7o_fdBj~66V<*o?t z5JI)l|32sQKYj@BForhupI>VW^GweUK4ShGI>^|jyT_)VUychP`iJ@4_UJQRdi0O= ZKNrJgS%q%02h(VC^vKY_qr(+z{tvH3 + /// 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.importBtn = new System.Windows.Forms.Button(); + this.SuspendLayout(); + // + // importBtn + // + this.importBtn.Font = new System.Drawing.Font("Arial Black", 16F, System.Drawing.FontStyle.Bold); + this.importBtn.Location = new System.Drawing.Point(12, 12); + this.importBtn.Name = "importBtn"; + this.importBtn.Size = new System.Drawing.Size(237, 75); + this.importBtn.TabIndex = 1; + this.importBtn.Text = "Import CSV"; + this.importBtn.UseVisualStyleBackColor = true; + this.importBtn.Click += new System.EventHandler(this.importBtn_Click); + // + // Results + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.ClientSize = new System.Drawing.Size(800, 450); + this.Controls.Add(this.importBtn); + this.Name = "Results"; + this.Text = "Results"; + this.ResumeLayout(false); + + } + + #endregion + + private System.Windows.Forms.Button importBtn; + } +} \ No newline at end of file diff --git a/OSRTT Launcher/OSRTT Launcher/Results.cs b/OSRTT Launcher/OSRTT Launcher/Results.cs new file mode 100644 index 0000000..2f6e5e5 --- /dev/null +++ b/OSRTT Launcher/OSRTT Launcher/Results.cs @@ -0,0 +1,25 @@ +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 OSRTT_Launcher +{ + public partial class Results : Form + { + public Results() + { + InitializeComponent(); + } + + private void importBtn_Click(object sender, EventArgs e) + { + + } + } +} diff --git a/OSRTT Launcher/OSRTT Launcher/Results.resx b/OSRTT Launcher/OSRTT Launcher/Results.resx new file mode 100644 index 0000000..1af7de1 --- /dev/null +++ b/OSRTT Launcher/OSRTT Launcher/Results.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/OSRTT Launcher/OSRTT Launcher/ResultsSettings.Designer.cs b/OSRTT Launcher/OSRTT Launcher/ResultsSettings.Designer.cs new file mode 100644 index 0000000..7e19cc1 --- /dev/null +++ b/OSRTT Launcher/OSRTT Launcher/ResultsSettings.Designer.cs @@ -0,0 +1,681 @@ + +namespace OSRTT_Launcher +{ + partial class ResultsSettings + { + /// + /// 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.panel2 = new System.Windows.Forms.Panel(); + this.label1 = new System.Windows.Forms.Label(); + this.label3 = new System.Windows.Forms.Label(); + this.toleranceStyleSelect = new System.Windows.Forms.ComboBox(); + this.tolerancePanel = new System.Windows.Forms.Panel(); + this.label4 = new System.Windows.Forms.Label(); + this.testSettingsPanel = new System.Windows.Forms.Panel(); + this.label6 = new System.Windows.Forms.Label(); + this.settingsPresetSelect = new System.Windows.Forms.ComboBox(); + this.overshootStylePanel = new System.Windows.Forms.Panel(); + this.label10 = new System.Windows.Forms.Label(); + this.osPercentSelect = new System.Windows.Forms.ComboBox(); + this.overshootSourcePanel = new System.Windows.Forms.Panel(); + this.label9 = new System.Windows.Forms.Label(); + this.osGammaSelect = new System.Windows.Forms.ComboBox(); + this.toleranceLevelPanel = new System.Windows.Forms.Panel(); + this.Per10Btn = new OSRTT_Launcher.RoundButton(); + this.Per3Btn = new OSRTT_Launcher.RoundButton(); + this.RGB10Btn = new OSRTT_Launcher.RoundButton(); + this.RGB5Btn = new OSRTT_Launcher.RoundButton(); + this.label5 = new System.Windows.Forms.Label(); + this.label7 = new System.Windows.Forms.Label(); + this.panel1 = new System.Windows.Forms.Panel(); + this.label8 = new System.Windows.Forms.Label(); + this.label2 = new System.Windows.Forms.Label(); + this.gammaPanel = new System.Windows.Forms.Panel(); + this.label11 = new System.Windows.Forms.Label(); + this.saveGammaTableSelect = new System.Windows.Forms.ComboBox(); + this.errorsPanel = new System.Windows.Forms.Panel(); + this.label12 = new System.Windows.Forms.Label(); + this.ignoreErrorsSelect = new System.Windows.Forms.ComboBox(); + this.label13 = new System.Windows.Forms.Label(); + this.panel10 = new System.Windows.Forms.Panel(); + this.label14 = new System.Windows.Forms.Label(); + this.suppressMessageBoxPanel = new System.Windows.Forms.Panel(); + this.label15 = new System.Windows.Forms.Label(); + this.suppressMsgBoxSelect = new System.Windows.Forms.ComboBox(); + this.saveToExcelPanel = new System.Windows.Forms.Panel(); + this.label16 = new System.Windows.Forms.Label(); + this.saveToExcelSelect = new System.Windows.Forms.ComboBox(); + this.saveLabel = new System.Windows.Forms.Label(); + this.panel3 = new System.Windows.Forms.Panel(); + this.label17 = new System.Windows.Forms.Label(); + this.shareDataSelect = new System.Windows.Forms.ComboBox(); + this.panel2.SuspendLayout(); + this.tolerancePanel.SuspendLayout(); + this.testSettingsPanel.SuspendLayout(); + this.overshootStylePanel.SuspendLayout(); + this.overshootSourcePanel.SuspendLayout(); + this.toleranceLevelPanel.SuspendLayout(); + this.panel1.SuspendLayout(); + this.gammaPanel.SuspendLayout(); + this.errorsPanel.SuspendLayout(); + this.panel10.SuspendLayout(); + this.suppressMessageBoxPanel.SuspendLayout(); + this.saveToExcelPanel.SuspendLayout(); + this.panel3.SuspendLayout(); + this.SuspendLayout(); + // + // panel2 + // + this.panel2.BackColor = System.Drawing.Color.Khaki; + this.panel2.Controls.Add(this.label1); + this.panel2.Location = new System.Drawing.Point(12, 340); + this.panel2.Name = "panel2"; + this.panel2.Size = new System.Drawing.Size(356, 54); + this.panel2.TabIndex = 1; + // + // label1 + // + this.label1.AutoSize = true; + this.label1.Font = new System.Drawing.Font("Arial", 20F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.label1.ForeColor = System.Drawing.Color.Black; + this.label1.Location = new System.Drawing.Point(4, 11); + this.label1.Name = "label1"; + this.label1.Size = new System.Drawing.Size(337, 32); + this.label1.TabIndex = 11; + this.label1.Text = "Response Time Settings"; + // + // label3 + // + this.label3.AutoSize = true; + this.label3.Font = new System.Drawing.Font("Microsoft Sans Serif", 16F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.label3.ForeColor = System.Drawing.SystemColors.ButtonHighlight; + this.label3.Location = new System.Drawing.Point(16, 403); + this.label3.Name = "label3"; + this.label3.Size = new System.Drawing.Size(348, 130); + this.label3.TabIndex = 11; + this.label3.Text = "Adjust how you would like data\r\nfrom the Response Time Test to\r\nbe processed. Gam" + + "ma Correction\r\nis required for measurements to\r\nuse RGB values as their toleranc" + + "e."; + // + // toleranceStyleSelect + // + this.toleranceStyleSelect.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; + this.toleranceStyleSelect.Font = new System.Drawing.Font("Microsoft Sans Serif", 15.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.toleranceStyleSelect.FormattingEnabled = true; + this.toleranceStyleSelect.Location = new System.Drawing.Point(198, 8); + this.toleranceStyleSelect.Name = "toleranceStyleSelect"; + this.toleranceStyleSelect.Size = new System.Drawing.Size(402, 33); + this.toleranceStyleSelect.TabIndex = 21; + this.toleranceStyleSelect.SelectedIndexChanged += new System.EventHandler(this.toleranceStyleSelect_SelectedIndexChanged); + // + // tolerancePanel + // + this.tolerancePanel.BackColor = System.Drawing.SystemColors.ButtonFace; + this.tolerancePanel.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.tolerancePanel.Controls.Add(this.label4); + this.tolerancePanel.Controls.Add(this.toleranceStyleSelect); + this.tolerancePanel.Location = new System.Drawing.Point(386, 340); + this.tolerancePanel.Name = "tolerancePanel"; + this.tolerancePanel.Size = new System.Drawing.Size(615, 50); + this.tolerancePanel.TabIndex = 22; + // + // label4 + // + this.label4.AutoSize = true; + this.label4.Font = new System.Drawing.Font("Arial", 18F); + this.label4.Location = new System.Drawing.Point(9, 11); + this.label4.Name = "label4"; + this.label4.Size = new System.Drawing.Size(183, 27); + this.label4.TabIndex = 22; + this.label4.Text = "Tolerance Style:"; + // + // testSettingsPanel + // + this.testSettingsPanel.BackColor = System.Drawing.SystemColors.ButtonFace; + this.testSettingsPanel.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.testSettingsPanel.Controls.Add(this.label6); + this.testSettingsPanel.Controls.Add(this.settingsPresetSelect); + this.testSettingsPanel.Location = new System.Drawing.Point(386, 57); + this.testSettingsPanel.Name = "testSettingsPanel"; + this.testSettingsPanel.Size = new System.Drawing.Size(615, 54); + this.testSettingsPanel.TabIndex = 23; + // + // label6 + // + this.label6.AutoSize = true; + this.label6.Font = new System.Drawing.Font("Arial", 18F); + this.label6.Location = new System.Drawing.Point(10, 12); + this.label6.Name = "label6"; + this.label6.Size = new System.Drawing.Size(233, 27); + this.label6.TabIndex = 23; + this.label6.Text = "Test Settings Preset:"; + // + // settingsPresetSelect + // + this.settingsPresetSelect.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; + this.settingsPresetSelect.Font = new System.Drawing.Font("Microsoft Sans Serif", 15.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.settingsPresetSelect.FormattingEnabled = true; + this.settingsPresetSelect.Location = new System.Drawing.Point(249, 9); + this.settingsPresetSelect.Name = "settingsPresetSelect"; + this.settingsPresetSelect.Size = new System.Drawing.Size(351, 33); + this.settingsPresetSelect.TabIndex = 21; + this.settingsPresetSelect.SelectedIndexChanged += new System.EventHandler(this.settingsPresetSelect_SelectedIndexChanged); + // + // overshootStylePanel + // + this.overshootStylePanel.BackColor = System.Drawing.SystemColors.ButtonFace; + this.overshootStylePanel.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.overshootStylePanel.Controls.Add(this.label10); + this.overshootStylePanel.Controls.Add(this.osPercentSelect); + this.overshootStylePanel.Location = new System.Drawing.Point(386, 616); + this.overshootStylePanel.Name = "overshootStylePanel"; + this.overshootStylePanel.Size = new System.Drawing.Size(615, 50); + this.overshootStylePanel.TabIndex = 24; + // + // label10 + // + this.label10.AutoSize = true; + this.label10.Font = new System.Drawing.Font("Arial", 18F); + this.label10.Location = new System.Drawing.Point(10, 11); + this.label10.Name = "label10"; + this.label10.Size = new System.Drawing.Size(190, 27); + this.label10.TabIndex = 24; + this.label10.Text = "Overshoot Style:"; + // + // osPercentSelect + // + this.osPercentSelect.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; + this.osPercentSelect.Font = new System.Drawing.Font("Microsoft Sans Serif", 14F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.osPercentSelect.FormattingEnabled = true; + this.osPercentSelect.Location = new System.Drawing.Point(206, 8); + this.osPercentSelect.Name = "osPercentSelect"; + this.osPercentSelect.Size = new System.Drawing.Size(394, 32); + this.osPercentSelect.TabIndex = 21; + this.osPercentSelect.SelectedIndexChanged += new System.EventHandler(this.osPercentSelect_SelectedIndexChanged); + // + // overshootSourcePanel + // + this.overshootSourcePanel.BackColor = System.Drawing.SystemColors.ButtonFace; + this.overshootSourcePanel.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.overshootSourcePanel.Controls.Add(this.label9); + this.overshootSourcePanel.Controls.Add(this.osGammaSelect); + this.overshootSourcePanel.Location = new System.Drawing.Point(386, 567); + this.overshootSourcePanel.Name = "overshootSourcePanel"; + this.overshootSourcePanel.Size = new System.Drawing.Size(615, 50); + this.overshootSourcePanel.TabIndex = 25; + // + // label9 + // + this.label9.AutoSize = true; + this.label9.Font = new System.Drawing.Font("Arial", 18F); + this.label9.Location = new System.Drawing.Point(10, 11); + this.label9.Name = "label9"; + this.label9.Size = new System.Drawing.Size(212, 27); + this.label9.TabIndex = 23; + this.label9.Text = "Overshoot Source:"; + // + // osGammaSelect + // + this.osGammaSelect.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; + this.osGammaSelect.Font = new System.Drawing.Font("Microsoft Sans Serif", 14F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.osGammaSelect.FormattingEnabled = true; + this.osGammaSelect.Location = new System.Drawing.Point(228, 8); + this.osGammaSelect.Name = "osGammaSelect"; + this.osGammaSelect.Size = new System.Drawing.Size(372, 32); + this.osGammaSelect.TabIndex = 21; + this.osGammaSelect.SelectedIndexChanged += new System.EventHandler(this.osGammaSelect_SelectedIndexChanged); + // + // toleranceLevelPanel + // + this.toleranceLevelPanel.BackColor = System.Drawing.SystemColors.ButtonFace; + this.toleranceLevelPanel.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.toleranceLevelPanel.Controls.Add(this.Per10Btn); + this.toleranceLevelPanel.Controls.Add(this.Per3Btn); + this.toleranceLevelPanel.Controls.Add(this.RGB10Btn); + this.toleranceLevelPanel.Controls.Add(this.RGB5Btn); + this.toleranceLevelPanel.Controls.Add(this.label5); + this.toleranceLevelPanel.Location = new System.Drawing.Point(386, 389); + this.toleranceLevelPanel.Name = "toleranceLevelPanel"; + this.toleranceLevelPanel.Size = new System.Drawing.Size(615, 100); + this.toleranceLevelPanel.TabIndex = 25; + // + // Per10Btn + // + this.Per10Btn.BackColor = System.Drawing.Color.SteelBlue; + this.Per10Btn.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.Per10Btn.ForeColor = System.Drawing.Color.White; + this.Per10Btn.Location = new System.Drawing.Point(465, 43); + this.Per10Btn.Name = "Per10Btn"; + this.Per10Btn.Size = new System.Drawing.Size(135, 45); + this.Per10Btn.TabIndex = 34; + this.Per10Btn.Text = "10% Light Level"; + this.Per10Btn.UseVisualStyleBackColor = false; + this.Per10Btn.Click += new System.EventHandler(this.Per10Btn_Click); + // + // Per3Btn + // + this.Per3Btn.BackColor = System.Drawing.Color.SteelBlue; + this.Per3Btn.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.Per3Btn.ForeColor = System.Drawing.Color.White; + this.Per3Btn.Location = new System.Drawing.Point(315, 43); + this.Per3Btn.Name = "Per3Btn"; + this.Per3Btn.Size = new System.Drawing.Size(135, 45); + this.Per3Btn.TabIndex = 33; + this.Per3Btn.Text = "3% RGB Value"; + this.Per3Btn.UseVisualStyleBackColor = false; + this.Per3Btn.Click += new System.EventHandler(this.Per3Btn_Click); + // + // RGB10Btn + // + this.RGB10Btn.BackColor = System.Drawing.Color.SteelBlue; + this.RGB10Btn.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.RGB10Btn.ForeColor = System.Drawing.Color.White; + this.RGB10Btn.Location = new System.Drawing.Point(165, 43); + this.RGB10Btn.Name = "RGB10Btn"; + this.RGB10Btn.Size = new System.Drawing.Size(135, 45); + this.RGB10Btn.TabIndex = 32; + this.RGB10Btn.Text = "Fixed RGB 10"; + this.RGB10Btn.UseVisualStyleBackColor = false; + this.RGB10Btn.Click += new System.EventHandler(this.RGB10Btn_Click); + // + // RGB5Btn + // + this.RGB5Btn.BackColor = System.Drawing.Color.LimeGreen; + this.RGB5Btn.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.RGB5Btn.ForeColor = System.Drawing.Color.White; + this.RGB5Btn.Location = new System.Drawing.Point(15, 43); + this.RGB5Btn.Name = "RGB5Btn"; + this.RGB5Btn.Size = new System.Drawing.Size(135, 45); + this.RGB5Btn.TabIndex = 31; + this.RGB5Btn.Text = "Fixed RGB 5"; + this.RGB5Btn.UseVisualStyleBackColor = false; + this.RGB5Btn.Click += new System.EventHandler(this.RGB5Btn_Click); + // + // label5 + // + this.label5.AutoSize = true; + this.label5.Font = new System.Drawing.Font("Arial", 18F); + this.label5.Location = new System.Drawing.Point(9, 9); + this.label5.Name = "label5"; + this.label5.Size = new System.Drawing.Size(185, 27); + this.label5.TabIndex = 23; + this.label5.Text = "Tolerance Level:"; + // + // label7 + // + this.label7.AutoSize = true; + this.label7.Font = new System.Drawing.Font("Microsoft Sans Serif", 16F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.label7.ForeColor = System.Drawing.SystemColors.ButtonHighlight; + this.label7.Location = new System.Drawing.Point(16, 630); + this.label7.Name = "label7"; + this.label7.Size = new System.Drawing.Size(335, 130); + this.label7.TabIndex = 13; + this.label7.Text = "Adjust how you would like the\r\nOvershoot data to be calculated\r\nand reported. Gam" + + "ma corrected\r\nmeans using RGB values instead\r\nof raw light level."; + // + // panel1 + // + this.panel1.BackColor = System.Drawing.Color.Khaki; + this.panel1.Controls.Add(this.label8); + this.panel1.Location = new System.Drawing.Point(12, 567); + this.panel1.Name = "panel1"; + this.panel1.Size = new System.Drawing.Size(356, 54); + this.panel1.TabIndex = 12; + // + // label8 + // + this.label8.AutoSize = true; + this.label8.Font = new System.Drawing.Font("Arial", 20F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.label8.ForeColor = System.Drawing.Color.Black; + this.label8.Location = new System.Drawing.Point(4, 10); + this.label8.Name = "label8"; + this.label8.Size = new System.Drawing.Size(268, 32); + this.label8.TabIndex = 11; + this.label8.Text = "Overshoot Settings"; + // + // label2 + // + this.label2.AutoSize = true; + this.label2.Font = new System.Drawing.Font("Microsoft Sans Serif", 20F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.label2.ForeColor = System.Drawing.SystemColors.ButtonHighlight; + this.label2.Location = new System.Drawing.Point(12, 9); + this.label2.Name = "label2"; + this.label2.Size = new System.Drawing.Size(121, 31); + this.label2.TabIndex = 10; + this.label2.Text = "Settings"; + // + // gammaPanel + // + this.gammaPanel.BackColor = System.Drawing.SystemColors.ButtonFace; + this.gammaPanel.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.gammaPanel.Controls.Add(this.label11); + this.gammaPanel.Controls.Add(this.saveGammaTableSelect); + this.gammaPanel.Location = new System.Drawing.Point(386, 488); + this.gammaPanel.Name = "gammaPanel"; + this.gammaPanel.Size = new System.Drawing.Size(615, 50); + this.gammaPanel.TabIndex = 26; + // + // label11 + // + this.label11.AutoSize = true; + this.label11.Font = new System.Drawing.Font("Arial", 18F); + this.label11.Location = new System.Drawing.Point(9, 10); + this.label11.Name = "label11"; + this.label11.Size = new System.Drawing.Size(228, 27); + this.label11.TabIndex = 22; + this.label11.Text = "Save Gamma Table:"; + // + // saveGammaTableSelect + // + this.saveGammaTableSelect.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; + this.saveGammaTableSelect.Font = new System.Drawing.Font("Microsoft Sans Serif", 15.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.saveGammaTableSelect.FormattingEnabled = true; + this.saveGammaTableSelect.Location = new System.Drawing.Point(249, 7); + this.saveGammaTableSelect.Name = "saveGammaTableSelect"; + this.saveGammaTableSelect.Size = new System.Drawing.Size(351, 33); + this.saveGammaTableSelect.TabIndex = 21; + this.saveGammaTableSelect.SelectedIndexChanged += new System.EventHandler(this.saveGammaTableSelect_SelectedIndexChanged); + // + // errorsPanel + // + this.errorsPanel.BackColor = System.Drawing.SystemColors.ButtonFace; + this.errorsPanel.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.errorsPanel.Controls.Add(this.label12); + this.errorsPanel.Controls.Add(this.ignoreErrorsSelect); + this.errorsPanel.Location = new System.Drawing.Point(386, 171); + this.errorsPanel.Name = "errorsPanel"; + this.errorsPanel.Size = new System.Drawing.Size(615, 50); + this.errorsPanel.TabIndex = 27; + // + // label12 + // + this.label12.AutoSize = true; + this.label12.Font = new System.Drawing.Font("Arial", 18F); + this.label12.Location = new System.Drawing.Point(9, 11); + this.label12.Name = "label12"; + this.label12.Size = new System.Drawing.Size(256, 27); + this.label12.TabIndex = 22; + this.label12.Text = "Ignore Mid Run Errors:"; + // + // ignoreErrorsSelect + // + this.ignoreErrorsSelect.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; + this.ignoreErrorsSelect.Font = new System.Drawing.Font("Microsoft Sans Serif", 15.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.ignoreErrorsSelect.FormattingEnabled = true; + this.ignoreErrorsSelect.Location = new System.Drawing.Point(271, 8); + this.ignoreErrorsSelect.Name = "ignoreErrorsSelect"; + this.ignoreErrorsSelect.Size = new System.Drawing.Size(329, 33); + this.ignoreErrorsSelect.TabIndex = 21; + this.ignoreErrorsSelect.SelectedIndexChanged += new System.EventHandler(this.ignoreErrorsSelect_SelectedIndexChanged); + // + // label13 + // + this.label13.AutoSize = true; + this.label13.Font = new System.Drawing.Font("Microsoft Sans Serif", 13F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.label13.ForeColor = System.Drawing.SystemColors.ButtonHighlight; + this.label13.Location = new System.Drawing.Point(14, 114); + this.label13.Name = "label13"; + this.label13.Size = new System.Drawing.Size(364, 88); + this.label13.TabIndex = 29; + this.label13.Text = "Recommended Settings include a fixed \r\nRGB 5 tolerance and RGB value overshoot. \r" + + "\nRunning into errors? Try enabling the\r\nignore mid run errors setting!"; + // + // panel10 + // + this.panel10.BackColor = System.Drawing.Color.Khaki; + this.panel10.Controls.Add(this.label14); + this.panel10.Location = new System.Drawing.Point(12, 57); + this.panel10.Name = "panel10"; + this.panel10.Size = new System.Drawing.Size(356, 54); + this.panel10.TabIndex = 28; + // + // label14 + // + this.label14.AutoSize = true; + this.label14.Font = new System.Drawing.Font("Arial", 20F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.label14.ForeColor = System.Drawing.Color.Black; + this.label14.Location = new System.Drawing.Point(4, 11); + this.label14.Name = "label14"; + this.label14.Size = new System.Drawing.Size(186, 32); + this.label14.TabIndex = 11; + this.label14.Text = "Test Settings"; + // + // suppressMessageBoxPanel + // + this.suppressMessageBoxPanel.BackColor = System.Drawing.SystemColors.ButtonFace; + this.suppressMessageBoxPanel.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.suppressMessageBoxPanel.Controls.Add(this.label15); + this.suppressMessageBoxPanel.Controls.Add(this.suppressMsgBoxSelect); + this.suppressMessageBoxPanel.Location = new System.Drawing.Point(386, 220); + this.suppressMessageBoxPanel.Name = "suppressMessageBoxPanel"; + this.suppressMessageBoxPanel.Size = new System.Drawing.Size(615, 50); + this.suppressMessageBoxPanel.TabIndex = 30; + // + // label15 + // + this.label15.AutoSize = true; + this.label15.Font = new System.Drawing.Font("Arial", 18F); + this.label15.Location = new System.Drawing.Point(10, 10); + this.label15.Name = "label15"; + this.label15.Size = new System.Drawing.Size(297, 27); + this.label15.TabIndex = 22; + this.label15.Text = "Suppress Message Boxes:"; + // + // suppressMsgBoxSelect + // + this.suppressMsgBoxSelect.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; + this.suppressMsgBoxSelect.Font = new System.Drawing.Font("Microsoft Sans Serif", 15.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.suppressMsgBoxSelect.FormattingEnabled = true; + this.suppressMsgBoxSelect.Location = new System.Drawing.Point(312, 7); + this.suppressMsgBoxSelect.Name = "suppressMsgBoxSelect"; + this.suppressMsgBoxSelect.Size = new System.Drawing.Size(288, 33); + this.suppressMsgBoxSelect.TabIndex = 21; + this.suppressMsgBoxSelect.SelectedIndexChanged += new System.EventHandler(this.suppressMsgBoxSelect_SelectedIndexChanged); + // + // saveToExcelPanel + // + this.saveToExcelPanel.BackColor = System.Drawing.SystemColors.ButtonFace; + this.saveToExcelPanel.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.saveToExcelPanel.Controls.Add(this.label16); + this.saveToExcelPanel.Controls.Add(this.saveToExcelSelect); + this.saveToExcelPanel.Location = new System.Drawing.Point(386, 269); + this.saveToExcelPanel.Name = "saveToExcelPanel"; + this.saveToExcelPanel.Size = new System.Drawing.Size(615, 50); + this.saveToExcelPanel.TabIndex = 31; + // + // label16 + // + this.label16.AutoSize = true; + this.label16.Font = new System.Drawing.Font("Arial", 18F); + this.label16.Location = new System.Drawing.Point(9, 10); + this.label16.Name = "label16"; + this.label16.Size = new System.Drawing.Size(280, 27); + this.label16.TabIndex = 22; + this.label16.Text = "Save to Excel Heatmaps:"; + // + // saveToExcelSelect + // + this.saveToExcelSelect.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; + this.saveToExcelSelect.Font = new System.Drawing.Font("Microsoft Sans Serif", 15.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.saveToExcelSelect.FormattingEnabled = true; + this.saveToExcelSelect.Location = new System.Drawing.Point(293, 7); + this.saveToExcelSelect.Name = "saveToExcelSelect"; + this.saveToExcelSelect.Size = new System.Drawing.Size(307, 33); + this.saveToExcelSelect.TabIndex = 21; + this.saveToExcelSelect.SelectedIndexChanged += new System.EventHandler(this.saveToExcelSelect_SelectedIndexChanged); + // + // saveLabel + // + this.saveLabel.AutoSize = true; + this.saveLabel.Font = new System.Drawing.Font("Microsoft Sans Serif", 18F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.saveLabel.ForeColor = System.Drawing.SystemColors.ButtonHighlight; + this.saveLabel.Location = new System.Drawing.Point(805, 14); + this.saveLabel.Name = "saveLabel"; + this.saveLabel.Size = new System.Drawing.Size(196, 29); + this.saveLabel.TabIndex = 32; + this.saveLabel.Text = "Changes Saved"; + // + // panel3 + // + this.panel3.BackColor = System.Drawing.SystemColors.ButtonFace; + this.panel3.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.panel3.Controls.Add(this.label17); + this.panel3.Controls.Add(this.shareDataSelect); + this.panel3.Location = new System.Drawing.Point(386, 122); + this.panel3.Name = "panel3"; + this.panel3.Size = new System.Drawing.Size(615, 50); + this.panel3.TabIndex = 33; + // + // label17 + // + this.label17.AutoSize = true; + this.label17.Font = new System.Drawing.Font("Arial", 18F); + this.label17.Location = new System.Drawing.Point(9, 11); + this.label17.Name = "label17"; + this.label17.Size = new System.Drawing.Size(270, 27); + this.label17.TabIndex = 22; + this.label17.Text = "Share Raw Result Data:"; + // + // shareDataSelect + // + this.shareDataSelect.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; + this.shareDataSelect.Font = new System.Drawing.Font("Microsoft Sans Serif", 15.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.shareDataSelect.FormattingEnabled = true; + this.shareDataSelect.Location = new System.Drawing.Point(285, 8); + this.shareDataSelect.Name = "shareDataSelect"; + this.shareDataSelect.Size = new System.Drawing.Size(315, 33); + this.shareDataSelect.TabIndex = 21; + this.shareDataSelect.SelectedIndexChanged += new System.EventHandler(this.shareDataSelect_SelectedIndexChanged); + // + // ResultsSettings + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.BackColor = System.Drawing.SystemColors.ControlDark; + this.ClientSize = new System.Drawing.Size(1018, 775); + this.Controls.Add(this.panel3); + this.Controls.Add(this.saveLabel); + this.Controls.Add(this.saveToExcelPanel); + this.Controls.Add(this.suppressMessageBoxPanel); + this.Controls.Add(this.label13); + this.Controls.Add(this.panel10); + this.Controls.Add(this.errorsPanel); + this.Controls.Add(this.gammaPanel); + this.Controls.Add(this.label7); + this.Controls.Add(this.panel1); + this.Controls.Add(this.toleranceLevelPanel); + this.Controls.Add(this.tolerancePanel); + this.Controls.Add(this.testSettingsPanel); + this.Controls.Add(this.overshootSourcePanel); + this.Controls.Add(this.overshootStylePanel); + this.Controls.Add(this.label3); + this.Controls.Add(this.panel2); + this.Controls.Add(this.label2); + this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog; + this.MaximizeBox = false; + this.Name = "ResultsSettings"; + this.SizeGripStyle = System.Windows.Forms.SizeGripStyle.Hide; + this.Text = "Test & Results Settings"; + this.Load += new System.EventHandler(this.ResultsSettings_Load); + this.panel2.ResumeLayout(false); + this.panel2.PerformLayout(); + this.tolerancePanel.ResumeLayout(false); + this.tolerancePanel.PerformLayout(); + this.testSettingsPanel.ResumeLayout(false); + this.testSettingsPanel.PerformLayout(); + this.overshootStylePanel.ResumeLayout(false); + this.overshootStylePanel.PerformLayout(); + this.overshootSourcePanel.ResumeLayout(false); + this.overshootSourcePanel.PerformLayout(); + this.toleranceLevelPanel.ResumeLayout(false); + this.toleranceLevelPanel.PerformLayout(); + this.panel1.ResumeLayout(false); + this.panel1.PerformLayout(); + this.gammaPanel.ResumeLayout(false); + this.gammaPanel.PerformLayout(); + this.errorsPanel.ResumeLayout(false); + this.errorsPanel.PerformLayout(); + this.panel10.ResumeLayout(false); + this.panel10.PerformLayout(); + this.suppressMessageBoxPanel.ResumeLayout(false); + this.suppressMessageBoxPanel.PerformLayout(); + this.saveToExcelPanel.ResumeLayout(false); + this.saveToExcelPanel.PerformLayout(); + this.panel3.ResumeLayout(false); + this.panel3.PerformLayout(); + this.ResumeLayout(false); + this.PerformLayout(); + + } + + #endregion + private System.Windows.Forms.Panel panel2; + private System.Windows.Forms.Label label1; + private System.Windows.Forms.Label label3; + private System.Windows.Forms.ComboBox toleranceStyleSelect; + private System.Windows.Forms.Panel tolerancePanel; + private System.Windows.Forms.Label label4; + private System.Windows.Forms.Panel testSettingsPanel; + private System.Windows.Forms.Label label6; + private System.Windows.Forms.ComboBox settingsPresetSelect; + private System.Windows.Forms.Panel overshootStylePanel; + private System.Windows.Forms.Label label10; + private System.Windows.Forms.ComboBox osPercentSelect; + private System.Windows.Forms.Panel overshootSourcePanel; + private System.Windows.Forms.Label label9; + private System.Windows.Forms.ComboBox osGammaSelect; + private System.Windows.Forms.Panel toleranceLevelPanel; + private System.Windows.Forms.Label label5; + private System.Windows.Forms.Label label7; + private System.Windows.Forms.Panel panel1; + private System.Windows.Forms.Label label8; + private System.Windows.Forms.Label label2; + private System.Windows.Forms.Panel gammaPanel; + private System.Windows.Forms.Label label11; + private System.Windows.Forms.ComboBox saveGammaTableSelect; + private System.Windows.Forms.Panel errorsPanel; + private System.Windows.Forms.Label label12; + private System.Windows.Forms.ComboBox ignoreErrorsSelect; + private System.Windows.Forms.Label label13; + private System.Windows.Forms.Panel panel10; + private System.Windows.Forms.Label label14; + private System.Windows.Forms.Panel suppressMessageBoxPanel; + private System.Windows.Forms.Label label15; + private System.Windows.Forms.ComboBox suppressMsgBoxSelect; + private RoundButton RGB5Btn; + private RoundButton Per10Btn; + private RoundButton Per3Btn; + private RoundButton RGB10Btn; + private System.Windows.Forms.Panel saveToExcelPanel; + private System.Windows.Forms.Label label16; + private System.Windows.Forms.ComboBox saveToExcelSelect; + private System.Windows.Forms.Label saveLabel; + private System.Windows.Forms.Panel panel3; + private System.Windows.Forms.Label label17; + private System.Windows.Forms.ComboBox shareDataSelect; + } +} \ No newline at end of file diff --git a/OSRTT Launcher/OSRTT Launcher/ResultsSettings.cs b/OSRTT Launcher/OSRTT Launcher/ResultsSettings.cs new file mode 100644 index 0000000..276dc6d --- /dev/null +++ b/OSRTT Launcher/OSRTT Launcher/ResultsSettings.cs @@ -0,0 +1,659 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Diagnostics; +using System.Drawing; +using System.Drawing.Drawing2D; +using System.Linq; +using System.Resources; +using System.Text; +using System.Threading; +using System.Threading.Tasks; +using System.Windows.Forms; + +namespace OSRTT_Launcher +{ + public partial class ResultsSettings : Form + { + private ResourceManager rm = OSRTT_Launcher.Properties.Resources.ResourceManager; + private Thread saveThread; + public ResultsSettings() + { + InitializeComponent(); + this.Icon = (Icon)rm.GetObject("osrttIcon"); + initSettingsPreset(); + initIgnoreErrors(); + initSupressErrors(); + initShareData(); + initToleranceStyle(); + initGammaTable(); + initSavetoExcelTable(); + initOvershootStyle(); + saveLabel.Visible = false; + } + + private void ResultsSettings_Load(object sender, EventArgs e) + { + + } + + private void SavingLabel() + { + this.saveLabel.Invoke((MethodInvoker)(() => this.saveLabel.Visible = true)); + Thread.Sleep(2500); + this.saveLabel.Invoke((MethodInvoker)(() => this.saveLabel.Visible = false)); + saveThread.Abort(); // I probably don't need to do this. Remind me to look up the documentation on this... + } + + private void initSettingsPreset() + { + settingsPresetSelect.Items.Clear(); + settingsPresetSelect.Items.Add("Recommended"); + settingsPresetSelect.Items.Add("Advanced"); + if (Properties.Settings.Default.advancedSettings) + { + settingsPresetSelect.SelectedIndex = 1; + } + else + { + settingsPresetSelect.SelectedIndex = 0; + tolerancePanel.Enabled = false; + toleranceLevelPanel.Enabled = false; + gammaPanel.Enabled = false; + overshootSourcePanel.Enabled = false; + overshootStylePanel.Enabled = false; + RGB5Btn.BackColor = Color.DarkSeaGreen; + RGB10Btn.BackColor = Color.SlateGray; + Per3Btn.BackColor = Color.SlateGray; + Per10Btn.BackColor = Color.SlateGray; + } + } + private void initIgnoreErrors() + { + ignoreErrorsSelect.Items.Clear(); + ignoreErrorsSelect.Items.Add("Yes"); + ignoreErrorsSelect.Items.Add("No"); + if (Properties.Settings.Default.ignoreErrors) + { + ignoreErrorsSelect.SelectedIndex = 0; + } + else + { + ignoreErrorsSelect.SelectedIndex = 1; + } + } + private void initSupressErrors() + { + suppressMsgBoxSelect.Items.Clear(); + suppressMsgBoxSelect.Items.Add("Yes"); + suppressMsgBoxSelect.Items.Add("No"); + if (Properties.Settings.Default.SuppressDiagBox) + { + suppressMsgBoxSelect.SelectedIndex = 0; + } + else + { + suppressMsgBoxSelect.SelectedIndex = 1; + } + } + private void initShareData() + { + shareDataSelect.Items.Clear(); + shareDataSelect.Items.Add("Yes"); + shareDataSelect.Items.Add("No"); + if (Properties.Settings.Default.shareResults) + { + shareDataSelect.SelectedIndex = 0; + } + else + { + shareDataSelect.SelectedIndex = 1; + } + } + private void initToleranceStyle() + { + toleranceStyleSelect.Items.Clear(); + toleranceStyleSelect.Items.Add("RGB Values (Gamma Corrected)"); + toleranceStyleSelect.Items.Add("Light Level"); + Color selected = Color.DarkSeaGreen; + Color notSelected = Color.SlateGray; + if (Properties.Settings.Default.advancedSettings) + { + selected = Color.LimeGreen; + notSelected = Color.SteelBlue; + } + RGB5Btn.BackColor = notSelected; + RGB10Btn.BackColor = notSelected; + Per3Btn.BackColor = notSelected; + Per10Btn.BackColor = notSelected; + if (Properties.Settings.Default.rtGammaCorrected) + { + toleranceStyleSelect.SelectedIndex = 0; + Per3Btn.Text = "3% RGB Value"; + Per10Btn.Text = "10% RGB Value"; + RGB5Btn.Enabled = true; + RGB10Btn.Enabled = true; + if (Properties.Settings.Default.rtTolerance == 5) + { + RGB5Btn.BackColor = selected; + RGB5Btn.ForeColor = Color.White; + } + else if (Properties.Settings.Default.rtTolerance == 10 && Properties.Settings.Default.rtPercentage) + { + Per10Btn.BackColor = selected; + Per10Btn.ForeColor = Color.White; + } + else if (Properties.Settings.Default.rtTolerance == 10 && !Properties.Settings.Default.rtPercentage) + { + RGB10Btn.BackColor = selected; + RGB10Btn.ForeColor = Color.White; + } + else + { + Per3Btn.BackColor = selected; + Per3Btn.ForeColor = Color.White; + } + } + else + { + toleranceStyleSelect.SelectedIndex = 1; + RGB5Btn.Enabled = false; + RGB5Btn.BackColor = Color.LightSlateGray; + RGB10Btn.Enabled = false; + RGB10Btn.BackColor = Color.LightSlateGray; + Per3Btn.Text = "3% Light Level"; + Per10Btn.Text = "10% Light Level"; + if (Properties.Settings.Default.rtTolerance == 3) + { + Per3Btn.BackColor = Color.LimeGreen; + Per3Btn.ForeColor = Color.White; + } + else + { + Per10Btn.BackColor = Color.LimeGreen; + Per10Btn.ForeColor = Color.White; + } + } + } + private void initGammaTable() + { + saveGammaTableSelect.Items.Clear(); + saveGammaTableSelect.Items.Add("Yes"); + saveGammaTableSelect.Items.Add("No"); + if (Properties.Settings.Default.saveGammaTable) + { + saveGammaTableSelect.SelectedIndex = 0; + } + else + { + saveGammaTableSelect.SelectedIndex = 1; + } + } + private void initSavetoExcelTable() + { + saveToExcelSelect.Items.Clear(); + saveToExcelSelect.Items.Add("Yes"); + saveToExcelSelect.Items.Add("No"); + if (Properties.Settings.Default.saveXLSX) + { + saveToExcelSelect.SelectedIndex = 0; + } + else + { + saveToExcelSelect.SelectedIndex = 1; + } + } + private void initOvershootStyle() + { + osPercentSelect.Items.Clear(); + osGammaSelect.Items.Clear(); + osGammaSelect.Items.Add("RGB Values (Gamma Corrected)"); + osGammaSelect.Items.Add("Light Level"); + if (Properties.Settings.Default.osGammaCorrected) + { + osGammaSelect.SelectedIndex = 0; + osPercentSelect.Items.Add("Raw RGB Values"); + osPercentSelect.Items.Add("Percent Over End RGB"); + osPercentSelect.Items.Add("Percent Over Transition Range"); + if (!Properties.Settings.Default.osRangePercent && !Properties.Settings.Default.osEndPercent) + { + osPercentSelect.SelectedIndex = 0; + } + else if (!Properties.Settings.Default.osRangePercent && Properties.Settings.Default.osEndPercent) + { + osPercentSelect.SelectedIndex = 1; + } + else + { + osPercentSelect.SelectedIndex = 2; + } + } + else + { + osGammaSelect.SelectedIndex = 1; + osPercentSelect.Items.Add("Percent Over End Light Level"); + osPercentSelect.Items.Add("Percent Over Transition Range"); + if (!Properties.Settings.Default.osRangePercent && Properties.Settings.Default.osEndPercent) + { + osPercentSelect.SelectedIndex = 0; + } + else + { + osPercentSelect.SelectedIndex = 1; + } + } + + } + private void settingsPresetSelect_SelectedIndexChanged(object sender, EventArgs e) + { + var ctrl = sender as ComboBox; + if (ctrl.Focused) + { + if (saveThread == null || !saveThread.IsAlive) + { + saveThread = new Thread(new ThreadStart(this.SavingLabel)); + saveThread.Start(); + } + if (settingsPresetSelect.SelectedIndex == 0 && Properties.Settings.Default.advancedSettings) + { + Properties.Settings.Default.advancedSettings = false; + Properties.Settings.Default.rtName = "RGB 5 Tolerance"; + Properties.Settings.Default.rtTolerance = 5 ; + Properties.Settings.Default.rtGammaCorrected = true; + Properties.Settings.Default.rtPercentage = false; + Properties.Settings.Default.saveGammaTable = false; + Properties.Settings.Default.osName = "RGB Values"; + Properties.Settings.Default.osGammaCorrected = true; + Properties.Settings.Default.osEndPercent = false; + Properties.Settings.Default.osRangePercent = false; + tolerancePanel.Enabled = false; + toleranceLevelPanel.Enabled = false; + gammaPanel.Enabled = false; + overshootSourcePanel.Enabled = false; + overshootStylePanel.Enabled = false; + initOvershootStyle(); + initGammaTable(); + initSavetoExcelTable(); + } + else + { + Properties.Settings.Default.advancedSettings = true; + tolerancePanel.Enabled = true; + toleranceLevelPanel.Enabled = true; + gammaPanel.Enabled = true; + overshootSourcePanel.Enabled = true; + overshootStylePanel.Enabled = true; + } + Properties.Settings.Default.Save(); + initToleranceStyle(); + } + } + + private void ignoreErrorsSelect_SelectedIndexChanged(object sender, EventArgs e) + { + var ctrl = sender as ComboBox; + if (ctrl.Focused) + { + if (saveThread == null || !saveThread.IsAlive) + { + saveThread = new Thread(new ThreadStart(this.SavingLabel)); + saveThread.Start(); + } + if (ignoreErrorsSelect.SelectedIndex == 0 && !Properties.Settings.Default.ignoreErrors) + { + Properties.Settings.Default.ignoreErrors = true; + } + else + { + Properties.Settings.Default.ignoreErrors = false; + } + Properties.Settings.Default.Save(); + } + } + + private void suppressMsgBoxSelect_SelectedIndexChanged(object sender, EventArgs e) + { + var ctrl = sender as ComboBox; + if (ctrl.Focused) + { + if (saveThread == null || !saveThread.IsAlive) + { + saveThread = new Thread(new ThreadStart(this.SavingLabel)); + saveThread.Start(); + } + if (suppressMsgBoxSelect.SelectedIndex == 0 && !Properties.Settings.Default.SuppressDiagBox) + { + Properties.Settings.Default.SuppressDiagBox = true; + } + else + { + Properties.Settings.Default.SuppressDiagBox = false; + } + Properties.Settings.Default.Save(); + } + } + + + private void toleranceStyleSelect_SelectedIndexChanged(object sender, EventArgs e) + { + var ctrl = sender as ComboBox; + if (ctrl.Focused) + { + if (saveThread == null || !saveThread.IsAlive) + { + saveThread = new Thread(new ThreadStart(this.SavingLabel)); + saveThread.Start(); + } + if (toleranceStyleSelect.SelectedIndex == 0 && !Properties.Settings.Default.rtGammaCorrected) + { + Per3Btn.Text = "3% RGB Value"; + Per10Btn.Text = "10% RGB Value"; + RGB5Btn.Enabled = true; + RGB10Btn.Enabled = true; + RGB5Btn.BackColor = Color.LimeGreen; + RGB10Btn.BackColor = Color.SteelBlue; + Per3Btn.BackColor = Color.SteelBlue; + Per10Btn.BackColor = Color.SteelBlue; + Properties.Settings.Default.rtGammaCorrected = true; + Properties.Settings.Default.rtTolerance = 5; + Properties.Settings.Default.rtPercentage = false; + Properties.Settings.Default.rtName = "RGB 5 Tolerance"; + } + else + { + Per3Btn.Text = "3% Light Level"; + Per10Btn.Text = "10% Light Level"; + RGB5Btn.Enabled = false; + RGB10Btn.Enabled = false; + Per3Btn.BackColor = Color.LimeGreen; + RGB5Btn.BackColor = Color.SlateGray; + RGB10Btn.BackColor = Color.SlateGray; + Per10Btn.BackColor = Color.SteelBlue; + Properties.Settings.Default.rtGammaCorrected = false; + Properties.Settings.Default.rtTolerance = 3; + Properties.Settings.Default.rtPercentage = true; + Properties.Settings.Default.rtName = "3% of Light Level Tolerance"; + } + Properties.Settings.Default.Save(); + } + } + private void RGB5Btn_Click(object sender, EventArgs e) + { + if (Properties.Settings.Default.rtTolerance != 5) + { + if (saveThread == null || !saveThread.IsAlive) + { + saveThread = new Thread(new ThreadStart(this.SavingLabel)); + saveThread.Start(); + } + RGB5Btn.BackColor = Color.LimeGreen; + RGB10Btn.BackColor = Color.SteelBlue; + Per3Btn.BackColor = Color.SteelBlue; + Per10Btn.BackColor = Color.SteelBlue; + Properties.Settings.Default.rtGammaCorrected = true; + Properties.Settings.Default.rtTolerance = 5; + Properties.Settings.Default.rtPercentage = false; + Properties.Settings.Default.rtName = "RGB 5 Tolerance"; + Properties.Settings.Default.Save(); + } + } + + private void RGB10Btn_Click(object sender, EventArgs e) + { + if (!Properties.Settings.Default.rtName.Contains("RGB 10")) + { + if (saveThread == null || !saveThread.IsAlive) + { + saveThread = new Thread(new ThreadStart(this.SavingLabel)); + saveThread.Start(); + } + RGB10Btn.BackColor = Color.LimeGreen; + RGB5Btn.BackColor = Color.SteelBlue; + Per3Btn.BackColor = Color.SteelBlue; + Per10Btn.BackColor = Color.SteelBlue; + Properties.Settings.Default.rtGammaCorrected = true; + Properties.Settings.Default.rtTolerance = 10; + Properties.Settings.Default.rtPercentage = false; + Properties.Settings.Default.rtName = "RGB 10 Tolerance"; + Properties.Settings.Default.Save(); + } + } + + private void Per3Btn_Click(object sender, EventArgs e) + { + if (Properties.Settings.Default.rtTolerance != 3) + { + if (saveThread == null || !saveThread.IsAlive) + { + saveThread = new Thread(new ThreadStart(this.SavingLabel)); + saveThread.Start(); + } + Per3Btn.BackColor = Color.LimeGreen; + Per10Btn.BackColor = Color.SteelBlue; + if (Properties.Settings.Default.rtGammaCorrected) + { + RGB5Btn.BackColor = Color.SteelBlue; + RGB10Btn.BackColor = Color.SteelBlue; + } + Properties.Settings.Default.rtTolerance = 3; + Properties.Settings.Default.rtPercentage = true; + Properties.Settings.Default.rtName = "3% of Light Level Tolerance"; + Properties.Settings.Default.Save(); + } + } + + private void Per10Btn_Click(object sender, EventArgs e) + { + if (!Properties.Settings.Default.rtName.Contains("10%")) + { + if (saveThread == null || !saveThread.IsAlive) + { + saveThread = new Thread(new ThreadStart(this.SavingLabel)); + saveThread.Start(); + } + Per3Btn.BackColor = Color.SteelBlue; + Per10Btn.BackColor = Color.LimeGreen; + if (Properties.Settings.Default.rtGammaCorrected) + { + RGB5Btn.BackColor = Color.SteelBlue; + RGB10Btn.BackColor = Color.SteelBlue; + } + Properties.Settings.Default.rtTolerance = 10; + Properties.Settings.Default.rtPercentage = true; + if (Properties.Settings.Default.rtGammaCorrected) + { + Properties.Settings.Default.rtName = "10% of RGB Tolerance"; + } + else + { + Properties.Settings.Default.rtName = "10% of Light Level Tolerance"; + } + Properties.Settings.Default.Save(); + } + } + + private void saveGammaTableSelect_SelectedIndexChanged(object sender, EventArgs e) + { + var ctrl = sender as ComboBox; + if (ctrl.Focused) + { + if (saveThread == null || !saveThread.IsAlive) + { + saveThread = new Thread(new ThreadStart(this.SavingLabel)); + saveThread.Start(); + } + if (saveGammaTableSelect.SelectedIndex == 0 && !Properties.Settings.Default.saveGammaTable) + { + Properties.Settings.Default.saveGammaTable = true; + } + else + { + Properties.Settings.Default.saveGammaTable = false; + } + Properties.Settings.Default.Save(); + } + } + + private void osGammaSelect_SelectedIndexChanged(object sender, EventArgs e) + { + var ctrl = sender as ComboBox; + if (ctrl.Focused) + { + if (saveThread == null || !saveThread.IsAlive) + { + saveThread = new Thread(new ThreadStart(this.SavingLabel)); + saveThread.Start(); + } + if (osGammaSelect.SelectedIndex == 0 && !Properties.Settings.Default.osGammaCorrected) + { + Properties.Settings.Default.osGammaCorrected = true; + osPercentSelect.Items.Clear(); + osPercentSelect.Items.Add("Raw RGB Values"); + osPercentSelect.Items.Add("Percent Over End RGB"); + osPercentSelect.Items.Add("Percent Over Transition Range"); + if (Properties.Settings.Default.osRangePercent ) + { + osPercentSelect.SelectedIndex = 2; + } + else if (Properties.Settings.Default.osRangePercent) + { + osPercentSelect.SelectedIndex = 1; + } + else + { + osPercentSelect.SelectedIndex = 0; + } + } + else + { + Properties.Settings.Default.osGammaCorrected = false; + osPercentSelect.Items.Clear(); + osPercentSelect.Items.Add("Percent Over End Light Level"); + osPercentSelect.Items.Add("Percent Over Transition Range"); + if (Properties.Settings.Default.osRangePercent) + { + osPercentSelect.SelectedIndex = 1; + } + else + { + osPercentSelect.SelectedIndex = 0; + } + } + Properties.Settings.Default.Save(); + } + } + + private void osPercentSelect_SelectedIndexChanged(object sender, EventArgs e) + { + var ctrl = sender as ComboBox; + if (ctrl.Focused) + { + if (saveThread == null || !saveThread.IsAlive) + { + saveThread = new Thread(new ThreadStart(this.SavingLabel)); + saveThread.Start(); + } + if (osPercentSelect.SelectedIndex == 0 && (Properties.Settings.Default.osEndPercent || Properties.Settings.Default.osRangePercent)) + { + Properties.Settings.Default.osEndPercent = false; + Properties.Settings.Default.osRangePercent = false; + } + else if (osPercentSelect.SelectedIndex == 1 && !Properties.Settings.Default.osEndPercent) + { + Properties.Settings.Default.osEndPercent = true; + Properties.Settings.Default.osRangePercent = false; + } + else + { + Properties.Settings.Default.osEndPercent = false; + Properties.Settings.Default.osRangePercent = true; + } + Properties.Settings.Default.Save(); + } + } + + private void saveToExcelSelect_SelectedIndexChanged(object sender, EventArgs e) + { + var ctrl = sender as ComboBox; + if (ctrl.Focused) + { + if (saveThread == null || !saveThread.IsAlive) + { + saveThread = new Thread(new ThreadStart(this.SavingLabel)); + saveThread.Start(); + } + if (saveToExcelSelect.SelectedIndex == 0 && !Properties.Settings.Default.saveXLSX) + { + Properties.Settings.Default.saveXLSX = true; + } + else + { + Properties.Settings.Default.saveXLSX = false; + } + Properties.Settings.Default.Save(); + } + } + + private void shareDataSelect_SelectedIndexChanged(object sender, EventArgs e) + { + var ctrl = sender as ComboBox; + if (ctrl.Focused) + { + if (saveThread == null || !saveThread.IsAlive) + { + saveThread = new Thread(new ThreadStart(this.SavingLabel)); + saveThread.Start(); + } + if (shareDataSelect.SelectedIndex == 0 && !Properties.Settings.Default.shareResults) + { + Properties.Settings.Default.shareResults = true; + } + else + { + Properties.Settings.Default.shareResults = false; + } + Properties.Settings.Default.Save(); + } + } + } + + public class RoundButton : Button + { + GraphicsPath GetRoundPath(RectangleF Rect, int radius) + { + float m = 2.75F; + float r2 = radius / 2f; + GraphicsPath GraphPath = new GraphicsPath(); + + GraphPath.AddArc(Rect.X + m, Rect.Y + m, radius, radius, 180, 90); + GraphPath.AddLine(Rect.X + r2 + m, Rect.Y + m, Rect.Width - r2 - m, Rect.Y + m); + GraphPath.AddArc(Rect.X + Rect.Width - radius - m, Rect.Y + m, radius, radius, 270, 90); + GraphPath.AddLine(Rect.Width - m, Rect.Y + r2, Rect.Width - m, Rect.Height - r2 - m); + GraphPath.AddArc(Rect.X + Rect.Width - radius - m, + Rect.Y + Rect.Height - radius - m, radius, radius, 0, 90); + GraphPath.AddLine(Rect.Width - r2 - m, Rect.Height - m, Rect.X + r2 - m, Rect.Height - m); + GraphPath.AddArc(Rect.X + m, Rect.Y + Rect.Height - radius - m, radius, radius, 90, 90); + GraphPath.AddLine(Rect.X + m, Rect.Height - r2 - m, Rect.X + m, Rect.Y + r2 + m); + + GraphPath.CloseFigure(); + return GraphPath; + } + + protected override void OnPaint(PaintEventArgs e) + { + int borderRadius = 25; + float borderThickness = 1.75f; + base.OnPaint(e); + RectangleF Rect = new RectangleF(0, 0, this.Width, this.Height); + GraphicsPath GraphPath = GetRoundPath(Rect, borderRadius); + + this.Region = new Region(GraphPath); + using (Pen pen = new Pen(Color.Silver, borderThickness)) + { + pen.Alignment = PenAlignment.Inset; + e.Graphics.DrawPath(pen, GraphPath); + } + } + } +} diff --git a/OSRTT Launcher/OSRTT Launcher/ResultsSettings.resx b/OSRTT Launcher/OSRTT Launcher/ResultsSettings.resx new file mode 100644 index 0000000..1af7de1 --- /dev/null +++ b/OSRTT Launcher/OSRTT Launcher/ResultsSettings.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/OSRTT Launcher/OSRTT Launcher/ResultsView.Designer.cs b/OSRTT Launcher/OSRTT Launcher/ResultsView.Designer.cs index af8b0a3..9e3dcb2 100644 --- a/OSRTT Launcher/OSRTT Launcher/ResultsView.Designer.cs +++ b/OSRTT Launcher/OSRTT Launcher/ResultsView.Designer.cs @@ -29,33 +29,26 @@ protected override void Dispose(bool disposing) /// private void InitializeComponent() { - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle2 = new System.Windows.Forms.DataGridViewCellStyle(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle3 = new System.Windows.Forms.DataGridViewCellStyle(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle4 = new System.Windows.Forms.DataGridViewCellStyle(); System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(ResultsView)); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle(); this.menuStrip1 = new System.Windows.Forms.MenuStrip(); this.viewToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.perceivedResponseTimeToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.initialResponseTimeToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.completeResponseTimeToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.optionsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.standardResultsPanel = new System.Windows.Forms.Panel(); - this.label12 = new System.Windows.Forms.Label(); - this.from3 = new System.Windows.Forms.Label(); - this.label10 = new System.Windows.Forms.Label(); - this.from2 = new System.Windows.Forms.Label(); - this.label9 = new System.Windows.Forms.Label(); - this.from1 = new System.Windows.Forms.Label(); - this.vrrGridView = new System.Windows.Forms.DataGridView(); - this.osGridView = new System.Windows.Forms.DataGridView(); - this.rtGridView = new System.Windows.Forms.DataGridView(); + this.saveHeatmapsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.asPNGToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.asTransparentPNGToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.toolStrip1 = new System.Windows.Forms.ToolStrip(); this.stdResultsMenuBtn = new System.Windows.Forms.ToolStripButton(); + this.runSelectToolStrip = new System.Windows.Forms.ToolStripComboBox(); this.toolStripSeparator1 = new System.Windows.Forms.ToolStripSeparator(); - this.allResultsMenuBtn = new System.Windows.Forms.ToolStripButton(); - this.toolStripSeparator2 = new System.Windows.Forms.ToolStripSeparator(); this.graphViewMenuBtn = new System.Windows.Forms.ToolStripButton(); this.toolStripSeparator3 = new System.Windows.Forms.ToolStripSeparator(); this.importViewMenuButton = new System.Windows.Forms.ToolStripButton(); this.graphViewPanel = new System.Windows.Forms.Panel(); + this.saveGraphNoHSpanBtn = new System.Windows.Forms.Button(); + this.saveAsPNGBtn = new System.Windows.Forms.Button(); this.latencyLabel = new System.Windows.Forms.Label(); this.label8 = new System.Windows.Forms.Label(); this.label7 = new System.Windows.Forms.Label(); @@ -74,257 +67,118 @@ private void InitializeComponent() this.transSelect1 = new System.Windows.Forms.ComboBox(); this.graphedData = new ScottPlot.FormsPlot(); this.importPanel = new System.Windows.Forms.Panel(); - this.importResultsViewBtn = new System.Windows.Forms.Button(); - this.importRawFolder = new System.Windows.Forms.Button(); + this.panel3 = new System.Windows.Forms.Panel(); + this.label13 = new System.Windows.Forms.Label(); this.importGraphBtn = new System.Windows.Forms.Button(); - this.titleLabel = new System.Windows.Forms.Label(); - this.pictureBox1 = new System.Windows.Forms.PictureBox(); - this.rtStatsGridView = new System.Windows.Forms.DataGridView(); - this.Column1 = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.importRawFolder = new System.Windows.Forms.Button(); + this.panel2 = new System.Windows.Forms.Panel(); + this.importRawFolderBtn = new System.Windows.Forms.Button(); + this.label11 = new System.Windows.Forms.Label(); + this.importRawFileBtn = new System.Windows.Forms.Button(); + this.panel1 = new System.Windows.Forms.Panel(); + this.label5 = new System.Windows.Forms.Label(); + this.importResultsViewBtn = new System.Windows.Forms.Button(); + this.progressBar1 = new System.Windows.Forms.ProgressBar(); + this.heatmaps1 = new OSRTT_Launcher.Heatmaps(); this.menuStrip1.SuspendLayout(); - this.standardResultsPanel.SuspendLayout(); - ((System.ComponentModel.ISupportInitialize)(this.vrrGridView)).BeginInit(); - ((System.ComponentModel.ISupportInitialize)(this.osGridView)).BeginInit(); - ((System.ComponentModel.ISupportInitialize)(this.rtGridView)).BeginInit(); this.toolStrip1.SuspendLayout(); this.graphViewPanel.SuspendLayout(); this.importPanel.SuspendLayout(); - ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit(); - ((System.ComponentModel.ISupportInitialize)(this.rtStatsGridView)).BeginInit(); + this.panel3.SuspendLayout(); + this.panel2.SuspendLayout(); + this.panel1.SuspendLayout(); this.SuspendLayout(); // // menuStrip1 // this.menuStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { this.viewToolStripMenuItem, - this.optionsToolStripMenuItem}); + this.optionsToolStripMenuItem, + this.saveHeatmapsToolStripMenuItem}); this.menuStrip1.Location = new System.Drawing.Point(0, 0); this.menuStrip1.Name = "menuStrip1"; - this.menuStrip1.Size = new System.Drawing.Size(2850, 24); + this.menuStrip1.Size = new System.Drawing.Size(1924, 24); this.menuStrip1.TabIndex = 1; this.menuStrip1.Text = "menuStrip1"; // // viewToolStripMenuItem // + this.viewToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { + this.perceivedResponseTimeToolStripMenuItem, + this.initialResponseTimeToolStripMenuItem, + this.completeResponseTimeToolStripMenuItem}); this.viewToolStripMenuItem.Name = "viewToolStripMenuItem"; this.viewToolStripMenuItem.Size = new System.Drawing.Size(44, 20); this.viewToolStripMenuItem.Text = "View"; // + // perceivedResponseTimeToolStripMenuItem + // + this.perceivedResponseTimeToolStripMenuItem.Checked = true; + this.perceivedResponseTimeToolStripMenuItem.CheckOnClick = true; + this.perceivedResponseTimeToolStripMenuItem.CheckState = System.Windows.Forms.CheckState.Checked; + this.perceivedResponseTimeToolStripMenuItem.Name = "perceivedResponseTimeToolStripMenuItem"; + this.perceivedResponseTimeToolStripMenuItem.Size = new System.Drawing.Size(208, 22); + this.perceivedResponseTimeToolStripMenuItem.Text = "Perceived Response Time"; + this.perceivedResponseTimeToolStripMenuItem.Click += new System.EventHandler(this.perceivedResponseTimeToolStripMenuItem_Click); + // + // initialResponseTimeToolStripMenuItem + // + this.initialResponseTimeToolStripMenuItem.CheckOnClick = true; + this.initialResponseTimeToolStripMenuItem.Name = "initialResponseTimeToolStripMenuItem"; + this.initialResponseTimeToolStripMenuItem.Size = new System.Drawing.Size(208, 22); + this.initialResponseTimeToolStripMenuItem.Text = "Initial Response Time"; + this.initialResponseTimeToolStripMenuItem.Click += new System.EventHandler(this.initialResponseTimeToolStripMenuItem_Click); + // + // completeResponseTimeToolStripMenuItem + // + this.completeResponseTimeToolStripMenuItem.CheckOnClick = true; + this.completeResponseTimeToolStripMenuItem.Name = "completeResponseTimeToolStripMenuItem"; + this.completeResponseTimeToolStripMenuItem.Size = new System.Drawing.Size(208, 22); + this.completeResponseTimeToolStripMenuItem.Text = "Complete Response Time"; + this.completeResponseTimeToolStripMenuItem.Click += new System.EventHandler(this.completeResponseTimeToolStripMenuItem_Click); + // // optionsToolStripMenuItem // this.optionsToolStripMenuItem.Name = "optionsToolStripMenuItem"; this.optionsToolStripMenuItem.Size = new System.Drawing.Size(61, 20); this.optionsToolStripMenuItem.Text = "Options"; + this.optionsToolStripMenuItem.Click += new System.EventHandler(this.optionsToolStripMenuItem_Click); + // + // saveHeatmapsToolStripMenuItem + // + this.saveHeatmapsToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { + this.asPNGToolStripMenuItem, + this.asTransparentPNGToolStripMenuItem}); + this.saveHeatmapsToolStripMenuItem.Name = "saveHeatmapsToolStripMenuItem"; + this.saveHeatmapsToolStripMenuItem.Size = new System.Drawing.Size(100, 20); + this.saveHeatmapsToolStripMenuItem.Text = "Save Heatmaps"; + // + // asPNGToolStripMenuItem + // + this.asPNGToolStripMenuItem.Name = "asPNGToolStripMenuItem"; + this.asPNGToolStripMenuItem.Size = new System.Drawing.Size(178, 22); + this.asPNGToolStripMenuItem.Text = "As PNG"; + this.asPNGToolStripMenuItem.Click += new System.EventHandler(this.asPNGToolStripMenuItem_Click); // - // standardResultsPanel - // - this.standardResultsPanel.Controls.Add(this.rtStatsGridView); - this.standardResultsPanel.Controls.Add(this.pictureBox1); - this.standardResultsPanel.Controls.Add(this.titleLabel); - this.standardResultsPanel.Controls.Add(this.vrrGridView); - this.standardResultsPanel.Controls.Add(this.osGridView); - this.standardResultsPanel.Controls.Add(this.rtGridView); - this.standardResultsPanel.Controls.Add(this.from2); - this.standardResultsPanel.Controls.Add(this.from3); - this.standardResultsPanel.Controls.Add(this.from1); - this.standardResultsPanel.Controls.Add(this.label12); - this.standardResultsPanel.Controls.Add(this.label10); - this.standardResultsPanel.Controls.Add(this.label9); - this.standardResultsPanel.Location = new System.Drawing.Point(1439, 52); - this.standardResultsPanel.Name = "standardResultsPanel"; - this.standardResultsPanel.Size = new System.Drawing.Size(1384, 704); - this.standardResultsPanel.TabIndex = 2; - // - // label12 - // - this.label12.AutoSize = true; - this.label12.Font = new System.Drawing.Font("Microsoft Sans Serif", 16F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.label12.ForeColor = System.Drawing.Color.Black; - this.label12.Location = new System.Drawing.Point(1329, 99); - this.label12.Name = "label12"; - this.label12.Size = new System.Drawing.Size(38, 26); - this.label12.TabIndex = 27; - this.label12.Text = "To"; - // - // from3 - // - this.from3.AutoSize = true; - this.from3.Font = new System.Drawing.Font("Microsoft Sans Serif", 16F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.from3.ForeColor = System.Drawing.Color.Black; - this.from3.Location = new System.Drawing.Point(933, 352); - this.from3.Name = "from3"; - this.from3.Size = new System.Drawing.Size(67, 26); - this.from3.TabIndex = 26; - this.from3.Text = "From"; - // - // label10 - // - this.label10.AutoSize = true; - this.label10.Font = new System.Drawing.Font("Microsoft Sans Serif", 16F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.label10.ForeColor = System.Drawing.Color.Black; - this.label10.Location = new System.Drawing.Point(885, 99); - this.label10.Name = "label10"; - this.label10.Size = new System.Drawing.Size(38, 26); - this.label10.TabIndex = 25; - this.label10.Text = "To"; - // - // from2 - // - this.from2.AutoSize = true; - this.from2.Font = new System.Drawing.Font("Microsoft Sans Serif", 16F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.from2.ForeColor = System.Drawing.Color.Black; - this.from2.Location = new System.Drawing.Point(489, 352); - this.from2.Name = "from2"; - this.from2.Size = new System.Drawing.Size(67, 26); - this.from2.TabIndex = 24; - this.from2.Text = "From"; - // - // label9 - // - this.label9.AutoSize = true; - this.label9.Font = new System.Drawing.Font("Microsoft Sans Serif", 16F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.label9.ForeColor = System.Drawing.Color.Black; - this.label9.Location = new System.Drawing.Point(435, 99); - this.label9.Name = "label9"; - this.label9.Size = new System.Drawing.Size(38, 26); - this.label9.TabIndex = 23; - this.label9.Text = "To"; - // - // from1 - // - this.from1.AutoSize = true; - this.from1.Font = new System.Drawing.Font("Microsoft Sans Serif", 16F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.from1.ForeColor = System.Drawing.Color.Black; - this.from1.Location = new System.Drawing.Point(39, 352); - this.from1.Name = "from1"; - this.from1.Size = new System.Drawing.Size(67, 26); - this.from1.TabIndex = 22; - this.from1.Text = "From"; - // - // vrrGridView - // - this.vrrGridView.AllowUserToAddRows = false; - this.vrrGridView.AllowUserToDeleteRows = false; - this.vrrGridView.AllowUserToResizeColumns = false; - this.vrrGridView.AllowUserToResizeRows = false; - this.vrrGridView.BackgroundColor = System.Drawing.SystemColors.WindowFrame; - this.vrrGridView.ColumnHeadersHeight = 40; - this.vrrGridView.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.DisableResizing; - dataGridViewCellStyle2.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; - dataGridViewCellStyle2.BackColor = System.Drawing.SystemColors.Window; - dataGridViewCellStyle2.Font = new System.Drawing.Font("Calibri", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - dataGridViewCellStyle2.ForeColor = System.Drawing.SystemColors.ControlText; - dataGridViewCellStyle2.SelectionBackColor = System.Drawing.SystemColors.Highlight; - dataGridViewCellStyle2.SelectionForeColor = System.Drawing.SystemColors.HighlightText; - dataGridViewCellStyle2.WrapMode = System.Windows.Forms.DataGridViewTriState.False; - this.vrrGridView.DefaultCellStyle = dataGridViewCellStyle2; - this.vrrGridView.EditMode = System.Windows.Forms.DataGridViewEditMode.EditProgrammatically; - this.vrrGridView.EnableHeadersVisualStyles = false; - this.vrrGridView.GridColor = System.Drawing.Color.White; - this.vrrGridView.Location = new System.Drawing.Point(939, 103); - this.vrrGridView.MultiSelect = false; - this.vrrGridView.Name = "vrrGridView"; - this.vrrGridView.ReadOnly = true; - this.vrrGridView.RowHeadersWidth = 65; - this.vrrGridView.RowHeadersWidthSizeMode = System.Windows.Forms.DataGridViewRowHeadersWidthSizeMode.DisableResizing; - this.vrrGridView.RowTemplate.Height = 35; - this.vrrGridView.RowTemplate.ReadOnly = true; - this.vrrGridView.RowTemplate.Resizable = System.Windows.Forms.DataGridViewTriState.False; - this.vrrGridView.ScrollBars = System.Windows.Forms.ScrollBars.None; - this.vrrGridView.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.CellSelect; - this.vrrGridView.ShowCellToolTips = false; - this.vrrGridView.ShowEditingIcon = false; - this.vrrGridView.Size = new System.Drawing.Size(392, 250); - this.vrrGridView.TabIndex = 9; - // - // osGridView - // - this.osGridView.AllowUserToAddRows = false; - this.osGridView.AllowUserToDeleteRows = false; - this.osGridView.AllowUserToResizeColumns = false; - this.osGridView.AllowUserToResizeRows = false; - this.osGridView.BackgroundColor = System.Drawing.SystemColors.WindowFrame; - this.osGridView.CellBorderStyle = System.Windows.Forms.DataGridViewCellBorderStyle.None; - this.osGridView.ColumnHeadersBorderStyle = System.Windows.Forms.DataGridViewHeaderBorderStyle.None; - this.osGridView.ColumnHeadersHeight = 40; - this.osGridView.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.DisableResizing; - dataGridViewCellStyle3.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; - dataGridViewCellStyle3.BackColor = System.Drawing.SystemColors.Window; - dataGridViewCellStyle3.Font = new System.Drawing.Font("Calibri", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - dataGridViewCellStyle3.ForeColor = System.Drawing.SystemColors.ControlText; - dataGridViewCellStyle3.SelectionBackColor = System.Drawing.SystemColors.Highlight; - dataGridViewCellStyle3.SelectionForeColor = System.Drawing.SystemColors.HighlightText; - dataGridViewCellStyle3.WrapMode = System.Windows.Forms.DataGridViewTriState.False; - this.osGridView.DefaultCellStyle = dataGridViewCellStyle3; - this.osGridView.EditMode = System.Windows.Forms.DataGridViewEditMode.EditProgrammatically; - this.osGridView.EnableHeadersVisualStyles = false; - this.osGridView.GridColor = System.Drawing.Color.White; - this.osGridView.Location = new System.Drawing.Point(494, 103); - this.osGridView.MultiSelect = false; - this.osGridView.Name = "osGridView"; - this.osGridView.ReadOnly = true; - this.osGridView.RowHeadersBorderStyle = System.Windows.Forms.DataGridViewHeaderBorderStyle.None; - this.osGridView.RowHeadersWidth = 65; - this.osGridView.RowHeadersWidthSizeMode = System.Windows.Forms.DataGridViewRowHeadersWidthSizeMode.DisableResizing; - this.osGridView.RowTemplate.Height = 35; - this.osGridView.RowTemplate.ReadOnly = true; - this.osGridView.RowTemplate.Resizable = System.Windows.Forms.DataGridViewTriState.False; - this.osGridView.ScrollBars = System.Windows.Forms.ScrollBars.None; - this.osGridView.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.CellSelect; - this.osGridView.ShowCellToolTips = false; - this.osGridView.ShowEditingIcon = false; - this.osGridView.Size = new System.Drawing.Size(392, 250); - this.osGridView.TabIndex = 8; - // - // rtGridView - // - this.rtGridView.AllowUserToAddRows = false; - this.rtGridView.AllowUserToDeleteRows = false; - this.rtGridView.AllowUserToResizeColumns = false; - this.rtGridView.AllowUserToResizeRows = false; - this.rtGridView.BackgroundColor = System.Drawing.SystemColors.WindowFrame; - this.rtGridView.ColumnHeadersHeight = 40; - this.rtGridView.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.DisableResizing; - dataGridViewCellStyle4.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; - dataGridViewCellStyle4.BackColor = System.Drawing.SystemColors.Window; - dataGridViewCellStyle4.Font = new System.Drawing.Font("Calibri", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - dataGridViewCellStyle4.ForeColor = System.Drawing.SystemColors.ControlText; - dataGridViewCellStyle4.SelectionBackColor = System.Drawing.SystemColors.Highlight; - dataGridViewCellStyle4.SelectionForeColor = System.Drawing.SystemColors.HighlightText; - dataGridViewCellStyle4.WrapMode = System.Windows.Forms.DataGridViewTriState.False; - this.rtGridView.DefaultCellStyle = dataGridViewCellStyle4; - this.rtGridView.EditMode = System.Windows.Forms.DataGridViewEditMode.EditProgrammatically; - this.rtGridView.EnableHeadersVisualStyles = false; - this.rtGridView.GridColor = System.Drawing.Color.White; - this.rtGridView.Location = new System.Drawing.Point(45, 103); - this.rtGridView.MultiSelect = false; - this.rtGridView.Name = "rtGridView"; - this.rtGridView.ReadOnly = true; - this.rtGridView.RowHeadersWidth = 65; - this.rtGridView.RowHeadersWidthSizeMode = System.Windows.Forms.DataGridViewRowHeadersWidthSizeMode.DisableResizing; - this.rtGridView.RowTemplate.Height = 35; - this.rtGridView.RowTemplate.ReadOnly = true; - this.rtGridView.RowTemplate.Resizable = System.Windows.Forms.DataGridViewTriState.False; - this.rtGridView.ScrollBars = System.Windows.Forms.ScrollBars.None; - this.rtGridView.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.CellSelect; - this.rtGridView.ShowCellToolTips = false; - this.rtGridView.ShowEditingIcon = false; - this.rtGridView.Size = new System.Drawing.Size(392, 250); - this.rtGridView.TabIndex = 7; + // asTransparentPNGToolStripMenuItem + // + this.asTransparentPNGToolStripMenuItem.Name = "asTransparentPNGToolStripMenuItem"; + this.asTransparentPNGToolStripMenuItem.Size = new System.Drawing.Size(178, 22); + this.asTransparentPNGToolStripMenuItem.Text = "As Transparent PNG"; + this.asTransparentPNGToolStripMenuItem.Click += new System.EventHandler(this.asTransparentPNGToolStripMenuItem_Click); // // toolStrip1 // this.toolStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { this.stdResultsMenuBtn, + this.runSelectToolStrip, this.toolStripSeparator1, - this.allResultsMenuBtn, - this.toolStripSeparator2, this.graphViewMenuBtn, this.toolStripSeparator3, this.importViewMenuButton}); this.toolStrip1.Location = new System.Drawing.Point(0, 24); this.toolStrip1.Name = "toolStrip1"; - this.toolStrip1.Size = new System.Drawing.Size(2850, 25); + this.toolStrip1.Size = new System.Drawing.Size(1924, 25); this.toolStrip1.TabIndex = 3; this.toolStrip1.Text = "toolStrip1"; // @@ -337,31 +191,24 @@ private void InitializeComponent() this.stdResultsMenuBtn.Image = ((System.Drawing.Image)(resources.GetObject("stdResultsMenuBtn.Image"))); this.stdResultsMenuBtn.ImageTransparentColor = System.Drawing.Color.Magenta; this.stdResultsMenuBtn.Name = "stdResultsMenuBtn"; - this.stdResultsMenuBtn.Size = new System.Drawing.Size(98, 22); - this.stdResultsMenuBtn.Text = "Standard Results"; + this.stdResultsMenuBtn.Size = new System.Drawing.Size(65, 22); + this.stdResultsMenuBtn.Text = "Heatmaps"; this.stdResultsMenuBtn.Click += new System.EventHandler(this.stdResultsMenuBtn_Click); // + // runSelectToolStrip + // + this.runSelectToolStrip.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; + this.runSelectToolStrip.Font = new System.Drawing.Font("Microsoft Sans Serif", 8F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.runSelectToolStrip.Margin = new System.Windows.Forms.Padding(5, 0, 1, 0); + this.runSelectToolStrip.Name = "runSelectToolStrip"; + this.runSelectToolStrip.Size = new System.Drawing.Size(121, 25); + this.runSelectToolStrip.SelectedIndexChanged += new System.EventHandler(this.runSelectToolStrip_SelectedIndexChanged); + // // toolStripSeparator1 // this.toolStripSeparator1.Name = "toolStripSeparator1"; this.toolStripSeparator1.Size = new System.Drawing.Size(6, 25); // - // allResultsMenuBtn - // - this.allResultsMenuBtn.CheckOnClick = true; - this.allResultsMenuBtn.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Text; - this.allResultsMenuBtn.Image = ((System.Drawing.Image)(resources.GetObject("allResultsMenuBtn.Image"))); - this.allResultsMenuBtn.ImageTransparentColor = System.Drawing.Color.Magenta; - this.allResultsMenuBtn.Name = "allResultsMenuBtn"; - this.allResultsMenuBtn.Size = new System.Drawing.Size(65, 22); - this.allResultsMenuBtn.Text = "All Results"; - this.allResultsMenuBtn.Click += new System.EventHandler(this.allResultsMenuBtn_Click); - // - // toolStripSeparator2 - // - this.toolStripSeparator2.Name = "toolStripSeparator2"; - this.toolStripSeparator2.Size = new System.Drawing.Size(6, 25); - // // graphViewMenuBtn // this.graphViewMenuBtn.CheckOnClick = true; @@ -369,8 +216,8 @@ private void InitializeComponent() this.graphViewMenuBtn.Image = ((System.Drawing.Image)(resources.GetObject("graphViewMenuBtn.Image"))); this.graphViewMenuBtn.ImageTransparentColor = System.Drawing.Color.Magenta; this.graphViewMenuBtn.Name = "graphViewMenuBtn"; - this.graphViewMenuBtn.Size = new System.Drawing.Size(128, 22); - this.graphViewMenuBtn.Text = "View Raw Data Graphs"; + this.graphViewMenuBtn.Size = new System.Drawing.Size(100, 22); + this.graphViewMenuBtn.Text = "Raw Data Graphs"; this.graphViewMenuBtn.Click += new System.EventHandler(this.graphViewMenuBtn_Click); // // toolStripSeparator3 @@ -391,6 +238,8 @@ private void InitializeComponent() // // graphViewPanel // + this.graphViewPanel.Controls.Add(this.saveGraphNoHSpanBtn); + this.graphViewPanel.Controls.Add(this.saveAsPNGBtn); this.graphViewPanel.Controls.Add(this.latencyLabel); this.graphViewPanel.Controls.Add(this.label8); this.graphViewPanel.Controls.Add(this.label7); @@ -408,11 +257,39 @@ private void InitializeComponent() this.graphViewPanel.Controls.Add(this.label1); this.graphViewPanel.Controls.Add(this.transSelect1); this.graphViewPanel.Controls.Add(this.graphedData); - this.graphViewPanel.Location = new System.Drawing.Point(1439, 762); + this.graphViewPanel.Location = new System.Drawing.Point(5, 442); this.graphViewPanel.Name = "graphViewPanel"; - this.graphViewPanel.Size = new System.Drawing.Size(1384, 704); + this.graphViewPanel.Size = new System.Drawing.Size(1384, 722); this.graphViewPanel.TabIndex = 4; // + // saveGraphNoHSpanBtn + // + this.saveGraphNoHSpanBtn.BackColor = System.Drawing.SystemColors.ActiveCaption; + this.saveGraphNoHSpanBtn.FlatAppearance.BorderSize = 0; + this.saveGraphNoHSpanBtn.FlatStyle = System.Windows.Forms.FlatStyle.Popup; + this.saveGraphNoHSpanBtn.Font = new System.Drawing.Font("Consolas", 12F, System.Drawing.FontStyle.Bold); + this.saveGraphNoHSpanBtn.Location = new System.Drawing.Point(1187, 646); + this.saveGraphNoHSpanBtn.Name = "saveGraphNoHSpanBtn"; + this.saveGraphNoHSpanBtn.Size = new System.Drawing.Size(182, 53); + this.saveGraphNoHSpanBtn.TabIndex = 25; + this.saveGraphNoHSpanBtn.Text = "Save as PNG\r\nWithout Block"; + this.saveGraphNoHSpanBtn.UseVisualStyleBackColor = false; + this.saveGraphNoHSpanBtn.Click += new System.EventHandler(this.saveGraphNoHSpanBtn_Click); + // + // saveAsPNGBtn + // + this.saveAsPNGBtn.BackColor = System.Drawing.SystemColors.ActiveCaption; + this.saveAsPNGBtn.FlatAppearance.BorderSize = 0; + this.saveAsPNGBtn.FlatStyle = System.Windows.Forms.FlatStyle.Popup; + this.saveAsPNGBtn.Font = new System.Drawing.Font("Consolas", 16F, System.Drawing.FontStyle.Bold); + this.saveAsPNGBtn.Location = new System.Drawing.Point(1187, 606); + this.saveAsPNGBtn.Name = "saveAsPNGBtn"; + this.saveAsPNGBtn.Size = new System.Drawing.Size(182, 34); + this.saveAsPNGBtn.TabIndex = 24; + this.saveAsPNGBtn.Text = "Save as PNG"; + this.saveAsPNGBtn.UseVisualStyleBackColor = false; + this.saveAsPNGBtn.Click += new System.EventHandler(this.saveAsPNGBtn_Click); + // // latencyLabel // this.latencyLabel.Anchor = System.Windows.Forms.AnchorStyles.Top; @@ -452,7 +329,7 @@ private void InitializeComponent() this.runSelectBox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; this.runSelectBox.Font = new System.Drawing.Font("Microsoft Sans Serif", 15.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.runSelectBox.FormattingEnabled = true; - this.runSelectBox.Location = new System.Drawing.Point(180, 10); + this.runSelectBox.Location = new System.Drawing.Point(176, 10); this.runSelectBox.Name = "runSelectBox"; this.runSelectBox.Size = new System.Drawing.Size(140, 33); this.runSelectBox.TabIndex = 20; @@ -508,9 +385,9 @@ private void InitializeComponent() this.overshootStyleListBox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; this.overshootStyleListBox.Font = new System.Drawing.Font("Microsoft Sans Serif", 10F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.overshootStyleListBox.FormattingEnabled = true; - this.overshootStyleListBox.Location = new System.Drawing.Point(1187, 411); + this.overshootStyleListBox.Location = new System.Drawing.Point(1180, 411); this.overshootStyleListBox.Name = "overshootStyleListBox"; - this.overshootStyleListBox.Size = new System.Drawing.Size(182, 24); + this.overshootStyleListBox.Size = new System.Drawing.Size(193, 24); this.overshootStyleListBox.TabIndex = 15; this.overshootStyleListBox.SelectedIndexChanged += new System.EventHandler(this.overshootStyleListBox_SelectedIndexChanged); // @@ -530,9 +407,9 @@ private void InitializeComponent() this.processTypeListBox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; this.processTypeListBox.Font = new System.Drawing.Font("Microsoft Sans Serif", 10F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.processTypeListBox.FormattingEnabled = true; - this.processTypeListBox.Location = new System.Drawing.Point(1187, 232); + this.processTypeListBox.Location = new System.Drawing.Point(1180, 232); this.processTypeListBox.Name = "processTypeListBox"; - this.processTypeListBox.Size = new System.Drawing.Size(182, 24); + this.processTypeListBox.Size = new System.Drawing.Size(193, 24); this.processTypeListBox.TabIndex = 13; this.processTypeListBox.SelectedIndexChanged += new System.EventHandler(this.processTypeListBox_SelectedIndexChanged); // @@ -578,7 +455,7 @@ private void InitializeComponent() this.label1.AutoSize = true; this.label1.Font = new System.Drawing.Font("Microsoft Sans Serif", 16F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.label1.ForeColor = System.Drawing.SystemColors.ButtonHighlight; - this.label1.Location = new System.Drawing.Point(376, 13); + this.label1.Location = new System.Drawing.Point(376, 14); this.label1.Name = "label1"; this.label1.Size = new System.Drawing.Size(217, 26); this.label1.TabIndex = 2; @@ -589,42 +466,65 @@ private void InitializeComponent() this.transSelect1.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; this.transSelect1.Font = new System.Drawing.Font("Microsoft Sans Serif", 15.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.transSelect1.FormattingEnabled = true; - this.transSelect1.Location = new System.Drawing.Point(599, 10); + this.transSelect1.Location = new System.Drawing.Point(595, 10); this.transSelect1.Name = "transSelect1"; - this.transSelect1.Size = new System.Drawing.Size(306, 33); + this.transSelect1.Size = new System.Drawing.Size(328, 33); this.transSelect1.TabIndex = 1; this.transSelect1.SelectedIndexChanged += new System.EventHandler(this.transSelect1_SelectedIndexChanged); // // graphedData // - this.graphedData.Location = new System.Drawing.Point(7, 51); + this.graphedData.Location = new System.Drawing.Point(6, 51); this.graphedData.Name = "graphedData"; - this.graphedData.Size = new System.Drawing.Size(1183, 650); + this.graphedData.Size = new System.Drawing.Size(1184, 666); this.graphedData.TabIndex = 0; // // importPanel // - this.importPanel.Controls.Add(this.importResultsViewBtn); - this.importPanel.Controls.Add(this.importRawFolder); - this.importPanel.Controls.Add(this.importGraphBtn); + this.importPanel.Controls.Add(this.panel3); + this.importPanel.Controls.Add(this.panel2); + this.importPanel.Controls.Add(this.panel1); this.importPanel.Location = new System.Drawing.Point(5, 52); this.importPanel.Name = "importPanel"; - this.importPanel.Size = new System.Drawing.Size(1384, 704); + this.importPanel.Size = new System.Drawing.Size(1082, 290); this.importPanel.TabIndex = 5; // - // importResultsViewBtn + // panel3 + // + this.panel3.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.panel3.Controls.Add(this.label13); + this.panel3.Controls.Add(this.importGraphBtn); + this.panel3.Controls.Add(this.importRawFolder); + this.panel3.Location = new System.Drawing.Point(755, 3); + this.panel3.Name = "panel3"; + this.panel3.Size = new System.Drawing.Size(314, 280); + this.panel3.TabIndex = 25; + // + // label13 + // + this.label13.AutoSize = true; + this.label13.BackColor = System.Drawing.Color.Transparent; + this.label13.Font = new System.Drawing.Font("Microsoft Sans Serif", 24F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.label13.ForeColor = System.Drawing.Color.Black; + this.label13.Location = new System.Drawing.Point(23, 9); + this.label13.Name = "label13"; + this.label13.Size = new System.Drawing.Size(270, 37); + this.label13.TabIndex = 23; + this.label13.Text = "Graph Raw Data"; // - this.importResultsViewBtn.BackColor = System.Drawing.SystemColors.ActiveCaption; - this.importResultsViewBtn.FlatAppearance.BorderSize = 0; - this.importResultsViewBtn.FlatStyle = System.Windows.Forms.FlatStyle.Popup; - this.importResultsViewBtn.Font = new System.Drawing.Font("Consolas", 18F, System.Drawing.FontStyle.Bold); - this.importResultsViewBtn.Location = new System.Drawing.Point(41, 102); - this.importResultsViewBtn.Name = "importResultsViewBtn"; - this.importResultsViewBtn.Size = new System.Drawing.Size(309, 93); - this.importResultsViewBtn.TabIndex = 9; - this.importResultsViewBtn.Text = "Import Processed Data File for Heatmaps"; - this.importResultsViewBtn.UseVisualStyleBackColor = false; - this.importResultsViewBtn.Click += new System.EventHandler(this.importResultsViewBtn_Click); + // importGraphBtn + // + this.importGraphBtn.BackColor = System.Drawing.SystemColors.ActiveCaption; + this.importGraphBtn.FlatAppearance.BorderSize = 0; + this.importGraphBtn.FlatStyle = System.Windows.Forms.FlatStyle.Popup; + this.importGraphBtn.Font = new System.Drawing.Font("Consolas", 18F, System.Drawing.FontStyle.Bold); + this.importGraphBtn.Location = new System.Drawing.Point(43, 59); + this.importGraphBtn.Name = "importGraphBtn"; + this.importGraphBtn.Size = new System.Drawing.Size(231, 93); + this.importGraphBtn.TabIndex = 7; + this.importGraphBtn.Text = "Import Raw Data File to Graph"; + this.importGraphBtn.UseVisualStyleBackColor = false; + this.importGraphBtn.Click += new System.EventHandler(this.importGraphBtn_Click); // // importRawFolder // @@ -632,7 +532,7 @@ private void InitializeComponent() this.importRawFolder.FlatAppearance.BorderSize = 0; this.importRawFolder.FlatStyle = System.Windows.Forms.FlatStyle.Popup; this.importRawFolder.Font = new System.Drawing.Font("Consolas", 18F, System.Drawing.FontStyle.Bold); - this.importRawFolder.Location = new System.Drawing.Point(428, 201); + this.importRawFolder.Location = new System.Drawing.Point(43, 158); this.importRawFolder.Name = "importRawFolder"; this.importRawFolder.Size = new System.Drawing.Size(231, 93); this.importRawFolder.TabIndex = 8; @@ -640,95 +540,123 @@ private void InitializeComponent() this.importRawFolder.UseVisualStyleBackColor = false; this.importRawFolder.Click += new System.EventHandler(this.importRawFolder_Click); // - // importGraphBtn + // panel2 + // + this.panel2.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.panel2.Controls.Add(this.importRawFolderBtn); + this.panel2.Controls.Add(this.label11); + this.panel2.Controls.Add(this.importRawFileBtn); + this.panel2.Location = new System.Drawing.Point(7, 3); + this.panel2.Name = "panel2"; + this.panel2.Size = new System.Drawing.Size(359, 239); + this.panel2.TabIndex = 24; + // + // importRawFolderBtn + // + this.importRawFolderBtn.BackColor = System.Drawing.SystemColors.ActiveCaption; + this.importRawFolderBtn.FlatAppearance.BorderSize = 0; + this.importRawFolderBtn.FlatStyle = System.Windows.Forms.FlatStyle.Popup; + this.importRawFolderBtn.Font = new System.Drawing.Font("Consolas", 18F, System.Drawing.FontStyle.Bold); + this.importRawFolderBtn.Location = new System.Drawing.Point(22, 142); + this.importRawFolderBtn.Name = "importRawFolderBtn"; + this.importRawFolderBtn.Size = new System.Drawing.Size(309, 75); + this.importRawFolderBtn.TabIndex = 24; + this.importRawFolderBtn.Text = "Import Raw Data Folder to Process"; + this.importRawFolderBtn.UseVisualStyleBackColor = false; + this.importRawFolderBtn.Click += new System.EventHandler(this.importRawFolderBtn_Click); + // + // label11 + // + this.label11.AutoSize = true; + this.label11.BackColor = System.Drawing.Color.Transparent; + this.label11.Font = new System.Drawing.Font("Microsoft Sans Serif", 24F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.label11.ForeColor = System.Drawing.Color.Black; + this.label11.Location = new System.Drawing.Point(29, 9); + this.label11.Name = "label11"; + this.label11.Size = new System.Drawing.Size(297, 37); + this.label11.TabIndex = 23; + this.label11.Text = "Process Raw Data"; + // + // importRawFileBtn + // + this.importRawFileBtn.BackColor = System.Drawing.SystemColors.ActiveCaption; + this.importRawFileBtn.FlatAppearance.BorderSize = 0; + this.importRawFileBtn.FlatStyle = System.Windows.Forms.FlatStyle.Popup; + this.importRawFileBtn.Font = new System.Drawing.Font("Consolas", 18F, System.Drawing.FontStyle.Bold); + this.importRawFileBtn.Location = new System.Drawing.Point(22, 59); + this.importRawFileBtn.Name = "importRawFileBtn"; + this.importRawFileBtn.Size = new System.Drawing.Size(309, 75); + this.importRawFileBtn.TabIndex = 9; + this.importRawFileBtn.Text = "Import Raw Data File to Process"; + this.importRawFileBtn.UseVisualStyleBackColor = false; + this.importRawFileBtn.Click += new System.EventHandler(this.importRawFileBtn_Click); + // + // panel1 + // + this.panel1.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.panel1.Controls.Add(this.label5); + this.panel1.Controls.Add(this.importResultsViewBtn); + this.panel1.Location = new System.Drawing.Point(381, 3); + this.panel1.Name = "panel1"; + this.panel1.Size = new System.Drawing.Size(359, 174); + this.panel1.TabIndex = 10; + // + // label5 + // + this.label5.AutoSize = true; + this.label5.BackColor = System.Drawing.Color.Transparent; + this.label5.Font = new System.Drawing.Font("Microsoft Sans Serif", 24F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.label5.ForeColor = System.Drawing.Color.Black; + this.label5.Location = new System.Drawing.Point(37, 9); + this.label5.Name = "label5"; + this.label5.Size = new System.Drawing.Size(282, 37); + this.label5.TabIndex = 23; + this.label5.Text = "Create Heatmaps"; // - this.importGraphBtn.BackColor = System.Drawing.SystemColors.ActiveCaption; - this.importGraphBtn.FlatAppearance.BorderSize = 0; - this.importGraphBtn.FlatStyle = System.Windows.Forms.FlatStyle.Popup; - this.importGraphBtn.Font = new System.Drawing.Font("Consolas", 18F, System.Drawing.FontStyle.Bold); - this.importGraphBtn.Location = new System.Drawing.Point(428, 102); - this.importGraphBtn.Name = "importGraphBtn"; - this.importGraphBtn.Size = new System.Drawing.Size(231, 93); - this.importGraphBtn.TabIndex = 7; - this.importGraphBtn.Text = "Import Raw Data File to Graph"; - this.importGraphBtn.UseVisualStyleBackColor = false; - this.importGraphBtn.Click += new System.EventHandler(this.importGraphBtn_Click); + // importResultsViewBtn + // + this.importResultsViewBtn.BackColor = System.Drawing.SystemColors.ActiveCaption; + this.importResultsViewBtn.FlatAppearance.BorderSize = 0; + this.importResultsViewBtn.FlatStyle = System.Windows.Forms.FlatStyle.Popup; + this.importResultsViewBtn.Font = new System.Drawing.Font("Consolas", 18F, System.Drawing.FontStyle.Bold); + this.importResultsViewBtn.Location = new System.Drawing.Point(24, 59); + this.importResultsViewBtn.Name = "importResultsViewBtn"; + this.importResultsViewBtn.Size = new System.Drawing.Size(309, 93); + this.importResultsViewBtn.TabIndex = 9; + this.importResultsViewBtn.Text = "Import Processed Data File for Heatmaps"; + this.importResultsViewBtn.UseVisualStyleBackColor = false; + this.importResultsViewBtn.Click += new System.EventHandler(this.importResultsViewBtn_Click); + // + // progressBar1 + // + this.progressBar1.Location = new System.Drawing.Point(0, 348); + this.progressBar1.MarqueeAnimationSpeed = 30; + this.progressBar1.Maximum = 50; + this.progressBar1.Name = "progressBar1"; + this.progressBar1.Size = new System.Drawing.Size(1087, 23); + this.progressBar1.Step = 50; + this.progressBar1.Style = System.Windows.Forms.ProgressBarStyle.Marquee; + this.progressBar1.TabIndex = 34; + this.progressBar1.Visible = false; + // + // heatmaps1 // - // titleLabel - // - this.titleLabel.Font = new System.Drawing.Font("Calibri", 28F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.titleLabel.ForeColor = System.Drawing.Color.Black; - this.titleLabel.Location = new System.Drawing.Point(45, 8); - this.titleLabel.Name = "titleLabel"; - this.titleLabel.Size = new System.Drawing.Size(1295, 52); - this.titleLabel.TabIndex = 28; - this.titleLabel.Text = "Monitor Name - Freqency - FPS Limit"; - this.titleLabel.TextAlign = System.Drawing.ContentAlignment.TopCenter; - // - // pictureBox1 - // - this.pictureBox1.Image = global::OSRTT_Launcher.Properties.Resources.icon_wide; - this.pictureBox1.Location = new System.Drawing.Point(1237, 614); - this.pictureBox1.Name = "pictureBox1"; - this.pictureBox1.Size = new System.Drawing.Size(118, 66); - this.pictureBox1.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom; - this.pictureBox1.TabIndex = 29; - this.pictureBox1.TabStop = false; - // - // rtStatsGridView - // - this.rtStatsGridView.AllowUserToAddRows = false; - this.rtStatsGridView.AllowUserToDeleteRows = false; - this.rtStatsGridView.AllowUserToResizeColumns = false; - this.rtStatsGridView.AllowUserToResizeRows = false; - this.rtStatsGridView.BackgroundColor = System.Drawing.SystemColors.WindowFrame; - this.rtStatsGridView.ColumnHeadersHeight = 40; - this.rtStatsGridView.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.DisableResizing; - this.rtStatsGridView.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] { - this.Column1}); - dataGridViewCellStyle1.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; - dataGridViewCellStyle1.BackColor = System.Drawing.SystemColors.Window; - dataGridViewCellStyle1.Font = new System.Drawing.Font("Calibri", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - dataGridViewCellStyle1.ForeColor = System.Drawing.SystemColors.ControlText; - dataGridViewCellStyle1.SelectionBackColor = System.Drawing.SystemColors.Highlight; - dataGridViewCellStyle1.SelectionForeColor = System.Drawing.SystemColors.HighlightText; - dataGridViewCellStyle1.WrapMode = System.Windows.Forms.DataGridViewTriState.False; - this.rtStatsGridView.DefaultCellStyle = dataGridViewCellStyle1; - this.rtStatsGridView.EditMode = System.Windows.Forms.DataGridViewEditMode.EditProgrammatically; - this.rtStatsGridView.EnableHeadersVisualStyles = false; - this.rtStatsGridView.GridColor = System.Drawing.Color.White; - this.rtStatsGridView.Location = new System.Drawing.Point(98, 396); - this.rtStatsGridView.MultiSelect = false; - this.rtStatsGridView.Name = "rtStatsGridView"; - this.rtStatsGridView.ReadOnly = true; - this.rtStatsGridView.RowHeadersWidth = 65; - this.rtStatsGridView.RowHeadersWidthSizeMode = System.Windows.Forms.DataGridViewRowHeadersWidthSizeMode.DisableResizing; - this.rtStatsGridView.RowTemplate.Height = 35; - this.rtStatsGridView.RowTemplate.ReadOnly = true; - this.rtStatsGridView.RowTemplate.Resizable = System.Windows.Forms.DataGridViewTriState.False; - this.rtStatsGridView.ScrollBars = System.Windows.Forms.ScrollBars.None; - this.rtStatsGridView.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.CellSelect; - this.rtStatsGridView.ShowCellToolTips = false; - this.rtStatsGridView.ShowEditingIcon = false; - this.rtStatsGridView.Size = new System.Drawing.Size(277, 250); - this.rtStatsGridView.TabIndex = 30; - // - // Column1 - // - this.Column1.HeaderText = ""; - this.Column1.Name = "Column1"; - this.Column1.ReadOnly = true; + this.heatmaps1.Location = new System.Drawing.Point(1395, 55); + this.heatmaps1.Name = "heatmaps1"; + this.heatmaps1.Size = new System.Drawing.Size(1775, 950); + this.heatmaps1.TabIndex = 6; // // ResultsView // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.BackColor = System.Drawing.SystemColors.ControlDark; - this.ClientSize = new System.Drawing.Size(2850, 1689); + this.ClientSize = new System.Drawing.Size(1924, 1061); + this.Controls.Add(this.progressBar1); + this.Controls.Add(this.heatmaps1); this.Controls.Add(this.importPanel); this.Controls.Add(this.graphViewPanel); this.Controls.Add(this.toolStrip1); - this.Controls.Add(this.standardResultsPanel); this.Controls.Add(this.menuStrip1); this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle; this.MainMenuStrip = this.menuStrip1; @@ -738,18 +666,17 @@ private void InitializeComponent() this.Load += new System.EventHandler(this.ResultsView_Load); this.menuStrip1.ResumeLayout(false); this.menuStrip1.PerformLayout(); - this.standardResultsPanel.ResumeLayout(false); - this.standardResultsPanel.PerformLayout(); - ((System.ComponentModel.ISupportInitialize)(this.vrrGridView)).EndInit(); - ((System.ComponentModel.ISupportInitialize)(this.osGridView)).EndInit(); - ((System.ComponentModel.ISupportInitialize)(this.rtGridView)).EndInit(); this.toolStrip1.ResumeLayout(false); this.toolStrip1.PerformLayout(); this.graphViewPanel.ResumeLayout(false); this.graphViewPanel.PerformLayout(); this.importPanel.ResumeLayout(false); - ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit(); - ((System.ComponentModel.ISupportInitialize)(this.rtStatsGridView)).EndInit(); + this.panel3.ResumeLayout(false); + this.panel3.PerformLayout(); + this.panel2.ResumeLayout(false); + this.panel2.PerformLayout(); + this.panel1.ResumeLayout(false); + this.panel1.PerformLayout(); this.ResumeLayout(false); this.PerformLayout(); @@ -759,12 +686,9 @@ private void InitializeComponent() private System.Windows.Forms.MenuStrip menuStrip1; private System.Windows.Forms.ToolStripMenuItem viewToolStripMenuItem; private System.Windows.Forms.ToolStripMenuItem optionsToolStripMenuItem; - private System.Windows.Forms.Panel standardResultsPanel; private System.Windows.Forms.ToolStrip toolStrip1; - private System.Windows.Forms.ToolStripButton allResultsMenuBtn; private System.Windows.Forms.ToolStripButton stdResultsMenuBtn; private System.Windows.Forms.ToolStripSeparator toolStripSeparator1; - private System.Windows.Forms.ToolStripSeparator toolStripSeparator2; private System.Windows.Forms.ToolStripButton graphViewMenuBtn; private System.Windows.Forms.ToolStripSeparator toolStripSeparator3; private System.Windows.Forms.ToolStripButton importViewMenuButton; @@ -789,19 +713,25 @@ private void InitializeComponent() private System.Windows.Forms.Button importRawFolder; private System.Windows.Forms.Label latencyLabel; private System.Windows.Forms.Label label8; - private System.Windows.Forms.DataGridView rtGridView; - private System.Windows.Forms.DataGridView vrrGridView; - private System.Windows.Forms.DataGridView osGridView; private System.Windows.Forms.Button importResultsViewBtn; - private System.Windows.Forms.Label label12; - private System.Windows.Forms.Label from3; - private System.Windows.Forms.Label label10; - private System.Windows.Forms.Label from2; - private System.Windows.Forms.Label label9; - private System.Windows.Forms.Label from1; - private System.Windows.Forms.Label titleLabel; - private System.Windows.Forms.PictureBox pictureBox1; - private System.Windows.Forms.DataGridView rtStatsGridView; - private System.Windows.Forms.DataGridViewTextBoxColumn Column1; + private System.Windows.Forms.Button saveAsPNGBtn; + private System.Windows.Forms.Button saveGraphNoHSpanBtn; + private System.Windows.Forms.ToolStripMenuItem saveHeatmapsToolStripMenuItem; + private System.Windows.Forms.ToolStripMenuItem asTransparentPNGToolStripMenuItem; + private System.Windows.Forms.ToolStripMenuItem perceivedResponseTimeToolStripMenuItem; + private System.Windows.Forms.ToolStripMenuItem initialResponseTimeToolStripMenuItem; + private System.Windows.Forms.ToolStripMenuItem completeResponseTimeToolStripMenuItem; + private System.Windows.Forms.Panel panel3; + private System.Windows.Forms.Label label13; + private System.Windows.Forms.Panel panel2; + private System.Windows.Forms.Label label11; + private System.Windows.Forms.Button importRawFileBtn; + private System.Windows.Forms.Panel panel1; + private System.Windows.Forms.Label label5; + private System.Windows.Forms.Button importRawFolderBtn; + private Heatmaps heatmaps1; + private System.Windows.Forms.ToolStripComboBox runSelectToolStrip; + private System.Windows.Forms.ProgressBar progressBar1; + private System.Windows.Forms.ToolStripMenuItem asPNGToolStripMenuItem; } } \ No newline at end of file diff --git a/OSRTT Launcher/OSRTT Launcher/ResultsView.cs b/OSRTT Launcher/OSRTT Launcher/ResultsView.cs index 855739c..0ccbb42 100644 --- a/OSRTT Launcher/OSRTT Launcher/ResultsView.cs +++ b/OSRTT Launcher/OSRTT Launcher/ResultsView.cs @@ -9,41 +9,37 @@ using System.Threading.Tasks; using System.Windows.Forms; using ScottPlot; -using BrightIdeasSoftware; using System.Drawing.Drawing2D; using System.Drawing.Text; using System.Resources; +using System.Diagnostics; +using System.Threading; +using System.Drawing.Imaging; +using Newtonsoft.Json; namespace OSRTT_Launcher { // TODO List // // Graph View - // - Make response time options work - // - Fix overshoot gamma corrected percentage options - // - Save graph as PNG - // Results view - // - Style headers - // - Style/colour cells based on type/key (user changable setting?) - // Handle multiple runs (dropdown of Averaged + run 1 + run 2 ...) - // Save graph as (optionally transparent) image - // Save results view as (optionally transparent) image - full page minus headers. - // Make import functions generic (pass expected file name in, return object back) + // - Limit scrolling/zoom to only within the bounds of the data public partial class ResultsView : Form { string path = System.Reflection.Assembly.GetExecutingAssembly().GetName().CodeBase; + string resultsFolderPath = ""; + public ProcessData.runSettings runSettings; // Raw sensor data, list of lists to hold multiple runs worth of results at once - public List> rawData = new List>(); + public List> rawData = new List>(); // Moving average smoothed sensor data, list of lists to hold multiple runs worth of results at once - public List> smoothedData = new List>(); + public List smoothedData = new List(); // Processed results, list of lists to hold multiple runs worth of results at once - public List> multipleRunsData = new List>(); + public List> multipleRunsData = new List>(); // Single averaged results list from multiple run data - public List averageData = new List(); + public List averageData = new List(); // Raw gamma sensor data public List gamma = new List(); // Processed gamma results (list of 256 RGB & correlating light values - public List processedGamma = new List(); + public List processedGamma = new List(); // Single 0-255 transition to gauge distance to start point (initial latency) public List testLatency = new List(); // RGB array to use @@ -53,67 +49,29 @@ public partial class ResultsView : Form // How many samples to build the initial min/max from public int startDelay = 150; - private class rtMethods + public List rtMethodologies = new List { - public string Type { get; set; } - public string Name { get; set; } - public int Tolerance { get; set; } - public bool gammaCorrected { get; set; } - public bool percentage { get; set; } - } - - private List rtMethodologies = new List - { - new rtMethods { Type = "RGB5", Name = "RGB 5 Tolerance", Tolerance = 5, gammaCorrected = true, percentage = false }, - new rtMethods { Type = "RGB10", Name = "RGB 10 Tolerance", Tolerance = 10, gammaCorrected = true, percentage = false }, - new rtMethods { Type = "3PerGamCor", Name = "3% of RGB Tolerance", Tolerance = 3, gammaCorrected = true, percentage = true }, - new rtMethods { Type = "10PerGamCor", Name = "10% of RGB Tolerance", Tolerance = 10, gammaCorrected = true, percentage = true }, - new rtMethods { Type = "3Per", Name = "3% of Light Level Tolerance", Tolerance = 3, gammaCorrected = false, percentage = true}, - new rtMethods { Type = "10Per", Name = "10% of Light Level Tolerance", Tolerance = 10, gammaCorrected = false, percentage = true } + new ProcessData.rtMethods { Type = "RGB5", Name = "RGB 5 Tolerance", Tolerance = 5, gammaCorrected = true, percentage = false }, + new ProcessData.rtMethods { Type = "RGB10", Name = "RGB 10 Tolerance", Tolerance = 10, gammaCorrected = true, percentage = false }, + new ProcessData.rtMethods { Type = "3PerGamCor", Name = "3% of RGB Tolerance", Tolerance = 3, gammaCorrected = true, percentage = true }, + new ProcessData.rtMethods { Type = "10PerGamCor", Name = "10% of RGB Tolerance", Tolerance = 10, gammaCorrected = true, percentage = true }, + new ProcessData.rtMethods { Type = "3Per", Name = "3% of Light Level Tolerance", Tolerance = 3, gammaCorrected = false, percentage = true}, + new ProcessData.rtMethods { Type = "10Per", Name = "10% of Light Level Tolerance", Tolerance = 10, gammaCorrected = false, percentage = true } }; - private class osMethods - { - public string Type { get; set; } - public string Name { get; set; } - public bool endPercent { get; set; } - public bool rangePercent { get; set; } - public bool gammaCorrected { get; set; } - } - private List osMethodologies = new List + public List osMethodologies = new List { - new osMethods { Type = "GamCor", Name = "RGB Values", endPercent = false, rangePercent = false, gammaCorrected = true }, - new osMethods { Type = "GamCorrEndPer", Name = "Percent over end RGB Value", endPercent = true, rangePercent = false, gammaCorrected = true }, - new osMethods { Type = "GamCorrRangePer", Name = "Percent above RGB range", endPercent = false, rangePercent = true, gammaCorrected = true }, - new osMethods { Type = "EndPer", Name = "Percent over end light level", endPercent = true, rangePercent = false, gammaCorrected = false }, - new osMethods { Type = "RangePer", Name = "Percent over light level range", endPercent = false, rangePercent = true, gammaCorrected = false } + new ProcessData.osMethods { Type = "GamCor", Name = "RGB Values", endPercent = false, rangePercent = false, gammaCorrected = true }, + new ProcessData.osMethods { Type = "GamCorrEndPer", Name = "Percent over end RGB Value", endPercent = true, rangePercent = false, gammaCorrected = true }, + new ProcessData.osMethods { Type = "GamCorrRangePer", Name = "Percent above RGB range", endPercent = false, rangePercent = true, gammaCorrected = true }, + new ProcessData.osMethods { Type = "EndPer", Name = "Percent over end light level", endPercent = true, rangePercent = false, gammaCorrected = false }, + new ProcessData.osMethods { Type = "RangePer", Name = "Percent over light level range", endPercent = false, rangePercent = true, gammaCorrected = false } }; - private class resultSelection - { - public int arrayIndex { get; set; } - public int resultIndex { get; set; } - public rtMethods rtStyle { get; set; } - public osMethods osStyle { get; set; } - } - private resultSelection selectedResult; - public class processedResult - { - public double Time { get; set; } - public int startIndex { get; set; } - public int endIndex { get; set; } - public double Overshoot { get; set; } - } - public class colourKey - { - public int keyType { get; set; } - public double min { get; set; } - public double middle { get; set; } - public double max { get; set; } - } - List colourKeys = new List(); + public ProcessData.rtMethods rtMethod; + public ProcessData.osMethods osMethod; private ResourceManager rm = OSRTT_Launcher.Properties.Resources.ResourceManager; - public void setRawData (List> rd) + public void setRawData(List> rd) { if (rd != null) { @@ -121,7 +79,7 @@ public void setRawData (List> rd) } } - public void setMultiRunData(List> mrd) + public void setMultiRunData(List> mrd) { if (mrd != null) { @@ -129,7 +87,7 @@ public void setMultiRunData(List> mrd) } } - public void setAverageData(List ad) + public void setAverageData(List ad) { if (ad != null) { @@ -145,36 +103,80 @@ public void setRGBArr(List RGB) } } + public void setResultsFolder(string rfp) + { + resultsFolderPath = rfp; + } + + public void setStandardView() + { + stdResultsMenuBtn_Click(null, null); + } + public void setRtMethod(ProcessData.rtMethods rt) + { + rtMethod = rt; + } + public void setOsMethod(ProcessData.osMethods os) + { + osMethod = os; + } + public void setRunSettings(ProcessData.runSettings run) + { + if (run != null) + { + runSettings = run; + } + } + public ResultsView() { InitializeComponent(); this.Icon = (Icon)rm.GetObject("osrttIcon"); path = new Uri(System.IO.Path.GetDirectoryName(path)).LocalPath; path += @"\Results"; - Size = new Size(1400, 800); + Size = new Size(1100, 460); + this.SetStyle(ControlStyles.SupportsTransparentBackColor, true); + saveHeatmapsToolStripMenuItem.Visible = false; + viewToolStripMenuItem.Visible = false; + runSelectToolStrip.Visible = false; + toolStripSeparator1.Visible = false; + toolStripSeparator3.Visible = false; initResultsMethodList(); initOvershootStyleList(); - string[] rtKey = Properties.Settings.Default.rtKey.Split(','); - if (rtKey.Length == 3) + } + private void ResultsView_Load(object sender, EventArgs e) + { + bool graph = false; + if (multipleRunsData.Count == 0 && averageData.Count == 0) + { + stdResultsMenuBtn.Visible = false; + graph = true; + } + else { - colourKeys.Add( new colourKey { keyType = 0, min = double.Parse(rtKey[0]), middle = double.Parse(rtKey[1]), max = double.Parse(rtKey[2]) }); + stdResultsMenuBtn.Visible = true; + toolStripSeparator1.Visible = true; + stdResultsMenuBtn_Click(null, null); } - string[] osKey = Properties.Settings.Default.osKey.Split(','); - if (osKey.Length == 3) + if (rawData.Count == 0) { - colourKeys.Add(new colourKey { keyType = 1, min = double.Parse(osKey[0]), middle = double.Parse(osKey[1]), max = double.Parse(osKey[2]) }); + graphViewMenuBtn.Visible = false; } - string[] vrrKey = Properties.Settings.Default.vrrKey.Split(','); - if (vrrKey.Length == 3) + else { - colourKeys.Add(new colourKey { keyType = 2, min = double.Parse(vrrKey[0]), middle = double.Parse(vrrKey[1]), max = double.Parse(vrrKey[2]) }); + graphViewMenuBtn.Visible = true; + toolStripSeparator3.Visible = true; + if (graph) + { + graphViewMenuBtn_Click(null, null); + } } } private void initResultsMethodList() { processTypeListBox.Items.Clear(); - foreach(var item in rtMethodologies) + foreach (var item in rtMethodologies) { processTypeListBox.Items.Add(item.Name); } @@ -189,28 +191,10 @@ private void initOvershootStyleList() } overshootStyleListBox.SelectedIndex = 0; } - - private void ResultsView_Load(object sender, EventArgs e) - { - if (rawData.Count == 0 && averageData.Count == 0) - { - graphViewMenuBtn.Visible = false; - // Import View - } - if (multipleRunsData.Count == 0) - { - allResultsMenuBtn.Visible = false; - stdResultsMenuBtn.Visible = true; - // Import View - } - - } - private void importRawData() { // Open file picker dialogue var filePath = string.Empty; - using (System.Windows.Forms.OpenFileDialog openFileDialog = new System.Windows.Forms.OpenFileDialog()) { openFileDialog.InitialDirectory = path; @@ -223,12 +207,16 @@ private void importRawData() //Get the path of specified file filePath = openFileDialog.FileName; rawData.Clear(); + gamma.Clear(); + //processedGamma.Clear(); + //averageData.Clear(); + //multipleRunsData.Clear(); if (filePath.Contains("RAW-OSRTT")) { //Read the contents of the file into a stream try { - List tempRes = new List(); + List tempRes = new List(); List tempGamma = new List(); var fileStream = openFileDialog.OpenFile(); using (StreamReader reader = new StreamReader(fileStream)) @@ -236,375 +224,151 @@ private void importRawData() while (!reader.EndOfStream) { // This can probably be done better - string[] line = reader.ReadLine().Split(','); - int[] intLine = new int[line.Length]; - for (int i = 0; i < line.Length; i++) + string fullLine = reader.ReadLine(); + if (fullLine.Contains("{")) + { + ProcessData.runSettings runs = JsonConvert.DeserializeObject(fullLine); + runSettings = runs; + continue; + } + else { - if (line[i] == "0") + string[] line = fullLine.Split(','); + int[] intLine = new int[line.Length]; + for (int i = 0; i < line.Length; i++) + { + if (line[i] == "0") + { + intLine[i] = 0; + } + else if (line[i] != "") + { + intLine[i] = int.Parse(line[i]); + } + else + { + continue; + } + } + Array.Resize(ref intLine, intLine.Length - 1); + if (intLine[0] == 1000) { - intLine[i] = 0; + testLatency.AddRange(intLine); } - else if (line[i] != "") + else if (intLine[0] == intLine[1]) { - intLine[i] = int.Parse(line[i]); + tempGamma.Add(intLine); } else { - continue; + ProcessData.rawResultData rawResult = new ProcessData.rawResultData + { + StartingRGB = intLine[0], + EndRGB = intLine[1], + TimeTaken = intLine[2], + SampleCount = intLine[3], + SampleTime = ((double)intLine[2] / (double)intLine[3]), + Samples = intLine.Skip(4).ToList() + }; + tempRes.Add(rawResult); } } - Array.Resize(ref intLine, intLine.Length - 1); - if (intLine[0] == 1000) - { - testLatency.AddRange(intLine); - } - else if (intLine[0] == intLine[1]) - { - tempGamma.Add(intLine); - } - else - { - tempRes.Add(intLine); - } } } - rawData.AddRange(new List> { tempRes }); + resultsFolderPath = filePath.Substring(0, filePath.LastIndexOf('\\')); + rawData.AddRange(new List> { tempRes }); gamma.AddRange(tempGamma); - processedGamma.AddRange(processGammaTable()); - processTestLatency(); + ProcessData pd = new ProcessData(); + processedGamma.AddRange(pd.processGammaTable(gamma, rawData[0])); + // save gamma data to file + if (Properties.Settings.Default.saveGammaTable) + { + CFuncs cf = new CFuncs(); + string gammaName = cf.createFileName(resultsFolderPath, "-GAMMA-OSRTT.csv"); + StringBuilder gammaCsv = new StringBuilder(); + gammaCsv.AppendLine("RGB,Light Level"); + foreach (ProcessData.gammaResult g in processedGamma) + { + gammaCsv.AppendLine(g.RGB.ToString() + "," + g.LightLevel.ToString()); + } + File.WriteAllText(resultsFolderPath + "\\" + gammaName, gammaCsv.ToString()); + } + //processTestLatency(); Console.WriteLine(rawData.Count); // Draw graph - graphViewMenuBtn_Click(null, null); - handleRunsList(); - handleResultsList(runSelectBox.SelectedIndex); + } - catch + catch (Exception ex) { DialogResult d = MessageBox.Show("File may be in use by another program, please make sure it's not open elsewhere and try again.", "Unable to open file", MessageBoxButtons.OK, MessageBoxIcon.Error); + Console.WriteLine(ex.Message + ex.StackTrace); } } else { MessageBox.Show("Sorry, only 'RAW' files can be imported. Please select a 'RAW-OSRTT.csv' file instead.", "Importer Error", MessageBoxButtons.OK, MessageBoxIcon.Error); + throw new Exception("Importer Error"); } } } } - private void drawTable(DataGridView dgv, string type) + private void standardView() { - // 0 1 2 3 4 5 6 7 - // StartingRGB, EndRGB, Complete, Initial, Perceived, Overshoot, VRR, Latency - int indexToUse = 4; - switch (type) - { - case "perceived": - indexToUse = 4; - break; - case "initial": - indexToUse = 3; - break; - case "complete": - indexToUse = 2; - break; - case "overshoot": - indexToUse = 5; - break; - case "vrr": - indexToUse = 6; - break; - default: - indexToUse = 4; - break; - } - // Create string arrays for rows - List data = new List(); - for (int i = 0; i < RGBArr.Count; i++) - { - // Fill list with sized empty string arrays to address later - string[] line = new string[6]; - data.Add(line); - } - int current = 0; - int next = 1; - for (int k = 0; k < averageData.Count; k++) - { - if (next < RGBArr.Count) - { - if (averageData[k][0] == RGBArr[current]) - { - // current base - data[current][next] = averageData[k][indexToUse].ToString(); - } - else - { - // next - data[next][current] = averageData[k][indexToUse].ToString(); - next++; - } - } - else - { - current++; - next = current + 1; - if (averageData[k][0] == RGBArr[current]) - { - // current base - data[current][next] = averageData[k][indexToUse].ToString(); - } - else - { - // next - data[next][current] = averageData[k][indexToUse].ToString(); - next++; - } - } - Console.WriteLine("Current: " + current + ", Next: " + next + ", StartingRGB: " + averageData[k][0] + ", EndRGB: " + averageData[k][1]); - } - // Add string array to rows - foreach (var item in data) - { - dgv.Rows.Add(item); - } - int colourKeyIndex = 0; - if (indexToUse == 5) - { - colourKeyIndex = 1; - } - else if (indexToUse == 6) + viewToolStripMenuItem.Visible = true; + runSelectToolStrip.Visible = true; + runSelectToolStrip.Items.Clear(); + if (averageData.Count != 0) { - colourKeyIndex = 2; + runSelectToolStrip.Items.Add("Averaged Data"); + heatmaps1.setAverageData(averageData); } - for (int l = 0; l < dgv.Rows.Count; l++) + if (multipleRunsData.Count != 0) { - dgv.Rows[l].HeaderCell.Value = RGBArr[l].ToString(); - for (int p = 0; p < dgv.Columns.Count; p++) + for (int i = 0; i < multipleRunsData.Count; i++) { - if (dgv.Rows[l].Cells[p].Value != null) - { - // ARGB (153, 0, 255, 0) Green -> (153, 255, 255, 0) Yellow -> (153,255,0,0) Red - double cellValue = double.Parse(dgv.Rows[l].Cells[p].Value.ToString()); - Console.WriteLine(cellValue); - if (cellValue < colourKeys[colourKeyIndex].middle) - { - if (cellValue < colourKeys[colourKeyIndex].min) - { - // set min colour - DataGridViewCellStyle dv = dgv.Rows[l].Cells[p].InheritedStyle.Clone(); - dv.BackColor = Color.FromArgb(153, 0, 255, 0); - dgv.Rows[l].Cells[p].Style.ApplyStyle(dv); - } - else - { - // divide time (minus min) by range (average - min) - // times 255 by result of above - double range = colourKeys[colourKeyIndex].middle - colourKeys[colourKeyIndex].min; - double time = cellValue - colourKeys[colourKeyIndex].min; - double result = time / range; - double greenRGB = 255 * result; - greenRGB = Math.Round(greenRGB, 0); - DataGridViewCellStyle dv = dgv.Rows[l].Cells[p].InheritedStyle.Clone(); - dv.BackColor = Color.FromArgb(153, 0, Convert.ToInt32(greenRGB), 0); - dgv.Rows[l].Cells[p].Style.ApplyStyle(dv); - } - } - else - { - if (cellValue > colourKeys[colourKeyIndex].max) - { - // set max colour - DataGridViewCellStyle dv = dgv.Rows[l].Cells[p].InheritedStyle.Clone(); - dv.BackColor = Color.FromArgb(153, 255, 0, 0); - dgv.Rows[l].Cells[p].Style.ApplyStyle(dv); - } - else - { - // divide time (minus max) by range (max - average) - // times 255 by result of above - double range = colourKeys[colourKeyIndex].max - colourKeys[colourKeyIndex].middle; - double time = colourKeys[colourKeyIndex].max - cellValue; - double result = time / range; - double redRGB = 255 * result; - redRGB = Math.Round(redRGB, 0); - dgv.Rows[l].Cells[p].Style.BackColor = Color.FromArgb(153, Convert.ToInt32(redRGB), 0, 0); - DataGridViewCellStyle dv = dgv.Rows[l].Cells[p].InheritedStyle.Clone(); - dv.BackColor = Color.FromArgb(153, Convert.ToInt32(redRGB), 0, 0); - dgv.Rows[l].Cells[p].Style.ApplyStyle(dv); - } - } - } - else - { - Console.WriteLine("Cell value null"); - dgv.Rows[l].Cells[p].Style.BackColor = Color.Gray; - } + runSelectToolStrip.Items.Add("Run " + (i + 1).ToString()); } } - //SubItems.AddRange(data.ToArray()); - // Style cells? Probs not here. - // You can set the ListViewItem.BackColor property - } - - private void initGridViewColumns(DataGridView dgv) - { - if (dgv.Columns.Count != 0) - { - dgv.Columns.Clear(); - } - if (dgv.Rows.Count != 0) - { - dgv.Rows.Clear(); - } - dgv.SelectionChanged += gridView_SelectionChanged; - dgv.ColumnCount = 6; - dgv.BorderStyle = BorderStyle.FixedSingle; - dgv.ColumnHeadersDefaultCellStyle.BackColor = Color.FromArgb(84, 157, 178, 189); - dgv.RowHeadersDefaultCellStyle.BackColor = Color.FromArgb(84, 157, 178, 189); - dgv.ColumnHeadersDefaultCellStyle.Font = new Font("Calibri", 14, FontStyle.Bold); - dgv.RowHeadersDefaultCellStyle.Font = new Font("Calibri", 14, FontStyle.Bold); - dgv.AdvancedColumnHeadersBorderStyle.All = DataGridViewAdvancedCellBorderStyle.None; - dgv.AdvancedRowHeadersBorderStyle.All = DataGridViewAdvancedCellBorderStyle.None; - dgv.ColumnHeadersDefaultCellStyle.ForeColor = Color.White; - dgv.RowHeadersDefaultCellStyle.ForeColor = Color.White; - dgv.RowsDefaultCellStyle.Font = new Font("Calibri", 14); - dgv.AdvancedCellBorderStyle.All = DataGridViewAdvancedCellBorderStyle.None; - dgv.RowsDefaultCellStyle.ForeColor = Color.White; - - dgv.CellFormatting += dgv_CellFormatting; - //dgv.RowsDefaultCellStyle.BackColor = Color.Gray; - // rtGridView.RowHeadersDefaultCellStyle.Padding = new Padding(rtGridView.RowHeadersWidth / 2 ); - for (int i = 0; i < RGBArr.Count; i++) + runSelectToolStrip.SelectedIndex = 0; + if (averageData.Count == 0 && multipleRunsData.Count != 0) { - dgv.Columns[i].Name = RGBArr[i].ToString(); + heatmaps1.setAverageData(multipleRunsData[0]); } - - for (int k = 0; k < dgv.Columns.Count; k++) + else if (averageData.Count == 0 && multipleRunsData.Count == 0) { - dgv.Columns[k].Width = 55; + throw new Exception("No Data"); } - } - - - private void dgv_CellFormatting(object sender, DataGridViewCellFormattingEventArgs e) - { - //Compare the value of second Column i.e. Column with Index 1. - DataGridView dgv = sender as DataGridView; - Console.WriteLine("Name: "+ dgv.Name); - if (dgv.Name.Contains("rt") && e.Value != null) + runSelectToolStrip.Visible = true; + if (initialResponseTimeToolStripMenuItem.Checked) { - //Fetch the value of the second Column. - double quantity = Convert.ToDouble(e.Value); - - //Apply Background color based on value. - if (quantity == 0) - { - e.CellStyle.BackColor = Color.Red; - } - if (quantity > 0 && quantity <= 50) - { - e.CellStyle.BackColor = Color.Yellow; - } - if (quantity > 50 && quantity <= 100) - { - e.CellStyle.BackColor = Color.Orange; - } - } - } - - - private void initStatsGridViewColumns(DataGridView dgv) - { - if (dgv.Columns.Count != 0) - { - dgv.Columns.Clear(); - } - if (dgv.Rows.Count != 0) - { - dgv.Rows.Clear(); - } - dgv.SelectionChanged += gridView_SelectionChanged; - dgv.ColumnCount = 2; - dgv.BorderStyle = BorderStyle.FixedSingle; - dgv.ColumnHeadersVisible = false; - dgv.RowHeadersVisible = false; - dgv.ColumnHeadersDefaultCellStyle.BackColor = Color.FromArgb(84, 157, 178, 189); - dgv.RowHeadersDefaultCellStyle.BackColor = Color.FromArgb(84, 157, 178, 189); - dgv.ColumnHeadersDefaultCellStyle.Font = new Font("Calibri", 14, FontStyle.Bold); - dgv.RowHeadersDefaultCellStyle.Font = new Font("Calibri", 14, FontStyle.Bold); - dgv.AdvancedColumnHeadersBorderStyle.All = DataGridViewAdvancedCellBorderStyle.None; - dgv.AdvancedRowHeadersBorderStyle.All = DataGridViewAdvancedCellBorderStyle.None; - dgv.ColumnHeadersDefaultCellStyle.ForeColor = Color.White; - dgv.RowHeadersDefaultCellStyle.ForeColor = Color.White; - dgv.RowsDefaultCellStyle.Font = new Font("Calibri", 14); - dgv.AdvancedCellBorderStyle.All = DataGridViewAdvancedCellBorderStyle.None; - dgv.RowsDefaultCellStyle.ForeColor = Color.White; - //dgv.RowsDefaultCellStyle.BackColor = Color.Gray; - // rtGridView.RowHeadersDefaultCellStyle.Padding = new Padding(rtGridView.RowHeadersWidth / 2 ); - for (int i = 0; i < RGBArr.Count; i++) - { - dgv.Columns[i].Name = RGBArr[i].ToString(); + heatmaps1.setRtIndex(3); } - - for (int k = 0; k < dgv.Columns.Count; k++) + else if (completeResponseTimeToolStripMenuItem.Checked) { - dgv.Columns[k].Width = 55; + heatmaps1.setRtIndex(2); } - } - - private void gridView_SelectionChanged(Object sender, EventArgs e) - { - DataGridView dgv = sender as DataGridView; - dgv.ClearSelection(); - Console.WriteLine(dgv.Name); - DataGridViewCellEventArgs cellEv = e as DataGridViewCellEventArgs; - // dgv.Rows[cellEv.RowIndex].Selected = false; - //sender.ClearSelection(); - } - - private void standardView() - { - try + else { - initGridViewColumns(rtGridView); - initGridViewColumns(osGridView); - initGridViewColumns(vrrGridView); + heatmaps1.setRtIndex(4); } - catch (Exception e) + if (runSettings != null) { - Console.WriteLine(e.Message + e.StackTrace); + heatmaps1.setRtMethod(runSettings.rtMethod); + heatmaps1.setOsMethod(runSettings.osMethod); + heatmaps1.setRunSettings(runSettings); } - - try + else { - drawTable(rtGridView, "perceived"); - drawTable(osGridView, "overshoot"); - drawTable(vrrGridView, "vrr"); + heatmaps1.setRtMethod(rtMethodologies[0]); // FALLBACK OPTION FOR NOW + heatmaps1.setOsMethod(osMethodologies[0]); // FALLBACK OPTION FOR NOW } - catch (Exception ex) + if (runSettings != null) { - Console.WriteLine(ex.Message + ex.StackTrace); + heatmaps1.setRunSettings(runSettings); } - // Set location, size, enabled/clickable/editable - // Draw averages - } - - private void completeView() - { - /*ListView perceivedResponseTime = new ListView(); - ListView overshoot = new ListView(); - ListView vrr = new ListView(); - ListView initialResponseTime = new ListView(); - ListView completeResponseTime = new ListView(); - // Set location, size, enabled/clickable/editable - drawTable(perceivedResponseTime, "perceived"); - drawTable(overshoot, "overshoot"); - drawTable(vrr, "vrr"); - drawTable(initialResponseTime, "initial"); - drawTable(completeResponseTime, "complete"); - */ - // Draw averages + heatmaps1.standardView(); } - private void graphView() { // Clear view/import panel @@ -613,9 +377,10 @@ private void graphView() // Draw graph if (rawData.Count != 0) { - Size = new Size(1400, 800); + Size = new Size(Size.Width, (Size.Height + 20)); graphViewPanel.Location = new Point(5, 52); drawGraph(0, 0); + showProcessedData(); } else { @@ -653,12 +418,12 @@ private void drawGraph(int arrayIndex, int resultIndex) { resultIndex = 0; } - int startingRGB = rawData[arrayIndex][resultIndex][0]; - int endRGB = rawData[arrayIndex][resultIndex][1]; - int sampleTime = rawData[arrayIndex][resultIndex][2]; - int sampleCount = rawData[arrayIndex][resultIndex][3]; - double averageTime = sampleTime / sampleCount; - double[] resultData = rawData[arrayIndex][resultIndex].Skip(4).Select(x => (double)x).ToArray(); + int startingRGB = rawData[arrayIndex][resultIndex].StartingRGB; + int endRGB = rawData[arrayIndex][resultIndex].EndRGB; + int sampleTime = rawData[arrayIndex][resultIndex].TimeTaken; + int sampleCount = rawData[arrayIndex][resultIndex].SampleCount; + double averageTime = rawData[arrayIndex][resultIndex].SampleTime; + double[] resultData = rawData[arrayIndex][resultIndex].Samples.Select(x => (double)x).ToArray(); double[] timeData = new double[resultData.Length]; for (int i = 0; i < timeData.Length; i++) { @@ -681,7 +446,15 @@ private void drawGraph(int arrayIndex, int resultIndex) graphedData.Refresh(); //showProcessedData(); } - + private void onSpanDrag(object sender, EventArgs e) + { + var hSpan = sender as ScottPlot.Plottable.HSpan; + double newTime = hSpan.X2 - hSpan.X1; + newTime = Math.Round(newTime, 1); + rtLabel.Text = newTime.ToString() + " ms"; + rtTypeLabel.Text = "Manual"; + Console.WriteLine(hSpan.X1 + "" + hSpan.X2); + } static Coordinate MoveBetweenAdjacent(List xs, List ys, int index, Coordinate requested) { int leftIndex = Math.Max(index - 1, 0); @@ -698,9 +471,10 @@ private void handleResultsList(int arrayIndex) { if (rawData.Count != 0) { + transSelect1.Items.Clear(); foreach (var i in rawData[arrayIndex]) { - transSelect1.Items.Add("RGB " + i[0] + " to RGB " + i[1]); + transSelect1.Items.Add("RGB " + i.StartingRGB + " to RGB " + i.EndRGB); } transSelect1.SelectedIndex = 0; } @@ -714,6 +488,7 @@ private void handleRunsList() { if (rawData.Count != 0) { + runSelectBox.Items.Clear(); for (int i = 0; i < rawData.Count; i++) { runSelectBox.Items.Add("Run " + (i + 1).ToString()); @@ -730,98 +505,110 @@ private void importView() { // Clear view/graph panel // Move import panel in view - Size = new Size(1400, 800); + Size = new Size(1100, 420); importPanel.Location = new Point(5, 52); + importViewMenuButton.Checked = true; } private void stdResultsMenuBtn_Click(object sender, EventArgs e) { - standardView(); BackColor = Color.White; + Size = new Size(1800, 1050); + saveHeatmapsToolStripMenuItem.Visible = true; importPanel.Location = new Point(1500, 52); graphViewPanel.Location = new Point(1439, 762); - standardResultsPanel.Location = new Point(5, 52); - allResultsMenuBtn.Checked = false; + stdResultsMenuBtn.Visible = true; + stdResultsMenuBtn.Checked = true; + heatmaps1.Location = new Point(5, 52); + heatmaps1.Visible = true; + importPanel.Visible = false; + graphViewPanel.Visible = false; + if (rawData.Count != 0) + { + graphViewMenuBtn.Visible = true; + } + else + { + graphViewMenuBtn.Visible = false; + } graphViewMenuBtn.Checked = false; importViewMenuButton.Checked = false; - } - private void allResultsMenuBtn_Click(object sender, EventArgs e) - { - if (allResultsMenuBtn.Checked) + viewToolStripMenuItem.Visible = true; + toolStripSeparator1.Visible = true; + try { - stdResultsMenuBtn.Checked = false; - allResultsMenuBtn.Checked = true; - graphViewMenuBtn.Checked = false; - importViewMenuButton.Checked = false; + standardView(); } - else + catch (Exception ex) { - completeView(); - Size = new Size(1400, 800); - stdResultsMenuBtn.Checked = false; - allResultsMenuBtn.Checked = true; - graphViewMenuBtn.Checked = false; - importViewMenuButton.Checked = false; + MessageBox.Show(ex.Message + ex.StackTrace, "Heatmaps View Error", MessageBoxButtons.OK, MessageBoxIcon.Error); } } private void graphViewMenuBtn_Click(object sender, EventArgs e) { - if (graphViewMenuBtn.Checked) + try { - stdResultsMenuBtn.Checked = false; - allResultsMenuBtn.Checked = false; - graphViewMenuBtn.Checked = true; - graphViewMenuBtn.Visible = true; - importViewMenuButton.Checked = false; + graphView(); } - else + catch (Exception ex) { - graphView(); - importPanel.Location = new Point(1439, 762); - graphViewPanel.Location = new Point(5, 52); - standardResultsPanel.Location = new Point(1439, 52); - BackColor = System.Drawing.ColorTranslator.FromHtml("#2e3440"); - stdResultsMenuBtn.Checked = false; - allResultsMenuBtn.Checked = false; - graphViewMenuBtn.Checked = true; - graphViewMenuBtn.Visible = true; - importViewMenuButton.Checked = false; + MessageBox.Show(ex.Message + ex.StackTrace, "Graph View Error", MessageBoxButtons.OK, MessageBoxIcon.Error); } + importPanel.Location = new Point(1439, 762); + graphViewPanel.Location = new Point(5, 52); + heatmaps1.Location = new Point(1395, 55); + heatmaps1.Visible = false; + graphViewPanel.Visible = true; + importPanel.Visible = false; + saveHeatmapsToolStripMenuItem.Visible = false; + Size = new Size(1400, 800); + //Size = new Size(Size.Width, (Size.Height + 15)); + BackColor = System.Drawing.ColorTranslator.FromHtml("#2e3440"); + stdResultsMenuBtn.Checked = false; + graphViewMenuBtn.Checked = true; + graphViewMenuBtn.Visible = true; + importViewMenuButton.Checked = false; + viewToolStripMenuItem.Visible = true; + runSelectToolStrip.Visible = false; + toolStripSeparator3.Visible = true; } private void importViewMenuButton_Click(object sender, EventArgs e) { - if (importViewMenuButton.Checked) - { - stdResultsMenuBtn.Checked = false; - allResultsMenuBtn.Checked = false; - graphViewMenuBtn.Checked = false; - importViewMenuButton.Checked = true; - } - else - { - importView(); - Size = new Size(1400, 800); - importPanel.Location = new Point(5, 52); - graphViewPanel.Location = new Point(1439, 762); - standardResultsPanel.Location = new Point(1439, 52); - stdResultsMenuBtn.Checked = false; - allResultsMenuBtn.Checked = false; - graphViewMenuBtn.Checked = false; - importViewMenuButton.Checked = true; - } + importView(); + Size = new Size(1100, 420); + BackColor = SystemColors.ControlDark; + importPanel.Location = new Point(5, 52); + importPanel.Visible = true; + graphViewPanel.Location = new Point(1439, 762); + graphViewPanel.Visible = false; + heatmaps1.Location = new Point(1395, 55); + heatmaps1.Visible = false; + saveHeatmapsToolStripMenuItem.Visible = false; + stdResultsMenuBtn.Checked = false; + graphViewMenuBtn.Checked = false; + importViewMenuButton.Checked = true; + viewToolStripMenuItem.Visible = false; + runSelectToolStrip.Visible = false; } private void transSelect1_SelectedIndexChanged(object sender, EventArgs e) { - drawGraph(runSelectBox.SelectedIndex, transSelect1.SelectedIndex); - showProcessedData(); + var ctrl = sender as ComboBox; + if (ctrl.Focused) + { + drawGraph(runSelectBox.SelectedIndex, transSelect1.SelectedIndex); + showProcessedData(); + } } private void importGraphBtn_Click(object sender, EventArgs e) { importRawData(); + graphViewMenuBtn_Click(null, null); + handleRunsList(); + handleResultsList(runSelectBox.SelectedIndex); } private void resetGraphBtn_Click(object sender, EventArgs e) @@ -829,959 +616,56 @@ private void resetGraphBtn_Click(object sender, EventArgs e) drawGraph(runSelectBox.SelectedIndex, transSelect1.SelectedIndex); showProcessedData(); } - - private List processGammaTable() + private void showProcessedData() { - if (gamma.Count == 0) - { - if (!Properties.Settings.Default.SuppressDiagBox) - { - MessageBox.Show("No Gamma data is stored in the program.", "Gamma Table Processing Failed", MessageBoxButtons.OK, MessageBoxIcon.Error); - } - return null; - } - else + if (rawData.Count != 0) { - noiseLevel.Clear(); - double[] rgbVals = new double[gamma.Count]; - double[] lightLevelVals = new double[gamma.Count]; - for (int i = 0; i < gamma.Count; i++) + try { - int[] dataLine = gamma[i].Skip(300).ToArray(); - int lineAverage = 0; - for (int j = 0; j < (dataLine.Length - 100); j++) + int resInd = transSelect1.SelectedIndex; + if (resInd < 0) { - lineAverage += dataLine[j]; + resInd = 0; } - noiseLevel.Add(new int[] { gamma[i][0], (dataLine.Max() - dataLine.Min()) }); - lineAverage /= (dataLine.Length - 100); - rgbVals[i] = gamma[i][0]; - lightLevelVals[i] = lineAverage; - } - int pointsBetween = 51; - if (gamma.Count == 16) - { - pointsBetween = 17; - } - var interpPoints = new ScottPlot.Statistics.Interpolation.NaturalSpline(rgbVals, lightLevelVals, pointsBetween); - List x = new List(); - List y = new List(); - foreach (var p in interpPoints.interpolatedXs) - { - x.Add(Convert.ToInt32(p)); - } - foreach (var p in interpPoints.interpolatedYs) - { - y.Add(Convert.ToInt32(p)); - } - List xy = new List(); - for (int k = 0; k < x.Count; k++) - { - xy.Add(new int[] { x[k], y[k] }); - } - return xy; - } - } - - private void processTestLatency() - { - - if (testLatency.Count != 0) - { - int[] tl = testLatency.Skip(5).ToArray(); - for (int n = 0; n < tl.Length; n++) - { - if (tl[n] > 8000) + int arrInd = runSelectBox.SelectedIndex; + if (arrInd < 0) { - if (n <= 150 && n > 30) - { - startDelay = n - 30; - } - else if (n < 30) - { - n /= 2; - startDelay = n; - } - else if (n > 400) - { - startDelay = 250; - } - break; + arrInd = 0; } - } - } - } - - private processedResult ProcessResponseTimeData(resultSelection res) - { - //This is a long one. This is the code that builds the gamma curve, finds the start/end points and calculates response times and overshoot % (gamma corrected) - List processedData = new List(); - - // First, create gamma array from the data - List localGamma = new List(); - List fullGammaTable = new List(); - List smoothedDataTable = new List(); - int noise = 0; - - try //Wrapped whole thing in try just in case - { - // Save start, end, time and sample count then clear the values from the array - int StartingRGB = rawData[res.arrayIndex][res.resultIndex][0]; - int EndRGB = rawData[res.arrayIndex][res.resultIndex][1]; - int TimeTaken = rawData[res.arrayIndex][res.resultIndex][2]; - int SampleCount = rawData[res.arrayIndex][res.resultIndex][3]; - int[] samples = rawData[res.arrayIndex][res.resultIndex].Skip(4).ToArray(); - - double SampleTime = ((double)TimeTaken / (double)SampleCount); // Get the time taken between samples - - // Clean up noisy data using moving average function - int period = 10; - foreach (var n in noiseLevel) - { - if (n[0] == StartingRGB || n[0] == EndRGB) + string rtType = "perceived"; + if (perceivedResponseTimeToolStripMenuItem.Checked) { - noise = n[1]; - break; + rtType = "perceived"; + rtTypeLabel.Text = "Perceived"; } - } - if (noise < 250) - { - period = 20; - } - else if (noise < 500) - { - period = 30; - } - else if (noise < 750) - { - period = 40; - } - else - { - period = 50; - } - int[] buffer = new int[period]; - int[] averagedSamples = new int[samples.Length]; - int current_index = 0; - for (int a = 0; a < samples.Length; a++) - { - buffer[current_index] = samples[a] / period; - int movAvg = 0; - for (int b = 0; b < period; b++) + else if (initialResponseTimeToolStripMenuItem.Checked) { - movAvg += buffer[b]; + rtType = "initial"; + rtTypeLabel.Text = "Initial"; } - averagedSamples[a] = movAvg; - current_index = (current_index + 1) % period; - } - - samples = averagedSamples.Skip(period).ToArray(); //Moving average spoils the first 10 samples so currently removing them. - - List fullSmoothedLine = new List { StartingRGB, EndRGB, TimeTaken, SampleCount }; - fullSmoothedLine.AddRange(samples); - smoothedDataTable.Add(fullSmoothedLine.ToArray()); - - int maxValue = samples.Max(); // Find the maximum value for overshoot - int minValue = samples.Min(); // Find the minimum value for undershoot - // Initialise in-use variables - int transStart = 0; - int transEnd = 0; - int initialTransStart = 0; - int initialTransEnd = 0; - int perceivedTransStart = 0; - int perceivedTransEnd = 0; - - double overUnderRGB = 0.0; - - int startMax = samples[5]; // Initialise these variables with a real value - int startMin = samples[5]; // Initialise these variables with a real value - int endMax = samples[samples.Length - 10]; // Initialise these variables with a real value - int endMin = samples[samples.Length - 10]; // Initialise these variables with a real value - - // Build start min/max to compare against - for (int l = 0; l < startDelay; l++) //CHANGE TO 180 FOR RUN 2 DATA - { - if (samples[l] < startMin) - { - startMin = samples[l]; - } - else if (samples[l] > startMax) - { - startMax = samples[l]; - } - } - - // Build end min/max to compare against - for (int m = samples.Length - 5; m > samples.Length - 150; m--) - { - if (samples[m] < endMin) - { - endMin = samples[m]; - } - else if (samples[m] > endMax) - { - endMax = samples[m]; - } - } - - // Search for where the result starts transitioning - start is almost always less sensitive - for (int j = 0; j < samples.Length; j++) - { - if (StartingRGB < EndRGB) - { - if (samples[j] > (startMax)) - { - if (StartingRGB == 0 && EndRGB == 26) - { - if ((samples[j + 50] > (samples[j] + 25) || samples[j + 56] > (samples[j] + 25)) - && (samples[j + 100] > (samples[j] + 50) || samples[j + 106] > (samples[j] + 50)) - && (samples[j + 125] > (samples[j] + 75) || samples[j + 131] > (samples[j] + 75)) - && (samples[j + 150] > (samples[j] + 100) || samples[j + 156] > (samples[j] + 100))) // check the trigger point is actually the trigger and not noise - { - transStart = j; - break; - } - else - { - if (samples[j] > startMax) - { - startMax = samples[j]; - } - } - } - else - { - if ((samples[j + 50] > (samples[j] + 50) || samples[j + 56] > (samples[j] + 50)) - && (samples[j + 100] > (samples[j] + 100) || samples[j + 106] > (samples[j] + 100)) - && (samples[j + 125] > (samples[j] + 100) || samples[j + 131] > (samples[j] + 100)) - && (samples[j + 150] > (samples[j] + 100) || samples[j + 156] > (samples[j] + 100))) // check the trigger point is actually the trigger and not noise - { - transStart = j; - break; - } - else - { - if (samples[j] > startMax) - { - startMax = samples[j]; - } - } - } - } - } - else - { - if (samples[j] < (startMin)) - { - if (StartingRGB == 26 && EndRGB == 0) - { - if ((samples[j + 50] < (samples[j] - 25) || samples[j + 56] < (samples[j] - 25)) - && (samples[j + 100] < (samples[j] - 50) || samples[j + 106] < (samples[j] - 50)) - && (samples[j + 125] < (samples[j] - 75) || samples[j + 131] < (samples[j] - 75)) - && (samples[j + 150] < (samples[j] - 100) || samples[j + 156] < (samples[j] - 100))) // check the trigger point is actually the trigger and not noise - { - transStart = j; - break; - } - else - { - if (samples[j] < startMin) - { - startMin = samples[j]; - } - } - } - else - { - if ((samples[j + 50] < (samples[j] - 50) || samples[j + 56] < (samples[j] - 50)) - && (samples[j + 100] < (samples[j] - 100) || samples[j + 106] < (samples[j] - 100)) - && (samples[j + 125] < (samples[j] - 100) || samples[j + 131] < (samples[j] - 100)) - && (samples[j + 150] < (samples[j] - 100) || samples[j + 156] < (samples[j] - 100))) // check the trigger point is actually the trigger and not noise - { - transStart = j; - break; - } - else - { - if (samples[j] < startMin) - { - startMin = samples[j]; - } - } - } - } - } - } - - // Search for where the result stops transitioning (from the end) - end position is almost always more sensitive hence lower values - also must account for over/undershoot - for (int j = samples.Length - 1; j > 0; j--) - { - if (StartingRGB < EndRGB) + else if (completeResponseTimeToolStripMenuItem.Checked) { - if (maxValue > (endMax + 100)) //Check for overshoot - { - if (samples[j] > endMax) - { - if (samples[j - 100] > (samples[j] + 50) && samples[j - 125] > (samples[j] + 50)) // check the trigger point is actually the trigger and not noise - { - transEnd = j; - break; - } - else - { - if (samples[j] > endMax) - { - endMax = samples[j]; - } - } - } - } - else - { - if (samples[j] <= (endMin + 20)) //Check for regular finish point - { - if (StartingRGB == 0 && EndRGB == 26) - { - if ((samples[j - 100] < (samples[j] - 25) || samples[j - 106] < (samples[j] - 25)) - && (samples[j - 125] < (samples[j] - 50) || samples[j - 131] < (samples[j] - 50)) - && (samples[j - 150] < (samples[j] - 75) || samples[j - 156] < (samples[j] - 75))) // check the trigger point is actually the trigger and not noise - { - transEnd = j; - break; - } - else - { - if (samples[j] < endMin) - { - endMin = samples[j]; - } - } - } - else - { - if ((samples[j - 100] < (samples[j] - 50) || samples[j - 106] < (samples[j] - 50)) - && (samples[j - 125] < (samples[j] - 75) || samples[j - 131] < (samples[j] - 75)) - && (samples[j - 150] < (samples[j] - 100) || samples[j - 156] < (samples[j] - 100))) // check the trigger point is actually the trigger and not noise - { - transEnd = j; - break; - } - else - { - if (samples[j] < endMin) - { - endMin = samples[j]; - } - } - } - } - } + rtType = "complete"; + rtTypeLabel.Text = "Complete"; } - else + // make view button change this + ProcessData pd = new ProcessData(); + int startDelay = pd.processTestLatency(testLatency); + ProcessData.graphResult proc = pd.processGraphResult(rawData, new ProcessData.resultSelection { - if (minValue < (endMin - 100)) //Check for undershoot - { - if (samples[j] < endMin) //Check for under-shot finish point - { - if (samples[j - 100] < (samples[j] - 50) && samples[j - 125] < (samples[j] - 50)) // check the trigger point is actually the trigger and not noise - { - transEnd = j; - break; - } - else - { - if (samples[j] < endMin) - { - endMin = samples[j]; - } - } - } - } - else - { - if (samples[j] > endMax) //Check for regular finish point - { - if (StartingRGB == 26 && EndRGB == 0) - { - if ((samples[j - 100] > (samples[j] + 25) || samples[j - 106] > (samples[j] + 25)) - && (samples[j - 125] > (samples[j] + 50) || samples[j - 131] > (samples[j] + 50)) - && (samples[j - 150] > (samples[j] + 75) || samples[j - 156] > (samples[j] + 75))) - { - transEnd = j; - break; - } - else - { - if (samples[j] > endMax) - { - endMax = samples[j]; - } - } - } - else - { - if ((samples[j - 100] > (samples[j] + 50) || samples[j - 106] > (samples[j] + 50)) - && (samples[j - 125] > (samples[j] + 75) || samples[j - 131] > (samples[j] + 75)) - && (samples[j - 150] > (samples[j] + 100) || samples[j - 156] > (samples[j] + 100))) - { - transEnd = j; - break; - } - else - { - if (samples[j] > endMax) - { - endMax = samples[j]; - } - } - } - } - } - } - } - double startAverage = 0; - double endAverage = 0; - int avgStart = transStart - 200; - int avgEnd = transEnd + 400; - if (transStart < 200) - { - int t = transStart / 5; - avgStart = transStart - t; - } - if ((samples.Length - transEnd) < 400) - { - int t = (samples.Length - transEnd) / 5; - avgEnd = transEnd + t; - } - for (int q = 0; q < avgStart; q++) - { - startAverage += samples[q]; - } - startAverage /= avgStart; - startAverage = Math.Round(startAverage, 0); - for (int q = avgEnd; q < samples.Length; q++) - { - endAverage += samples[q]; - } - endAverage /= (samples.Length - avgEnd); - endAverage = Math.Round(endAverage, 0); - int arrSize = (transEnd - transStart + 100); - if (samples.Length < (transEnd + 100)) - { - arrSize = samples.Length - transStart; - } - if (arrSize < 110) - { - arrSize = 200; - } - int[] transitionSamples = new int[arrSize]; - // Getting min/max from INSIDE the transition window - if ((transEnd - transStart) != 0) - { - Array.Copy(samples, transStart, transitionSamples, 0, arrSize); - maxValue = transitionSamples.Max(); - minValue = transitionSamples.Min(); - } - - /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - // Overshoot calculations - double overshootPercent = 0; - double overshootRGBDiff = 0; - double peakValue = 0; - if (StartingRGB < EndRGB) - { - peakValue = maxValue; - // Dark to light transition - if (maxValue > (endAverage + 100) && maxValue > (processedGamma[EndRGB][1] + 100)) - { - // undershoot may have occurred - Console.WriteLine("Overshoot found"); - // convert maxValue to RGB using gamma table - for (int i = 0; i < processedGamma.Count; i++) - { - // Find what RGB value matches or exceeds the peak light reading for this run - if (maxValue <= processedGamma[i][1]) - { - // Check if peak light reading is closer to upper or lower bound value - int diff1 = processedGamma[i][1] - maxValue; - int diff2 = maxValue - processedGamma[i - 1][1]; - if (diff1 < diff2) - { - overUnderRGB = processedGamma[i][0]; - } - else - { - overUnderRGB = processedGamma[i - 1][0]; - } - break; - } - else if (maxValue > processedGamma.Last()[1]) - { - if (maxValue > 65500) - { - overUnderRGB = 260; - break; - } - else - { - overUnderRGB = 256; - break; - } - } - } - if (overUnderRGB == -1) - { - //overshootPercent = 100; - } - else - { - overshootRGBDiff = overUnderRGB - EndRGB; - double os = 0; - if (res.osStyle.endPercent) - { - os = (overUnderRGB - EndRGB) / EndRGB; - } - else - { - double range = EndRGB - StartingRGB; - os = overshootRGBDiff / range; - } - os *= 100; - overshootPercent = Math.Round(os, 1); - } - } - } - else - { - peakValue = minValue; - // Light to dark transistion - if (minValue < (endAverage - 100) && minValue < (processedGamma[EndRGB][1] - 100)) - { - // overshoot may have occurred - // convert minValue to RGB using gamma table - Console.WriteLine("Undershoot found"); - for (int i = 0; i < processedGamma.Count; i++) - { - // Find what RGB value matches or exceeds the peak light reading for this run - if (minValue <= processedGamma[i][1]) - { - if (i == 0) - { - overUnderRGB = 0; - break; - } - else - { - // Check if peak light reading is closer to upper or lower bound value - int diff1 = processedGamma[i][1] - minValue; - int diff2 = minValue - processedGamma[i - 1][1]; - if (diff1 < diff2) - { - overUnderRGB = processedGamma[i][0]; - } - else - { - overUnderRGB = processedGamma[i - 1][0]; - } - break; - } - } - } - overshootRGBDiff = EndRGB - overUnderRGB; - double os = 0; - if (res.osStyle.endPercent) - { - os = (EndRGB - overUnderRGB) / EndRGB; - } - else - { - double range = StartingRGB - EndRGB; - os = overshootRGBDiff / range; - } - // os *= -1; - os *= 100; - overshootPercent = Math.Round(os, 1); - if (overshootPercent != 0 && overshootPercent < 1) - { - overshootPercent = 0; - } - } - } - - /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - // INITIAL AND PERCEIVED RESPONSE TIME MEASUREMENTS - if (StartingRGB < EndRGB) - { - // Setup variables for start/end trigger points - double start3 = 0; - double endOffsetRGB = 0; - double end3 = 0; - double endPer3 = 0; - double RGBTolerance = res.rtStyle.Tolerance; - double tol = res.rtStyle.Tolerance / 100; - if (!res.rtStyle.gammaCorrected) - { - double range3 = (endAverage - startAverage) * tol; // Subtract low value from high value to get light level range - start3 = startAverage + range3; // Start trigger value - end3 = endAverage - range3; - if (peakValue > (endAverage + range3)) - { endPer3 = endAverage + range3; } // End trigger value - else - { endPer3 = endAverage - range3; } // End trigger value - } - else - { - if (res.rtStyle.percentage) - { - RGBTolerance = (EndRGB - StartingRGB) * tol; - RGBTolerance = Math.Round(RGBTolerance, 0); - } - endOffsetRGB = EndRGB - RGBTolerance; - start3 = processedGamma[Convert.ToInt32(StartingRGB + RGBTolerance)][1]; - end3 = processedGamma[Convert.ToInt32(EndRGB - RGBTolerance)][1]; - if (overUnderRGB > (EndRGB + RGBTolerance) && overUnderRGB != 0) - { endOffsetRGB = EndRGB + RGBTolerance; } - else if (overUnderRGB == -1) - { endOffsetRGB = EndRGB; } - endPer3 = processedGamma[Convert.ToInt32(endOffsetRGB)][1]; - if (overUnderRGB == -1) - { endPer3 *= 1.02; } - - } - if (endPer3 >= 65520) - { endPer3 = 65500; } - - // Actually find the start/end points - for (int j = (transStart - 20); j < (transEnd + 20); j++) // search samples for start & end trigger points - { - if (samples[j] >= start3 && initialTransStart == 0) // save the FIRST time value exceeds start trigger - { - if ((samples[j + 50] > (start3 + 25) || samples[j + 60] > (start3 + 25)) - && (samples[j + 100] > (start3 + 50) || samples[j + 110] > (start3 + 50)) - && (samples[j + 150] > (start3 + 75) || samples[j + 160] > (start3 + 75))) - { - initialTransStart = j; - perceivedTransStart = j; - } - else if (j == transEnd) - { - initialTransStart = transStart; - perceivedTransStart = transStart; - } - } - else if (samples[j] >= end3) // Save when value exceeds end trigger then break. - { - if ((samples[j + 20] > (end3 + 25) || samples[j + 25] > (end3 + 25)) - && (samples[j + 30] > (end3 + 50) || samples[j + 35] > (end3 + 50)) - && (samples[j + 50] > (end3 + 75) || samples[j + 55] > (end3 + 75))) - { - initialTransEnd = j; - break; - } - else if (j == transEnd) - { - initialTransEnd = transEnd; - break; - } - } - else if (j == transEnd) - { - initialTransEnd = transEnd; - break; - } - } - for (int j = (transEnd + 20); j > (transStart - 20); j--) // search samples for end point - { - if (endOffsetRGB > EndRGB || overUnderRGB == -1 || (endOffsetRGB == 0 && endPer3 > endAverage && overshootPercent > 1)) // Including overshoot in the curve - { - if (samples[j] >= endPer3) // add the same sort of more detailed check like complete for finding this - { - if ((samples[j - 25] > (endPer3 + 25) || samples[j - 30] > (endPer3 + 25)) - && (samples[j - 35] > (endPer3 + 50) || samples[j - 40] > (endPer3 + 50))) - { - perceivedTransEnd = j; - break; - } - } - else if (j == transStart) - { - perceivedTransEnd = j; - break; - } - } - else // No overshoot found within RGB tolerance - { - if (samples[j] <= endPer3) - { - if ((samples[j - 50] < (endPer3 - 25) || samples[j - 60] < (endPer3 - 25)) - && (samples[j - 100] < (endPer3 - 50) || samples[j - 110] < (endPer3 - 50)) - && (samples[j - 150] < (endPer3 - 75) || samples[j - 160] < (endPer3 - 75))) - { - perceivedTransEnd = j; - break; - } - } - else if (j == transStart) - { - perceivedTransEnd = j; - break; - } - } - } - if (perceivedTransEnd < initialTransEnd) - { // just in case the two methods differ slightly and perceived would come out as shorter. - perceivedTransEnd = initialTransEnd; - } - } - else - { - // Setup variables for start/end trigger points - double start3 = 0; - double endOffsetRGB = 0; - double end3 = 0; - double endPer3 = 0; - double RGBTolerance = res.rtStyle.Tolerance; - double tol = res.rtStyle.Tolerance / 100; - if (!res.rtStyle.gammaCorrected) - { - double range3 = (startAverage - endAverage) * tol; // Subtract low value from high value to get light level range - start3 = startAverage - range3; // Start trigger value - end3 = endAverage + range3; - if (peakValue < (endAverage - range3)) - { endPer3 = endAverage - range3; } // End trigger value - else - { endPer3 = endAverage + range3; } // End trigger value - } - else - { - if (res.rtStyle.percentage) - { - RGBTolerance = (StartingRGB - EndRGB) * tol; - RGBTolerance = Math.Round(RGBTolerance, 0); - } - endOffsetRGB = EndRGB + RGBTolerance; - start3 = processedGamma[Convert.ToInt32(StartingRGB - RGBTolerance)][1]; - end3 = processedGamma[Convert.ToInt32(EndRGB + RGBTolerance)][1]; - if (overUnderRGB < (EndRGB - RGBTolerance) && overUnderRGB != 0) - { - endOffsetRGB = EndRGB - RGBTolerance; - } - endPer3 = processedGamma[Convert.ToInt32(endOffsetRGB)][1]; - } - - for (int j = (transStart - 20); j < (transEnd + 20); j++) // search samples for start point - { - if (samples[j] <= start3 && initialTransStart == 0) // save the FIRST time value exceeds start trigger - { - if ((samples[j + 50] < (start3 - 25) || samples[j + 60] < (start3 - 25)) - && (samples[j + 100] < (start3 - 50) || samples[j + 110] < (start3 - 50)) - && (samples[j + 150] < (start3 - 75) || samples[j + 160] < (start3 - 75))) - { - initialTransStart = j; - perceivedTransStart = j; - } - else if (j == transEnd) - { - initialTransStart = transStart; - perceivedTransStart = transStart; - } - } - else if (samples[j] <= end3) // Save when value exceeds end trigger then break. - { - if ((samples[j + 50] < (end3 - 25) || samples[j + 60] < (end3 - 25)) - && (samples[j + 100] < (end3 - 50) || samples[j + 110] < (end3 - 50)) - && (samples[j + 150] < (end3 - 75) || samples[j + 160] < (end3 - 75))) - { - initialTransEnd = j; - break; - } - else if (j == transEnd) - { - initialTransEnd = transEnd; - break; - } - } - else if (j == transEnd) - { - initialTransEnd = transEnd; - break; - } - } - for (int j = (transEnd + 20); j > (transStart - 20); j--) // search samples for end point - { - if ((endOffsetRGB < EndRGB && endOffsetRGB != 0) || (endPer3 < endAverage && endOffsetRGB == 0 && overshootPercent > 1)) // Including undershoot in the curve - { - if (samples[j] <= endPer3) - { - if ((samples[j - 20] < (endPer3 - 25) || samples[j - 25] < (endPer3 - 25)) - && (samples[j - 30] < (endPer3 - 50) || samples[j - 35] < (endPer3 - 50))) - { - perceivedTransEnd = j; - break; - } - } - else if (j == transStart) - { - perceivedTransEnd = j; - break; - } - } - else // No overshoot found within RGB tolerance - { - if (samples[j] >= endPer3) - { - - if ((samples[j - 50] > (endPer3 + 25) || samples[j - 60] > (endPer3 + 25)) - && (samples[j - 100] > (endPer3 + 50) || samples[j - 110] > (endPer3 + 50)) - && (samples[j - 150] > (endPer3 + 75) || samples[j - 160] > (endPer3 + 75))) - { - perceivedTransEnd = j; - break; - } - } - else if (j == transStart) - { - perceivedTransEnd = j; - break; - } - } - } - if (perceivedTransEnd < initialTransEnd) - { // just in case the two methods differ slightly and perceived would come out as shorter. - perceivedTransEnd = initialTransEnd; - } - } - - double transCount = transEnd - transStart; - double transTime = (transCount * SampleTime) / 1000; - - double initialTransCount = initialTransEnd - initialTransStart; - double initialTransTime = (initialTransCount * SampleTime) / 1000; - - double perceivedTransCount = perceivedTransEnd - perceivedTransStart; - double perceivedTransTime = (perceivedTransCount * SampleTime) / 1000; - - double inputLagTime = (transStart * SampleTime) / 1000; - - double responseTime = Math.Round(transTime, 1); - double initialResponseTime = Math.Round(initialTransTime, 1); - double perceivedResponseTime = Math.Round(perceivedTransTime, 1); - - double visualResponseRating = 100 - (initialResponseTime + perceivedResponseTime); - - double inputLag = Math.Round(inputLagTime, 1); - - - if (res.osStyle.gammaCorrected && (!res.osStyle.endPercent || !res.osStyle.rangePercent)) - { - // Standard output with total transition time & gamma corrected overshoot value - if (overUnderRGB == -1) - { - overshootRGBDiff = 100; - } - double[] completeResult = new double[] { StartingRGB, EndRGB, responseTime, initialResponseTime, perceivedResponseTime, overshootRGBDiff, visualResponseRating, inputLag }; - processedData.Add(completeResult); - - return new processedResult { Time = perceivedResponseTime, startIndex = perceivedTransStart, endIndex = perceivedTransEnd, Overshoot = overshootRGBDiff }; - } - else if (res.osStyle.endPercent || res.osStyle.rangePercent) - { - // Standard output with total transition time & overshoot light level percentage - double os = 0; - if (res.osStyle.gammaCorrected) - { - peakValue = overUnderRGB; - endAverage = EndRGB; - startAverage = StartingRGB; - } - if (res.osStyle.endPercent) + arrayIndex = arrInd, + resultIndex = resInd, + rtStyle = rtMethodologies[processTypeListBox.SelectedIndex], + osStyle = osMethodologies[overshootStyleListBox.SelectedIndex] + }, startDelay, processedGamma, rtType); + try { - if (StartingRGB < EndRGB) - { - if (peakValue > (endAverage + 100)) - { - os = (peakValue - endAverage) / endAverage; - os *= 100; - os = Math.Round(os, 1); - } - } - else - { - if (peakValue < (endAverage - 100)) - { - os = (endAverage - peakValue) / endAverage; - // os *= -1; - os *= 100; - os = Math.Round(os, 1); - } - } + rtLabel.Text = proc.Time.ToString() + " ms"; } - else + catch (Exception err) { - if (StartingRGB < EndRGB) - { - if (peakValue > (endAverage + 100)) - { - double range = endAverage - startAverage; - double peakRange = peakValue - endAverage; - os = peakRange / range; - os *= 100; - os = Math.Round(os, 1); - } - } - else - { - if (peakValue < (endAverage - 100)) - { - double range = startAverage - endAverage; - double peakRange = endAverage - peakValue; - os = peakRange / range; - // os *= -1; - os *= 100; - os = Math.Round(os, 1); - } - } + Console.WriteLine(err.Message + err.StackTrace); } - double[] completeResult = new double[] { StartingRGB, EndRGB, responseTime, initialResponseTime, perceivedResponseTime, os, visualResponseRating, inputLag }; - processedData.Add(completeResult); - return new processedResult { Time = perceivedResponseTime, startIndex = perceivedTransStart, endIndex = perceivedTransEnd, Overshoot = os }; - } - else - { - // Standard output with total transition time & gamma corrected overshoot percentage - double[] completeResult = new double[] { StartingRGB, EndRGB, responseTime, initialResponseTime, perceivedResponseTime, overshootPercent, visualResponseRating, inputLag }; - processedData.Add(completeResult); - - return new processedResult { Time = perceivedResponseTime, startIndex = perceivedTransStart, endIndex = perceivedTransEnd, Overshoot = overshootPercent }; - } - } - catch (Exception procEx) - { - Console.WriteLine(procEx.Message + procEx.StackTrace); - return null; - } - } - - private void showProcessedData() - { - if (rawData.Count != 0) - { - try - { - int resInd = transSelect1.SelectedIndex; - if (resInd < 0) - { - resInd = 0; - } - processedResult proc = ProcessResponseTimeData(new resultSelection - { - arrayIndex = runSelectBox.SelectedIndex, - resultIndex = resInd, - rtStyle = rtMethodologies[processTypeListBox.SelectedIndex], - osStyle = osMethodologies[overshootStyleListBox.SelectedIndex] - }); - rtLabel.Text = proc.Time.ToString() + " ms"; - rtTypeLabel.Text = "Perceived"; if (osMethodologies[overshootStyleListBox.SelectedIndex].endPercent || osMethodologies[overshootStyleListBox.SelectedIndex].rangePercent) { osLabel.Text = proc.Overshoot.ToString() + "%"; @@ -1795,10 +679,10 @@ private void showProcessedData() double resTime = Convert.ToDouble(testLatency[2]); double sampleCount = Convert.ToDouble(testLatency[3]); double sampleTime = resTime / sampleCount; - double start = proc.startIndex * sampleTime; + double start = ((proc.startIndex + proc.offset) * sampleTime); start /= 1000; start = Math.Round(start, 2); - double end = proc.endIndex * sampleTime; + double end = ((proc.endIndex + proc.offset) * sampleTime); end /= 1000; end = Math.Round(end, 2); var hSpan = graphedData.Plot.AddHorizontalSpan(start, end); @@ -1808,42 +692,44 @@ private void showProcessedData() graphedData.Plot.Render(); graphedData.Refresh(); latencyLabel.Text = start.ToString() + " ms"; - } catch (Exception ex) { + MessageBox.Show(ex.Message + ex.StackTrace, "Failed to Process Data", MessageBoxButtons.OK, MessageBoxIcon.Error); Console.WriteLine(ex.Message + ex.StackTrace); } } } - private void onSpanDrag(object sender, EventArgs e) - { - var hSpan = sender as ScottPlot.Plottable.HSpan; - double newTime = hSpan.X2 - hSpan.X1; - newTime = Math.Round(newTime, 1); - rtLabel.Text = newTime.ToString() + " ms"; - rtTypeLabel.Text = "Manual"; - Console.WriteLine(hSpan.X1 + "" + hSpan.X2); - } - private void processTypeListBox_SelectedIndexChanged(object sender, EventArgs e) { - showProcessedData(); + var ctrl = sender as ComboBox; + if (ctrl.Focused) + { + showProcessedData(); + } } private void overshootStyleListBox_SelectedIndexChanged(object sender, EventArgs e) { - showProcessedData(); + var ctrl = sender as ComboBox; + if (ctrl.Focused) + { + showProcessedData(); + } } private void runSelectBox_SelectedIndexChanged(object sender, EventArgs e) { - drawGraph(runSelectBox.SelectedIndex, transSelect1.SelectedIndex); - showProcessedData(); + var ctrl = sender as ComboBox; + if (ctrl.Focused) + { + drawGraph(runSelectBox.SelectedIndex, transSelect1.SelectedIndex); + showProcessedData(); + } } - private void importRawFolder_Click(object sender, EventArgs e) + private bool importRawFolderData() { // Open folder picker dialogue var filePath = string.Empty; @@ -1858,17 +744,22 @@ private void importRawFolder_Click(object sender, EventArgs e) { rawData.Clear(); gamma.Clear(); + //processedGamma.Clear(); + //averageData.Clear(); + //multipleRunsData.Clear(); //results.Clear(); string[] files = Directory.GetFiles(filePath); bool valid = false; foreach (var f in files) { - if (f.Contains("-RAW-OSRTT")) + if (f.Contains("-RAW-OSRTT") && !f.Contains("INPUT")) { valid = true; + gamma.Clear(); + testLatency.Clear(); try { - List tempRes = new List(); + List tempRes = new List(); List tempGamma = new List(); using (System.Windows.Forms.OpenFileDialog OFD = new System.Windows.Forms.OpenFileDialog()) { @@ -1881,45 +772,63 @@ private void importRawFolder_Click(object sender, EventArgs e) while (!reader.EndOfStream) { // This can probably be done better - string[] line = reader.ReadLine().Split(','); - int[] intLine = new int[line.Length]; - for (int i = 0; i < line.Length; i++) + string fullLine = reader.ReadLine(); + if (fullLine.Contains("{")) { - if (line[i] == "0") - { - intLine[i] = 0; - } - else if (line[i] != "") + ProcessData.runSettings runs = JsonConvert.DeserializeObject(fullLine); + runSettings = runs; + continue; + } + else + { + string[] line = fullLine.Split(','); + int[] intLine = new int[line.Length]; + for (int i = 0; i < line.Length; i++) { - intLine[i] = int.Parse(line[i]); + if (line[i] == "0") + { + intLine[i] = 0; + } + else if (line[i] != "" && !line[i].Contains(".")) + { + intLine[i] = int.Parse(line[i]); + } + else + { + continue; + } } - else + Array.Resize(ref intLine, intLine.Length - 1); + if (intLine[0] == 1000) { - continue; + testLatency.AddRange(intLine); + } + else if (intLine[0] == intLine[1]) + { + tempGamma.Add(intLine); + } + else + { + ProcessData.rawResultData rawResult = new ProcessData.rawResultData + { + StartingRGB = intLine[0], + EndRGB = intLine[1], + TimeTaken = intLine[2], + SampleCount = intLine[3], + SampleTime = ((double)intLine[2] / (double)intLine[3]), + Samples = intLine.Skip(4).ToList() + }; + tempRes.Add(rawResult); } - } - Array.Resize(ref intLine, intLine.Length - 1); - if (intLine[0] == 1000) - { - testLatency.AddRange(intLine); - } - else if (intLine[0] == intLine[1]) - { - tempGamma.Add(intLine); - } - else - { - tempRes.Add(intLine); } } } } - rawData.AddRange(new List> { tempRes }); + rawData.AddRange(new List> { tempRes }); gamma.AddRange(tempGamma); - processedGamma.AddRange(processGammaTable()); - processTestLatency(); + + //processTestLatency(); Console.WriteLine(rawData.Count); - } catch (IOException iex) { @@ -1929,22 +838,41 @@ private void importRawFolder_Click(object sender, EventArgs e) } else { - Console.WriteLine(iex.Message + iex.StackTrace); + MessageBox.Show(iex.Message + iex.StackTrace, "Unable to open file", MessageBoxButtons.OK, MessageBoxIcon.Error); } } } } if (valid) { - // Draw graph - graphViewMenuBtn_Click(null, null); - handleRunsList(); - handleResultsList(runSelectBox.SelectedIndex); + resultsFolderPath = filePath; + Console.WriteLine(filePath); + Console.WriteLine(resultsFolderPath); + ProcessData pd = new ProcessData(); + foreach (var i in rawData) + { + processedGamma.Clear(); + processedGamma.AddRange(pd.processGammaTable(gamma, i)); + } + // save gamma data to file + if (Properties.Settings.Default.saveGammaTable) + { + CFuncs cf = new CFuncs(); + string gammaName = cf.createFileName(resultsFolderPath, "-GAMMA-OSRTT.csv"); + StringBuilder gammaCsv = new StringBuilder(); + gammaCsv.AppendLine("RGB,Light Level"); + foreach (ProcessData.gammaResult g in processedGamma) + { + gammaCsv.AppendLine(g.RGB.ToString() + "," + g.LightLevel.ToString()); + } + File.WriteAllText(resultsFolderPath + "\\" + gammaName, gammaCsv.ToString()); + } } else { MessageBox.Show("Please select a results folder with one or more raw data files", "Unable to load files", MessageBoxButtons.OK, MessageBoxIcon.Error); } + return valid; } else { @@ -1952,6 +880,15 @@ private void importRawFolder_Click(object sender, EventArgs e) } } } + return false; + } + + private void importRawFolder_Click(object sender, EventArgs e) + { + importRawFolderData(); + graphViewMenuBtn_Click(null, null); + handleRunsList(); + handleResultsList(runSelectBox.SelectedIndex); } private void importResultsViewBtn_Click(object sender, EventArgs e) @@ -1970,52 +907,80 @@ private void importResultsViewBtn_Click(object sender, EventArgs e) { //Get the path of specified file filePath = openFileDialog.FileName; + //rawData.Clear(); + //gamma.Clear(); + //processedGamma.Clear(); averageData.Clear(); - if (filePath.Contains("FULL-OSRTT")) + multipleRunsData.Clear(); + if (filePath.Contains("FULL-OSRTT") || (!filePath.Contains("RAW") && !filePath.Contains("GAMMA") && !filePath.Contains("INPUT"))) { //Read the contents of the file into a stream try { - List tempRes = new List(); + List tempRes = new List(); var fileStream = openFileDialog.OpenFile(); using (StreamReader reader = new StreamReader(fileStream)) { while (!reader.EndOfStream) { // This can probably be done better - string[] line = reader.ReadLine().Split(','); - if (line[0].Contains("RGB")) + string fullLine = reader.ReadLine(); + + if (fullLine.Contains("{")) { + ProcessData.runSettings runs = JsonConvert.DeserializeObject(fullLine); + runSettings = runs; continue; } - double[] intLine = new double[line.Length]; - for (int i = 0; i < line.Length; i++) + else if (fullLine.Contains("RGB")) { - if (line[i] == "0") - { - intLine[i] = 0; - } - else if (line[i] != "") + continue; + } + else + { + string[] line = fullLine.Split(','); + double[] intLine = new double[line.Length]; + for (int i = 0; i < line.Length; i++) { - intLine[i] = double.Parse(line[i]); + if (line[i] == "0") + { + intLine[i] = 0; + } + else if (line[i] != "") + { + intLine[i] = double.Parse(line[i]); + } + else + { + continue; + } } - else + Array.Resize(ref intLine, intLine.Length - 1); + ProcessData.processedResult proc = new ProcessData.processedResult { - continue; - } + StartingRGB = (int)intLine[0], + EndRGB = (int)intLine[1], + compTime = intLine[2], + initTime = intLine[3], + perTime = intLine[4], + Overshoot = intLine[5], + visualResponseRating = intLine[6], + }; + tempRes.Add(proc); } - Array.Resize(ref intLine, intLine.Length - 1); - - tempRes.Add(intLine); - } } - averageData.AddRange( tempRes ); + resultsFolderPath = filePath.Substring(0, filePath.LastIndexOf('\\')); + averageData.AddRange(tempRes); stdResultsMenuBtn_Click(null, null); } catch (Exception ex) { - DialogResult d = MessageBox.Show("File may be in use by another program, please make sure it's not open elsewhere and try again.", "Unable to open file", MessageBoxButtons.OK, MessageBoxIcon.Error); + DialogResult d = MessageBox.Show("File may be in use by another program, please make sure it's not open elsewhere and try again. See more details on the error?", "Unable to open file", MessageBoxButtons.YesNo, MessageBoxIcon.Error); + if (d == DialogResult.Yes) + { + MessageBox.Show(ex.Message + ex.StackTrace, "Full Error", MessageBoxButtons.OK, MessageBoxIcon.Error); + } Console.WriteLine(ex.Message + ex.StackTrace); } } @@ -2026,5 +991,608 @@ private void importResultsViewBtn_Click(object sender, EventArgs e) } } } + + private void saveAsPNGBtn_Click(object sender, EventArgs e) + { + string run = "Run 1"; + string result = "RGB 0 to RGB 51"; + if (runSelectBox.SelectedIndex != null) + { + run = runSelectBox.Items[runSelectBox.SelectedIndex].ToString(); + } + if (transSelect1.SelectedIndex != null) + { + result = transSelect1.Items[transSelect1.SelectedIndex].ToString(); + } + Color bnColor = BackColor; + graphedData.Plot.Style(figureBackground: Color.Transparent, dataBackground: Color.Transparent); + graphedData.Plot.SaveFig(path + "\\" + run + "-" + result + ".png", 1920, 1080, false); + graphedData.Plot.Style(figureBackground: bnColor, dataBackground: bnColor); + Process.Start("explorer.exe", path); + } + + private void saveGraphNoHSpanBtn_Click(object sender, EventArgs e) + { + string run = "Run 1"; + string result = "RGB 0 to RGB 51"; + if (runSelectBox.SelectedIndex != null) + { + run = runSelectBox.Items[runSelectBox.SelectedIndex].ToString(); + } + if (transSelect1.SelectedIndex != null) + { + result = transSelect1.Items[transSelect1.SelectedIndex].ToString(); + } + var plots = graphedData.Plot.GetPlottables(); + foreach (var i in plots) + { + if (i.ToString().Contains("span")) + { + i.IsVisible = false; + } + } + Color bnColor = BackColor; + graphedData.Plot.Style(figureBackground: Color.Transparent, dataBackground: Color.Transparent); + graphedData.Plot.SaveFig(path + "\\" + run + "-" + result + ".png", 1920, 1080, false); + graphedData.Plot.Style(figureBackground: bnColor, dataBackground: bnColor); + Process.Start("explorer.exe", path); + + foreach (var i in plots) + { + if (i.ToString().Contains("span")) + { + i.IsVisible = true; + } + } + } + + private void asTransparentPNGToolStripMenuItem_Click(object sender, EventArgs e) + { + string fileName = "OSRTT Heatmaps.png"; + string monitorInfo = ""; + if (resultsFolderPath != "") + { + string[] folders = resultsFolderPath.Split('\\'); + monitorInfo = folders.Last(); + fileName = monitorInfo + ".png"; + } + else + { + resultsFolderPath = path; + } + Bitmap heatmaps = new Bitmap(this.Width, this.Height); + //BackColor = Color.FromArgb(255,240,240,240); + heatmaps1.hideText(false); + this.DrawToBitmap(heatmaps, new Rectangle(0, 0, heatmaps.Width, heatmaps.Height)); + + // crop sides + // 80px top, 8px every other side + // width - 16, height - 88, x = 8, y = 80 + var rect = new Rectangle(new Point(8, 80), new Size((this.Width - 16), (this.Height - 88))); + //Bitmap scaledHeatmap = CropImage(heatmaps, rect); + //Bitmap finalHeatmaps = ScaleImage(scaledHeatmap, 1920, 1080); + Bitmap finalHeatmaps = CropImage(heatmaps, rect); + finalHeatmaps.MakeTransparent(BackColor); + // draw text back... + string rtTitle = "Perceived Response Time"; + string rtSubTitle = runSettings.rtMethod.Name; + string osTitle = "RGB Overshoot"; + string osSubTitle = "RGB values over/under target"; + string vrrTitle = "Visual Response Rating"; + string vrrSubTitle = "Score out of 100 of visible performance"; + if (initialResponseTimeToolStripMenuItem.Checked) + { + rtTitle = "Initial Response Time"; + } + else if (completeResponseTimeToolStripMenuItem.Checked) + { + rtTitle = "Complete Response Time"; + } + if (runSettings.osMethod.gammaCorrected && (!runSettings.osMethod.endPercent || !runSettings.osMethod.rangePercent)) + { + osTitle = "RGB Overshoot"; + osSubTitle = "RGB values over/under target"; + } + else if (osMethod.gammaCorrected && (osMethod.endPercent || osMethod.rangePercent)) + { + osTitle = "Percent RGB Overshoot"; + if (osMethod.rangePercent) + { + osSubTitle = "Percentage of RGB values over/under transition range"; + } + else + { + osSubTitle = "Percentage of RGB values over/under target"; + } + } + else if (!osMethod.gammaCorrected && (osMethod.endPercent || osMethod.rangePercent)) + { + osTitle = "Percent Overshoot"; + if (osMethod.rangePercent) + { + osSubTitle = "Percent of light level over/under transition range"; + } + else + { + osSubTitle = "Percent of light level over/under target"; + } + } + using (Graphics g = Graphics.FromImage(finalHeatmaps)) + { + g.TextRenderingHint = TextRenderingHint.AntiAliasGridFit; + g.SmoothingMode = SmoothingMode.AntiAlias; + g.InterpolationMode = InterpolationMode.HighQualityBicubic; + StringFormat sf = new StringFormat(); + sf.Alignment = StringAlignment.Center; + sf.LineAlignment = StringAlignment.Center; + Rectangle rt = new Rectangle(100, 36, 377, 36); + Rectangle rtSub = new Rectangle(100, 65, 377, 36); + Rectangle os = new Rectangle(676, 36, 377, 36); + Rectangle osSub = new Rectangle(676, 65, 377, 36); + Rectangle vrr = new Rectangle(1264, 36, 377, 36); + Rectangle vrrSub = new Rectangle(1264, 65, 377, 36); + FontFamily ff = new FontFamily("Calibri"); + Font f = new Font(ff, 20f, FontStyle.Bold); + Font fi = new Font(ff, 16f, FontStyle.Italic); + g.DrawString(rtTitle, f, Brushes.Black, rt, sf); + g.DrawString(rtSubTitle, fi, Brushes.Black, rtSub, sf); + g.DrawString(osTitle, f, Brushes.Black, os, sf); + g.DrawString(osSubTitle, fi, Brushes.Black, osSub, sf); + g.DrawString(vrrTitle, f, Brushes.Black, vrr, sf); + g.DrawString(vrrSubTitle, fi, Brushes.Black, vrrSub, sf); + g.DrawString("From", fi, Brushes.Black, new Point(29, 393)); + g.DrawString("From", fi, Brushes.Black, new Point(606, 393)); + g.DrawString("From", fi, Brushes.Black, new Point(1190, 393)); + g.DrawString("To", fi, Brushes.Black, new Point(556, 106)); + g.DrawString("To", fi, Brushes.Black, new Point(1132, 106)); + g.DrawString("To", fi, Brushes.Black, new Point(1717, 106)); + } + + finalHeatmaps.Save(resultsFolderPath + "\\" + fileName); + Process.Start("explorer.exe", resultsFolderPath); + BackColor = Color.White; + heatmaps1.hideText(true); + } + + public Bitmap CropImage(Bitmap source, Rectangle section) + { + var bitmap = new Bitmap(section.Width, section.Height); + using (var g = Graphics.FromImage(bitmap)) + { + g.InterpolationMode = InterpolationMode.HighQualityBicubic; + g.TextRenderingHint = TextRenderingHint.AntiAliasGridFit; + g.SmoothingMode = SmoothingMode.AntiAlias; + g.DrawImage(source, 0, 0, section, GraphicsUnit.Pixel); + return bitmap; + } + } + + public Bitmap ScaleImage(Bitmap source, float width, float height) // Depreciated, resized window instead! + { + float scale = Math.Min(width / source.Width, height / source.Height); + var scaleWidth = (int)(source.Width * scale); + var scaleHeight = (int)(source.Height * scale); + var bitmap = new Bitmap(scaleWidth, scaleHeight); + using (Graphics graph = Graphics.FromImage(bitmap)) + { + var brush = new SolidBrush(Color.Transparent); + graph.InterpolationMode = InterpolationMode.High; + graph.CompositingQuality = CompositingQuality.HighQuality; + graph.SmoothingMode = SmoothingMode.AntiAlias; + graph.FillRectangle(brush, new RectangleF(0, 0, 1920, 1080)); + graph.DrawImage(source, new Rectangle(0, 0, scaleWidth, scaleHeight)); + return bitmap; + } + } + + private void asPNGToolStripMenuItem_Click(object sender, EventArgs e) + { + string fileName = "OSRTT Heatmaps.png"; + string monitorInfo = ""; + if (resultsFolderPath != "") + { + string[] folders = resultsFolderPath.Split('\\'); + monitorInfo = folders.Last(); + fileName = monitorInfo + ".png"; + } + else + { + resultsFolderPath = path; + } + Bitmap heatmaps = new Bitmap(this.Width, this.Height); + this.DrawToBitmap(heatmaps, new Rectangle(0, 0, heatmaps.Width, heatmaps.Height)); + //heatmaps.MakeTransparent(BackColor); + + // crop sides + // 80px top, 8px every other side + // width - 16, height - 88, x = 8, y = 80 + var rect = new Rectangle(new Point(8, 80), new Size((this.Width - 16), (this.Height - 88))); + //Bitmap scaledHeatmap = CropImage(heatmaps, rect); + //Bitmap finalHeatmaps = ScaleImage(scaledHeatmap, 1920, 1080); + Bitmap finalHeatmaps = CropImage(heatmaps, rect); + finalHeatmaps.Save(resultsFolderPath + "\\" + fileName); + Process.Start("explorer.exe", resultsFolderPath); + } + + private void perceivedResponseTimeToolStripMenuItem_Click(object sender, EventArgs e) + { + perceivedResponseTimeToolStripMenuItem.Checked = true; + initialResponseTimeToolStripMenuItem.Checked = false; + completeResponseTimeToolStripMenuItem.Checked = false; + if (stdResultsMenuBtn.Checked) + { + standardView(); + } + else if (graphViewMenuBtn.Checked) + { + drawGraph(runSelectBox.SelectedIndex, transSelect1.SelectedIndex); + showProcessedData(); + } + } + + private void initialResponseTimeToolStripMenuItem_Click(object sender, EventArgs e) + { + perceivedResponseTimeToolStripMenuItem.Checked = false; + initialResponseTimeToolStripMenuItem.Checked = true; + completeResponseTimeToolStripMenuItem.Checked = false; + if (stdResultsMenuBtn.Checked) + { + standardView(); + } + else if (graphViewMenuBtn.Checked) + { + drawGraph(runSelectBox.SelectedIndex, transSelect1.SelectedIndex); + showProcessedData(); + } + } + + private void completeResponseTimeToolStripMenuItem_Click(object sender, EventArgs e) + { + perceivedResponseTimeToolStripMenuItem.Checked = false; + initialResponseTimeToolStripMenuItem.Checked = false; + completeResponseTimeToolStripMenuItem.Checked = true; + if (stdResultsMenuBtn.Checked) + { + standardView(); + } + else if (graphViewMenuBtn.Checked) + { + drawGraph(runSelectBox.SelectedIndex, transSelect1.SelectedIndex); + showProcessedData(); + } + } + + private void processAllRuns(ProcessData.rtMethods rtMethod, ProcessData.osMethods osMethod, bool single) + { + averageData.Clear(); + multipleRunsData.Clear(); + ProcessData pd = new ProcessData(); + int startDelay = pd.processTestLatency(testLatency); + List> processedData = new List>(); + processedData.AddRange(pd.ProcessAllResults(rawData, new ProcessData.resultSelection + { + rtStyle = rtMethod, + osStyle = osMethod + }, startDelay, processedGamma)); + CFuncs cf = new CFuncs(); + + foreach (var res in processedData) + { + StringBuilder csvString = new StringBuilder(); + string rtType = "Initial Response Time - 3% (ms)"; + string osType = "Overshoot"; + string osSign = "(%)"; + string perType = "Perceived Response Time - 3% (ms)"; + if (rtMethod.Tolerance == 10 && !rtMethod.gammaCorrected) + { + rtType = "Initial Response Time - 10% (ms)"; + perType = "Perceived Response Time - 10% (ms)"; + } + else if (rtMethod.Tolerance == 10 && rtMethod.gammaCorrected) + { + rtType = "Initial Response Time - RGB10 (ms)"; + perType = "Perceived Response Time - RGB10 (ms)"; + } + else if (rtMethod.Tolerance == 5 && rtMethod.gammaCorrected) + { + rtType = "Initial Response Time - RGB5 (ms)"; + perType = "Perceived Response Time - RGB5 (ms)"; + } + if (osMethod.gammaCorrected) + { + osSign = "(RGB)"; + } + if (osMethod.gammaCorrected && (osMethod.endPercent || osMethod.rangePercent)) + { + osSign = "(RGB %)"; + } + string fullFileName = cf.createFileName(resultsFolderPath, "-FULL-OSRTT.csv"); + csvString.AppendLine("Starting RGB,End RGB,Complete Response Time (ms)," + rtType + "," + perType + "," + osType + " " + osSign + ",Visual Response Rating,Input Lag (ms)"); + foreach (ProcessData.processedResult i in res) + { + // save each run to file + csvString.AppendLine( + i.StartingRGB.ToString() + "," + + i.EndRGB.ToString() + "," + + i.compTime.ToString() + "," + + i.initTime.ToString() + "," + + i.perTime.ToString() + "," + + i.Overshoot.ToString() + "," + + i.visualResponseRating.ToString() + "," + + i.inputLag.ToString() + ); + } + if (runSettings != null) + { + csvString.AppendLine(JsonConvert.SerializeObject(runSettings)); + } + string fullFilePath = resultsFolderPath + "\\" + fullFileName; + File.WriteAllText(fullFilePath, csvString.ToString()); + multipleRunsData.Add(res); + } + if (!single) + { + averageData.AddRange(pd.AverageMultipleRuns(processedData, osMethod)); + // save averaged data to file + string[] folders = resultsFolderPath.Split('\\'); + string monitorInfo = folders.Last(); + StringBuilder avgCsvString = new StringBuilder(); + string avgRtType = "Initial Response Time - 3% (ms)"; + string avgOsType = "Overshoot"; + string avgOsSign = "(%)"; + string avgPerType = "Perceived Response Time - 3% (ms)"; + if (rtMethod.Tolerance == 10 && !rtMethod.gammaCorrected) + { + avgRtType = "Initial Response Time - 10% (ms)"; + avgPerType = "Perceived Response Time - 10% (ms)"; + } + else if (rtMethod.Tolerance == 10 && rtMethod.gammaCorrected) + { + avgRtType = "Initial Response Time - RGB10 (ms)"; + avgPerType = "Perceived Response Time - RGB10 (ms)"; + } + else if (rtMethod.Tolerance == 5 && rtMethod.gammaCorrected) + { + avgRtType = "Initial Response Time - RGB5 (ms)"; + avgPerType = "Perceived Response Time - RGB5 (ms)"; + } + if (osMethod.gammaCorrected) + { + avgOsSign = "(RGB)"; + } + if (osMethod.gammaCorrected && (osMethod.endPercent || osMethod.rangePercent)) + { + avgOsSign = "(RGB %)"; + } + string fileName = monitorInfo + ".csv"; + avgCsvString.AppendLine("Starting RGB,End RGB,Complete Response Time (ms)," + avgRtType + "," + avgPerType + "," + avgOsType + " " + avgOsSign + ",Visual Response Rating,Input Lag (ms)"); + foreach (ProcessData.processedResult i in averageData) + { + // save each run to file + avgCsvString.AppendLine( + i.StartingRGB.ToString() + "," + + i.EndRGB.ToString() + "," + + i.compTime.ToString() + "," + + i.initTime.ToString() + "," + + i.perTime.ToString() + "," + + i.Overshoot.ToString() + "," + + i.visualResponseRating.ToString() + "," + + i.inputLag.ToString() + ); + } + if (runSettings != null) + { + avgCsvString.AppendLine(JsonConvert.SerializeObject(runSettings)); + } + string filePath = resultsFolderPath + "\\" + fileName; + File.WriteAllText(filePath, avgCsvString.ToString()); + if (Properties.Settings.Default.saveXLSX) + { + string[] headers = { "Starting RGB", "End RGB", "Complete Response Time (ms)", avgRtType, avgPerType, avgOsType + " " + avgOsSign, "Visual Response Rating", "Input Lag (ms)" }; + SaveToExcel excel = new SaveToExcel(); + excel.SaveDataToHeatmap(averageData, runSettings, path, resultsFolderPath + "\\" + monitorInfo + ".XLSX", headers); + } + } + } + + private void importRawFileBtn_Click(object sender, EventArgs e) + { + bool success = false; + try + { + importRawData(); + success = true; + setProgressBar(true); + } + catch (Exception er) + { + success = false; + Console.WriteLine(er.Message + er.StackTrace); + } + ProcessData.rtMethods rt = new ProcessData.rtMethods + { + Name = Properties.Settings.Default.rtName, + Tolerance = Properties.Settings.Default.rtTolerance, + gammaCorrected = Properties.Settings.Default.rtGammaCorrected, + percentage = Properties.Settings.Default.rtPercentage + }; + ProcessData.osMethods os = new ProcessData.osMethods + { + Name = Properties.Settings.Default.osName, + gammaCorrected = Properties.Settings.Default.osGammaCorrected, + endPercent = Properties.Settings.Default.osEndPercent, + rangePercent = Properties.Settings.Default.osRangePercent + }; + if (runSettings == null) + { + runSettings = new ProcessData.runSettings // REMOVE THIS + { + RunName = "078-XG270QG-165-DP", + RefreshRate = 165, + FPSLimit = 1000, + DateAndTime = DateTime.Now.ToString(), + MonitorName = "XG270QG", + Vsync = true, + osMethod = os, + rtMethod = rt + }; + } + if (success) + { + try + { + processAllRuns(rt, os, true); + success = true; + } + catch (Exception ex) + { + success = false; + MessageBox.Show(ex.Message + ex.StackTrace, "Error importing files", MessageBoxButtons.OK, MessageBoxIcon.Error); + Console.WriteLine(ex.Message + ex.StackTrace); + } + } + if (success) + { + stdResultsMenuBtn_Click(null, null); + Process.Start("explorer.exe", resultsFolderPath); + } + setProgressBar(false); + } + + private void importRawFolderBtn_Click(object sender, EventArgs e) + { + bool success = false; + try + { + importRawFolderData(); + success = true; + setProgressBar(true); + } + catch (Exception er) + { + success = false; + Console.WriteLine(er.Message + er.StackTrace); + } + ProcessData.rtMethods rt = new ProcessData.rtMethods + { + Name = Properties.Settings.Default.rtName, + Tolerance = Properties.Settings.Default.rtTolerance, + gammaCorrected = Properties.Settings.Default.rtGammaCorrected, + percentage = Properties.Settings.Default.rtPercentage + }; + ProcessData.osMethods os = new ProcessData.osMethods + { + Name = Properties.Settings.Default.osName, + gammaCorrected = Properties.Settings.Default.osGammaCorrected, + endPercent = Properties.Settings.Default.osEndPercent, + rangePercent = Properties.Settings.Default.osRangePercent + }; + if (runSettings == null) + { + runSettings = new ProcessData.runSettings // REMOVE THIS + { + RunName = "078-XG270QG-165-DP", + RefreshRate = 165, + FPSLimit = 1000, + DateAndTime = DateTime.Now.ToString(), + MonitorName = "XG270QG", + Vsync = true, + osMethod = os, + rtMethod = rt + }; + } + if (success) + { + try + { + processAllRuns(rt, os, false); + success = true; + } + catch (Exception ex) + { + success = false; + MessageBox.Show(ex.Message + ex.StackTrace, "Error importing files", MessageBoxButtons.OK, MessageBoxIcon.Error); + Console.WriteLine(ex.Message + ex.StackTrace); + } + } + if (success) + { + stdResultsMenuBtn_Click(null, null); + Process.Start("explorer.exe", resultsFolderPath); + } + setProgressBar(false); + } + + private void optionsToolStripMenuItem_Click(object sender, EventArgs e) + { + ResultsSettings rs = new ResultsSettings(); + rs.Show(); + } + + private void runSelectToolStrip_SelectedIndexChanged(object sender, EventArgs e) + { // draw different run + var ctrl = sender as ToolStripComboBox; + if (ctrl.Focused) + { + if (runSelectToolStrip.Items[0].ToString().Contains("Average")) + { + if (runSelectToolStrip.SelectedIndex == 0) + { + heatmaps1.setAverageData(averageData); + } + else + { + int sel = runSelectToolStrip.SelectedIndex - 1; + heatmaps1.setAverageData(multipleRunsData[sel]); + } + } + else + { + heatmaps1.setAverageData(multipleRunsData[runSelectToolStrip.SelectedIndex]); + } + heatmaps1.standardView(); + } + } + + private void setProgressBar(bool on) + { + if (on) + { + + if (progressBar1.InvokeRequired) + { + this.progressBar1.Invoke((MethodInvoker)(() => { + this.progressBar1.Style = ProgressBarStyle.Marquee; + this.progressBar1.MarqueeAnimationSpeed = 30; + this.progressBar1.Visible = true; + })); + } + else + { + progressBar1.Style = ProgressBarStyle.Marquee; + progressBar1.MarqueeAnimationSpeed = 30; + this.progressBar1.Visible = true; + } + } + else + { + if (progressBar1.InvokeRequired) + { + this.progressBar1.Invoke((MethodInvoker)(() => { + this.progressBar1.Style = ProgressBarStyle.Continuous; + this.progressBar1.MarqueeAnimationSpeed = 0; + this.progressBar1.Visible = false; + })); + } + else + { + progressBar1.Style = ProgressBarStyle.Continuous; + progressBar1.MarqueeAnimationSpeed = 0; + progressBar1.Visible = false; + } + } + } + + } } diff --git a/OSRTT Launcher/OSRTT Launcher/ResultsView.resx b/OSRTT Launcher/OSRTT Launcher/ResultsView.resx index da54fab..b5b49b3 100644 --- a/OSRTT Launcher/OSRTT Launcher/ResultsView.resx +++ b/OSRTT Launcher/OSRTT Launcher/ResultsView.resx @@ -120,9 +120,6 @@ 17, 17 - - True - 132, 17 @@ -140,21 +137,6 @@ mDEo5mNjuweFGvjWg2EBhCbpkW78htSHHwRyNdmgAFzPEee2iFkzayy2OLXzT4gr6UdUnlXrullsxxQ+ kx0g8BTA3aZlButjSTyjODq/WcQcW/B/Je4OQhLvKQDnzN1mp0nnkvAhR8VuMzNrpm1mpjgkoVwB/v8D TgDQASA1MVpwzwAAAABJRU5ErkJggg== - - - - - iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8 - YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAIDSURBVDhPpZLrS5NhGMb3j4SWh0oRQVExD4gonkDpg4hG - YKxG6WBogkMZKgPNCEVJFBGdGETEvgwyO9DJE5syZw3PIlPEE9pgBCLZ5XvdMB8Ew8gXbl54nuf63dd9 - 0OGSnwCahxbPRNPAPMw9Xpg6ZmF46kZZ0xSKzJPIrhpDWsVnpBhGkKx3nAX8Pv7z1zg8OoY/cITdn4fw - bf/C0kYAN3Ma/w3gWfZL5kzTKBxjWyK2DftwI9tyMYCZKXbNHaD91bLYJrDXsYbrWfUKwJrPE9M2M1Oc - VzOOpHI7Jr376Hi9ogHqFIANO0/MmmmbmSmm9a8ze+I4MrNWAdjtoJgWcx+PSzg166yZZ8xM8XvXDix9 - c4jIqFYAjoriBV9AhEPv1mH/sonogha0afbZMMZz+yreTGyhpusHwtNNCsA5U1zS4BLxzJIfg299qO32 - Ir7UJtZfftyATqeT+8o2D8JSjQrAJblrncYL7ZJ2+bfaFnC/1S1NjL3diRat7qrO7wLRP3HjWsojBeCo - mDEo5mNjuweFGvjWg2EBhCbpkW78htSHHwRyNdmgAFzPEee2iFkzayy2OLXzT4gr6UdUnlXrullsxxQ+ - kx0g8BTA3aZlButjSTyjODq/WcQcW/B/Je4OQhLvKQDnzN1mp0nnkvAhR8VuMzNrpm1mpjgkoVwB/v8D - TgDQASA1MVpwzwAAAABJRU5ErkJggg== @@ -187,4 +169,7 @@ TgDQASA1MVpwzwAAAABJRU5ErkJggg== + + 54 + \ No newline at end of file diff --git a/OSRTT Launcher/OSRTT Launcher/SaveToExcel.cs b/OSRTT Launcher/OSRTT Launcher/SaveToExcel.cs new file mode 100644 index 0000000..f017878 --- /dev/null +++ b/OSRTT Launcher/OSRTT Launcher/SaveToExcel.cs @@ -0,0 +1,130 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Runtime.InteropServices; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Forms; +using Excel = Microsoft.Office.Interop.Excel; + +namespace OSRTT_Launcher +{ + class SaveToExcel + { + private Excel.Application resultsTemplate; + private Excel._Workbook resultsTemplateWorkbook; + public bool SaveDataToHeatmap(List averageData, ProcessData.runSettings runSettings, string path, string excelFilePath, string[] headers) + { + CFuncs cf = new CFuncs(); + bool failed = false; + if (Properties.Settings.Default.saveXLSX) + { + try + { + File.Copy(path + "\\Results Template.xlsx", excelFilePath); + Console.WriteLine(path); + Console.WriteLine(excelFilePath); + } + catch (IOException ioe) + { + if (ioe.StackTrace.Contains("exists")) + { + Console.WriteLine("File exists, skipping writing."); + } + } + catch (Exception ex) + { + cf.showMessageBox(ex.Message + ex.StackTrace, ex.Message, MessageBoxButtons.OK, MessageBoxIcon.Error); + } + resultsTemplate = new Excel.Application(); + try + { + resultsTemplateWorkbook = resultsTemplate.Workbooks.Open(excelFilePath); + } + catch + { + DialogResult d = cf.showMessageBox("Error writing data to XLSX results file, file may be open already. Would you like to try again?", "Unable to Save to XLSX File", MessageBoxButtons.YesNo, MessageBoxIcon.Error); + if (d == DialogResult.Yes) + { + try + { + resultsTemplateWorkbook = resultsTemplate.Workbooks.Open(excelFilePath); + } + catch (Exception ex) + { + cf.showMessageBox(ex.Message + ex.StackTrace, "Unable to Save to XLSX File", MessageBoxButtons.OK, MessageBoxIcon.Error); + failed = true; + } + } + else + { + failed = true; + } + } + if (!failed) + { + Excel._Worksheet resTempSheet = resultsTemplateWorkbook.Sheets[1]; + Excel._Worksheet resTempSheet2 = resultsTemplateWorkbook.Sheets[2]; + Excel._Worksheet resTempSheet3 = resultsTemplateWorkbook.Sheets[3]; + try + { + for (int h = 0; h < headers.Length; h++) + { + resTempSheet.Cells[1, h + 1] = headers[h]; + } + //Console.WriteLine("AverageData Count: " + averageData.Count); + for (int p = 0; p < averageData.Count; p++) + { + resTempSheet.Cells[p + 2, 1] = averageData[p].StartingRGB; + resTempSheet.Cells[p + 2, 2] = averageData[p].EndRGB; + resTempSheet.Cells[p + 2, 3] = averageData[p].compTime; + resTempSheet.Cells[p + 2, 4] = averageData[p].initTime; + resTempSheet.Cells[p + 2, 5] = averageData[p].perTime; + resTempSheet.Cells[p + 2, 6] = averageData[p].Overshoot; + resTempSheet.Cells[p + 2, 7] = averageData[p].visualResponseRating; + resTempSheet.Cells[p + 2, 8] = averageData[p].inputLag; + } + resultsTemplateWorkbook.Save(); + } + catch (Exception ex) + { + cf.showMessageBox(ex.Message + ex.StackTrace, "Unable to Save to XLSX File", MessageBoxButtons.YesNo, MessageBoxIcon.Error); + failed = true; + } + GC.Collect(); + GC.WaitForPendingFinalizers(); + Marshal.ReleaseComObject(resTempSheet); + try + { + resTempSheet2.Cells[4, 12] = runSettings.RefreshRate; + resTempSheet3.Activate(); + resultsTemplateWorkbook.Save(); + } + catch (Exception ex) + { + cf.showMessageBox(ex.Message + ex.StackTrace, "Unable to Save to XLSX File", MessageBoxButtons.YesNo, MessageBoxIcon.Error); + failed = true; + } + GC.Collect(); + GC.WaitForPendingFinalizers(); + Marshal.ReleaseComObject(resTempSheet2); + GC.Collect(); + GC.WaitForPendingFinalizers(); + Marshal.ReleaseComObject(resTempSheet3); + } + resultsTemplateWorkbook.Close(); + Marshal.ReleaseComObject(resultsTemplateWorkbook); + resultsTemplate.Quit(); + Marshal.ReleaseComObject(resultsTemplate); + + if (failed) + { + File.Delete(excelFilePath); + } + + } + return failed; + } + } +} diff --git a/OSRTT Launcher/OSRTT Launcher/packages.config b/OSRTT Launcher/OSRTT Launcher/packages.config index a0bb817..8aa0ebd 100644 --- a/OSRTT Launcher/OSRTT Launcher/packages.config +++ b/OSRTT Launcher/OSRTT Launcher/packages.config @@ -2,10 +2,9 @@ - - - + +