private IList <IFileElement> GetAllSelectedFileElements() { List <IXmlWritable> elements = new List <IXmlWritable>(); IList <IContainerElement> containerElements = ElementsContainer.GetGeneralElements(); List <int> selectedIndices = new List <int>(); foreach (DataGridViewRow row in Grid.SelectedRows) { elements.Add(containerElements[GetElementIndex(row)]); } Ares.ModelInfo.FileLists fileLists = new ModelInfo.FileLists(ModelInfo.DuplicateRemoval.None); return(fileLists.GetAllFiles(elements)); }
private void usedFilesToolStripMenuItem_Click(object sender, EventArgs e) { ModelInfo.FileLists lists = new ModelInfo.FileLists(); try { String tempFileName = System.IO.Path.GetTempFileName() + ".txt"; using (System.IO.StreamWriter writer = new System.IO.StreamWriter(tempFileName)) { foreach (String path in lists.GetAllFilePaths(m_CurrentProject).OrderBy(x => x)) { writer.WriteLine(path); } writer.Flush(); } System.Diagnostics.Process.Start(tempFileName); } catch (Exception ex) { MessageBox.Show(this, String.Format(StringResources.WriteFileListError, ex.Message), StringResources.Ares, MessageBoxButtons.OK, MessageBoxIcon.Error); } }