2 using System.Collections.Generic;
6 using System.Windows.Controls;
7 using System.Windows.Data;
8 using System.Windows.Documents;
9 using System.Windows.Input;
10 using System.Windows.Media;
11 using System.Windows.Media.Imaging;
12 using System.Windows.Navigation;
13 using System.Windows.Shapes;
16 using System.Collections.ObjectModel;
17 using System.ComponentModel;
20 using System.Diagnostics;
22 namespace SeciControls
31 String
_basedir = Environment.CurrentDirectory;
32 BackgroundWorker
_worker =
new BackgroundWorker();
39 InitializeComponent();
41 if (Seci.Definitions.Status.IsMuonInstrument)
43 colMev.Visibility = System.Windows.Visibility.Visible;
44 colUamps.Visibility = System.Windows.Visibility.Collapsed;
56 _basedir = Seci.Definitions.Status.JournalLocation;
59 _worker.RunWorkerAsync();
72 List<Entry> entries =
new List<Entry>();
78 catch (FileNotFoundException err)
92 _worker.RunWorkerAsync();
100 ObservableCollection<Entry> coll =
new ObservableCollection<Entry>(entries);
101 dgJournal.ItemsSource = coll;
104 catch (Exception err)
106 Console.WriteLine(err.Message);
114 if (String.IsNullOrEmpty(message))
116 txtError.Visibility = System.Windows.Visibility.Collapsed;
121 txtError.Visibility = System.Windows.Visibility.Visible;
122 txtError.Text =
"ERROR: " + message;
132 System.Diagnostics.Process.Start(
_basedir +
@"\journal_main.html");
delegate void UpdateErrorDelegate(String message)
void showErrorMessage(String message)
void lnkJournal_Click(object sender, RoutedEventArgs e)
void UserControl_Loaded(object sender, RoutedEventArgs e)
Interaction logic for JournalViewer.xaml
void _worker_DoWork(object sender, DoWorkEventArgs e)
void updateTable(List< Entry > entries)
delegate void UpdateTableDelegate(List< Entry > entries)
void _timer_Elapsed(object sender, ElapsedEventArgs e)