Archives for May 2010

DirectoryInfoEx : Asynchronous Enumeration

Introduction Assume there’s only one operation, asynchronous operation doesnt make the operation faster than synchronous, but it can improve responsiveness, to regain the control, user dont have to wait till an operation to complete.  The advantage is even greation if there are two or more operations in multi-thread system, the second operation can be executed much earlier in asynchronous version. [...]

FileList Scrolling

The scrolling method of VirtualWrapPanelView is done by the panel (VirtualWrapPanel) implementing IScrollInfo interface, which implemented a number of methods like PageUp(), MouseWheelUp(), LineDown(). The current implementation of these is changing the scroll position by a fixed amount (10 pts) e.g. SetVerticalOffset(this.VerticalOffset – 10); Note : The GridView uses item position instead of pixels, so if you want to [...]

DirectoryInfoEx : ContextMenuWrapper

Introduction DirectoryInfoEx has a number of classes thats unrelated to list and basic file operations, I place them in separate class so they are easier to maintain, because they wrap ShellAPI codes, they are called wrapper and placed in Tools\Wrapper directory.  ContextMenuWrapper is a class that can generate shell context menu for specific entry(s) (FileSystemInfoEx[]). ContextMenuWrapper ContextMenuWrapper has the following [...]

Re: Once more about macros in C# (version 2)

This is a respond for Ivan Krivyakov’s Once more about macros in C#, feature an Observable that can “construct itself” and able to notify changes. public class ModelBase { private Dictionary<string, object> variableDic = new Dictionary<string, object>(); protected Observable<T> getVar<T>(string name) //GetVariable { if (!variableDic.ContainsKey(name)) variableDic.Add(name, new Observable<T>()); return (Observable<T>)variableDic[name]; } } public class Person [...]

Adding DirectoryTree.AutoCollapse property

Introduction DirectoryTree.AutoCollapse is a DependencyProperty, if set to true, when chaning directory externally, will try to collapse unrelated directories (e.g. by setting SelectedDirectory), Default is true. Design Changes Before discussing DirectoryTree.AutoCollapse property, there’s a changes in DirectoryTree in 0.4, currently when a user select a directory in DirectoryTree, it will set the DirectoryTree.SelectedDirectory, which will trigger OnSelectedDirectoryChanged event, which [...]