Пример #1
0
        public void OpenTxtEditor()
        {
            TextEditorForm editor = new TextEditorForm("");

            editor.Show();
            isTxtEditorOpened = true;
        }
Пример #2
0
        public void OpenFile(ListView lv, TextBox textBox)
        {
            string ext = lv.SelectedItems[0].SubItems[1].Text;

            if (ext == ".txt" || ext == ".html" || ext == ".htm")
            {
                string path = textBox.Text + lv.SelectedItems[0].Text;
                //MessageBox.Show(path + ext);
                TextEditorForm editor = new TextEditorForm(path + ext);
                editor.Show();
                isTxtEditorOpened = true;
            }
            else
            {
                MessageBox.Show("Не могу открыть этот файл!");
            }
        }