Keep Sign in/out visible after click
This commit is contained in:
parent
e2090115f8
commit
79415949c2
3 changed files with 11 additions and 15 deletions
|
|
@ -196,26 +196,14 @@ namespace MatterHackers.MatterControl
|
||||||
signInButton.Margin = new BorderDouble(left: 0);
|
signInButton.Margin = new BorderDouble(left: 0);
|
||||||
signInButton.VAnchor = VAnchor.ParentCenter;
|
signInButton.VAnchor = VAnchor.ParentCenter;
|
||||||
signInButton.Visible = !signedIn;
|
signInButton.Visible = !signedIn;
|
||||||
signInButton.Click += (s, e) => UiThread.RunOnIdle(() =>
|
signInButton.Click += (s, e) => UiThread.RunOnIdle(ApplicationController.Instance.StartSignIn);
|
||||||
{
|
|
||||||
signInButton.Visible = false;
|
|
||||||
signOutButton.Visible = false;
|
|
||||||
statusMessage.Visible = true;
|
|
||||||
ApplicationController.Instance.StartSignIn();
|
|
||||||
});
|
|
||||||
buttonContainer.AddChild(signInButton);
|
buttonContainer.AddChild(signInButton);
|
||||||
|
|
||||||
signOutButton = textImageButtonFactory.Generate("Sign Out".Localize());
|
signOutButton = textImageButtonFactory.Generate("Sign Out".Localize());
|
||||||
signOutButton.Margin = new BorderDouble(left: 0);
|
signOutButton.Margin = new BorderDouble(left: 0);
|
||||||
signOutButton.VAnchor = VAnchor.ParentCenter;
|
signOutButton.VAnchor = VAnchor.ParentCenter;
|
||||||
signOutButton.Visible = signedIn;
|
signOutButton.Visible = signedIn;
|
||||||
signOutButton.Click += (s, e) => UiThread.RunOnIdle(() =>
|
signOutButton.Click += (s, e) => UiThread.RunOnIdle(ApplicationController.Instance.StartSignOut);
|
||||||
{
|
|
||||||
signInButton.Visible = false;
|
|
||||||
signOutButton.Visible = false;
|
|
||||||
statusMessage.Visible = true;
|
|
||||||
ApplicationController.Instance.StartSignOut();
|
|
||||||
});
|
|
||||||
buttonContainer.AddChild(signOutButton);
|
buttonContainer.AddChild(signOutButton);
|
||||||
|
|
||||||
buttonContainer.AddChild(new HorizontalSpacer());
|
buttonContainer.AddChild(new HorizontalSpacer());
|
||||||
|
|
|
||||||
|
|
@ -39,6 +39,10 @@ namespace MatterHackers.MatterControl
|
||||||
{
|
{
|
||||||
public string LastResponse { protected set; get; }
|
public string LastResponse { protected set; get; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets or sets the time-out value in milliseconds
|
||||||
|
/// </summary>
|
||||||
|
/// <value>The timeout.</value>
|
||||||
public int Timeout { get; internal set; } = 100000;
|
public int Timeout { get; internal set; } = 100000;
|
||||||
|
|
||||||
private CookieContainer cookies = new CookieContainer();
|
private CookieContainer cookies = new CookieContainer();
|
||||||
|
|
|
||||||
|
|
@ -201,8 +201,12 @@ namespace MatterHackers.MatterControl.VersionManagement
|
||||||
requestValues = new Dictionary<string, string>();
|
requestValues = new Dictionary<string, string>();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets or sets the time-out value in milliseconds
|
||||||
|
/// </summary>
|
||||||
|
/// <value>The timeout.</value>
|
||||||
public int Timeout { get; set; } = 100000;
|
public int Timeout { get; set; } = 100000;
|
||||||
|
|
||||||
public event EventHandler RequestComplete;
|
public event EventHandler RequestComplete;
|
||||||
|
|
||||||
public event EventHandler<ResponseErrorEventArgs> RequestFailed;
|
public event EventHandler<ResponseErrorEventArgs> RequestFailed;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue