Beispiel #1
0
 public void Delete()
 {
     FilesystemHelper.DeleteFile(m_FileName);
     if (!File.Exists(m_FileName))
     {
         NotificationCenter.RaiseRefreshFileExplorer(this, true);
     }
 }
        private void DeleteSelectedVideo(ListView lv)
        {
            string path = GetSelectedVideoPath(lv);

            if (path == null)
            {
                return;
            }

            FilesystemHelper.DeleteFile(path);
            if (!File.Exists(path))
            {
                DoRefreshFileList(true);
            }
        }
Beispiel #3
0
        private void View_DeleteAsked(object sender, EventArgs e)
        {
            CapturedFileView view = sender as CapturedFileView;

            if (view == null || view.CapturedFile == null || string.IsNullOrEmpty(view.CapturedFile.Filepath))
            {
                return;
            }

            FilesystemHelper.DeleteFile(view.CapturedFile.Filepath);

            if (File.Exists(view.CapturedFile.Filepath))
            {
                return;
            }

            HideCapturedFileView(view.CapturedFile);
            NotificationCenter.RaiseRefreshFileExplorer(this, true);
        }
        private void DeleteSelectedVideo(TreeView tv)
        {
            if (!tv.Focused)
            {
                return;
            }

            if (tv.SelectedNode == null)
            {
                return;
            }

            CaptureHistoryEntry entry = tv.SelectedNode.Tag as CaptureHistoryEntry;

            if (entry == null)
            {
                return;
            }

            TreeNode parent = tv.SelectedNode.Parent;

            if (parent == null)
            {
                return;
            }

            string session = parent.Tag as string;

            string path = entry.CaptureFile;

            if (path == null)
            {
                return;
            }

            FilesystemHelper.DeleteFile(path);
            if (!File.Exists(path))
            {
                CaptureHistory.RemoveEntry(session, entry);
                ReloadCaptureHistoryExpandedSessions();
            }
        }
Beispiel #5
0
        private void CommandDelete()
        {
            ListView lv   = GetFileListview();
            string   path = GetSelectedVideoPath(lv);

            if (path == null)
            {
                return;
            }

            FilesystemHelper.DeleteFile(path);
            if (!File.Exists(path))
            {
                if (activeTab == ActiveFileBrowserTab.Cameras)
                {
                    PreferencesManager.FileExplorerPreferences.ConsolidateRecentCapturedFiles();
                }

                DoRefreshFileList(true);
            }
        }