Ejemplo n.º 1
0
        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."));
        }
Ejemplo n.º 2
0
 private void _ButtonStopClick(object sender, EventArgs e)
 {
     LogWriter.WriteDebugMessage(string.Format("Stopping Timer."));
     _StopHandler();
     LogWriter.WriteDebugMessage(string.Format("Stopped Timer successfully."));
     sExcelHelper = null;
     _ChangeStateOfAllControls();
 }