Added option to keep log window topmost.
This commit is contained in:
parent
6ab7047639
commit
84be7afa97
6 changed files with 11 additions and 3 deletions
|
@ -27,6 +27,7 @@ namespace SafeExamBrowser.I18n.Contracts
|
||||||
LockScreen_TerminateOption,
|
LockScreen_TerminateOption,
|
||||||
LockScreen_Title,
|
LockScreen_Title,
|
||||||
LockScreen_UnlockButton,
|
LockScreen_UnlockButton,
|
||||||
|
LogWindow_AlwaysOnTop,
|
||||||
LogWindow_AutoScroll,
|
LogWindow_AutoScroll,
|
||||||
LogWindow_Title,
|
LogWindow_Title,
|
||||||
MessageBox_ApplicationAutoTerminationDataLossWarning,
|
MessageBox_ApplicationAutoTerminationDataLossWarning,
|
||||||
|
|
|
@ -39,8 +39,11 @@
|
||||||
<Entry key="LockScreen_UnlockButton">
|
<Entry key="LockScreen_UnlockButton">
|
||||||
Unlock
|
Unlock
|
||||||
</Entry>
|
</Entry>
|
||||||
|
<Entry key="LogWindow_AlwaysOnTop">
|
||||||
|
Always on top
|
||||||
|
</Entry>
|
||||||
<Entry key="LogWindow_AutoScroll">
|
<Entry key="LogWindow_AutoScroll">
|
||||||
Auto-Scroll
|
Auto-scroll content
|
||||||
</Entry>
|
</Entry>
|
||||||
<Entry key="LogWindow_Title">
|
<Entry key="LogWindow_Title">
|
||||||
Application Log
|
Application Log
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||||
xmlns:local="clr-namespace:SafeExamBrowser.UserInterface.Desktop"
|
xmlns:local="clr-namespace:SafeExamBrowser.UserInterface.Desktop"
|
||||||
mc:Ignorable="d" Title="{Binding Path=WindowTitle}" Background="Black" Foreground="White" Height="750" Width="1000" MinHeight="350"
|
mc:Ignorable="d" Title="{Binding Path=WindowTitle}" Background="Black" Foreground="White" Height="750" Width="1000" MinHeight="350"
|
||||||
MinWidth="350" WindowStartupLocation="CenterScreen" Icon="./Images/LogNotification.ico">
|
MinWidth="350" Topmost="True" WindowStartupLocation="CenterScreen" Icon="./Images/LogNotification.ico">
|
||||||
<Window.Resources>
|
<Window.Resources>
|
||||||
<ResourceDictionary>
|
<ResourceDictionary>
|
||||||
<ResourceDictionary.MergedDictionaries>
|
<ResourceDictionary.MergedDictionaries>
|
||||||
|
@ -20,6 +20,7 @@
|
||||||
</Grid.RowDefinitions>
|
</Grid.RowDefinitions>
|
||||||
<StackPanel Grid.Row="0" Background="White" Orientation="Horizontal">
|
<StackPanel Grid.Row="0" Background="White" Orientation="Horizontal">
|
||||||
<CheckBox Cursor="Hand" IsChecked="{Binding AutoScroll}" Margin="5" VerticalContentAlignment="Center" Content="{Binding AutoScrollTitle}" />
|
<CheckBox Cursor="Hand" IsChecked="{Binding AutoScroll}" Margin="5" VerticalContentAlignment="Center" Content="{Binding AutoScrollTitle}" />
|
||||||
|
<CheckBox Cursor="Hand" IsChecked="{Binding Path=Topmost, RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=Window}}" Margin="5" VerticalContentAlignment="Center" Content="{Binding TopmostTitle}" />
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
<ScrollViewer x:Name="ScrollViewer" Grid.Row="1" HorizontalScrollBarVisibility="Auto" Padding="5,5,5,0" VerticalScrollBarVisibility="Auto"
|
<ScrollViewer x:Name="ScrollViewer" Grid.Row="1" HorizontalScrollBarVisibility="Auto" Padding="5,5,5,0" VerticalScrollBarVisibility="Auto"
|
||||||
Template="{StaticResource SmallBarScrollViewer}">
|
Template="{StaticResource SmallBarScrollViewer}">
|
||||||
|
|
|
@ -25,6 +25,7 @@ namespace SafeExamBrowser.UserInterface.Desktop.ViewModels
|
||||||
|
|
||||||
public bool AutoScroll { get; set; } = true;
|
public bool AutoScroll { get; set; } = true;
|
||||||
public string AutoScrollTitle => text.Get(TextKey.LogWindow_AutoScroll);
|
public string AutoScrollTitle => text.Get(TextKey.LogWindow_AutoScroll);
|
||||||
|
public string TopmostTitle => text.Get(TextKey.LogWindow_AlwaysOnTop);
|
||||||
public string WindowTitle => text.Get(TextKey.LogWindow_Title);
|
public string WindowTitle => text.Get(TextKey.LogWindow_Title);
|
||||||
|
|
||||||
public LogViewModel(IText text, ScrollViewer scrollViewer, TextBlock textBlock)
|
public LogViewModel(IText text, ScrollViewer scrollViewer, TextBlock textBlock)
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||||
xmlns:local="clr-namespace:SafeExamBrowser.UserInterface.Mobile"
|
xmlns:local="clr-namespace:SafeExamBrowser.UserInterface.Mobile"
|
||||||
mc:Ignorable="d" Title="{Binding Path=WindowTitle}" Background="Black" Foreground="White" Height="750" Width="1000" MinHeight="350"
|
mc:Ignorable="d" Title="{Binding Path=WindowTitle}" Background="Black" Foreground="White" Height="750" Width="1000" MinHeight="350"
|
||||||
MinWidth="350" WindowState="Maximized" WindowStartupLocation="CenterScreen" Icon="./Images/LogNotification.ico">
|
MinWidth="350" Topmost="True" WindowState="Maximized" WindowStartupLocation="CenterScreen" Icon="./Images/LogNotification.ico">
|
||||||
<Window.Resources>
|
<Window.Resources>
|
||||||
<ResourceDictionary>
|
<ResourceDictionary>
|
||||||
<ResourceDictionary.MergedDictionaries>
|
<ResourceDictionary.MergedDictionaries>
|
||||||
|
@ -20,6 +20,7 @@
|
||||||
</Grid.RowDefinitions>
|
</Grid.RowDefinitions>
|
||||||
<StackPanel Grid.Row="0" Background="White" Orientation="Horizontal">
|
<StackPanel Grid.Row="0" Background="White" Orientation="Horizontal">
|
||||||
<CheckBox Cursor="Hand" IsChecked="{Binding AutoScroll}" Margin="5" VerticalContentAlignment="Center" Content="{Binding AutoScrollTitle}" />
|
<CheckBox Cursor="Hand" IsChecked="{Binding AutoScroll}" Margin="5" VerticalContentAlignment="Center" Content="{Binding AutoScrollTitle}" />
|
||||||
|
<CheckBox Cursor="Hand" IsChecked="{Binding Path=Topmost, RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=Window}}" Margin="5" VerticalContentAlignment="Center" Content="{Binding TopmostTitle}" />
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
<ScrollViewer x:Name="ScrollViewer" Grid.Row="1" HorizontalScrollBarVisibility="Auto" Padding="5,5,5,0" PanningMode="Both"
|
<ScrollViewer x:Name="ScrollViewer" Grid.Row="1" HorizontalScrollBarVisibility="Auto" Padding="5,5,5,0" PanningMode="Both"
|
||||||
VerticalScrollBarVisibility="Auto" Template="{StaticResource SmallBarScrollViewer}">
|
VerticalScrollBarVisibility="Auto" Template="{StaticResource SmallBarScrollViewer}">
|
||||||
|
|
|
@ -25,6 +25,7 @@ namespace SafeExamBrowser.UserInterface.Mobile.ViewModels
|
||||||
|
|
||||||
public bool AutoScroll { get; set; } = true;
|
public bool AutoScroll { get; set; } = true;
|
||||||
public string AutoScrollTitle => text.Get(TextKey.LogWindow_AutoScroll);
|
public string AutoScrollTitle => text.Get(TextKey.LogWindow_AutoScroll);
|
||||||
|
public string TopmostTitle => text.Get(TextKey.LogWindow_AlwaysOnTop);
|
||||||
public string WindowTitle => text.Get(TextKey.LogWindow_Title);
|
public string WindowTitle => text.Get(TextKey.LogWindow_Title);
|
||||||
|
|
||||||
public LogViewModel(IText text, ScrollViewer scrollViewer, TextBlock textBlock)
|
public LogViewModel(IText text, ScrollViewer scrollViewer, TextBlock textBlock)
|
||||||
|
|
Loading…
Reference in a new issue