private void GetFileName()
        {
            if (Directory.Exists(this.Path))
            {
                DirectoryInfo root = new DirectoryInfo(this.Path);
                LocalProgramList.Clear();

                var files = root.GetFiles("*.ng").Union(root.GetFiles("*.txt")).Union(root.GetFiles("*."));

                foreach (FileInfo f in files)
                {
                    var program = new ProgramViewModel
                    {
                        FileHash   = FileHashHelper.ComputeMD5(f.FullName),
                        Name       = f.Name,
                        FillName   = f.FullName,
                        CreateTime = f.CreationTime.ToString("MM-dd HH:mm"),
                        Size       = f.Length.ToString(),
                        StatusImg  = "/MMK.SmartSystem.LE.Host;component/Resources/Images/Status_Blue.png"
                    };
                    this.LocalProgramList.Add(program);
                }
                DataPaging();
            }
        }
Example #2
0
 public void Clear()
 {
     CurrentSelectModel = null;
     this.ProgramList.Clear();
     CurrentPage = 0;
     TotalPage   = 0;
     LocalProgramList.Clear();
 }