This commit is contained in:
parent
c1112468d2
commit
57c1c135b3
@ -85,26 +85,6 @@ namespace Volian.Controls.Library
|
|||||||
{
|
{
|
||||||
switch (e.KeyCode)
|
switch (e.KeyCode)
|
||||||
{
|
{
|
||||||
case Keys.Left:
|
|
||||||
if (e.Shift) return;
|
|
||||||
MyStepRTB.StepRTB_ArrowPressed(e.Control ? E_ArrowKeys.CtrlLeft : E_ArrowKeys.Left);
|
|
||||||
e.Handled = true;
|
|
||||||
break;
|
|
||||||
case Keys.Up:
|
|
||||||
if (e.Shift) return;
|
|
||||||
MyStepRTB.StepRTB_ArrowPressed(e.Control ? E_ArrowKeys.CtrlUp : E_ArrowKeys.Up);
|
|
||||||
e.Handled = true;
|
|
||||||
break;
|
|
||||||
case Keys.Right:
|
|
||||||
if (e.Shift) return;
|
|
||||||
MyStepRTB.StepRTB_ArrowPressed(e.Control ? E_ArrowKeys.CtrlRight : E_ArrowKeys.Right);
|
|
||||||
e.Handled = true;
|
|
||||||
break;
|
|
||||||
case Keys.Down:
|
|
||||||
if (e.Shift) return;
|
|
||||||
MyStepRTB.StepRTB_ArrowPressed(e.Control ? E_ArrowKeys.CtrlDown : E_ArrowKeys.Down);
|
|
||||||
e.Handled = true;
|
|
||||||
break;
|
|
||||||
case Keys.F5:
|
case Keys.F5:
|
||||||
if (e.Shift)
|
if (e.Shift)
|
||||||
{
|
{
|
||||||
@ -731,6 +711,12 @@ namespace Volian.Controls.Library
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
public override void PositionToStart()
|
||||||
|
{
|
||||||
|
MyFlexGrid.Select(0,0);
|
||||||
|
MyFlexGrid.StartEditing();
|
||||||
|
MyStepRTB.Select(0, 0);
|
||||||
|
}
|
||||||
public override string SelectedTextForFind
|
public override string SelectedTextForFind
|
||||||
{
|
{
|
||||||
get
|
get
|
||||||
@ -817,8 +803,7 @@ namespace Volian.Controls.Library
|
|||||||
{
|
{
|
||||||
_ActiveMode = activeMode;
|
_ActiveMode = activeMode;
|
||||||
XmlDocument xd = new XmlDocument();
|
XmlDocument xd = new XmlDocument();
|
||||||
xd.LoadXml(MyItemInfo.MyContent.MyGrid.Data.Replace("Courier New", "Times New Roman"));
|
xd.LoadXml(MyItemInfo.MyContent.MyGrid.Data);
|
||||||
//xd.LoadXml(MyItemInfo.MyContent.MyGrid.Data);
|
|
||||||
MyFlexGrid.Clear();
|
MyFlexGrid.Clear();
|
||||||
MyFlexGrid.MergedRanges.Clear();
|
MyFlexGrid.MergedRanges.Clear();
|
||||||
MyFlexGrid.ReadXml(xd);
|
MyFlexGrid.ReadXml(xd);
|
||||||
@ -870,5 +855,40 @@ namespace Volian.Controls.Library
|
|||||||
}
|
}
|
||||||
public override void SetExpandAndExpander(ItemInfo itemInfo) { CanExpand = false; } // can't expand a table
|
public override void SetExpandAndExpander(ItemInfo itemInfo) { CanExpand = false; } // can't expand a table
|
||||||
#endregion
|
#endregion
|
||||||
|
#region Miscellaneous Support
|
||||||
|
internal void SetSearchCell(string SearchString)
|
||||||
|
{
|
||||||
|
// Walk thru grid to find first occurance of SearchString and set that cell for
|
||||||
|
// edit.
|
||||||
|
int r = 0;
|
||||||
|
int c = 0;
|
||||||
|
int w = MyFlexGrid.Cols.Count;
|
||||||
|
int h = MyFlexGrid.Rows.Count;
|
||||||
|
while (r < h)
|
||||||
|
{
|
||||||
|
CellRange cr = MyFlexGrid.GetMergedRange(r, c);
|
||||||
|
if (cr.r1 == r && cr.c1 == c)
|
||||||
|
{
|
||||||
|
if (MyFlexGrid[r, c] != null)
|
||||||
|
{
|
||||||
|
MyFlexGrid.StartEditing(r, c);
|
||||||
|
TableCellEditor tce = MyFlexGrid.TableCellEditor;
|
||||||
|
// note that this method is only used from Search Results.
|
||||||
|
// The search query will handle the case sensitivity, so
|
||||||
|
// we can just see if contains the string without considering
|
||||||
|
// case sensitivity.
|
||||||
|
if (tce.Text.ToUpper().Contains(SearchString.ToUpper()))
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
c = c + 1;
|
||||||
|
if (c == w)
|
||||||
|
{
|
||||||
|
c = 0;
|
||||||
|
r = r + 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -678,6 +678,10 @@ namespace Volian.Controls.Library
|
|||||||
{
|
{
|
||||||
MyStepRTB.SelectionStart = MyStepRTB.Text.Length;
|
MyStepRTB.SelectionStart = MyStepRTB.Text.Length;
|
||||||
}
|
}
|
||||||
|
public override void PositionToStart()
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
public override string SelectedTextForFind
|
public override string SelectedTextForFind
|
||||||
{
|
{
|
||||||
get
|
get
|
||||||
|
Loading…
x
Reference in New Issue
Block a user