Beispiel #1
0
        //親ディレクトリを取得 =0 current -1 previous +1 next
        public string GetParent(string path, int step)
        {
            String dir = path;

            if (Parent != null)
            {
                Parent.dirPos += step;
                if (Parent.dirPos < 0)
                {
                    Parent.dirPos = Parent.dirInfos.Length - 1;
                }

                if (Parent.dirPos > Parent.dirInfos.Length - 1)
                {
                    Parent.dirPos = 0;
                }
            }
            else
            {
                Parent = new VirtualFileList(loadOption);
                Parent.SearchDirectry(infos[currentPos].Parent);

                Parent.SearchCurrentDirectryPos(infos[currentPos].DirectoryFullName);

                DirectoryInfo directoryInfo = new DirectoryInfo(dir);
                if (directoryInfo.FullName == null)
                {
                    return(null);
                }
                Parent.dirPos += step;
                if (Parent.dirPos < 0)
                {
                    Parent.dirPos = Parent.dirInfos.Length - 1;
                }

                if (Parent.dirPos > Parent.dirInfos.Length - 1)
                {
                    Parent.dirPos = 0;
                }
            }
            return(Parent.GetDirectory());
        }
Beispiel #2
0
 internal void SetCurrentPath(string path)
 {
     list.SearchDirectry(path);
     imagePath = path;
 }