public void LoadDirectories(CommandArguments args) { if (args.ClearDirectories) { Program.Settings.DirectoryList.ClearDirectories(); } //load directories specified in arguments foreach (string directoryPath in args.DirectoryPaths) { if (!System.IO.Directory.Exists(directoryPath)) { continue; } Models.Directory directory = Program.Settings.DirectoryList.AddDirectory(directoryPath); foreach (File file in directory.Files) { file.Minify = args.Minify; if (args.InitialCompile) { file.Compile(); } } } foldersListBox_DataChanged(); SelectDirectory(); Program.Settings.SaveSettings(); }
private void refreshDirectoryButton_Click(object sender, EventArgs e) { if (foldersListBox.SelectedItem != null) { Models.Directory directory = (Models.Directory)foldersListBox.SelectedItem; directory.Refresh(); SelectDirectory(); Program.Settings.SaveSettings(); } }
private void SelectDirectory() { Models.Directory directory = (Models.Directory)foldersListBox.SelectedItem; if (directory != null) { filesDataGridView.DataSource = directory.Files; } else { filesDataGridView.DataSource = new List <Models.File>(); } filesDataGridView_DataChanged(); }