diff --git a/Agent.Installer.Win/Agent.Installer.Win.csproj b/Agent.Installer.Win/Agent.Installer.Win.csproj index 8ee37629..a0495992 100644 --- a/Agent.Installer.Win/Agent.Installer.Win.csproj +++ b/Agent.Installer.Win/Agent.Installer.Win.csproj @@ -38,7 +38,7 @@ 4 - favicon.ico + Assets\favicon.ico app.manifest @@ -76,6 +76,7 @@ + MSBuild:Compile Designer @@ -118,9 +119,11 @@ - + + + + - diff --git a/Agent.Installer.Win/App.xaml b/Agent.Installer.Win/App.xaml index 724c4c15..4849b39c 100644 --- a/Agent.Installer.Win/App.xaml +++ b/Agent.Installer.Win/App.xaml @@ -4,6 +4,27 @@ xmlns:local="clr-namespace:Remotely.Agent.Installer.Win" StartupUri="MainWindow.xaml"> - + + + diff --git a/Assets/Remotely_Icon_Transparent.png b/Agent.Installer.Win/Assets/Remotely_Icon.png similarity index 100% rename from Assets/Remotely_Icon_Transparent.png rename to Agent.Installer.Win/Assets/Remotely_Icon.png diff --git a/Agent.Installer.Win/favicon.ico b/Agent.Installer.Win/Assets/favicon.ico similarity index 100% rename from Agent.Installer.Win/favicon.ico rename to Agent.Installer.Win/Assets/favicon.ico diff --git a/Agent.Installer.Win/FodyWeavers.xml b/Agent.Installer.Win/FodyWeavers.xml new file mode 100644 index 00000000..5029e706 --- /dev/null +++ b/Agent.Installer.Win/FodyWeavers.xml @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/Agent.Installer.Win/FodyWeavers.xsd b/Agent.Installer.Win/FodyWeavers.xsd new file mode 100644 index 00000000..44a53744 --- /dev/null +++ b/Agent.Installer.Win/FodyWeavers.xsd @@ -0,0 +1,111 @@ + + + + + + + + + + + + A list of assembly names to exclude from the default action of "embed all Copy Local references", delimited with line breaks + + + + + A list of assembly names to include from the default action of "embed all Copy Local references", delimited with line breaks. + + + + + A list of unmanaged 32 bit assembly names to include, delimited with line breaks. + + + + + A list of unmanaged 64 bit assembly names to include, delimited with line breaks. + + + + + The order of preloaded assemblies, delimited with line breaks. + + + + + + This will copy embedded files to disk before loading them into memory. This is helpful for some scenarios that expected an assembly to be loaded from a physical file. + + + + + Controls if .pdbs for reference assemblies are also embedded. + + + + + Embedded assemblies are compressed by default, and uncompressed when they are loaded. You can turn compression off with this option. + + + + + As part of Costura, embedded assemblies are no longer included as part of the build. This cleanup can be turned off. + + + + + Costura by default will load as part of the module initialization. This flag disables that behavior. Make sure you call CosturaUtility.Initialize() somewhere in your code. + + + + + Costura will by default use assemblies with a name like 'resources.dll' as a satellite resource and prepend the output path. This flag disables that behavior. + + + + + A list of assembly names to exclude from the default action of "embed all Copy Local references", delimited with | + + + + + A list of assembly names to include from the default action of "embed all Copy Local references", delimited with |. + + + + + A list of unmanaged 32 bit assembly names to include, delimited with |. + + + + + A list of unmanaged 64 bit assembly names to include, delimited with |. + + + + + The order of preloaded assemblies, delimited with |. + + + + + + + + 'true' to run assembly verification (PEVerify) on the target assembly after all weavers have been executed. + + + + + A comma-separated list of error codes that can be safely ignored in assembly verification. + + + + + 'false' to turn off automatic generation of the XML Schema file. + + + + + \ No newline at end of file diff --git a/Agent.Installer.Win/MainWindow.xaml b/Agent.Installer.Win/MainWindow.xaml index 65759621..8874c8e5 100644 --- a/Agent.Installer.Win/MainWindow.xaml +++ b/Agent.Installer.Win/MainWindow.xaml @@ -3,10 +3,88 @@ xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" + xmlns:ViewModels="clr-namespace:Remotely.Agent.Installer.Win.ViewModels" xmlns:local="clr-namespace:Remotely.Agent.Installer.Win" mc:Ignorable="d" - Title="MainWindow" Height="450" Width="800" Icon="favicon.ico"> + WindowStyle="None" + ResizeMode="NoResize" + MouseLeftButtonDown="Window_MouseLeftButtonDown" + Loaded="Window_Loaded" + Title="Remotely Installer" Height="350" Width="500" Icon="Assets/favicon.ico"> + + + + + + + + + + + + + + + Remotely Installer + + + + diff --git a/Agent.Installer.Win/MainWindow.xaml.cs b/Agent.Installer.Win/MainWindow.xaml.cs index 35eba98e..edc885fc 100644 --- a/Agent.Installer.Win/MainWindow.xaml.cs +++ b/Agent.Installer.Win/MainWindow.xaml.cs @@ -1,4 +1,5 @@ -using System; +using Remotely.Agent.Installer.Win.ViewModels; +using System; using System.Collections.Generic; using System.Linq; using System.Text; @@ -24,5 +25,25 @@ namespace Remotely.Agent.Installer.Win { InitializeComponent(); } + + private void Window_MouseLeftButtonDown(object sender, MouseButtonEventArgs e) + { + DragMove(); + } + + private async void Window_Loaded(object sender, RoutedEventArgs e) + { + await (DataContext as MainWindowViewModel).Init(); + } + + private void CloseButton_Click(object sender, RoutedEventArgs e) + { + App.Current.Shutdown(); + } + + private void MinimizeButton_Click(object sender, RoutedEventArgs e) + { + this.WindowState = WindowState.Minimized; + } } } diff --git a/Agent.Installer.Win/ViewModels/MainWindowViewModel.cs b/Agent.Installer.Win/ViewModels/MainWindowViewModel.cs index 7ccd0f95..90a9eb7a 100644 --- a/Agent.Installer.Win/ViewModels/MainWindowViewModel.cs +++ b/Agent.Installer.Win/ViewModels/MainWindowViewModel.cs @@ -9,8 +9,96 @@ using System.Threading.Tasks; namespace Remotely.Agent.Installer.Win.ViewModels { - public class MainWindowViewModel + public class MainWindowViewModel : ViewModelBase { + private string headerMessage = "Install the Remotely service."; + private bool isServiceInstalled; + private bool isServiceMissing = true; + private string subMessage = "Installing the Remotely service will allow remote access by the above service provider."; + private string statusMessage; + private int progress = 50; + + public string HeaderMessage + { + get + { + return headerMessage; + } + set + { + headerMessage = value; + FirePropertyChanged(nameof(HeaderMessage)); + } + } + + + public int Progress + { + get + { + return progress; + } + set + { + progress = value; + FirePropertyChanged(nameof(Progress)); + } + } + + public bool IsServiceInstalled + { + get + { + return isServiceInstalled; + } + set + { + isServiceInstalled = value; + FirePropertyChanged(nameof(IsServiceInstalled)); + } + } + public bool IsServiceMissing + { + get + { + return isServiceMissing; + } + set + { + isServiceMissing = value; + FirePropertyChanged(nameof(IsServiceMissing)); + } + } + public string SubMessage + { + get + { + return subMessage; + } + set + { + subMessage = value; + FirePropertyChanged(nameof(SubMessage)); + } + } + + public string StatusMessage + { + get + { + return statusMessage; + } + set + { + statusMessage = value; + FirePropertyChanged(nameof(StatusMessage)); + } + } + public async Task Init() + { + + } + public InstallerSettings ReadInstallerSettings() { try diff --git a/Agent.Installer.Win/ViewModels/ViewModelBase.cs b/Agent.Installer.Win/ViewModels/ViewModelBase.cs new file mode 100644 index 00000000..a0591ef2 --- /dev/null +++ b/Agent.Installer.Win/ViewModels/ViewModelBase.cs @@ -0,0 +1,19 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Remotely.Agent.Installer.Win.ViewModels +{ + public class ViewModelBase : INotifyPropertyChanged + { + public event PropertyChangedEventHandler PropertyChanged; + + public void FirePropertyChanged(string propertyName) + { + PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName)); + } + } +} diff --git a/Assets/Remotely_Icon_Transparent.ico b/Assets/Remotely_Icon.ico similarity index 100% rename from Assets/Remotely_Icon_Transparent.ico rename to Assets/Remotely_Icon.ico diff --git a/Assets/Remotely_Icon.png b/Assets/Remotely_Icon.png new file mode 100644 index 00000000..98730902 Binary files /dev/null and b/Assets/Remotely_Icon.png differ diff --git a/Remotely.sln b/Remotely.sln index e7a9778d..88c96ab4 100644 --- a/Remotely.sln +++ b/Remotely.sln @@ -19,10 +19,9 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Utilities", "Utilities", "{ EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Assets", "Assets", "{D96B47F6-EF3E-4AF6-A1BE-006D531DDBA4}" ProjectSection(SolutionItems) = preProject + Assets\Remotely_Icon.ico = Assets\Remotely_Icon.ico Assets\Remotely_Icon.pdn = Assets\Remotely_Icon.pdn Assets\Remotely_Icon.png = Assets\Remotely_Icon.png - Assets\Remotely_Icon_Transparent.ico = Assets\Remotely_Icon_Transparent.ico - Assets\Remotely_Icon_Transparent.png = Assets\Remotely_Icon_Transparent.png Assets\Remotely_Logo.png = Assets\Remotely_Logo.png EndProjectSection EndProject