From 1fe8f6635ef915d20dfa6fa0df99733797c26ef6 Mon Sep 17 00:00:00 2001 From: LIPtoH Date: Tue, 26 Jul 2022 20:56:39 +0500 Subject: [PATCH] Form AI Driver editor Visuals [fix] --- TS SE Tool/Forms/FormAIDriverEditor.Designer.cs | 4 ++++ TS SE Tool/Forms/FormAIDriverEditor.cs | 8 ++++---- TS SE Tool/Forms/FormAIDriverEditor.resx | 3 +++ TS SE Tool/Forms/MainTabs/FormMethodsCompanyTab.cs | 5 +++-- 4 files changed, 14 insertions(+), 6 deletions(-) diff --git a/TS SE Tool/Forms/FormAIDriverEditor.Designer.cs b/TS SE Tool/Forms/FormAIDriverEditor.Designer.cs index d77e956..211bcec 100644 --- a/TS SE Tool/Forms/FormAIDriverEditor.Designer.cs +++ b/TS SE Tool/Forms/FormAIDriverEditor.Designer.cs @@ -28,6 +28,7 @@ protected override void Dispose(bool disposing) /// private void InitializeComponent() { + this.components = new System.ComponentModel.Container(); this.tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel(); this.labelDriverName = new System.Windows.Forms.Label(); this.groupBoxDriverSkill = new System.Windows.Forms.GroupBox(); @@ -35,6 +36,7 @@ private void InitializeComponent() this.panel1 = new System.Windows.Forms.Panel(); this.buttonCancel = new System.Windows.Forms.Button(); this.buttonSave = new System.Windows.Forms.Button(); + this.toolTipAIDriverEditor = new System.Windows.Forms.ToolTip(this.components); this.tableLayoutPanel1.SuspendLayout(); this.panel1.SuspendLayout(); this.SuspendLayout(); @@ -126,6 +128,7 @@ private void InitializeComponent() this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.ClientSize = new System.Drawing.Size(429, 549); + this.ControlBox = false; this.Controls.Add(this.tableLayoutPanel1); this.Name = "FormAIDriverEditor"; this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent; @@ -146,5 +149,6 @@ private void InitializeComponent() private System.Windows.Forms.Panel panel1; private System.Windows.Forms.Button buttonCancel; private System.Windows.Forms.Button buttonSave; + private System.Windows.Forms.ToolTip toolTipAIDriverEditor; } } \ No newline at end of file diff --git a/TS SE Tool/Forms/FormAIDriverEditor.cs b/TS SE Tool/Forms/FormAIDriverEditor.cs index 84157ff..deea145 100644 --- a/TS SE Tool/Forms/FormAIDriverEditor.cs +++ b/TS SE Tool/Forms/FormAIDriverEditor.cs @@ -47,14 +47,14 @@ private void PrepareForm() { this.Icon = Properties.Resources.MainIco; + CreateProfilePanelControls(); + FillFormProfileControls(); + MainForm.HelpTranslateControl(this); - MainForm.HelpTranslateFormMethod(this); + MainForm.HelpTranslateFormMethod(this, toolTipAIDriverEditor); labelDriverNameText.Text = driverData.driverNameTranslated; - CreateProfilePanelControls(); - FillFormProfileControls(); - //dialog result buttonSave.DialogResult = DialogResult.OK; buttonCancel.DialogResult = DialogResult.Cancel; diff --git a/TS SE Tool/Forms/FormAIDriverEditor.resx b/TS SE Tool/Forms/FormAIDriverEditor.resx index 1af7de1..1232809 100644 --- a/TS SE Tool/Forms/FormAIDriverEditor.resx +++ b/TS SE Tool/Forms/FormAIDriverEditor.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/TS SE Tool/Forms/MainTabs/FormMethodsCompanyTab.cs b/TS SE Tool/Forms/MainTabs/FormMethodsCompanyTab.cs index 81756ea..c74064f 100644 --- a/TS SE Tool/Forms/MainTabs/FormMethodsCompanyTab.cs +++ b/TS SE Tool/Forms/MainTabs/FormMethodsCompanyTab.cs @@ -1348,7 +1348,7 @@ private void contextMenuStripCompanyDriversEdit_Click(object sender, EventArgs e { Driver selectedItem = (Driver)listBoxUserCompanyDrivers.SelectedItem; - if(selectedItem.state == Driver.driverState.Player) + if (selectedItem.state == Driver.driverState.Player) tabControlMain.SelectedIndex = 0; else { @@ -1370,10 +1370,11 @@ private void contextMenuStripCompanyDriversEdit_Click(object sender, EventArgs e saveDriver.fragile = tmpDriver.fragile; saveDriver.urgent = tmpDriver.urgent; saveDriver.mechanical = tmpDriver.mechanical; + + listBoxUserCompanyDrivers.Invalidate(); } driverEditor.Dispose(); - listBoxUserCompanyDrivers.Invalidate(); } }