public static void StopMonitorMode() { ClipboardMonitor.OnClipboardChange -= ClipboardMonitor_OnClipboardChange; ClipboardMonitor.Stop(); PathGenerator.ClearMonitorTempFolder(); }
private static void AppendFileToClipboard(string filePath) { DataObject newDataObject = ClipboardData.CloneDataObject(monitorModeData.Storage); newDataObject.SetData(DataFormats.FileDrop, true, new string[] { filePath }); ClipboardMonitor.Stop(); Clipboard.SetDataObject(newDataObject, true); ClipboardMonitor.Start(); }
public static void StartMonitorMode() { // Create temp folder if it does not exist, and clear it PathGenerator.InitMonitorTempFolder(); PathGenerator.ClearMonitorTempFolder(); monitorModeData = new ClipboardData(); // start monitor ClipboardMonitor.OnClipboardChange += ClipboardMonitor_OnClipboardChange; ClipboardMonitor.Start(); }