コード例 #1
0
 protected virtual void OnReceiveServiceMessage(UnZipDLLServiceMessageEventArgs e)
 {
     if (ReceiveServiceMessage != null)
     {
         ReceiveServiceMessage(this, e);
     }
 }
コード例 #2
0
        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);
        }
コード例 #3
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);
        }
コード例 #4
0
ファイル: Form1.cs プロジェクト: firefighter389/wwiv
		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;
		}
コード例 #5
0
ファイル: Unzip.cs プロジェクト: firefighter389/wwiv
    /*
    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;
    }
コード例 #6
0
ファイル: Unzip.cs プロジェクト: firefighter389/wwiv
 protected virtual void OnReceiveServiceMessage (UnZipDLLServiceMessageEventArgs e)
 {
   if (ReceiveServiceMessage != null)
   {
     ReceiveServiceMessage(this, e);
   }
 }