Regression, it didn't have to be over engineered

This commit is contained in:
1011025m 2023-05-13 20:43:13 +08:00
parent 58932f4b34
commit 969dbbbf92
6 changed files with 1 additions and 24 deletions

View File

@ -709,8 +709,6 @@ namespace Bloxstrap
{ {
Dialog.CancelEnabled = true; Dialog.CancelEnabled = true;
Dialog.ProgressStyle = ProgressBarStyle.Continuous; Dialog.ProgressStyle = ProgressBarStyle.Continuous;
// Byfron dialog specific
Dialog.VersionVisibility = false;
} }
// compute total bytes to download // compute total bytes to download
@ -793,11 +791,7 @@ namespace Bloxstrap
} }
if (Dialog is not null) if (Dialog is not null)
{
Dialog.CancelEnabled = false; Dialog.CancelEnabled = false;
// Byfron dialog specific
Dialog.VersionVisibility = true;
}
App.State.Prop.VersionGuid = _latestVersionGuid; App.State.Prop.VersionGuid = _latestVersionGuid;

View File

@ -63,9 +63,6 @@ namespace Bloxstrap.Dialogs
_cancelEnabled = value; _cancelEnabled = value;
} }
} }
// Byfron specific - not required here, bypassing
public bool VersionVisibility { get; set; }
#endregion #endregion
public void ScaleWindow() public void ScaleWindow()

View File

@ -55,16 +55,8 @@ namespace Bloxstrap.Dialogs
set set
{ {
_viewModel.CancelButtonVisibility = (value ? Visibility.Visible : Visibility.Collapsed); _viewModel.CancelButtonVisibility = (value ? Visibility.Visible : Visibility.Collapsed);
_viewModel.VersionNumberVisibility = (value ? Visibility.Collapsed : Visibility.Visible);
_viewModel.OnPropertyChanged(nameof(_viewModel.CancelButtonVisibility)); _viewModel.OnPropertyChanged(nameof(_viewModel.CancelButtonVisibility));
}
}
public bool VersionVisibility
{
get => _viewModel.VersionNumberVisibility == Visibility.Visible;
set
{
_viewModel.VersionNumberVisibility = (value ? Visibility.Visible : Visibility.Collapsed);
_viewModel.OnPropertyChanged(nameof(_viewModel.VersionNumberVisibility)); _viewModel.OnPropertyChanged(nameof(_viewModel.VersionNumberVisibility));
} }
} }

View File

@ -63,9 +63,6 @@ namespace Bloxstrap.Dialogs
_viewModel.OnPropertyChanged(nameof(_viewModel.CancelButtonVisibility)); _viewModel.OnPropertyChanged(nameof(_viewModel.CancelButtonVisibility));
} }
} }
// Byfron specific - not required here, bypassing
public bool VersionVisibility { get; set; }
#endregion #endregion
public FluentDialog() public FluentDialog()

View File

@ -10,7 +10,6 @@ namespace Bloxstrap.Dialogs
ProgressBarStyle ProgressStyle { get; set; } ProgressBarStyle ProgressStyle { get; set; }
int ProgressValue { get; set; } int ProgressValue { get; set; }
bool CancelEnabled { get; set; } bool CancelEnabled { get; set; }
bool VersionVisibility { get; set; }
void ShowBootstrapper(); void ShowBootstrapper();
void CloseBootstrapper(); void CloseBootstrapper();

View File

@ -36,8 +36,6 @@ namespace Bloxstrap.ViewModels
dialog.Message = "Style preview - Click Cancel to close"; dialog.Message = "Style preview - Click Cancel to close";
dialog.CancelEnabled = true; dialog.CancelEnabled = true;
// Byfron dialog specific
dialog.VersionVisibility = false;
dialog.ShowBootstrapper(); dialog.ShowBootstrapper();
} }