Exemplo n.º 1
0
        protected override void HandleSelection()
        {
            if (Input.ListBox.SelectedIndex != -1)
                SelectedLocation = ((StringPopupItem)Input.ListBox.SelectedItem).FilterString;
            else
            {
                SelectedLocation = Input.TextBox.Text;
                if (string.IsNullOrEmpty(SelectedLocation))
                {
                    NewWindow = true;
                    SelectedLocation =  ListerManager.Instance.ListerViewManager.CurrentListerView.Lister.CurrentDirectory;
                }
            }

            if (File.Exists(SelectedLocation))
            {
                SelectedLocation = new FileInfo(SelectedLocation).FullName;
                FileItem fi = new FileItem(SelectedLocation, ItemType.Executable, null);// ListerManager.Instance.ListerViewManager.CurrentListerView.Lister.ItemProvider as FilesystemItemProvider);
                ListerManager.Instance.CommandManager.DoDefaultAction();
            }
            else if (Directory.Exists(SelectedLocation))
            {
                SelectedLocation = new DirectoryInfo(SelectedLocation).FullName;
                if (NewWindow)
                    ListerManager.Instance.ListerViewManager.OpenLister(SelectedLocation);
                else
                    ListerManager.Instance.CommandManager.SetContainer(SelectedLocation);
            }
            Hide();
        }
Exemplo n.º 2
0
        public void Show(FileItem fi)
        {
            var items = new List<PropertyItem>();
            items.AddRange(fi.ShellObject.Properties.DefaultPropertyCollection
                .Where(pc => pc.CanonicalName != null && pc.ValueAsObject != null)
                .Select(pc => new PropertyItem(pc.Description.DisplayName, pc.ValueAsObject.ToString())));

            if (fi.FullPath.ToLower().EndsWith(".dll"))
            {
                try
                {
                    items.Add(new PropertyItem("References", ""));
                    var a = Mono.Cecil.AssemblyDefinition.ReadAssembly(fi.FullPath);
                    items.AddRange(a.MainModule.AssemblyReferences.Select(ar => new PropertyItem("", ar.FullName)));
                } catch {}
            }
            PropertyList.ItemsSource = items;
            Title = fi.Name + " " + "Properties";

            ShowDialog();
        }
Exemplo n.º 3
0
 public PropertyLister(FileItem fileItem)
     : base()
 {
     FileItem = fileItem;
 }
Exemplo n.º 4
0
 public TextLister(FileItem fileItem)
     : base()
 {
     FileItem = fileItem;
 }