diff options
| author | jpbruyere <jp.bruyere@hotmail.com> | 2016-09-02 12:44:36 +0200 |
|---|---|---|
| committer | jpbruyere <jp.bruyere@hotmail.com> | 2016-09-02 12:44:36 +0200 |
| commit | 004ab2dee65d4b18e20d8999ff644dd197aa1cd8 (patch) | |
| tree | 5aacdac61be546b7411a2b0be804663221dd048c /src | |
| parent | 906de17554fd6f9e83d08ff2b1c5fa7113b8ed8e (diff) | |
rename Root to CurrentDirectory, et CurrentDirectory to
FileSystemEntries
modifié : CrowIDE/ui/imlEditor.crow
modifié : Templates/DirectoryView.template
modifié : Tests/Interfaces/Divers/0.crow
modifié : src/GraphicObjects/DirectoryView.cs
thiner menu
modifié : Templates/Menu.template
modifié : Templates/MenuItem.template
Diffstat (limited to 'src')
| -rw-r--r-- | src/GraphicObjects/DirectoryView.cs | 34 |
1 files changed, 19 insertions, 15 deletions
diff --git a/src/GraphicObjects/DirectoryView.cs b/src/GraphicObjects/DirectoryView.cs index dbb0c212..4e29621e 100644 --- a/src/GraphicObjects/DirectoryView.cs +++ b/src/GraphicObjects/DirectoryView.cs @@ -37,8 +37,8 @@ namespace Crow public event EventHandler<SelectionChangeEventArgs> SelectedItemChanged; #endregion - string _root = "/"; - bool _showFiles; + string currentDirectory = "/"; + bool showFiles; object _selectedItem; [XmlIgnore]public object SelectedItem { @@ -52,29 +52,33 @@ namespace Crow NotifyValueChanged ("SelectedItem", _selectedItem); } } - [XmlAttributeAttribute()][DefaultValue(true)] + [XmlAttributeAttribute()][DefaultValue(false)] public virtual bool ShowFiles { - get { return _showFiles; } + get { return showFiles; } set { - if (_showFiles == value) + if (showFiles == value) return; - _showFiles = value; - NotifyValueChanged ("ShowFiles", _showFiles); + showFiles = value; + NotifyValueChanged ("ShowFiles", showFiles); + NotifyValueChanged ("FileSystemEntries", FileSystemEntries); } } [XmlAttributeAttribute][DefaultValue("/")] - public virtual string Root { - get { return _root; } + public virtual string CurrentDirectory { + get { return currentDirectory; } set { - if (_root == value) + if (currentDirectory == value) return; - _root = value; - NotifyValueChanged ("Root", _root); - NotifyValueChanged ("CurrentDirectory", CurrentDirectory); + currentDirectory = value; + NotifyValueChanged ("CurrentDirectory", currentDirectory); + NotifyValueChanged ("FileSystemEntries", FileSystemEntries); } } - [XmlIgnore]public FileSystemInfo[] CurrentDirectory { - get { return new DirectoryInfo (Root).GetFileSystemInfos (); } + [XmlIgnore]public FileSystemInfo[] FileSystemEntries { + get { + return showFiles ? new DirectoryInfo (CurrentDirectory).GetFileSystemInfos (): + new DirectoryInfo(currentDirectory).GetDirectories(); + } } public void onSelectedItemChanged (object sender, SelectionChangeEventArgs e){ if (e.NewValue == SelectedItem) |