Fixed Invalid message for DSOPanel (MSWord)

Comment-out unused varaible
Calculate Table Width and Location
Fixed Arrow-Up and Arrow-Down to account for Tables
Adjust Table location based upon the width of the Table
This commit is contained in:
Rich
2010-10-12 15:01:09 +00:00
parent dc6721f54c
commit e278a2ca37
8 changed files with 150 additions and 85 deletions

View File

@@ -690,16 +690,24 @@ namespace Volian.Controls.Library
public void CursorMovement(StepRTB rtb, Point position, E_ArrowKeys arrow)
{
ItemInfo ii = null;
// The following lines are debug to check that the results of moving down and moving up are the same
//ItemInfo ix = null;
switch (arrow)
{
case E_ArrowKeys.Up:
case E_ArrowKeys.CtrlUp:
ii = ArrowUp(rtb.MyItemInfo);
// The following lines are debug to check that the results of moving down and moving up are the same
//ix = ArrowDown(ii);
//Console.WriteLine("'Up',{0},{1},{2},{3}", rtb.MyItemInfo.ItemID, rtb.MyItemInfo.DBSequence, ii.DBSequence, ix.DBSequence);
if (ii != null) SelectedStepRTB = _LookupStepItems[ii.ItemID].MyStepRTB;
break;
case E_ArrowKeys.Down:
case E_ArrowKeys.CtrlDown:
ii = ArrowDown(rtb.MyItemInfo);
// The following lines are debug to check that the results of moving down and moving up are the same
//ix = ArrowUp(ii);
//Console.WriteLine("'Down',{0},{1},{2},{3}", rtb.MyItemInfo.ItemID, rtb.MyItemInfo.DBSequence, ii.DBSequence, ix.DBSequence);
if (ii != null) SelectedStepRTB = _LookupStepItems[ii.ItemID].MyStepRTB;
break;
case E_ArrowKeys.Right:
@@ -718,6 +726,9 @@ namespace Volian.Controls.Library
}
private ItemInfo ArrowUp(ItemInfo ii)
{
// Arrow-Up from a Substep should look for a Table.
if (ii.IsStepPart && (ii.ActiveParent as ItemInfo).Tables != null)
return BottomPart((ii.ActiveParent as ItemInfo).Tables[0]);
// if on RNO, check display mode (1 column/2 column, etc) and how deep RNO is before going to
// parents substeps.
if (ii.IsRNOPart && ii.MyParent.Steps != null && ii.RNOLevel >= ii.ColumnMode) return BottomPart(ii.MyParent.Steps[0].LastSibling);
@@ -756,8 +767,11 @@ namespace Volian.Controls.Library
{
// Subitems - go to top part of subitem
// (the lookAtSub prevented looping within a substep group at same level)
if (lookAtSub && ii.Steps != null) return TopPart(ii.Steps[0]);
// Arrow down from a Table should look for a Substep
if(ii.IsTablePart && (ii.ActiveParent as ItemInfo).Steps != null)
return TopPart((ii.ActiveParent as ItemInfo).Steps[0]);
if (lookAtSub && ii.Tables != null) return TopPart(ii.Tables[0]);
if (lookAtSub && ii.Steps != null) return TopPart(ii.Steps[0]);
// RNOs: Use PMode (column)
if (lookAtRNO && ii.RNOs != null && ii.RNOLevel >= ii.ColumnMode) return TopPart(ii.RNOs[0]);
// Nextsibling - go to top part of sibling