Use Colour Emojies.

This commit is contained in:
Private 2024-06-16 17:08:33 +03:30
parent 63d5a2a1be
commit 1d4c5876c9
3 changed files with 81 additions and 82 deletions

View file

@ -11,6 +11,7 @@
xmlns:reactiveui="http://reactiveui.net"
xmlns:resx="clr-namespace:v2rayN.Resx"
xmlns:tb="clr-namespace:H.NotifyIcon;assembly=H.NotifyIcon.Wpf"
xmlns:emoji="clr-namespace:Emoji.Wpf;assembly=Emoji.Wpf"
xmlns:vms="clr-namespace:v2rayN.ViewModels"
Title="v2rayN"
Width="900"
@ -413,7 +414,7 @@
Style="{StaticResource MaterialDesignChoiceChipPrimaryOutlineListBox}">
<ListBox.ItemTemplate>
<DataTemplate>
<TextBlock Text="{Binding remarks}" />
<emoji:TextBlock Text="{Binding remarks}" />
</DataTemplate>
</ListBox.ItemTemplate>
</ListBox>
@ -513,13 +514,12 @@
Width="150"
Margin="8,0"
materialDesign:HintAssist.Hint="{x:Static resx:ResUI.menuRouting}"
DisplayMemberPath="remarks"
FontSize="{DynamicResource StdFontSize}"
Style="{StaticResource MaterialDesignFloatingHintComboBox}" />
</StackPanel>
<StackPanel Margin="8,0" VerticalAlignment="Center">
<TextBlock
<emoji:TextBlock
x:Name="txtRunningServerDisplay"
PreviewMouseDown="txtRunningInfoDisplay_MouseDoubleClick"
Style="{StaticResource StatusbarItem}" />
@ -619,9 +619,14 @@
x:Name="cmbMoveToGroup"
Width="200"
materialDesign:HintAssist.Hint="{x:Static resx:ResUI.menuSubscription}"
DisplayMemberPath="remarks"
FontSize="{DynamicResource StdFontSize}"
Style="{StaticResource MaterialDesignFilledComboBox}" />
Style="{StaticResource MaterialDesignFilledComboBox}">
<ComboBox.ItemTemplate>
<DataTemplate>
<emoji:TextBlock Text="{Binding remarks}" />
</DataTemplate>
</ComboBox.ItemTemplate>
</ComboBox>
</DockPanel>
</MenuItem.Header>
</MenuItem>
@ -840,9 +845,14 @@
x:Name="cmbRoutings"
MaxWidth="300"
materialDesign:HintAssist.Hint="{x:Static resx:ResUI.menuRouting}"
DisplayMemberPath="remarks"
FontSize="{DynamicResource StdFontSize}"
Style="{StaticResource MaterialDesignFilledComboBox}" />
Style="{StaticResource MaterialDesignFilledComboBox}">
<ComboBox.ItemTemplate>
<DataTemplate>
<emoji:TextBlock Text="{Binding remarks}" />
</DataTemplate>
</ComboBox.ItemTemplate>
</ComboBox>
</DockPanel>
</MenuItem.Header>
</MenuItem>

View file

