Esempio n. 1
0
        /// <summary>
        /// 添加文件
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void button3_Click(object sender, EventArgs e)
        {
            OpenFileDialog ofd = new OpenFileDialog();

            ofd.Multiselect      = true;
            ofd.InitialDirectory = InitDir;
            ofd.ShowDialog();
            string[] FileNames = ofd.FileNames;
            ofd.Dispose();
            //添加文件列表到压缩包,并显示在列表
            for (int i = 0; i < FileNames.Length; i++)
            {
                //Console.WriteLine(FileNames[i]);
                Entry entry = new Entry(FileNames[i], @"");
                _ZipEntity.Add(entry);
            }
            IsSave = false;
            this.FileBrower();
        }
Esempio n. 2
0
 public void AddFile(string name)
 {
     zip.Add(new Entry(name, ""));
 }