private void добавитьToolStripMenuItem_Click(object sender, EventArgs e) { CreateUpdate createUpdate = new CreateUpdate(); createUpdate.Text = "Добавление записи на стену"; createUpdate.confirmationBtn.Text = "Добавить"; createUpdate.ShowDialog(); }
static async public void Create(CreateUpdate sender) { long x = await api.Wall.PostAsync(new VkNet.Model.RequestParams.WallPostParams { Message = sender.richTextBox1.Text, OwnerId = -186834007 }); WallDisplay(); sender.Dispose(); }
private void редактироватьToolStripMenuItem_Click(object sender, EventArgs e) { CreateUpdate createUpdate = new CreateUpdate(); createUpdate.Text = "Редактирование записи"; createUpdate.confirmationBtn.Text = "Подтвердить"; createUpdate.richTextBox1.Text = listView1.SelectedItems[0].SubItems[1].Text; createUpdate.ShowDialog(); }
static async public void Update(CreateUpdate sender) { try { bool x = await api.Wall.EditAsync(new VkNet.Model.RequestParams.WallEditParams { PostId = Int64.Parse(Mform.listView1.SelectedItems[0].Tag.ToString()), Message = sender.richTextBox1.Text, OwnerId = -186834007 }); } catch { } WallDisplay(); sender.Dispose(); }