Exemplo n.º 1
0
        private void FileName_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
        {
            if (this.ElementClicked != null)
                this.ElementClicked(this, new ElementClickEventArgs(this.index));

            string docPath = this.FilePath.Text;
            string fileName = docPath.Substring(16);
            using (StreamReader sr = new StreamReader(docPath))
            {
                string content = sr.ReadToEnd();
                DocumentContentForm contentForm = new DocumentContentForm(fileName,content,query);
                contentForm.ShowDialog();
            }
        }
Exemplo n.º 2
0
        private void FileName_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
        {
            if (this.ElementClicked != null)
            {
                this.ElementClicked(this, new ElementClickEventArgs(this.index));
            }

            string docPath  = this.FilePath.Text;
            string fileName = docPath.Substring(16);

            using (StreamReader sr = new StreamReader(docPath))
            {
                string content = sr.ReadToEnd();
                DocumentContentForm contentForm = new DocumentContentForm(fileName, content, query);
                contentForm.ShowDialog();
            }
        }