Replaced Columns property with ColumnMode
Reset parts on close
This commit is contained in:
parent
5fe81af184
commit
0288bddba7
@ -57,6 +57,7 @@ namespace Volian.Controls.Library
|
|||||||
private Color _TabColor = Color.White;
|
private Color _TabColor = Color.White;
|
||||||
private Color _PanelColor = Color.White;
|
private Color _PanelColor = Color.White;
|
||||||
#endif
|
#endif
|
||||||
|
internal string _LastAdjust="";
|
||||||
private bool _ShowLines = true;
|
private bool _ShowLines = true;
|
||||||
private Graphics _MyGraphics = null;
|
private Graphics _MyGraphics = null;
|
||||||
private int _DPI = 0;
|
private int _DPI = 0;
|
||||||
@ -293,6 +294,7 @@ namespace Volian.Controls.Library
|
|||||||
get { return _SelectedStepRTB; }
|
get { return _SelectedStepRTB; }
|
||||||
set
|
set
|
||||||
{
|
{
|
||||||
|
if(value != null)
|
||||||
value.BackColor = ActiveColor; // Set the active color
|
value.BackColor = ActiveColor; // Set the active color
|
||||||
if (_SelectedStepRTB == value) return; // Same - No Change
|
if (_SelectedStepRTB == value) return; // Same - No Change
|
||||||
if (_SelectedStepRTB != null)
|
if (_SelectedStepRTB != null)
|
||||||
@ -302,7 +304,7 @@ namespace Volian.Controls.Library
|
|||||||
_SelectedStepRTB.SaveConfig(); // This may be redundant
|
_SelectedStepRTB.SaveConfig(); // This may be redundant
|
||||||
}
|
}
|
||||||
_SelectedStepRTB = value;
|
_SelectedStepRTB = value;
|
||||||
if (_SelectedItemInfo.ItemID != value.MyItemInfo.ItemID)
|
if (value != null && _SelectedItemInfo.ItemID != value.MyItemInfo.ItemID)
|
||||||
SelectedItemInfo = value.MyItemInfo;
|
SelectedItemInfo = value.MyItemInfo;
|
||||||
//vlnStackTrace.ShowStack("_DisplayRTB = {0}", _DisplayRTB.MyItem.ItemID);// Show StackTrace
|
//vlnStackTrace.ShowStack("_DisplayRTB = {0}", _DisplayRTB.MyItem.ItemID);// Show StackTrace
|
||||||
}
|
}
|
||||||
@ -377,22 +379,6 @@ namespace Volian.Controls.Library
|
|||||||
return _MyStepPanelSettings;
|
return _MyStepPanelSettings;
|
||||||
}
|
}
|
||||||
set { _MyStepPanelSettings = value;}
|
set { _MyStepPanelSettings = value;}
|
||||||
}
|
|
||||||
// TODO: This needs to move to StepItem and use the format for the current section
|
|
||||||
/// <summary>
|
|
||||||
/// Gets the MaxRNO from the StepSectionLayoutData
|
|
||||||
/// </summary>
|
|
||||||
public int MaxRNO
|
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
if(_MaxRNO == -1)
|
|
||||||
{
|
|
||||||
int pmode = Convert.ToInt32(_MyStepSectionLayoutData.PMode) - 1;
|
|
||||||
_MaxRNO = Convert.ToInt32( _MyStepSectionLayoutData.MaxRNOTable.Split(",".ToCharArray())[pmode]);
|
|
||||||
}
|
|
||||||
return _MaxRNO;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets or Sets the font for the Panel
|
/// Gets or Sets the font for the Panel
|
||||||
@ -608,7 +594,7 @@ namespace Volian.Controls.Library
|
|||||||
private ItemInfo BottomPart(ItemInfo ii)
|
private ItemInfo BottomPart(ItemInfo ii)
|
||||||
{
|
{
|
||||||
ExpandAsNeeded(ii);
|
ExpandAsNeeded(ii);
|
||||||
if (ii.RNOs != null && ii.RNOLevel >= ii.Columns - 1) return BottomPart(ii.RNOs[0]);
|
if (ii.RNOs != null && ii.RNOLevel >= ii.ColumnMode) return BottomPart(ii.RNOs[0]);
|
||||||
if (ii.Sections != null) return BottomPart(ii.Sections[0].LastSibling);
|
if (ii.Sections != null) return BottomPart(ii.Sections[0].LastSibling);
|
||||||
if (ii.Steps != null) return BottomPart(ii.Steps[0].LastSibling);
|
if (ii.Steps != null) return BottomPart(ii.Steps[0].LastSibling);
|
||||||
return ii;
|
return ii;
|
||||||
@ -653,7 +639,7 @@ namespace Volian.Controls.Library
|
|||||||
{
|
{
|
||||||
// if on RNO, check display mode (1 column/2 column, etc) and how deep RNO is before going to
|
// if on RNO, check display mode (1 column/2 column, etc) and how deep RNO is before going to
|
||||||
// parents substeps.
|
// parents substeps.
|
||||||
if (ii.IsRNO && ii.MyParent.Steps != null && ii.RNOLevel >= ii.Columns) return BottomPart(ii.MyParent.Steps[0].LastSibling);
|
if (ii.IsRNO && ii.MyParent.Steps != null && ii.RNOLevel >= ii.ColumnMode) return BottomPart(ii.MyParent.Steps[0].LastSibling);
|
||||||
|
|
||||||
// If on top note and parent has cautions - go to bottom caution
|
// If on top note and parent has cautions - go to bottom caution
|
||||||
if (ii.IsNoteStructure && ii.MyParent != null && ii.MyParent.Cautions != null) return BottomPart(ii.MyParent.Cautions[0].LastSibling);
|
if (ii.IsNoteStructure && ii.MyParent != null && ii.MyParent.Cautions != null) return BottomPart(ii.MyParent.Cautions[0].LastSibling);
|
||||||
@ -691,7 +677,7 @@ namespace Volian.Controls.Library
|
|||||||
// (the lookAtSub prevented looping within a substep group at same level)
|
// (the lookAtSub prevented looping within a substep group at same level)
|
||||||
if (lookAtSub && ii.Steps != null) return TopPart(ii.Steps[0]);
|
if (lookAtSub && ii.Steps != null) return TopPart(ii.Steps[0]);
|
||||||
// RNOs: Use PMode (column)
|
// RNOs: Use PMode (column)
|
||||||
if (lookAtRNO && ii.RNOs != null && ii.RNOLevel >= ii.Columns - 1) return TopPart(ii.RNOs[0]);
|
if (lookAtRNO && ii.RNOs != null && ii.RNOLevel >= ii.ColumnMode) return TopPart(ii.RNOs[0]);
|
||||||
// Nextsibling - go to top part of sibling
|
// Nextsibling - go to top part of sibling
|
||||||
if (ii.NextItems != null) return TopPart(ii.NextItems[0]);
|
if (ii.NextItems != null) return TopPart(ii.NextItems[0]);
|
||||||
// If on caution, if parent has note - go to note
|
// If on caution, if parent has note - go to note
|
||||||
|
@ -15,7 +15,12 @@ namespace Volian.Controls.Library
|
|||||||
{
|
{
|
||||||
if (disposing && (components != null))
|
if (disposing && (components != null))
|
||||||
{
|
{
|
||||||
//if (_DisplayRTB != null) _DisplayRTB.SaveText();
|
SelectedStepRTB = null; // Save Changes
|
||||||
|
foreach (StepItem stepItem in _LookupStepItems.Values)
|
||||||
|
{
|
||||||
|
stepItem.MyItemInfo.ResetParts();
|
||||||
|
stepItem.MyItemInfo.MyContent.RefreshContentParts();
|
||||||
|
}
|
||||||
components.Dispose();
|
components.Dispose();
|
||||||
}
|
}
|
||||||
base.Dispose(disposing);
|
base.Dispose(disposing);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user