Exemplo n.º 1
0
 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());
             }
         }
     }
 }
Exemplo n.º 2
0
        public void LoadDataTest()
        {
            plugin = TXTReader.GetInstance();
            var result = plugin.LoadData("C:\\Projects\\MultiLoader\\Sources\\TextFile.txt");

            Assert.IsNotNull(result);
        }
Exemplo n.º 3
0
        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);
        }
Exemplo n.º 4
0
        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");
            }
        }
Exemplo n.º 5
0
 public void SetUp()
 {
     testTXTReader = new TXTReader();
 }
Exemplo n.º 6
0
 public void Init()
 {
     plugin = TXTReader.GetInstance();
 }