Skip to content

Commit

Permalink
+ Added version to About window
Browse files Browse the repository at this point in the history
- removed unnecessary event subscription
  • Loading branch information
tryallthethings committed Sep 20, 2020
1 parent 5d828b9 commit fc495c9
Show file tree
Hide file tree
Showing 5 changed files with 97 additions and 31 deletions.
43 changes: 33 additions & 10 deletions DNS-Swapper/About.Designer.cs

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

3 changes: 2 additions & 1 deletion DNS-Swapper/About.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,11 @@ namespace DNS_Swapper
{
public partial class About : Form
{
public About()
public About(string AppVersion)
{
InitializeComponent();
CenterToScreen();
version.Text = AppVersion;
}

private void About_Load(object sender, EventArgs e)
Expand Down
2 changes: 1 addition & 1 deletion DNS-Swapper/MainMenu.cs
Original file line number Diff line number Diff line change
Expand Up @@ -384,7 +384,7 @@ private void updateIP(object sender, EventArgs e)
private void aboutToolStripMenuItem_Click(object sender, EventArgs e)
{
// Show about form
Form About = new About();
Form About = new About(version);
About.ShowDialog();
}

Expand Down
7 changes: 0 additions & 7 deletions DNS-Swapper/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,6 @@ static void Main()
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
Application.Run(new MainMenu());

AppDomain.CurrentDomain.ProcessExit += OnProcessExit;
}

static void OnProcessExit(object sender, EventArgs e)
{
// Cleanup
}
}
}
Loading

0 comments on commit fc495c9

Please sign in to comment.