Beispiel #1
0
        private void ts_extract_Click(object sender, System.EventArgs e)
        {
            string path = "";
            FolderBrowserDialog fb_dialog = new FolderBrowserDialog();

            if (fb_dialog.ShowDialog() == DialogResult.OK)
            {
                path = fb_dialog.SelectedPath;
            }
            else
            {
                return;
            }

            List <File> files_to_extract = new List <File>();

            if (tv_dirs.Focused)
            {
                if (tv_dirs.SelectedNode == null || tv_dirs.SelectedNode.Level == 0)
                {
                    return;
                }

                files_to_extract.Add(((FileNode)tv_dirs.SelectedNode).File);
            }
            else
            {
                if (lv_files.SelectedItems.Count <= 0)
                {
                    return;
                }
                foreach (FileItem fi in lv_files.SelectedItems)
                {
                    files_to_extract.Add(fi.File);
                }
            }

            ExtractionProgressBar epb = new ExtractionProgressBar(files_to_extract, path);

            epb.ShowDialog(this);
        }
Beispiel #2
0
        private void ts_extract_Click( object sender, System.EventArgs e )
        {
            string path = "";
            FolderBrowserDialog fb_dialog = new FolderBrowserDialog();
            if ( fb_dialog.ShowDialog() == DialogResult.OK )
            {
                path = fb_dialog.SelectedPath;
            }
            else
            {
                return;
            }

            List< File > files_to_extract = new List<File>();
            if ( tv_dirs.Focused )
            {
                if ( tv_dirs.SelectedNode == null || tv_dirs.SelectedNode.Level == 0 ) return;

                files_to_extract.Add( ((FileNode)tv_dirs.SelectedNode).File );
            }
            else
            {
                if ( lv_files.SelectedItems.Count <= 0 ) return;
                foreach ( FileItem fi in lv_files.SelectedItems )
                {
                    files_to_extract.Add( fi.File );
                }
            }

            ExtractionProgressBar epb = new ExtractionProgressBar( files_to_extract, path );
            epb.ShowDialog( this );
        }