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

View file

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

View file

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