Ejemplo n.º 1
0
        private void btn_extract_Click(object sender, EventArgs e)
        {
            var files = new List <string>()
            {
                _pathArchive
            };
            var directoryName = Path.GetDirectoryName(_pathArchive);

            var createArchive = new CreateArchive(files, false, directoryName, only: false);

            createArchive.Show();
        }
Ejemplo n.º 2
0
        //private void CreateArchive_Show(OutArchiveFormat format) 
        //{
        //    var selectedItems = new List<string>();
        //    foreach(ShellObject item in Explorer.SelectedItems)
        //    {
        //        if (Directory.Exists(item.ParsingName))
        //        {
        //            DirectoryInfo di = new DirectoryInfo(item.ParsingName);
        //            FileInfo[] Files = di.GetFiles("*", SearchOption.AllDirectories);
        //            foreach (FileInfo fi in Files)
        //            {
        //                selectedItems.Add(fi.FullName);
        //            }

        //        }
        //        else
        //        {
        //            selectedItems.Add(item.ParsingName);
        //        }

        //    }
        //    if (selectedItems.Count > 0)
        //    {
        //        try
        //        {
        //            var CAI = new CreateArchive(selectedItems,
        //                                        true,
        //                                        Path.GetDirectoryName(selectedItems[0]),
        //                                        format);

        //            CAI.Show(this.GetWin32Window());


        //        }
        //        catch (Exception exception)
        //        {
        //            var dialog = new TaskDialog();
        //            dialog.StandardButtons = TaskDialogStandardButtons.Ok;
        //            dialog.Text = exception.Message;
        //            dialog.Show();
        //        }
        //    }
        // }

        private void ExtractFiles()
        {
            var selectedItems = new List<string>();
            foreach (ShellObject item in Explorer.SelectedItems)
            {
                selectedItems.Add(item.ParsingName);
            }
            try
            {
                var CAI = new CreateArchive(selectedItems,
                                            false,
                                            Explorer.SelectedItems[0].ParsingName);

                CAI.Show(this.GetWin32Window());


            }
            catch (Exception exception)
            {
                var dialog = new TaskDialog();
                dialog.StandardButtons = TaskDialogStandardButtons.Ok;
                dialog.Text = exception.Message;
                dialog.Show();
            }
        }
Ejemplo n.º 3
0
    private void miExtractToLocation_Click(object sender, RoutedEventArgs e) {
      var selectedItems = _ShellListView.SelectedItems.Select(item => item.ParsingName).ToList();

      try {
        var CAI = new CreateArchive(selectedItems, false, _ShellListView.GetFirstSelectedItem().ParsingName);
        CAI.Show(this.GetWin32Window());
      } catch {

      }
    }
        private void btn_extract_Click(object sender, EventArgs e)
        {
            var files = new List<string>() {_pathArchive };
            var directoryName = Path.GetDirectoryName(_pathArchive);

            var createArchive = new CreateArchive(files, false, directoryName, only: false);
            createArchive.Show();
        }