public static void ShowErrorMessage(Exception exception) { var errorMessage = new PopupMessage { Type = PopupMessageType.Error }; if (!sIsHandlerDisposed) { _StopHandler(); sInstance._ChangeStateOfAllControls(); } errorMessage.ShowDialog(ActiveForm, exception.Message, exception.StackTrace); }
private void _ButtonStartClick(object sender, EventArgs e) { _ChangeStateOfAllControls(); if (!Directory.Exists(sLimsVisualizerSettings.FilePath)) { var popupMessage = new PopupMessage { Type = PopupMessageType.Info }; popupMessage.ShowDialog(this, string.Format("The provided path '{0}' does not exist!", sLimsVisualizerSettings.FilePath)); _ChangeStateOfAllControls(); return; } sExcelHelper = new ExcelHelper(); sTimer = new Threading.Timer(_TimerHandler); LogWriter.WriteDebugMessage(string.Format("Starting Timer. FilePath: '{0}' Interval: '{1}'", sLimsVisualizerSettings.FilePath, sLimsVisualizerSettings.DueTime)); _StartHandler(); LogWriter.WriteDebugMessage(string.Format("Started Timer successfully.")); }