Compare commits
2 Commits
main
...
dev_decons
Author | SHA1 | Date |
---|---|---|
DESKTOP-3BO4HSG\ksat | c0c64fb767 | 2 years ago |
DESKTOP-3BO4HSG\ksat | 579661b6f1 | 2 years ago |
@ -1,2 +0,0 @@
|
||||
@echo off
|
||||
rd /s /q "%localappdata%\stranslate"
|
Binary file not shown.
@ -0,0 +1,151 @@
|
||||
<Window x:Class="STranslate.MainWindow"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:vm="clr-namespace:STranslate.ViewModel"
|
||||
mc:Ignorable="d"
|
||||
Name="Mwin"
|
||||
Background="Transparent"
|
||||
WindowStartupLocation="CenterScreen"
|
||||
MouseLeftButtonDown="Window_MouseLeftButtonDown"
|
||||
AllowsTransparency="True"
|
||||
ShowInTaskbar="False"
|
||||
ResizeMode="NoResize"
|
||||
KeyDown="Window_KeyDown"
|
||||
Topmost="True"
|
||||
Deactivated="Window_Deactivated"
|
||||
WindowStyle="None"
|
||||
SizeToContent="Height"
|
||||
Width="400"
|
||||
Icon="/Images/translate.ico">
|
||||
|
||||
<Window.DataContext>
|
||||
<vm:MainVM />
|
||||
</Window.DataContext>
|
||||
|
||||
<Border Style="{DynamicResource BorderMainStyle}">
|
||||
<Grid>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="*" />
|
||||
<RowDefinition Height="5*" />
|
||||
<RowDefinition Height="*" />
|
||||
<RowDefinition Height="7*" />
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<!--header-->
|
||||
<Grid x:Name="Header">
|
||||
<Button x:Name="TopmostBtn"
|
||||
Template="{DynamicResource ButtonTemplateUnTopmost}"
|
||||
Click="Top_Click"/>
|
||||
<Button Width="auto"
|
||||
Template="{DynamicResource ButtonTemplateTheme}"
|
||||
HorizontalAlignment="Right"
|
||||
VerticalAlignment="Center"
|
||||
Margin="0,0,100,0"
|
||||
Command="{Binding ThemeConvertCmd}"
|
||||
CommandParameter="{Binding ElementName=Mwin}"/>
|
||||
<ComboBox Style="{DynamicResource cmbstyle}"
|
||||
Margin="0,5,10,0"
|
||||
ItemsSource="{Binding TranslationInterface}"
|
||||
DisplayMemberPath="Name"
|
||||
SelectedItem="{Binding SelectedTranslationInterface}"
|
||||
HorizontalAlignment="Right"/>
|
||||
</Grid>
|
||||
|
||||
<!--input-->
|
||||
<Grid x:Name="Input"
|
||||
Grid.Row="1"
|
||||
Margin="10,0,10,0">
|
||||
<!--输入框-->
|
||||
<Border x:Name="BorderInput"
|
||||
Style="{DynamicResource BorderInOutputStyle}">
|
||||
<Grid>
|
||||
<TextBox x:Name="TextBoxInput"
|
||||
Style="{DynamicResource TextBoxInputStyle}"
|
||||
Text="{Binding InputTxt,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}">
|
||||
<TextBox.InputBindings>
|
||||
<KeyBinding Command="{Binding TranslateCmd}" Key="Enter" />
|
||||
</TextBox.InputBindings>
|
||||
</TextBox>
|
||||
<StackPanel Orientation="Horizontal"
|
||||
Margin="10,5"
|
||||
VerticalAlignment="Bottom">
|
||||
<Button Template="{DynamicResource ButtonTemplate}"
|
||||
Visibility="{Binding InputTxt,Converter={StaticResource String2VisibilityConverter}}"
|
||||
Command="{Binding CopyInputCmd}"/>
|
||||
<Border Style="{DynamicResource LanguageMarkBorderStyle}"
|
||||
Visibility="{Binding IdentifyLanguage,Converter={StaticResource String2VisibilityConverter}}">
|
||||
<StackPanel Margin="5,2"
|
||||
Orientation="Horizontal">
|
||||
<TextBlock Text="识别为 "
|
||||
Style="{DynamicResource LanguageMarkTextBlockStyle}"/>
|
||||
<TextBlock Text="{Binding IdentifyLanguage}"
|
||||
Foreground="#af67c1"/>
|
||||
</StackPanel>
|
||||
</Border>
|
||||
</StackPanel>
|
||||
</Grid>
|
||||
</Border>
|
||||
</Grid>
|
||||
|
||||
<!--mid-->
|
||||
<StackPanel x:Name="MidArea"
|
||||
Grid.Row="2"
|
||||
HorizontalAlignment="Center"
|
||||
Orientation="Horizontal">
|
||||
<TextBlock Text="当前语言: "
|
||||
Style="{DynamicResource MidStyle}"/>
|
||||
<ComboBox x:Name="InCombo"
|
||||
Style="{DynamicResource cmbstyle}"
|
||||
ItemsSource="{Binding InputCombo}"
|
||||
SelectedItem="{Binding InputComboSelected,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" />
|
||||
<Separator Margin="20,0"/>
|
||||
<TextBlock Text="目标语言: "
|
||||
Style="{DynamicResource MidStyle}"/>
|
||||
<ComboBox x:Name="OutCombo"
|
||||
Style="{DynamicResource cmbstyle}"
|
||||
ItemsSource="{Binding OutputCombo}"
|
||||
SelectedItem="{Binding OutputComboSelected,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" />
|
||||
</StackPanel>
|
||||
|
||||
<!--output-->
|
||||
<Grid x:Name="Output"
|
||||
Margin="10,0,10,10"
|
||||
Grid.Row="3">
|
||||
<!--输出框-->
|
||||
<Border x:Name="BorderOutput"
|
||||
Style="{DynamicResource BorderInOutputStyle}"
|
||||
Height="{Binding ElementName=Output, Path=Height}">
|
||||
<Grid>
|
||||
<TextBox x:Name="TextBoxOutput"
|
||||
Style="{DynamicResource TextBoxOutputStyle}"
|
||||
Text="{Binding OutputTxt}"/>
|
||||
<StackPanel Orientation="Horizontal"
|
||||
Margin="10,5"
|
||||
VerticalAlignment="Bottom">
|
||||
<!--普通复制-->
|
||||
<Button Template="{DynamicResource ButtonTemplate}"
|
||||
Visibility="{Binding OutputTxt,Converter={StaticResource String2VisibilityConverter}}"
|
||||
Command="{Binding CopyResultCmd}"/>
|
||||
<!--蛇形复制-->
|
||||
<Button Margin="5,0"
|
||||
Template="{DynamicResource ButtonTemplateSnakeCopy}"
|
||||
Visibility="{Binding SnakeRet,Converter={StaticResource String2VisibilityConverter}}"
|
||||
Command="{Binding CopySnakeResultCmd}"/>
|
||||
<!--小驼峰复制-->
|
||||
<Button Template="{DynamicResource ButtonTemplateSmallHumpCopy}"
|
||||
Visibility="{Binding SmallHumpRet,Converter={StaticResource String2VisibilityConverter}}"
|
||||
Command="{Binding CopySmallHumpResultCmd}"/>
|
||||
<!--大驼峰复制-->
|
||||
<Button Margin="5,0"
|
||||
Template="{DynamicResource ButtonTemplateLargeHumpCopy}"
|
||||
Visibility="{Binding LargeHumpRet,Converter={StaticResource String2VisibilityConverter}}"
|
||||
Command="{Binding CopyLargeHumpResultCmd}"/>
|
||||
</StackPanel>
|
||||
</Grid>
|
||||
</Border>
|
||||
</Grid>
|
||||
</Grid>
|
||||
</Border>
|
||||
</Window>
|
@ -1,254 +0,0 @@
|
||||
<Window x:Class="STranslate.View.MainWindow"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:model="clr-namespace:STranslate.Model"
|
||||
xmlns:i="http://schemas.microsoft.com/xaml/behaviors"
|
||||
mc:Ignorable="d"
|
||||
x:Name="Mwin"
|
||||
Background="Transparent"
|
||||
WindowStartupLocation="CenterScreen"
|
||||
AllowsTransparency="True"
|
||||
ShowInTaskbar="False"
|
||||
ResizeMode="NoResize"
|
||||
Topmost="True"
|
||||
WindowStyle="None"
|
||||
SizeToContent="Height"
|
||||
Width="400"
|
||||
FontFamily="{DynamicResource {x:Static SystemFonts.CaptionFontFamilyKey}}"
|
||||
Icon="/Images/translate.ico">
|
||||
<Window.Resources>
|
||||
<model:WidthConverter x:Key="WidthConverter"/>
|
||||
</Window.Resources>
|
||||
|
||||
<Window.InputBindings>
|
||||
<KeyBinding Modifiers="Ctrl+Shift"
|
||||
Key="Q"
|
||||
Command="{Binding ExitCmd}"/>
|
||||
<KeyBinding Modifiers="Ctrl+Shift"
|
||||
Key="T"
|
||||
Command="{Binding TopmostCmd}"
|
||||
CommandParameter="{Binding ElementName=TopmostBtn, Mode=OneWay}"/>
|
||||
<KeyBinding Modifiers="Ctrl+Shift"
|
||||
Key="R"
|
||||
Command="{Binding ThemeConvertCmd}"/>
|
||||
<KeyBinding Key="Esc"
|
||||
Command="{Binding EscCmd}"
|
||||
CommandParameter="{Binding ElementName=TopmostBtn, Mode=OneWay}"/>
|
||||
</Window.InputBindings>
|
||||
|
||||
|
||||
<i:Interaction.Triggers>
|
||||
<i:EventTrigger EventName="MouseLeftButtonDown">
|
||||
<i:InvokeCommandAction Command="{Binding MouseLeftDownCmd}"/>
|
||||
</i:EventTrigger>
|
||||
<i:EventTrigger EventName="Deactivated">
|
||||
<i:InvokeCommandAction Command="{Binding DeactivatedCmd}"/>
|
||||
</i:EventTrigger>
|
||||
</i:Interaction.Triggers>
|
||||
|
||||
<Border Style="{DynamicResource BorderMainStyle}">
|
||||
<Grid>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="*" />
|
||||
<RowDefinition Height="5*"/>
|
||||
<RowDefinition Height="*" />
|
||||
<RowDefinition Height="7*"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<!--header-->
|
||||
<Grid x:Name="Header">
|
||||
<Button x:Name="TopmostBtn"
|
||||
Command="{Binding TopmostCmd}"
|
||||
CommandParameter="{Binding Mode=OneWay, RelativeSource={RelativeSource Self}}"
|
||||
Template="{DynamicResource ButtonTemplateUnTopmost}"/>
|
||||
<Button Width="auto"
|
||||
Template="{DynamicResource ButtonTemplateTheme}"
|
||||
HorizontalAlignment="Right"
|
||||
VerticalAlignment="Center"
|
||||
Margin="0,0,100,0"
|
||||
Command="{Binding ThemeConvertCmd}"
|
||||
CommandParameter="{Binding ElementName=Mwin}"/>
|
||||
<ComboBox Style="{DynamicResource cmbstyle}"
|
||||
Margin="0,5,10,0"
|
||||
ItemsSource="{Binding TranslationInterface}"
|
||||
SelectedItem="{Binding SelectedTranslationInterface, Mode=TwoWay, NotifyOnSourceUpdated=True}"
|
||||
DisplayMemberPath="Name"
|
||||
HorizontalAlignment="Right">
|
||||
<i:Interaction.Triggers>
|
||||
<i:EventTrigger EventName="SelectionChanged">
|
||||
<i:InvokeCommandAction Command="{Binding SelectLangChangedCmd}"/>
|
||||
</i:EventTrigger>
|
||||
</i:Interaction.Triggers>
|
||||
</ComboBox>
|
||||
</Grid>
|
||||
|
||||
<!--input-->
|
||||
<Grid x:Name="Input"
|
||||
Grid.Row="1"
|
||||
Margin="10,0,10,0">
|
||||
<!--输入框-->
|
||||
<Border x:Name="BorderInput"
|
||||
Style="{DynamicResource BorderInOutputStyle}">
|
||||
<Grid>
|
||||
<TextBox x:Name="TextBoxInput"
|
||||
Style="{DynamicResource TextBoxInputStyle}"
|
||||
Text="{Binding InputTxt, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}">
|
||||
<TextBox.InputBindings>
|
||||
<KeyBinding Command="{Binding TranslateCmd}" Key="Enter" />
|
||||
</TextBox.InputBindings>
|
||||
</TextBox>
|
||||
<StackPanel Orientation="Horizontal"
|
||||
Margin="10,5"
|
||||
VerticalAlignment="Bottom">
|
||||
<Button Template="{DynamicResource ButtonTemplateSpeak}"
|
||||
Visibility="{Binding InputTxt, Converter={StaticResource String2VisibilityConverter}}"
|
||||
Command="{Binding SourceSpeakCmd}"/>
|
||||
<Button Template="{DynamicResource ButtonTemplate}"
|
||||
Click="Copy_Click"
|
||||
Visibility="{Binding InputTxt, Converter={StaticResource String2VisibilityConverter}}"
|
||||
Command="{Binding CopyInputCmd}">
|
||||
<Button.ToolTip>
|
||||
<ToolTip x:Name="复制输入内容" Template="{DynamicResource ToolTipTemplate}"/>
|
||||
</Button.ToolTip>
|
||||
</Button>
|
||||
<Border Style="{DynamicResource LanguageMarkBorderStyle}"
|
||||
Visibility="{Binding IdentifyLanguage, Converter={StaticResource String2VisibilityConverter}}">
|
||||
<StackPanel Margin="5,2"
|
||||
Orientation="Horizontal">
|
||||
<TextBlock Text="识别为 "
|
||||
Style="{DynamicResource LanguageMarkTextBlockStyle}"/>
|
||||
<TextBlock Text="{Binding IdentifyLanguage}"
|
||||
Foreground="#af67c1"/>
|
||||
</StackPanel>
|
||||
</Border>
|
||||
</StackPanel>
|
||||
</Grid>
|
||||
</Border>
|
||||
</Grid>
|
||||
|
||||
<!--toast-->
|
||||
<Border x:Name="Toast"
|
||||
CornerRadius="12"
|
||||
Grid.Row="0"
|
||||
Grid.RowSpan="2"
|
||||
VerticalAlignment="Top"
|
||||
Visibility="Visible"
|
||||
Margin="0,-40"
|
||||
Width="{Binding ElementName=toastTxt, Path=ActualWidth,Converter={StaticResource WidthConverter}}"
|
||||
BorderBrush="Transparent"
|
||||
Background="#65c248">
|
||||
<WrapPanel Orientation="Horizontal"
|
||||
HorizontalAlignment="Center">
|
||||
<TextBlock Text=""
|
||||
FontSize="16"
|
||||
Foreground="White"
|
||||
Padding="5,10"
|
||||
Style="{StaticResource IconStyle}"/>
|
||||
<TextBlock x:Name="toastTxt"
|
||||
Background="Transparent"
|
||||
Foreground="#fff"
|
||||
VerticalAlignment="Center"
|
||||
HorizontalAlignment="Center"
|
||||
Padding="0,5,10,5"
|
||||
FontSize="16"/>
|
||||
</WrapPanel>
|
||||
</Border>
|
||||
|
||||
<!--mid-->
|
||||
<StackPanel x:Name="MidArea"
|
||||
Grid.Row="2"
|
||||
HorizontalAlignment="Center"
|
||||
Orientation="Horizontal">
|
||||
<TextBlock Text="当前语言: "
|
||||
Style="{DynamicResource MidStyle}"/>
|
||||
<ComboBox x:Name="InCombo"
|
||||
Style="{DynamicResource cmbstyle}"
|
||||
ItemsSource="{Binding InputCombo}"
|
||||
SelectedItem="{Binding InputComboSelected, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}">
|
||||
<i:Interaction.Triggers>
|
||||
<i:EventTrigger EventName="SelectionChanged">
|
||||
<i:InvokeCommandAction Command="{Binding SelectLangChangedCmd}"/>
|
||||
</i:EventTrigger>
|
||||
</i:Interaction.Triggers>
|
||||
</ComboBox>
|
||||
<Separator Margin="20,0"/>
|
||||
<TextBlock Text="目标语言: "
|
||||
Style="{DynamicResource MidStyle}"/>
|
||||
<ComboBox x:Name="OutCombo"
|
||||
Style="{DynamicResource cmbstyle}"
|
||||
ItemsSource="{Binding OutputCombo}"
|
||||
SelectedItem="{Binding OutputComboSelected, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}">
|
||||
<i:Interaction.Triggers>
|
||||
<i:EventTrigger EventName="SelectionChanged">
|
||||
<i:InvokeCommandAction Command="{Binding SelectLangChangedCmd}"/>
|
||||
</i:EventTrigger>
|
||||
</i:Interaction.Triggers>
|
||||
</ComboBox>
|
||||
</StackPanel>
|
||||
|
||||
<!--output-->
|
||||
<Grid x:Name="Output"
|
||||
Margin="10,0,10,10"
|
||||
Grid.Row="3">
|
||||
<!--输出框-->
|
||||
<Border x:Name="BorderOutput"
|
||||
Style="{DynamicResource BorderInOutputStyle}"
|
||||
Height="{Binding Height, ElementName=Output}">
|
||||
<Grid>
|
||||
<TextBox x:Name="TextBoxOutput"
|
||||
Style="{DynamicResource TextBoxOutputStyle}"
|
||||
Text="{Binding OutputTxt}"/>
|
||||
<StackPanel Orientation="Horizontal"
|
||||
Margin="10,5"
|
||||
VerticalAlignment="Bottom">
|
||||
<!--语音-->
|
||||
<Button Template="{DynamicResource ButtonTemplateSpeak}"
|
||||
Visibility="{Binding OutputTxt, Converter={StaticResource String2VisibilityConverter}}"
|
||||
Command="{Binding TargetSpeakCmd}"/>
|
||||
<!--普通复制-->
|
||||
<Button Template="{DynamicResource ButtonTemplate}"
|
||||
Click="Copy_Click"
|
||||
Visibility="{Binding OutputTxt, Converter={StaticResource String2VisibilityConverter}}"
|
||||
Command="{Binding CopyResultCmd}">
|
||||
<Button.ToolTip>
|
||||
<ToolTip x:Name="直接复制结果" Template="{DynamicResource ToolTipTemplate}"/>
|
||||
</Button.ToolTip>
|
||||
</Button>
|
||||
<!--蛇形复制-->
|
||||
<Button Margin="5,0"
|
||||
Click="Copy_Click"
|
||||
Template="{DynamicResource ButtonTemplateSnakeCopy}"
|
||||
Visibility="{Binding SnakeRet, Converter={StaticResource String2VisibilityConverter}}"
|
||||
Command="{Binding CopySnakeResultCmd}">
|
||||
<Button.ToolTip>
|
||||
<ToolTip x:Name="复制为蛇形字符串" Template="{DynamicResource ToolTipTemplate}"/>
|
||||
</Button.ToolTip>
|
||||
</Button>
|
||||
<!--小驼峰复制-->
|
||||
<Button Template="{DynamicResource ButtonTemplateSmallHumpCopy}"
|
||||
Click="Copy_Click"
|
||||
Visibility="{Binding SmallHumpRet, Converter={StaticResource String2VisibilityConverter}}"
|
||||
Command="{Binding CopySmallHumpResultCmd}">
|
||||
<Button.ToolTip>
|
||||
<ToolTip x:Name="复制为小驼峰字符串" Template="{DynamicResource ToolTipTemplate}"/>
|
||||
</Button.ToolTip>
|
||||
</Button>
|
||||
<!--大驼峰复制-->
|
||||
<Button Margin="5,0"
|
||||
Click="Copy_Click"
|
||||
Template="{DynamicResource ButtonTemplateLargeHumpCopy}"
|
||||
Visibility="{Binding LargeHumpRet, Converter={StaticResource String2VisibilityConverter}}"
|
||||
Command="{Binding CopyLargeHumpResultCmd}">
|
||||
<Button.ToolTip>
|
||||
<ToolTip x:Name="复制为大驼峰字符串" Template="{DynamicResource ToolTipTemplate}"/>
|
||||
</Button.ToolTip>
|
||||
</Button>
|
||||
</StackPanel>
|
||||
</Grid>
|
||||
</Border>
|
||||
</Grid>
|
||||
</Grid>
|
||||
</Border>
|
||||
</Window>
|
@ -1,48 +0,0 @@
|
||||
<Window x:Class="STranslate.View.ScreenShotWindow"
|
||||
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:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:i="http://schemas.microsoft.com/xaml/behaviors"
|
||||
xmlns:local="clr-namespace:STranslate.View"
|
||||
mc:Ignorable="d"
|
||||
Title="ScreenShotWindow"
|
||||
Height="1" Width="1"
|
||||
ShowInTaskbar="False"
|
||||
ScrollViewer.VerticalScrollBarVisibility="Disabled"
|
||||
Topmost="True"
|
||||
Cursor="Cross"
|
||||
Background="Transparent"
|
||||
WindowStyle="None"
|
||||
ResizeMode="NoResize"
|
||||
IsTabStop="False">
|
||||
<Window.InputBindings>
|
||||
<KeyBinding Key="Esc"
|
||||
Command="{Binding EscCmd}"/>
|
||||
</Window.InputBindings>
|
||||
|
||||
<i:Interaction.Triggers>
|
||||
<i:EventTrigger EventName="MouseRightButtonDown">
|
||||
<i:InvokeCommandAction Command="{Binding EscCmd}"/>
|
||||
</i:EventTrigger>
|
||||
<i:EventTrigger EventName="MouseMove">
|
||||
<i:InvokeCommandAction Command="{Binding MouseMoveCmd}"/>
|
||||
</i:EventTrigger>
|
||||
<i:EventTrigger EventName="MouseLeftButtonDown">
|
||||
<i:InvokeCommandAction Command="{Binding MouseLeftDownCmd}"/>
|
||||
</i:EventTrigger>
|
||||
<i:EventTrigger EventName="MouseLeftButtonUp">
|
||||
<i:InvokeCommandAction Command="{Binding MouseLeftUpCmd}"/>
|
||||
</i:EventTrigger>
|
||||
<i:EventTrigger EventName="Closed">
|
||||
<i:InvokeCommandAction Command="{Binding ClosedCmd}"/>
|
||||
</i:EventTrigger>
|
||||
</i:Interaction.Triggers>
|
||||
|
||||
<Canvas x:Name="ScreenCanvas">
|
||||
<Rectangle x:Name="LeftMask" Fill="#7f7f7f" Opacity="0.6" />
|
||||
<Rectangle x:Name="RightMask" Fill="#7f7f7f" Opacity="0.6" />
|
||||
<Rectangle x:Name="UpMask" Fill="#7f7f7f" Opacity="0.6" />
|
||||
<Rectangle x:Name="DownMask" Fill="#7f7f7f" Opacity="0.6" />
|
||||
</Canvas>
|
||||
</Window>
|
@ -0,0 +1,39 @@
|
||||
<UserControl x:Class="STranslate.View.UserControlInput"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:local="clr-namespace:STranslate.View"
|
||||
mc:Ignorable="d"
|
||||
d:DesignHeight="450" d:DesignWidth="800">
|
||||
<!--输入框-->
|
||||
<Border x:Name="BorderInput"
|
||||
Style="{DynamicResource BorderInOutputStyle}">
|
||||
<Grid>
|
||||
<TextBox x:Name="TextBoxInput"
|
||||
Style="{DynamicResource TextBoxInputStyle}"
|
||||
Text="{Binding InputTxt,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}">
|
||||
<TextBox.InputBindings>
|
||||
<KeyBinding Command="{Binding TranslateCmd}" Key="Enter" />
|
||||
</TextBox.InputBindings>
|
||||
</TextBox>
|
||||
<StackPanel Orientation="Horizontal"
|
||||
Margin="10,5"
|
||||
VerticalAlignment="Bottom">
|
||||
<Button Template="{DynamicResource ButtonTemplate}"
|
||||
Visibility="{Binding InputTxt,Converter={StaticResource String2VisibilityConverter}}"
|
||||
Command="{Binding CopyInputCmd}"/>
|
||||
<Border Style="{DynamicResource LanguageMarkBorderStyle}"
|
||||
Visibility="{Binding IdentifyLanguage,Converter={StaticResource String2VisibilityConverter}}">
|
||||
<StackPanel Margin="5,2"
|
||||
Orientation="Horizontal">
|
||||
<TextBlock Text="识别为 "
|
||||
Style="{DynamicResource LanguageMarkTextBlockStyle}"/>
|
||||
<TextBlock Text="{Binding IdentifyLanguage}"
|
||||
Foreground="#af67c1"/>
|
||||
</StackPanel>
|
||||
</Border>
|
||||
</StackPanel>
|
||||
</Grid>
|
||||
</Border>
|
||||
</UserControl>
|
@ -1,16 +1,4 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<packages>
|
||||
<package id="Microsoft.Xaml.Behaviors.Wpf" version="1.1.39" targetFramework="net48" />
|
||||
<package id="Newtonsoft.Json" version="13.0.2" targetFramework="net48" />
|
||||
<package id="sqlite-net-pcl" version="1.8.116" targetFramework="net48" />
|
||||
<package id="SQLitePCLRaw.bundle_green" version="2.0.4" targetFramework="net48" />
|
||||
<package id="SQLitePCLRaw.core" version="2.0.4" targetFramework="net48" />
|
||||
<package id="SQLitePCLRaw.lib.e_sqlite3" version="2.0.4" targetFramework="net48" />
|
||||
<package id="SQLitePCLRaw.provider.dynamic_cdecl" version="2.0.4" targetFramework="net48" />
|
||||
<package id="System.Buffers" version="4.4.0" targetFramework="net48" />
|
||||
<package id="System.Memory" version="4.5.3" targetFramework="net48" />
|
||||
<package id="System.Numerics.Vectors" version="4.4.0" targetFramework="net48" />
|
||||
<package id="System.Runtime.CompilerServices.Unsafe" version="4.5.2" targetFramework="net48" />
|
||||
<package id="Tesseract" version="5.2.0" targetFramework="net48" />
|
||||
<package id="WpfScreenHelper" version="2.1.0" targetFramework="net48" />
|
||||
</packages>
|
Binary file not shown.
@ -1,6 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<configuration>
|
||||
<startup>
|
||||
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.8"/>
|
||||
</startup>
|
||||
</configuration>
|
@ -1,9 +0,0 @@
|
||||
<Application x:Class="Updater.App"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:local="clr-namespace:Updater"
|
||||
StartupUri="MainWindow.xaml">
|
||||
<Application.Resources>
|
||||
|
||||
</Application.Resources>
|
||||
</Application>
|
@ -1,117 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
</root>
|
@ -1,7 +0,0 @@
|
||||
<?xml version='1.0' encoding='utf-8'?>
|
||||
<SettingsFile xmlns="uri:settings" CurrentProfile="(Default)">
|
||||
<Profiles>
|
||||
<Profile Name="(Default)" />
|
||||
</Profiles>
|
||||
<Settings />
|
||||
</SettingsFile>
|
@ -1,4 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<packages>
|
||||
<package id="Newtonsoft.Json" version="13.0.2" targetFramework="net48" />
|
||||
</packages>
|
Before Width: | Height: | Size: 17 KiB |
Before Width: | Height: | Size: 618 KiB After Width: | Height: | Size: 241 KiB |
Before Width: | Height: | Size: 267 KiB After Width: | Height: | Size: 262 KiB |
After Width: | Height: | Size: 64 KiB |
Loading…
Reference in new issue