Whoopsies.

This commit is contained in:
That_One_Nerd 2024-03-23 09:47:54 -04:00
parent 30529673d0
commit 66146355c6
3 changed files with 8 additions and 11 deletions

View File

@ -504,6 +504,6 @@ public partial class GraphForm : Form
{
shifter.StartPosition = FormStartPosition.WindowsDefaultLocation;
}
shifter.ShowDialog();
shifter.Show();
}
}

View File

@ -180,6 +180,7 @@
Name = "TranslateForm";
Padding = new System.Windows.Forms.Padding(15);
Text = "Herm";
TopMost = true;
((System.ComponentModel.ISupportInitialize)TrackX).EndInit();
((System.ComponentModel.ISupportInitialize)TrackY).EndInit();
ResumeLayout(false);

View File

@ -9,8 +9,6 @@ public partial class TranslateForm : Form
private readonly GraphForm refForm;
// These variables both represent the same graphable.
private readonly Graphable ableRaw;
private readonly ITranslatable ableTrans;
private readonly ITranslatableX? ableTransX;
private readonly ITranslatableY? ableTransY;
@ -26,20 +24,20 @@ public partial class TranslateForm : Form
Text = $"Translate {ableRaw.Name}";
TitleLabel.Text = $"Adjust Location for {ableRaw.Name}";
MinBoxX.Leave += (o, e) => UpdateFromMinBoxY();
MinBoxX.Leave += (o, e) => UpdateFromMinBoxX();
MinBoxX.KeyDown += (o, e) =>
{
if (e.KeyCode == Keys.Enter) UpdateFromMinBoxY();
if (e.KeyCode == Keys.Enter) UpdateFromMinBoxX();
};
MaxBoxX.Leave += (o, e) => UpdateFromMaxBoxY();
MaxBoxX.Leave += (o, e) => UpdateFromMaxBoxX();
MaxBoxX.KeyDown += (o, e) =>
{
if (e.KeyCode == Keys.Enter) UpdateFromMaxBoxY();
if (e.KeyCode == Keys.Enter) UpdateFromMaxBoxX();
};
ThisValueX.Leave += (o, e) => UpdateFromThisBoxY();
ThisValueX.Leave += (o, e) => UpdateFromThisBoxX();
ThisValueX.KeyDown += (o, e) =>
{
if (e.KeyCode == Keys.Enter) UpdateFromThisBoxY();
if (e.KeyCode == Keys.Enter) UpdateFromThisBoxX();
};
MinBoxY.Leave += (o, e) => UpdateFromMinBoxY();
@ -59,8 +57,6 @@ public partial class TranslateForm : Form
};
refForm = graph;
this.ableRaw = ableRaw;
this.ableTrans = ableTrans;
double curX = 0, curY = 0;
if (ableTrans is ITranslatableX transX)