private void listViewFilesRight_MouseDoubleClick(object sender, MouseEventArgs e) { if (listViewSelectedItemRight + 1 > dirsRight.Length) { if (Path.GetExtension(filePathRight.Text) == ".txt") { Form txtForm = new TXTReader(filePathRight.Text); txtForm.Show(); } else { MessageBox.Show("Please select a directory!"); } } else { filesRight = FileHandler.GetAllFiles(pathRight); dirsRight = FileHandler.GetAllDirectories(pathRight); listViewFilesRight.Items.Clear(); if (dirsRight != null) { foreach (DirectoryInfo dir in dirsRight) { listViewFilesRight.Items.Add(dir.ToString()); } } if (filesRight != null) { foreach (FileInfo file in filesRight) { listViewFilesRight.Items.Add(file.ToString()); } } } }
public void LoadDataTest() { plugin = TXTReader.GetInstance(); var result = plugin.LoadData("C:\\Projects\\MultiLoader\\Sources\\TextFile.txt"); Assert.IsNotNull(result); }
static void Main(string[] args) { XMLReader config = new XMLReader(XMLConfigPath, new XmlDocument()); string[] paths = config.Read(); TXTReader txt = new TXTReader(paths[0]); ExcelHandler ex = new ExcelHandler(paths[1], new Application()); ChromeHandler ch = new ChromeHandler(new ChromeDriver()); Extractor ext = new Extractor(txt.Read()); ext.ExtractData(ex, ch); }
private void buttonOpenText_Click(object sender, EventArgs e) { string path; if (leftSelected) { path = filePathLeft.Text; } else { path = filePathRight.Text; } if (Path.GetExtension(path) == ".txt") { Form txtForm = new TXTReader(path); txtForm.Show(); } else { MessageBox.Show("Please select a txt file"); } }
public void SetUp() { testTXTReader = new TXTReader(); }
public void Init() { plugin = TXTReader.GetInstance(); }