private void newToolStripMenuItem_Click(object sender, EventArgs e) { txtRegEx.Text = string.Empty; txtReplace.Text = string.Empty; rtbText.Text = string.Empty; rtxtOutput.Text = string.Empty; lvResult.Items.Clear(); _FileName = string.Empty; _Project = new RegExProj(); }
public static RegExProj Open(string filename) { XmlSerializer serial = new XmlSerializer(typeof(RegExProj)); FileStream fs = File.OpenRead(filename); RegExProj ret = (RegExProj)serial.Deserialize(fs); fs.Close(); return(ret); }
public MainForm() { _Project = new RegExProj(); // // Required for Windows Form Designer support // InitializeComponent(); // // TODO: Add any constructor code after InitializeComponent call // this.Text = "Regular Expression Tester (untitled)"; }
public MainForm() { _Project = new RegExProj(); // // Required for Windows Form Designer support // InitializeComponent(); // // TODO: Add any constructor code after InitializeComponent call // this.Text = "Regular Expression Tester (untitled)"; }
private void openToolStripMenuItem_Click(object sender, EventArgs e) { openFileDialog1.FileName = _FileName; if (openFileDialog1.ShowDialog() != DialogResult.OK) { return; } _FileName = openFileDialog1.FileName; _Project = RegExProj.Open(_FileName); txtRegEx.Text = _Project.RegularExpression.Replace("\n", "\r\n"); txtReplace.Text = _Project.ReplaceText; rtbText.Text = _Project.TestText; rtxtOutput.Text = string.Empty; lvResult.Items.Clear(); mnuIgnore.Checked = _Project.IgnoreCase; mnuMultiLine.Checked = _Project.MultiLine; mnuReplace.Checked = _Project.Replace; txtReplace.Enabled = _Project.Replace; setTitle(_FileName); }
private void openToolStripMenuItem_Click(object sender, EventArgs e) { openFileDialog1.FileName = _FileName; if (openFileDialog1.ShowDialog() != DialogResult.OK) return; _FileName = openFileDialog1.FileName; _Project = RegExProj.Open(_FileName); txtRegEx.Text = _Project.RegularExpression.Replace("\n", "\r\n"); txtReplace.Text = _Project.ReplaceText; rtbText.Text = _Project.TestText; rtxtOutput.Text = string.Empty; lvResult.Items.Clear(); mnuIgnore.Checked = _Project.IgnoreCase; mnuMultiLine.Checked = _Project.MultiLine; mnuReplace.Checked = _Project.Replace; txtReplace.Enabled = _Project.Replace; setTitle(_FileName); }
private void newToolStripMenuItem_Click(object sender, EventArgs e) { txtRegEx.Text = string.Empty; txtReplace.Text = string.Empty; rtbText.Text = string.Empty; rtxtOutput.Text = string.Empty; lvResult.Items.Clear(); _FileName = string.Empty; _Project = new RegExProj(); }