多语言
This commit is contained in:
commit
0a58ce41ae
3 files changed
+18
-19
No files matched your search
@@ -3,7 +3,4 @@
|
||||
<startup>
|
||||
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.7.2" />
|
||||
</startup>
|
||||
<appSettings>
|
||||
<add key="language" value="en-US"/>
|
||||
</appSettings>
|
||||
</configuration>
|
||||
@@ -20,6 +20,8 @@ namespace DyeingComputer
|
||||
{
|
||||
this.Startup += new StartupEventHandler(App_Startup);
|
||||
this.DispatcherUnhandledException += new System.Windows.Threading.DispatcherUnhandledExceptionEventHandler(App_DispatcherUnhandledException);
|
||||
|
||||
//DyeingComputer.Properties.Resources.Culture = new System.Globalization.CultureInfo("en-US");//设定语言
|
||||
}
|
||||
System.Threading.Mutex mutex;
|
||||
void App_Startup(object sender, StartupEventArgs e) //程序只允许启动一次
|
||||
|
||||
+16
-16
@@ -36,12 +36,12 @@
|
||||
Text="{TemplateBinding Tag}"
|
||||
FontFamily="Fonts/#FontAwesome"
|
||||
HorizontalAlignment="Left"
|
||||
Width="40" FontSize="30" Margin="10,10,0,0"/>
|
||||
Width="30" FontSize="20" Margin="5,10,0,0"/>
|
||||
<TextBlock Grid.Row="0" Grid.Column="1"
|
||||
Text="{TemplateBinding Content}"
|
||||
FontFamily="Fonts/#FontAwesome"
|
||||
HorizontalAlignment="Left"
|
||||
Width="NaN" FontSize="30" Margin="50,10,0,0"/>
|
||||
Width="NaN" FontSize="20" Margin="40,10,0,0"/>
|
||||
</Grid>
|
||||
</Border>
|
||||
</Grid>
|
||||
@@ -60,24 +60,24 @@
|
||||
</Window.Resources>
|
||||
|
||||
<Grid VerticalAlignment="Bottom">
|
||||
<Rectangle Margin="0,0,0,0" Fill="#FFCCCCCC" VerticalAlignment="Bottom" Height="50"/>
|
||||
<RadioButton Content="{x:Static lang:Resources.WorkOrder}" x:Name="Work_Order" Tag="" Style="{DynamicResource RadioButtonStyle}" HorizontalAlignment="Left" Height="50" Margin="0,0,0,0" VerticalAlignment="Bottom" Width="200" Background="#FFCCCCCC" Checked="RadioButton_Page"/>
|
||||
<RadioButton Content="{x:Static lang:Resources.TechnologicalProcess}" x:Name="Technological_Process" Tag="" Style="{DynamicResource RadioButtonStyle}" HorizontalAlignment="Left" Height="50" Margin="200,0,0,0" VerticalAlignment="Bottom" Width="200" Background="#FFCCCCCC" Checked="RadioButton_Page"/>
|
||||
<RadioButton Content="{x:Static lang:Resources.CurveDiagram}" x:Name="Curve_Diagram" Tag="" Style="{DynamicResource RadioButtonStyle}" HorizontalAlignment="Left" Height="50" Margin="400,0,0,0" VerticalAlignment="Bottom" Width="200" Background="#FFCCCCCC" Checked="RadioButton_Page"/>
|
||||
<RadioButton Content="{x:Static lang:Resources.EquipmentSimulation}" x:Name="Equipment_Simulation" Tag="" Style="{DynamicResource RadioButtonStyle}" HorizontalAlignment="Left" Height="50" Margin="600,0,0,0" VerticalAlignment="Bottom" Width="200" Background="#FFCCCCCC" Checked="RadioButton_Page"/>
|
||||
<RadioButton Content="{x:Static lang:Resources.HistoryRecords}" x:Name="History_Records" Tag="" Style="{DynamicResource RadioButtonStyle}" HorizontalAlignment="Left" Height="50" Margin="800,0,0,0" VerticalAlignment="Bottom" Width="200" Background="#FFCCCCCC" Checked="RadioButton_Page"/>
|
||||
<RadioButton Content="{x:Static lang:Resources.Next}" x:Name="Next" Tag="" Style="{DynamicResource RadioButtonStyle}" HorizontalAlignment="Right" Height="50" Margin="0,0,0,0" VerticalAlignment="Bottom" Width="200" Background="#FFCCCCCC" Checked="RadioButton_toolbar" GroupName="toolbar"/>
|
||||
<Rectangle Margin="0,0,0,0" Fill="#FFCCCCCC" VerticalAlignment="Bottom" Height="40"/>
|
||||
<RadioButton Content="{x:Static lang:Resources.WorkOrder}" x:Name="Work_Order" Tag="" Style="{DynamicResource RadioButtonStyle}" HorizontalAlignment="Left" Height="40" Margin="0,0,0,0" VerticalAlignment="Bottom" Width="200" Background="#FFCCCCCC" Checked="RadioButton_Page"/>
|
||||
<RadioButton Content="{x:Static lang:Resources.TechnologicalProcess}" x:Name="Technological_Process" Tag="" Style="{DynamicResource RadioButtonStyle}" HorizontalAlignment="Left" Height="40" Margin="200,0,0,0" VerticalAlignment="Bottom" Width="200" Background="#FFCCCCCC" Checked="RadioButton_Page"/>
|
||||
<RadioButton Content="{x:Static lang:Resources.CurveDiagram}" x:Name="Curve_Diagram" Tag="" Style="{DynamicResource RadioButtonStyle}" HorizontalAlignment="Left" Height="40" Margin="400,0,0,0" VerticalAlignment="Bottom" Width="200" Background="#FFCCCCCC" Checked="RadioButton_Page"/>
|
||||
<RadioButton Content="{x:Static lang:Resources.EquipmentSimulation}" x:Name="Equipment_Simulation" Tag="" Style="{DynamicResource RadioButtonStyle}" HorizontalAlignment="Left" Height="40" Margin="600,0,0,0" VerticalAlignment="Bottom" Width="200" Background="#FFCCCCCC" Checked="RadioButton_Page"/>
|
||||
<RadioButton Content="{x:Static lang:Resources.HistoryRecords}" x:Name="History_Records" Tag="" Style="{DynamicResource RadioButtonStyle}" HorizontalAlignment="Left" Height="40" Margin="800,0,0,0" VerticalAlignment="Bottom" Width="200" Background="#FFCCCCCC" Checked="RadioButton_Page"/>
|
||||
<RadioButton Content="{x:Static lang:Resources.Next}" x:Name="Next" Tag="" Style="{DynamicResource RadioButtonStyle}" HorizontalAlignment="Right" Height="40" Margin="0,0,0,0" VerticalAlignment="Bottom" Width="200" Background="#FFCCCCCC" Checked="RadioButton_toolbar" GroupName="toolbar"/>
|
||||
|
||||
<RadioButton Content="{x:Static lang:Resources.InOut}" x:Name="In_Out" Tag="" Style="{DynamicResource RadioButtonStyle}" HorizontalAlignment="Left" Height="50" Margin="0,0,0,0" VerticalAlignment="Bottom" Width="200" Background="#FFCCCCCC" Checked="RadioButton_Page" Visibility="Hidden"/>
|
||||
<RadioButton Content="{x:Static lang:Resources.SysSet}" x:Name="Sys_Set" Tag="" Style="{DynamicResource RadioButtonStyle}" HorizontalAlignment="Left" Height="50" Margin="200,0,0,0" VerticalAlignment="Bottom" Width="200" Background="#FFCCCCCC" Checked="RadioButton_Page" Visibility="Hidden"/>
|
||||
<RadioButton Content="{x:Static lang:Resources.ParameterSet}" x:Name="Parameter_Set" Tag="" Style="{DynamicResource RadioButtonStyle}" HorizontalAlignment="Left" Height="50" Margin="400,0,0,0" VerticalAlignment="Bottom" Width="200" Background="#FFCCCCCC" Checked="RadioButton_Page" Visibility="Hidden"/>
|
||||
<RadioButton Content="{x:Static lang:Resources.Programgroup}" x:Name="Program_group" Tag="" Style="{DynamicResource RadioButtonStyle}" HorizontalAlignment="Left" Height="50" Margin="600,0,0,0" VerticalAlignment="Bottom" Width="200" Background="#FFCCCCCC" Checked="RadioButton_Page" Visibility="Hidden"/>
|
||||
<RadioButton Content="{x:Static lang:Resources.EngineerSet}" x:Name="Engineer_Set" Tag="" Style="{DynamicResource RadioButtonStyle}" HorizontalAlignment="Left" Height="50" Margin="800,0,0,0" VerticalAlignment="Bottom" Width="200" Background="#FFCCCCCC" Checked="RadioButton_Page" Visibility="Hidden"/>
|
||||
<RadioButton Content="{x:Static lang:Resources.Previous}" x:Name="Previous" Tag="" Style="{DynamicResource RadioButtonStyle}" HorizontalAlignment="Right" Height="50" Margin="0,0,0,0" VerticalAlignment="Bottom" Width="200" Background="#FFCCCCCC" Checked="RadioButton_toolbar" GroupName="toolbar" Visibility="Hidden"/>
|
||||
<RadioButton Content="{x:Static lang:Resources.InOut}" x:Name="In_Out" Tag="" Style="{DynamicResource RadioButtonStyle}" HorizontalAlignment="Left" Height="40" Margin="0,0,0,0" VerticalAlignment="Bottom" Width="200" Background="#FFCCCCCC" Checked="RadioButton_Page" Visibility="Hidden"/>
|
||||
<RadioButton Content="{x:Static lang:Resources.SysSet}" x:Name="Sys_Set" Tag="" Style="{DynamicResource RadioButtonStyle}" HorizontalAlignment="Left" Height="40" Margin="200,0,0,0" VerticalAlignment="Bottom" Width="200" Background="#FFCCCCCC" Checked="RadioButton_Page" Visibility="Hidden"/>
|
||||
<RadioButton Content="{x:Static lang:Resources.ParameterSet}" x:Name="Parameter_Set" Tag="" Style="{DynamicResource RadioButtonStyle}" HorizontalAlignment="Left" Height="40" Margin="400,0,0,0" VerticalAlignment="Bottom" Width="200" Background="#FFCCCCCC" Checked="RadioButton_Page" Visibility="Hidden"/>
|
||||
<RadioButton Content="{x:Static lang:Resources.Programgroup}" x:Name="Program_group" Tag="" Style="{DynamicResource RadioButtonStyle}" HorizontalAlignment="Left" Height="40" Margin="600,0,0,0" VerticalAlignment="Bottom" Width="200" Background="#FFCCCCCC" Checked="RadioButton_Page" Visibility="Hidden"/>
|
||||
<RadioButton Content="{x:Static lang:Resources.EngineerSet}" x:Name="Engineer_Set" Tag="" Style="{DynamicResource RadioButtonStyle}" HorizontalAlignment="Left" Height="40" Margin="800,0,0,0" VerticalAlignment="Bottom" Width="200" Background="#FFCCCCCC" Checked="RadioButton_Page" Visibility="Hidden"/>
|
||||
<RadioButton Content="{x:Static lang:Resources.Previous}" x:Name="Previous" Tag="" Style="{DynamicResource RadioButtonStyle}" HorizontalAlignment="Right" Height="40" Margin="0,0,0,0" VerticalAlignment="Bottom" Width="200" Background="#FFCCCCCC" Checked="RadioButton_toolbar" GroupName="toolbar" Visibility="Hidden"/>
|
||||
|
||||
|
||||
<Grid Grid.Column="1">
|
||||
<ContentControl x:Name="container" Margin="0,0,0,50"/>
|
||||
<ContentControl x:Name="container" Margin="0,0,0,40"/>
|
||||
</Grid>
|
||||
</Grid>
|
||||
</Window>
|
||||
Reference in new issue
Block a user