public void startExecuteUpdateTask(ChatTask task) { if (ch.debug) { Task.Factory.StartNew(() => { Thread.Sleep(500); Render.DoAction(() => { ch.Title = "123123"; }); }); return; } Task.Factory.StartNew(() => { List <string[]> messages = ChatCoreHelper.GetMessagesFromUser(task.vkId); Task.Factory.StartNew(() => { Render.DoAction(() => { PersonChat pchat = ch.getPersonChat(task.personChatId); pchat.updateMessage(messages); }); }); }); }
public void addUpdateTask(string personChatId, int dsek) { PersonChat pchat = ch.getPersonChat(personChatId); long vkId = pchat.personId; ChatTask t = new ChatTask(); t.type = Chat.Core.TaskEnum.UPDATE; t.message = "UPDATE"; t.vkId = vkId; t.timeExpared = setTime(dsek); t.personChatId = personChatId; t.isStopped = false; t.personName = ch.CurrentUser.Value; ch.tasks.Add(t); ch.updateTaskList(); }