viper3400 / clipboard Goto Github PK
View Code? Open in Web Editor NEWThis project forked from mrcull/clipboard
Cannot find a perfect clipboard manager so I'm writing my own. This tool is written with .Net 4.5 and runs on Windows.
This project forked from mrcull/clipboard
Cannot find a perfect clipboard manager so I'm writing my own. This tool is written with .Net 4.5 and runs on Windows.
For me it's not really clear, how appereance of the items on the "frequent" list are calculated.
A ClipBoardRecord object has an PastedCount and a CopiedCount which is also persisted in the csv content list.
Functions should be refined, removed from MainForm and integrated into ClipBoardListController.
Therefore it should be clear, on which list an item appears. Should an item appear on just one list or should it appear more than one time. Example: Should an item, which appears on the save list also appear on the frequent list?
Path of content.csv is coded as: private static string contentFileName = "../../content.csv";
When starting with an empty list, or if removing all entries from list and while no entry has been saved yet an exception is thrown:
System.ArgumentOutOfRangeException: 'InvalidArgument=Value mit dem Wert 0 ist für index ungültig.'
This is because of accessing an array index in resizeForm (listView.Items[0].Bounds.Height).
Steps to reproduce:
At least since updating to Windows 10 V1803 ClipBoard.exe I sometimes get an exception on start up. Seems the problem is somehow related to the logon screen. Clipboard.exe tries to access systems clipboard function while they may not be ready.
Finally, there should be some exception handling around these functions.
Exception:
Der angeforderte Clipboard-Vorgang war nicht erfolgreich.
System.Windows.Forms.Clipboard.ThrowIfFailed(Int32 hr)
bei System.Windows.Forms.Clipboard.GetDataObject(Int32 retryTimes, Int32 retryDelay)
bei System.Windows.Forms.Clipboard.GetDataObject()
bei System.Windows.Forms.Clipboard.GetText(TextDataFormat format)
bei System.Windows.Forms.Clipboard.GetText()
bei ClipBoard.MainForm.handleClipboardChanged()
At the moment content.csv has to exist in order to run the program. In real life scenario I would not like to start with a lorem ipsum list.
Taken from the original repo: https://github.com/ralphite/ClipBoard/issues/6
MrCull commented on 28 Dec 2016
Paste fails in some applications
In some applications a “paste” triggered by ClipBoard Manager fails.
e.g.
in Notepadd++ a “NULL” is output.
in Outlook a new window is opened
Exception:
Informationen über das Aufrufen von JIT-Debuggen
anstelle dieses Dialogfelds finden Sie am Ende dieser Meldung.
************** Ausnahmetext **************
System.IO.IOException: Der Vorgang ist bei einer Datei mit einem geöffneten Bereich, der einem Benutzer zugeordnet ist, nicht anwendbar.
bei System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
bei System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost)
bei System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost)
bei System.IO.StreamWriter.CreateFile(String path, Boolean append, Boolean checkHost)
bei System.IO.StreamWriter..ctor(String path, Boolean append, Encoding encoding, Int32 bufferSize, Boolean checkHost)
bei System.IO.StreamWriter..ctor(String path, Boolean append, Encoding encoding)
bei System.IO.File.WriteAllLines(String path, String[] contents)
bei ClipBoard.CsvPersistenceController.SaveToFile(String FileName, List`1 SavedItems, List`1 RecentItems)
bei ClipBoard.MainForm.updateList()
bei ClipBoard.MainForm.handleClipboardChanged()
bei ClipBoard.MainForm.WndProc(Message& m)
bei System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
bei System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
bei System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
************** Geladene Assemblys **************
mscorlib
Assembly-Version: 4.0.0.0.
Win32-Version: 4.6.1648.0 built by: NETFXREL3STAGE.
CodeBase: file:///C:/Windows/Microsoft.NET/Framework/v4.0.30319/mscorlib.dll.
----------------------------------------
ClipBoard
Assembly-Version: 0.0.0.10.
Win32-Version: 0.0.0.10.
CodeBase: file:///C:/Users/jan.graefe/PortableApps/ClipBoard/ClipBoard.exe.
----------------------------------------
Dapplo.Log
Assembly-Version: 1.0.29.0.
Win32-Version: 1.0.29.0.
CodeBase: file:///C:/Users/jan.graefe/PortableApps/ClipBoard/Dapplo.Log.DLL.
----------------------------------------
System.Windows.Forms
Assembly-Version: 4.0.0.0.
Win32-Version: 4.6.1586.0 built by: NETFXREL2.
CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Windows.Forms/v4.0_4.0.0.0__b77a5c561934e089/System.Windows.Forms.dll.
----------------------------------------
System
Assembly-Version: 4.0.0.0.
Win32-Version: 4.6.1647.0 built by: NETFXREL3STAGE.
CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System/v4.0_4.0.0.0__b77a5c561934e089/System.dll.
----------------------------------------
System.Drawing
Assembly-Version: 4.0.0.0.
Win32-Version: 4.6.1586.0 built by: NETFXREL2.
CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Drawing/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll.
----------------------------------------
System.Core
Assembly-Version: 4.0.0.0.
Win32-Version: 4.6.1647.0 built by: NETFXREL3STAGE.
CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Core/v4.0_4.0.0.0__b77a5c561934e089/System.Core.dll.
----------------------------------------
FMUtils.KeyboardHook
Assembly-Version: 1.0.140.2145.
Win32-Version: 1.0.140.2145.
CodeBase: file:///C:/Users/jan.graefe/PortableApps/ClipBoard/FMUtils.KeyboardHook.DLL.
----------------------------------------
System.Configuration
Assembly-Version: 4.0.0.0.
Win32-Version: 4.6.1586.0 built by: NETFXREL2.
CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Configuration/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Configuration.dll.
----------------------------------------
System.Xml
Assembly-Version: 4.0.0.0.
Win32-Version: 4.6.1586.0 built by: NETFXREL2.
CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Xml/v4.0_4.0.0.0__b77a5c561934e089/System.Xml.dll.
----------------------------------------
NLog
Assembly-Version: 4.0.0.0.
Win32-Version: 4.4.5361.
CodeBase: file:///C:/Users/jan.graefe/PortableApps/ClipBoard/NLog.DLL.
----------------------------------------
System.ServiceModel
Assembly-Version: 4.0.0.0.
Win32-Version: 4.6.1637.0 built by: NETFXREL3STAGE.
CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.ServiceModel/v4.0_4.0.0.0__b77a5c561934e089/System.ServiceModel.dll.
----------------------------------------
System.Data
Assembly-Version: 4.0.0.0.
Win32-Version: 4.6.1636.0 built by: NETFXREL3STAGE.
CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_32/System.Data/v4.0_4.0.0.0__b77a5c561934e089/System.Data.dll.
----------------------------------------
System.Runtime.Serialization
Assembly-Version: 4.0.0.0.
Win32-Version: 4.6.1637.0 built by: NETFXREL3STAGE.
CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Runtime.Serialization/v4.0_4.0.0.0__b77a5c561934e089/System.Runtime.Serialization.dll.
----------------------------------------
System.Windows.Forms.resources
Assembly-Version: 4.0.0.0.
Win32-Version: 4.6.1586.0 built by: NETFXREL2.
CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Windows.Forms.resources/v4.0_4.0.0.0_de_b77a5c561934e089/System.Windows.Forms.resources.dll.
----------------------------------------
WindowsInput
Assembly-Version: 1.0.4.0.
Win32-Version: 1.0.4.0.
CodeBase: file:///C:/Users/jan.graefe/PortableApps/ClipBoard/WindowsInput.DLL.
----------------------------------------
mscorlib.resources
Assembly-Version: 4.0.0.0.
Win32-Version: 4.6.1586.0 built by: NETFXREL2.
CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/mscorlib.resources/v4.0_4.0.0.0_de_b77a5c561934e089/mscorlib.resources.dll.
----------------------------------------
************** JIT-Debuggen **************
Um das JIT-Debuggen (Just-In-Time) zu aktivieren, muss in der
Konfigurationsdatei der Anwendung oder des Computers
(machine.config) der jitDebugging-Wert im Abschnitt system.windows.forms festgelegt werden.
Die Anwendung muss mit aktiviertem Debuggen kompiliert werden.
Zum Beispiel:
<configuration>
<system.windows.forms jitDebugging="true" />
</configuration>
Wenn das JIT-Debuggen aktiviert ist, werden alle nicht behandelten
Ausnahmen an den JIT-Debugger gesendet, der auf dem
Computer registriert ist, und nicht in diesem Dialogfeld behandelt.
Today the HotKey is configurable but just in combination with modifier key CTRL. The modifier key should also be configurable.
After a while (or sometimes right after start) ClipBoard won't recognize a change in ClipBoard. Don't know when or how it happens, yet. Sometimes it seems to work without problems.
Still investigating this.
First I thought I messed something up when integration https://github.com/factormystic/FMUtils.KeyboardHook.
But after adding some more logging there is also the possibility that there is something wrong with the windows clipboard handling at all.
So, Windows Clipboard handling should done the "new" was as supposed by Microsoft:
https://msdn.microsoft.com/en-us/library/windows/desktop/ms649016.aspx#dataxchg_Monitoring_Clipboard_Contents
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.