Exemplo n.º 1
0
        private void existPorjectToolStripMenuItem_Click(object sender, EventArgs e)
        {
            NotepadForm form3 = new NotepadForm();

            form3.MdiParent = this;
            form3.Show();
        }
Exemplo n.º 2
0
        private void btnSave_Click(object sender, EventArgs e)
        {
            var linesCode     = txtCode.Lines.ToList();
            var linesRegexes  = txtRegexes.Lines.ToList();
            var linesReplacer = txtReplacer.Lines.ToList();

            var countArr = new int[] { linesCode.Count, linesRegexes.Count, linesReplacer.Count };

            int maxLineCount = countArr.Max();

            StringBuilder sBuilder = new StringBuilder();

            for (int i = 0; i < maxLineCount; i++)
            {
                string code  = string.Empty;
                string regex = string.Empty;
                string repl  = string.Empty;

                if (i < linesCode.Count && i <= countArr[0])
                {
                    code = linesCode[i];
                }

                if (i < linesRegexes.Count && i <= countArr[1])
                {
                    regex = linesRegexes[i];
                }

                if (i < linesReplacer.Count && i <= countArr[2])
                {
                    repl = linesReplacer[i];
                }

                sBuilder.AppendFormat("{0}\t{1}\t{2}{3}", code, regex, repl, Environment.NewLine);
            }

            NotepadForm saveDlg = new NotepadForm(sBuilder.ToString());

            saveDlg.ShowDialog();
        }
Exemplo n.º 3
0
        private void button1_Click(object sender, EventArgs e)
        {
            NotepadForm n = new NotepadForm();

            n.ShowDialog();
        }