Inheritance: System.Windows.Forms.UserControl
Esempio n. 1
0
        /// <summary>
        /// Add FileListItem from file path
        /// </summary>
        /// <param name="filePath"></param>
        public void AddItems(string filePath)
        {
            FileListItem    fi = new FileListItem();
            FileVersionInfo f  = FileVersionInfo.GetVersionInfo(filePath);

            fi.ImgAvatar     = Icon.ExtractAssociatedIcon(filePath).ToBitmap();
            fi.Title         = System.IO.Path.GetFileName(filePath);
            fi.Path          = filePath;
            fi.CurrenVersion = f.FileVersion;

            ds.Add(fi);
        }
Esempio n. 2
0
        /// <summary>
        /// Add FileListItems from file path array
        /// </summary>
        /// <param name="fileArray"></param>
        public void AddItems(string[] fileArray)
        {
            foreach (string f in fileArray)
            {
                FileListItem    fi = new FileListItem();
                FileVersionInfo fv = FileVersionInfo.GetVersionInfo(f);

                fi.ImgAvatar     = Icon.ExtractAssociatedIcon(f).ToBitmap();
                fi.Title         = System.IO.Path.GetFileName(f);
                fi.Path          = f;
                fi.CurrenVersion = fv.FileVersion;

                ds.Add(fi);
            }
        }
Esempio n. 3
0
        /// <summary>
        /// Add FileListItem from file path
        /// </summary>
        /// <param name="filePath"></param>
        public void AddItems(string filePath)
        {
            FileListItem fi = new FileListItem();
            FileVersionInfo f = FileVersionInfo.GetVersionInfo(filePath);

            fi.ImgAvatar = Icon.ExtractAssociatedIcon(filePath).ToBitmap();
            fi.Title = System.IO.Path.GetFileName(filePath);
            fi.Path = filePath;
            fi.CurrenVersion = f.FileVersion;

            ds.Add(fi);
        }
Esempio n. 4
0
 /// <summary>
 /// Add a FileListItem to list
 /// </summary>
 /// <param name="fi"></param>
 public void AddItems(FileListItem fi)
 {
     ds.Add(fi);
 }
Esempio n. 5
0
        /// <summary>
        /// Add FileListItems from file path array
        /// </summary>
        /// <param name="fileArray"></param>
        public void AddItems(string[] fileArray)
        {
            foreach (string f in fileArray)
            {
                FileListItem fi = new FileListItem();
                FileVersionInfo fv = FileVersionInfo.GetVersionInfo(f);

                fi.ImgAvatar = Icon.ExtractAssociatedIcon(f).ToBitmap();
                fi.Title = System.IO.Path.GetFileName(f);
                fi.Path = f;
                fi.CurrenVersion = fv.FileVersion;

                ds.Add(fi);
            }
        }
Esempio n. 6
0
 /// <summary>
 /// Add a FileListItem to list
 /// </summary>
 /// <param name="fi"></param>
 public void AddItems(FileListItem fi)
 {
     ds.Add(fi);
 }