Code Monkey home page Code Monkey logo

clipboard's People

Contributors

mrcull avatar ralphite avatar viper3400 avatar

Watchers

 avatar

clipboard's Issues

Unlcear MostCopied And MostPasted Counts

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.

  • CopiedCount has to be incremented when a string is copied.
  • PastedCount has to be incrementend when a string is pasted.

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?

ArgumentOutOfRangeException in resizeForm if list is empty

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:

  • Make sure, to start with an empty list (delete %APPDATA%\ClipBoard\content.csv)
  • Make sure, Windows clipboard is empty by restarting your machine of simply clean clipboard on a command line with command "echo off | clip" (tested on Windows 10 Version 1607)
  • Start ClipBoard.exe

RunOnStartUp: AppCrash - Windows 10 (V1803)

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()

Form Won't Resize When Beeing Restored From Windows Tray

Steps to reproduce:

  • Open Clipboard and paste something into another application.
  • Clipboard will paste the text and minimize itself to windows tray.
  • Now go to Windows tray and click on the Clipboard tray icon
  • Form will be restored, but not resized

grafik

(Windows 10, 1607)

Start with no content.csv at all

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.

System.IO.IOException when writing CSV File

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.

Recognition of Windows Clipboard Changes Seems To Stop Working After A While

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

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.