diff --git a/Bloxstrap/Bloxstrap.csproj b/Bloxstrap/Bloxstrap.csproj index 60a5348..84c8b59 100644 --- a/Bloxstrap/Bloxstrap.csproj +++ b/Bloxstrap/Bloxstrap.csproj @@ -14,7 +14,9 @@ - + + + diff --git a/Bloxstrap/Bootstrapper.cs b/Bloxstrap/Bootstrapper.cs index 5b915eb..5d57f8c 100644 --- a/Bloxstrap/Bootstrapper.cs +++ b/Bloxstrap/Bootstrapper.cs @@ -709,6 +709,8 @@ namespace Bloxstrap { Dialog.CancelEnabled = true; Dialog.ProgressStyle = ProgressBarStyle.Continuous; + // Byfron dialog specific + Dialog.VersionVisibility = false; } // compute total bytes to download diff --git a/Bloxstrap/Dialogs/BootstrapperDialogForm.cs b/Bloxstrap/Dialogs/BootstrapperDialogForm.cs index 64e5c5f..3bff244 100644 --- a/Bloxstrap/Dialogs/BootstrapperDialogForm.cs +++ b/Bloxstrap/Dialogs/BootstrapperDialogForm.cs @@ -63,6 +63,9 @@ namespace Bloxstrap.Dialogs _cancelEnabled = value; } } + + // Byfron specific - not required here, bypassing + public bool VersionVisibility { get; set; } #endregion public void ScaleWindow() diff --git a/Bloxstrap/Dialogs/ByfronDialog.xaml b/Bloxstrap/Dialogs/ByfronDialog.xaml index 30dd0ab..6bbaa09 100644 --- a/Bloxstrap/Dialogs/ByfronDialog.xaml +++ b/Bloxstrap/Dialogs/ByfronDialog.xaml @@ -15,6 +15,7 @@ + - + diff --git a/Bloxstrap/Dialogs/ByfronDialog.xaml.cs b/Bloxstrap/Dialogs/ByfronDialog.xaml.cs index 92b01d6..6ac5cce 100644 --- a/Bloxstrap/Dialogs/ByfronDialog.xaml.cs +++ b/Bloxstrap/Dialogs/ByfronDialog.xaml.cs @@ -2,7 +2,7 @@ using System.Windows; using System.Windows.Forms; using System.Windows.Media; - +using System.Windows.Media.Imaging; using Bloxstrap.Enums; using Bloxstrap.Extensions; using Bloxstrap.ViewModels; @@ -58,6 +58,16 @@ namespace Bloxstrap.Dialogs _viewModel.OnPropertyChanged(nameof(_viewModel.CancelButtonVisibility)); } } + + public bool VersionVisibility + { + get => _viewModel.VersionNumberVisibility == Visibility.Collapsed; + set + { + _viewModel.VersionNumberVisibility = (value ? Visibility.Visible : Visibility.Collapsed); + _viewModel.OnPropertyChanged(nameof(_viewModel.VersionNumberVisibility)); + } + } #endregion public ByfronDialog() @@ -75,6 +85,7 @@ namespace Bloxstrap.Dialogs _viewModel.Foreground = new SolidColorBrush(Color.FromRgb(57, 59, 61)); _viewModel.IconColor = new SolidColorBrush(Color.FromRgb(57, 59, 61)); _viewModel.ProgressBarBackground = new SolidColorBrush(Color.FromRgb(189, 190, 190)); + _viewModel.ByfronLogo = new BitmapImage(new Uri("pack://application:,,,/Bloxstrap;component/Resources/ByfronLogoDark.png")); } InitializeComponent(); diff --git a/Bloxstrap/Dialogs/FluentDialog.xaml.cs b/Bloxstrap/Dialogs/FluentDialog.xaml.cs index ff65b08..dd88b7c 100644 --- a/Bloxstrap/Dialogs/FluentDialog.xaml.cs +++ b/Bloxstrap/Dialogs/FluentDialog.xaml.cs @@ -63,6 +63,9 @@ namespace Bloxstrap.Dialogs _viewModel.OnPropertyChanged(nameof(_viewModel.CancelButtonVisibility)); } } + + // Byfron specific - not required here, bypassing + public bool VersionVisibility { get; set; } #endregion public FluentDialog() diff --git a/Bloxstrap/Dialogs/IBootstrapperDialog.cs b/Bloxstrap/Dialogs/IBootstrapperDialog.cs index e66b687..53b816b 100644 --- a/Bloxstrap/Dialogs/IBootstrapperDialog.cs +++ b/Bloxstrap/Dialogs/IBootstrapperDialog.cs @@ -10,6 +10,7 @@ namespace Bloxstrap.Dialogs ProgressBarStyle ProgressStyle { get; set; } int ProgressValue { get; set; } bool CancelEnabled { get; set; } + bool VersionVisibility { get; set; } void ShowBootstrapper(); void CloseBootstrapper(); diff --git a/Bloxstrap/Properties/Resources.Designer.cs b/Bloxstrap/Properties/Resources.Designer.cs index 202cd2e..2e36579 100644 --- a/Bloxstrap/Properties/Resources.Designer.cs +++ b/Bloxstrap/Properties/Resources.Designer.cs @@ -59,7 +59,7 @@ namespace Bloxstrap.Properties { resourceCulture = value; } } - + /// /// Looks up a localized resource of type System.Drawing.Bitmap. /// diff --git a/Bloxstrap/Resources/ByfronLogo.png b/Bloxstrap/Resources/ByfronLogo.png new file mode 100644 index 0000000..5e0c9e8 Binary files /dev/null and b/Bloxstrap/Resources/ByfronLogo.png differ diff --git a/Bloxstrap/Resources/ByfronLogoDark.png b/Bloxstrap/Resources/ByfronLogoDark.png new file mode 100644 index 0000000..614be8e Binary files /dev/null and b/Bloxstrap/Resources/ByfronLogoDark.png differ diff --git a/Bloxstrap/ViewModels/AppearanceViewModel.cs b/Bloxstrap/ViewModels/AppearanceViewModel.cs index ba85815..228385c 100644 --- a/Bloxstrap/ViewModels/AppearanceViewModel.cs +++ b/Bloxstrap/ViewModels/AppearanceViewModel.cs @@ -36,6 +36,8 @@ namespace Bloxstrap.ViewModels dialog.Message = "Style preview - Click Cancel to close"; dialog.CancelEnabled = true; + // Byfron dialog specific + dialog.VersionVisibility = false; dialog.ShowBootstrapper(); } diff --git a/Bloxstrap/ViewModels/ByfronDialogViewModel.cs b/Bloxstrap/ViewModels/ByfronDialogViewModel.cs index 7609046..4b5405c 100644 --- a/Bloxstrap/ViewModels/ByfronDialogViewModel.cs +++ b/Bloxstrap/ViewModels/ByfronDialogViewModel.cs @@ -1,7 +1,10 @@ -using System.ComponentModel; +using System; +using System.ComponentModel; using System.Windows; using System.Windows.Media; +using System.Windows.Media.Imaging; using Bloxstrap.Dialogs; +using Bloxstrap.Extensions; namespace Bloxstrap.ViewModels { @@ -15,6 +18,11 @@ namespace Bloxstrap.ViewModels public Brush Foreground { get; set; } = new SolidColorBrush(Color.FromRgb(239, 239, 239)); public Brush IconColor { get; set; } = new SolidColorBrush(Color.FromRgb(255, 255, 255)); public Brush ProgressBarBackground { get; set; } = new SolidColorBrush(Color.FromRgb(86, 86, 86)); + public ImageSource ByfronLogo { get; set; } = new BitmapImage(new Uri("pack://application:,,,/Bloxstrap;component/Resources/ByfronLogo.png")); + + // When cancel button is visible, version number is hidden. + public Visibility VersionNumberVisibility { get; set; } = Visibility.Collapsed; + public ByfronDialogViewModel(IBootstrapperDialog dialog) : base(dialog) { }