public void AddExplorerNode(string path, string name, DateTime chg, explType type, long size, bool haveEds = false) { ExplorerNode node; if (type == explType.Folder) { node = new ExplorerNode(path, name, chg, type, size); node.MouseDoubleClick += Node_MouseDoubleClick; } else { node = new ExplorerNode(path, name, chg, type, size, Icon.ExtractAssociatedIcon(path)); } if (haveEds) { node.EdsState = 1; } else { node.EdsState = 0; } node.Height = this.HeightNode; Binding binding = new Binding(); binding.Source = this.listbox; binding.Path = new PropertyPath("ActualWidth"); binding.Mode = BindingMode.OneWay; node.SetBinding(WidthProperty, binding); this.listbox.Items.Add(node); }
public void UpdateFileInfo(EDSFile f) { foreach (IExplorerNode n in this.listbox.Items) { if (n.Path == f.File.FullName && n.Type == explType.File) { ExplorerNode node = (ExplorerNode)n; node.EdsState = f.EdsState; break; } } }
public void AddKeysNode(string path) { var node = new ExplorerNode(path, explType.Keys); node.MouseDoubleClick += Node_MouseDoubleClick; node.EdsState = 0; node.Height = this.HeightNode; Binding binding = new Binding(); binding.Source = this.listbox; binding.Path = new PropertyPath("ActualWidth"); binding.Mode = BindingMode.OneWay; node.SetBinding(WidthProperty, binding); this.listbox.Items.Add(node); }