v2rayN/v2rayN/v2rayN.Desktop/Views/MsgView.axaml

105 lines
4.5 KiB
Text
Raw Normal View History

<UserControl
x:Class="v2rayN.Desktop.Views.MsgView"
xmlns="https://github.com/avaloniaui"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:resx="clr-namespace:ServiceLib.Resx;assembly=ServiceLib"
d:DesignHeight="450"
d:DesignWidth="800"
mc:Ignorable="d">
<DockPanel Margin="2">
<WrapPanel
2025-02-20 10:34:25 +00:00
Margin="{StaticResource Margin4}"
2025-02-24 11:07:05 +00:00
VerticalAlignment="Center"
DockPanel.Dock="Top"
Orientation="Horizontal">
<TextBox
x:Name="cmbMsgFilter"
Width="200"
2025-02-20 10:34:25 +00:00
Margin="{StaticResource MarginLr8}"
VerticalContentAlignment="Center"
2024-09-16 10:21:30 +00:00
Watermark="{x:Static resx:ResUI.MsgFilterTitle}" />
<Button
x:Name="btnCopy"
2025-02-20 06:32:38 +00:00
Width="{StaticResource IconButtonWidth}"
Height="{StaticResource IconButtonHeight}"
2025-02-20 10:34:25 +00:00
Margin="{StaticResource MarginLr8}"
Classes="Success"
Click="menuMsgViewCopyAll_Click"
2024-10-05 06:53:34 +00:00
Theme="{DynamicResource BorderlessButton}"
ToolTip.Tip="{x:Static resx:ResUI.menuMsgViewCopyAll}">
<Button.Content>
2025-02-20 06:32:38 +00:00
<PathIcon Data="{StaticResource building_copy}" Foreground="{DynamicResource ButtonDefaultTertiaryForeground}" />
</Button.Content>
</Button>
<Button
x:Name="btnClear"
2025-02-24 11:07:05 +00:00
Width="{StaticResource IconButtonWidth}"
Height="{StaticResource IconButtonHeight}"
2025-02-20 10:34:25 +00:00
Margin="{StaticResource MarginLr8}"
Classes="Success"
Click="menuMsgViewClear_Click"
2024-10-05 06:53:34 +00:00
Theme="{DynamicResource BorderlessButton}"
ToolTip.Tip="{x:Static resx:ResUI.menuMsgViewClear}">
<Button.Content>
2025-02-20 06:32:38 +00:00
<PathIcon Data="{StaticResource building_delete}" Foreground="{DynamicResource ButtonDefaultTertiaryForeground}" />
</Button.Content>
</Button>
<TextBlock
2025-02-20 10:34:25 +00:00
Margin="{StaticResource MarginLr8}"
VerticalAlignment="Center"
Text="{x:Static resx:ResUI.TbAutoRefresh}" />
<ToggleSwitch
x:Name="togAutoRefresh"
2025-02-20 10:34:25 +00:00
Margin="{StaticResource MarginLr8}"
HorizontalAlignment="Left"
2024-09-16 10:21:30 +00:00
IsChecked="True"
2025-01-09 13:03:17 +00:00
Theme="{DynamicResource SimpleToggleSwitch}" />
<TextBlock
2025-02-20 10:34:25 +00:00
Margin="{StaticResource MarginLr8}"
VerticalAlignment="Center"
Text="{x:Static resx:ResUI.TbAutoScrollToEnd}" />
<ToggleSwitch
x:Name="togScrollToEnd"
2025-02-20 10:34:25 +00:00
Margin="{StaticResource MarginLr8}"
HorizontalAlignment="Left"
2024-09-16 10:21:30 +00:00
IsChecked="True"
2025-01-09 13:03:17 +00:00
Theme="{DynamicResource SimpleToggleSwitch}" />
</WrapPanel>
<ScrollViewer x:Name="msgScrollViewer" VerticalScrollBarVisibility="Auto">
<SelectableTextBlock
Name="txtMsg"
2025-08-10 01:17:15 +00:00
Margin="{StaticResource Margin8}"
VerticalAlignment="Stretch"
Classes="TextArea"
TextAlignment="Left"
TextWrapping="Wrap">
<SelectableTextBlock.ContextMenu>
<ContextMenu>
<MenuItem
x:Name="menuMsgViewSelectAll"
Click="menuMsgViewSelectAll_Click"
Header="{x:Static resx:ResUI.menuMsgViewSelectAll}" />
<MenuItem
x:Name="menuMsgViewCopy"
Click="menuMsgViewCopy_Click"
Header="{x:Static resx:ResUI.menuMsgViewCopy}" />
<MenuItem
x:Name="menuMsgViewCopyAll"
Click="menuMsgViewCopyAll_Click"
Header="{x:Static resx:ResUI.menuMsgViewCopyAll}" />
<MenuItem
x:Name="menuMsgViewClear"
Click="menuMsgViewClear_Click"
Header="{x:Static resx:ResUI.menuMsgViewClear}" />
</ContextMenu>
</SelectableTextBlock.ContextMenu>
</SelectableTextBlock>
</ScrollViewer>
</DockPanel>
2025-02-20 06:32:38 +00:00
</UserControl>