diff --git a/benchmarks/Benchmarks/ImmutableDictionaryLookup.cs b/benchmarks/Benchmarks/ImmutableDictionaryLookup.cs index e36674ba..8015f918 100644 --- a/benchmarks/Benchmarks/ImmutableDictionaryLookup.cs +++ b/benchmarks/Benchmarks/ImmutableDictionaryLookup.cs @@ -1,5 +1,4 @@ -using System; -using System.Collections.Immutable; +using System.Collections.Immutable; using System.Linq; using BenchmarkDotNet.Attributes; diff --git a/benchmarks/Benchmarks/MemoryCopy.cs b/benchmarks/Benchmarks/MemoryCopy.cs index c5acb586..ad154a3a 100644 --- a/benchmarks/Benchmarks/MemoryCopy.cs +++ b/benchmarks/Benchmarks/MemoryCopy.cs @@ -1,5 +1,4 @@ using System; -using System.Diagnostics; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; using BenchmarkDotNet.Attributes; diff --git a/samples/AvaloniaVncClient/Services/ConnectionManager.cs b/samples/AvaloniaVncClient/Services/ConnectionManager.cs index ad5f4e38..7948a93b 100644 --- a/samples/AvaloniaVncClient/Services/ConnectionManager.cs +++ b/samples/AvaloniaVncClient/Services/ConnectionManager.cs @@ -3,7 +3,6 @@ using System.Threading.Tasks; using MarcusW.VncClient; using MarcusW.VncClient.Avalonia.Adapters.Logging; -using MarcusW.VncClient.Rendering; using Microsoft.Extensions.Logging; using Splat; diff --git a/samples/AvaloniaVncClient/Views/Dialogs/EnterPasswordDialog.xaml.cs b/samples/AvaloniaVncClient/Views/Dialogs/EnterPasswordDialog.xaml.cs index 7974948b..26dc4cd1 100644 --- a/samples/AvaloniaVncClient/Views/Dialogs/EnterPasswordDialog.xaml.cs +++ b/samples/AvaloniaVncClient/Views/Dialogs/EnterPasswordDialog.xaml.cs @@ -1,4 +1,3 @@ -using Avalonia; using Avalonia.Controls; using Avalonia.Interactivity; using Avalonia.Markup.Xaml; diff --git a/samples/AvaloniaVncClient/Views/MainWindow.xaml.cs b/samples/AvaloniaVncClient/Views/MainWindow.xaml.cs index 24c90515..13b233b4 100644 --- a/samples/AvaloniaVncClient/Views/MainWindow.xaml.cs +++ b/samples/AvaloniaVncClient/Views/MainWindow.xaml.cs @@ -1,6 +1,5 @@ using System.Reactive.Disposables; using System.Reactive.Linq; -using Avalonia; using Avalonia.Controls; using Avalonia.Input; using Avalonia.Interactivity; @@ -54,13 +53,13 @@ private void InitializeComponent() private void OnEnableFullscreenButtonClicked(object? sender, RoutedEventArgs e) => SetFullscreenMode(true); - private void SetFullscreenMode(bool fullscreen) - { - WindowState = fullscreen ? WindowState.FullScreen : WindowState.Normal; + private void SetFullscreenMode(bool fullscreen) + { + WindowState = fullscreen ? WindowState.FullScreen : WindowState.Normal; - TopDockPanel.IsVisible = !fullscreen; - BottomDockPanel.IsVisible = !fullscreen; - RightDockPanel.IsVisible = !fullscreen; - } + TopDockPanel.IsVisible = !fullscreen; + BottomDockPanel.IsVisible = !fullscreen; + RightDockPanel.IsVisible = !fullscreen; + } } } diff --git a/src/MarcusW.VncClient.Avalonia/Conversions.cs b/src/MarcusW.VncClient.Avalonia/Conversions.cs index 91ecb107..c3e7c611 100644 --- a/src/MarcusW.VncClient.Avalonia/Conversions.cs +++ b/src/MarcusW.VncClient.Avalonia/Conversions.cs @@ -1,5 +1,4 @@ using System; -using System.ComponentModel; using Avalonia; namespace MarcusW.VncClient.Avalonia diff --git a/src/MarcusW.VncClient.Avalonia/RfbRenderTarget.cs b/src/MarcusW.VncClient.Avalonia/RfbRenderTarget.cs index 05102e61..0f6bb7b7 100644 --- a/src/MarcusW.VncClient.Avalonia/RfbRenderTarget.cs +++ b/src/MarcusW.VncClient.Avalonia/RfbRenderTarget.cs @@ -6,11 +6,9 @@ using Avalonia.Media.Imaging; using Avalonia.Platform; using Avalonia.Threading; -using MarcusW.VncClient.Avalonia.Adapters; using MarcusW.VncClient.Avalonia.Adapters.Rendering; using MarcusW.VncClient.Rendering; using IRenderTarget = MarcusW.VncClient.Rendering.IRenderTarget; -using PixelFormat = Avalonia.Platform.PixelFormat; namespace MarcusW.VncClient.Avalonia { diff --git a/src/MarcusW.VncClient.Avalonia/VncView.KeyInput.cs b/src/MarcusW.VncClient.Avalonia/VncView.KeyInput.cs index c5e4d33b..29ca22f7 100644 --- a/src/MarcusW.VncClient.Avalonia/VncView.KeyInput.cs +++ b/src/MarcusW.VncClient.Avalonia/VncView.KeyInput.cs @@ -13,7 +13,7 @@ public partial class VncView protected override void OnTextInput(TextInputEventArgs e) { base.OnTextInput(e); - if (e.Handled) + if (ViewOnly || e.Handled) return; // Get connection @@ -39,7 +39,7 @@ protected override void OnTextInput(TextInputEventArgs e) protected override void OnKeyDown(KeyEventArgs e) { base.OnKeyDown(e); - if (e.Handled || e.Key == Key.None) + if (ViewOnly || e.Handled || e.Key == Key.None) return; // Send key press @@ -53,7 +53,7 @@ protected override void OnKeyDown(KeyEventArgs e) protected override void OnKeyUp(KeyEventArgs e) { base.OnKeyUp(e); - if (e.Handled || e.Key == Key.None) + if (ViewOnly|| e.Handled || e.Key == Key.None) return; // Send key release @@ -69,6 +69,9 @@ protected override void OnKeyUp(KeyEventArgs e) protected override void OnLostFocus(RoutedEventArgs e) { base.OnLostFocus(e); + if (ViewOnly) + return; + ResetKeyPresses(); } diff --git a/src/MarcusW.VncClient.Avalonia/VncView.MouseInput.cs b/src/MarcusW.VncClient.Avalonia/VncView.MouseInput.cs index e7a4d177..b3b10503 100644 --- a/src/MarcusW.VncClient.Avalonia/VncView.MouseInput.cs +++ b/src/MarcusW.VncClient.Avalonia/VncView.MouseInput.cs @@ -10,7 +10,7 @@ public partial class VncView protected override void OnPointerMoved(PointerEventArgs e) { base.OnPointerMoved(e); - if (e.Handled) + if (ViewOnly || e.Handled) return; PointerPoint point = e.GetCurrentPoint(this); @@ -22,7 +22,7 @@ protected override void OnPointerMoved(PointerEventArgs e) protected override void OnPointerPressed(PointerPressedEventArgs e) { base.OnPointerPressed(e); - if (e.Handled) + if (ViewOnly || e.Handled) return; PointerPoint point = e.GetCurrentPoint(this); @@ -34,7 +34,7 @@ protected override void OnPointerPressed(PointerPressedEventArgs e) protected override void OnPointerReleased(PointerReleasedEventArgs e) { base.OnPointerReleased(e); - if (e.Handled) + if (ViewOnly || e.Handled) return; PointerPoint point = e.GetCurrentPoint(this); @@ -46,7 +46,7 @@ protected override void OnPointerReleased(PointerReleasedEventArgs e) protected override void OnPointerWheelChanged(PointerWheelEventArgs e) { base.OnPointerWheelChanged(e); - if (e.Handled) + if (ViewOnly || e.Handled) return; PointerPoint point = e.GetCurrentPoint(this); diff --git a/src/MarcusW.VncClient.Avalonia/VncView.Sizing.cs b/src/MarcusW.VncClient.Avalonia/VncView.Sizing.cs index 2773e48b..8f580593 100644 --- a/src/MarcusW.VncClient.Avalonia/VncView.Sizing.cs +++ b/src/MarcusW.VncClient.Avalonia/VncView.Sizing.cs @@ -4,7 +4,6 @@ using System.Linq; using System.Reactive.Disposables; using System.Reactive.Linq; -using System.Reactive.Subjects; using Avalonia; using Avalonia.Controls; using MarcusW.VncClient.Protocol.Implementation.MessageTypes.Outgoing; diff --git a/src/MarcusW.VncClient.Avalonia/VncView.cs b/src/MarcusW.VncClient.Avalonia/VncView.cs index 857ea7b6..0a8b44b0 100644 --- a/src/MarcusW.VncClient.Avalonia/VncView.cs +++ b/src/MarcusW.VncClient.Avalonia/VncView.cs @@ -1,10 +1,8 @@ using System; using System.Reactive.Disposables; using Avalonia; -using Avalonia.Input; using Avalonia.Threading; using MarcusW.VncClient.Output; -using MarcusW.VncClient.Protocol.Implementation.MessageTypes.Outgoing; namespace MarcusW.VncClient.Avalonia { @@ -16,10 +14,15 @@ public partial class VncView : RfbRenderTarget, IOutputHandler /// /// Defines the property. /// - public static readonly DirectProperty ConnectionProperty = - AvaloniaProperty.RegisterDirect(nameof(Connection), o => o.Connection, (o, v) => o.Connection = v); + public static readonly DirectProperty ConnectionProperty = AvaloniaProperty.RegisterDirect(nameof(Connection), o => o.Connection, (o, v) => o.Connection = v); + + /// + /// Defines the property. + /// + public static readonly DirectProperty ViewOnlyProperty = AvaloniaProperty.RegisterDirect(nameof(ViewOnly), o => o.ViewOnly, (o, v) => o.ViewOnly = v); private RfbConnection? _connection; + private bool _viewOnly; // Disposable for cleaning up after connection detaches private CompositeDisposable _connectionDetachDisposable = new CompositeDisposable(); @@ -76,6 +79,20 @@ public RfbConnection? Connection } } + /// + /// Gets or sets the view only mode + /// + public bool ViewOnly + { + get => _viewOnly; + set + { + _viewOnly = value; + if (_viewOnly) + ResetKeyPresses(); + } + } + public VncView() { InitSizing(); @@ -91,6 +108,9 @@ public virtual void RingBell() /// public virtual void HandleServerClipboardUpdate(string text) { + if (ViewOnly) + return; + Dispatcher.UIThread.Post(async () => { // Copy the text to the local clipboard await Clipboard.Get().SetTextAsync(text).ConfigureAwait(true); diff --git a/src/MarcusW.VncClient/ConnectParameters.cs b/src/MarcusW.VncClient/ConnectParameters.cs index 1a492e51..05801a5b 100644 --- a/src/MarcusW.VncClient/ConnectParameters.cs +++ b/src/MarcusW.VncClient/ConnectParameters.cs @@ -1,6 +1,5 @@ using System; using System.Collections.Generic; -using System.Net; using MarcusW.VncClient.Output; using MarcusW.VncClient.Rendering; using MarcusW.VncClient.Security; diff --git a/src/MarcusW.VncClient/PixelFormat.cs b/src/MarcusW.VncClient/PixelFormat.cs index f732f0f2..4d2df8ac 100644 --- a/src/MarcusW.VncClient/PixelFormat.cs +++ b/src/MarcusW.VncClient/PixelFormat.cs @@ -1,9 +1,5 @@ using System; -using System.Buffers.Binary; -using System.Diagnostics.CodeAnalysis; using System.Runtime.CompilerServices; -using MarcusW.VncClient.Protocol; -using MarcusW.VncClient.Rendering; namespace MarcusW.VncClient { diff --git a/src/MarcusW.VncClient/Protocol/Implementation/EncodingTypes/Frame/FrameEncodingType.cs b/src/MarcusW.VncClient/Protocol/Implementation/EncodingTypes/Frame/FrameEncodingType.cs index 1ac6d794..58755125 100644 --- a/src/MarcusW.VncClient/Protocol/Implementation/EncodingTypes/Frame/FrameEncodingType.cs +++ b/src/MarcusW.VncClient/Protocol/Implementation/EncodingTypes/Frame/FrameEncodingType.cs @@ -1,4 +1,3 @@ -using System.Buffers.Binary; using System.IO; using MarcusW.VncClient.Protocol.EncodingTypes; using MarcusW.VncClient.Rendering; diff --git a/src/MarcusW.VncClient/Protocol/Implementation/EncodingTypes/Frame/RawEncodingType.cs b/src/MarcusW.VncClient/Protocol/Implementation/EncodingTypes/Frame/RawEncodingType.cs index 07e53375..e57691bb 100644 --- a/src/MarcusW.VncClient/Protocol/Implementation/EncodingTypes/Frame/RawEncodingType.cs +++ b/src/MarcusW.VncClient/Protocol/Implementation/EncodingTypes/Frame/RawEncodingType.cs @@ -2,7 +2,6 @@ using System.Diagnostics; using System.IO; using System.Runtime.CompilerServices; -using System.Threading; using MarcusW.VncClient.Protocol.EncodingTypes; using MarcusW.VncClient.Rendering; diff --git a/src/MarcusW.VncClient/Protocol/Implementation/EncodingTypes/Frame/ZLibEncodingType.cs b/src/MarcusW.VncClient/Protocol/Implementation/EncodingTypes/Frame/ZLibEncodingType.cs index 8ff2e1c5..69a84769 100644 --- a/src/MarcusW.VncClient/Protocol/Implementation/EncodingTypes/Frame/ZLibEncodingType.cs +++ b/src/MarcusW.VncClient/Protocol/Implementation/EncodingTypes/Frame/ZLibEncodingType.cs @@ -2,7 +2,6 @@ using System.Buffers.Binary; using System.Diagnostics; using System.IO; -using System.IO.Compression; using System.Linq; using MarcusW.VncClient.Protocol.EncodingTypes; using MarcusW.VncClient.Rendering; diff --git a/src/MarcusW.VncClient/Protocol/Implementation/EncodingTypes/Frame/ZrleEncodingType.cs b/src/MarcusW.VncClient/Protocol/Implementation/EncodingTypes/Frame/ZrleEncodingType.cs index 42b0daa7..3f340f4a 100644 --- a/src/MarcusW.VncClient/Protocol/Implementation/EncodingTypes/Frame/ZrleEncodingType.cs +++ b/src/MarcusW.VncClient/Protocol/Implementation/EncodingTypes/Frame/ZrleEncodingType.cs @@ -3,7 +3,6 @@ using System.Diagnostics; using System.IO; using System.Runtime.CompilerServices; -using System.Threading; using MarcusW.VncClient.Protocol.EncodingTypes; using MarcusW.VncClient.Rendering; diff --git a/src/MarcusW.VncClient/Protocol/Implementation/EncodingTypes/Pseudo/DesktopSizeEncodingType.cs b/src/MarcusW.VncClient/Protocol/Implementation/EncodingTypes/Pseudo/DesktopSizeEncodingType.cs index 5ea1603e..5a731d33 100644 --- a/src/MarcusW.VncClient/Protocol/Implementation/EncodingTypes/Pseudo/DesktopSizeEncodingType.cs +++ b/src/MarcusW.VncClient/Protocol/Implementation/EncodingTypes/Pseudo/DesktopSizeEncodingType.cs @@ -3,7 +3,6 @@ using System.Diagnostics; using System.IO; using MarcusW.VncClient.Protocol.EncodingTypes; -using MarcusW.VncClient.Protocol.Implementation.MessageTypes.Incoming; using MarcusW.VncClient.Protocol.Implementation.MessageTypes.Outgoing; using Microsoft.Extensions.Logging; diff --git a/src/MarcusW.VncClient/Protocol/Implementation/MessageTypes/Incoming/BellMessageType.cs b/src/MarcusW.VncClient/Protocol/Implementation/MessageTypes/Incoming/BellMessageType.cs index cc6294a6..e3dc7f8b 100644 --- a/src/MarcusW.VncClient/Protocol/Implementation/MessageTypes/Incoming/BellMessageType.cs +++ b/src/MarcusW.VncClient/Protocol/Implementation/MessageTypes/Incoming/BellMessageType.cs @@ -1,6 +1,5 @@ using System; using System.Threading; -using MarcusW.VncClient.Output; using MarcusW.VncClient.Protocol.MessageTypes; using Microsoft.Extensions.Logging; diff --git a/src/MarcusW.VncClient/Protocol/Implementation/MessageTypes/Incoming/EndOfContinuousUpdatesMessageType.cs b/src/MarcusW.VncClient/Protocol/Implementation/MessageTypes/Incoming/EndOfContinuousUpdatesMessageType.cs index 67f6ea77..e55084b3 100644 --- a/src/MarcusW.VncClient/Protocol/Implementation/MessageTypes/Incoming/EndOfContinuousUpdatesMessageType.cs +++ b/src/MarcusW.VncClient/Protocol/Implementation/MessageTypes/Incoming/EndOfContinuousUpdatesMessageType.cs @@ -1,7 +1,6 @@ using System; using System.Threading; using MarcusW.VncClient.Protocol.EncodingTypes; -using MarcusW.VncClient.Protocol.Implementation.MessageTypes.Outgoing; using MarcusW.VncClient.Protocol.MessageTypes; using Microsoft.Extensions.Logging; diff --git a/src/MarcusW.VncClient/Protocol/Implementation/MessageTypes/Incoming/ServerFenceMessageType.cs b/src/MarcusW.VncClient/Protocol/Implementation/MessageTypes/Incoming/ServerFenceMessageType.cs index 00a3e297..7483ce94 100644 --- a/src/MarcusW.VncClient/Protocol/Implementation/MessageTypes/Incoming/ServerFenceMessageType.cs +++ b/src/MarcusW.VncClient/Protocol/Implementation/MessageTypes/Incoming/ServerFenceMessageType.cs @@ -1,12 +1,9 @@ using System; using System.Buffers.Binary; -using System.Collections.Immutable; using System.Diagnostics; using System.IO; -using System.Linq; using System.Threading; using MarcusW.VncClient.Protocol.EncodingTypes; -using MarcusW.VncClient.Protocol.Implementation.EncodingTypes.Pseudo; using MarcusW.VncClient.Protocol.Implementation.MessageTypes.Outgoing; using MarcusW.VncClient.Protocol.MessageTypes; using MarcusW.VncClient.Protocol.Services; diff --git a/src/MarcusW.VncClient/Protocol/Implementation/MessageTypes/Outgoing/FramebufferUpdateRequestMessageType.cs b/src/MarcusW.VncClient/Protocol/Implementation/MessageTypes/Outgoing/FramebufferUpdateRequestMessageType.cs index 470c1563..1fd0d3f1 100644 --- a/src/MarcusW.VncClient/Protocol/Implementation/MessageTypes/Outgoing/FramebufferUpdateRequestMessageType.cs +++ b/src/MarcusW.VncClient/Protocol/Implementation/MessageTypes/Outgoing/FramebufferUpdateRequestMessageType.cs @@ -2,7 +2,6 @@ using System.Buffers.Binary; using System.Diagnostics; using System.Threading; -using MarcusW.VncClient.Protocol.Implementation.MessageTypes.Incoming; using MarcusW.VncClient.Protocol.MessageTypes; namespace MarcusW.VncClient.Protocol.Implementation.MessageTypes.Outgoing diff --git a/src/MarcusW.VncClient/Protocol/Implementation/MessageTypes/Outgoing/PointerEventMessageType.cs b/src/MarcusW.VncClient/Protocol/Implementation/MessageTypes/Outgoing/PointerEventMessageType.cs index 6273d857..ec684708 100644 --- a/src/MarcusW.VncClient/Protocol/Implementation/MessageTypes/Outgoing/PointerEventMessageType.cs +++ b/src/MarcusW.VncClient/Protocol/Implementation/MessageTypes/Outgoing/PointerEventMessageType.cs @@ -1,6 +1,5 @@ using System; using System.Buffers.Binary; -using System.Diagnostics; using System.Threading; using MarcusW.VncClient.Protocol.MessageTypes; diff --git a/src/MarcusW.VncClient/Protocol/Implementation/MessageTypes/Outgoing/SetDesktopSizeMessageType.cs b/src/MarcusW.VncClient/Protocol/Implementation/MessageTypes/Outgoing/SetDesktopSizeMessageType.cs index e355e28c..7fea2a32 100644 --- a/src/MarcusW.VncClient/Protocol/Implementation/MessageTypes/Outgoing/SetDesktopSizeMessageType.cs +++ b/src/MarcusW.VncClient/Protocol/Implementation/MessageTypes/Outgoing/SetDesktopSizeMessageType.cs @@ -3,7 +3,6 @@ using System.Collections.Immutable; using System.Diagnostics; using System.Threading; -using MarcusW.VncClient.Protocol.EncodingTypes; using MarcusW.VncClient.Protocol.MessageTypes; namespace MarcusW.VncClient.Protocol.Implementation.MessageTypes.Outgoing diff --git a/src/MarcusW.VncClient/Protocol/Implementation/PixelConversions.cs b/src/MarcusW.VncClient/Protocol/Implementation/PixelConversions.cs index bd600908..7339ca21 100644 --- a/src/MarcusW.VncClient/Protocol/Implementation/PixelConversions.cs +++ b/src/MarcusW.VncClient/Protocol/Implementation/PixelConversions.cs @@ -2,7 +2,6 @@ using System.Buffers.Binary; using System.Diagnostics; using System.Runtime.CompilerServices; -using System.Runtime.Intrinsics.X86; namespace MarcusW.VncClient.Protocol.Implementation { diff --git a/src/MarcusW.VncClient/Protocol/Implementation/SecurityTypes/NoneSecurityType.cs b/src/MarcusW.VncClient/Protocol/Implementation/SecurityTypes/NoneSecurityType.cs index 7b04c961..5dbefa77 100644 --- a/src/MarcusW.VncClient/Protocol/Implementation/SecurityTypes/NoneSecurityType.cs +++ b/src/MarcusW.VncClient/Protocol/Implementation/SecurityTypes/NoneSecurityType.cs @@ -1,5 +1,4 @@ using System; -using System.ComponentModel; using System.Threading; using System.Threading.Tasks; using MarcusW.VncClient.Protocol.SecurityTypes; diff --git a/src/MarcusW.VncClient/Protocol/Implementation/SecurityTypes/VncAuthenticationSecurityType.cs b/src/MarcusW.VncClient/Protocol/Implementation/SecurityTypes/VncAuthenticationSecurityType.cs index 156f5653..bcb8dc8b 100644 --- a/src/MarcusW.VncClient/Protocol/Implementation/SecurityTypes/VncAuthenticationSecurityType.cs +++ b/src/MarcusW.VncClient/Protocol/Implementation/SecurityTypes/VncAuthenticationSecurityType.cs @@ -1,5 +1,4 @@ using System; -using System.ComponentModel; using System.Diagnostics; using System.Security.Cryptography; using System.Text; @@ -7,7 +6,6 @@ using System.Threading.Tasks; using MarcusW.VncClient.Protocol.SecurityTypes; using MarcusW.VncClient.Security; -using MarcusW.VncClient.Utils; namespace MarcusW.VncClient.Protocol.Implementation.SecurityTypes { diff --git a/src/MarcusW.VncClient/Protocol/Implementation/Services/Communication/BuiltinZLibInflater.cs b/src/MarcusW.VncClient/Protocol/Implementation/Services/Communication/BuiltinZLibInflater.cs index 4960757c..b751fa5c 100644 --- a/src/MarcusW.VncClient/Protocol/Implementation/Services/Communication/BuiltinZLibInflater.cs +++ b/src/MarcusW.VncClient/Protocol/Implementation/Services/Communication/BuiltinZLibInflater.cs @@ -1,7 +1,5 @@ using System; -using System.Collections; using System.Collections.Generic; -using System.Diagnostics; using System.IO; using System.IO.Compression; using System.Threading; diff --git a/src/MarcusW.VncClient/Protocol/Implementation/Services/Communication/RfbMessageReceiver.cs b/src/MarcusW.VncClient/Protocol/Implementation/Services/Communication/RfbMessageReceiver.cs index ebdd25e7..68b8da44 100644 --- a/src/MarcusW.VncClient/Protocol/Implementation/Services/Communication/RfbMessageReceiver.cs +++ b/src/MarcusW.VncClient/Protocol/Implementation/Services/Communication/RfbMessageReceiver.cs @@ -3,13 +3,10 @@ using System.Diagnostics; using System.IO; using System.Linq; -using System.Text; using System.Threading; using System.Threading.Tasks; -using MarcusW.VncClient.Protocol.Implementation.MessageTypes.Outgoing; using MarcusW.VncClient.Protocol.MessageTypes; using MarcusW.VncClient.Protocol.Services; -using MarcusW.VncClient.Rendering; using MarcusW.VncClient.Utils; using Microsoft.Extensions.Logging; diff --git a/src/MarcusW.VncClient/Protocol/Implementation/Services/Handshaking/RfbHandshaker.cs b/src/MarcusW.VncClient/Protocol/Implementation/Services/Handshaking/RfbHandshaker.cs index 90bd0725..3e969edc 100644 --- a/src/MarcusW.VncClient/Protocol/Implementation/Services/Handshaking/RfbHandshaker.cs +++ b/src/MarcusW.VncClient/Protocol/Implementation/Services/Handshaking/RfbHandshaker.cs @@ -8,7 +8,6 @@ using System.Threading.Tasks; using MarcusW.VncClient.Protocol.SecurityTypes; using MarcusW.VncClient.Protocol.Services; -using MarcusW.VncClient.Utils; using Microsoft.Extensions.Logging; namespace MarcusW.VncClient.Protocol.Implementation.Services.Handshaking diff --git a/src/MarcusW.VncClient/Protocol/Implementation/Services/Initialization/RfbInitializer.cs b/src/MarcusW.VncClient/Protocol/Implementation/Services/Initialization/RfbInitializer.cs index 6d5118d9..bef03a7a 100644 --- a/src/MarcusW.VncClient/Protocol/Implementation/Services/Initialization/RfbInitializer.cs +++ b/src/MarcusW.VncClient/Protocol/Implementation/Services/Initialization/RfbInitializer.cs @@ -6,7 +6,6 @@ using System.Threading; using System.Threading.Tasks; using MarcusW.VncClient.Protocol.Services; -using MarcusW.VncClient.Utils; using Microsoft.Extensions.Logging; namespace MarcusW.VncClient.Protocol.Implementation.Services.Initialization diff --git a/src/MarcusW.VncClient/Protocol/Implementation/Services/Transports/TransportConnector.cs b/src/MarcusW.VncClient/Protocol/Implementation/Services/Transports/TransportConnector.cs index fa692aec..57459930 100644 --- a/src/MarcusW.VncClient/Protocol/Implementation/Services/Transports/TransportConnector.cs +++ b/src/MarcusW.VncClient/Protocol/Implementation/Services/Transports/TransportConnector.cs @@ -1,5 +1,4 @@ using System; -using System.Net; using System.Net.Sockets; using System.Threading; using System.Threading.Tasks; diff --git a/src/MarcusW.VncClient/Protocol/RfbConnectionContext.cs b/src/MarcusW.VncClient/Protocol/RfbConnectionContext.cs index adb5208d..c7265ca3 100644 --- a/src/MarcusW.VncClient/Protocol/RfbConnectionContext.cs +++ b/src/MarcusW.VncClient/Protocol/RfbConnectionContext.cs @@ -1,12 +1,9 @@ using System; using System.Collections.Immutable; -using System.Diagnostics; -using System.Linq; using MarcusW.VncClient.Protocol.EncodingTypes; using MarcusW.VncClient.Protocol.MessageTypes; using MarcusW.VncClient.Protocol.SecurityTypes; using MarcusW.VncClient.Protocol.Services; -using MarcusW.VncClient.Rendering; namespace MarcusW.VncClient.Protocol { diff --git a/src/MarcusW.VncClient/Protocol/Services/IZLibInflater.cs b/src/MarcusW.VncClient/Protocol/Services/IZLibInflater.cs index f678176b..46742f80 100644 --- a/src/MarcusW.VncClient/Protocol/Services/IZLibInflater.cs +++ b/src/MarcusW.VncClient/Protocol/Services/IZLibInflater.cs @@ -1,7 +1,6 @@ using System; using System.IO; using System.Threading; -using System.Threading.Tasks; namespace MarcusW.VncClient.Protocol.Services { diff --git a/src/MarcusW.VncClient/RfbConnection.Connection.cs b/src/MarcusW.VncClient/RfbConnection.Connection.cs index 2562e099..a5585bc0 100644 --- a/src/MarcusW.VncClient/RfbConnection.Connection.cs +++ b/src/MarcusW.VncClient/RfbConnection.Connection.cs @@ -2,7 +2,6 @@ using System.Threading; using System.Threading.Tasks; using MarcusW.VncClient.Protocol; -using MarcusW.VncClient.Protocol.Services; using MarcusW.VncClient.Utils; using Microsoft.Extensions.Logging; diff --git a/src/MarcusW.VncClient/RfbConnection.Details.cs b/src/MarcusW.VncClient/RfbConnection.Details.cs index fe752724..a71b62f5 100644 --- a/src/MarcusW.VncClient/RfbConnection.Details.cs +++ b/src/MarcusW.VncClient/RfbConnection.Details.cs @@ -3,7 +3,6 @@ using MarcusW.VncClient.Protocol.EncodingTypes; using MarcusW.VncClient.Protocol.MessageTypes; using MarcusW.VncClient.Protocol.SecurityTypes; -using MarcusW.VncClient.Rendering; namespace MarcusW.VncClient { diff --git a/tests/MarcusW.VncClient.Tests/PixelFormatTests.cs b/tests/MarcusW.VncClient.Tests/PixelFormatTests.cs index 9851bf7b..cdecdad6 100644 --- a/tests/MarcusW.VncClient.Tests/PixelFormatTests.cs +++ b/tests/MarcusW.VncClient.Tests/PixelFormatTests.cs @@ -1,7 +1,3 @@ -using System.Collections.Generic; -using MarcusW.VncClient.Protocol; -using Xunit; - namespace MarcusW.VncClient.Tests { public class PixelFormatTests diff --git a/tests/MarcusW.VncClient.Tests/RectangleTests.cs b/tests/MarcusW.VncClient.Tests/RectangleTests.cs index 9223877b..be094848 100644 --- a/tests/MarcusW.VncClient.Tests/RectangleTests.cs +++ b/tests/MarcusW.VncClient.Tests/RectangleTests.cs @@ -1,4 +1,3 @@ -using System.Collections; using System.Collections.Generic; using Xunit; diff --git a/tests/MarcusW.VncClient.Tests/RfbConnectionTests.cs b/tests/MarcusW.VncClient.Tests/RfbConnectionTests.cs index b01be759..c9f1c546 100644 --- a/tests/MarcusW.VncClient.Tests/RfbConnectionTests.cs +++ b/tests/MarcusW.VncClient.Tests/RfbConnectionTests.cs @@ -2,7 +2,6 @@ using System.Threading; using System.Threading.Tasks; using MarcusW.VncClient.Protocol; -using MarcusW.VncClient.Protocol.Implementation.SecurityTypes; using MarcusW.VncClient.Protocol.Services; using MarcusW.VncClient.Utils; using Microsoft.Extensions.Logging.Abstractions;