clipboard paste fix - should paste text only

This commit is contained in:
John Jenko 2011-05-27 17:16:36 +00:00
parent 9a6883781a
commit b303193350
3 changed files with 1101 additions and 1100 deletions

File diff suppressed because it is too large Load Diff

View File

@ -1429,17 +1429,18 @@ namespace Volian.Controls.Library
{
// Need to check which combo box activated the context menu so that we know where to take/put selected text
IDataObject myDO = Clipboard.GetDataObject();
if (myDO.GetDataPresent(DataFormats.Rtf))
{
RichTextBox rtb = new RichTextBox();
rtb.SelectedRtf = ItemInfo.StripLinks(myDO.GetData(DataFormats.Rtf).ToString());
//if (myDO.GetDataPresent(DataFormats.Rtf))
//{
// RichTextBox rtb = new RichTextBox();
// rtb.SelectedRtf = ItemInfo.StripLinks(myDO.GetData(DataFormats.Rtf).ToString());
if (cbxTextSearchAnnotation.Focused)
cbxTextSearchAnnotation.SelectedText = rtb.Text;
else if (cbxTextSearchText.Focused)
cbxTextSearchText.SelectedText = rtb.Text;// .SelectedText;//myDO.GetData(DataFormats.Text,true).ToString();
}
else if (myDO.GetDataPresent(DataFormats.Text))
// if (cbxTextSearchAnnotation.Focused)
// cbxTextSearchAnnotation.SelectedText = rtb.Text;
// else if (cbxTextSearchText.Focused)
// cbxTextSearchText.SelectedText = rtb.Text;// .SelectedText;//myDO.GetData(DataFormats.Text,true).ToString();
//}
//else if (myDO.GetDataPresent(DataFormats.Text))
if (myDO.GetDataPresent(DataFormats.Text))
if (cbxTextSearchAnnotation.Focused)
cbxTextSearchAnnotation.SelectedText = Clipboard.GetText();
else if (cbxTextSearchText.Focused)

View File

@ -120,11 +120,6 @@
<metadata name="superTooltip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>126, 17</value>
</metadata>
<data name="cbxBooleanTxtSrch.SuperTooltip" xml:space="preserve">
<value>Using Boolean search allows you to specify text AND other text, text OR other text, and NOT text. To find options, use the Right Mouse button on the Find Box's context menu.
Boolean searches are case insensitive and the search finds RO data as text or within ROs (selection of optons 'Case Sensitive' &amp; 'Search RO Text' are not available during 'Boolean Search').</value>
</data>
<data name="cbxTextSearchText.SuperTooltip" xml:space="preserve">
<value>Enter the text you want to search, or select from the drop down list for which the text is added once a search is done.
@ -135,6 +130,11 @@ For additional search text options, use the Right Mouse button to get a context
<value>Enter the text you want to search, or select from the drop down list for which the text is added once a search is done.
For additional search text options, use the Right Mouse button to get a context menu.</value>
</data>
<data name="cbxBooleanTxtSrch.SuperTooltip" xml:space="preserve">
<value>Using Boolean search allows you to specify text AND other text, text OR other text, and NOT text. To find options, use the Right Mouse button on the Find Box's context menu.
Boolean searches are case insensitive and the search finds RO data as text or within ROs (selection of optons 'Case Sensitive' &amp; 'Search RO Text' are not available during 'Boolean Search').</value>
</data>
<metadata name="toolTip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value>