public MainWindow() { InitializeComponent(); Settings.init(System.AppDomain.CurrentDomain.BaseDirectory + "/Data/settings.xml"); Logger.InitFileLogger(System.AppDomain.CurrentDomain.BaseDirectory + "/logs/", "nprch"); SettingsNPRCH.init(System.AppDomain.CurrentDomain.BaseDirectory + "/Data/SettingsNPRCH.xml"); grdStatus.DataContext = EDSClass.Single; init(); Logger.Info("start"); txtDiffHour.Text = "3"; //chart.init(); clndDate.SelectedDate = DateTime.Now.Date.AddDays(-1); statusBar.DataContext = this; }
private void btnLoadFiles_Click(object sender, RoutedEventArgs e) { StatusText = "Загрузка"; string FN = chbReserv.IsChecked.Value ? "/Data/settingsNPRCHReserv.xml" : "/Data/settingsNPRCH.xml"; SettingsNPRCH.init(System.AppDomain.CurrentDomain.BaseDirectory + FN); btnLoadFiles.IsEnabled = false; Application.Current.Dispatcher.Invoke( DispatcherPriority.Background, new ThreadStart( delegate { LoadFiles(); } ) ); btnLoadFiles.IsEnabled = true; // btnLoadFiles.Visibility = Visibility.Visible; }