Skip to content

Commit

Permalink
完成 jitwxs#57
Browse files Browse the repository at this point in the history
  • Loading branch information
millennium committed Apr 1, 2022
1 parent d6a1dd5 commit ed54cbe
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 10 deletions.
11 changes: 4 additions & 7 deletions WindowsFormsApp1/MainForm.cs
Original file line number Diff line number Diff line change
Expand Up @@ -599,23 +599,20 @@ private void latestVersionMenuItem_Click(object sender, EventArgs e)

private void OutputLatestTag(GitHubInfo info)
{
var update = new 软件更新(info);
update.ShowDialog();

if (info == null)
{
MessageBox.Show(ErrorMsg.GET_LATEST_VERSION_FAILED, "提示");
return;
}

string bigV = info.ToString().Substring(1, 2), smallV = info.TagName.Substring(3);
string bigV = info.TagName.Substring(1, 2), smallV = info.TagName.Substring(3);
string curBigV = Version.Substring(1, 2), curSmallV = Version.Substring(3);

if (bigV.CompareTo(curBigV) == 1 || (bigV.CompareTo(curBigV) == 0 && smallV.CompareTo(curSmallV) == 1))
{

Clipboard.SetDataObject("https://github.com/jitwxs/163MusicLyrics/releases");
MessageBox.Show(string.Format(ErrorMsg.EXIST_LATEST_VERSION, info), "提示");
var update = new SoftwareUpdateForm(info);
update.ShowDialog();
update.Close();
}
else
{
Expand Down
2 changes: 1 addition & 1 deletion WindowsFormsApp1/UpdateForm.Designer.cs

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

4 changes: 2 additions & 2 deletions WindowsFormsApp1/UpdateForm.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,12 @@

namespace 网易云歌词提取
{
public partial class 软件更新 : Form
public partial class SoftwareUpdateForm : Form
{
private readonly GitHubInfo _gitHubInfo;
private static readonly Logger _logger = LogManager.GetCurrentClassLogger();

public 软件更新(GitHubInfo info)
public SoftwareUpdateForm(GitHubInfo info)
{
if (info == null)
{
Expand Down

0 comments on commit ed54cbe

Please sign in to comment.