コード例 #1
0
ファイル: Form1.cs プロジェクト: endrjoo96/wav_player
        public FileBrowser()
        {
            InitializeComponent();
            FileList.Scrollable = true;
            FileList.View       = View.Details;
            FileList.Columns.Add(new ColumnHeader {
                Text = "", Name = "col"
            });
            FileList.HeaderStyle = ColumnHeaderStyle.None;
            FileList.AutoResizeColumns(ColumnHeaderAutoResizeStyle.HeaderSize);

            DriveInfo[] drives = DriveInfo.GetDrives();
            foreach (DriveInfo drive in drives)
            {
                string directoryInfo = drive.RootDirectory.FullName;
                if (Directory.Exists(directoryInfo))
                {
                    DirList.AfterSelect  += DirList_AfterSelect;
                    DirList.BeforeExpand += DirList_BeforeExpand;
                    BuildTree(directoryInfo, DirList.Nodes);
                }
            }
        }
コード例 #2
0
 private void detailToolStripMenuItem_Click(object sender, EventArgs e)
 {
     FileList.View = View.Details;
     //FileList.AutoResizeColumns(ColumnHeaderAutoResizeStyle.ColumnContent);
     FileList.AutoResizeColumns(ColumnHeaderAutoResizeStyle.HeaderSize);
 }