Compare commits

...

2 Commits

Author SHA1 Message Date
DESKTOP-3BO4HSG\ksat c0c64fb767 tmp
2 years ago
DESKTOP-3BO4HSG\ksat 579661b6f1 tmp
2 years ago

@ -96,6 +96,9 @@
</Compile>
<Compile Include="Util\Util.cs" />
<Compile Include="ViewModel\MainVM.cs" />
<Compile Include="View\UserControlInput.xaml.cs">
<DependentUpon>UserControlInput.xaml</DependentUpon>
</Compile>
<Page Include="MainWindow.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
@ -140,6 +143,10 @@
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="View\UserControlInput.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
</ItemGroup>
<ItemGroup>
<Compile Include="Model\BaiduModel.cs" />

@ -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>

@ -0,0 +1,28 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
namespace STranslate.View
{
/// <summary>
/// UserControlInput.xaml 的交互逻辑
/// </summary>
public partial class UserControlInput : UserControl
{
public UserControlInput()
{
InitializeComponent();
}
}
}
Loading…
Cancel
Save