private void InitializeControlWindow() { News_Card_Loader.LayoutPaperCard(@"Resource\Data\newsDocs.txt"); DirectoryInfo dir = new DirectoryInfo(@"Resource\Layout\"); try { foreach (FileInfo f in dir.GetFiles("*")) { ComboBoxItem item = new ComboBoxItem(); item.Content = f.Name; ComBox.Items.Add(item); layoutFiles.Add(f.Name, f); } } catch { Console.WriteLine("Directory {0} \n could not be accessed!!!!", dir.FullName); return; // We alredy got an error trying to access dir so dont try to access it again } }
public Loaders(MainWindow mainWindow) { this.mainWindow = mainWindow; groupBinLoader = new Sorting_Group_Loader(this); newsCardLoader = new News_Card_Loader(this); }