private void PreviewLogicChanged(object sender, EventArgs e) { label1.Text = string.Format(LABEL1_FMT, PreviewLogic.BlacklistedFilePaths.Count()); ListUtil.AssignList(listBox1.Items, PreviewLogic.BlacklistedFilePaths); label2.Text = string.Format(LABEL2_FMT, PreviewLogic.WhitelistedFilePaths.Count()); ListUtil.AssignList(listBox2.Items, PreviewLogic.WhitelistedFilePaths); NextButton.Enabled = PreviewLogic.BlacklistedFilePaths.Count > 0; }
public void FetchSubfolderPaths() { if (_workingDirectory == "") { SubfolderPaths.Clear(); return; } try { List <string> result = FileUtil.FetchAllDirectories(_workingDirectory); ListUtil.AssignList(SubfolderPaths, result); OnChange(this, EventArgs.Empty); } catch (Exception e) { SubfolderPaths.Clear(); throw; } }