Esempio n. 1
0
 private void m_btnAddSubst_Click(object sender, EventArgs e)
 {
     using (var dlg = new ImportMatchReplaceDlg())
     {
         dlg.Initialize(m_helpTopicProvider, String.Empty, String.Empty);
         if (dlg.ShowDialog(this) == DialogResult.OK)
         {
             var lvi = new ListViewItem(new[] { dlg.Match, dlg.Replace });
             m_lvSubstitutions.Items.Add(lvi);
         }
     }
 }
Esempio n. 2
0
		private void m_btnAddSubst_Click(object sender, EventArgs e)
		{
			using (var dlg = new ImportMatchReplaceDlg())
			{
				dlg.Initialize(m_helpTopicProvider, String.Empty, String.Empty);
				if (dlg.ShowDialog(this) == DialogResult.OK)
				{
					var lvi = new ListViewItem(new[] {dlg.Match, dlg.Replace});
					m_lvSubstitutions.Items.Add(lvi);
				}
			}
		}
Esempio n. 3
0
 private void m_btnModifySubst_Click(object sender, EventArgs e)
 {
     if (m_lvSubstitutions.SelectedItems.Count > 0)
     {
         ListViewItem lvi = m_lvSubstitutions.SelectedItems[0];
         using (var dlg = new ImportMatchReplaceDlg())
         {
             dlg.Initialize(m_helpTopicProvider, lvi.SubItems[0].Text, lvi.SubItems[1].Text);
             if (dlg.ShowDialog(this) == DialogResult.OK)
             {
                 lvi.SubItems[0].Text = dlg.Match;
                 lvi.SubItems[1].Text = dlg.Replace;
             }
         }
     }
 }
Esempio n. 4
0
		private void m_btnModifySubst_Click(object sender, EventArgs e)
		{
			if (m_lvSubstitutions.SelectedItems.Count > 0)
			{
				ListViewItem lvi = m_lvSubstitutions.SelectedItems[0];
				using (var dlg = new ImportMatchReplaceDlg())
				{
					dlg.Initialize(m_helpTopicProvider, lvi.SubItems[0].Text, lvi.SubItems[1].Text);
					if (dlg.ShowDialog(this) == DialogResult.OK)
					{
						lvi.SubItems[0].Text = dlg.Match;
						lvi.SubItems[1].Text = dlg.Replace;
					}
				}

			}
		}