Пример #1
0
        public Contr(DiscElement el)
        {
            this.el      = el;
            Name         = el.getName();
            Path         = el.Path;
            isFile       = el.isFile();
            CreationDate = el.creationDate;
            if (el is MyDirectory)
            {
                MyDirectory temp = (MyDirectory)el;
                Type = "<DIR>";
                Size = "";
                if (temp.isBack)
                {
                    Name         = "..";
                    Type         = "";
                    Size         = "";
                    CreationDate = null;
                }
            }

            else
            {
                MyFile temp = (MyFile)el;
                Type    = temp.extension;
                Size    = temp.size.ToString();
                IntSize = temp.size;
            }
        }
Пример #2
0
        public Contr(DiscElement ele)
        {
            this.ele     = ele;
            Name         = ele.getName();
            Path         = ele.Path;
            isFile       = ele.isFile();
            CreationDate = ele.creationDate;
            if (ele is MyDirectory)
            {
                MyDirectory temp = (MyDirectory)ele;
                Type = "<DIR>";


                Size = "";
            }

            else
            {
                MyFile temp = (MyFile)ele;
                Type    = temp.extension;
                Size    = temp.size.ToString();
                IntSize = temp.size;
            }
        }