void work_image(Bitmap bmp, Boolean edit = false) { Global_Func.play_sound("capture.wav"); if (edit) { bmp = edit_screenshot(bmp); } if (bmp == null) { return; } if (Settings.upload_method == "imgur") { if (!Imgur.upload(bmp)) { Global_Func.play_sound("error.wav"); if (Settings.balloon_messages) { balloon_tip("Error uploading file!", "Error", 2000, ToolTipIcon.Error); } } } save_screenshot(bmp); }
void DeleteToolStripMenuItemClick(object sender, EventArgs e) { if (list_image_links.SelectedItems.Count <= 0) { return; } if (Imgur.delete(list_image_links.SelectedItems[0].SubItems[1].Text)) { list_image_links.SelectedItems[0].Remove(); } else { Global_Func.play_sound("error.wav"); if (Settings.balloon_messages) { balloon_tip("Could not delete file!", "Error", 2000, ToolTipIcon.Error); } } }