Esempio n. 1
0
        public string GetFolderInfo(IDirInfoProvider provider, string columnName, ShellItem item)
        {
            string retVal = string.Empty;

            if (columnName != "Size" && !item.IsSystemFolder && !item.IsDisk && item.IsFileSystem)
            {
                ShellAPI.STATSTG info = provider.GetDirInfo();

                switch (columnName)
                {
                case "Date Created":
                    #region Date Created
                {
                    DateTime dateTime = ShellAPI.FileTimeToDateTime(info.ctime);
                    string   time     = dateTime.ToLongTimeString();
                    retVal = string.Format("{0} {1}",
                                           dateTime.ToShortDateString(),
                                           time.Remove(time.Length - 3, 3));
                }
                    #endregion
                    break;

                case "Date Modified":
                    #region Date Modified
                {
                    DateTime dateTime = ShellAPI.FileTimeToDateTime(info.mtime);
                    string   time     = dateTime.ToLongTimeString();
                    retVal = string.Format("{0} {1}",
                                           dateTime.ToShortDateString(),
                                           time.Remove(time.Length - 3, 3));
                }
                    #endregion
                    break;
                }
            }

            return(retVal);
        }
 public void FolderSelected(IDirInfoProvider provider, ShellItem item)
 {
     Reset();
 }