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