Exemplo n.º 1
0
 private void btnAdd_Click(object sender, EventArgs e)
 {
     HighLightingFrame dlg = new HighLightingFrame();
     if (dlg.ShowDialog() == DialogResult.OK)
     {
         AddHighLighting(new HighLightingRecord(
             new Regex(dlg.HighLighting_Regex), dlg.HighLighting_Foreground,
             dlg.HighLighting_Background, dlg.HighLighting_FontStyle));
     }
 }
Exemplo n.º 2
0
        private void btnAdd_Click(object sender, EventArgs e)
        {
            HighLightingFrame dlg = new HighLightingFrame();

            if (dlg.ShowDialog() == DialogResult.OK)
            {
                AddHighLighting(new HighLightingRecord(
                                    new Regex(dlg.HighLighting_Regex), dlg.HighLighting_Foreground,
                                    dlg.HighLighting_Background, dlg.HighLighting_FontStyle));
            }
        }
Exemplo n.º 3
0
        private void btnEdit_Click(object sender, EventArgs e)
        {
            HighLightingFrame  dlg    = new HighLightingFrame();
            HighLightingRecord record =
                lvList.SelectedItems[0].Tag as HighLightingRecord;

            dlg.HighLighting_Background = record.BackColor;
            dlg.HighLighting_FontStyle  = record.FontStyle;
            dlg.HighLighting_Foreground = record.ForeColor;
            dlg.HighLighting_Regex      = record.RegularExpression.ToString();

            if (dlg.ShowDialog() == DialogResult.OK)
            {
                lvList.RemoveSelected();
                AddHighLighting(new HighLightingRecord(
                                    new Regex(dlg.HighLighting_Regex), dlg.HighLighting_Foreground,
                                    dlg.HighLighting_Background, dlg.HighLighting_FontStyle));
            }
        }
Exemplo n.º 4
0
        private void btnEdit_Click(object sender, EventArgs e)
        {
            HighLightingFrame dlg = new HighLightingFrame();
            HighLightingRecord record =
                lvList.SelectedItems[0].Tag as HighLightingRecord;

            dlg.HighLighting_Background = record.BackColor;
            dlg.HighLighting_FontStyle = record.FontStyle;
            dlg.HighLighting_Foreground = record.ForeColor;
            dlg.HighLighting_Regex = record.RegularExpression.ToString();

            if (dlg.ShowDialog() == DialogResult.OK)
            {
                lvList.RemoveSelected();
                AddHighLighting(new HighLightingRecord(
                    new Regex(dlg.HighLighting_Regex), dlg.HighLighting_Foreground,
                    dlg.HighLighting_Background, dlg.HighLighting_FontStyle));
            }
        }