async void ThreadMethod() { infoAcc = new InfoGridAutopost((await api.GetCurrentUserAsync()).Value.UserName, "История", post.FileNamePhoto, post.Time.ToString(), "Ожидает публикации", post.Number); EventUpdateGrid(this, new UpdateGridAutopost(infoAcc)); while (delete == false) { if (DateTime.Now > post.Time || forcedStart) { Posting(); break;; } Thread.Sleep(1000 * 60); } }
public UpdateGridAutopost(InfoGridAutopost info) { this.info = info; }