mirror of
https://github.com/SubtitleEdit/subtitleedit.git
synced 2024-10-27 22:42:38 +01:00
Fixed crash in translate when offline (now displays error message)
git-svn-id: https://subtitleedit.googlecode.com/svn/trunk@1022 99eadd0c-20b8-1223-b5c4-2a2b2df33de2
This commit is contained in:
parent
1df33d28f8
commit
8afe681dc4
@ -201,7 +201,7 @@ namespace Nikse.SubtitleEdit.Forms
|
||||
string text = string.Format("{1} {0} |", p.Text.Replace("|", _newlineString), _splitterString);
|
||||
if (HttpUtility.UrlEncode(sb.ToString() + text).Length >= textMaxSize)
|
||||
{
|
||||
FillTranslatedText(DoTranslate(sb.ToString()), start, index-1);
|
||||
FillTranslatedText(DoTranslate(sb.ToString()), start, index - 1);
|
||||
sb = new StringBuilder();
|
||||
progressBar1.Refresh();
|
||||
Application.DoEvents();
|
||||
@ -214,7 +214,11 @@ namespace Nikse.SubtitleEdit.Forms
|
||||
break;
|
||||
}
|
||||
if (sb.Length > 0)
|
||||
FillTranslatedText(DoTranslate(sb.ToString()), start, index-1);
|
||||
FillTranslatedText(DoTranslate(sb.ToString()), start, index - 1);
|
||||
}
|
||||
catch (WebException webException)
|
||||
{
|
||||
MessageBox.Show(webException.Source + ": " + webException.Message);
|
||||
}
|
||||
finally
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user