diff --git a/BodyshopUploader/Assets/logo1024.png b/BodyshopUploader/Assets/logo1024.png new file mode 100644 index 0000000..ad76341 Binary files /dev/null and b/BodyshopUploader/Assets/logo1024.png differ diff --git a/BodyshopUploader/BodyshopUploader.csproj b/BodyshopUploader/BodyshopUploader.csproj index 4c37c65..3be3699 100644 --- a/BodyshopUploader/BodyshopUploader.csproj +++ b/BodyshopUploader/BodyshopUploader.csproj @@ -342,6 +342,7 @@ Resources.Designer.cs + PreserveNewest diff --git a/BodyshopUploader/Properties/Resources.Designer.cs b/BodyshopUploader/Properties/Resources.Designer.cs index 217f11b..f867152 100644 --- a/BodyshopUploader/Properties/Resources.Designer.cs +++ b/BodyshopUploader/Properties/Resources.Designer.cs @@ -105,6 +105,33 @@ namespace BodyshopUploader.Properties { } } + /// + /// Looks up a localized string similar to Actions. + /// + public static string Label_Actions { + get { + return ResourceManager.GetString("Label_Actions", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Active Shop. + /// + public static string Label_ActiveShop { + get { + return ResourceManager.GetString("Label_ActiveShop", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Add _Folder. + /// + public static string Label_AddFolder { + get { + return ResourceManager.GetString("Label_AddFolder", resourceCulture); + } + } + /// /// Looks up a localized string similar to Add Path. /// @@ -132,6 +159,33 @@ namespace BodyshopUploader.Properties { } } + /// + /// Looks up a localized string similar to Monitor Status. + /// + public static string Label_MonitorStatus { + get { + return ResourceManager.GetString("Label_MonitorStatus", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Re_move. + /// + public static string Label_Remove { + get { + return ResourceManager.GetString("Label_Remove", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to _Restart. + /// + public static string Label_Restart { + get { + return ResourceManager.GetString("Label_Restart", resourceCulture); + } + } + /// /// Looks up a localized string similar to Source System. /// @@ -142,7 +196,7 @@ namespace BodyshopUploader.Properties { } /// - /// Looks up a localized string similar to Start All Monitors. + /// Looks up a localized string similar to Start _All Monitors. /// public static string Label_StartAllMonitors { get { @@ -151,7 +205,34 @@ namespace BodyshopUploader.Properties { } /// - /// Looks up a localized string similar to Stop All Monitors. + /// Looks up a localized string similar to Status. + /// + public static string Label_Status { + get { + return ResourceManager.GetString("Label_Status", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Started. + /// + public static string Label_Status_Started { + get { + return ResourceManager.GetString("Label_Status_Started", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Stopped. + /// + public static string Label_Status_Stopped { + get { + return ResourceManager.GetString("Label_Status_Stopped", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to _Stop All Monitors. /// public static string Label_StopAllMonitors { get { @@ -204,6 +285,24 @@ namespace BodyshopUploader.Properties { } } + /// + /// Looks up a localized string similar to Bodyshop Partner by ImEX Systems Inc.. + /// + public static string Title_Login_Header { + get { + return ResourceManager.GetString("Title_Login_Header", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Bodyshop Partner | ImEX Systems Inc.. + /// + public static string Title_Main { + get { + return ResourceManager.GetString("Title_Main", resourceCulture); + } + } + /// /// Looks up a localized string similar to Username. /// diff --git a/BodyshopUploader/Properties/Resources.resx b/BodyshopUploader/Properties/Resources.resx index a2e1b8f..1d758ed 100644 --- a/BodyshopUploader/Properties/Resources.resx +++ b/BodyshopUploader/Properties/Resources.resx @@ -132,6 +132,15 @@ Exit + + Actions + + + Active Shop + + + Add _Folder + Add Path @@ -141,14 +150,32 @@ File Path + + Monitor Status + + + Re_move + + + _Restart + Source System - Start All Monitors + Start _All Monitors + + + Status + + + Started + + + Stopped - Stop All Monitors + _Stop All Monitors Login @@ -165,6 +192,12 @@ Login - Bodyshop Uploader + + Bodyshop Partner by ImEX Systems Inc. + + + Bodyshop Partner | ImEX Systems Inc. + Username diff --git a/BodyshopUploader/Utils/UiConverters.cs b/BodyshopUploader/Utils/UiConverters.cs index b49dc57..cc8d6e2 100644 --- a/BodyshopUploader/Utils/UiConverters.cs +++ b/BodyshopUploader/Utils/UiConverters.cs @@ -41,4 +41,20 @@ namespace BodyshopUploader.Utils } } + public class MonitorStatusConverter : IValueConverter + { + public object Convert(object value, Type targetType, object parameter, CultureInfo culture) + { + if ((bool)value == true) + return Properties.Resources.Label_Status_Started; + else + return Properties.Resources.Label_Status_Stopped; + } + + public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) + { + throw new NotSupportedException("Two-way binding not supported by MonitorStatusConverter"); + } + } + } diff --git a/BodyshopUploader/ViewModels/MainViewModel.commands.cs b/BodyshopUploader/ViewModels/MainViewModel.commands.cs index 954829b..f61345c 100644 --- a/BodyshopUploader/ViewModels/MainViewModel.commands.cs +++ b/BodyshopUploader/ViewModels/MainViewModel.commands.cs @@ -87,6 +87,22 @@ namespace BodyshopUploader.ViewModels } } + private ICommand _restartMonitoringPathCommand; + public ICommand RestartMonitoringPathCommand + { + get + { + if (_restartMonitoringPathCommand == null) + { + _restartMonitoringPathCommand = new RelayCommand( + p => true, + p => ((Models.Monitor)p).StartMonitor() + ); + } + return _restartMonitoringPathCommand; + } + } + private ICommand _stopFolderMonitorsCommand; public ICommand StopFolderMonitorsCommand { diff --git a/BodyshopUploader/Views/Login.xaml b/BodyshopUploader/Views/Login.xaml index 73b017d..f9b9c63 100644 --- a/BodyshopUploader/Views/Login.xaml +++ b/BodyshopUploader/Views/Login.xaml @@ -7,8 +7,8 @@ xmlns:vm="clr-namespace:BodyshopUploader.ViewModels" mc:Ignorable="d" Title="{x:Static p:Resources.Title_Login}" - Height="169.084" - Width="389.618" + Height="300" + Width="475" xmlns:p="clr-namespace:BodyshopUploader.Properties" xmlns:util="clr-namespace:BodyshopUploader.Utils" xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes" @@ -19,15 +19,46 @@ TextOptions.TextRenderingMode="Auto" Background="{DynamicResource MaterialDesignPaper}" FontFamily="{DynamicResource MaterialDesignFont}" - Closing="Window_Closing"> + Closing="Window_Closing" + ResizeMode="NoResize" + WindowStartupLocation="CenterScreen"> + + + + + + + + + + + @@ -35,8 +66,6 @@ VerticalAlignment="Center" /> @@ -45,9 +74,7 @@ + Width="300" /> diff --git a/BodyshopUploader/Views/Main.xaml b/BodyshopUploader/Views/Main.xaml index 092d9ab..776eabe 100644 --- a/BodyshopUploader/Views/Main.xaml +++ b/BodyshopUploader/Views/Main.xaml @@ -5,7 +5,7 @@ xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:local="clr-namespace:BodyshopUploader.Views" mc:Ignorable="d" - Title="Main" + Title="{x:Static p:Resources.Title_Main}" Height="450" xmlns:vm="clr-namespace:BodyshopUploader.ViewModels" Width="800" @@ -27,12 +27,31 @@ + + + + + + + Height="8" /> - - @@ -81,70 +121,84 @@ - + CommandParameter="{Binding .}" + Style="{StaticResource MaterialDesignOutlinedButton}" + Margin="4" + Content="{x:Static p:Resources.Label_Remove}" /> +