public void ExtractFiles() { try { archivePath = form1.archivePath; archiveName = FileUtil.GetFileNameWithoutExtensionByFilePath(archivePath); if (FileUtil.FileSize(archivePath) > 0) { ComponentsUtil.AppendTextToRichTextBox(form1.GetRichTextBoxInfo(), "\tStep1:Extract archive files", Color.Blue, true); //obtain desired dataExtractedPath dataExtractedPath = FileUtil.GetPathExtractedArchive(archiveName); //start extract data to specified location ArchiveUtil.UnzipFile(archivePath, dataExtractedPath); //set path to relevant Info from .meta file form1.metaDataExtractedPath = FileUtil.GetPathOfExtractedMetaFile(dataExtractedPath); ComponentsUtil.AppendTextToRichTextBox(form1.GetRichTextBoxInfo(), "\t\tOK...", Color.Blue, true); //activate button of Load DB ComponentsUtil.SetButtonVisibility(form1.GetLoadButton()); } else { ComponentsUtil.AppendTextToRichTextBox(form1.GetRichTextBoxInfo(), "Archive size is 0", Color.Red, true); } } catch (Exception ex) { throw ex; }; }
public void StartParseXMLEntries() { //load xml structure in an object XMLController xmlCtrl = new XMLController(form1); archivatorDTO = xmlCtrl.ConvertXMLToObject(); if (archivatorDTO != null) { //show XML data loaded in a gridView DataGridViewController.FillGridViewWithDataLoaded(form1); //made visible CreateArchive button ComponentsUtil.SetButtonVisibility(form1.GetCreateArchiveButton()); //message to createArchive ComponentsUtil.AppendTextToRichTextBox(form1.GetRichTextBoxInfo(), "\tPress CreateArchive to build archive..", Color.Green, true); //maintain object to used later form1.archivatorDTO = archivatorDTO; } }