예제 #1
0
        private void UpdateOutputSize()
        {
            long totalSize = 0;

            foreach (ListViewItem item in listFiles.Items)
            {
                totalSize += new FileInfo(item.SubItems[2].Text + "\\" + item.Text).Length;
            }

            lblStatus.Text = "Expected output size: " + FormatDataLenght.FormatDataLenghtToString(totalSize);
        }
예제 #2
0
        private void AddFileToList(string file)
        {
            ListViewItem listItem = new ListViewItem();
            FileInfo     fileInfo = new FileInfo(file);

            listItem.Text = fileInfo.Name;
            listItem.SubItems.Add(FormatDataLenght.FormatDataLenghtToString(fileInfo.Length));
            listItem.SubItems.Add(fileInfo.DirectoryName);

            listFiles.Items.Add(listItem);
        }