public frmMain() { InitializeComponent(); // init config helper config = new ConfigHelper(); config.clientId = Properties.Settings.Default.ClientId; config.graphEndpoint = Properties.Settings.Default.GraphEndpoint; config.redirectUri = Properties.Settings.Default.RedirectUri; // init config values redirectUri = new Uri(config.redirectUri); authority = String.Format(CultureInfo.InvariantCulture, config.aadInstance, "common"); clientId = config.clientId; graphApiEndpoint = config.graphEndpoint; // create log and token cache objects applogger = new ClassLogger("restfuloutlook-app.log"); sdklogger = new ClassLogger("restfuloutlook-graphsdk.log"); user = new LoggedOnUserHelper(); fc = new FileCache(Environment.CurrentDirectory); // init button state btnMailAPI.Enabled = false; btnGraphAPI.Enabled = false; btnContactsAPI.Enabled = false; btnCalendarAPI.Enabled = false; btnReportingService.Enabled = false; btnUserPhotoAPI.Enabled = false; }
public UserInfoForm(LoggedOnUserHelper user) { InitializeComponent(); lstResults.Items.Add("User Id: = " + user.DisplayableId); lstResults.Items.Add("Given Name: = " + user.GivenName); lstResults.Items.Add("Family Name: = " + user.FamilyName); lstResults.Items.Add("Access Token = " + user.AccessToken); lstResults.Items.Add("Access Token Type = " + user.AccessTokenType); lstResults.Items.Add("Access Token Expires = " + user.ExpiresOn.ToString()); lstResults.Items.Add("Id Token = " + user.IdToken); }
public frmMain() { InitializeComponent(); // disable all buttons until user logs in btnMailAPI.Enabled = false; btnGraphAPI.Enabled = false; btnContactsAPI.Enabled = false; btnCalendarAPI.Enabled = false; btnDiscoveryServices.Enabled = false; btnReportingService.Enabled = false; // these buttons aren't hooked up yet btnUsers.Enabled = false; // create the user info object user = new LoggedOnUserHelper(); }