This commit is contained in:
parent
1c95a81ef8
commit
1e71d60ae2
@ -24,36 +24,34 @@ namespace Volian.Controls.Library
|
|||||||
}
|
}
|
||||||
private bool _Initalizing = false;
|
private bool _Initalizing = false;
|
||||||
private IList<int> _MyStepTypeInd = null; // use to keep track of step types put in step type menu
|
private IList<int> _MyStepTypeInd = null; // use to keep track of step types put in step type menu
|
||||||
private StepRTB _NotVisibleRTB = null;
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// This stores the last selected StepRTB when the Panel was not visible
|
/// This stores the last selected EditItem when the Panel was not visible
|
||||||
/// This allows the panel to be filled when the when it is made visible
|
/// This allows the panel to be filled when the when it is made visible
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public StepRTB NotVisibleRTB
|
private EditItem _NotVisibleEditItem;
|
||||||
|
public EditItem NotVisibleEditItem
|
||||||
{
|
{
|
||||||
get { return _NotVisibleRTB; }
|
get { return _NotVisibleEditItem; }
|
||||||
set
|
set
|
||||||
{
|
{
|
||||||
_NotVisibleRTB = null; // Initialize it to null
|
_NotVisibleEditItem = null;
|
||||||
if (value != null)
|
if (value != null && value.MyItemInfo != null && value.MyItemInfo.IsStep)
|
||||||
if (value.MyItemInfo != null)
|
_NotVisibleEditItem = value; // Only visible for steps
|
||||||
if (value.MyItemInfo.IsStep)
|
|
||||||
_NotVisibleRTB = value; // Only visible for steps
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
private StepRTB _MyRTB;
|
private EditItem _MyEditItem;
|
||||||
public StepRTB MyRTB
|
public EditItem MyEditItem
|
||||||
{
|
{
|
||||||
get { return _MyRTB; }
|
get { return _MyEditItem; }
|
||||||
set
|
set
|
||||||
{
|
{
|
||||||
if (!Visible)
|
if (!Visible)
|
||||||
{
|
{
|
||||||
NotVisibleRTB = value; // Remember RTB if the panel becomes visible
|
NotVisibleEditItem = value;
|
||||||
CurItemInfo = null; // The Current Item Info should be forgotten
|
CurItemInfo = null;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
NotVisibleRTB = null; // If Visible, no need to remember the RTB when the panel wasn't visible
|
NotVisibleEditItem = null;
|
||||||
if (value == null)
|
if (value == null)
|
||||||
{
|
{
|
||||||
ClearControls();
|
ClearControls();
|
||||||
@ -65,7 +63,7 @@ namespace Volian.Controls.Library
|
|||||||
ClearControls();
|
ClearControls();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
_MyRTB = value;
|
_MyEditItem = value;
|
||||||
CurItemInfo = value.MyItemInfo;
|
CurItemInfo = value.MyItemInfo;
|
||||||
// only change all at level if all substeps are of same type
|
// only change all at level if all substeps are of same type
|
||||||
bool allSameType = true;
|
bool allSameType = true;
|
||||||
@ -288,13 +286,13 @@ namespace Volian.Controls.Library
|
|||||||
private void listBoxStepTypes_SelectedIndexChanged(object sender, EventArgs e)
|
private void listBoxStepTypes_SelectedIndexChanged(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
if (_Initalizing) return;
|
if (_Initalizing) return;
|
||||||
RTBItem topRTBItem = _MyRTB.MyRTBItem;
|
EditItem topEditItem = MyEditItem;
|
||||||
FormatData fmtdata = CurItemInfo.ActiveFormat.PlantFormat.FormatData;
|
FormatData fmtdata = CurItemInfo.ActiveFormat.PlantFormat.FormatData;
|
||||||
string msgBox = null;
|
string msgBox = null;
|
||||||
if (cbChgAll.Checked)
|
if (cbChgAll.Checked)
|
||||||
{
|
{
|
||||||
ItemInfo startitm = CurItemInfo.FirstSibling;
|
ItemInfo startitm = CurItemInfo.FirstSibling;
|
||||||
topRTBItem = _MyRTB.MyRTBItem.MyStepPanel._LookupRTBItems[startitm.ItemID];
|
topEditItem = MyEditItem.MyStepPanel._LookupEditItems[startitm.ItemID];
|
||||||
while (startitm != null)
|
while (startitm != null)
|
||||||
{
|
{
|
||||||
using (Content cnt = Content.Get(startitm.MyContent.ContentID))
|
using (Content cnt = Content.Get(startitm.MyContent.ContentID))
|
||||||
@ -331,14 +329,15 @@ namespace Volian.Controls.Library
|
|||||||
}
|
}
|
||||||
msgBox = string.Format("This Step Type was changed to {0}", listBoxStepTypes.Items[listBoxStepTypes.SelectedIndex]);
|
msgBox = string.Format("This Step Type was changed to {0}", listBoxStepTypes.Items[listBoxStepTypes.SelectedIndex]);
|
||||||
}
|
}
|
||||||
topRTBItem.SetAllTabs();
|
topEditItem.SetAllTabs();
|
||||||
MessageBox.Show(msgBox);
|
MessageBox.Show(msgBox);
|
||||||
|
|
||||||
}
|
}
|
||||||
private void groupPanelCheckoff_VisibleChanged(object sender, EventArgs e)
|
private void groupPanelCheckoff_VisibleChanged(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
if (Visible==true && NotVisibleRTB != null)
|
// If it becomes visible, update the panel
|
||||||
MyRTB = NotVisibleRTB; // If it becomes visible, update the panel
|
if (Visible == true && NotVisibleEditItem != null)
|
||||||
|
MyEditItem = NotVisibleEditItem;
|
||||||
}
|
}
|
||||||
private void rbChgBarOvrRideOn_CheckedChanged(object sender, EventArgs e)
|
private void rbChgBarOvrRideOn_CheckedChanged(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user