@ -1,88 +1,76 @@
<UserControl
x:Class="v2rayN.Views.MsgView"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:resx="clr-namespace:v2rayN.Resx"
d:DesignHeight="450"
d:DesignWidth="800"
mc:Ignorable="d">
<UserControl x:Class="v2rayN.Views.MsgView"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:resx="clr-namespace:v2rayN.Resx"
xmlns:wpfEmoji="clr-namespace:Emoji.Wpf;assembly=Emoji.Wpf"
d:DesignHeight="450"
d:DesignWidth="800"
mc:Ignorable="d">
<DockPanel Margin="2">
<StackPanel
VerticalAlignment="Center"
DockPanel.Dock="Top"
Orientation="Horizontal">
<TextBlock
Margin="8,0"
VerticalAlignment="Center"
Style="{StaticResource ToolbarTextBlock}"
Text="{x:Static resx:ResUI.MsgInformationTitle}" />
<ComboBox
x:Name="cmbMsgFilter"
Width="200"
Margin="8,0"
materialDesign:HintAssist.Hint="{x:Static resx:ResUI.MsgFilterTitle}"
materialDesign:TextFieldAssist.HasClearButton="True"
IsEditable="True"
Style="{StaticResource DefComboBox}"
TextBoxBase.TextChanged="cmbMsgFilter_TextChanged" />
<TextBlock
Margin="8,0"
VerticalAlignment="Center"
Style="{StaticResource ToolbarTextBlock}"
Text="{x:Static resx:ResUI.TbAutoRefresh}" />
<ToggleButton
x:Name="togAutoRefresh"
Margin="8,0"
HorizontalAlignment="Left"
IsChecked="True" />
<TextBlock
Margin="8,0"
VerticalAlignment="Center"
Style="{StaticResource ToolbarTextBlock}"
Text="{x:Static resx:ResUI.TbAutoScrollToEnd}" />
<ToggleButton
x:Name="togScrollToEnd"
Margin="8,0"
HorizontalAlignment="Left"
IsChecked="True" />
<StackPanel VerticalAlignment="Center"
DockPanel.Dock="Top"
Orientation="Horizontal">
<TextBlock Margin="8,0"
VerticalAlignment="Center"
Style="{StaticResource ToolbarTextBlock}"
Text="{x:Static resx:ResUI.MsgInformationTitle}" />
<ComboBox x:Name="cmbMsgFilter"
Width="200"
Margin="8,0"
materialDesign:HintAssist.Hint="{x:Static resx:ResUI.MsgFilterTitle}"
materialDesign:TextFieldAssist.HasClearButton="True"
IsEditable="True"
Style="{StaticResource DefComboBox}"
TextBoxBase.TextChanged="cmbMsgFilter_TextChanged" />
<TextBlock Margin="8,0"
VerticalAlignment="Center"
Style="{StaticResource ToolbarTextBlock}"
Text="{x:Static resx:ResUI.TbAutoRefresh}" />
<ToggleButton x:Name="togAutoRefresh"
Margin="8,0"
HorizontalAlignment="Left"
IsChecked="True" />
<TextBlock Margin="8,0"
VerticalAlignment="Center"
Style="{StaticResource ToolbarTextBlock}"
Text="{x:Static resx:ResUI.TbAutoScrollToEnd}" />
<ToggleButton x:Name="togScrollToEnd"
Margin="8,0"
HorizontalAlignment="Left"
IsChecked="True" />
</StackPanel>
<TextBox
Name="txtMsg"
BorderThickness="0"
FontSize="{DynamicResource StdFontSizeMsg}"
HorizontalScrollBarVisibility="Auto"
IsReadOnly="True"
IsReadOnlyCaretVisible="True"
TextAlignment="Left"
TextWrapping="Wrap"
VerticalScrollBarVisibility="Visible">
<TextBox.ContextMenu>
<wpfEmoji:TextBox x:Name="txtMsg"
BorderThickness="0"
FontSize="{DynamicResource StdFontSizeMsg}"
HorizontalScrollBarVisibility="Auto"
IsReadOnly="True"
IsReadOnlyCaretVisible="True"
TextAlignment="Left"
TextWrapping="Wrap"
VerticalScrollBarVisibility="Visible">
<wpfEmoji:TextBox.ContextMenu>
<ContextMenu Style="{StaticResource DefContextMenu}">
<MenuItem
x:Name="menuMsgViewSelectAll"
Height="{StaticResource MenuItemHeight}"
Click="menuMsgViewSelectAll_Click"
Header="{x:Static resx:ResUI.menuMsgViewSelectAll}" />
Click="menuMsgViewSelectAll_Click"
Header="{x:Static resx:ResUI.menuMsgViewSelectAll}" />
<MenuItem
x:Name="menuMsgViewCopy"
Height="{StaticResource MenuItemHeight}"
Click="menuMsgViewCopy_Click"
Header="{x:Static resx:ResUI.menuMsgViewCopy}" />
Click="menuMsgViewCopy_Click"
Header="{x:Static resx:ResUI.menuMsgViewCopy}" />
<MenuItem
x:Name="menuMsgViewCopyAll"
Height="{StaticResource MenuItemHeight}"
Click="menuMsgViewCopyAll_Click"
Header="{x:Static resx:ResUI.menuMsgViewCopyAll}" />
Click="menuMsgViewCopyAll_Click"
Header="{x:Static resx:ResUI.menuMsgViewCopyAll}" />
<MenuItem
x:Name="menuMsgViewClear"
Height="{StaticResource MenuItemHeight}"
Click="menuMsgViewClear_Click"
Header="{x:Static resx:ResUI.menuMsgViewClear}" />
Click="menuMsgViewClear_Click"
Header="{x:Static resx:ResUI.menuMsgViewClear}" />
</ContextMenu>
</TextBox.ContextMenu>
</TextBox>
</wpfEmoji:TextBox.ContextMenu>
</wpfEmoji:TextBox>
</DockPanel>
</UserControl>

View file

@ -16,6 +16,7 @@
<ItemGroup>
<PackageReference Include="Downloader" Version="3.0.6" />
<PackageReference Include="Emoji.Wpf" Version="0.3.4" />
<PackageReference Include="MaterialDesignThemes" Version="5.0.0" />
<PackageReference Include="H.NotifyIcon.Wpf" Version="2.0.131" />
<PackageReference Include="QRCoder.Xaml" Version="1.5.1" />