private void MainForm_Load(object sender, EventArgs e) { var MyIni = new IniFile("Settings.ini"); MyIni.Write("CNPJ", "88888888888888", "USUARIO"); MyIni.Write("NOME", "Teste", "USUARIO"); MyIni.Write("PASTABKP", "C:/temp", "CONFIG"); MyIni.Write("NOMEARQUIVOBKP", "BKP", "CONFIG"); MyIni.Write("CLIID", "233d9409-2bc0-404a-8f1e-c122a81615dc", "CONFIG"); MyIni.Write("SECRET", "3tqjw~T_eb5VDft82NC9LV6ME~v9.k~cIj", "CONFIG"); MyIni.Write("URLREDIRECT", "https://apps.zomers.eu", "CONFIG"); OneDriveTypeCombo.SelectedIndex = OneDriveTypeCombo.Items.Count - 1; var teste = GetAuthCode(); AccessTokenTextBox.Text = teste.Result; // Create a new instance of the OneDriveApi framework InitiateOneDriveApi(); // First sign the current user out to make sure he/she needs to authenticate again var signoutUri = OneDriveApi.GetSignOutUri(); AuthenticationBrowser.Navigate(signoutUri); }
private void Step1Button_Click(object sender, EventArgs e) { // Create a new instance of the OneDriveApi framework OneDriveApi = new OneDriveApi(ClientId, ClientSecret); // First sign the current user out to make sure he/she needs to authenticate again var signoutUri = OneDriveApi.GetSignOutUri(); AuthenticationBrowser.Navigate(signoutUri); }
/// <summary> /// Starts the process to interactively authenticate a user and get an Access and Refresh token /// </summary> private void Step1Button_Click(object sender, EventArgs e) { // Reset any possible access tokens we may already have AccessTokenTextBox.Text = string.Empty; // Create a new instance of the OneDriveApi framework InitiateOneDriveApi(); // First sign the current user out to make sure he/she needs to authenticate again var signoutUri = OneDriveApi.GetSignOutUri(); AuthenticationBrowser.Navigate(signoutUri); }
private void Form1_Load(object sender, EventArgs e) { OneDriveTypeCombo.SelectedIndex = OneDriveTypeCombo.Items.Count - 1; var teste = GetAuthCode(); AccessTokenTextBox.Text = teste.Result; InitiateOneDriveApi(); // First sign the current user out to make sure he/she needs to authenticate again var signoutUri = OneDriveApi.GetSignOutUri(); AuthenticationBrowser.Navigate(signoutUri); }