public void RevertToOriginal() { if (!HasBackupFile) { return; } FileUtility.MoveFile(FileBackup, FileSystemPath); FolderUtility.DeleteDirectory(WorkingFolder); _containsClassesDex = -1; HandleContentUpdatedExternaly(); }
private CrcsProject(string fileSystemPath, CrcsSolution solution) : base(fileSystemPath, false, null) { Solution = solution; FrameWorkFolder = FindFrameWorkFolder(); _properties = new ProjectProperties(this); _properties.PropertyChanged += ProjectPropertiesPropertyChanged; string apkToolFrameWorkFolder = CrcsSettings.Current.ApkToolFrameWorkFolder; FolderUtility.DeleteDirectory(apkToolFrameWorkFolder); Directory.CreateDirectory(apkToolFrameWorkFolder); // Project = this; }
public void ProcessFile(object fileObject, Func <bool> isCanceled) { if (fileObject == null) { throw new ArgumentNullException("fileObject"); } var file = fileObject as CompositFile; if (file == null) { throw new Exception(string.Format("{0} can not handle object of type {1}", GetType().Name, fileObject.GetType().Name)); } if (!file.CanDecompile) { return; } if (file.IsDeCompiled) { return; } MessageEngine.AddInformation(this, string.Format("Decompiling classes for {0}", file.Name)); Directory.CreateDirectory(file.ClassesFolder); string dexFile = null; string classesFile; if (file.ContainsClassesDex) { dexFile = FileUtility.ExtractToTempDir(file.FileSystemPath, "classes.dex"); if (dexFile == null) { throw new Exception(string.Format("classes.dex could not be extracted from {0} ", file.Name)); } classesFile = dexFile; } else { classesFile = file.OdexFile; } Decompile(file.Name, classesFile, file.ClassesFolder, file.IgnoreDecompileErrors, file.Project); if (dexFile != null) { FolderUtility.DeleteDirectory(dexFile); } }
private void deleteToolStripMenuItem_Click(object sender, EventArgs e) { int selectedVideo = this.videoListBox.SelectedIndex; // Get current video index var confirmResult = MessageBox.Show("Are you sure to delete " + videoFolder + "??", "CONFIRM DELETE!!", MessageBoxButtons.OKCancel); // read only problem if (confirmResult == DialogResult.OK) { folderUtility.DeleteDirectory(videoFolder, true); Global.ScanDrive(drives); video.UpdateVideo(this.videoListBox, this.videoDataGridView, this.numOfFileTextBox); video.ListGenre(genreDataGridView); coverPictureBox.Image = null; } this.videoListBox.SelectedIndex = selectedVideo; // 2022/01/15: Select the next video }