示例#1
0
        private void ReadDirectoryContents()
        {
            m_ItemList = new List <IBrowserItem>();
            if (m_CurrentDir.Parent != null)
            {
                IBrowserItem item = new DirectoryItem(m_CurrentDir.Parent, "..", this);
                item.State = item.State | BrowserItemState.UnMarkable;
                m_ItemList.Add(item);
            }
            foreach (DirectoryInfo dir in m_CurrentDir.GetDirectories())
            {
                if (ShowHiddenFiles == false && (dir.Attributes & FileAttributes.Hidden) == FileAttributes.Hidden)
                {
                    continue;
                }
                m_ItemList.Add(new DirectoryItem(dir, dir.Name, this));
            }
            foreach (FileInfo file in m_CurrentDir.GetFiles())
            {
                if (ShowHiddenFiles == false && (file.Attributes & FileAttributes.Hidden) == FileAttributes.Hidden)
                {
                    continue;
                }
                m_ItemList.Add(new FileItem(file, this));
            }

            //FIXME: Directory must have 1 or more contents.
            if (m_ItemList.Count == 0)
            {
                IBrowserItem item = new DirectoryItem(m_CurrentDir, ".", this);
                item.State = item.State | BrowserItemState.UnMarkable;
                m_ItemList.Add(item);
            }
            CursorIndex = 0;
        }
示例#2
0
 public void visit(DirectoryItem directory)
 {
     try
     {
         directory.DirInfo.MoveTo(m_newName);
     }
     catch (Exception e)
     {
         m_engine.getComponent <IExceptionHandler>().handleException(e);
     }
 }
示例#3
0
        private void ReadDirectoryContents()
        {
            m_ItemList = new List<IBrowserItem>();
            if (m_CurrentDir.Parent != null)
            {
                IBrowserItem item = new DirectoryItem(m_CurrentDir.Parent, "..", this);
                item.State = item.State | BrowserItemState.UnMarkable;
                m_ItemList.Add(item);
            }
            foreach (DirectoryInfo dir in m_CurrentDir.GetDirectories())
            {
                if (ShowHiddenFiles == false && (dir.Attributes & FileAttributes.Hidden) == FileAttributes.Hidden) continue;
                m_ItemList.Add(new DirectoryItem(dir, dir.Name, this));
            }
            foreach (FileInfo file in m_CurrentDir.GetFiles())
            {
                if (ShowHiddenFiles == false && (file.Attributes & FileAttributes.Hidden) == FileAttributes.Hidden) continue;
                m_ItemList.Add(new FileItem(file, this));
            }

            //FIXME: Directory must have 1 or more contents.
            if (m_ItemList.Count == 0)
            {
                IBrowserItem item = new DirectoryItem(m_CurrentDir, ".", this);
                item.State = item.State | BrowserItemState.UnMarkable;
                m_ItemList.Add(item);
            }
            CursorIndex = 0;
        }
示例#4
0
 /// <summary>
 /// Directory로 이동한다.
 /// </summary>
 /// <param name="directory">이동하고자 하는 Directory</param>
 public void visit(DirectoryItem directory)
 {
     m_engine.getComponent <IBrowser>().CurrentDir = directory.DirInfo;
 }
示例#5
0
 /// <summary>
 /// Directory를 이동한다.
 /// </summary>
 /// <param name="directory">이동하고자 하는 디렉토리</param>
 public void visit(DirectoryItem directory)
 {
     m_engine.getComponent<IBrowser>().CurrentDir = directory.DirInfo;
 }
示例#6
0
 public void visit(DirectoryItem directory)
 {
     try
     {
         directory.DirInfo.MoveTo(m_newName);
     }
     catch (Exception e)
     {
         m_engine.getComponent<IExceptionHandler>().handleException(e);
     }
 }
示例#7
0
 /// <summary>
 /// Directory로 이동한다.
 /// </summary>
 /// <param name="directory">이동하고자 하는 Directory</param>
 public void visit(DirectoryItem directory)
 {
     Program.engine.Browser.CurrentDir = directory.DirInfo;
 }