diff --git a/Consts/MainMultilangConst.Designer.cs b/Consts/MainMultilangConst.Designer.cs
index 072415f..df1e798 100644
--- a/Consts/MainMultilangConst.Designer.cs
+++ b/Consts/MainMultilangConst.Designer.cs
@@ -70,7 +70,7 @@ namespace Sheas_Cealer.Consts {
}
///
- /// 查找类似 The args cannot be recognized, check if the host contains syntax errors 的本地化字符串。
+ /// 查找类似 The args cannot be recognized, check if the hosts contain syntax errors 的本地化字符串。
///
public static string _HostErrorHint {
get {
@@ -78,39 +78,39 @@ namespace Sheas_Cealer.Consts {
}
}
- ///
- /// 查找类似 Local host is exactly the same as upstream 的本地化字符串。
- ///
- public static string _HostUtdHint {
- get {
- return ResourceManager.GetString("_HostUtdHint", resourceCulture);
- }
- }
-
///
/// 查找类似 All processes of the selected browser will be closed before launching, do you want to continue? 的本地化字符串。
///
- public static string _KillBrowserProcessesPrompt {
+ public static string _KillBrowserProcessPrompt {
get {
- return ResourceManager.GetString("_KillBrowserProcessesPrompt", resourceCulture);
+ return ResourceManager.GetString("_KillBrowserProcessPrompt", resourceCulture);
}
}
///
- /// 查找类似 Do you need to override local host that are slightly different from upstream? If not it will only open a page with the upstream host for you 的本地化字符串。
+ /// 查找类似 There is an update available. Do you want to update upstream host? If No it will only open the upstream host page for you 的本地化字符串。
///
- public static string _OverrideLocalHostPrompt {
+ public static string _OverrideUpstreamHostPrompt {
get {
- return ResourceManager.GetString("_OverrideLocalHostPrompt", resourceCulture);
+ return ResourceManager.GetString("_OverrideUpstreamHostPrompt", resourceCulture);
}
}
///
/// 查找类似 Update successfully 的本地化字符串。
///
- public static string _UpdateHostSuccessHint {
+ public static string _UpdateUpstreamHostSuccessHint {
get {
- return ResourceManager.GetString("_UpdateHostSuccessHint", resourceCulture);
+ return ResourceManager.GetString("_UpdateUpstreamHostSuccessHint", resourceCulture);
+ }
+ }
+
+ ///
+ /// 查找类似 Upstream host has been updated to the latest 的本地化字符串。
+ ///
+ public static string _UpstreamHostUtdHint {
+ get {
+ return ResourceManager.GetString("_UpstreamHostUtdHint", resourceCulture);
}
}
@@ -142,20 +142,38 @@ namespace Sheas_Cealer.Consts {
}
///
- /// 查找类似 Edit Host 的本地化字符串。
+ /// 查找类似 Edit Local Host 的本地化字符串。
///
- public static string EditHostButtonContent {
+ public static string EditLocalHostButtonContent {
get {
- return ResourceManager.GetString("EditHostButtonContent", resourceCulture);
+ return ResourceManager.GetString("EditLocalHostButtonContent", resourceCulture);
}
}
///
- /// 查找类似 Click to edit host 的本地化字符串。
+ /// 查找类似 Click to edit local host 的本地化字符串。
///
- public static string EditHostButtonToolTip {
+ public static string EditLocalHostButtonToolTip {
get {
- return ResourceManager.GetString("EditHostButtonToolTip", resourceCulture);
+ return ResourceManager.GetString("EditLocalHostButtonToolTip", resourceCulture);
+ }
+ }
+
+ ///
+ /// 查找类似 Edit Upstream Host 的本地化字符串。
+ ///
+ public static string EditUpstreamHostButtonContent {
+ get {
+ return ResourceManager.GetString("EditUpstreamHostButtonContent", resourceCulture);
+ }
+ }
+
+ ///
+ /// 查找类似 Click to edit upstream host 的本地化字符串。
+ ///
+ public static string EditUpstreamHostButtonToolTip {
+ get {
+ return ResourceManager.GetString("EditUpstreamHostButtonToolTip", resourceCulture);
}
}
@@ -295,20 +313,20 @@ namespace Sheas_Cealer.Consts {
}
///
- /// 查找类似 Update Host 的本地化字符串。
+ /// 查找类似 Update Upstream Host 的本地化字符串。
///
- public static string UpdateHostButtonContent {
+ public static string UpdateUpstreamHostButtonContent {
get {
- return ResourceManager.GetString("UpdateHostButtonContent", resourceCulture);
+ return ResourceManager.GetString("UpdateUpstreamHostButtonContent", resourceCulture);
}
}
///
- /// 查找类似 Click to update host 的本地化字符串。
+ /// 查找类似 Click to update upstream host 的本地化字符串。
///
- public static string UpdateHostButtonToolTip {
+ public static string UpdateUpstreamHostButtonToolTip {
get {
- return ResourceManager.GetString("UpdateHostButtonToolTip", resourceCulture);
+ return ResourceManager.GetString("UpdateUpstreamHostButtonToolTip", resourceCulture);
}
}
diff --git a/Consts/MainMultilangConst.resx b/Consts/MainMultilangConst.resx
index c579ef5..36a300a 100644
--- a/Consts/MainMultilangConst.resx
+++ b/Consts/MainMultilangConst.resx
@@ -126,11 +126,17 @@
Browser Path
-
- Edit Host
+
+ Edit Local Host
-
- Click to edit host
+
+ Click to edit local host
+
+
+ Edit Upstream Host
+
+
+ Click to edit upstream host
Extra Args
@@ -177,11 +183,11 @@
Click to switch themes
-
- Update Host
+
+ Update Upstream Host
-
- Click to update host
+
+ Click to update upstream host
Upstream URL
@@ -190,18 +196,18 @@
Browser
- The args cannot be recognized, check if the host contains syntax errors
+ The args cannot be recognized, check if the hosts contain syntax errors
-
- Local host is exactly the same as upstream
+
+ Upstream host has been updated to the latest
-
+
All processes of the selected browser will be closed before launching, do you want to continue?
-
- Do you need to override local host that are slightly different from upstream? If not it will only open a page with the upstream host for you
+
+ There is an update available. Do you want to update upstream host? If No it will only open the upstream host page for you
-
+
Update successfully
\ No newline at end of file
diff --git a/Consts/MainMultilangConst.zh.resx b/Consts/MainMultilangConst.zh.resx
index c7622c2..a43684d 100644
--- a/Consts/MainMultilangConst.zh.resx
+++ b/Consts/MainMultilangConst.zh.resx
@@ -126,11 +126,17 @@
文件路径
-
- 编辑规则
+
+ 编辑本地规则
-
- 点击编辑伪造规则
+
+ 点击编辑本地规则
+
+
+ 编辑上游规则
+
+
+ 点击编辑上游规则
额外参数
@@ -142,7 +148,7 @@
填入任意额外的 Chromium 启动参数
- 填入任意上游伪造规则链接
+ 填入任意上游规则链接
浏览路径
@@ -177,11 +183,11 @@
点击切换显示主题
-
- 更新规则
+
+ 更新上游规则
-
- 点击更新伪造规则
+
+ 点击更新上游规则
上游链接
@@ -190,18 +196,18 @@
浏览器
- 规则无法识别,请检查伪造规则是否含有语法错误
+ 规则无法识别,请检查伪造规则中是否含有语法错误
-
- 本地伪造规则和上游一模一样
+
+ 上游规则已经更到最新了
-
+
启动前将关闭所选浏览器的所有进程,是否继续?
-
- 本地伪造规则和上游略有不同,需要覆盖本地吗?否则只为你打开上游规则的网页
+
+ 上游规则有更新可用,需要更新吗?否则只为你打开上游规则网页
-
+
更新已完成
\ No newline at end of file
diff --git a/Wins/MainWin.xaml b/Wins/MainWin.xaml
index 516de03..9ba2329 100644
--- a/Wins/MainWin.xaml
+++ b/Wins/MainWin.xaml
@@ -92,16 +92,19 @@
-
-
+
+
+
-
-
diff --git a/Wins/MainWin.xaml.cs b/Wins/MainWin.xaml.cs
index 21ef3fd..7a81b81 100644
--- a/Wins/MainWin.xaml.cs
+++ b/Wins/MainWin.xaml.cs
@@ -111,7 +111,7 @@ public partial class MainWin : Window
if (string.IsNullOrWhiteSpace(CealArgs))
throw new Exception(MainConst._HostErrorHint);
- if (MessageBox.Show(MainConst._KillBrowserProcessesPrompt, string.Empty, MessageBoxButton.YesNo) != MessageBoxResult.Yes)
+ if (MessageBox.Show(MainConst._KillBrowserProcessPrompt, string.Empty, MessageBoxButton.YesNo) != MessageBoxResult.Yes)
return;
IWshShortcut uncealedBrowserShortcut = (IWshShortcut)new WshShell().CreateShortcut(Path.Combine(AppDomain.CurrentDomain.SetupInformation.ApplicationBase!, "Uncealed-Browser.lnk"));
@@ -128,7 +128,7 @@ public partial class MainWin : Window
new CommandProc(sender == null).ShellRun(AppDomain.CurrentDomain.SetupInformation.ApplicationBase!, ($"{CealArgs} {MainPres!.ExtraArgs}").Trim());
}
- private void EditHostButton_Click(object sender, RoutedEventArgs e)
+ private void EditLocalHostButton_Click(object sender, RoutedEventArgs e)
{
string cealingHostPath = Path.Combine(AppDomain.CurrentDomain.SetupInformation.ApplicationBase!, "Cealing-Host.json");
@@ -138,7 +138,11 @@ public partial class MainWin : Window
ProcessStartInfo processStartInfo = new(cealingHostPath) { UseShellExecute = true };
Process.Start(processStartInfo);
}
- private async void UpdateHostButton_Click(object sender, RoutedEventArgs e)
+ private void EditUpstreamHostButton_Click(object sender, RoutedEventArgs e)
+ {
+
+ }
+ private async void UpdateUpstreamHostButton_Click(object sender, RoutedEventArgs e)
{
string upstreamHostUrl = (MainPres!.UpstreamUrl.StartsWith("http://") || MainPres!.UpstreamUrl.StartsWith("https://") ? string.Empty : "https://") + MainPres!.UpstreamUrl;
string upstreamHostString = await Http.GetAsync(upstreamHostUrl, MainClient);
@@ -152,14 +156,14 @@ public partial class MainWin : Window
localHostString = localHostStreamReader.ReadToEnd();
if (localHostString.Replace("\r", string.Empty) == upstreamHostString)
- MessageBox.Show(MainConst._HostUtdHint);
+ MessageBox.Show(MainConst._UpstreamHostUtdHint);
else
{
- MessageBoxResult overrideOptionResult = MessageBox.Show(MainConst._OverrideLocalHostPrompt, string.Empty, MessageBoxButton.YesNoCancel);
+ MessageBoxResult overrideOptionResult = MessageBox.Show(MainConst._OverrideUpstreamHostPrompt, string.Empty, MessageBoxButton.YesNoCancel);
if (overrideOptionResult == MessageBoxResult.Yes)
{
File.WriteAllText(Path.Combine(AppDomain.CurrentDomain.SetupInformation.ApplicationBase!, "Cealing-Host.json"), upstreamHostString);
- MessageBox.Show(MainConst._UpdateHostSuccessHint);
+ MessageBox.Show(MainConst._UpdateUpstreamHostSuccessHint);
}
else if (overrideOptionResult == MessageBoxResult.No)
Process.Start(new ProcessStartInfo(upstreamHostUrl) { UseShellExecute = true });