This commit is contained in:
parent
04bece2922
commit
97427f9f05
@ -319,13 +319,13 @@ namespace Volian.Controls.Library
|
|||||||
//
|
//
|
||||||
// lblxTranRangeTip
|
// lblxTranRangeTip
|
||||||
//
|
//
|
||||||
this.lblxTranRangeTip.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
|
this.lblxTranRangeTip.Dock = System.Windows.Forms.DockStyle.Right;
|
||||||
this.lblxTranRangeTip.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
this.lblxTranRangeTip.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||||
this.lblxTranRangeTip.Location = new System.Drawing.Point(235, 0);
|
this.lblxTranRangeTip.Location = new System.Drawing.Point(265, 0);
|
||||||
this.lblxTranRangeTip.Name = "lblxTranRangeTip";
|
this.lblxTranRangeTip.Name = "lblxTranRangeTip";
|
||||||
this.lblxTranRangeTip.Size = new System.Drawing.Size(135, 46);
|
this.lblxTranRangeTip.Size = new System.Drawing.Size(105, 46);
|
||||||
this.lblxTranRangeTip.TabIndex = 33;
|
this.lblxTranRangeTip.TabIndex = 33;
|
||||||
this.lblxTranRangeTip.Text = "Select First Transition\r\nfor Range";
|
this.lblxTranRangeTip.Text = "Select First \r\nTransition\r\nfor Range";
|
||||||
//
|
//
|
||||||
// btnTranRangeClear
|
// btnTranRangeClear
|
||||||
//
|
//
|
||||||
|
@ -25,16 +25,16 @@ namespace Volian.Controls.Library
|
|||||||
set
|
set
|
||||||
{
|
{
|
||||||
_CurTrans = value;
|
_CurTrans = value;
|
||||||
if (_CurTrans == null)
|
if (_CurTrans == null) // Insert a transition
|
||||||
{
|
{
|
||||||
if (MyRTB == null) return;
|
if (MyRTB == null) return;
|
||||||
_CurItemFrom = MyRTB.MyItem;
|
_CurItemFrom = MyRTB.MyItem;
|
||||||
_TranFmtIndx = 0;
|
_TranFmtIndx = 0;
|
||||||
}
|
}
|
||||||
else
|
else // Modify a transition
|
||||||
{
|
{
|
||||||
_TranFmtIndx = _CurTrans.TranType;
|
_TranFmtIndx = _CurTrans.TranType;
|
||||||
_CurItemFrom = ItemInfo.Get(_CurTrans.FromID);
|
_CurItemFrom = MyRTB.MyItem;
|
||||||
}
|
}
|
||||||
_SavCurItemFrom = _CurItemFrom;
|
_SavCurItemFrom = _CurItemFrom;
|
||||||
_SavTranFmtIndx = _TranFmtIndx;
|
_SavTranFmtIndx = _TranFmtIndx;
|
||||||
@ -56,13 +56,15 @@ namespace Volian.Controls.Library
|
|||||||
get { return _RangeColor; }
|
get { return _RangeColor; }
|
||||||
set { _RangeColor = value; }
|
set { _RangeColor = value; }
|
||||||
}
|
}
|
||||||
private DisplayRTB _MyRTB; // Current RichTextBox, i.e. insert transition to it.
|
private DisplayRTB _MyRTB; // Current MyDisplayRTB, i.e. insert transition to it.
|
||||||
public DisplayRTB MyRTB
|
public DisplayRTB MyRTB
|
||||||
{
|
{
|
||||||
get { return _MyRTB; }
|
get { return _MyRTB; }
|
||||||
set { _MyRTB = value; }
|
set { _MyRTB = value; }
|
||||||
}
|
}
|
||||||
private ItemInfo _CurrentProcedure; // current procedure flags
|
private ItemInfo _CurrentItemProcedure; // the selected item's procedure
|
||||||
|
private ItemInfo _CurrentToProcedure; // the 'to' location's procedure (may be same as _CurrentItemProcedure)
|
||||||
|
private ItemInfo _CurrentProcedure; // current procedure used to set all of the controls (may switch between above two)
|
||||||
private int _CurrentProcIndex;
|
private int _CurrentProcIndex;
|
||||||
private bool _AlwaysDisableSets; // true if there is only 1 item in tree/combo for sets
|
private bool _AlwaysDisableSets; // true if there is only 1 item in tree/combo for sets
|
||||||
#endregion
|
#endregion
|
||||||
@ -101,6 +103,17 @@ namespace Volian.Controls.Library
|
|||||||
tmpitm = tmpitm.MyParent;
|
tmpitm = tmpitm.MyParent;
|
||||||
}
|
}
|
||||||
_CurrentProcedure = tmpitm;
|
_CurrentProcedure = tmpitm;
|
||||||
|
_CurrentToProcedure = _CurrentProcedure;
|
||||||
|
if (_CurTrans == null)
|
||||||
|
_CurrentItemProcedure = _CurrentProcedure;
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// use the transition from to get the procedure 'from'....
|
||||||
|
ItemInfo curfrom = _CurItemFrom;
|
||||||
|
while (curfrom.MyContent.Type != 0) curfrom = curfrom.MyParent;
|
||||||
|
_CurrentItemProcedure = curfrom;
|
||||||
|
}
|
||||||
|
// set other procedure related private variables.
|
||||||
vlnTreeComboSetsFillIn(_CurrentProcedure);
|
vlnTreeComboSetsFillIn(_CurrentProcedure);
|
||||||
cbTranProcsFillIn(_CurrentProcedure);
|
cbTranProcsFillIn(_CurrentProcedure);
|
||||||
if (_CurrentProcedure.Sections != null)
|
if (_CurrentProcedure.Sections != null)
|
||||||
@ -354,7 +367,7 @@ namespace Volian.Controls.Library
|
|||||||
lblxTranRangeTip.BackColor = _RangeColor;
|
lblxTranRangeTip.BackColor = _RangeColor;
|
||||||
// if any previous nodes selected for range - clear them here
|
// if any previous nodes selected for range - clear them here
|
||||||
if (!_DoingRange && _RangeNode1 != null) ClearRangeTransition();
|
if (!_DoingRange && _RangeNode1 != null) ClearRangeTransition();
|
||||||
|
if (_DoingRange && _RangeNode1 == null) InitRangeTransition();
|
||||||
// Always allow for step selection if there are items.
|
// Always allow for step selection if there are items.
|
||||||
if (tvTran.Nodes.Count>0)tvTran.Enabled = true;
|
if (tvTran.Nodes.Count>0)tvTran.Enabled = true;
|
||||||
}
|
}
|
||||||
@ -473,12 +486,14 @@ namespace Volian.Controls.Library
|
|||||||
if (listBoxTranFmt.SelectedIndex == _TranFmtIndx) return;
|
if (listBoxTranFmt.SelectedIndex == _TranFmtIndx) return;
|
||||||
|
|
||||||
if (_RangeNode1 != null) ClearRangeTransition();
|
if (_RangeNode1 != null) ClearRangeTransition();
|
||||||
// if this selection needs a step, the section list may need to updated with step only sections,
|
// if this selection needs a step, but not a procedure, use the current procedure & the section list may need to updated
|
||||||
// list the step sections of the current procedure.....
|
// with step only section. List the step sections of the current procedure.....
|
||||||
E_TransUI etmprev = (E_TransUI)_CurItemFrom.ActiveFormat.PlantFormat.FormatData.TransData.TransTypeList[_TranFmtIndx].TransUI;
|
E_TransUI etmprev = (E_TransUI)_CurItemFrom.ActiveFormat.PlantFormat.FormatData.TransData.TransTypeList[_TranFmtIndx].TransUI;
|
||||||
E_TransUI etmnew = (E_TransUI)_CurItemFrom.ActiveFormat.PlantFormat.FormatData.TransData.TransTypeList[listBoxTranFmt.SelectedIndex].TransUI;
|
E_TransUI etmnew = (E_TransUI)_CurItemFrom.ActiveFormat.PlantFormat.FormatData.TransData.TransTypeList[listBoxTranFmt.SelectedIndex].TransUI;
|
||||||
if (((etmnew & E_TransUI.StepAllowNone) == E_TransUI.StepAllowNone) != ((etmprev & E_TransUI.StepAllowNone) == E_TransUI.StepAllowNone))
|
if (((etmnew & E_TransUI.ProcCur) == E_TransUI.ProcCur) && ((etmprev & E_TransUI.ProcCur) == E_TransUI.ProcCur) != ((etmnew & E_TransUI.ProcCur) == E_TransUI.ProcCur))
|
||||||
{
|
{
|
||||||
|
_CurrentProcedure = _CurrentItemProcedure;
|
||||||
|
cbTranProcsFillIn(_CurrentProcedure);
|
||||||
int sectstartid = FindSectionStart(_CurrentProcedure);
|
int sectstartid = FindSectionStart(_CurrentProcedure);
|
||||||
IList chldrn = _CurrentProcedure.GetChildren();
|
IList chldrn = _CurrentProcedure.GetChildren();
|
||||||
if (chldrn != null && chldrn.Count > 0) cbTranSectsFillIn((ItemInfo)chldrn[0], sectstartid);
|
if (chldrn != null && chldrn.Count > 0) cbTranSectsFillIn((ItemInfo)chldrn[0], sectstartid);
|
||||||
@ -652,6 +667,12 @@ namespace Volian.Controls.Library
|
|||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
#region VariousSupportMethods
|
#region VariousSupportMethods
|
||||||
|
private void InitRangeTransition()
|
||||||
|
{
|
||||||
|
if (_InitializingTrans) MessageBox.Show("To do, initialize range node highlighting in tree");
|
||||||
|
// find rnage nodes to be highlighted & send it to tvTranRangeHilites to actually do the highlighting...
|
||||||
|
|
||||||
|
}
|
||||||
private void ClearRangeTransition()
|
private void ClearRangeTransition()
|
||||||
{
|
{
|
||||||
if (_RangeNode1 == null && _RangeNode2 == null) return;
|
if (_RangeNode1 == null && _RangeNode2 == null) return;
|
||||||
|
@ -62,20 +62,20 @@ namespace Volian.Controls.Library
|
|||||||
"<number>) ",
|
"<number>) ",
|
||||||
"<alpha>) "
|
"<alpha>) "
|
||||||
};
|
};
|
||||||
public static string TabFormat(DisplayItem myVlnCSLARTB)
|
public static string TabFormat(DisplayItem myDisplayItem)
|
||||||
{
|
{
|
||||||
string format = string.Empty;
|
string format = string.Empty;
|
||||||
if (myVlnCSLARTB.MyItem != null)
|
if (myDisplayItem.MyItem != null)
|
||||||
{
|
{
|
||||||
int typ = (int)myVlnCSLARTB.MyItem.MyContent.Type;
|
int typ = (int)myDisplayItem.MyItem.MyContent.Type;
|
||||||
if (typ >= 20000)
|
if (typ >= 20000)
|
||||||
{
|
{
|
||||||
if (myVlnCSLARTB.RNOLevel > 0 && IsRNO(myVlnCSLARTB.MyItem)) return "";
|
if (myDisplayItem.RNOLevel > 0 && IsRNO(myDisplayItem.MyItem)) return "";
|
||||||
// Step 1: Get TabFormat from Format
|
// Step 1: Get TabFormat from Format
|
||||||
format = _TabFormats[typ % 10000];
|
format = _TabFormats[typ % 10000];
|
||||||
if (format == "<seq>")
|
if (format == "<seq>")
|
||||||
{
|
{
|
||||||
format = SeqTabFormat[myVlnCSLARTB.SeqLevel % SeqTabFormat.Length];
|
format = SeqTabFormat[myDisplayItem.SeqLevel % SeqTabFormat.Length];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user