You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
35 lines
991 B
35 lines
991 B
using System.Configuration; |
|
using System.Data; |
|
using System.IO; |
|
using System.Windows; |
|
using System.Windows.Media; |
|
using System.Windows.Threading; |
|
using log4net.Config; |
|
using SparkClient.Model.Helper; |
|
using SparkClient.ViewModel.Configuration.SettingsPages; |
|
|
|
namespace SparkClient; |
|
|
|
/// <summary> |
|
/// Interaction logic for App.xaml |
|
/// </summary> |
|
public partial class App : Application |
|
{ |
|
protected override void OnStartup(StartupEventArgs e) |
|
{ |
|
base.OnStartup(e); |
|
//加载日志配置文件 |
|
XmlConfigurator.Configure(new FileInfo("log4net.config")); |
|
//运行是否需要归档 |
|
Log4NetHelper.ArchiveOldLogs(); |
|
//打开数据库连接 |
|
//读取数据库多语言配置 |
|
DataBaseHelper.CreateConnection(); |
|
string LanguageId = Settings.SelectValueById("LanguageId"); |
|
if (LanguageId.Length == 0) |
|
{ |
|
LanguageId = "zh-cn"; |
|
} |
|
MultilingualHelper.setLanguage(LanguageId); |
|
} |
|
} |