/// <summary> /// Open form to load files from group. /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void loadGroupToolStripMenuItem_Click(object sender, EventArgs e) { var lgf = new LoadGroupForm(_groups); var result = lgf.ShowDialog(); if (result != DialogResult.OK) { return; } var selectedGroups = lgf.SelectedGroups; if (tabControl1.TabCount > 0) { var closeDialog = MessageBox.Show("Close current open files?", "Close files ", MessageBoxButtons.YesNo, MessageBoxIcon.Question); if (closeDialog == DialogResult.Yes) { closeAlToolStripMenuItem_Click(null, null); } } var groups = FileGroupHandler.Load(); foreach (var fileGroup in groups.FileGroups.Where(fileGroup => selectedGroups.Contains(fileGroup.GroupName)) ) { LoadTabFiles(fileGroup.Tabfiles); } }
private void LoadGroups() { _groups = FileGroupHandler.Load(); }