This commit is contained in:
parent
f3d20d1e5d
commit
1515b5ed9b
@ -40,7 +40,7 @@ namespace VEPROMS
|
|||||||
Step _LastStep = null;
|
Step _LastStep = null;
|
||||||
StepInfo _LastStepInfo = null;
|
StepInfo _LastStepInfo = null;
|
||||||
Color _CommentTitleBckColor;
|
Color _CommentTitleBckColor;
|
||||||
DisplayRTB _MyRTB;
|
StepRTB _MyRTB;
|
||||||
VETreeNode _PrevBookMark = null;
|
VETreeNode _PrevBookMark = null;
|
||||||
|
|
||||||
public frmVEPROMS()
|
public frmVEPROMS()
|
||||||
@ -830,7 +830,7 @@ namespace VEPROMS
|
|||||||
/// <param name="e"></param>
|
/// <param name="e"></param>
|
||||||
private void btnSetBookMrk_Click(object sender, EventArgs e)
|
private void btnSetBookMrk_Click(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
DisplayTabPanel dtp = ((DisplayTabItem)tc.SelectedTab).MyTabPanel;
|
StepTabPanel dtp = ((DisplayTabItem)tc.SelectedTab).MyTabPanel;
|
||||||
_MyBookMarks.Add(dtp.SelectedItem.MyItem);
|
_MyBookMarks.Add(dtp.SelectedItem.MyItem);
|
||||||
RefreshBookMarkData();
|
RefreshBookMarkData();
|
||||||
//VETreeNode tn = (VETreeNode)(tv.SelectedNode);
|
//VETreeNode tn = (VETreeNode)(tv.SelectedNode);
|
||||||
@ -1102,7 +1102,7 @@ namespace VEPROMS
|
|||||||
{
|
{
|
||||||
infoPanel.Expanded = true;
|
infoPanel.Expanded = true;
|
||||||
infoTabs.SelectedTab = infotabRO;
|
infoTabs.SelectedTab = infotabRO;
|
||||||
DisplayTabPanel dtp = ((DisplayTabItem)tc.SelectedTab).MyTabPanel;
|
StepTabPanel dtp = ((DisplayTabItem)tc.SelectedTab).MyTabPanel;
|
||||||
if (dtp == null) return;
|
if (dtp == null) return;
|
||||||
ROFST rofst = new ROFST("g:\\vehlp\\ro\\ro.fst");
|
ROFST rofst = new ROFST("g:\\vehlp\\ro\\ro.fst");
|
||||||
displayRO.MyROFST = rofst;
|
displayRO.MyROFST = rofst;
|
||||||
@ -1113,7 +1113,7 @@ namespace VEPROMS
|
|||||||
private void infotabTransition_Click(object sender, EventArgs e)
|
private void infotabTransition_Click(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
if (tc == null || tc.SelectedTab == null) return;
|
if (tc == null || tc.SelectedTab == null) return;
|
||||||
DisplayTabPanel dtp = ((DisplayTabItem)tc.SelectedTab).MyTabPanel;
|
StepTabPanel dtp = ((DisplayTabItem)tc.SelectedTab).MyTabPanel;
|
||||||
if (dtp == null) return;
|
if (dtp == null) return;
|
||||||
displayTransition.MyRTB = dtp.MyPanel.DisplayItemSelected.MyDisplayRTB;
|
displayTransition.MyRTB = dtp.MyPanel.DisplayItemSelected.MyDisplayRTB;
|
||||||
displayTransition.CurTrans = null;
|
displayTransition.CurTrans = null;
|
||||||
@ -1122,7 +1122,7 @@ namespace VEPROMS
|
|||||||
{
|
{
|
||||||
infoPanel.Expanded = true;
|
infoPanel.Expanded = true;
|
||||||
infoTabs.SelectedTab = infotabTransition;
|
infoTabs.SelectedTab = infotabTransition;
|
||||||
DisplayTabPanel dtp = ((DisplayTabItem)tc.SelectedTab).MyTabPanel;
|
StepTabPanel dtp = ((DisplayTabItem)tc.SelectedTab).MyTabPanel;
|
||||||
if (dtp == null) return;
|
if (dtp == null) return;
|
||||||
displayTransition.MyRTB = _MyRTB;
|
displayTransition.MyRTB = _MyRTB;
|
||||||
displayTransition.CurTrans = null;
|
displayTransition.CurTrans = null;
|
||||||
@ -1135,7 +1135,7 @@ namespace VEPROMS
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
itemAnnotationsBindingSource.DataSource = args.MyDisplayItem.MyItem.ItemAnnotations;
|
itemAnnotationsBindingSource.DataSource = args.MyDisplayItem.MyItem.ItemAnnotations;
|
||||||
DisplayTabPanel dtp = ((DisplayTabItem)tc.SelectedTab).MyTabPanel;
|
StepTabPanel dtp = ((DisplayTabItem)tc.SelectedTab).MyTabPanel;
|
||||||
if (dtp == null) return;
|
if (dtp == null) return;
|
||||||
displayTransition.MyRTB = dtp.MyPanel.DisplayRTB;
|
displayTransition.MyRTB = dtp.MyPanel.DisplayRTB;
|
||||||
displayRO.MyRTB = dtp.MyPanel.DisplayItemSelected.MyDisplayRTB;
|
displayRO.MyRTB = dtp.MyPanel.DisplayItemSelected.MyDisplayRTB;
|
||||||
@ -1182,7 +1182,7 @@ namespace VEPROMS
|
|||||||
infoTabs.SelectedTab = infotabRO;
|
infoTabs.SelectedTab = infotabRO;
|
||||||
ROFST rofst = new ROFST("g:\\vehlp\\ro\\ro.fst");
|
ROFST rofst = new ROFST("g:\\vehlp\\ro\\ro.fst");
|
||||||
displayRO.MyROFST = rofst;
|
displayRO.MyROFST = rofst;
|
||||||
DisplayTabPanel dtp = ((DisplayTabItem)tc.SelectedTab).MyTabPanel;
|
StepTabPanel dtp = ((DisplayTabItem)tc.SelectedTab).MyTabPanel;
|
||||||
if (dtp == null) return;
|
if (dtp == null) return;
|
||||||
displayRO.MyRTB = dtp.MyPanel.DisplayItemSelected.MyDisplayRTB;
|
displayRO.MyRTB = dtp.MyPanel.DisplayItemSelected.MyDisplayRTB;
|
||||||
displayRO.CurROLink = null;
|
displayRO.CurROLink = null;
|
||||||
@ -1200,7 +1200,7 @@ namespace VEPROMS
|
|||||||
infoTabs.SelectedTab = infotabRO;
|
infoTabs.SelectedTab = infotabRO;
|
||||||
ROFST rofst = new ROFST("g:\\vehlp\\ro\\ro.fst");
|
ROFST rofst = new ROFST("g:\\vehlp\\ro\\ro.fst");
|
||||||
displayRO.MyROFST = rofst;
|
displayRO.MyROFST = rofst;
|
||||||
DisplayTabPanel dtp = ((DisplayTabItem)tc.SelectedTab).MyTabPanel;
|
StepTabPanel dtp = ((DisplayTabItem)tc.SelectedTab).MyTabPanel;
|
||||||
if (dtp == null) return;
|
if (dtp == null) return;
|
||||||
displayRO.MyRTB = dtp.MyPanel.DisplayItemSelected.MyDisplayRTB;
|
displayRO.MyRTB = dtp.MyPanel.DisplayItemSelected.MyDisplayRTB;
|
||||||
displayRO.CurROLink = args.RoUsageid; // this is wrong - use for now.
|
displayRO.CurROLink = args.RoUsageid; // this is wrong - use for now.
|
||||||
|
@ -47,8 +47,8 @@ namespace Volian.Controls.Library
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
private string _SavCurROLink;
|
private string _SavCurROLink;
|
||||||
private DisplayRTB _MyRTB;
|
private StepRTB _MyRTB;
|
||||||
public DisplayRTB MyRTB
|
public StepRTB MyRTB
|
||||||
{
|
{
|
||||||
get { return _MyRTB; }
|
get { return _MyRTB; }
|
||||||
set
|
set
|
||||||
|
@ -18,13 +18,13 @@ namespace Volian.Controls.Library
|
|||||||
get { return _MyItem; }
|
get { return _MyItem; }
|
||||||
set { _MyItem = value; }
|
set { _MyItem = value; }
|
||||||
}
|
}
|
||||||
private DisplayTabPanel _MyTabPanel;
|
private StepTabPanel _MyTabPanel;
|
||||||
private string _MyKey;
|
private string _MyKey;
|
||||||
public string MyKey
|
public string MyKey
|
||||||
{
|
{
|
||||||
get { return _MyKey; }
|
get { return _MyKey; }
|
||||||
}
|
}
|
||||||
public DisplayTabPanel MyTabPanel
|
public StepTabPanel MyTabPanel
|
||||||
{
|
{
|
||||||
get { return _MyTabPanel; }
|
get { return _MyTabPanel; }
|
||||||
set { _MyTabPanel = value; }
|
set { _MyTabPanel = value; }
|
||||||
@ -59,7 +59,7 @@ namespace Volian.Controls.Library
|
|||||||
// See if I can tell the TabControl that the ItemSelected has changed
|
// See if I can tell the TabControl that the ItemSelected has changed
|
||||||
DisplayTabItem myTabItem = sender as DisplayTabItem;
|
DisplayTabItem myTabItem = sender as DisplayTabItem;
|
||||||
if(myTabItem == null)return;
|
if(myTabItem == null)return;
|
||||||
DisplayTabPanel myTabPanel = myTabItem.MyTabPanel as DisplayTabPanel;
|
StepTabPanel myTabPanel = myTabItem.MyTabPanel as StepTabPanel;
|
||||||
if(myTabPanel == null) return;
|
if(myTabPanel == null) return;
|
||||||
_MyTabControl.OnItemSelectedChanged(this,new DisplayPanelEventArgs(MyTabPanel.SelectedItem,null));
|
_MyTabControl.OnItemSelectedChanged(this,new DisplayPanelEventArgs(MyTabPanel.SelectedItem,null));
|
||||||
}
|
}
|
||||||
@ -67,7 +67,7 @@ namespace Volian.Controls.Library
|
|||||||
{
|
{
|
||||||
((System.ComponentModel.ISupportInitialize)(_MyTabControl.MyBar)).BeginInit();
|
((System.ComponentModel.ISupportInitialize)(_MyTabControl.MyBar)).BeginInit();
|
||||||
_MyTabControl.MyBar.SuspendLayout();
|
_MyTabControl.MyBar.SuspendLayout();
|
||||||
_MyTabPanel = new DisplayTabPanel(_MyTabControl);
|
_MyTabPanel = new StepTabPanel(_MyTabControl);
|
||||||
//
|
//
|
||||||
// tabItem
|
// tabItem
|
||||||
//
|
//
|
||||||
|
@ -58,8 +58,8 @@ namespace Volian.Controls.Library
|
|||||||
get { return _RangeColor; }
|
get { return _RangeColor; }
|
||||||
set { _RangeColor = value; }
|
set { _RangeColor = value; }
|
||||||
}
|
}
|
||||||
private DisplayRTB _MyRTB; // Current MyDisplayRTB, i.e. insert transition to it.
|
private StepRTB _MyRTB; // Current MyDisplayRTB, i.e. insert transition to it.
|
||||||
public DisplayRTB MyRTB
|
public StepRTB MyRTB
|
||||||
{
|
{
|
||||||
get { return _MyRTB; }
|
get { return _MyRTB; }
|
||||||
set
|
set
|
||||||
@ -148,11 +148,40 @@ namespace Volian.Controls.Library
|
|||||||
// Fill step items, passing in the active step to the selected item, or the first
|
// Fill step items, passing in the active step to the selected item, or the first
|
||||||
// step if the selection was not at the step level.
|
// step if the selection was not at the step level.
|
||||||
ItemInfo stpitm = null;
|
ItemInfo stpitm = null;
|
||||||
|
ItemInfo rngitm = null;
|
||||||
|
bool rangeSameLevel = true;
|
||||||
|
int i1 = 0;
|
||||||
|
int i2 = 0;
|
||||||
if (selitm.MyContent.Type >= 20000)
|
if (selitm.MyContent.Type >= 20000)
|
||||||
|
{
|
||||||
|
// if this is a range, find the 'outermost' range step, i.e. the highest level
|
||||||
|
// in the tree.
|
||||||
|
if (_DoingRange)
|
||||||
|
{
|
||||||
|
ItemInfo itm1 = selitm;
|
||||||
|
ItemInfo itm2 = _CurTrans.MyItemRangeID;
|
||||||
|
while (!itm1.IsHigh)
|
||||||
|
{
|
||||||
|
i1++;
|
||||||
|
itm1 = itm1.MyParent;
|
||||||
|
}
|
||||||
|
while (!itm2.IsHigh)
|
||||||
|
{
|
||||||
|
i2++;
|
||||||
|
itm2 = itm2.MyParent;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (i1 != i2) rangeSameLevel = false;
|
||||||
|
stpitm = (i1 <= i2) ? selitm : _CurTrans.MyItemRangeID;
|
||||||
|
rngitm = (stpitm == selitm) ? _CurTrans.MyItemRangeID : selitm;
|
||||||
|
}
|
||||||
|
else
|
||||||
stpitm = selitm;
|
stpitm = selitm;
|
||||||
|
}
|
||||||
else if (secitm != null && secitm.Steps != null && secitm.Steps.Count > 0)
|
else if (secitm != null && secitm.Steps != null && secitm.Steps.Count > 0)
|
||||||
stpitm = selitm.Steps[0];
|
stpitm = selitm.Steps[0];
|
||||||
tvTranFillIn(stpitm);
|
tvTranFillIn(stpitm);
|
||||||
|
if (_DoingRange) tvInitHiliteRange(rangeSameLevel, stpitm, rngitm, (i1 < i2) ? i2 : i1);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -162,6 +191,68 @@ namespace Volian.Controls.Library
|
|||||||
|
|
||||||
SetControlsEnabling();
|
SetControlsEnabling();
|
||||||
}
|
}
|
||||||
|
private void tvInitHiliteRange(bool rangeSameLevel, ItemInfo stpitm, ItemInfo rngitm, int uplevel)
|
||||||
|
{
|
||||||
|
_RangeNode1 = (VETreeNode) tvTran.SelectedNode;
|
||||||
|
_RangeNode2 = null;
|
||||||
|
// get first treenode at this level
|
||||||
|
VETreeNode tn = (VETreeNode)tvTran.Nodes[0];
|
||||||
|
|
||||||
|
if (rangeSameLevel)
|
||||||
|
{
|
||||||
|
// look at all children looking for the 'rngitm'.
|
||||||
|
while (_RangeNode2 == null)
|
||||||
|
{
|
||||||
|
ItemInfo ii = (ItemInfo)tn.VEObject;
|
||||||
|
if (ii.ItemID == rngitm.ItemID) _RangeNode2 = tn;
|
||||||
|
tn = (VETreeNode)tn.NextNode;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// Node that is outermost in tree between the two range items is 'stpitm', so need to expand tree from
|
||||||
|
// 'rngitm's parents down to rngitm. Make a list with the path from the range item to the selected item.
|
||||||
|
List<ItemInfo> path = new List<ItemInfo>();
|
||||||
|
ItemInfo parRng = rngitm;
|
||||||
|
for (int i = 0; i < uplevel+1; i++)
|
||||||
|
{
|
||||||
|
path.Insert(i, parRng);
|
||||||
|
parRng = (ItemInfo)parRng.ActiveParent;
|
||||||
|
}
|
||||||
|
|
||||||
|
// find each node to expand in the tree. look at all children looking for the items in the path list
|
||||||
|
|
||||||
|
VETreeNode tnExpand = null;
|
||||||
|
while (tnExpand == null && tn != null)
|
||||||
|
{
|
||||||
|
ItemInfo ii = (ItemInfo)tn.VEObject;
|
||||||
|
if (ii.ItemID == path[uplevel].ItemID) tnExpand = tn;
|
||||||
|
tn = (VETreeNode)tn.NextNode;
|
||||||
|
}
|
||||||
|
if (tnExpand == null)
|
||||||
|
{
|
||||||
|
MessageBox.Show("Error in highlighting step range.");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
VETreeNode tmp = null;
|
||||||
|
// Expand levels of subtree until second node in range.
|
||||||
|
for (int i = uplevel-1; i >= 0; i--)
|
||||||
|
{
|
||||||
|
tnExpand.Expand();
|
||||||
|
foreach (VETreeNode ctn in tnExpand.Nodes)
|
||||||
|
{
|
||||||
|
ItemInfo ii = (ItemInfo)ctn.VEObject;
|
||||||
|
if (ii.ItemID == path[i].ItemID)
|
||||||
|
{
|
||||||
|
tmp = ctn;
|
||||||
|
if (i == 0) _RangeNode2 = tmp;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
tnExpand = tmp;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
tvTranRangeHilites(true, _RangeNode1, _RangeNode2);
|
||||||
|
}
|
||||||
private void vlnTreeComboSetsFillIn(ItemInfo prcitm)
|
private void vlnTreeComboSetsFillIn(ItemInfo prcitm)
|
||||||
{
|
{
|
||||||
// from this procedure, walk up the tree storing the FolderInfos. This is done
|
// from this procedure, walk up the tree storing the FolderInfos. This is done
|
||||||
@ -285,6 +376,9 @@ namespace Volian.Controls.Library
|
|||||||
for (int i = 0; i < ttl.Count; i++)
|
for (int i = 0; i < ttl.Count; i++)
|
||||||
listBoxTranFmt.Items.Add(ttl[i].TransFormat);
|
listBoxTranFmt.Items.Add(ttl[i].TransFormat);
|
||||||
listBoxTranFmt.SelectedIndex = _TranFmtIndx;
|
listBoxTranFmt.SelectedIndex = _TranFmtIndx;
|
||||||
|
|
||||||
|
E_TransUI etm = (E_TransUI)_CurItemFrom.ActiveFormat.PlantFormat.FormatData.TransData.TransTypeList[_TranFmtIndx].TransUI;
|
||||||
|
_DoingRange = (etm & E_TransUI.StepLast) == E_TransUI.StepLast;
|
||||||
}
|
}
|
||||||
private void tvTranFillIn(ItemInfo startitm)
|
private void tvTranFillIn(ItemInfo startitm)
|
||||||
{
|
{
|
||||||
@ -385,14 +479,11 @@ namespace Volian.Controls.Library
|
|||||||
|
|
||||||
// check for range - if no range, then range button/label & step tree selections should be
|
// check for range - if no range, then range button/label & step tree selections should be
|
||||||
// 'cleared/invisble'.
|
// 'cleared/invisble'.
|
||||||
_DoingRange = false;
|
|
||||||
if ((etm & E_TransUI.StepLast) == E_TransUI.StepLast) _DoingRange = true;
|
|
||||||
btnTranRangeClear.Visible = _DoingRange;
|
btnTranRangeClear.Visible = _DoingRange;
|
||||||
lblxTranRangeTip.Visible = _DoingRange;
|
lblxTranRangeTip.Visible = _DoingRange;
|
||||||
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;
|
||||||
}
|
}
|
||||||
@ -524,6 +615,8 @@ namespace Volian.Controls.Library
|
|||||||
if (chldrn != null && chldrn.Count > 0) cbTranSectsFillIn((ItemInfo)chldrn[0], sectstartid);
|
if (chldrn != null && chldrn.Count > 0) cbTranSectsFillIn((ItemInfo)chldrn[0], sectstartid);
|
||||||
}
|
}
|
||||||
_TranFmtIndx = listBoxTranFmt.SelectedIndex;
|
_TranFmtIndx = listBoxTranFmt.SelectedIndex;
|
||||||
|
E_TransUI etm = (E_TransUI)_CurItemFrom.ActiveFormat.PlantFormat.FormatData.TransData.TransTypeList[_TranFmtIndx].TransUI;
|
||||||
|
_DoingRange = (etm & E_TransUI.StepLast) == E_TransUI.StepLast;
|
||||||
SetControlsEnabling();
|
SetControlsEnabling();
|
||||||
}
|
}
|
||||||
private void btnUp1_Click(object sender, EventArgs e)
|
private void btnUp1_Click(object sender, EventArgs e)
|
||||||
@ -692,12 +785,6 @@ 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;
|
||||||
@ -737,26 +824,27 @@ namespace Volian.Controls.Library
|
|||||||
node2 = node1;
|
node2 = node1;
|
||||||
node1 = t;
|
node1 = t;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Turn Hilighting on/off (depending on bool argument) between the two nodes
|
// Turn Hilighting on/off (depending on bool argument) between the two nodes
|
||||||
// they may be at different tree levels.
|
// they may be at different tree levels.
|
||||||
|
|
||||||
// find common parent level first and save the 'top parent' node for each selection.
|
// find common parent level first and save the 'top parent' node for each selection.
|
||||||
VETreeNode tmp1 = node1;
|
VETreeNode top1 = node1;
|
||||||
VETreeNode tmp2 = node2;
|
VETreeNode top2 = node2;
|
||||||
// loop, walking up node2's tree checking against node1. If not found, go to node1
|
// loop, walking up node2's tree checking against node1. If not found, go to node1
|
||||||
// parent, etc.
|
// parent, etc.
|
||||||
bool foundcommon = false;
|
bool foundcommon = false;
|
||||||
while (!foundcommon && tmp1 != null)
|
while (!foundcommon && top1 != null)
|
||||||
{
|
{
|
||||||
while (!foundcommon & tmp2 != null)
|
while (!foundcommon & top2 != null)
|
||||||
{
|
{
|
||||||
if (tmp1.Parent == tmp2.Parent) foundcommon = true;
|
if (top1.Parent == top2.Parent) foundcommon = true;
|
||||||
else tmp2 = (VETreeNode)tmp2.Parent;
|
else top2 = (VETreeNode)top2.Parent;
|
||||||
}
|
}
|
||||||
if (!foundcommon)
|
if (!foundcommon)
|
||||||
{
|
{
|
||||||
tmp2 = node2;
|
top2 = node2;
|
||||||
tmp1 = (VETreeNode)tmp1.Parent;
|
top1 = (VETreeNode)top1.Parent;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -767,28 +855,26 @@ namespace Volian.Controls.Library
|
|||||||
cur.BackColor = on ? _RangeColor : tvTran.BackColor;
|
cur.BackColor = on ? _RangeColor : tvTran.BackColor;
|
||||||
cur = (VETreeNode)(cur.NextNode == null ? cur.Parent : cur.NextNode);
|
cur = (VETreeNode)(cur.NextNode == null ? cur.Parent : cur.NextNode);
|
||||||
// if these nodes were at the same level, then stop after the current node = range2
|
// if these nodes were at the same level, then stop after the current node = range2
|
||||||
if (cur == tmp1) cur = null; // stop at top
|
if (cur == top1) cur = null; // stop at top
|
||||||
if (cur == tmp2) tmp1 = cur = null;
|
if (cur == top2) top1 = cur = null;
|
||||||
}
|
}
|
||||||
// set background for highest level between two nodes.
|
// set background for highest level between two nodes.
|
||||||
cur = tmp1==null?null:(VETreeNode)tmp1.NextNode;
|
cur = top1==null?null:(VETreeNode)top1.NextNode;
|
||||||
while (cur != null)
|
while (cur != null)
|
||||||
{
|
{
|
||||||
cur.BackColor = on ? _RangeColor : tvTran.BackColor;
|
cur.BackColor = on ? _RangeColor : tvTran.BackColor;
|
||||||
cur = (VETreeNode)cur.NextNode;
|
cur = (cur == top2) ? null : (VETreeNode)cur.NextNode;
|
||||||
if (cur == tmp2) cur = null;
|
|
||||||
|
|
||||||
}
|
}
|
||||||
// finish subtree of second node in range.
|
// finish subtree of second node in range.
|
||||||
cur = tmp2==node2?null:node2;
|
cur = top2==node2?null:node2;
|
||||||
while (cur != null)
|
while (cur != null)
|
||||||
{
|
{
|
||||||
cur.BackColor = on ? _RangeColor : tvTran.BackColor;
|
cur.BackColor = on ? _RangeColor : tvTran.BackColor;
|
||||||
cur = (VETreeNode)(cur.PrevNode == null ? cur.Parent : cur.PrevNode);
|
cur = (VETreeNode)(cur.PrevNode == null ? cur.Parent : cur.PrevNode);
|
||||||
if (cur == tmp2) cur = null; // stop at top
|
if (cur == top2) cur = null; // stop at top
|
||||||
}
|
}
|
||||||
// hilite last selection..
|
// hilite last selection..
|
||||||
tmp2.BackColor = on ? _RangeColor : tvTran.BackColor;
|
top2.BackColor = on ? _RangeColor : tvTran.BackColor;
|
||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
}
|
}
|
||||||
|
@ -28,7 +28,7 @@ namespace Volian.Controls.Library
|
|||||||
Done = 16
|
Done = 16
|
||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
public partial class DisplayItem : UserControl
|
public partial class StepItem : UserControl
|
||||||
{
|
{
|
||||||
private static readonly log4net.ILog _MyLog = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
|
private static readonly log4net.ILog _MyLog = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
|
||||||
#region Events
|
#region Events
|
||||||
@ -36,12 +36,12 @@ namespace Volian.Controls.Library
|
|||||||
#region Private Fields
|
#region Private Fields
|
||||||
private bool _ChildrenLoaded=false;
|
private bool _ChildrenLoaded=false;
|
||||||
private StepSectionLayoutData _Layout;
|
private StepSectionLayoutData _Layout;
|
||||||
private DisplayPanel _Panel;
|
private StepPanel _Panel;
|
||||||
private ChildRelation _Relation;
|
private ChildRelation _Relation;
|
||||||
private bool _Loading = true;
|
private bool _Loading = true;
|
||||||
private List<DisplayItem> _Before;
|
private List<StepItem> _Before;
|
||||||
private List<DisplayItem> _After;
|
private List<StepItem> _After;
|
||||||
private List<DisplayItem> _RNO;
|
private List<StepItem> _RNO;
|
||||||
private StepData _StepData;
|
private StepData _StepData;
|
||||||
#endregion
|
#endregion
|
||||||
// TODO: Look at modules to see if any should be made static
|
// TODO: Look at modules to see if any should be made static
|
||||||
@ -67,7 +67,7 @@ namespace Volian.Controls.Library
|
|||||||
ChangeBar = true;
|
ChangeBar = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
public DisplayRTB MyDisplayRTB
|
public StepRTB MyDisplayRTB
|
||||||
{
|
{
|
||||||
get { return _DisplayRTB; }
|
get { return _DisplayRTB; }
|
||||||
}
|
}
|
||||||
@ -77,8 +77,8 @@ namespace Volian.Controls.Library
|
|||||||
this._DisplayRTB.MyItem = _MyItem;
|
this._DisplayRTB.MyItem = _MyItem;
|
||||||
}
|
}
|
||||||
private static int __WidthAdjust = 3;
|
private static int __WidthAdjust = 3;
|
||||||
private DisplayItem _MyParent = null;
|
private StepItem _MyParent = null;
|
||||||
public DisplayItem MyParent
|
public StepItem MyParent
|
||||||
{
|
{
|
||||||
get { return _MyParent; }
|
get { return _MyParent; }
|
||||||
set
|
set
|
||||||
@ -162,7 +162,7 @@ namespace Volian.Controls.Library
|
|||||||
}
|
}
|
||||||
return max;
|
return max;
|
||||||
}
|
}
|
||||||
private Point TableLocation(DisplayItem parent, StepSectionLayoutData layout, int width)
|
private Point TableLocation(StepItem parent, StepSectionLayoutData layout, int width)
|
||||||
{
|
{
|
||||||
int x = parent.TextLeft;
|
int x = parent.TextLeft;
|
||||||
int y = parent.Bottom;
|
int y = parent.Bottom;
|
||||||
@ -265,12 +265,12 @@ namespace Volian.Controls.Library
|
|||||||
get
|
get
|
||||||
{
|
{
|
||||||
int count = 1;
|
int count = 1;
|
||||||
for (DisplayItem tmp = this; tmp.Previous != null; tmp = tmp.Previous) count++;
|
for (StepItem tmp = this; tmp.Previous != null; tmp = tmp.Previous) count++;
|
||||||
return count;
|
return count;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
private DisplayItem _Previous = null;
|
private StepItem _Previous = null;
|
||||||
public DisplayItem Previous
|
public StepItem Previous
|
||||||
{
|
{
|
||||||
get { return _Previous; }
|
get { return _Previous; }
|
||||||
set
|
set
|
||||||
@ -298,8 +298,8 @@ namespace Volian.Controls.Library
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
private DisplayItem _Next = null;
|
private StepItem _Next = null;
|
||||||
public DisplayItem Next
|
public StepItem Next
|
||||||
{
|
{
|
||||||
get { return _Next; }
|
get { return _Next; }
|
||||||
set
|
set
|
||||||
@ -315,7 +315,7 @@ namespace Volian.Controls.Library
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
public DisplayItem TopMost
|
public StepItem TopMost
|
||||||
{
|
{
|
||||||
get
|
get
|
||||||
{
|
{
|
||||||
@ -330,13 +330,13 @@ namespace Volian.Controls.Library
|
|||||||
return Top + (Visible ? Height : 0);
|
return Top + (Visible ? Height : 0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
public DisplayItem BottomMost
|
public StepItem BottomMost
|
||||||
{
|
{
|
||||||
get
|
get
|
||||||
{
|
{
|
||||||
DisplayItem tmpr = null;
|
StepItem tmpr = null;
|
||||||
if ((Expanding != ExpandingStatus.No || Expanded) && _RNO != null) tmpr = _RNO[_RNO.Count - 1].BottomMost;
|
if ((Expanding != ExpandingStatus.No || Expanded) && _RNO != null) tmpr = _RNO[_RNO.Count - 1].BottomMost;
|
||||||
DisplayItem tmpa = this;
|
StepItem tmpa = this;
|
||||||
if ((Expanding != ExpandingStatus.No || Expanded) & _After != null) tmpa = _After[_After.Count - 1].BottomMost;
|
if ((Expanding != ExpandingStatus.No || Expanded) & _After != null) tmpa = _After[_After.Count - 1].BottomMost;
|
||||||
if (tmpr == null)
|
if (tmpr == null)
|
||||||
return tmpa;
|
return tmpa;
|
||||||
@ -345,11 +345,11 @@ namespace Volian.Controls.Library
|
|||||||
return tmpr;
|
return tmpr;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
private DisplayItem FirstSibling
|
private StepItem FirstSibling
|
||||||
{
|
{
|
||||||
get
|
get
|
||||||
{
|
{
|
||||||
DisplayItem tmp = this;
|
StepItem tmp = this;
|
||||||
while (tmp.Previous != null)
|
while (tmp.Previous != null)
|
||||||
tmp = tmp.Previous;
|
tmp = tmp.Previous;
|
||||||
return tmp;
|
return tmp;
|
||||||
@ -357,11 +357,11 @@ namespace Volian.Controls.Library
|
|||||||
}
|
}
|
||||||
private int _ExpandPrefix = 0;
|
private int _ExpandPrefix = 0;
|
||||||
private int _ExpandSuffix = 0;
|
private int _ExpandSuffix = 0;
|
||||||
private DisplayItem LastSibling
|
private StepItem LastSibling
|
||||||
{
|
{
|
||||||
get
|
get
|
||||||
{
|
{
|
||||||
DisplayItem tmp = this;
|
StepItem tmp = this;
|
||||||
while (tmp.Next != null)
|
while (tmp.Next != null)
|
||||||
tmp = tmp.Next;
|
tmp = tmp.Next;
|
||||||
return tmp;
|
return tmp;
|
||||||
@ -418,7 +418,7 @@ namespace Volian.Controls.Library
|
|||||||
private int _Type;
|
private int _Type;
|
||||||
#endregion
|
#endregion
|
||||||
#region Constructors
|
#region Constructors
|
||||||
public DisplayItem(ItemInfo item, DisplayPanel panel, DisplayItem parent, ChildRelation relationType, bool expand)
|
public StepItem(ItemInfo item, StepPanel panel, StepItem parent, ChildRelation relationType, bool expand)
|
||||||
{
|
{
|
||||||
//// TIMING: DisplayItem.TimeIt("CSLARTB Top");
|
//// TIMING: DisplayItem.TimeIt("CSLARTB Top");
|
||||||
InitializeComponent();// TODO: Performance 25%
|
InitializeComponent();// TODO: Performance 25%
|
||||||
@ -641,36 +641,36 @@ namespace Volian.Controls.Library
|
|||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
#region AddItem
|
#region AddItem
|
||||||
public void AddItem(DisplayItem parent, ref List<DisplayItem> siblings)
|
public void AddItem(StepItem parent, ref List<StepItem> siblings)
|
||||||
{
|
{
|
||||||
if (siblings == null)
|
if (siblings == null)
|
||||||
{
|
{
|
||||||
siblings = new List<DisplayItem>();
|
siblings = new List<StepItem>();
|
||||||
siblings.Add(this);
|
siblings.Add(this);
|
||||||
MyParent = parent;
|
MyParent = parent;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
DisplayItem lastChild = LastChild(siblings);
|
StepItem lastChild = LastChild(siblings);
|
||||||
siblings.Add(this);
|
siblings.Add(this);
|
||||||
Previous = lastChild;
|
Previous = lastChild;
|
||||||
}
|
}
|
||||||
TabFormat = TemporaryFormat.TabFormat(this);
|
TabFormat = TemporaryFormat.TabFormat(this);
|
||||||
}
|
}
|
||||||
public DisplayItem AddNext(ItemInfo item,bool expand)
|
public StepItem AddNext(ItemInfo item,bool expand)
|
||||||
{
|
{
|
||||||
DisplayItem tmp = new DisplayItem(item, _Panel,MyParent, ChildRelation.None,expand);
|
StepItem tmp = new StepItem(item, _Panel,MyParent, ChildRelation.None,expand);
|
||||||
Next = tmp;
|
Next = tmp;
|
||||||
return tmp;
|
return tmp;
|
||||||
}
|
}
|
||||||
#region Add Children
|
#region Add Children
|
||||||
public DisplayItem LastChild(List<DisplayItem> children)
|
public StepItem LastChild(List<StepItem> children)
|
||||||
{
|
{
|
||||||
return children[children.Count - 1];
|
return children[children.Count - 1];
|
||||||
}
|
}
|
||||||
public void AddChildBefore(ItemInfo item,bool expand)
|
public void AddChildBefore(ItemInfo item,bool expand)
|
||||||
{
|
{
|
||||||
DisplayItem child = new DisplayItem(item, _Panel,this, ChildRelation.Before,expand);
|
StepItem child = new StepItem(item, _Panel,this, ChildRelation.Before,expand);
|
||||||
}
|
}
|
||||||
public void AddChildBefore(ItemInfoList itemList, bool expand)
|
public void AddChildBefore(ItemInfoList itemList, bool expand)
|
||||||
{
|
{
|
||||||
@ -680,7 +680,7 @@ namespace Volian.Controls.Library
|
|||||||
}
|
}
|
||||||
public void AddChildRNO(ItemInfo item,bool expand)
|
public void AddChildRNO(ItemInfo item,bool expand)
|
||||||
{
|
{
|
||||||
DisplayItem child = new DisplayItem(item, _Panel,this, ChildRelation.RNO,expand);
|
StepItem child = new StepItem(item, _Panel,this, ChildRelation.RNO,expand);
|
||||||
}
|
}
|
||||||
public void AddChildRNO(ItemInfoList itemList,bool expand)
|
public void AddChildRNO(ItemInfoList itemList,bool expand)
|
||||||
{
|
{
|
||||||
@ -690,7 +690,7 @@ namespace Volian.Controls.Library
|
|||||||
}
|
}
|
||||||
public void AddChildAfter(ItemInfo item,bool expand)
|
public void AddChildAfter(ItemInfo item,bool expand)
|
||||||
{
|
{
|
||||||
DisplayItem child = new DisplayItem(item, _Panel, this, ChildRelation.After,expand);
|
StepItem child = new StepItem(item, _Panel, this, ChildRelation.After,expand);
|
||||||
child.RNOLevel = this.RNOLevel;
|
child.RNOLevel = this.RNOLevel;
|
||||||
}
|
}
|
||||||
public void AddChildAfter(ItemInfoList itemList,bool expand)
|
public void AddChildAfter(ItemInfoList itemList,bool expand)
|
||||||
@ -734,11 +734,11 @@ namespace Volian.Controls.Library
|
|||||||
HideChildren(_RNO);
|
HideChildren(_RNO);
|
||||||
HideChildren(_After);
|
HideChildren(_After);
|
||||||
}
|
}
|
||||||
private void HideChildren(List<DisplayItem> children)
|
private void HideChildren(List<StepItem> children)
|
||||||
{
|
{
|
||||||
if (children != null)
|
if (children != null)
|
||||||
{
|
{
|
||||||
foreach (DisplayItem child in children)
|
foreach (StepItem child in children)
|
||||||
{
|
{
|
||||||
if (child.Expanded) child.HideChildren();
|
if (child.Expanded) child.HideChildren();
|
||||||
child.Visible = false;
|
child.Visible = false;
|
||||||
@ -753,11 +753,11 @@ namespace Volian.Controls.Library
|
|||||||
if(!vlnExp.Expanded)
|
if(!vlnExp.Expanded)
|
||||||
vlnExp.ShowExpanded();
|
vlnExp.ShowExpanded();
|
||||||
}
|
}
|
||||||
private void UnhideChildren(List<DisplayItem> children,bool expand)
|
private void UnhideChildren(List<StepItem> children,bool expand)
|
||||||
{
|
{
|
||||||
if (children != null)
|
if (children != null)
|
||||||
{
|
{
|
||||||
foreach (DisplayItem child in children)
|
foreach (StepItem child in children)
|
||||||
{
|
{
|
||||||
if (child.Expanded)
|
if (child.Expanded)
|
||||||
child.UnhideChildren(expand);
|
child.UnhideChildren(expand);
|
||||||
@ -773,11 +773,11 @@ namespace Volian.Controls.Library
|
|||||||
AdjustChildren(_RNO);
|
AdjustChildren(_RNO);
|
||||||
AdjustChildren(_After);
|
AdjustChildren(_After);
|
||||||
}
|
}
|
||||||
private void AdjustChildren(List<DisplayItem> children)
|
private void AdjustChildren(List<StepItem> children)
|
||||||
{
|
{
|
||||||
if (children != null)
|
if (children != null)
|
||||||
{
|
{
|
||||||
foreach (DisplayItem child in children)
|
foreach (StepItem child in children)
|
||||||
{
|
{
|
||||||
child.AdjustLocation();
|
child.AdjustLocation();
|
||||||
if (child.Expanded) child.AdjustChildren();
|
if (child.Expanded) child.AdjustChildren();
|
||||||
@ -836,11 +836,11 @@ namespace Volian.Controls.Library
|
|||||||
Expand(_Type >= 20000);
|
Expand(_Type >= 20000);
|
||||||
Cursor.Current = tmp;
|
Cursor.Current = tmp;
|
||||||
}
|
}
|
||||||
private void ExpandChildren(List<DisplayItem> children)
|
private void ExpandChildren(List<StepItem> children)
|
||||||
{
|
{
|
||||||
if (children != null)
|
if (children != null)
|
||||||
{
|
{
|
||||||
foreach (DisplayItem child in children)
|
foreach (StepItem child in children)
|
||||||
{
|
{
|
||||||
if (child.CanExpand)
|
if (child.CanExpand)
|
||||||
{
|
{
|
||||||
@ -857,11 +857,11 @@ namespace Volian.Controls.Library
|
|||||||
ExpandChildren(_RNO);
|
ExpandChildren(_RNO);
|
||||||
ExpandChildren(_After);
|
ExpandChildren(_After);
|
||||||
}
|
}
|
||||||
public DisplayItem NextItem
|
public StepItem NextItem
|
||||||
{
|
{
|
||||||
get
|
get
|
||||||
{
|
{
|
||||||
DisplayItem tmp = this;
|
StepItem tmp = this;
|
||||||
if (tmp.Next == null && FirstSibling._Relation == ChildRelation.Before)
|
if (tmp.Next == null && FirstSibling._Relation == ChildRelation.Before)
|
||||||
return UpOne;
|
return UpOne;
|
||||||
if (Expanded && tmp._After != null)
|
if (Expanded && tmp._After != null)
|
||||||
@ -873,7 +873,7 @@ namespace Volian.Controls.Library
|
|||||||
return null;
|
return null;
|
||||||
if (tmp.Expanding == ExpandingStatus.Expanding || tmp.Moving) // Parent Expanding or Moving - Wait
|
if (tmp.Expanding == ExpandingStatus.Expanding || tmp.Moving) // Parent Expanding or Moving - Wait
|
||||||
return null;
|
return null;
|
||||||
DisplayItem btm = tmp.BottomMost;
|
StepItem btm = tmp.BottomMost;
|
||||||
if (this != btm)
|
if (this != btm)
|
||||||
{
|
{
|
||||||
if (tmp.Next != null && tmp.Next.TopMost.Top != btm.Bottom)
|
if (tmp.Next != null && tmp.Next.TopMost.Top != btm.Bottom)
|
||||||
@ -890,11 +890,11 @@ namespace Volian.Controls.Library
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
private DisplayItem UpOne
|
private StepItem UpOne
|
||||||
{
|
{
|
||||||
get
|
get
|
||||||
{
|
{
|
||||||
DisplayItem tmp = this;
|
StepItem tmp = this;
|
||||||
while (tmp != null && tmp.MyParent == null) tmp = tmp.Previous;
|
while (tmp != null && tmp.MyParent == null) tmp = tmp.Previous;
|
||||||
if (tmp != null) return tmp.MyParent;
|
if (tmp != null) return tmp.MyParent;
|
||||||
return null;
|
return null;
|
||||||
@ -902,7 +902,7 @@ namespace Volian.Controls.Library
|
|||||||
}
|
}
|
||||||
private void AdjustLocation()
|
private void AdjustLocation()
|
||||||
{
|
{
|
||||||
DisplayItem tmp = NextItem;
|
StepItem tmp = NextItem;
|
||||||
if (tmp == null) return;
|
if (tmp == null) return;
|
||||||
if (tmp != null && !tmp.Moving && tmp.Top != Bottom )
|
if (tmp != null && !tmp.Moving && tmp.Top != Bottom )
|
||||||
{
|
{
|
||||||
@ -926,7 +926,7 @@ namespace Volian.Controls.Library
|
|||||||
if (_MyItem == null) return;
|
if (_MyItem == null) return;
|
||||||
if (Expanding == ExpandingStatus.Expanding) return;
|
if (Expanding == ExpandingStatus.Expanding) return;
|
||||||
_Moving = true;
|
_Moving = true;
|
||||||
DisplayItem tmp = (DisplayItem)sender;
|
StepItem tmp = (StepItem)sender;
|
||||||
if (tmp._Previous == null && tmp._MyParent == null)
|
if (tmp._Previous == null && tmp._MyParent == null)
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
@ -939,7 +939,7 @@ namespace Volian.Controls.Library
|
|||||||
//if(_MyLog.IsDebugEnabled)_MyLog.DebugFormat("\r\n'Adjust RNO',{0},'Move',{1}", MyID, _RNO[0].MyID);
|
//if(_MyLog.IsDebugEnabled)_MyLog.DebugFormat("\r\n'Adjust RNO',{0},'Move',{1}", MyID, _RNO[0].MyID);
|
||||||
if (RNOLevel >= _Panel.MaxRNO)
|
if (RNOLevel >= _Panel.MaxRNO)
|
||||||
{
|
{
|
||||||
DisplayItem tmpBottom = this;
|
StepItem tmpBottom = this;
|
||||||
if (_After != null) tmpBottom = _After[_After.Count - 1].BottomMost;
|
if (_After != null) tmpBottom = _After[_After.Count - 1].BottomMost;
|
||||||
_Panel.Scrolling++;
|
_Panel.Scrolling++;
|
||||||
_RNO[0].TopMost.Top = tmpBottom.Bottom;
|
_RNO[0].TopMost.Top = tmpBottom.Bottom;
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
namespace Volian.Controls.Library
|
namespace Volian.Controls.Library
|
||||||
{
|
{
|
||||||
partial class DisplayItem
|
partial class StepItem
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Required designer variable.
|
/// Required designer variable.
|
||||||
@ -28,7 +28,7 @@ namespace Volian.Controls.Library
|
|||||||
{
|
{
|
||||||
this.components = new System.ComponentModel.Container();
|
this.components = new System.ComponentModel.Container();
|
||||||
this.lblTab = new System.Windows.Forms.Label();
|
this.lblTab = new System.Windows.Forms.Label();
|
||||||
this._DisplayRTB = new Volian.Controls.Library.DisplayRTB(this.components);
|
this._DisplayRTB = new Volian.Controls.Library.StepRTB(this.components);
|
||||||
this.vlnExp = new Volian.Controls.Library.vlnExpander();
|
this.vlnExp = new Volian.Controls.Library.vlnExpander();
|
||||||
this.SuspendLayout();
|
this.SuspendLayout();
|
||||||
//
|
//
|
||||||
@ -110,7 +110,7 @@ namespace Volian.Controls.Library
|
|||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
private vlnExpander vlnExp;
|
private vlnExpander vlnExp;
|
||||||
private DisplayRTB _DisplayRTB;
|
private StepRTB _DisplayRTB;
|
||||||
private System.Windows.Forms.Label lblTab;
|
private System.Windows.Forms.Label lblTab;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -10,7 +10,7 @@ using System.Text.RegularExpressions;
|
|||||||
|
|
||||||
namespace Volian.Controls.Library
|
namespace Volian.Controls.Library
|
||||||
{
|
{
|
||||||
public partial class DisplayPanel : Panel
|
public partial class StepPanel : Panel
|
||||||
{
|
{
|
||||||
private static readonly log4net.ILog _MyLog = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
|
private static readonly log4net.ILog _MyLog = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
|
||||||
#region Events
|
#region Events
|
||||||
@ -68,7 +68,7 @@ namespace Volian.Controls.Library
|
|||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
#region Constructors
|
#region Constructors
|
||||||
public DisplayPanel()
|
public StepPanel()
|
||||||
{
|
{
|
||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
this.Paint += new PaintEventHandler(DisplayPanel_Paint);
|
this.Paint += new PaintEventHandler(DisplayPanel_Paint);
|
||||||
@ -103,7 +103,7 @@ namespace Volian.Controls.Library
|
|||||||
//VerticalLine(e.Graphics, 415);
|
//VerticalLine(e.Graphics, 415);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
public DisplayPanel(IContainer container)
|
public StepPanel(IContainer container)
|
||||||
{
|
{
|
||||||
container.Add(this);
|
container.Add(this);
|
||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
@ -118,7 +118,7 @@ namespace Volian.Controls.Library
|
|||||||
InactiveColor = PanelColor = BackColor;
|
InactiveColor = PanelColor = BackColor;
|
||||||
foreach (Control ctrl in Controls)
|
foreach (Control ctrl in Controls)
|
||||||
{
|
{
|
||||||
if (ctrl.GetType().Name == "DisplayItem")
|
if (ctrl.GetType().Name == "StepItem")
|
||||||
{
|
{
|
||||||
StepItem rtb = (StepItem)ctrl;
|
StepItem rtb = (StepItem)ctrl;
|
||||||
rtb.BackColor = BackColor;
|
rtb.BackColor = BackColor;
|
||||||
@ -180,8 +180,8 @@ namespace Volian.Controls.Library
|
|||||||
ExpandAsNeeded(item);
|
ExpandAsNeeded(item);
|
||||||
ItemLookup[id].ItemSelect();
|
ItemLookup[id].ItemSelect();
|
||||||
}
|
}
|
||||||
private DisplayRTB _DisplayRTB = null;
|
private StepRTB _DisplayRTB = null;
|
||||||
public DisplayRTB DisplayRTB
|
public StepRTB DisplayRTB
|
||||||
{
|
{
|
||||||
get { return _DisplayRTB; }
|
get { return _DisplayRTB; }
|
||||||
set
|
set
|
||||||
@ -367,7 +367,7 @@ namespace Volian.Controls.Library
|
|||||||
// Walk through the controls and find the next control for each
|
// Walk through the controls and find the next control for each
|
||||||
if(_MyLog.IsInfoEnabled)_MyLog.InfoFormat("'Item','Next'");
|
if(_MyLog.IsInfoEnabled)_MyLog.InfoFormat("'Item','Next'");
|
||||||
foreach (Control control in Controls)
|
foreach (Control control in Controls)
|
||||||
if (control.GetType().Name == "DisplayItem")
|
if (control.GetType().Name == "StepItem")
|
||||||
{
|
{
|
||||||
StepItem rtb = (StepItem)control;
|
StepItem rtb = (StepItem)control;
|
||||||
StepItem nxt = rtb.NextItem;
|
StepItem nxt = rtb.NextItem;
|
||||||
@ -380,16 +380,16 @@ namespace Volian.Controls.Library
|
|||||||
public partial class DisplayPanelSettings
|
public partial class DisplayPanelSettings
|
||||||
{
|
{
|
||||||
private static readonly log4net.ILog _MyLog = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
|
private static readonly log4net.ILog _MyLog = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
|
||||||
public DisplayPanelSettings(DisplayPanel panel)
|
public DisplayPanelSettings(StepPanel panel)
|
||||||
{
|
{
|
||||||
_Panel = panel;
|
_Panel = panel;
|
||||||
}
|
}
|
||||||
public DisplayPanelSettings()
|
public DisplayPanelSettings()
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
private DisplayPanel _Panel;
|
private StepPanel _Panel;
|
||||||
[Browsable(false)]
|
[Browsable(false)]
|
||||||
public DisplayPanel Panel
|
public StepPanel Panel
|
||||||
{
|
{
|
||||||
get { return _Panel; }
|
get { return _Panel; }
|
||||||
set { _Panel = value; }
|
set { _Panel = value; }
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
namespace Volian.Controls.Library
|
namespace Volian.Controls.Library
|
||||||
{
|
{
|
||||||
partial class DisplayPanel
|
partial class StepPanel
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Required designer variable.
|
/// Required designer variable.
|
||||||
|
@ -12,7 +12,7 @@ using VEPROMS.CSLA.Library;
|
|||||||
namespace Volian.Controls.Library
|
namespace Volian.Controls.Library
|
||||||
{
|
{
|
||||||
public delegate void DisplayRTBEvent(object sender, EventArgs args);
|
public delegate void DisplayRTBEvent(object sender, EventArgs args);
|
||||||
public partial class DisplayRTB : RichTextBox
|
public partial class StepRTB : RichTextBox
|
||||||
{
|
{
|
||||||
#region Properties and Variables
|
#region Properties and Variables
|
||||||
// use newer rich text box....
|
// use newer rich text box....
|
||||||
@ -153,12 +153,12 @@ namespace Volian.Controls.Library
|
|||||||
/// E_EditPrintMode ep_mode - edit or print.
|
/// E_EditPrintMode ep_mode - edit or print.
|
||||||
/// E_ViewMode vw_mode - view or edit.
|
/// E_ViewMode vw_mode - view or edit.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public DisplayRTB()
|
public StepRTB()
|
||||||
{
|
{
|
||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
SetUp();
|
SetUp();
|
||||||
}
|
}
|
||||||
public DisplayRTB(IContainer container)
|
public StepRTB(IContainer container)
|
||||||
{
|
{
|
||||||
container.Add(this);
|
container.Add(this);
|
||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
namespace Volian.Controls.Library
|
namespace Volian.Controls.Library
|
||||||
{
|
{
|
||||||
partial class DisplayRTB
|
partial class StepRTB
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Required designer variable.
|
/// Required designer variable.
|
||||||
|
@ -9,7 +9,7 @@ using Volian.Controls.Library;
|
|||||||
|
|
||||||
namespace Volian.Controls.Library
|
namespace Volian.Controls.Library
|
||||||
{
|
{
|
||||||
public partial class DisplayTabPanel : DevComponents.DotNetBar.PanelDockContainer
|
public partial class StepTabPanel : DevComponents.DotNetBar.PanelDockContainer
|
||||||
{
|
{
|
||||||
private DisplayTabControl _MyTabControl;
|
private DisplayTabControl _MyTabControl;
|
||||||
|
|
||||||
@ -18,7 +18,7 @@ namespace Volian.Controls.Library
|
|||||||
get { return _MyTabControl; }
|
get { return _MyTabControl; }
|
||||||
set { _MyTabControl = value; }
|
set { _MyTabControl = value; }
|
||||||
}
|
}
|
||||||
private DisplayTabRibbon _MyTabRibbon;
|
private StepTabRibbon _MyTabRibbon;
|
||||||
private Volian.Controls.Library.StepPanel _MyPanel;
|
private Volian.Controls.Library.StepPanel _MyPanel;
|
||||||
public Volian.Controls.Library.StepPanel MyPanel
|
public Volian.Controls.Library.StepPanel MyPanel
|
||||||
{
|
{
|
||||||
@ -45,7 +45,7 @@ namespace Volian.Controls.Library
|
|||||||
get { return _MyPanel.MyItem; }
|
get { return _MyPanel.MyItem; }
|
||||||
set { _MyPanel.MyItem = value; }
|
set { _MyPanel.MyItem = value; }
|
||||||
}
|
}
|
||||||
public DisplayTabPanel(DisplayTabControl myTabControl)
|
public StepTabPanel(DisplayTabControl myTabControl)
|
||||||
{
|
{
|
||||||
_MyTabControl = myTabControl;
|
_MyTabControl = myTabControl;
|
||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
@ -55,7 +55,7 @@ namespace Volian.Controls.Library
|
|||||||
}
|
}
|
||||||
private void SetupDisplayTabRibbon()
|
private void SetupDisplayTabRibbon()
|
||||||
{
|
{
|
||||||
_MyTabRibbon = new DisplayTabRibbon();
|
_MyTabRibbon = new StepTabRibbon();
|
||||||
_MyTabRibbon.Dock = System.Windows.Forms.DockStyle.Top;
|
_MyTabRibbon.Dock = System.Windows.Forms.DockStyle.Top;
|
||||||
_MyTabRibbon.Location = new System.Drawing.Point(0, 0);
|
_MyTabRibbon.Location = new System.Drawing.Point(0, 0);
|
||||||
_MyTabRibbon.Name = "displayTabRibbon1";
|
_MyTabRibbon.Name = "displayTabRibbon1";
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
namespace Volian.Controls.Library
|
namespace Volian.Controls.Library
|
||||||
{
|
{
|
||||||
partial class DisplayTabPanel
|
partial class StepTabPanel
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Required designer variable.
|
/// Required designer variable.
|
||||||
|
@ -9,7 +9,7 @@ using VEPROMS.CSLA.Library;
|
|||||||
|
|
||||||
namespace Volian.Controls.Library
|
namespace Volian.Controls.Library
|
||||||
{
|
{
|
||||||
public partial class DisplayTabRibbon : UserControl
|
public partial class StepTabRibbon : UserControl
|
||||||
{
|
{
|
||||||
private StepItem _MyDisplayItem;
|
private StepItem _MyDisplayItem;
|
||||||
public StepItem MyDisplayItem
|
public StepItem MyDisplayItem
|
||||||
@ -53,7 +53,7 @@ namespace Volian.Controls.Library
|
|||||||
btnCMSuperscript.Checked = btnSuperscript.Checked = RTBAPI.IsSuperScript(_MyDisplayRTB);
|
btnCMSuperscript.Checked = btnSuperscript.Checked = RTBAPI.IsSuperScript(_MyDisplayRTB);
|
||||||
btnCMCut.Enabled = btnCMCopy.Enabled = btnCut.Enabled = btnCopy.Enabled = _MyDisplayRTB.SelectionLength > 0;
|
btnCMCut.Enabled = btnCMCopy.Enabled = btnCut.Enabled = btnCopy.Enabled = _MyDisplayRTB.SelectionLength > 0;
|
||||||
}
|
}
|
||||||
public DisplayTabRibbon()
|
public StepTabRibbon()
|
||||||
{
|
{
|
||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
// get the xml for all of the symbols, create buttons for them & add them to the gallery.
|
// get the xml for all of the symbols, create buttons for them & add them to the gallery.
|
||||||
|
BIN
PROMS/Volian.Controls.Library/StepTabRibbon.designer.cs
generated
BIN
PROMS/Volian.Controls.Library/StepTabRibbon.designer.cs
generated
Binary file not shown.
@ -62,7 +62,7 @@ namespace Volian.Controls.Library
|
|||||||
"<number>) ",
|
"<number>) ",
|
||||||
"<alpha>) "
|
"<alpha>) "
|
||||||
};
|
};
|
||||||
public static string TabFormat(DisplayItem myDisplayItem)
|
public static string TabFormat(StepItem myDisplayItem)
|
||||||
{
|
{
|
||||||
string format = string.Empty;
|
string format = string.Empty;
|
||||||
if (myDisplayItem.MyItem != null)
|
if (myDisplayItem.MyItem != null)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user