зеркало из https://github.com/microsoft/2LCS.git
Merge pull request #51 from aariste/master
Fix 2LCS closing when cookie is expired
This commit is contained in:
Коммит
b37365dccd
|
@ -1417,7 +1417,7 @@ namespace LCS.Forms
|
|||
logoutToolStripMenuItem.Enabled = true;
|
||||
loginToLcsMenuItem.Enabled = false;
|
||||
ChangeProjectMenuItem_Click(null, null);
|
||||
}
|
||||
}
|
||||
|
||||
private void LogonToApplicationToolStripMenuItem_Click(object sender, EventArgs e)
|
||||
{
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
using LCS.Forms;
|
||||
using System;
|
||||
using System.Diagnostics;
|
||||
using System.Threading;
|
||||
using System.Windows.Forms;
|
||||
|
||||
|
@ -12,6 +13,7 @@ namespace LCS
|
|||
switch (e.Exception.Source)
|
||||
{
|
||||
case "System.Net.Http" when e.Exception.Message == $"Response status code does not indicate success: 498 ().":
|
||||
case "mscorlib" when e.Exception.InnerException.Message == $"Response status code does not indicate success: 498 ().":
|
||||
MessageBox.Show("Please login to LCS again. Your cookie is probably invalid or expired.");
|
||||
var mainForm = GetMainForm();
|
||||
mainForm.Cursor = Cursors.Default;
|
||||
|
@ -39,6 +41,11 @@ namespace LCS
|
|||
{
|
||||
Application.ThreadException += new ThreadExceptionEventHandler(Application_ThreadException);
|
||||
|
||||
if (Debugger.IsAttached)
|
||||
{
|
||||
Properties.Settings.Default.Reset();
|
||||
}
|
||||
|
||||
// Copy user settings from previous application version if necessary
|
||||
if (Properties.Settings.Default.update)
|
||||
{
|
||||
|
|
Загрузка…
Ссылка в новой задаче