165 lines
		
	
	
		
			4.5 KiB
		
	
	
	
		
			C#
		
	
	
	
	
	
			
		
		
	
	
			165 lines
		
	
	
		
			4.5 KiB
		
	
	
	
		
			C#
		
	
	
	
	
	
/*********************************************************************************************
 | 
						|
 * Copyright 2004 - Volian Enterprises, Inc. All rights reserved.
 | 
						|
 * Volian Enterprises - Proprietary Information - DO NOT COPY OR DISTRIBUTE
 | 
						|
 * ------------------------------------------------------------------------------
 | 
						|
 * $Workfile: ZipFuncsDlg.cs $     $Revision: 1 $
 | 
						|
 * $Author: Kathy $   $Date: 7/27/04 8:35a $
 | 
						|
 *
 | 
						|
 * $History: ZipFuncsDlg.cs $
 | 
						|
 * 
 | 
						|
 * *****************  Version 1  *****************
 | 
						|
 * User: Kathy        Date: 7/27/04    Time: 8:35a
 | 
						|
 * Created in $/LibSource/Utils
 | 
						|
 *********************************************************************************************/
 | 
						|
 | 
						|
using System;
 | 
						|
using System.Drawing;
 | 
						|
using System.Collections;
 | 
						|
using System.ComponentModel;
 | 
						|
using System.Windows.Forms;
 | 
						|
 | 
						|
 | 
						|
