public void restart() { stopTrace(); m_Trace.close(); m_Trace = new CTraceData(FileMaxSequence); if (!startTrace()) { playSound(eSounds.TraceError, USE_SPEAKER); playSound(eSounds.TraceError, USE_SPEAKER); playSound(eSounds.TraceError, USE_SPEAKER); } }
public CTraceLocal(JBC_API _jbc, int _FileMaxSequence = 0) { // VBConversions Note: Non-static class variable initialization is below. Class variables cannot be initially assigned non-static values in C#. m_TraceControlLogFolder = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.CommonProgramFiles), "JBC\\JBC Station Controller Service\\TraceData"); LoggerModule.InitLogger(); jbc = _jbc; FileMaxSequence = _FileMaxSequence; m_Trace = new CTraceData(6000); //CheckForIllegalCrossThreadCalls = False //butStartTrace.Enabled = True //butStopTrace.Enabled = False //nudFileMaxSequence.Enabled = butStartTrace.Enabled m_TimerStart = new System.Timers.Timer(); m_TimerStart.Elapsed += TimerStart_Elapsed; m_TimerStart.AutoReset = false; m_TimerStart.Interval = TIME_START; m_TimerStart.Stop(); m_TimerDiscover = new System.Timers.Timer(); m_TimerDiscover.Elapsed += TimerDiscover_Elapsed; m_TimerDiscover.AutoReset = false; m_TimerDiscover.Interval = TIME_DISCOVER; m_TimerDiscover.Stop(); m_TimerCopyFiles = new System.Timers.Timer(); m_TimerCopyFiles.Elapsed += TimerCopyFiles_Elapsed; m_TimerCopyFiles.AutoReset = false; m_TimerCopyFiles.Interval = TIME_COPY_FILES; m_TimerCopyFiles.Stop(); m_TimerStart.Start(); }