diff --git a/Test_Merge/DataWrapper.cs b/Test_Merge/DataWrapper.cs index 73633a5..44e72eb 100644 --- a/Test_Merge/DataWrapper.cs +++ b/Test_Merge/DataWrapper.cs @@ -55,6 +55,7 @@ namespace Test_Merge newButton.Name = driverName + "_" + lapData.Lap; newButton.Text = Reader.ConvertMsToTime(lapData.LapTime); newButton.Size = labelDimensions; + newButton.FlatStyle = FlatStyle.Popup; newButton.Click += form1.btnLapTime_Click; newButton.Location = new Point(0, id * newButton.Height); id++; @@ -185,6 +186,7 @@ namespace Test_Merge newButton.Size = new Size(pnlFastest.Width, maxUiSize); newButton.Location = new Point(0, i * maxUiSize); newButton.Text = data.driver; + newButton.FlatStyle = FlatStyle.Popup; newButton.Name = data.driver + "_fastest_" + i; newButton.Click += form1.btnDriver_Click; //We take the average time lost per lap @@ -201,6 +203,7 @@ namespace Test_Merge newButton.Size = new Size(pnlFastest.Width, maxUiSize); newButton.Location = new Point(0, badId * maxUiSize); newButton.Text = data.driver; + newButton.FlatStyle = FlatStyle.Popup; newButton.Name = data.driver + "_slowest_" + i; newButton.Click += form1.btnDriver_Click; //We take the average time lost per lap @@ -272,6 +275,7 @@ namespace Test_Merge newButton.Size = buttonDimensions; newButton.Location = new Point(0, driverCount * buttonDimensions.Height); + newButton.FlatStyle = FlatStyle.Popup; DriverData driver = liveData[driverCount]; diff --git a/Test_Merge/Form1.Designer.cs b/Test_Merge/Form1.Designer.cs index 7313043..282205e 100644 --- a/Test_Merge/Form1.Designer.cs +++ b/Test_Merge/Form1.Designer.cs @@ -28,6 +28,7 @@ /// private void InitializeComponent() { + this.components = new System.ComponentModel.Container(); this.btnSettings = new System.Windows.Forms.Button(); this.btnStartDecoding = new System.Windows.Forms.Button(); this.pbxResult = new System.Windows.Forms.PictureBox(); @@ -36,7 +37,7 @@ this.lsbPresets = new System.Windows.Forms.ListBox(); this.gpbxControls = new System.Windows.Forms.GroupBox(); this.label7 = new System.Windows.Forms.Label(); - this.textBox1 = new System.Windows.Forms.TextBox(); + this.tbxGpUrl = new System.Windows.Forms.TextBox(); this.label1 = new System.Windows.Forms.Label(); this.gpbxRanking = new System.Windows.Forms.GroupBox(); this.pnlLiveRanking = new System.Windows.Forms.Panel(); @@ -64,6 +65,7 @@ this.gpbxBattles = new System.Windows.Forms.GroupBox(); this.pnlBattles = new System.Windows.Forms.Panel(); this.label9 = new System.Windows.Forms.Label(); + this.tip1 = new System.Windows.Forms.ToolTip(this.components); ((System.ComponentModel.ISupportInitialize)(this.pbxResult)).BeginInit(); this.gpbxControls.SuspendLayout(); this.gpbxRanking.SuspendLayout(); @@ -78,9 +80,10 @@ this.btnSettings.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(51)))), ((int)(((byte)(51)))), ((int)(((byte)(51))))); this.btnSettings.FlatStyle = System.Windows.Forms.FlatStyle.Popup; this.btnSettings.Font = new System.Drawing.Font("Microsoft Sans Serif", 10F); - this.btnSettings.Location = new System.Drawing.Point(9, 21); + this.btnSettings.Location = new System.Drawing.Point(9, 25); + this.btnSettings.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4); this.btnSettings.Name = "btnSettings"; - this.btnSettings.Size = new System.Drawing.Size(127, 46); + this.btnSettings.Size = new System.Drawing.Size(111, 43); this.btnSettings.TabIndex = 0; this.btnSettings.Text = "Config"; this.btnSettings.UseVisualStyleBackColor = false; @@ -92,9 +95,10 @@ this.btnStartDecoding.Enabled = false; this.btnStartDecoding.FlatStyle = System.Windows.Forms.FlatStyle.Popup; this.btnStartDecoding.Font = new System.Drawing.Font("Microsoft Sans Serif", 10F); - this.btnStartDecoding.Location = new System.Drawing.Point(9, 73); + this.btnStartDecoding.Location = new System.Drawing.Point(9, 76); + this.btnStartDecoding.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4); this.btnStartDecoding.Name = "btnStartDecoding"; - this.btnStartDecoding.Size = new System.Drawing.Size(127, 46); + this.btnStartDecoding.Size = new System.Drawing.Size(112, 43); this.btnStartDecoding.TabIndex = 2; this.btnStartDecoding.Text = "Start"; this.btnStartDecoding.UseVisualStyleBackColor = false; @@ -103,9 +107,10 @@ // pbxResult // this.pbxResult.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(51)))), ((int)(((byte)(51)))), ((int)(((byte)(51))))); - this.pbxResult.Location = new System.Drawing.Point(6, 263); + this.pbxResult.Location = new System.Drawing.Point(6, 296); + this.pbxResult.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4); this.pbxResult.Name = "pbxResult"; - this.pbxResult.Size = new System.Drawing.Size(274, 151); + this.pbxResult.Size = new System.Drawing.Size(246, 139); this.pbxResult.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage; this.pbxResult.TabIndex = 3; this.pbxResult.TabStop = false; @@ -116,9 +121,10 @@ this.btnStopUpdating.Enabled = false; this.btnStopUpdating.FlatStyle = System.Windows.Forms.FlatStyle.Popup; this.btnStopUpdating.Font = new System.Drawing.Font("Microsoft Sans Serif", 10F); - this.btnStopUpdating.Location = new System.Drawing.Point(153, 73); + this.btnStopUpdating.Location = new System.Drawing.Point(142, 76); + this.btnStopUpdating.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4); this.btnStopUpdating.Name = "btnStopUpdating"; - this.btnStopUpdating.Size = new System.Drawing.Size(128, 46); + this.btnStopUpdating.Size = new System.Drawing.Size(110, 43); this.btnStopUpdating.TabIndex = 4; this.btnStopUpdating.Text = "Stop"; this.btnStopUpdating.UseVisualStyleBackColor = false; @@ -129,9 +135,10 @@ this.btnResetEmulator.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(51)))), ((int)(((byte)(51)))), ((int)(((byte)(51))))); this.btnResetEmulator.FlatStyle = System.Windows.Forms.FlatStyle.Popup; this.btnResetEmulator.Font = new System.Drawing.Font("Microsoft Sans Serif", 10F); - this.btnResetEmulator.Location = new System.Drawing.Point(153, 21); + this.btnResetEmulator.Location = new System.Drawing.Point(142, 25); + this.btnResetEmulator.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4); this.btnResetEmulator.Name = "btnResetEmulator"; - this.btnResetEmulator.Size = new System.Drawing.Size(128, 46); + this.btnResetEmulator.Size = new System.Drawing.Size(110, 43); this.btnResetEmulator.TabIndex = 5; this.btnResetEmulator.Text = "Launch"; this.btnResetEmulator.UseVisualStyleBackColor = false; @@ -141,12 +148,14 @@ // this.lsbPresets.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(51)))), ((int)(((byte)(51)))), ((int)(((byte)(51))))); this.lsbPresets.BorderStyle = System.Windows.Forms.BorderStyle.None; + this.lsbPresets.Font = new System.Drawing.Font("Microsoft YaHei UI", 10F); this.lsbPresets.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(252)))), ((int)(((byte)(252)))), ((int)(((byte)(252))))); this.lsbPresets.FormattingEnabled = true; - this.lsbPresets.ItemHeight = 16; - this.lsbPresets.Location = new System.Drawing.Point(7, 167); + this.lsbPresets.ItemHeight = 23; + this.lsbPresets.Location = new System.Drawing.Point(9, 176); + this.lsbPresets.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4); this.lsbPresets.Name = "lsbPresets"; - this.lsbPresets.Size = new System.Drawing.Size(274, 64); + this.lsbPresets.Size = new System.Drawing.Size(243, 92); this.lsbPresets.TabIndex = 6; this.lsbPresets.SelectedIndexChanged += new System.EventHandler(this.lsbPresets_SelectedIndexChanged); // @@ -154,7 +163,7 @@ // this.gpbxControls.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(79)))), ((int)(((byte)(79)))), ((int)(((byte)(79))))); this.gpbxControls.Controls.Add(this.label7); - this.gpbxControls.Controls.Add(this.textBox1); + this.gpbxControls.Controls.Add(this.tbxGpUrl); this.gpbxControls.Controls.Add(this.btnResetEmulator); this.gpbxControls.Controls.Add(this.label1); this.gpbxControls.Controls.Add(this.btnStopUpdating); @@ -163,9 +172,11 @@ this.gpbxControls.Controls.Add(this.lsbPresets); this.gpbxControls.Controls.Add(this.btnSettings); this.gpbxControls.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(252)))), ((int)(((byte)(252)))), ((int)(((byte)(252))))); - this.gpbxControls.Location = new System.Drawing.Point(987, 332); + this.gpbxControls.Location = new System.Drawing.Point(12, 56); + this.gpbxControls.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4); this.gpbxControls.Name = "gpbxControls"; - this.gpbxControls.Size = new System.Drawing.Size(287, 420); + this.gpbxControls.Padding = new System.Windows.Forms.Padding(3, 4, 3, 4); + this.gpbxControls.Size = new System.Drawing.Size(263, 450); this.gpbxControls.TabIndex = 7; this.gpbxControls.TabStop = false; this.gpbxControls.Text = "Controls"; @@ -174,40 +185,45 @@ // label7 // this.label7.AutoSize = true; - this.label7.Location = new System.Drawing.Point(6, 244); + this.label7.Location = new System.Drawing.Point(6, 273); this.label7.Name = "label7"; - this.label7.Size = new System.Drawing.Size(55, 16); + this.label7.Size = new System.Drawing.Size(56, 19); this.label7.TabIndex = 9; this.label7.Text = "Preview"; // - // textBox1 + // tbxGpUrl // - this.textBox1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(51)))), ((int)(((byte)(51)))), ((int)(((byte)(51))))); - this.textBox1.BorderStyle = System.Windows.Forms.BorderStyle.None; - this.textBox1.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(252)))), ((int)(((byte)(252)))), ((int)(((byte)(252))))); - this.textBox1.Location = new System.Drawing.Point(7, 146); - this.textBox1.Name = "textBox1"; - this.textBox1.Size = new System.Drawing.Size(274, 15); - this.textBox1.TabIndex = 8; - this.textBox1.TextChanged += new System.EventHandler(this.textBox1_TextChanged); + this.tbxGpUrl.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(51)))), ((int)(((byte)(51)))), ((int)(((byte)(51))))); + this.tbxGpUrl.BorderStyle = System.Windows.Forms.BorderStyle.None; + this.tbxGpUrl.Font = new System.Drawing.Font("Microsoft YaHei UI", 10.2F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.tbxGpUrl.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(252)))), ((int)(((byte)(252)))), ((int)(((byte)(252))))); + this.tbxGpUrl.Location = new System.Drawing.Point(10, 146); + this.tbxGpUrl.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4); + this.tbxGpUrl.Name = "tbxGpUrl"; + this.tbxGpUrl.Size = new System.Drawing.Size(242, 22); + this.tbxGpUrl.TabIndex = 8; + this.tbxGpUrl.TextChanged += new System.EventHandler(this.textBox1_TextChanged); // // label1 // this.label1.AutoSize = true; - this.label1.Location = new System.Drawing.Point(4, 127); + this.label1.Location = new System.Drawing.Point(5, 123); this.label1.Name = "label1"; - this.label1.Size = new System.Drawing.Size(99, 16); + this.label1.Size = new System.Drawing.Size(103, 19); this.label1.TabIndex = 7; this.label1.Text = "Grand Prix URL"; // // gpbxRanking // + this.gpbxRanking.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); this.gpbxRanking.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(79)))), ((int)(((byte)(79)))), ((int)(((byte)(79))))); this.gpbxRanking.Controls.Add(this.pnlLiveRanking); this.gpbxRanking.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(252)))), ((int)(((byte)(252)))), ((int)(((byte)(252))))); - this.gpbxRanking.Location = new System.Drawing.Point(12, 56); + this.gpbxRanking.Location = new System.Drawing.Point(838, 9); + this.gpbxRanking.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4); this.gpbxRanking.Name = "gpbxRanking"; - this.gpbxRanking.Size = new System.Drawing.Size(353, 696); + this.gpbxRanking.Padding = new System.Windows.Forms.Padding(3, 4, 3, 4); + this.gpbxRanking.Size = new System.Drawing.Size(314, 747); this.gpbxRanking.TabIndex = 8; this.gpbxRanking.TabStop = false; this.gpbxRanking.Text = "Live Ranking"; @@ -215,9 +231,11 @@ // // pnlLiveRanking // - this.pnlLiveRanking.Location = new System.Drawing.Point(6, 21); + this.pnlLiveRanking.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(51)))), ((int)(((byte)(51)))), ((int)(((byte)(51))))); + this.pnlLiveRanking.Location = new System.Drawing.Point(6, 25); + this.pnlLiveRanking.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4); this.pnlLiveRanking.Name = "pnlLiveRanking"; - this.pnlLiveRanking.Size = new System.Drawing.Size(341, 669); + this.pnlLiveRanking.Size = new System.Drawing.Size(300, 714); this.pnlLiveRanking.TabIndex = 0; // // gpbxOvertakes @@ -225,9 +243,11 @@ this.gpbxOvertakes.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(79)))), ((int)(((byte)(79)))), ((int)(((byte)(79))))); this.gpbxOvertakes.Controls.Add(this.lsbOvertakes); this.gpbxOvertakes.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(252)))), ((int)(((byte)(252)))), ((int)(((byte)(252))))); - this.gpbxOvertakes.Location = new System.Drawing.Point(987, 56); + this.gpbxOvertakes.Location = new System.Drawing.Point(12, 514); + this.gpbxOvertakes.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4); this.gpbxOvertakes.Name = "gpbxOvertakes"; - this.gpbxOvertakes.Size = new System.Drawing.Size(287, 270); + this.gpbxOvertakes.Padding = new System.Windows.Forms.Padding(3, 4, 3, 4); + this.gpbxOvertakes.Size = new System.Drawing.Size(263, 242); this.gpbxOvertakes.TabIndex = 9; this.gpbxOvertakes.TabStop = false; this.gpbxOvertakes.Text = "Overtakes"; @@ -239,32 +259,35 @@ this.lsbOvertakes.BorderStyle = System.Windows.Forms.BorderStyle.None; this.lsbOvertakes.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(252)))), ((int)(((byte)(252)))), ((int)(((byte)(252))))); this.lsbOvertakes.FormattingEnabled = true; - this.lsbOvertakes.ItemHeight = 16; - this.lsbOvertakes.Location = new System.Drawing.Point(6, 21); + this.lsbOvertakes.ItemHeight = 19; + this.lsbOvertakes.Location = new System.Drawing.Point(6, 25); + this.lsbOvertakes.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4); this.lsbOvertakes.Name = "lsbOvertakes"; - this.lsbOvertakes.Size = new System.Drawing.Size(274, 240); + this.lsbOvertakes.Size = new System.Drawing.Size(246, 209); this.lsbOvertakes.TabIndex = 0; // // gpbxDriverInfos // this.gpbxDriverInfos.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(79)))), ((int)(((byte)(79)))), ((int)(((byte)(79))))); - this.gpbxDriverInfos.Controls.Add(this.lblCurrentDriverPosition); this.gpbxDriverInfos.Controls.Add(this.lblCurrentDriverDRS); - this.gpbxDriverInfos.Controls.Add(this.label11); - this.gpbxDriverInfos.Controls.Add(this.lblCurrentDriverTyreAge); this.gpbxDriverInfos.Controls.Add(this.lblCurrentDriverTyreType); - this.gpbxDriverInfos.Controls.Add(this.label8); + this.gpbxDriverInfos.Controls.Add(this.label11); + this.gpbxDriverInfos.Controls.Add(this.lblCurrentDriverPosition); this.gpbxDriverInfos.Controls.Add(this.lblCurrentDriverGapToLeader); this.gpbxDriverInfos.Controls.Add(this.label5); + this.gpbxDriverInfos.Controls.Add(this.label8); + this.gpbxDriverInfos.Controls.Add(this.lblCurrentDriverTyreAge); this.gpbxDriverInfos.Controls.Add(this.label6); this.gpbxDriverInfos.Controls.Add(this.pnlCurrentDriverLapsHistory); this.gpbxDriverInfos.Controls.Add(this.lblCurrentDriverLapTime); this.gpbxDriverInfos.Controls.Add(this.label4); this.gpbxDriverInfos.Controls.Add(this.lblCurrentDriverName); this.gpbxDriverInfos.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(252)))), ((int)(((byte)(252)))), ((int)(((byte)(252))))); - this.gpbxDriverInfos.Location = new System.Drawing.Point(371, 505); + this.gpbxDriverInfos.Location = new System.Drawing.Point(281, 514); + this.gpbxDriverInfos.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4); this.gpbxDriverInfos.Name = "gpbxDriverInfos"; - this.gpbxDriverInfos.Size = new System.Drawing.Size(610, 247); + this.gpbxDriverInfos.Padding = new System.Windows.Forms.Padding(3, 4, 3, 4); + this.gpbxDriverInfos.Size = new System.Drawing.Size(550, 242); this.gpbxDriverInfos.TabIndex = 10; this.gpbxDriverInfos.TabStop = false; this.gpbxDriverInfos.Text = "Driver infos"; @@ -274,7 +297,7 @@ // this.lblCurrentDriverPosition.AutoSize = true; this.lblCurrentDriverPosition.Font = new System.Drawing.Font("Microsoft YaHei UI", 16.2F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.lblCurrentDriverPosition.Location = new System.Drawing.Point(216, 18); + this.lblCurrentDriverPosition.Location = new System.Drawing.Point(216, 21); this.lblCurrentDriverPosition.Name = "lblCurrentDriverPosition"; this.lblCurrentDriverPosition.Size = new System.Drawing.Size(43, 36); this.lblCurrentDriverPosition.TabIndex = 12; @@ -284,7 +307,7 @@ // this.lblCurrentDriverDRS.AutoSize = true; this.lblCurrentDriverDRS.Font = new System.Drawing.Font("Microsoft YaHei UI", 12F); - this.lblCurrentDriverDRS.Location = new System.Drawing.Point(191, 198); + this.lblCurrentDriverDRS.Location = new System.Drawing.Point(191, 175); this.lblCurrentDriverDRS.Name = "lblCurrentDriverDRS"; this.lblCurrentDriverDRS.Size = new System.Drawing.Size(41, 27); this.lblCurrentDriverDRS.TabIndex = 11; @@ -294,7 +317,7 @@ // this.label11.AutoSize = true; this.label11.Font = new System.Drawing.Font("Microsoft YaHei UI", 12F); - this.label11.Location = new System.Drawing.Point(7, 198); + this.label11.Location = new System.Drawing.Point(7, 175); this.label11.Name = "label11"; this.label11.Size = new System.Drawing.Size(52, 27); this.label11.TabIndex = 10; @@ -304,7 +327,7 @@ // this.lblCurrentDriverTyreAge.AutoSize = true; this.lblCurrentDriverTyreAge.Font = new System.Drawing.Font("Microsoft YaHei UI", 12F); - this.lblCurrentDriverTyreAge.Location = new System.Drawing.Point(190, 157); + this.lblCurrentDriverTyreAge.Location = new System.Drawing.Point(191, 138); this.lblCurrentDriverTyreAge.Name = "lblCurrentDriverTyreAge"; this.lblCurrentDriverTyreAge.Size = new System.Drawing.Size(85, 27); this.lblCurrentDriverTyreAge.TabIndex = 9; @@ -314,7 +337,7 @@ // this.lblCurrentDriverTyreType.AutoSize = true; this.lblCurrentDriverTyreType.Font = new System.Drawing.Font("Microsoft YaHei UI", 12F); - this.lblCurrentDriverTyreType.Location = new System.Drawing.Point(65, 157); + this.lblCurrentDriverTyreType.Location = new System.Drawing.Point(66, 138); this.lblCurrentDriverTyreType.Name = "lblCurrentDriverTyreType"; this.lblCurrentDriverTyreType.Size = new System.Drawing.Size(111, 27); this.lblCurrentDriverTyreType.TabIndex = 8; @@ -324,7 +347,7 @@ // this.label8.AutoSize = true; this.label8.Font = new System.Drawing.Font("Microsoft YaHei UI", 12F); - this.label8.Location = new System.Drawing.Point(6, 157); + this.label8.Location = new System.Drawing.Point(7, 138); this.label8.Name = "label8"; this.label8.Size = new System.Drawing.Size(58, 27); this.label8.TabIndex = 7; @@ -334,7 +357,7 @@ // this.lblCurrentDriverGapToLeader.AutoSize = true; this.lblCurrentDriverGapToLeader.Font = new System.Drawing.Font("Microsoft YaHei UI", 12F); - this.lblCurrentDriverGapToLeader.Location = new System.Drawing.Point(190, 113); + this.lblCurrentDriverGapToLeader.Location = new System.Drawing.Point(191, 102); this.lblCurrentDriverGapToLeader.Name = "lblCurrentDriverGapToLeader"; this.lblCurrentDriverGapToLeader.Size = new System.Drawing.Size(94, 27); this.lblCurrentDriverGapToLeader.TabIndex = 6; @@ -344,7 +367,7 @@ // this.label5.AutoSize = true; this.label5.Font = new System.Drawing.Font("Microsoft YaHei UI", 12F); - this.label5.Location = new System.Drawing.Point(6, 113); + this.label5.Location = new System.Drawing.Point(7, 102); this.label5.Name = "label5"; this.label5.Size = new System.Drawing.Size(153, 27); this.label5.TabIndex = 5; @@ -354,7 +377,7 @@ // this.label6.AutoSize = true; this.label6.Font = new System.Drawing.Font("Microsoft YaHei UI", 12F); - this.label6.Location = new System.Drawing.Point(299, 25); + this.label6.Location = new System.Drawing.Point(299, 30); this.label6.Name = "label6"; this.label6.Size = new System.Drawing.Size(111, 27); this.label6.TabIndex = 4; @@ -363,16 +386,17 @@ // pnlCurrentDriverLapsHistory // this.pnlCurrentDriverLapsHistory.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(51)))), ((int)(((byte)(51)))), ((int)(((byte)(51))))); - this.pnlCurrentDriverLapsHistory.Location = new System.Drawing.Point(304, 55); + this.pnlCurrentDriverLapsHistory.Location = new System.Drawing.Point(304, 65); + this.pnlCurrentDriverLapsHistory.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4); this.pnlCurrentDriverLapsHistory.Name = "pnlCurrentDriverLapsHistory"; - this.pnlCurrentDriverLapsHistory.Size = new System.Drawing.Size(300, 186); + this.pnlCurrentDriverLapsHistory.Size = new System.Drawing.Size(237, 169); this.pnlCurrentDriverLapsHistory.TabIndex = 3; // // lblCurrentDriverLapTime // this.lblCurrentDriverLapTime.AutoSize = true; this.lblCurrentDriverLapTime.Font = new System.Drawing.Font("Microsoft YaHei UI", 12F); - this.lblCurrentDriverLapTime.Location = new System.Drawing.Point(190, 69); + this.lblCurrentDriverLapTime.Location = new System.Drawing.Point(190, 66); this.lblCurrentDriverLapTime.Name = "lblCurrentDriverLapTime"; this.lblCurrentDriverLapTime.Size = new System.Drawing.Size(94, 27); this.lblCurrentDriverLapTime.TabIndex = 2; @@ -382,7 +406,7 @@ // this.label4.AutoSize = true; this.label4.Font = new System.Drawing.Font("Microsoft YaHei UI", 12F); - this.label4.Location = new System.Drawing.Point(6, 68); + this.label4.Location = new System.Drawing.Point(6, 65); this.label4.Name = "label4"; this.label4.Size = new System.Drawing.Size(105, 27); this.label4.TabIndex = 1; @@ -392,7 +416,7 @@ // this.lblCurrentDriverName.AutoSize = true; this.lblCurrentDriverName.Font = new System.Drawing.Font("Microsoft YaHei UI", 16.2F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.lblCurrentDriverName.Location = new System.Drawing.Point(6, 18); + this.lblCurrentDriverName.Location = new System.Drawing.Point(6, 21); this.lblCurrentDriverName.Name = "lblCurrentDriverName"; this.lblCurrentDriverName.Size = new System.Drawing.Size(178, 36); this.lblCurrentDriverName.TabIndex = 0; @@ -401,14 +425,16 @@ // gpbxLapTimes // this.gpbxLapTimes.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(79)))), ((int)(((byte)(79)))), ((int)(((byte)(79))))); + this.gpbxLapTimes.Controls.Add(this.pnlSlowest); this.gpbxLapTimes.Controls.Add(this.label3); this.gpbxLapTimes.Controls.Add(this.label2); - this.gpbxLapTimes.Controls.Add(this.pnlSlowest); this.gpbxLapTimes.Controls.Add(this.pnlFastest); this.gpbxLapTimes.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(252)))), ((int)(((byte)(252)))), ((int)(((byte)(252))))); - this.gpbxLapTimes.Location = new System.Drawing.Point(371, 56); + this.gpbxLapTimes.Location = new System.Drawing.Point(281, 9); + this.gpbxLapTimes.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4); this.gpbxLapTimes.Name = "gpbxLapTimes"; - this.gpbxLapTimes.Size = new System.Drawing.Size(610, 239); + this.gpbxLapTimes.Padding = new System.Windows.Forms.Padding(3, 4, 3, 4); + this.gpbxLapTimes.Size = new System.Drawing.Size(550, 275); this.gpbxLapTimes.TabIndex = 11; this.gpbxLapTimes.TabStop = false; this.gpbxLapTimes.Text = "Last five laps"; @@ -417,35 +443,37 @@ // label3 // this.label3.AutoSize = true; - this.label3.Location = new System.Drawing.Point(311, 14); + this.label3.Location = new System.Drawing.Point(276, 16); this.label3.Name = "label3"; - this.label3.Size = new System.Drawing.Size(54, 16); + this.label3.Size = new System.Drawing.Size(62, 19); this.label3.TabIndex = 3; - this.label3.Text = "Slowest"; + this.label3.Text = "Slowests"; // // label2 // this.label2.AutoSize = true; - this.label2.Location = new System.Drawing.Point(6, 14); + this.label2.Location = new System.Drawing.Point(6, 17); this.label2.Name = "label2"; - this.label2.Size = new System.Drawing.Size(51, 16); + this.label2.Size = new System.Drawing.Size(58, 19); this.label2.TabIndex = 2; - this.label2.Text = "Fastest"; + this.label2.Text = "Fastests"; // // pnlSlowest // this.pnlSlowest.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(51)))), ((int)(((byte)(51)))), ((int)(((byte)(51))))); - this.pnlSlowest.Location = new System.Drawing.Point(314, 33); + this.pnlSlowest.Location = new System.Drawing.Point(280, 39); + this.pnlSlowest.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4); this.pnlSlowest.Name = "pnlSlowest"; - this.pnlSlowest.Size = new System.Drawing.Size(290, 200); + this.pnlSlowest.Size = new System.Drawing.Size(264, 228); this.pnlSlowest.TabIndex = 1; // // pnlFastest // this.pnlFastest.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(51)))), ((int)(((byte)(51)))), ((int)(((byte)(51))))); - this.pnlFastest.Location = new System.Drawing.Point(6, 33); + this.pnlFastest.Location = new System.Drawing.Point(6, 39); + this.pnlFastest.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4); this.pnlFastest.Name = "pnlFastest"; - this.pnlFastest.Size = new System.Drawing.Size(290, 200); + this.pnlFastest.Size = new System.Drawing.Size(270, 228); this.pnlFastest.TabIndex = 0; // // gpbxBattles @@ -453,9 +481,11 @@ this.gpbxBattles.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(79)))), ((int)(((byte)(79)))), ((int)(((byte)(79))))); this.gpbxBattles.Controls.Add(this.pnlBattles); this.gpbxBattles.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(252)))), ((int)(((byte)(252)))), ((int)(((byte)(252))))); - this.gpbxBattles.Location = new System.Drawing.Point(371, 301); + this.gpbxBattles.Location = new System.Drawing.Point(281, 292); + this.gpbxBattles.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4); this.gpbxBattles.Name = "gpbxBattles"; - this.gpbxBattles.Size = new System.Drawing.Size(610, 198); + this.gpbxBattles.Padding = new System.Windows.Forms.Padding(3, 4, 3, 4); + this.gpbxBattles.Size = new System.Drawing.Size(550, 214); this.gpbxBattles.TabIndex = 11; this.gpbxBattles.TabStop = false; this.gpbxBattles.Text = "Battles"; @@ -464,9 +494,10 @@ // pnlBattles // this.pnlBattles.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(51)))), ((int)(((byte)(51)))), ((int)(((byte)(51))))); - this.pnlBattles.Location = new System.Drawing.Point(9, 21); + this.pnlBattles.Location = new System.Drawing.Point(9, 25); + this.pnlBattles.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4); this.pnlBattles.Name = "pnlBattles"; - this.pnlBattles.Size = new System.Drawing.Size(595, 171); + this.pnlBattles.Size = new System.Drawing.Size(532, 181); this.pnlBattles.TabIndex = 2; // // label9 @@ -475,7 +506,7 @@ this.label9.BackColor = System.Drawing.Color.Transparent; this.label9.Font = new System.Drawing.Font("Microsoft YaHei UI", 19.8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.label9.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(252)))), ((int)(((byte)(252)))), ((int)(((byte)(252))))); - this.label9.Location = new System.Drawing.Point(12, 8); + this.label9.Location = new System.Drawing.Point(30, 6); this.label9.Name = "label9"; this.label9.Size = new System.Drawing.Size(221, 43); this.label9.TabIndex = 12; @@ -483,21 +514,24 @@ // // Main // - this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 16F); + this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 19F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(51)))), ((int)(((byte)(51)))), ((int)(((byte)(51))))); - this.ClientSize = new System.Drawing.Size(1284, 760); + this.ClientSize = new System.Drawing.Size(1164, 761); this.Controls.Add(this.label9); this.Controls.Add(this.gpbxBattles); this.Controls.Add(this.gpbxLapTimes); this.Controls.Add(this.gpbxDriverInfos); - this.Controls.Add(this.gpbxOvertakes); this.Controls.Add(this.gpbxRanking); + this.Controls.Add(this.gpbxOvertakes); this.Controls.Add(this.gpbxControls); + this.Font = new System.Drawing.Font("Microsoft YaHei UI", 7.8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4); this.Name = "Main"; this.Text = "Track Trends"; this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.Form1_FormClosing); this.Load += new System.EventHandler(this.Form1_Load); + this.Resize += new System.EventHandler(this.Main_Resize); ((System.ComponentModel.ISupportInitialize)(this.pbxResult)).EndInit(); this.gpbxControls.ResumeLayout(false); this.gpbxControls.PerformLayout(); @@ -522,7 +556,7 @@ private System.Windows.Forms.Button btnResetEmulator; private System.Windows.Forms.ListBox lsbPresets; private System.Windows.Forms.GroupBox gpbxControls; - private System.Windows.Forms.TextBox textBox1; + private System.Windows.Forms.TextBox tbxGpUrl; private System.Windows.Forms.Label label1; private System.Windows.Forms.GroupBox gpbxRanking; private System.Windows.Forms.Panel pnlLiveRanking; @@ -551,6 +585,7 @@ private System.Windows.Forms.ListBox lsbOvertakes; private System.Windows.Forms.Label label7; private System.Windows.Forms.Label label9; + private System.Windows.Forms.ToolTip tip1; } } diff --git a/Test_Merge/Form1.cs b/Test_Merge/Form1.cs index e3821a3..5822b47 100644 --- a/Test_Merge/Form1.cs +++ b/Test_Merge/Form1.cs @@ -63,7 +63,8 @@ namespace Test_Merge } else { - MessageBox.Show("There is no URL for the Grand Prix you want to decode. Please return to the config and add a valid one"); + //WE dont care anymore, the user will choose its Grand Prix himself in the main program + //MessageBox.Show("There is no URL for the Grand Prix you want to decode. Please return to the config and add a valid one"); } } @@ -73,7 +74,16 @@ namespace Test_Merge ConfigFile = "./Presets/Clean_4K_2023.json"; GpUrl = "https://f1tv.formula1.com/detail/1000006688/2023-azerbaijan-grand-prix?action=play"; - textBox1.Text = GpUrl; + tbxGpUrl.Text = GpUrl; + + tip1.SetToolTip(btnResetEmulator, "Starts or restarts the emulator. You need to start this to use the app"); + tip1.SetToolTip(btnSettings, "Opens the configuration menu"); + tip1.SetToolTip(tbxGpUrl, "Insert the URL of the Grand Prix you want to track. Dont forget the \"?action=play\" at the end"); + tip1.SetToolTip(lsbPresets, "Select a configuration preset to use with the decoding"); + tip1.SetToolTip(pbxResult,"A preview of what the program sees. You should see the DATA page of the F1TV here"); + tip1.SetToolTip(lsbOvertakes,"A list of all the activity. You can scroll to see the most recent overtakes"); + tip1.SetToolTip(gpbxBattles,"The four first battles in the field. A battle is two drivers less than 3 seconds apart"); + tip1.SetToolTip(gpbxLapTimes,"The fastest and slowest drivers on track at the moment. It takes the average lapTime of the last 5 laps to choose who is the fastes or the slowest"); RefreshUI(); } @@ -141,11 +151,11 @@ namespace Test_Merge } private void DisplayBattles() { - Wrapper.DisplayBattles(pnlBattles,this); + Wrapper.DisplayBattles(pnlBattles, this); } private void DisplayDeltas() { - Wrapper.DisplayTimesDeltas(pnlFastest,pnlSlowest,this); + Wrapper.DisplayTimesDeltas(pnlFastest, pnlSlowest, this); } private void Form1_FormClosing(object sender, FormClosingEventArgs e) { @@ -237,8 +247,8 @@ namespace Test_Merge private void textBox1_TextChanged(object sender, EventArgs e) { - if (textBox1.Text != "") - GpUrl = textBox1.Text; + if (tbxGpUrl.Text != "") + GpUrl = tbxGpUrl.Text; } public void btnDriver_Click(object sender, EventArgs e) { @@ -246,7 +256,7 @@ namespace Test_Merge //MessageBox.Show((sender as Button).Name + " has been selected"); Button btn = (sender as Button); string[] parts = btn.Name.Split('_'); - DriverData driver = Wrapper.GetFullDriverData(parts[0], pnlCurrentDriverLapsHistory,this); + DriverData driver = Wrapper.GetFullDriverData(parts[0], pnlCurrentDriverLapsHistory, this); lblCurrentDriverName.Text = driver.Name; lblCurrentDriverPosition.Text = driver.Position.ToString(); lblCurrentDriverGapToLeader.Text = Reader.ConvertMsToTime(driver.GapToLeader); @@ -295,7 +305,12 @@ namespace Test_Merge //Happens when a lapTime has been clicked Button btn = sender as Button; string[] parts = btn.Name.Split('_'); - Wrapper.DisplayLapTimeInfos(parts[0], Convert.ToInt32(parts[1]),btn.Text); + Wrapper.DisplayLapTimeInfos(parts[0], Convert.ToInt32(parts[1]), btn.Text); + } + + private void Main_Resize(object sender, EventArgs e) + { + } } } diff --git a/Test_Merge/Form1.resx b/Test_Merge/Form1.resx index 1af7de1..205c69b 100644 --- a/Test_Merge/Form1.resx +++ b/Test_Merge/Form1.resx @@ -117,4 +117,7 @@ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + 17, 17 + \ No newline at end of file diff --git a/Test_Merge/Settings.Designer.cs b/Test_Merge/Settings.Designer.cs index 94a54a6..97f56d6 100644 --- a/Test_Merge/Settings.Designer.cs +++ b/Test_Merge/Settings.Designer.cs @@ -28,6 +28,7 @@ /// private void InitializeComponent() { + this.components = new System.ComponentModel.Container(); this.label1 = new System.Windows.Forms.Label(); this.label2 = new System.Windows.Forms.Label(); this.gpbxRaceSettings = new System.Windows.Forms.GroupBox(); @@ -54,6 +55,7 @@ this.btnSavePreset = new System.Windows.Forms.Button(); this.gpbxPresets = new System.Windows.Forms.GroupBox(); this.btnDeletePreset = new System.Windows.Forms.Button(); + this.tip1 = new System.Windows.Forms.ToolTip(this.components); this.gpbxRaceSettings.SuspendLayout(); this.gpbxDriverList.SuspendLayout(); this.gpbxPreview.SuspendLayout(); @@ -70,7 +72,7 @@ this.label1.ForeColor = System.Drawing.Color.White; this.label1.Location = new System.Drawing.Point(12, 14); this.label1.Name = "label1"; - this.label1.Size = new System.Drawing.Size(323, 45); + this.label1.Size = new System.Drawing.Size(309, 43); this.label1.TabIndex = 0; this.label1.Text = "Configuration tool"; // @@ -483,5 +485,6 @@ private System.Windows.Forms.Button btnLoadPreset; private System.Windows.Forms.GroupBox gpbxPresets; private System.Windows.Forms.Button btnDeletePreset; + private System.Windows.Forms.ToolTip tip1; } } \ No newline at end of file diff --git a/Test_Merge/Settings.cs b/Test_Merge/Settings.cs index ce3b176..eac21b6 100644 --- a/Test_Merge/Settings.cs +++ b/Test_Merge/Settings.cs @@ -38,7 +38,7 @@ namespace Test_Merge Size oldSize = new Size(); Size oldGpbxPreviewSize = new Size(); Size oldGpbxWindowPreviewSize = new Size(); - + Size oldPbxPreviewSize = new Size(); Size oldPbxWindowPreviewSize = new Size(); @@ -55,6 +55,15 @@ namespace Test_Merge oldGpbxWindowPreviewSize = gpbxWindowPreview.Size; oldPbxPreviewSize = pbxPreview.Size; oldPbxWindowPreviewSize = pbxWindowPreview.Size; + + tip1.SetToolTip(btnCreatZone, "After clicking you can select two points in the image to set the bounds of the important data"); + tip1.SetToolTip(btnCreateWindow, "After clicking this you will have to select all the windows that are important on the lower image. Refer to the documentation for more infos"); + tip1.SetToolTip(btnRefresh, "Starts the emulator or refreshes the images if its already running"); + tip1.SetToolTip(btnResetDriver, "Resets the driver if something went wrong or if you want to test an other URL"); + tip1.SetToolTip(lsbDrivers, "The drivers that are on the image. Non-Case sensitive"); + tip1.SetToolTip(tbxPresetName, "The name of the preset you want to save"); + tip1.SetToolTip(pbxPreview, "What the emulator returns"); + tip1.SetToolTip(pbxWindowPreview, "One of the driver zones that the program managed to slice from the main zone"); } private void RefreshUI() { @@ -414,10 +423,10 @@ namespace Test_Merge int xDiff = this.Width - oldSize.Width; int yDiff = this.Height - oldSize.Height; - gpbxPreview.Size = new Size(oldGpbxPreviewSize.Width + xDiff,oldGpbxPreviewSize.Height + yDiff); - gpbxWindowPreview.Size = new Size(oldGpbxWindowPreviewSize.Width + xDiff,oldGpbxWindowPreviewSize.Height); - pbxPreview.Size = new Size(oldPbxPreviewSize.Width + xDiff,oldPbxPreviewSize.Height + yDiff); - pbxWindowPreview.Size = new Size(oldPbxWindowPreviewSize.Width + xDiff,oldPbxWindowPreviewSize.Height); + gpbxPreview.Size = new Size(oldGpbxPreviewSize.Width + xDiff, oldGpbxPreviewSize.Height + yDiff); + gpbxWindowPreview.Size = new Size(oldGpbxWindowPreviewSize.Width + xDiff, oldGpbxWindowPreviewSize.Height); + pbxPreview.Size = new Size(oldPbxPreviewSize.Width + xDiff, oldPbxPreviewSize.Height + yDiff); + pbxWindowPreview.Size = new Size(oldPbxWindowPreviewSize.Width + xDiff, oldPbxWindowPreviewSize.Height); } private void btnDeletePreset_Click(object sender, EventArgs e) @@ -438,11 +447,11 @@ namespace Test_Merge } } - private void removeBorders(object sender,PaintEventArgs e) + private void removeBorders(object sender, PaintEventArgs e) { GroupBox gpbx = (GroupBox)sender; - using (Pen pen = new Pen(gpbx.BackColor,50)) + using (Pen pen = new Pen(gpbx.BackColor, 50)) { e.Graphics.DrawRectangle(pen, 0, 0, gpbx.Width - 1, gpbx.Height - 1); e.Graphics.DrawRectangle(pen, 0, 0, gpbx.Width - 1, gpbx.Height - 1); @@ -455,9 +464,5 @@ namespace Test_Merge } } - private void Settings_Load(object sender, EventArgs e) - { - - } } } diff --git a/Test_Merge/Settings.resx b/Test_Merge/Settings.resx index 1af7de1..205c69b 100644 --- a/Test_Merge/Settings.resx +++ b/Test_Merge/Settings.resx @@ -117,4 +117,7 @@ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + 17, 17 + \ No newline at end of file