Browse Source

refine error message

tags/2.3
clowwindy 9 years ago
parent
commit
40aded9571
3 changed files with 12 additions and 9 deletions
  1. +8
    -6
      shadowsocks-csharp/Controller/SystemProxy.cs
  2. +2
    -1
      shadowsocks-csharp/Data/cn.txt
  3. +2
    -2
      shadowsocks-csharp/View/MenuViewController.cs

+ 8
- 6
shadowsocks-csharp/Controller/SystemProxy.cs View File

@@ -48,10 +48,11 @@ namespace Shadowsocks.Controller
//Must Notify IE first, or the connections do not chanage
CopyProxySettingFromLan();
}
catch (Exception)
catch (Exception e)
{
MessageBox.Show("can not change registry!");
throw;
Logging.LogUsefulException(e);
// TODO this should be moved into views
MessageBox.Show(I18N.GetString("Failed to update registry"));
}
}
@@ -68,10 +69,11 @@ namespace Shadowsocks.Controller
SystemProxy.NotifyIE();
CopyProxySettingFromLan();
}
catch (Exception)
catch (Exception e)
{
MessageBox.Show("can not change registry!");
throw;
Logging.LogUsefulException(e);
// TODO this should be moved into views
MessageBox.Show(I18N.GetString("Failed to update registry"));
}
}


+ 2
- 1
shadowsocks-csharp/Data/cn.txt View File

@@ -43,5 +43,6 @@ Disabled=已禁用代理
Update PAC from GFWList=从 GFWList 更新 PAC
Failed to update PAC file =更新 PAC 文件失败
PAC updated=更新 PAC 成功
"Failed to find QRCode=无法找到二维码
No QRCode found. Try to zoom in or move it to the center of the screen.=找不到二维码,尝试把它放大或者移动到靠近屏幕中间的位置
Failed to decode QRCode=无法解析二维码
Failed to update registry=无法修改注册表

+ 2
- 2
shadowsocks-csharp/View/MenuViewController.cs View File

@@ -435,7 +435,7 @@ namespace Shadowsocks.View
}
}
}
MessageBox.Show(I18N.GetString("Failed to find QRCode"));
MessageBox.Show(I18N.GetString("No QRCode found. Try to zoom in or move it to the center of the screen."));
}
void splash_FormClosed(object sender, FormClosedEventArgs e)
@@ -451,7 +451,7 @@ namespace Shadowsocks.View
private void AutoStartupItem_Click(object sender, EventArgs e) {
AutoStartupItem.Checked = !AutoStartupItem.Checked;
if (!AutoStartup.Set(AutoStartupItem.Checked)) {
MessageBox.Show("Failed to edit registry");
MessageBox.Show(I18N.GetString("Failed to update registry"));
}
}
}


Loading…
Cancel
Save