Added table function to return a list of Content records that contain a specified string.

Added stored procedure to standardize text (standard steps)
Lazy Load font value.
Return the correct EditItem when a step is deleted.
Update the StepTabRibbon EditItem when the StepPanel EditItem is changed
Get MyItemInfo if it is not set.
Added missing logic to MyEditItem.
This commit is contained in:
Rich
2011-06-24 21:47:40 +00:00
parent 0a14f6f3fc
commit 37d067a74e
6 changed files with 116 additions and 24 deletions

View File

@@ -592,7 +592,7 @@ namespace Volian.Controls.Library
else if (MyPreviousEditItem != null)
{
MyPreviousEditItem.MyNextEditItem = null;
newFocus = MyPreviousEditItem;
newFocus = MyPreviousEditItem.BottomMostEditItem;
MyPreviousEditItem = null;
//Console.Write(",\"Previous\",");
}
@@ -749,7 +749,8 @@ namespace Volian.Controls.Library
public EditItem AddChildBefore(ItemInfo MyItemInfo, EditItem nextEditItem)
{
EditItem child = null;
if (MyItemInfo.MyContent.ContentGridCount != 0)
//if (MyItemInfo.MyContent.ContentGridCount != 0)
if(MyItemInfo.MyContent.MyGrid != null)
child = new GridItem(MyItemInfo, MyStepPanel, this, ChildRelation.Before, true, nextEditItem);
else
child = new RTBItem(MyItemInfo, MyStepPanel, this, ChildRelation.Before, true, nextEditItem);
@@ -1138,10 +1139,11 @@ namespace Volian.Controls.Library
private void EditItem_Move(object sender, EventArgs e)
{
int watchThis = _WatchThis;
//if (MyID == _lookForID || MyID == 2111)
//if (MyID == 136)
//{
// vlnStackTrace.ShowStack("{0} Move TO {1}", MyID, Top);
// //vlnStackTrace.ShowStack("{0} Move TO {1} - {2}, BottomMost {3}", MyID, Top, MyPath, BottomMostRTBItem.MyPath);
// Console.WriteLine("{0} Move TO {1} - {2}, BottomMost {3}", MyID, Top, MyPath, BottomMostRTBItem.MyPath);
// //Console.WriteLine("{0} Move TO {1} - {2}, BottomMost {3}", MyID, Top, MyPath, BottomMostRTBItem.MyPath);
//}
//if (MyID > _StartingID)
// Console.WriteLine("{0}--------------- {1} Top = {2} Bottom {3}", WatchThisIndent, MyID, Top, Bottom);
@@ -1593,7 +1595,7 @@ namespace Volian.Controls.Library
EditItem parent = EditItem.UpOneEditItem;
int right = FindRight();
bool centeredTable = (MyItemInfo.IsTablePart && MyItemInfo.FormatStepData.Type.Contains("AER") == false && MyItemInfo.RNOLevel == 0);
while (parent != null && parent.MyItemInfo.IsSection == false)
while (parent != null && parent.MyItemInfo.IsSection == false && parent._MyChildRelation != ChildRelation.Before)
{
if (parent._MyRNOEditItems != null)
{

View File

@@ -443,6 +443,7 @@ namespace Volian.Controls.Library
}
}
_SelectedEditItem = value;
MyStepTabPanel.MyStepTabRibbon.MyEditItem = value;// Update StepTabRibbon.MyEditItem to match
if (value != null)
{
_SelectedEditItem.RefreshDisplay(true);

View File

@@ -319,7 +319,14 @@ namespace Volian.Controls.Library
private ItemInfo _MyItemInfo;
public ItemInfo MyItemInfo
{
get { return _MyItemInfo; }
get
{
if (_MyItemInfo == null && Parent is EditItem)
_MyItemInfo = (Parent as EditItem).MyItemInfo;
else if (_MyItemInfo == null && Parent.Parent is EditItem)
_MyItemInfo = (Parent.Parent as EditItem).MyItemInfo;
return _MyItemInfo;
}
set { _MyItemInfo = value; }
}
private string _OrigRTF;
@@ -2104,9 +2111,7 @@ namespace Volian.Controls.Library
public int SelectionStart
{
get { return _SelectionStart; }
set {
_SelectionStart = value;
}
set { _SelectionStart = value; }
}
int _SelectionLength;
public int SelectionLength
@@ -2116,8 +2121,6 @@ namespace Volian.Controls.Library
}
public SelectionData(RichTextBox richTextBox)
{
//Console.WriteLine("SelectionData SelectionStart {0}", richTextBox.SelectionStart);
//Volian.Base.Library.vlnStackTrace.ShowStack("SelectionData SelectionStart",this);//.ShowStackLocal("SelectionData SelectionStart", 3);
_SelectionStart = richTextBox.SelectionStart;
_SelectionLength = richTextBox.SelectionLength;
}

View File

@@ -30,6 +30,7 @@ namespace Volian.Controls.Library
get { return _MyEditItem; }
set
{
if (_MyEditItem == value) return; // Don't do this if the value is not different
_MyEditItem = value;
if (value != null)
{
@@ -37,9 +38,11 @@ namespace Volian.Controls.Library
if (value is GridItem)
{
ToggleTableDesignButtons(true);
MyFlexGrid_SelChange(this,new EventArgs());
MyFlexGrid_SelChange(this, new EventArgs());
}
}
else
MyStepRTB = null;
}
}
private DocVersionInfo _MyDVI;
@@ -59,8 +62,14 @@ namespace Volian.Controls.Library
}
}
private ItemInfo MyItemInfo
{ get { return _MyStepRTB == null ? null : _MyStepRTB.MyItemInfo; } }
{
get
{
if(_MyStepRTB != null && _MyStepRTB.MyItemInfo != null) return _MyStepRTB.MyItemInfo;
if(_MyEditItem != null && _MyEditItem.MyItemInfo != null) return _MyEditItem.MyItemInfo;
return null;
}
}
private DevComponents.DotNetBar.ButtonItem _DefaultContextMenu;
public void ClearContextMenu()
@@ -183,11 +192,17 @@ namespace Volian.Controls.Library
// ex. Positon on a substep, press <shift><F6> <N> <S> <S>, to list the substep types
//_MyStepRTB.KeyUp -=new KeyEventHandler(_MyStepRTB_KeyUp);
//_MyStepRTB.MouseUp -= new MouseEventHandler(_MyStepRTB_MouseUp);
_MyStepRTB.SelectionChanged -= new EventHandler(_MyStepRTB_SelectionChanged);
_MyEditItem.Leave -= new EventHandler(_MyEditItem_Leave);
_MyEditItem.Enter += new EventHandler(_MyEditItem_Enter);
if (_MyEditItem != null)
{
_MyEditItem.Leave -= new EventHandler(_MyEditItem_Leave);
_MyEditItem.Enter += new EventHandler(_MyEditItem_Enter);
}
//_MyStepRTB.Leave -= new EventHandler(_MyStepRTB_Leave);
_MyStepRTB.LinkChanged -= new StepRTBLinkEvent(_MyStepRTB_LinkChanged);
if (_MyStepRTB != null)
{
_MyStepRTB.SelectionChanged -= new EventHandler(_MyStepRTB_SelectionChanged);
_MyStepRTB.LinkChanged -= new StepRTBLinkEvent(_MyStepRTB_LinkChanged);
}
if (MyFlexGrid != null)
{
MyFlexGrid.CopyOptionChanged -= new VlnFlexGridEvent(MyFlexGrid_CopyOptionChanged);
@@ -200,11 +215,17 @@ namespace Volian.Controls.Library
// ex. Positon on a substep, press <shift><F6> <N> <S> <S>, to list the substep types
//_MyStepRTB.KeyUp -=new KeyEventHandler(_MyStepRTB_KeyUp);
//_MyStepRTB.MouseUp -= new MouseEventHandler(_MyStepRTB_MouseUp);
_MyStepRTB.SelectionChanged += new EventHandler(_MyStepRTB_SelectionChanged);
_MyEditItem.Leave += new EventHandler(_MyEditItem_Leave);
_MyEditItem.Enter -= new EventHandler(_MyEditItem_Enter);
if (_MyEditItem != null)
{
_MyEditItem.Leave += new EventHandler(_MyEditItem_Leave);
_MyEditItem.Enter -= new EventHandler(_MyEditItem_Enter);
}
//_MyStepRTB.Leave -= new EventHandler(_MyStepRTB_Leave);
_MyStepRTB.LinkChanged += new StepRTBLinkEvent(_MyStepRTB_LinkChanged);
if (_MyStepRTB != null)
{
_MyStepRTB.LinkChanged += new StepRTBLinkEvent(_MyStepRTB_LinkChanged);
_MyStepRTB.SelectionChanged += new EventHandler(_MyStepRTB_SelectionChanged);
}
if (MyFlexGrid != null)
{
MyFlexGrid.CopyOptionChanged += new VlnFlexGridEvent(MyFlexGrid_CopyOptionChanged);