mirror of
https://github.com/2dust/v2rayN.git
synced 2026-11-12 15:34:59 +03:00
消息框图标优化
致命错误取Error,普通错误取警告。
This commit is contained in:
@@ -63,7 +63,7 @@ namespace v2rayN.Forms
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
UI.Show(UIRes.I18N("OperationFailed"));
|
UI.ShowWarning(UIRes.I18N("OperationFailed"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -96,7 +96,7 @@ namespace v2rayN.Forms
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
UI.Show(UIRes.I18N("OperationFailed"));
|
UI.ShowWarning(UIRes.I18N("OperationFailed"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
private void btnClose_Click(object sender, EventArgs e)
|
private void btnClose_Click(object sender, EventArgs e)
|
||||||
@@ -124,7 +124,7 @@ namespace v2rayN.Forms
|
|||||||
VmessItem vmessItem = V2rayConfigHandler.ImportFromClipboardConfig(Utils.GetClipboardData(), out string msg);
|
VmessItem vmessItem = V2rayConfigHandler.ImportFromClipboardConfig(Utils.GetClipboardData(), out string msg);
|
||||||
if (vmessItem == null)
|
if (vmessItem == null)
|
||||||
{
|
{
|
||||||
UI.Show(msg);
|
UI.ShowWarning(msg);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -85,7 +85,7 @@ namespace v2rayN.Forms
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
UI.Show(UIRes.I18N("OperationFailed"));
|
UI.ShowWarning(UIRes.I18N("OperationFailed"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
private void btnClose_Click(object sender, EventArgs e)
|
private void btnClose_Click(object sender, EventArgs e)
|
||||||
@@ -113,7 +113,7 @@ namespace v2rayN.Forms
|
|||||||
VmessItem vmessItem = V2rayConfigHandler.ImportFromClipboardConfig(Utils.GetClipboardData(), out string msg);
|
VmessItem vmessItem = V2rayConfigHandler.ImportFromClipboardConfig(Utils.GetClipboardData(), out string msg);
|
||||||
if (vmessItem == null)
|
if (vmessItem == null)
|
||||||
{
|
{
|
||||||
UI.Show(msg);
|
UI.ShowWarning(msg);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -166,7 +166,7 @@ namespace v2rayN.Forms
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
UI.Show(UIRes.I18N("OperationFailed"));
|
UI.ShowWarning(UIRes.I18N("OperationFailed"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -233,7 +233,7 @@ namespace v2rayN.Forms
|
|||||||
}
|
}
|
||||||
if (vmessItem == null)
|
if (vmessItem == null)
|
||||||
{
|
{
|
||||||
UI.Show(msg);
|
UI.ShowWarning(msg);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -261,7 +261,7 @@ namespace v2rayN.Forms
|
|||||||
VmessItem vmessItem = V2rayConfigHandler.ImportFromClipboardConfig(Utils.GetClipboardData(), out string msg);
|
VmessItem vmessItem = V2rayConfigHandler.ImportFromClipboardConfig(Utils.GetClipboardData(), out string msg);
|
||||||
if (vmessItem == null)
|
if (vmessItem == null)
|
||||||
{
|
{
|
||||||
UI.Show(msg);
|
UI.ShowWarning(msg);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -804,7 +804,7 @@ namespace v2rayN.Forms
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
UI.Show(UIRes.I18N("FailedImportedCustomServer"));
|
UI.ShowWarning(UIRes.I18N("FailedImportedCustomServer"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1391,7 +1391,7 @@ namespace v2rayN.Forms
|
|||||||
string result = Convert.ToString(e.UserState);
|
string result = Convert.ToString(e.UserState);
|
||||||
if (Utils.IsNullOrEmpty(result))
|
if (Utils.IsNullOrEmpty(result))
|
||||||
{
|
{
|
||||||
UI.Show(UIRes.I18N("NoValidQRcodeFound"));
|
UI.ShowWarning(UIRes.I18N("NoValidQRcodeFound"));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -181,7 +181,7 @@ namespace v2rayN.Forms
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
UI.Show(UIRes.I18N("OperationFailed"));
|
UI.ShowWarning(UIRes.I18N("OperationFailed"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -79,7 +79,7 @@ namespace v2rayN.Forms
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
UI.Show(UIRes.I18N("OperationFailed"));
|
UI.ShowWarning(UIRes.I18N("OperationFailed"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -101,7 +101,7 @@ namespace v2rayN.Handler
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
UI.Show(string.Format(UIRes.I18N("SaveClientConfigurationIn"), fileName));
|
UI.ShowWarning(string.Format(UIRes.I18N("SaveClientConfigurationIn"), fileName));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -141,7 +141,7 @@ namespace v2rayN.Handler
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
UI.Show(string.Format(UIRes.I18N("SaveServerConfigurationIn"), fileName));
|
UI.ShowWarning(string.Format(UIRes.I18N("SaveServerConfigurationIn"), fileName));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -38,7 +38,7 @@ namespace v2rayN
|
|||||||
{
|
{
|
||||||
if (!UnzipLibs())
|
if (!UnzipLibs())
|
||||||
{
|
{
|
||||||
UI.Show($"Error preparing the environment(准备运行环境出错)");
|
UI.ShowError($"Error preparing the environment(准备运行环境出错)");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -54,7 +54,7 @@ namespace v2rayN
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
UI.Show($"v2rayN is already running(v2rayN已经运行)");
|
UI.ShowWarning($"v2rayN is already running(v2rayN已经运行)");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -8,10 +8,18 @@ namespace v2rayN
|
|||||||
{
|
{
|
||||||
MessageBox.Show(msg, "v2rayN", MessageBoxButtons.OK, MessageBoxIcon.Information);
|
MessageBox.Show(msg, "v2rayN", MessageBoxButtons.OK, MessageBoxIcon.Information);
|
||||||
}
|
}
|
||||||
|
public static void ShowWarning(string msg)
|
||||||
|
{
|
||||||
|
MessageBox.Show(msg, "v2rayN", MessageBoxButtons.OK, MessageBoxIcon.Warning);
|
||||||
|
}
|
||||||
|
public static void ShowError(string msg)
|
||||||
|
{
|
||||||
|
MessageBox.Show(msg, "v2rayN", MessageBoxButtons.OK, MessageBoxIcon.Error);
|
||||||
|
}
|
||||||
|
|
||||||
public static DialogResult ShowYesNo(string msg)
|
public static DialogResult ShowYesNo(string msg)
|
||||||
{
|
{
|
||||||
return MessageBox.Show(msg, "YesNo", MessageBoxButtons.YesNo);
|
return MessageBox.Show(msg, "v2rayN", MessageBoxButtons.YesNo, MessageBoxIcon.Question);
|
||||||
}
|
}
|
||||||
|
|
||||||
//public static string GetResourseString(string key)
|
//public static string GetResourseString(string key)
|
||||||
|
|||||||
Reference in New Issue
Block a user