Skip to content

Commit

Permalink
- Show version in settings screen
Browse files Browse the repository at this point in the history
- Press ESC to close Settings
  • Loading branch information
KoalaBear84 committed Dec 3, 2021
1 parent fcca662 commit c2c1626
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/HAClimateDeskband/FormSettings.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 10 additions & 0 deletions src/HAClimateDeskband/FormSettings.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ public partial class FormSettings : Form
public FormSettings()
{
InitializeComponent();

Text += $" {typeof(FormSettings).Assembly.GetName().Version}";
}

private void FormSettings_Load(object sender, EventArgs e)
Expand Down Expand Up @@ -53,5 +55,13 @@ private void BtnSave_Click(object sender, EventArgs e)
HAClimateDeskband.LoadSettings();
Close();
}

private void FormSettings_KeyPress(object sender, KeyPressEventArgs e)
{
if (e.KeyChar == Convert.ToChar(Keys.Escape))
{
Close();
}
}
}
}

0 comments on commit c2c1626

Please sign in to comment.