namespace Utils
 | 
						|
{
 | 
						|
	/// <summary>
 | 
						|
	/// Dialog used to display the zip/unzip function status
 | 
						|
	/// </summary>
 | 
						|
	public class ZipFuncsDlg : System.Windows.Forms.Form
 | 
						|
	{
 | 
						|
		private System.Windows.Forms.ProgressBar progressBar1;
 | 
						|
		private System.Windows.Forms.ProgressBar progressBar2;
 | 
						|
		private System.Windows.Forms.Label label1;
 | 
						|
		private System.Windows.Forms.Label label2;
 | 
						|
		private System.Windows.Forms.Button button1;
 | 
						|
		/// <summary>
 | 
						|
		/// Required designer variable.
 | 
						|
		/// </summary>
 | 
						|
		private System.ComponentModel.Container components = null;
 | 
						|
 | 
						|
		private bool _CancelZip;
 | 
						|
 | 
						|
		public ZipFuncsDlg()
 | 
						|
		{
 | 
						|
			//
 | 
						|
			// Required for Windows Form Designer support
 | 
						|
			//
 | 
						|
			InitializeComponent();
 | 
						|
			_CancelZip = false;
 | 
						|
			this.DialogResult = System.Windows.Forms.DialogResult.OK;
 | 
						|
		}
 | 
						|
 | 
						|
 | 
						|
		protected override void Dispose( bool disposing )
 | 
						|
		{
 | 
						|
			if( disposing )
 | 
						|
			{
 | 
						|
				if(components != null)
 | 
						|
				{
 | 
						|
					components.Dispose();
 | 
						|
				}
 | 
						|
			}
 | 
						|
			base.Dispose( disposing );
 | 
						|
		}
 | 
						|
 | 
						|
		#region Windows Form Designer generated code
 | 
						|
		/// <summary>
 | 
						|
		/// Required method for Designer support - do not modify
 | 
						|
		/// the contents of this method with the code editor.
 | 
						|
		/// </summary>
 | 
						|
		private void InitializeComponent()
 | 
						|
		{
 | 
						|
			this.progressBar1 = new System.Windows.Forms.ProgressBar();
 | 
						|
			this.progressBar2 = new System.Windows.Forms.ProgressBar();
 | 
						|
			this.label1 = new System.Windows.Forms.Label();
 | 
						|
			this.label2 = new System.Windows.Forms.Label();
 | 
						|
			this.button1 = new System.Windows.Forms.Button();
 | 
						|
			this.SuspendLayout();
 | 
						|
			// 
 | 
						|
			// progressBar1
 | 
						|
			// 
 | 
						|
			this.progressBar1.Location = new System.Drawing.Point(16, 40);
 | 
						|
			this.progressBar1.Name = "progressBar1";
 | 
						|
			this.progressBar1.Size = new System.Drawing.Size(360, 23);
 | 
						|
			this.progressBar1.TabIndex = 0;
 | 
						|
			// 
 | 
						|
			// progressBar2
 | 
						|
			// 
 | 
						|
			this.progressBar2.Location = new System.Drawing.Point(16, 104);
 | 
						|
			this.progressBar2.Name = "progressBar2";
 | 
						|
			this.progressBar2.Size = new System.Drawing.Size(360, 23);
 | 
						|
			this.progressBar2.TabIndex = 1;
 | 
						|
			// 
 | 
						|
			// label1
 | 
						|
			// 
 | 
						|
			this.label1.Location = new System.Drawing.Point(24, 16);
 | 
						|
			this.label1.Name = "label1";
 | 
						|
			this.label1.Size = new System.Drawing.Size(352, 16);
 | 
						|
			this.label1.TabIndex = 2;
 | 
						|
			this.label1.Text = "label1";
 | 
						|
			// 
 | 
						|
			// label2
 | 
						|
			// 
 | 
						|
			this.label2.Location = new System.Drawing.Point(16, 80);
 | 
						|
			this.label2.Name = "label2";
 | 
						|
			this.label2.Size = new System.Drawing.Size(360, 16);
 | 
						|
			this.label2.TabIndex = 3;
 | 
						|
			this.label2.Text = "label2";
 | 
						|
			// 
 | 
						|
			// button1
 | 
						|
			// 
 | 
						|
			this.button1.Location = new System.Drawing.Point(144, 144);
 | 
						|
			this.button1.Name = "button1";
 | 
						|
			this.button1.Size = new System.Drawing.Size(104, 32);
 | 
						|
			this.button1.TabIndex = 4;
 | 
						|
			this.button1.Text = "Cancel";
 | 
						|
			this.button1.Click += new System.EventHandler(this.button1_Click);
 | 
						|
			// 
 | 
						|
			// ZipFuncs
 | 
						|
			// 
 | 
						|
			this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);
 | 
						|
			this.ClientSize = new System.Drawing.Size(400, 190);
 | 
						|
			this.Controls.Add(this.button1);
 | 
						|
			this.Controls.Add(this.label2);
 | 
						|
			this.Controls.Add(this.label1);
 | 
						|
			this.Controls.Add(this.progressBar2);
 | 
						|
			this.Controls.Add(this.progressBar1);
 | 
						|
			this.Name = "ZipFuncs";
 | 
						|
			this.Text = "ZipFuncs";
 | 
						|
			this.ResumeLayout(false);
 | 
						|
 | 
						|
		}
 | 
						|
		#endregion
 | 
						|
 | 
						|
		private void button1_Click(object sender, System.EventArgs e)
 | 
						|
		{
 | 
						|
			_CancelZip = true;
 | 
						|
			this.DialogResult = System.Windows.Forms.DialogResult.Cancel;
 | 
						|
		}
 | 
						|
 | 
						|
		public  void ZipMajorStatus_event(String lpstrItem, int percent, ref int rc)
 | 
						|
		{
 | 
						|
			progressBar1.Value = percent;
 | 
						|
			label1.Text = lpstrItem;
 | 
						|
 | 
						|
			if (_CancelZip)
 | 
						|
				rc = 1;
 | 
						|
			else
 | 
						|
				rc = 0;
 | 
						|
		}
 | 
						|
 | 
						|
		public  void ZipMinorStatus_event(String lpstrItem, int percent, ref int rc)
 | 
						|
		{
 | 
						|
			progressBar2.Value = percent;
 | 
						|
			label2.Text = lpstrItem;
 | 
						|
 | 
						|
			if (_CancelZip)
 | 
						|
				rc = 1;
 | 
						|
			else
 | 
						|
				rc = 0;
 | 
						|
		}
 | 
						|
 | 
						|
 | 
						|
 | 
						|
	}
 | 
						|
}
 |