diff --git a/STranslate/App.xaml b/STranslate/App.xaml
index d92fa00..310d543 100644
--- a/STranslate/App.xaml
+++ b/STranslate/App.xaml
@@ -5,8 +5,7 @@
-
-
+
diff --git a/STranslate/MainWindow.xaml b/STranslate/MainWindow.xaml
index 240487d..ec1e986 100644
--- a/STranslate/MainWindow.xaml
+++ b/STranslate/MainWindow.xaml
@@ -4,7 +4,6 @@
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:vm="clr-namespace:STranslate.ViewModel"
- xmlns:model="clr-namespace:STranslate.Model"
mc:Ignorable="d"
Background="Transparent"
WindowStartupLocation="CenterScreen"
@@ -19,19 +18,12 @@
SizeToContent="Height"
Width="400"
Icon="/Images/translate.ico">
-
+
-
-
-
-
-
-
+
+
@@ -65,7 +57,13 @@
-
+
+ Style="{DynamicResource BorderInOutputStyle}">
@@ -105,18 +89,15 @@
-
-
+
+ Style="{DynamicResource LanguageMarkTextBlockStyle}"/>
@@ -132,16 +113,16 @@
HorizontalAlignment="Center"
Orientation="Horizontal">
+ Style="{DynamicResource MidStyle}"/>
+ Style="{DynamicResource MidStyle}"/>
@@ -152,44 +133,31 @@
Grid.Row="3">
+ Style="{DynamicResource TextBoxOutputStyle}"
+ Text="{Binding OutputTxt}"/>
-
-
diff --git a/STranslate/MainWindow.xaml.cs b/STranslate/MainWindow.xaml.cs
index 335b73b..224affd 100644
--- a/STranslate/MainWindow.xaml.cs
+++ b/STranslate/MainWindow.xaml.cs
@@ -282,5 +282,17 @@ namespace STranslate
private static readonly BitmapImage _Topmost = new BitmapImage(new Uri("pack://application:,,,/STranslate;component/Images/Button_Default/topmost.png"));
private static readonly BitmapImage _UnTopmost = new BitmapImage(new Uri("pack://application:,,,/STranslate;component/Images/Button_Default/untopmost.png"));
private System.Windows.Forms.NotifyIcon notifyIcon = new System.Windows.Forms.NotifyIcon();
+
+ private void Button_Click(object sender, RoutedEventArgs e)
+ {
+ if (Application.Current.Resources.MergedDictionaries[0].Source.ToString() == "pack://application:,,,/STranslate;component/Style/Dark.xaml")
+ {
+ Application.Current.Resources.MergedDictionaries[0].Source = new Uri("pack://application:,,,/STranslate;component/Style/Default.xaml");
+ }
+ else
+ {
+ Application.Current.Resources.MergedDictionaries[0].Source = new Uri("pack://application:,,,/STranslate;component/Style/Dark.xaml");
+ }
+ }
}
}
\ No newline at end of file
diff --git a/STranslate/STranslate.csproj b/STranslate/STranslate.csproj
index 551891a..6769f58 100644
--- a/STranslate/STranslate.csproj
+++ b/STranslate/STranslate.csproj
@@ -108,11 +108,35 @@
MainWindow.xaml
Code
-
+
+ MSBuild:Compile
+ Designer
+
+
+ Designer
+ MSBuild:Compile
+
+
+ MSBuild:Compile
+ Designer
+
+
+ MSBuild:Compile
+ Designer
+
+
+ MSBuild:Compile
+ Designer
+
+
+ Designer
+ MSBuild:Compile
+
+
Designer
MSBuild:Compile
-
+
Designer
MSBuild:Compile
diff --git a/STranslate/Style/Dark.xaml b/STranslate/Style/Dark.xaml
new file mode 100644
index 0000000..a3d30e6
--- /dev/null
+++ b/STranslate/Style/Dark.xaml
@@ -0,0 +1,9 @@
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/STranslate/Style/Dark/DictionaryButtonDark.xaml b/STranslate/Style/Dark/DictionaryButtonDark.xaml
new file mode 100644
index 0000000..67281fa
--- /dev/null
+++ b/STranslate/Style/Dark/DictionaryButtonDark.xaml
@@ -0,0 +1,71 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/STranslate/Style/Dark/DictionaryComboBoxDark.xaml b/STranslate/Style/Dark/DictionaryComboBoxDark.xaml
new file mode 100644
index 0000000..bf4887d
--- /dev/null
+++ b/STranslate/Style/Dark/DictionaryComboBoxDark.xaml
@@ -0,0 +1,176 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/STranslate/Style/Dark/DictionaryCommonDark.xaml b/STranslate/Style/Dark/DictionaryCommonDark.xaml
new file mode 100644
index 0000000..0d8b737
--- /dev/null
+++ b/STranslate/Style/Dark/DictionaryCommonDark.xaml
@@ -0,0 +1,68 @@
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/STranslate/Style/Default.xaml b/STranslate/Style/Default.xaml
new file mode 100644
index 0000000..3dd7fcb
--- /dev/null
+++ b/STranslate/Style/Default.xaml
@@ -0,0 +1,9 @@
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/STranslate/Style/DictionaryButtonDefault.xaml b/STranslate/Style/Default/DictionaryButtonDefault.xaml
similarity index 100%
rename from STranslate/Style/DictionaryButtonDefault.xaml
rename to STranslate/Style/Default/DictionaryButtonDefault.xaml
diff --git a/STranslate/Style/DictionaryComboBoxDefault.xaml b/STranslate/Style/Default/DictionaryComboBoxDefault.xaml
similarity index 100%
rename from STranslate/Style/DictionaryComboBoxDefault.xaml
rename to STranslate/Style/Default/DictionaryComboBoxDefault.xaml
diff --git a/STranslate/Style/Default/DictionaryCommonDefault.xaml b/STranslate/Style/Default/DictionaryCommonDefault.xaml
new file mode 100644
index 0000000..69c2974
--- /dev/null
+++ b/STranslate/Style/Default/DictionaryCommonDefault.xaml
@@ -0,0 +1,64 @@
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/STranslate/ViewModel/MainVM.cs b/STranslate/ViewModel/MainVM.cs
index ecc92bf..977a40e 100644
--- a/STranslate/ViewModel/MainVM.cs
+++ b/STranslate/ViewModel/MainVM.cs
@@ -15,7 +15,6 @@ namespace STranslate.ViewModel
public MainVM()
{
- //初始化界面参数
InputCombo = LanguageEnumDict.Keys.ToList();
InputComboSelected = LanguageEnum.AUTO.GetDescription();
OutputCombo = LanguageEnumDict.Keys.ToList();
@@ -49,6 +48,10 @@ namespace STranslate.ViewModel
{
Clipboard.SetText(LargeHumpRet);
});
+ ThemeConvertCmd = new RelayCommand((_) => true, (_) =>
+ {
+
+ });
//翻译
TranslateCmd = new RelayCommand((_) =>
@@ -186,6 +189,7 @@ namespace STranslate.ViewModel
public ICommand CopySnakeResultCmd { get; private set; }
public ICommand CopySmallHumpResultCmd { get; private set; }
public ICommand CopyLargeHumpResultCmd { get; private set; }
+ public ICommand ThemeConvertCmd { get; private set; }
///
/// 识别语种