using System;
using System.Windows.Forms;
public static class ClipboardFusionHelper
{
public static string ProcessText(string text)
{
string userprofilepath, path, name, filename, time;
userprofilepath = Environment.GetEnvironmentVariable("userprofile");
// Update the path below to the folder where you would like the images saved (i.e. path = "C:\\Images\\"; or path = userprofilepath + "\\Pictures\\";))
path = userprofilepath + "\\Desktop\\";
name = "ClipboardFusion Saved Picture";
if (Clipboard.ContainsImage())
{
time = DateTime.Now.ToString("(yyyy.MM.dd HH.mm.ss)");
filename = path + name + " " + time + ".png";
MessageBox.Show("Saving picture to " + filename, "ClipboardFusion",
MessageBoxButtons.OK, MessageBoxIcon.Information);
Clipboard.GetImage().Save (@filename,
System.Drawing.Imaging.ImageFormat.Png);
}
else
MessageBox.Show ("The clipboard does not contain a picture.",
"ClipboardFusion", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
return text;
}
}