SEBWIN-559, #378: Removed animated border of runtime window in attempt to fix performance issue in virtualized environments.
This commit is contained in:
parent
291c107fdd
commit
3dda11956e
6 changed files with 6 additions and 84 deletions
|
@ -18,21 +18,8 @@ namespace SafeExamBrowser.UserInterface.Desktop.ViewModels
|
||||||
{
|
{
|
||||||
internal class RuntimeWindowViewModel : ProgressIndicatorViewModel
|
internal class RuntimeWindowViewModel : ProgressIndicatorViewModel
|
||||||
{
|
{
|
||||||
private Visibility animatedBorderVisibility, progressBarVisibility;
|
private Visibility progressBarVisibility;
|
||||||
private TextBlock textBlock;
|
private readonly TextBlock textBlock;
|
||||||
|
|
||||||
public Visibility AnimatedBorderVisibility
|
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
return animatedBorderVisibility;
|
|
||||||
}
|
|
||||||
set
|
|
||||||
{
|
|
||||||
animatedBorderVisibility = value;
|
|
||||||
OnPropertyChanged(nameof(AnimatedBorderVisibility));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public Visibility ProgressBarVisibility
|
public Visibility ProgressBarVisibility
|
||||||
{
|
{
|
||||||
|
|
|
@ -15,24 +15,6 @@
|
||||||
</ResourceDictionary>
|
</ResourceDictionary>
|
||||||
</Window.Resources>
|
</Window.Resources>
|
||||||
<Grid>
|
<Grid>
|
||||||
<Border x:Name="AnimatedBorder" Panel.ZIndex="10" BorderBrush="DodgerBlue" BorderThickness="5" Visibility="{Binding AnimatedBorderVisibility}">
|
|
||||||
<Border.Effect>
|
|
||||||
<BlurEffect Radius="10" />
|
|
||||||
</Border.Effect>
|
|
||||||
<Border.Style>
|
|
||||||
<Style TargetType="Border">
|
|
||||||
<Style.Triggers>
|
|
||||||
<EventTrigger RoutedEvent="FrameworkElement.Loaded">
|
|
||||||
<BeginStoryboard>
|
|
||||||
<Storyboard>
|
|
||||||
<DoubleAnimation AutoReverse="True" Storyboard.TargetProperty="Opacity" From="0.2" To="1.0" Duration="0:0:2.5" RepeatBehavior="Forever" />
|
|
||||||
</Storyboard>
|
|
||||||
</BeginStoryboard>
|
|
||||||
</EventTrigger>
|
|
||||||
</Style.Triggers>
|
|
||||||
</Style>
|
|
||||||
</Border.Style>
|
|
||||||
</Border>
|
|
||||||
<Border BorderBrush="DodgerBlue" BorderThickness="1">
|
<Border BorderBrush="DodgerBlue" BorderThickness="1">
|
||||||
<Grid Margin="20">
|
<Grid Margin="20">
|
||||||
<Grid.RowDefinitions>
|
<Grid.RowDefinitions>
|
||||||
|
|
|
@ -36,14 +36,7 @@ namespace SafeExamBrowser.UserInterface.Desktop.Windows
|
||||||
|
|
||||||
public bool ShowProgressBar
|
public bool ShowProgressBar
|
||||||
{
|
{
|
||||||
set
|
set => Dispatcher.Invoke(() => model.ProgressBarVisibility = value ? Visibility.Visible : Visibility.Hidden);
|
||||||
{
|
|
||||||
Dispatcher.Invoke(() =>
|
|
||||||
{
|
|
||||||
model.AnimatedBorderVisibility = value ? Visibility.Hidden : Visibility.Visible;
|
|
||||||
model.ProgressBarVisibility = value ? Visibility.Visible : Visibility.Hidden;
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public bool TopMost
|
public bool TopMost
|
||||||
|
@ -151,7 +144,6 @@ namespace SafeExamBrowser.UserInterface.Desktop.Windows
|
||||||
InfoTextBlock.Inlines.Add(new Run(appConfig.ProgramCopyright) { FontSize = 10, Foreground = Brushes.Gray });
|
InfoTextBlock.Inlines.Add(new Run(appConfig.ProgramCopyright) { FontSize = 10, Foreground = Brushes.Gray });
|
||||||
|
|
||||||
model = new RuntimeWindowViewModel(LogTextBlock);
|
model = new RuntimeWindowViewModel(LogTextBlock);
|
||||||
AnimatedBorder.DataContext = model;
|
|
||||||
ProgressBar.DataContext = model;
|
ProgressBar.DataContext = model;
|
||||||
StatusTextBlock.DataContext = model;
|
StatusTextBlock.DataContext = model;
|
||||||
|
|
||||||
|
|
|
@ -18,21 +18,8 @@ namespace SafeExamBrowser.UserInterface.Mobile.ViewModels
|
||||||
{
|
{
|
||||||
internal class RuntimeWindowViewModel : ProgressIndicatorViewModel
|
internal class RuntimeWindowViewModel : ProgressIndicatorViewModel
|
||||||
{
|
{
|
||||||
private Visibility animatedBorderVisibility, progressBarVisibility;
|
private Visibility progressBarVisibility;
|
||||||
private TextBlock textBlock;
|
private readonly TextBlock textBlock;
|
||||||
|
|
||||||
public Visibility AnimatedBorderVisibility
|
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
return animatedBorderVisibility;
|
|
||||||
}
|
|
||||||
set
|
|
||||||
{
|
|
||||||
animatedBorderVisibility = value;
|
|
||||||
OnPropertyChanged(nameof(AnimatedBorderVisibility));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public Visibility ProgressBarVisibility
|
public Visibility ProgressBarVisibility
|
||||||
{
|
{
|
||||||
|
|
|
@ -15,24 +15,6 @@
|
||||||
</ResourceDictionary>
|
</ResourceDictionary>
|
||||||
</Window.Resources>
|
</Window.Resources>
|
||||||
<Grid>
|
<Grid>
|
||||||
<Border x:Name="AnimatedBorder" Panel.ZIndex="10" BorderBrush="DodgerBlue" BorderThickness="5" Visibility="{Binding AnimatedBorderVisibility}">
|
|
||||||
<Border.Effect>
|
|
||||||
<BlurEffect Radius="10" />
|
|
||||||
</Border.Effect>
|
|
||||||
<Border.Style>
|
|
||||||
<Style TargetType="Border">
|
|
||||||
<Style.Triggers>
|
|
||||||
<EventTrigger RoutedEvent="FrameworkElement.Loaded">
|
|
||||||
<BeginStoryboard>
|
|
||||||
<Storyboard>
|
|
||||||
<DoubleAnimation AutoReverse="True" Storyboard.TargetProperty="Opacity" From="0.2" To="1.0" Duration="0:0:2.5" RepeatBehavior="Forever" />
|
|
||||||
</Storyboard>
|
|
||||||
</BeginStoryboard>
|
|
||||||
</EventTrigger>
|
|
||||||
</Style.Triggers>
|
|
||||||
</Style>
|
|
||||||
</Border.Style>
|
|
||||||
</Border>
|
|
||||||
<Border BorderBrush="DodgerBlue" BorderThickness="1">
|
<Border BorderBrush="DodgerBlue" BorderThickness="1">
|
||||||
<Grid Margin="20">
|
<Grid Margin="20">
|
||||||
<Grid.RowDefinitions>
|
<Grid.RowDefinitions>
|
||||||
|
|
|
@ -36,14 +36,7 @@ namespace SafeExamBrowser.UserInterface.Mobile.Windows
|
||||||
|
|
||||||
public bool ShowProgressBar
|
public bool ShowProgressBar
|
||||||
{
|
{
|
||||||
set
|
set => Dispatcher.Invoke(() => model.ProgressBarVisibility = value ? Visibility.Visible : Visibility.Hidden);
|
||||||
{
|
|
||||||
Dispatcher.Invoke(() =>
|
|
||||||
{
|
|
||||||
model.AnimatedBorderVisibility = value ? Visibility.Hidden : Visibility.Visible;
|
|
||||||
model.ProgressBarVisibility = value ? Visibility.Visible : Visibility.Hidden;
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public bool TopMost
|
public bool TopMost
|
||||||
|
@ -151,7 +144,6 @@ namespace SafeExamBrowser.UserInterface.Mobile.Windows
|
||||||
InfoTextBlock.Inlines.Add(new Run(appConfig.ProgramCopyright) { FontSize = 10, Foreground = Brushes.Gray });
|
InfoTextBlock.Inlines.Add(new Run(appConfig.ProgramCopyright) { FontSize = 10, Foreground = Brushes.Gray });
|
||||||
|
|
||||||
model = new RuntimeWindowViewModel(LogTextBlock);
|
model = new RuntimeWindowViewModel(LogTextBlock);
|
||||||
AnimatedBorder.DataContext = model;
|
|
||||||
ProgressBar.DataContext = model;
|
ProgressBar.DataContext = model;
|
||||||
StatusTextBlock.DataContext = model;
|
StatusTextBlock.DataContext = model;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue