Revise ClientToken use for multi-instanced MatterControl

- Add public const EnvironmentName for Services environment
- Remove GetSessionUsername method
- Remove ClearCachedCredentials
- Pull in AuthData type
- Add system to store and use ClientTokens
- Add using statements for common namespaces
This commit is contained in:
John Lewin 2016-09-28 11:20:54 -07:00
parent ecaf146d77
commit 87316dadff
7 changed files with 303 additions and 54 deletions

View file

@ -115,7 +115,7 @@ namespace MatterHackers.MatterControl.SlicerConfiguration
MenuItem settingsHistory = sliceOptionsMenuDropList.AddItem("Settings History".Localize());
settingsHistory.Selected += (s, e) => { WizardWindow.Show<PrinterProfileHistoryPage>("PrinterProfileHistory", "Settings History"); };
settingsHistory.Enabled = ApplicationController.Instance.GetSessionUsername() != null;
settingsHistory.Enabled = !string.IsNullOrEmpty(AuthenticationData.Instance.ActiveSessionUsername);
sliceOptionsMenuDropList.AddItem("Reset to defaults".Localize()).Selected += (s, e) => { UiThread.RunOnIdle(ResetToDefaults); };