public int PrintStream(Stream stream, string filePath, Encoding encoding) { _printStream = stream; _printEncoding = encoding; OnPrintStreamEventHandler eh = new OnPrintStreamEventHandler(PrintStreamOnPrint); _p4.OnPrintStream += eh; _p4.PrintStreamEvents(filePath); _p4.OnPrintStream -= eh; _printStream = null; _printEncoding = null; return _filesPrinted; }
public int PrintStream(Stream stream, string filePath, Encoding encoding) { _printStream = stream; _printEncoding = encoding; OnPrintStreamEventHandler eh = new OnPrintStreamEventHandler(PrintStreamOnPrint); _p4.OnPrintStream += eh; _p4.PrintStreamEvents(filePath); _p4.OnPrintStream -= eh; _printStream = null; _printEncoding = null; return(_filesPrinted); }
public override void OutputRecord(P4Record record) { OnPrintStreamEventHandler handler = _printEvent; // Event will be null if there are no subscribers if (handler != null) { string depotFile = record["depotFile"]; string action = record["action"]; string fileType = record["type"]; DateTime changeDate = _p4.ConvertDate(record["time"]); int change = int.Parse(record["change"]); // get the information about the file _args = new P4PrintStreamEventArgs(depotFile, action, fileType, changeDate, change); handler(_args, out _stream); } }
public override void OutputStat(Hashtable varList) { OnPrintStreamEventHandler handler = _printEvent; // Event will be null if there are no subscribers if (handler != null) { string depotFile = (string)varList[(object)"depotFile"]; string action = (string)varList[(object)"action"]; string fileType = (string)varList[(object)"type"]; DateTime changeDate = _p4.ConvertDate((string)varList[(object)"time"]); int change = int.Parse((string)varList[(object)"change"]); // get the information about the file _args = new P4PrintStreamEventArgs(depotFile, action, fileType, changeDate, change); handler(_args, out _stream); } }
internal P4PrintCallback(P4Connection p4connection, OnPrintStreamEventHandler OnPrintEvent, OnPrintEndEventHandler OnPrintEnd) { _p4 = p4connection; _printEvent = OnPrintEvent; _printEndEvent = OnPrintEnd; }