protected virtual void OnReceiveServiceMessage(UnZipDLLServiceMessageEventArgs e) { if (ReceiveServiceMessage != null) { ReceiveServiceMessage(this, e); } }
private int unZip_ReceiveServiceMessage(object sender, UnZipDLLServiceMessageEventArgs e) { m_CurrentSize += e.SizeOfFileEntry; prgBar.Value = Convert.ToInt32(100 * Convert.ToDouble(m_CurrentSize) / Convert.ToDouble(e.ZipFileSize)); lblProgress.Text = "Unzipping " + m_CurrentSize.ToString("N0") + " of " + e.ZipFileSize.ToString("N0") + " bytes."; Application.DoEvents(); return(0); }
/* * DLLSERVICE *ServCallBk = Callback function designed to be used for * allowing the application to process Windows messages, * or canceling the operation, as well as giving the * option of a progress indicator. If this function * returns a non-zero value, then it will terminate * what it is doing. It provides the application with * the name of the name of the archive member it has * just processed, as well as it's original size. * * fname.ch = the name of the file being zipped * ucsize = the size of the file being zipped * * */ protected int UZDLLService([MarshalAs(UnmanagedType.LPStr)] String fname, ulong ucsize) { //Raise this event UnZipDLLServiceMessageEventArgs e = new UnZipDLLServiceMessageEventArgs(m_ZipFileSize, fname, unchecked (ucsize)); OnReceiveServiceMessage(e); return(m_Stop); }
private int unZip_ReceiveServiceMessage(object sender, UnZipDLLServiceMessageEventArgs e) { m_CurrentSize += e.SizeOfFileEntry; prgBar.Value = Convert.ToInt32(100 * Convert.ToDouble(m_CurrentSize) / Convert.ToDouble(e.ZipFileSize)); lblProgress.Text = "Unzipping " + m_CurrentSize.ToString("N0") + " of " + e.ZipFileSize.ToString("N0") + " bytes."; Application.DoEvents(); return 0; }
/* DLLSERVICE *ServCallBk = Callback function designed to be used for allowing the application to process Windows messages, or canceling the operation, as well as giving the option of a progress indicator. If this function returns a non-zero value, then it will terminate what it is doing. It provides the application with the name of the name of the archive member it has just processed, as well as it's original size. fname.ch = the name of the file being zipped ucsize = the size of the file being zipped * */ protected int UZDLLService([MarshalAs(UnmanagedType.LPStr)]String fname, ulong ucsize) { //Raise this event UnZipDLLServiceMessageEventArgs e = new UnZipDLLServiceMessageEventArgs(m_ZipFileSize, fname, unchecked(ucsize)); OnReceiveServiceMessage (e); return m_Stop; }
protected virtual void OnReceiveServiceMessage (UnZipDLLServiceMessageEventArgs e) { if (ReceiveServiceMessage != null) { ReceiveServiceMessage(this, e); } }