Example #1
0
        private string GetFilesList(IEnumerable <ITransferItem> items)
        {
            string files = "";

            foreach (ITransferItem item in items)
            {
                if (string.IsNullOrEmpty(files) == false)
                {
                    files += "\n";
                }
                files += item.FileName + " (" + Helpers.SizeToStr(item.FileSize) + ")";
            }

            return(files);
        }
Example #2
0
            public void UpdateFileExist(string path)
            {
                var pathName = Path.Combine(path, Value.FileName);

                if (File.Exists(pathName))
                {
                    SetValue(FileExistProperty, "Yes");

                    FileInfo fi = new FileInfo(pathName);

                    SetValue(OldFileInfoProperty, "Old file information:\r\n" + fi.FullName
                             + "\r\nCreated: " + fi.CreationTime + "\r\nSize: "
                             + Helpers.SizeToStr(fi.Length));
                }
                else
                {
                    SetValue(FileExistProperty, "");
                    SetValue(OldFileInfoProperty, "");
                }
            }