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:
@@ -927,13 +927,20 @@ namespace Volian.Controls.Library
|
||||
// monitor is different than the DPI setting saved in the grid record, table height/width of rows/columns
|
||||
// will be incorrect, i.e. lots of extra white space. The reason behind this is that the height/width
|
||||
// of table cells are stored as dots (from the monitor) in the underlying component one flexgrid.
|
||||
str = AdjustHeightAndWidthForDPI(str);
|
||||
using (StringReader sr = new StringReader(str))
|
||||
{
|
||||
ReadXml(sr);
|
||||
this.BorderStyle = C1.Win.C1FlexGrid.Util.BaseControls.BorderStyleEnum.None;
|
||||
sr.Close();
|
||||
}
|
||||
try
|
||||
{
|
||||
str = AdjustHeightAndWidthForDPI(str);
|
||||
using (StringReader sr = new StringReader(str))
|
||||
{
|
||||
ReadXml(sr);
|
||||
this.BorderStyle = C1.Win.C1FlexGrid.Util.BaseControls.BorderStyleEnum.None;
|
||||
sr.Close();
|
||||
}
|
||||
}
|
||||
catch
|
||||
{
|
||||
;
|
||||
}
|
||||
}
|
||||
|
||||
private string AdjustHeightAndWidthForDPI(string str)
|
||||
@@ -1087,6 +1094,7 @@ namespace Volian.Controls.Library
|
||||
CellRange cr = GetMergedRange(Row, Col);
|
||||
int oH = cr.UserData == null ? curHeight : (int)cr.UserData;
|
||||
int nH = _tableCellEditor.Height; //.ContentsRectangle.Height;
|
||||
int nW = _tableCellEditor.Width; // Width
|
||||
int Hadj = (nH - curHeight);//oH);
|
||||
cr.UserData = _tableCellEditor.Height; //.ContentsRectangle.Height;
|
||||
//int cellHeight = GetCellHeight(Row, Col);
|
||||
@@ -1112,6 +1120,10 @@ namespace Volian.Controls.Library
|
||||
AdjustGridControlSize();
|
||||
}
|
||||
}
|
||||
if (_tableCellEditor is StepRTB && (_tableCellEditor as StepRTB).ImageWidth > 0)
|
||||
{
|
||||
Width = Cols[0].Width = (_tableCellEditor as StepRTB).ImageWidth;
|
||||
}
|
||||
}
|
||||
void VlnFlexGrid_KeyUp(object sender, KeyEventArgs e)
|
||||
{
|
||||
|
Reference in New Issue
Block a user