Login method selection is saved in local settings.

This commit is contained in:
Milan Hanajik
2016-12-21 14:54:38 +01:00
parent 2fcdfabd3c
commit 070f435a23
2 changed files with 9 additions and 1 deletions
+5
View File
@@ -32,6 +32,11 @@ namespace TBF
[XmlIgnore] [XmlIgnore]
public int BenchesCount { get { return (TestBenches != null) ? TestBenches.GetLength(0) : 0; } } public int BenchesCount { get { return (TestBenches != null) ? TestBenches.GetLength(0) : 0; } }
/// <summary>
/// Login method: UserName, FullName or Number
/// </summary>
public Config.Entities.LoginMethod LoginMethod;
/// <summary> /// <summary>
/// Currently selected bench name (local or remote) or null (= no selection done). /// Currently selected bench name (local or remote) or null (= no selection done).
/// </summary> /// </summary>
+4 -1
View File
@@ -189,7 +189,8 @@ namespace TBF
{ {
loginDlgBench = new LoginDlgWithBenchSelection(); loginDlgBench = new LoginDlgWithBenchSelection();
} }
DialogResult dr = loginDlgBench.ShowDialog(); loginDlgBench.Method = LocalSettings.LoginMethod;
DialogResult dr = loginDlgBench.ShowDialog();
if (dr == DialogResult.Cancel) if (dr == DialogResult.Cancel)
{ {
@@ -279,6 +280,8 @@ namespace TBF
if (authorized) if (authorized)
{ {
LocalSettings.LoginMethod = loginDlgBench.Method; /// Save the login method actually used
if (LocalSettings.TestBenches[i].IsRealBench) if (LocalSettings.TestBenches[i].IsRealBench)
{ {
/// This is a real bench ==> check if another instance is running /// This is a real bench ==> check if another instance is running