Beispiel #1
0
 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();
 }
Beispiel #2
0
        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);
        }
Beispiel #3
0
        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)";
        }
Beispiel #4
0
        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)";
        }
Beispiel #5
0
        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);
        }
Beispiel #6
0
        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);
        }
Beispiel #7
0
 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();
 }