private void SaveImage(Image img) { if (img == null) { return; } try { string savePath = GetCaptureSaveFilePath(CaptureSetting.SaveImageFormat); img.Save(savePath, CaptureSetting.GetImageFormat()); Clipboard.SetImage(img); ToastMessageForm.ShowMessage(savePath); } catch (Exception e) { Logger.Error(e); } }
public static void ShowMessage(string filePath) { if (!File.Exists(filePath)) { return; } try { var form = FormUtil.FindForm <ToastMessageForm>(); if (form != null) { form.Close(); } form = new ToastMessageForm(filePath); form.Show(); } catch (Exception e) { Console.WriteLine(e); } }