MarcusW.VncClient icon indicating copy to clipboard operation
MarcusW.VncClient copied to clipboard

Added Wpf support (control and sample)

Open paviad opened this issue 3 years ago • 10 comments

I conformed to the Avalonia example as much as I could, but I gave up trying to learn ReactiveUI so I did not use it at all.

paviad avatar Dec 24 '21 18:12 paviad

I built this for .NET 6... the pipeline uses .NET 3.1. How do you want to proceed?

paviad avatar Dec 27 '21 04:12 paviad

Hey @paviad, I was looking for a wpf integration for MarcusWVnc and just found your pull request. It works like a charm to connect and interact with my vnc server but i have one problem with it: When i try to disconnect the client by using the CloseAsync method of the RfbConnection, it won't disconnect and just give me an OperationCanceledException. Did you test this case in your integration? You have any idea what could be the issue?

Wildimp avatar Nov 19 '23 22:11 Wildimp

I honestly do not remember, last I touched this project was end of 2021, and I haven't used it since. I'll see if I can find the time to have a look.

paviad avatar Dec 03 '23 08:12 paviad

Thanks for taking your time to answer me. In the meantime i found out that the problem was on my side. I mishandled the cancelation token. Your implementation works just as intented. Thanks again for providing a wpf implementation.,

Wildimp avatar Dec 04 '23 11:12 Wildimp

I've incorporated #26 into my fork at #12 (https://github.com/paviad/MarcusW.VncClient)

paviad avatar Jul 26 '24 15:07 paviad

I added an in memory client using the Skia library (Windows)

paviad avatar Jul 28 '24 20:07 paviad

Incorporated PR #28 into this one

paviad avatar Jul 29 '24 15:07 paviad

Some comments from my end about the sample:

  • Autoresize doesn't work. It seems that you are setting it based on the ActualHeight and ActualWidth which is incorrect due to being in a ScrollViewer. The ScrollViewer width and height likely changes AFTER the event is called so you are sending the incorrect ActualWidth and ActualHeight, so no resize actually happens on the server-side.
  • ErrorMessage is not displayed unless the connection succeeds
  • No input for the Password field?

frogcrush avatar Jul 30 '24 21:07 frogcrush

Some comments from my end about the sample:

  • Autoresize doesn't work. It seems that you are setting it based on the ActualHeight and ActualWidth which is incorrect due to being in a ScrollViewer. The ScrollViewer width and height likely changes AFTER the event is called so you are sending the incorrect ActualWidth and ActualHeight, so no resize actually happens on the server-side.
  • ErrorMessage is not displayed unless the connection succeeds
  • No input for the Password field?

Fixed last two issues (error message and interactive password)

Regarding auto size, I couldn't reproduce the problem you mention, even though I am using ActualWidth and ActualHeight, when I actually tested it it worked fine with or without scroll bars on the view, see this video:

autosize

paviad avatar Jul 31 '24 07:07 paviad

Incorporated PR #29 into this one (for Avalonia and Wpf)

paviad avatar Aug 07 '24 16:08 paviad