diff options
Diffstat (limited to 'win/CS/HandBrakeWPF/Views')
-rw-r--r-- | win/CS/HandBrakeWPF/Views/LogView.xaml | 22 | ||||
-rw-r--r-- | win/CS/HandBrakeWPF/Views/LogView.xaml.cs | 6 |
2 files changed, 26 insertions, 2 deletions
diff --git a/win/CS/HandBrakeWPF/Views/LogView.xaml b/win/CS/HandBrakeWPF/Views/LogView.xaml index 878fd430a..4745203ba 100644 --- a/win/CS/HandBrakeWPF/Views/LogView.xaml +++ b/win/CS/HandBrakeWPF/Views/LogView.xaml @@ -17,6 +17,7 @@ <RowDefinition Height="Auto" />
<RowDefinition Height="*" />
</Grid.RowDefinitions>
+
<ToolBar Grid.Row="0"
ToolBar.OverflowMode="Never"
ToolBarTray.IsLocked="True"
@@ -38,7 +39,26 @@ </ToolBar>
- <TextBox Grid.Row="2" ScrollViewer.VerticalScrollBarVisibility="Visible" TextWrapping="Wrap" x:Name="logText" />
+ <TextBox Grid.Row="2" ScrollViewer.VerticalScrollBarVisibility="Visible" TextWrapping="Wrap" x:Name="logText">
+
+ <TextBox.ContextMenu>
+ <ContextMenu>
+ <MenuItem Header="{x:Static Properties:ResourcesUI.LogView_CopyClipboard}" cal:Message.Attach="[Event Click] = [Action CopyLog]" >
+ <MenuItem.Icon>
+ <Image Width="16" Source="Images/copy.png" />
+ </MenuItem.Icon>
+ </MenuItem>
+ <MenuItem Header="{x:Static Properties:ResourcesUI.LogView_OpenLogDir}" cal:Message.Attach="[Event Click] = [Action OpenLogDirectory]">
+ <MenuItem.Icon>
+ <Image Width="16" Source="Images/folder.png" />
+ </MenuItem.Icon>
+ </MenuItem>
+ <Separator />
+ <MenuItem Header="Auto Scroll" IsCheckable="True" IsChecked="True" x:Name="AutoScroll" />
+
+ </ContextMenu>
+ </TextBox.ContextMenu>
+ </TextBox>
</Grid>
diff --git a/win/CS/HandBrakeWPF/Views/LogView.xaml.cs b/win/CS/HandBrakeWPF/Views/LogView.xaml.cs index af07ae509..2ab427752 100644 --- a/win/CS/HandBrakeWPF/Views/LogView.xaml.cs +++ b/win/CS/HandBrakeWPF/Views/LogView.xaml.cs @@ -77,7 +77,11 @@ namespace HandBrakeWPF.Views {
// This works better than Data Binding because of the scroll.
this.logText.AppendText(Environment.NewLine + e.Log.Content);
- this.logText.ScrollToEnd();
+
+ if (this.AutoScroll.IsChecked)
+ {
+ this.logText.ScrollToEnd();
+ }
}
}
|