示例#1
0
        //트리뷰속성창
        private void Show_Property()
        {
            //속성창 띄우기
            property_dialog pd    = new property_dialog();
            DirectoryInfo   dri   = new DirectoryInfo(label_Path.Text);
            string          name  = fol.Text;
            string          exten = "파일 폴더";
            long            size  = GetDirectorySize(select);
            string          crea  = dri.CreationTime.ToString();
            string          write = dri.LastWriteTime.ToString();
            string          type  = dri.Attributes.ToString();
            string          loca  = fullPath;

            pd.properties(name, exten, loca, size, crea, write, type);
        }
示例#2
0
        //리스트뷰 속성창
        private void Show_Property1()
        {
            //속성창 띄우기
            property_dialog pd       = new property_dialog();
            int             indexnum = listView1.FocusedItem.Index;
            string          name     = listView1.Items[indexnum].SubItems[0].Text;
            string          exten;
            long            size;
            string          crea;
            string          write;
            string          type;
            string          loca;
            string          item = "";

            if (label_Path.Text.Equals(@"Z:\"))
            {
                item = @"Z:\" + name;
            }
            else
            {
                item = label_Path.Text + @"\" + name;
            }

            FileInfo      file = new FileInfo(item);
            DirectoryInfo dri  = new DirectoryInfo(item);

            if (name.Contains("."))
            {
                exten = file.Extension;
                size  = file.Length;
                crea  = file.CreationTime.ToString();
                write = file.LastWriteTime.ToString();
                type  = file.Attributes.ToString();
                loca  = item;
                pd.properties(name, exten, loca, size, crea, write, type);
            }
            else
            {
                exten = "파일 폴더";
                size  = GetDirectorySize(item);
                crea  = dri.CreationTime.ToString();
                write = dri.LastWriteTime.ToString();
                type  = dri.Attributes.ToString();
                loca  = item;
                pd.properties(name, exten, loca, size, crea, write, type);
            }
        }