Files
DHR60 9664ee380e ViewModel-First (#9621)
* Interaction

* Remove view action

* ViewModel-first

* MainGirdOrientation Hot Reload

* Fix avalonia preview

* Remove CloseWindowInteraction

* Fix

* Avoid threading issues

* Fix

* ProfilesSelect

* Try fix previewer

* Remove AppEvents.ProfilesRefreshRequested

* Remove AppEvents.SubscriptionsRefreshRequested

* Remove AppEvents.ProxiesReloadRequested

* Remove AppEvents.AdjustMainLvColWidthRequested

* Remove AppEvents.SetDefaultServerRequested

* Remove AppEvents.RoutingsMenuRefreshRequested

* Remove AppEvents.TestServerRequested

* Remove AppEvents.InboundDisplayRequested

* Remove AppEvents.SubscriptionsUpdateRequested

* Remove AppEvents.ShowHideWindowRequested

* Remove AppEvents.ReloadRequested

* Remove AppEvents.AddServerRequested

* Fix
2026-07-14 09:05:05 +08:00

105 lines
4.3 KiB
XML

<UserControl
x:Class="v2rayN.Desktop.Views.MsgView"
xmlns="https://github.com/avaloniaui"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:avaloniaEdit="clr-namespace:AvaloniaEdit;assembly=AvaloniaEdit"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:dd="clr-namespace:v2rayN.Desktop.DesignData"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:resx="clr-namespace:ServiceLib.Resx;assembly=ServiceLib"
d:DesignHeight="450"
d:DesignWidth="800"
Design.DataContext="{x:Static dd:DesignData.Msg}"
mc:Ignorable="d">
<DockPanel Margin="2">
<WrapPanel
Margin="{StaticResource Margin4}"
VerticalAlignment="Center"
DockPanel.Dock="Top"
Orientation="Horizontal">
<TextBox
x:Name="cmbMsgFilter"
Width="200"
Margin="{StaticResource MarginLr8}"
VerticalContentAlignment="Center"
PlaceholderText="{x:Static resx:ResUI.MsgFilterTitle}" />
<Button
x:Name="btnCopy"
Margin="{StaticResource MarginLr8}"
Classes="IconButton Success"
Click="menuMsgViewCopyAll_Click"
ToolTip.Tip="{x:Static resx:ResUI.menuMsgViewCopyAll}">
<Button.Content>
<PathIcon Data="{StaticResource SemiIconCopy}" />
</Button.Content>
</Button>
<Button
x:Name="btnClear"
Margin="{StaticResource MarginLr8}"
Classes="IconButton Success"
Click="menuMsgViewClear_Click"
ToolTip.Tip="{x:Static resx:ResUI.menuMsgViewClear}">
<Button.Content>
<PathIcon Data="{StaticResource SemiIconDelete}" />
</Button.Content>
</Button>
<TextBlock
Margin="{StaticResource MarginLr8}"
VerticalAlignment="Center"
Text="{x:Static resx:ResUI.TbAutoRefresh}" />
<ToggleSwitch
x:Name="togAutoRefresh"
Margin="{StaticResource MarginLr8}"
HorizontalAlignment="Left"
IsChecked="True"
Theme="{DynamicResource SimpleToggleSwitch}" />
<TextBlock
Margin="{StaticResource MarginLr8}"
VerticalAlignment="Center"
Text="{x:Static resx:ResUI.TbAutoScrollToEnd}" />
<ToggleSwitch
x:Name="togScrollToEnd"
Margin="{StaticResource MarginLr8}"
HorizontalAlignment="Left"
IsChecked="True"
Theme="{DynamicResource SimpleToggleSwitch}" />
</WrapPanel>
<avaloniaEdit:TextEditor
Name="txtMsg"
Margin="{StaticResource Margin8}"
IsReadOnly="True"
VerticalScrollBarVisibility="Auto"
WordWrap="True">
<avaloniaEdit:TextEditor.Options>
<avaloniaEdit:TextEditorOptions AllowScrollBelowDocument="False" />
</avaloniaEdit:TextEditor.Options>
<avaloniaEdit:TextEditor.ContextFlyout>
<MenuFlyout>
<MenuItem
x:Name="menuMsgViewSelectAll"
Click="menuMsgViewSelectAll_Click"
Header="{x:Static resx:ResUI.menuMsgViewSelectAll}"
InputGesture="Ctrl+A" />
<MenuItem
x:Name="menuMsgViewCopy"
Click="menuMsgViewCopy_Click"
Header="{x:Static resx:ResUI.menuMsgViewCopy}"
InputGesture="Ctrl+C" />
<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}" />
</MenuFlyout>
</avaloniaEdit:TextEditor.ContextFlyout>
</avaloniaEdit:TextEditor>
</DockPanel>
</UserControl>