Skip to content

Commit

Permalink
About dialog overhaul + new version string system
Browse files Browse the repository at this point in the history
- Add brand-new About dialog

- Rename "SNAPSHOT" builds to "dev"

- Only show commit hash in version string if running a dev build, otherwise just show the program version, and beta/RC/etc. suffix if set

- Remove unused Strings.cs function
  • Loading branch information
Sparronator9999 committed Dec 9, 2024
1 parent 9567072 commit 728d826
Show file tree
Hide file tree
Showing 13 changed files with 626 additions and 43 deletions.
2 changes: 1 addition & 1 deletion YAMDCC.Config/YAMDCC.Config.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
<TargetFramework>net48</TargetFramework>
<Title>YAMDCC config library</Title>
<VersionPrefix>0.6.9.420</VersionPrefix>
<VersionSuffix>SNAPSHOT</VersionSuffix>
<VersionSuffix>dev</VersionSuffix>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)'=='Release'">
<DebugType>none</DebugType>
Expand Down
262 changes: 262 additions & 0 deletions YAMDCC.ConfigEditor/Dialogs/VersionDialog.Designer.cs

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

68 changes: 68 additions & 0 deletions YAMDCC.ConfigEditor/Dialogs/VersionDialog.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
// This file is part of YAMDCC (Yet Another MSI Dragon Center Clone).
// Copyright © Sparronator9999 2023-2024.
//
// YAMDCC is free software: you can redistribute it and/or modify it
// under the terms of the GNU General Public License as published by the Free
// Software Foundation, either version 3 of the License, or (at your option)
// any later version.
//
// YAMDCC is distributed in the hope that it will be useful, but
// WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
// or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
// more details.
//
// You should have received a copy of the GNU General Public License along with
// YAMDCC. If not, see <https://www.gnu.org/licenses/>.

using System;
using System.Drawing;
using System.Diagnostics;
using System.Reflection;
using System.Windows.Forms;

namespace YAMDCC.ConfigEditor.Dialogs
{
internal sealed partial class VersionDialog : Form
{
private static readonly string SourcePrefix = "https://github.com/Sparronator9999/YAMDCC";

public VersionDialog()
{
InitializeComponent();
lblDesc.Text = Strings.GetString("dlgAboutDesc");
lblCopyright.Text = Strings.GetString("dlgAboutCopyright");
lblVersion.Text += Utils.GetVerString();

string revision = Utils.GetRevision();

if (string.IsNullOrEmpty(revision))
{
lblRevision.Hide();
}
else
{
lblRevision.Text += revision;
}
}

private void btnLicense_Click(object sender, EventArgs e)
{
Process.Start("https://www.gnu.org/licenses/gpl-3.0.html#license-text");
}

private void btnSource_Click(object sender, EventArgs e)
{
Process.Start(SourcePrefix);
}

private void btnFAQ_Click(object sender, EventArgs e)
{
Process.Start($"{SourcePrefix}#faq");
}

private void btnIssues_Click(object sender, EventArgs e)
{
Process.Start($"{SourcePrefix}/issues");
}
}
}
Loading

0 comments on commit 728d826

Please sign in to comment.