public ClientConnectionForm(ClientConnection conn)
 {
     InitializeComponent();
     _connection = conn;
     _writer = new TextBoxStreamWriter(textBox3);
     _writer.WriteLine("~~Client Connection ESTABLISHED~~");
 }
        // Search Button Clicked
        private void button1_Click(object sender, EventArgs e)
        {
            //TODO Start Searching
            string rootFolder = rootFolderTextBox.Text;
            string extension = fileExtensionTextBox.Text;
            string charSequenceToSearch = charSequenceTextBox.Text;

            if (rootFolder.Equals("") || extension.Equals("") || charSequenceToSearch.Equals(""))
            {
                MessageBox.Show(@"Please fill all the necessary fields!", @"WARNING");
                return;
            }

            searchResultsTextBox.Clear();

            var search = FileSearcher.startSearch(rootFolder, extension, charSequenceToSearch);

            TextBoxStreamWriter writer = new TextBoxStreamWriter(searchResultsTextBox);
            foreach (var file in search._filesWithExtensionAndSequence)
            {
                writer.WriteLine(file);
            }
        }
Exemplo n.º 3
0
 public void SetLoggerTextBox(TextBox txtBox)
 {
     TextBoxWriter = new TextBoxStreamWriter(txtBox);
 }