public Window1() { try { dataAccess = new DataAccess(); string type = ConfigurationSettings.AppSettings["TYPE"]; appTimer = new System.Timers.Timer(1 * 1000); appTimer.AutoReset = false; appTimer.Elapsed += new ElapsedEventHandler(appTimer_Elapsed); xmlSerializer = new XmlSerializer(typeof(AndonAlertEventArgs)); InitializeComponent(); appTimer.Start(); } catch (Exception e) { MessageBox.Show(e.Message, "Application Error", MessageBoxButton.OK, MessageBoxImage.Error); Window_Closing(this, new CancelEventArgs()); } }
public Reports() { InitializeComponent(); dataAccess = new DataAccess(); }