예제 #1
0
        public bool TryUpdateHiddenData()
        {
            if (!IsArchiveOpened)
            {
                return(false);
            }

            var initialDirectory = Path.GetDirectoryName(ArchiveFilePath);
            var initialFileName  = Path.GetFileName(ArchiveFilePath);

            var fileDialog = DialogProvider.ShowOpenFileDialog("Choose file to store in EPF archive as hidden data...",
                                                               "All Files (*.*)|*.*",
                                                               initialDirectory,
                                                               initialFileName);

            if (fileDialog.Answer != DialogAnswer.OK)
            {
                Status.Log.Info($"Adding hidden data canceled...");
                return(false);
            }

            _epfArchive.UpdateHiddenData(fileDialog.FileName);

            HasHiddenData = _epfArchive.HasHiddenData;

            Status.Log.Info($"Hidden data has been added to EPF archive.");

            return(true);
        }