private void OnPrintComplete(FileManagerStatus status) { if (PrintComplete != null) { PrintComplete(this, new PrintCompletedEventArgs(status)); } }
public void Clean() { lock (m_lockObject) { foreach (FileManagerStream page in m_pages) { DeleteStream(page); } foreach (FileManagerStream nonRegisteredStream in m_nonRegisteredStreams) { DeleteStream(nonRegisteredStream); } m_pages.Clear(); m_nonRegisteredStreams.Clear(); m_waitingForNextPage.Set(); m_status = FileManagerStatus.NotStarted; } }
public Stream CreatePage(bool register) { lock (m_lockObject) { if (m_status != 0 && m_status != FileManagerStatus.InProgress) { Clean(); } FileManagerStream fileManagerStream = CreateStream(); if (register) { m_pages.Add(fileManagerStream); } else { m_nonRegisteredStreams.Add(fileManagerStream); } m_status = FileManagerStatus.InProgress; m_waitingForNextPage.Set(); return(fileManagerStream.Stream); } }
internal PrintCompletedEventArgs(FileManagerStatus status) { _status = status; }