Skip to content

Commit

Permalink
Add update check and prepare to release
Browse files Browse the repository at this point in the history
  • Loading branch information
Shiro committed Dec 4, 2022
1 parent eaad374 commit 679815e
Show file tree
Hide file tree
Showing 9 changed files with 262 additions and 266 deletions.
209 changes: 82 additions & 127 deletions Daigassou/Common.cs

Large diffs are not rendered by default.

64 changes: 32 additions & 32 deletions Daigassou/Forms/MainFormEx.Designer.cs

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

32 changes: 30 additions & 2 deletions Daigassou/Forms/MainFormEx.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
using System;
using System.Diagnostics;
using System.Drawing;
using System.IO;
using System.Runtime.InteropServices;
using System.Threading.Tasks;
using System.Windows.Forms;
Expand Down Expand Up @@ -47,14 +49,40 @@ public MainFormEx()
uiNavMenu1.SetNodePageIndex(uiNavMenu1.Nodes[4], (int) PageID.PreviewPlayPage);

Utils.Utils.TimeSync();
Utils.Utils.CheckForUpdate();

checkFileNameChanged();

Utils.Utils.CheckForUpdate();


toolStripStatusLabel1.Text = "当前版本: "+System.Reflection.Assembly.GetExecutingAssembly().GetName().Version.ToString();




}


private void checkFileNameChanged()
{
var targetName = Path.Combine(Path.GetDirectoryName(Process.GetCurrentProcess().MainModule?.FileName),
"Daigassou.exe");

if (File.Exists(targetName) && Process.GetCurrentProcess().MainModule?.FileName != "Daigassou.exe")
{
var v = FileVersionInfo.GetVersionInfo(targetName).FileVersion;
if (v.ToString() != System.Reflection.Assembly.GetExecutingAssembly().GetName().Version.ToString())
{
UIMessageDialog.ShowWarningDialog(this,"更新提示","因当前文件名被修改,更新后请打开Daigassou.exe!");

}



}


}

private void HotkeyUtils_HotKeyPressed(object sender, HotkeyEventArgs e)
{
switch (e.Name)
Expand Down
3 changes: 2 additions & 1 deletion Daigassou/Forms/MidiDevicePage.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Drawing;
using System.Windows.Forms;
using Daigassou.Input_Midi;
Expand Down Expand Up @@ -132,7 +133,7 @@ private void MidiDevicePage_Enter(object sender, EventArgs e)

private void uiLinkLabel1_Click(object sender, EventArgs e)
{
SendParamToFrame(333);
Process.Start("https://www.bilibili.com/video/BV1kG4y1R7sM/");
}
}
}
1 change: 1 addition & 0 deletions Daigassou/Forms/MuiltiPlayForm.Designer.cs

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

5 changes: 5 additions & 0 deletions Daigassou/Forms/MuiltiPlayForm.cs
Original file line number Diff line number Diff line change
Expand Up @@ -163,5 +163,10 @@ private void MuiltiPlayForm_Enter(object sender, EventArgs e)
{
uiDatetimePicker1.Value = DateTime.Now;
}

private void uiLinkLabel1_Click(object sender, EventArgs e)
{
Process.Start("https://www.bilibili.com/video/BV11K411X7xC/");
}
}
}
Loading

0 comments on commit 679815e

Please sign in to comment.