コード例 #1
0
        /// <summary>
        /// 新建压缩包
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void button1_Click(object sender, EventArgs e)
        {
            this.CheckFile();
            if (messageBoxCS.Length != 0)
            {
                messageBoxCS.AppendFormat("确定要放弃操作重新建立文件吗?");
                messageBoxCS.AppendLine();
                if (MessageBox.Show(messageBoxCS.ToString(), "提示", MessageBoxButtons.OKCancel) == DialogResult.OK)
                {
                    _ZipEntity.Close();
                    if (Path.GetExtension(FileName).ToLower() == ".temp")
                    {
                        File.Delete(FileName);
                    }
                }
            }

            this.FileName = InitDir + "Temp_0.Temp";
            int i = 1;

            while (File.Exists(this.FileName))
            {
                this.FileName = InitDir + "Temp_" + i.ToString() + ".Temp";
                i++;
            }
            IsSave = false;
            this.LoadZipFile();
            FileBrower();
        }
コード例 #2
0
ファイル: ZipEntityComPlus.cs プロジェクト: jasoncorl/JC.Lib
 public void Close()
 {
     zip.Close();
 }