Ejemplo n.º 1
0
        public void AddItem(string Path)
        {
            ArchiveEntry entry = new ArchiveEntry(Path, null, false, EncryptionType.None);

            if (m_Archive.add(entry))
            {
                AddFile(entry.getNameExtension(), entry.getExtension(), entry.getSizeData(), entry.getId(), Path);

                SetSavedState(false);
                SetStatus(String.Format("Added {0} to the archive.", entry.getNameExtension()));
            }
            else
            {
                ReplaceFile(entry.getNameExtension(), entry.getExtension(), entry.getSizeData(), entry.getId(), Path);

                SetSavedState(false);
                SetStatus(String.Format("Replaced {0} in the archive.", entry.getNameExtension()));
            }
        }