예제 #1
0
        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;
        }
예제 #2
0
        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;
        }