Made some regx usages static to help with memory usage
Logic to support clipboard paste of screen shot into a table cell
This commit is contained in:
@@ -806,7 +806,7 @@ namespace Volian.Controls.Library
|
||||
private bool _ContextMenuStripChanged = false;
|
||||
private void StepRTB_MouseDown(object sender, MouseEventArgs e)
|
||||
{
|
||||
_MouseDown = true;
|
||||
|
||||
//Console.WriteLine("vvvvvvvvvv StepRTB Mouse Down id= {0}",MyItemInfo.ItemID);
|
||||
bool inPsi = this.Parent.FindForm().Name.Contains("frmPSI");
|
||||
if (!_ContextMenuStripChanged)
|
||||
@@ -1932,6 +1932,12 @@ namespace Volian.Controls.Library
|
||||
|
||||
private bool IsControlChar = false;
|
||||
private bool _SendBackSpace = false;
|
||||
private int _ImageWidth = 0;
|
||||
public int ImageWidth
|
||||
{
|
||||
get { return _ImageWidth; }
|
||||
set { _ImageWidth = value; }
|
||||
}
|
||||
void StepRTB_KeyDown(object sender, KeyEventArgs e)
|
||||
{
|
||||
// added jcb 20130103 to support set ro from word doc with annotation when right click menu is opened by keyboard
|
||||
@@ -1980,15 +1986,25 @@ namespace Volian.Controls.Library
|
||||
// maps the Ctrl-V to btnPaste for those StepRTB's that are associated with the StepTabRibbon, i.e.
|
||||
// EditItems & Grid cells.
|
||||
IDataObject iData = Clipboard.GetDataObject();
|
||||
if (!iData.GetDataPresent(DataFormats.Text) && !iData.GetDataPresent(DataFormats.Rtf))
|
||||
if (iData.GetDataPresent(DataFormats.Dib)) // Device Independent Bitmap
|
||||
{
|
||||
MessageBox.Show("Cannot paste, text has special characters or symbols that will not paste correctly.");
|
||||
System.Drawing.Image img = Clipboard.GetImage();
|
||||
ImageWidth = img.Width;
|
||||
Width = ImageWidth + 2;
|
||||
Paste();
|
||||
}
|
||||
else
|
||||
{
|
||||
// if contains bad rtf (from Word), paste as text, otherwise, do the paste here.
|
||||
if (!PasteRtfAsText(true)) Paste();
|
||||
if (SelectionLength == 0) SelectionFont = MyStyleFont.WindowsFont;
|
||||
if (!iData.GetDataPresent(DataFormats.Text) && !iData.GetDataPresent(DataFormats.Rtf))
|
||||
{
|
||||
MessageBox.Show("Cannot paste, text has special characters or symbols that will not paste correctly.");
|
||||
}
|
||||
else
|
||||
{
|
||||
// if contains bad rtf (from Word), paste as text, otherwise, do the paste here.
|
||||
if (!PasteRtfAsText(true)) Paste();
|
||||
if (SelectionLength == 0) SelectionFont = MyStyleFont.WindowsFont;
|
||||
}
|
||||
}
|
||||
e.Handled = true;
|
||||
return;
|
||||
|
Reference in New Issue
Block a user