public static void ResetOAuth() { FUserLogic l = new FUserLogic(); var v = l.GetFirst(); if (v != null) { OAuthAccessToken = v.OAuthAccessToken; OAuthAccessTokenSecret = v.OAuthAccessTokenSecret; Flickr flickr = new Flickr(); User = flickr.TestLogin(); if (User == null || string.IsNullOrEmpty(User.UserName)) { OAuthAccessToken = ""; OAuthAccessTokenSecret = ""; } else { SetLogic setL = new SetLogic(); setL.DownloadPhotsets(); FFolderLogic.Scan(); } } }
private void dataGridView1_CellContentClick(object sender, DataGridViewCellEventArgs e) { var g = sender as DataGridView; var name = g.Columns[e.ColumnIndex].DataPropertyName; if (name == "IsDownload") { var idCell = g.Rows[e.RowIndex].Cells[0]; var id = (string)idCell.Value; var isDownload = (bool)g.Rows[e.RowIndex].Cells[e.ColumnIndex].EditedFormattedValue; SetLogic l = new SetLogic(); l.UpdateIsDownload(id, isDownload); } }