diff --git a/Remotely_Agent/Remotely_Agent.csproj b/Remotely_Agent/Remotely_Agent.csproj index 029f8c26..a632906c 100644 --- a/Remotely_Agent/Remotely_Agent.csproj +++ b/Remotely_Agent/Remotely_Agent.csproj @@ -4,7 +4,7 @@ Exe netcoreapp2.2 false - Copyright © 2018 Translucency Software + Copyright © 2019 Translucency Software Background service that maintains a connection to the DoXM server. The service is used for remote support and maintenance by this computer's administrators. https://doxm.app/EULA Jared Goodwin diff --git a/Remotely_Agent/Resources/Remotely_ScreenCapture.exe b/Remotely_Agent/Resources/Remotely_ScreenCapture.exe index 6b775bdc..8519b93f 100644 Binary files a/Remotely_Agent/Resources/Remotely_ScreenCapture.exe and b/Remotely_Agent/Resources/Remotely_ScreenCapture.exe differ diff --git a/Remotely_Agent/Services/Bash.cs b/Remotely_Agent/Services/Bash.cs index 80231357..ecfb852d 100644 --- a/Remotely_Agent/Services/Bash.cs +++ b/Remotely_Agent/Services/Bash.cs @@ -127,7 +127,7 @@ namespace Remotely_Agent.Services var partialResult = new GenericCommandResult() { CommandContextID = LastInputID, - MachineID = Utilities.GetConnectionInfo().MachineID, + DeviceID = Utilities.GetConnectionInfo().DeviceID, CommandType = "Bash", StandardOutput = StandardOut, ErrorOutput = "WARNING: The command execution froze and was forced to return before finishing. " + @@ -143,7 +143,7 @@ namespace Remotely_Agent.Services return new GenericCommandResult() { CommandContextID = LastInputID, - MachineID = Utilities.GetConnectionInfo().MachineID, + DeviceID = Utilities.GetConnectionInfo().DeviceID, CommandType = "Bash", StandardOutput = StandardOut, ErrorOutput = ErrorOut diff --git a/Remotely_Agent/Services/CMD.cs b/Remotely_Agent/Services/CMD.cs index 70eb0b56..76783b05 100644 --- a/Remotely_Agent/Services/CMD.cs +++ b/Remotely_Agent/Services/CMD.cs @@ -128,7 +128,7 @@ namespace Remotely_Agent.Services var partialResult = new GenericCommandResult() { CommandContextID = LastInputID, - MachineID = Utilities.GetConnectionInfo().MachineID, + DeviceID = Utilities.GetConnectionInfo().DeviceID, CommandType = "CMD", StandardOutput = StandardOut, ErrorOutput = "WARNING: The command execution froze and was forced to return before finishing. " + @@ -144,7 +144,7 @@ namespace Remotely_Agent.Services return new GenericCommandResult() { CommandContextID = LastInputID, - MachineID = Utilities.GetConnectionInfo().MachineID, + DeviceID = Utilities.GetConnectionInfo().DeviceID, CommandType = "CMD", StandardOutput = StandardOut, ErrorOutput = ErrorOut diff --git a/Remotely_Agent/Services/ClientSocket.cs b/Remotely_Agent/Services/ClientSocket.cs index 4e3755ef..b6fe3868 100644 --- a/Remotely_Agent/Services/ClientSocket.cs +++ b/Remotely_Agent/Services/ClientSocket.cs @@ -39,9 +39,9 @@ namespace Remotely_Agent.Services await HubConnection.StartAsync(); - var machine = Machine.Create(ConnectionInfo); + var device = Device.Create(ConnectionInfo); - await HubConnection.InvokeAsync("MachineCameOnline", machine); + await HubConnection.InvokeAsync("DeviceCameOnline", device); if (string.IsNullOrWhiteSpace(ConnectionInfo.ServerVerificationToken)) { @@ -67,8 +67,8 @@ namespace Remotely_Agent.Services public static void SendHeartbeat() { - var currentInfo = Machine.Create(ConnectionInfo); - HubConnection.InvokeAsync("MachineHeartbeat", currentInfo); + var currentInfo = Device.Create(ConnectionInfo); + HubConnection.InvokeAsync("DeviceHeartbeat", currentInfo); } private static async Task ExecuteCommand(string mode, string command, string commandID, string senderConnectionID) @@ -153,7 +153,7 @@ namespace Remotely_Agent.Services catch (Exception ex) { Logger.Write(ex); - await HubConnection.InvokeAsync("DisplayConsoleMessage", $"There was an error executing the command. It has been logged on the client machine.", senderConnectionID); + await HubConnection.InvokeAsync("DisplayConsoleMessage", $"There was an error executing the command. It has been logged on the client device.", senderConnectionID); } } @@ -305,7 +305,7 @@ namespace Remotely_Agent.Services var result = Win32Interop.OpenInteractiveProcess(filePath + $" -mode unattended -requester {requesterID} -serviceid {serviceID} -hostname {Utilities.GetConnectionInfo().Host.Split("//").Last()}", "default", true, out procInfo); if (!result) { - await hubConnection.InvokeAsync("DisplayConsoleMessage", "Remote control failed to download or start on target machine.", requesterID); + await hubConnection.InvokeAsync("DisplayConsoleMessage", "Remote control failed to start on target device.", requesterID); } } @@ -320,7 +320,7 @@ namespace Remotely_Agent.Services } catch { - await hubConnection.InvokeAsync("DisplayConsoleMessage", "Remote control failed to download or start on target machine.", requesterID); + await hubConnection.InvokeAsync("DisplayConsoleMessage", "Remote control failed to start on target device.", requesterID); throw; } }); diff --git a/Remotely_Agent/Services/PSCore.cs b/Remotely_Agent/Services/PSCore.cs index 11459f84..1a598bdd 100644 --- a/Remotely_Agent/Services/PSCore.cs +++ b/Remotely_Agent/Services/PSCore.cs @@ -78,7 +78,7 @@ namespace Remotely_Agent.Services return new PSCoreCommandResult() { CommandContextID = commandID, - MachineID = Utilities.GetConnectionInfo().MachineID, + DeviceID = Utilities.GetConnectionInfo().DeviceID, DebugOutput = debugOut, ErrorOutput = errorOut, VerboseOutput = verboseOut, diff --git a/Remotely_Agent/Services/Updater.cs b/Remotely_Agent/Services/Updater.cs index 3a514707..7ee24ff6 100644 --- a/Remotely_Agent/Services/Updater.cs +++ b/Remotely_Agent/Services/Updater.cs @@ -54,7 +54,7 @@ namespace Remotely_Agent.Services var wc = new WebClient(); var latestVersion = wc.DownloadString(Utilities.GetConnectionInfo().Host + $"/API/CoreVersion/{platform}"); - var thisVersion = FileVersionInfo.GetVersionInfo("Remote_Agent.dll").FileVersion.ToString(); + var thisVersion = FileVersionInfo.GetVersionInfo("Remotely_Agent.dll").FileVersion.ToString(); if (thisVersion != latestVersion) { Logger.Write($"Service Updater: Downloading update. Current Version: {thisVersion}. Latest Version: {latestVersion}."); diff --git a/Remotely_Agent/Services/WindowsPS.cs b/Remotely_Agent/Services/WindowsPS.cs index 8dd46807..10c481b6 100644 --- a/Remotely_Agent/Services/WindowsPS.cs +++ b/Remotely_Agent/Services/WindowsPS.cs @@ -125,7 +125,7 @@ namespace Remotely_Agent.Services var partialResult = new GenericCommandResult() { CommandContextID = LastInputID, - MachineID = Utilities.GetConnectionInfo().MachineID, + DeviceID = Utilities.GetConnectionInfo().DeviceID, CommandType = "WinPS", StandardOutput = StandardOut, ErrorOutput = "WARNING: The command execution froze and was forced to return before finishing. " + @@ -141,7 +141,7 @@ namespace Remotely_Agent.Services return new GenericCommandResult() { CommandContextID = LastInputID, - MachineID = Utilities.GetConnectionInfo().MachineID, + DeviceID = Utilities.GetConnectionInfo().DeviceID, CommandType = "WinPS", StandardOutput = StandardOut, ErrorOutput = ErrorOut diff --git a/Remotely_Library/Models/CommandContext.cs b/Remotely_Library/Models/CommandContext.cs index c54de771..311b42ca 100644 --- a/Remotely_Library/Models/CommandContext.cs +++ b/Remotely_Library/Models/CommandContext.cs @@ -14,12 +14,12 @@ namespace Remotely_Library.Models public string CommandText { get; set; } public string SenderUserID { get; set; } public string SenderConnectionID { get; set; } - public string[] TargetMachineIDs { get; set; } + public string[] TargetDeviceIDs { get; set; } public List PSCoreResults { get; set; } = new List(); public List CommandResults { get; set; } = new List(); public DateTime TimeStamp { get; set; } = DateTime.Now; [IgnoreDataMember] - public Organization Organization { get; set; } + public virtual Organization Organization { get; set; } public string OrganizationID { get; set; } } } diff --git a/Remotely_Library/Models/CommandContext.cs.d.ts b/Remotely_Library/Models/CommandContext.cs.d.ts index 8e8aa30c..12ea1458 100644 --- a/Remotely_Library/Models/CommandContext.cs.d.ts +++ b/Remotely_Library/Models/CommandContext.cs.d.ts @@ -4,7 +4,7 @@ CommandText: string; SenderUserID: string; SenderConnectionID: string; - TargetMachineIDs: string[]; + TargetDeviceIDs: string[]; PSCoreResults: any[]; CommandResults: any[]; TimeStamp: Date; diff --git a/Remotely_Library/Models/ConnectionInfo.cs b/Remotely_Library/Models/ConnectionInfo.cs index 3d075391..c04f7d5b 100644 --- a/Remotely_Library/Models/ConnectionInfo.cs +++ b/Remotely_Library/Models/ConnectionInfo.cs @@ -6,7 +6,7 @@ namespace Remotely_Library.Models { public class ConnectionInfo { - public string MachineID { get; set; } = Guid.NewGuid().ToString(); + public string DeviceID { get; set; } = Guid.NewGuid().ToString(); private string host; public string Host { diff --git a/Remotely_Library/Models/Machine.cs b/Remotely_Library/Models/Device.cs similarity index 90% rename from Remotely_Library/Models/Machine.cs rename to Remotely_Library/Models/Device.cs index 3854520d..5759eb1c 100644 --- a/Remotely_Library/Models/Machine.cs +++ b/Remotely_Library/Models/Device.cs @@ -11,7 +11,7 @@ using System.Runtime.InteropServices; namespace Remotely_Library.Models { - public class Machine + public class Device { public string CurrentUser { get; set; } public virtual List Drives { get; set; } @@ -29,7 +29,7 @@ namespace Remotely_Library.Models public DateTime LastOnline { get; set; } - public string MachineName { get; set; } + public string DeviceName { get; set; } public virtual Organization Organization { get; set; } public string OrganizationID { get; set; } @@ -37,7 +37,7 @@ namespace Remotely_Library.Models public string OSDescription { get; set; } - public List PermissionGroups { get; set; } = new List(); + public virtual List PermissionGroups { get; set; } = new List(); public string Platform { get; set; } public int ProcessorCount { get; set; } @@ -47,7 +47,7 @@ namespace Remotely_Library.Models public double TotalMemory { get; set; } public double TotalStorage { get; set; } - public static Machine Create(ConnectionInfo connectionInfo) + public static Device Create(ConnectionInfo connectionInfo) { OSPlatform platform = OSUtils.GetPlatform(); DriveInfo systemDrive; @@ -67,10 +67,10 @@ namespace Remotely_Library.Models x.RootDirectory.FullName == Path.GetPathRoot(Environment.CurrentDirectory)); } - var machine = new Machine() + var device = new Device() { - ID = connectionInfo.MachineID, - MachineName = Environment.MachineName, + ID = connectionInfo.DeviceID, + DeviceName = Environment.MachineName, Platform = platform.ToString(), ProcessorCount = Environment.ProcessorCount, OSArchitecture = RuntimeInformation.OSArchitecture, @@ -92,9 +92,9 @@ namespace Remotely_Library.Models if (systemDrive != null && systemDrive.TotalSize > 0 && systemDrive.TotalFreeSpace > 0) { - machine.TotalStorage = Math.Round((double)(systemDrive.TotalSize / 1024 / 1024 / 1024), 2); + device.TotalStorage = Math.Round((double)(systemDrive.TotalSize / 1024 / 1024 / 1024), 2); var freeStorage = Math.Round((double)(systemDrive.TotalFreeSpace / 1024 / 1024 / 1024), 2); - machine.FreeStorage = freeStorage / machine.TotalStorage; + device.FreeStorage = freeStorage / device.TotalStorage; } Tuple totalMemory = new Tuple(0, 0); @@ -110,15 +110,15 @@ namespace Remotely_Library.Models if (totalMemory.Item2 > 0) { - machine.FreeMemory = totalMemory.Item1 / totalMemory.Item2; + device.FreeMemory = totalMemory.Item1 / totalMemory.Item2; } else { - machine.FreeMemory = 0; + device.FreeMemory = 0; } - machine.TotalMemory = totalMemory.Item2; + device.TotalMemory = totalMemory.Item2; - return machine; + return device; } diff --git a/Remotely_Library/Models/Drive.cs b/Remotely_Library/Models/Drive.cs index 482d92c2..e5be3586 100644 --- a/Remotely_Library/Models/Drive.cs +++ b/Remotely_Library/Models/Drive.cs @@ -17,6 +17,6 @@ namespace Remotely_Library.Models public double FreeSpace { get; internal set; } public double TotalSize { get; internal set; } public string VolumeLabel { get; internal set; } - public string MachineID { get; set; } + public string DeviceID { get; set; } } } diff --git a/Remotely_Library/Models/EventLog.cs b/Remotely_Library/Models/EventLog.cs index 728a243e..46a8dc6a 100644 --- a/Remotely_Library/Models/EventLog.cs +++ b/Remotely_Library/Models/EventLog.cs @@ -17,7 +17,7 @@ namespace Remotely_Library.Models public string OrganizationID { get; set; } public DateTime TimeStamp { get; set; } = DateTime.Now; [JsonIgnore] - public Organization Organization { get; set; } + public virtual Organization Organization { get; set; } } public enum EventTypes { diff --git a/Remotely_Library/Models/GenericCommandResult.cs b/Remotely_Library/Models/GenericCommandResult.cs index 066d0950..c5199b7d 100644 --- a/Remotely_Library/Models/GenericCommandResult.cs +++ b/Remotely_Library/Models/GenericCommandResult.cs @@ -6,7 +6,7 @@ namespace Remotely_Library.Models { public class GenericCommandResult { - public string MachineID { get; set; } + public string DeviceID { get; set; } public string CommandContextID { get; set; } public string CommandType { get; set; } public string StandardOutput { get; set; } diff --git a/Remotely_Library/Models/GenericCommandResult.cs.d.ts b/Remotely_Library/Models/GenericCommandResult.cs.d.ts index 82cff77a..d2d900d5 100644 --- a/Remotely_Library/Models/GenericCommandResult.cs.d.ts +++ b/Remotely_Library/Models/GenericCommandResult.cs.d.ts @@ -1,5 +1,5 @@ interface GenericCommandResult { - MachineID: string; + DeviceID: string; CommandContextID: string; CommandType: string; StandardOutput: string; diff --git a/Remotely_Library/Models/InviteLink.cs b/Remotely_Library/Models/InviteLink.cs index fc9e7846..db4d15df 100644 --- a/Remotely_Library/Models/InviteLink.cs +++ b/Remotely_Library/Models/InviteLink.cs @@ -12,6 +12,6 @@ namespace Remotely_Library.Models public string InvitedUser { get; set; } public bool IsAdmin { get; set; } public DateTime DateSent { get; set; } - public Organization Organization { get; set; } + public virtual Organization Organization { get; set; } } } diff --git a/Remotely_Library/Models/Machine.cs.d.ts b/Remotely_Library/Models/Machine.cs.d.ts deleted file mode 100644 index e926b14e..00000000 --- a/Remotely_Library/Models/Machine.cs.d.ts +++ /dev/null @@ -1,32 +0,0 @@ - interface Machine { - Drives: any[]; - ID: string; - Is64Bit: boolean; - IsOnline: boolean; - LastOnline: Date; - MachineName: string; - OrganizationID: string; - Organization: { - ID: string; - OrganizationName: string; - RemotelyUsers: any[]; - Machines: server.Machine[]; - CommandContexts: any[]; - EventLogs: any[]; - PermissionGroups: any[]; - InviteLinks: any[]; - SharedFiles: any[]; - }; - OSArchitecture: any; - OSDescription: string; - Platform: string; - ProcessorCount: number; - TotalMemory: number; - FreeStorage: number; - TotalStorage: number; - FreeMemory: number; - CurrentUser: string; - PermissionGroups: any[]; - Tags: string; - ServerVerificationToken: string; - } diff --git a/Remotely_Library/Models/Organization.cs b/Remotely_Library/Models/Organization.cs index dabc462d..1013be02 100644 --- a/Remotely_Library/Models/Organization.cs +++ b/Remotely_Library/Models/Organization.cs @@ -12,12 +12,12 @@ namespace Remotely_Library.Models [StringLength(25)] public string OrganizationName { get; set; } - public List RemotelyUsers { get; set; } - public List Machines { get; set; } - public List CommandContexts { get; set; } - public List EventLogs { get; set; } - public List PermissionGroups { get; set; } = new List(); - public List InviteLinks { get; set; } - public List SharedFiles { get; set; } + public virtual List RemotelyUsers { get; set; } + public virtual List Devices { get; set; } + public virtual List CommandContexts { get; set; } + public virtual List EventLogs { get; set; } + public virtual List PermissionGroups { get; set; } = new List(); + public virtual List InviteLinks { get; set; } + public virtual List SharedFiles { get; set; } } } \ No newline at end of file diff --git a/Remotely_Library/Models/PSCoreCommandResult.cs b/Remotely_Library/Models/PSCoreCommandResult.cs index d89166a2..a6dffea1 100644 --- a/Remotely_Library/Models/PSCoreCommandResult.cs +++ b/Remotely_Library/Models/PSCoreCommandResult.cs @@ -8,7 +8,7 @@ namespace Remotely_Library.Models public class PSCoreCommandResult { public string CommandContextID { get; set; } - public string MachineID { get; set; } + public string DeviceID { get; set; } public List VerboseOutput { get; set; } public List DebugOutput { get; set; } public List ErrorOutput { get; set; } diff --git a/Remotely_Library/Models/PSCoreCommandResult.cs.d.ts b/Remotely_Library/Models/PSCoreCommandResult.cs.d.ts index 577f72b5..7e4f17f5 100644 --- a/Remotely_Library/Models/PSCoreCommandResult.cs.d.ts +++ b/Remotely_Library/Models/PSCoreCommandResult.cs.d.ts @@ -1,6 +1,6 @@ interface PSCoreCommandResult { CommandContextID: string; - MachineID: string; + DeviceID: string; VerboseOutput: string[]; DebugOutput: string[]; ErrorOutput: string[]; diff --git a/Remotely_Library/Models/PermissionGroup.cs b/Remotely_Library/Models/PermissionGroup.cs index d2d8dd03..73b247cd 100644 --- a/Remotely_Library/Models/PermissionGroup.cs +++ b/Remotely_Library/Models/PermissionGroup.cs @@ -12,6 +12,8 @@ namespace Remotely_Library.Models public string ID { get; set; } = Guid.NewGuid().ToString(); [StringLength(100)] public string Name { get; set; } - public Organization Organization { get; set; } - } + public virtual Organization Organization { get; set; } + public virtual List Devices { get; set; } + public virtual List RemotelyUsers { get; set; } + } } diff --git a/Remotely_Library/Models/RemotelyUser.cs b/Remotely_Library/Models/RemotelyUser.cs index 99c19047..692ace54 100644 --- a/Remotely_Library/Models/RemotelyUser.cs +++ b/Remotely_Library/Models/RemotelyUser.cs @@ -14,12 +14,12 @@ namespace Remotely_Library.Models UserOptions = new RemotelyUserOptions(); Organization = new Organization(); } - public RemotelyUserOptions UserOptions { get; set; } + public virtual RemotelyUserOptions UserOptions { get; set; } - public Organization Organization { get; set; } + public virtual Organization Organization { get; set; } public string OrganizationID { get; set; } - public List PermissionGroups { get; set; } = new List(); + public virtual List PermissionGroups { get; set; } = new List(); public bool IsAdministrator { get; set; } = true; } diff --git a/Remotely_Library/Models/SharedFile.cs b/Remotely_Library/Models/SharedFile.cs index a2e75262..557dd65e 100644 --- a/Remotely_Library/Models/SharedFile.cs +++ b/Remotely_Library/Models/SharedFile.cs @@ -13,6 +13,6 @@ namespace Remotely_Library.Models public string ContentType { get; set; } public byte[] FileContents { get; set; } public DateTime Timestamp { get; set; } = DateTime.Now; - public Organization Organization { get; set; } + public virtual Organization Organization { get; set; } } } diff --git a/Remotely_Library/Remotely_Library.csproj b/Remotely_Library/Remotely_Library.csproj index c9e2deac..667a2962 100644 --- a/Remotely_Library/Remotely_Library.csproj +++ b/Remotely_Library/Remotely_Library.csproj @@ -6,8 +6,8 @@ - - Machine.cs + + Device.cs True True @@ -39,7 +39,7 @@ GenericCommandResult.cs.d.ts DtsGenerator - + Machine.cs.d.ts DtsGenerator diff --git a/Remotely_ScreenCast/Capture/BitBltCapture.cs b/Remotely_ScreenCast/Capture/BitBltCapture.cs index 53597fb5..395c1f57 100644 --- a/Remotely_ScreenCast/Capture/BitBltCapture.cs +++ b/Remotely_ScreenCast/Capture/BitBltCapture.cs @@ -73,20 +73,6 @@ namespace Remotely_ScreenCast.Capture desktopName = Win32Interop.GetCurrentDesktop(); } - public async void BeginCapturing(string participantID) - { - CursorIconWatcher.Current.OnChange += CursorIcon_OnChange; - while (IsCapturing) - { - Capture(); - - - await Task.Delay(PauseForMilliseconds); - PauseForMilliseconds = 1; - } - CursorIconWatcher.Current.OnChange -= CursorIcon_OnChange; - } - private void CursorIcon_OnChange(object sender, int e) { //AditClient.SocketMessageHandler.SendIconUpdate(e); diff --git a/Remotely_ScreenCast/Capture/DXCapture.cs b/Remotely_ScreenCast/Capture/DXCapture.cs index b5107408..5b29d725 100644 --- a/Remotely_ScreenCast/Capture/DXCapture.cs +++ b/Remotely_ScreenCast/Capture/DXCapture.cs @@ -19,10 +19,6 @@ namespace Remotely_ScreenCast.Capture { public class DXCapture : ICapturer { - public DXCapture() - { - Init(); - } public Bitmap PreviousFrame { get; set; } public Bitmap CurrentFrame { get; set; } public Size CurrentScreenSize @@ -64,7 +60,7 @@ namespace Remotely_ScreenCast.Capture NeedsInit = true; } } - public bool NeedsInit { get; set; } + public bool NeedsInit { get; set; } = true; private string desktopName; private Factory1 factory; @@ -102,7 +98,10 @@ namespace Remotely_ScreenCast.Capture var newHeight = output.Description.DesktopBounds.Bottom - output.Description.DesktopBounds.Top; if (newWidth != width || newHeight != height) { - ScreenChanged(this, new Size(newWidth, newHeight)); + if (ScreenChanged != null) + { + ScreenChanged(this, new Size(newWidth, newHeight)); + } } width = newWidth; height = newHeight; diff --git a/Remotely_ScreenCast/Program.cs b/Remotely_ScreenCast/Program.cs index 9ba7bfd8..925929bf 100644 --- a/Remotely_ScreenCast/Program.cs +++ b/Remotely_ScreenCast/Program.cs @@ -34,6 +34,7 @@ namespace Remotely_ScreenCast static void Main(string[] args) { + AppDomain.CurrentDomain.UnhandledException += CurrentDomain_UnhandledException; var argDict = ProcessArgs(args); Mode = argDict["mode"]; RequesterID = argDict["requester"]; @@ -52,8 +53,9 @@ namespace Remotely_ScreenCast Capturer = new DXCapture(); CaptureMode = CaptureMode.DirectX; } - catch + catch (Exception ex) { + Logger.Write(ex); Capturer = new BitBltCapture(); CaptureMode = CaptureMode.BitBtl; } @@ -63,11 +65,13 @@ namespace Remotely_ScreenCast MessageHandlers.ApplyConnectionHandlers(Connection, OutgoingMessages, Capturer); OutgoingMessages.NotifyRequesterUnattendedReady(RequesterID).Wait(); + + Console.ReadKey(); } - internal static void BeginCapturing() + private static void CurrentDomain_UnhandledException(object sender, UnhandledExceptionEventArgs e) { - + Logger.Write((Exception)e.ExceptionObject); } private static async void HandleScreenChanged(object sender, Size size) diff --git a/Remotely_ScreenCast/Sockets/MessageHandlers.cs b/Remotely_ScreenCast/Sockets/MessageHandlers.cs index 3647afc8..782f8fe2 100644 --- a/Remotely_ScreenCast/Sockets/MessageHandlers.cs +++ b/Remotely_ScreenCast/Sockets/MessageHandlers.cs @@ -14,8 +14,8 @@ namespace Remotely_ScreenCapture.Sockets public class MessageHandlers { public static void ApplyConnectionHandlers(HubConnection hubConnection, - OutgoingMessages outgoingMessages, - ICapturer capturer) + OutgoingMessages outgoingMessages, + ICapturer capturer) { hubConnection.Closed += (ex) => { diff --git a/Remotely_ScreenCast/Sockets/OutgoingMessages.cs b/Remotely_ScreenCast/Sockets/OutgoingMessages.cs index 7ccf0a57..09aa1add 100644 --- a/Remotely_ScreenCast/Sockets/OutgoingMessages.cs +++ b/Remotely_ScreenCast/Sockets/OutgoingMessages.cs @@ -32,7 +32,7 @@ namespace Remotely_ScreenCapture.Sockets public async Task NotifyRequesterUnattendedReady(string requesterID) { - await Connection.SendAsync("UnattendedSessionReady", requesterID); + await Connection.SendAsync("NotifyRequesterUnattendedReady", requesterID); } } } diff --git a/Remotely_Server/API/CommandsController.cs b/Remotely_Server/API/CommandsController.cs index 49ca86b7..854f4d67 100644 --- a/Remotely_Server/API/CommandsController.cs +++ b/Remotely_Server/API/CommandsController.cs @@ -81,11 +81,11 @@ namespace Remotely_Server.API } // GET api//5 - [HttpGet("PSCoreResult/{commandID}/{machineID}")] + [HttpGet("PSCoreResult/{commandID}/{deviceID}")] [Authorize] - public PSCoreCommandResult PSCoreResult(string commandID, string machineID) + public PSCoreCommandResult PSCoreResult(string commandID, string deviceID) { - return DataService.GetCommandContext(commandID, User.Identity.Name).PSCoreResults.Find(x => x.MachineID == machineID); + return DataService.GetCommandContext(commandID, User.Identity.Name).PSCoreResults.Find(x => x.DeviceID == deviceID); } // POST api/ diff --git a/Remotely_Server/API/MachinesController.cs b/Remotely_Server/API/DevicesController.cs similarity index 71% rename from Remotely_Server/API/MachinesController.cs rename to Remotely_Server/API/DevicesController.cs index a44d71c4..7a2c19aa 100644 --- a/Remotely_Server/API/MachinesController.cs +++ b/Remotely_Server/API/DevicesController.cs @@ -15,10 +15,10 @@ namespace Remotely_Server.API [Authorize] [ApiController] [Route("api/[controller]")] - public class MachinesController : Controller + public class DevicesController : Controller { - public MachinesController(DataService dataService, UserManager userManager) + public DevicesController(DataService dataService, UserManager userManager) { this.DataService = dataService; this.UserManager = userManager; @@ -28,19 +28,19 @@ namespace Remotely_Server.API // GET: api/ [HttpGet] - public async Task> Get() + public async Task> Get() { var user = await UserManager.GetUserAsync(User); - var machines = DataService.GetAllMachines(user.Id); - return machines; + var devices = DataService.GetAllDevicesForUser(user.Id); + return devices; } // GET api//5 [HttpGet("{id}")] - public async Task Get(string id) + public async Task Get(string id) { var user = await UserManager.GetUserAsync(User); - return DataService.GetMachine(user.Id, id); + return DataService.GetDeviceForUser(user.Id, id); } } } diff --git a/Remotely_Server/Areas/Identity/Pages/Account/ForgotPassword.cshtml b/Remotely_Server/Areas/Identity/Pages/Account/ForgotPassword.cshtml index 605de843..c636d161 100644 --- a/Remotely_Server/Areas/Identity/Pages/Account/ForgotPassword.cshtml +++ b/Remotely_Server/Areas/Identity/Pages/Account/ForgotPassword.cshtml @@ -4,8 +4,8 @@ ViewData["Title"] = "Forgot your password?"; } -

@ViewData["Title"]

-

Enter your email.

+

@ViewData["Title"]

+
Enter your email.

diff --git a/Remotely_Server/Areas/Identity/Pages/Account/Login.cshtml b/Remotely_Server/Areas/Identity/Pages/Account/Login.cshtml index c91c9b4a..8165defa 100644 --- a/Remotely_Server/Areas/Identity/Pages/Account/Login.cshtml +++ b/Remotely_Server/Areas/Identity/Pages/Account/Login.cshtml @@ -6,12 +6,12 @@ ViewData["Title"] = "Log in"; } -

@ViewData["Title"]

+

@ViewData["Title"]

-

Use your Remotely account to log in.

+
Use your Remotely account to log in.

diff --git a/Remotely_Server/Areas/Identity/Pages/Account/Manage/Options.cshtml b/Remotely_Server/Areas/Identity/Pages/Account/Manage/Options.cshtml index 52ed31b3..c2450243 100644 --- a/Remotely_Server/Areas/Identity/Pages/Account/Manage/Options.cshtml +++ b/Remotely_Server/Areas/Identity/Pages/Account/Manage/Options.cshtml @@ -78,8 +78,8 @@