Skip to content

Commit 1b2d076

Browse files
committed
rename file
1 parent 15ef991 commit 1b2d076

File tree

4 files changed

+8
-8
lines changed

4 files changed

+8
-8
lines changed

src/DreamScene2/AboutDialog.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ public partial class AboutDialog : Form
88
public AboutDialog()
99
{
1010
InitializeComponent();
11-
lblVersion.Text = "Version " + Constant.Version;
11+
lblVersion.Text = "Version " + Constants.Version;
1212
this.Icon = DreamScene2.Properties.Resources.AppIcon;
1313
}
1414

Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
namespace DreamScene2
22
{
3-
public static class Constant
3+
public static class Constants
44
{
55
public const string ProjectName = "DreamScene2";
66
public const string Version = "1.7";
7-
public const string MainWindowTitle = ProjectName + " (~ ̄▽ ̄)~";
7+
public const string MainWindowTitle = ProjectName + " ";
88
}
99
}

src/DreamScene2/MainForm.cs

+4-4
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ public MainForm()
3030
_timer1.Tick += timer1_Tick;
3131
_timer2.Interval = 200;
3232
_timer2.Tick += timer2_Tick;
33-
this.Text = Constant.MainWindowTitle;
33+
this.Text = Constants.MainWindowTitle;
3434
this.Icon = DreamScene2.Properties.Resources.AppIcon;
3535
notifyIcon1.Icon = this.Icon;
3636
toolStripMenuItem3.Checked = checkMute.Checked = _settings.IsMuted;
@@ -69,7 +69,7 @@ void OpenFile(string path)
6969
{
7070
if (!File.Exists(path))
7171
{
72-
MessageBox.Show($"找不到文件 \"{path}\"", Constant.ProjectName);
72+
MessageBox.Show($"找不到文件 \"{path}\"", Constants.ProjectName);
7373
return;
7474
}
7575

@@ -119,7 +119,7 @@ void OpenWeb(string url)
119119
{
120120
if (!WebWindow.TryGetWebView2Version(out _))
121121
{
122-
MessageBox.Show("打开网页功能需要 WebView2 支持。请在托盘图标找到 DreamScene2 然后右键菜单,依次点击 [打开 URL] > [安装 WebView2...] 安装。", Constant.ProjectName);
122+
MessageBox.Show($"打开网页功能需要 WebView2 支持。请在托盘图标找到 {Constants.ProjectName} 然后右键菜单,依次点击 [打开 URL] > [安装 WebView2...] 安装。", Constants.ProjectName);
123123
return;
124124
}
125125

@@ -286,7 +286,7 @@ private void MainForm_FormClosing(object sender, FormClosingEventArgs e)
286286

287287
if (_settings.FirstRun)
288288
{
289-
notifyIcon1.ShowBalloonTip(1000, "", "DreamScene2 已被最小化到系统托盘", ToolTipIcon.None);
289+
notifyIcon1.ShowBalloonTip(1000, "", $"{Constants.ProjectName} 已被最小化到系统托盘", ToolTipIcon.None);
290290
_settings.FirstRun = false;
291291
}
292292
}

src/DreamScene2/Program.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ internal static class Program
1515
[STAThread]
1616
static void Main(string[] args)
1717
{
18-
IntPtr hwnd = NativeMethods.FindWindow(null, Constant.MainWindowTitle);
18+
IntPtr hwnd = NativeMethods.FindWindow(null, Constants.MainWindowTitle);
1919
if (hwnd != IntPtr.Zero)
2020
{
2121
const int SW_RESTORE = 9;

0 commit comments

Comments
 (0)