повторная аутентификация
This commit is contained in:
parent
ba47e48eeb
commit
ed1f4cf07e
@ -37,6 +37,7 @@ namespace DepartmentPortalDesctop
|
|||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
|
DialogResult = DialogResult.Cancel;
|
||||||
ErrorMessanger.PrintErrorMessage("При аутентфикации возникла ошибка: ", new List<KeyValuePair<string, string>> { new KeyValuePair<string, string>("Аутентфикация", ex.Message) });
|
ErrorMessanger.PrintErrorMessage("При аутентфикации возникла ошибка: ", new List<KeyValuePair<string, string>> { new KeyValuePair<string, string>("Аутентфикация", ex.Message) });
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -24,11 +24,23 @@ namespace DepartmentPortalDesctop
|
|||||||
Application.EnableVisualStyles();
|
Application.EnableVisualStyles();
|
||||||
Application.SetCompatibleTextRenderingDefault(false);
|
Application.SetCompatibleTextRenderingDefault(false);
|
||||||
|
|
||||||
var form = new FormEnter();
|
int counter = 3;
|
||||||
|
while (counter > 0)
|
||||||
if (form.ShowDialog() == DialogResult.OK && securityManager.IsAuth)
|
|
||||||
{
|
{
|
||||||
Application.Run(new FormMain());
|
var form = new FormEnter();
|
||||||
|
if (form.ShowDialog() == DialogResult.OK)
|
||||||
|
{
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
counter--;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (counter > 0)
|
||||||
|
{
|
||||||
|
if (securityManager.IsAuth)
|
||||||
|
{
|
||||||
|
Application.Run(new FormMain());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user