예제 #1
0
        public ArchiveWriter(string archive_path, ArchiveEntry[] arc_entries)
        {
            InitializeComponent();

            bool arc_dir_valid = false;
            bool entries_valid = ArchiveEntry.CheckEntries(arc_entries);

            if (archive_path != null && System.IO.Directory.Exists(archive_path))
            {
                if (!archive_path.EndsWith("\\"))
                {
                    archive_path += "\\";
                }
                arc_dir_valid = true;
            }



            if (arc_dir_valid && entries_valid)
            {
                this.ArchiveDirectory = archive_path;
                this.ArchiveEntries   = arc_entries;
            }
            else
            {
                MessageBox.Show("Archive creator wrong params, cannot continue...",
                                "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
                this.Close();
            }
        }