C2026-043-Tech-Debt_v1 - Stash 1

This commit is contained in:
2026-07-21 06:49:28 -04:00
parent 0fed1acfd8
commit 9486b37300
70 changed files with 4222 additions and 10191 deletions
@@ -1,16 +1,13 @@
using System;
using System.Collections;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Text;
using System.Windows.Forms;
using System.Text.RegularExpressions;
using AT.STO.UI.Win;
using VEPROMS.CSLA.Library;
using Volian.Base.Library;
using JR.Utils.GUI.Forms;
using System.Linq;
namespace Volian.Controls.Library
{
@@ -116,15 +113,9 @@ namespace Volian.Controls.Library
private bool _DoingRange = false; // flags if in 'range' transition mode
private VETreeNode _RangeNode1;
private VETreeNode _RangeNode2;
// Use _RangeColor to show highlighting for steps selected in range. This is set from
// calling methods from application settings. If not default to aquamarine.
private Color _RangeColor = Color.LightGray;
public Color RangeColor
{
get { return _RangeColor; }
set { _RangeColor = value; }
}
private StepRTB _MyRTB; // Current MyDisplayRTB, i.e. insert transition to it.
public Color RangeColor { get; set; } = Color.LightGray;
private StepRTB _MyRTB; // Current MyDisplayRTB, i.e. insert transition to it.
public StepRTB MyRTB
{
get { return _MyRTB; }
@@ -148,7 +139,6 @@ namespace Volian.Controls.Library
CurTrans = args.MyLinkText.MyTransitionInfo;
}
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 bool _AlwaysDisableSets; // true if there is only 1 item in tree/combo for sets
@@ -219,7 +209,6 @@ namespace Volian.Controls.Library
}
}
_CurrentProcedure = tmpitm;
_CurrentToProcedure = _CurrentProcedure;
if (_CurTrans == null)
_CurrentItemProcedure = _CurrentProcedure;
else
@@ -271,7 +260,6 @@ namespace Volian.Controls.Library
else if (secitm != null && secitm.Steps != null && secitm.Steps.Count > 0)
stpitm = selitm.Steps[0];
if (!_DoingRange) tvTranFillIn(stpitm); // range code fills in tree.
//if (_DoingRange) tvInitHiliteRange(rangeSameLevel, stpitm, rngitm, (i1 < i2) ? i2 : i1);
}
else
{
@@ -283,16 +271,13 @@ namespace Volian.Controls.Library
}
private void tvInitHiliteRange() //bool rangeSameLevel, ItemInfo stpitm, ItemInfo rngitm, int uplevel)
{
ItemInfo toItm = _CurTrans.MyItemToID;
ItemInfo rngItm = null;
// figure out whether at same level, have same parent and have same HLS:
ItemInfo itm1 = _CurTrans.MyItemToID;
_ = _CurTrans.MyItemToID;
// figure out whether at same level, have same parent and have same HLS:
ItemInfo itm1 = _CurTrans.MyItemToID;
ItemInfo itm2 = _CurTrans.MyItemRangeID;
// Invalid existing transition
if (itm2.ActiveParent == null || itm1.ActiveParent == null)
return;
//if (_CurTrans.TranType == 2 && itm1.ItemID == itm2.ItemID) itm2 = itm1.LastSibling;
bool samHLS = itm1.MyHLS.ItemID == itm2.MyHLS.ItemID;
int lev1 = 0;
int lev2 = 0;
while (!itm1.IsHigh)
@@ -305,7 +290,6 @@ namespace Volian.Controls.Library
lev2++;
itm2 = itm2.MyParent;
}
bool samLevel = lev1 == lev2;
// For each range item, go to common level's parent.
int cnt = lev1+1;
ItemInfo sameParent1 = _CurTrans.MyItemToID;
@@ -327,7 +311,7 @@ namespace Volian.Controls.Library
// now add nodes for the subtrees so that highlighting can be done. Do 'to' item
// first. If 'range' item is at same level, won't need to do anymore processing.
ItemInfo toItem = sameParent1.Ordinal<=sameParent2.Ordinal?_CurTrans.MyItemToID:_CurTrans.MyItemRangeID;
ItemInfo rngItem = null;
ItemInfo rngItem;
if (_CurTrans.TranType == 2 && _CurTrans.MyItemToID == _CurTrans.MyItemRangeID)
{
@@ -452,51 +436,6 @@ namespace Volian.Controls.Library
vlnTreeComboSets.DropDownControl.SelectedNode = topnode;
vlnTreeComboSets.DropDownControl.BeforeExpand += new TreeViewCancelEventHandler(vlnTreeComboSets_BeforeExpand);
#region CheckIfNeeded Commented Out
//vlnTreeComboSets.DropDownControl. = vlnTreeComboSets.Width;
// The DropDownNode should be at a DocVersion now. The expanded DocVersion
// is the one that matches mydocversion
//tmpfi = mydocversion.ActiveParent as FolderInfo;
//DocVersionInfoList dvlist = tmpfi.FolderDocVersions;
//DropDownNode tnDV = null;
// Once at a docversions, only allow working
// draft sets. Use DocVersion that we're in, to expand it showing the active procedure.
// first count how many versions can be displayed, i.e. only workingdraft?
// if more than one, put out a tree node for them.
//int cntdocv = 0;
//foreach (DocVersionInfo dv in dvlist)
//{
// if ((VersionTypeEnum)dv.VersionType == VersionTypeEnum.WorkingDraft) cntdocv++;
//}
//if (cntdocv>1)
//{
// foreach (DocVersionInfo dv in dvlist)
// {
// if ((VersionTypeEnum)dv.VersionType == VersionTypeEnum.WorkingDraft)
// {
// DropDownNode tn = new DropDownNode(dv.VersionID, dv.ToString());
// tn.Tag = dv;
// if (topnode != null)
// topnode.Nodes.Add(tn);
// else
// vlnTreeComboSets.DropDownControl.Nodes.Add(tn);
// if (dv.VersionID == mydocversion.VersionID)
// {
// tnDV = tn;
// vlnTreeComboSets.Value = tnDV;
// vlnTreeComboSets.DropDownControl.SelectedNode = tnDV;
// }
// //else if (dv.HasChildren) // allow for '+' for tree expansion
// //{
// // DropDownNode tnt = new DropDownNode(0,"VLN_DUMMY");
// // tn.Nodes.Add(tnt);
// //}
// }
// }
//}
#endregion
}
private void ListBoxTranFmtFillIn()
{
@@ -504,7 +443,7 @@ namespace Volian.Controls.Library
listBoxTranFmt.Items.Clear();
for (int i = 0; i < ttl.MaxIndex; i++)
listBoxTranFmt.Items.Add(new TransItem(ttl[i].TransMenu.Replace("?.",""),ttl[i].TransFormat.Replace("?.","")));
//listBoxTranFmt.Items.Add(ttl[i].TransFormat.Replace("?.",""));
listBoxTranFmt.SelectedIndex = _TranFmtIndx;
E_TransUI etm = (E_TransUI)_CurItemFrom.ActiveFormat.PlantFormat.FormatData.TransData.TransTypeList[_TranFmtIndx].TransUI;
_DoingRange = (etm & E_TransUI.StepLast) == E_TransUI.StepLast;
@@ -532,18 +471,8 @@ namespace Volian.Controls.Library
if (startitm.MyContent.Type < 20000) return;
groupPanelTranstionSteps.Style.BackColor = Color.Cornsilk;
// For the tree view, use parent, unless already at HLS. If at HLS, use this level.
//ItemInfo selitm2 = startitm.MyHLS;
ItemInfo selSubSec = secitm.Sections[0];
// The commented out code below is for displaying the steps from the first sub-section B2025-035
//ItemInfo subSelStep = selSubSec.Steps[0];
//E_TransUI etm2 = (E_TransUI)_CurItemFrom.ActiveFormat.PlantFormat.FormatData.TransData.TransTypeList[listBoxTranFmt.SelectedIndex].TransUI;
//if (subSelStep.IsInRNO)
// startitm = subSelStep.FirstSibling; // if in RNO tree, start out with HLS
//else
// startitm = subSelStep != null ? subSelStep.FirstSibling : startitm.FirstSibling;
// B2025-035
ItemInfo subSelStep = secitm.Sections[0];
E_TransUI etm2 = (E_TransUI)_CurItemFrom.ActiveFormat.PlantFormat.FormatData.TransData.TransTypeList[listBoxTranFmt.SelectedIndex].TransUI;
if (subSelStep.IsInRNO)
@@ -551,13 +480,14 @@ namespace Volian.Controls.Library
else
startitm = subSelStep != null ? subSelStep.FirstSibling : startitm.FirstSibling;
// B2025-035
bool setsel2 = false;
while (startitm != null)
{
VETreeNode tvn = new VETreeNode(startitm, false);
tvn.Tag = startitm;
int active = this.tvTran.Nodes.Add(tvn);
VETreeNode tvn = new VETreeNode(startitm, false)
{
Tag = startitm
};
int active = this.tvTran.Nodes.Add(tvn);
if (subSelStep != null && startitm.ItemID == subSelStep.ItemID)
{
tvTran.SelectedNode = tvTran.Nodes[active];
@@ -580,7 +510,6 @@ namespace Volian.Controls.Library
groupPanelTranstionSteps.Style.BackColor = Color.Cornsilk;
// For the tree view, use parent, unless already at HLS. If at HLS, use this level.
ItemInfo selitm = startitm.MyHLS;
//if (_CurTrans == null)selitm = startitm.MyHLS;
E_TransUI etm = (E_TransUI)_CurItemFrom.ActiveFormat.PlantFormat.FormatData.TransData.TransTypeList[listBoxTranFmt.SelectedIndex].TransUI;
if (startitm.IsInRNO)
startitm = selitm.FirstSibling; // if in RNO tree, start out with HLS
@@ -589,9 +518,11 @@ namespace Volian.Controls.Library
bool setsel = false;
while (startitm != null)
{
VETreeNode tvn = new VETreeNode(startitm, false);
tvn.Tag = startitm;
int active = this.tvTran.Nodes.Add(tvn);
VETreeNode tvn = new VETreeNode(startitm, false)
{
Tag = startitm
};
int active = this.tvTran.Nodes.Add(tvn);
if (selitm !=null && startitm.ItemID == selitm.ItemID)
{
tvTran.SelectedNode = tvTran.Nodes[active];
@@ -614,10 +545,8 @@ namespace Volian.Controls.Library
if (secitm == null || secitm.MyContent.Type < 10000) return;
// if sectstart is not -1, then use this as the section to select, otherwise
// use the id for the item passed in.
int startitm = secstart;
if (clear && secstart < 0) secstart = secitm.ItemID;
ItemInfo selitm = secitm; // this is the selected 'section'
secitm = secitm.FirstSibling;
secitm = secitm.FirstSibling;
while (secitm != null)
{
// if the selected transition format requires a step be selected (show only step sections), only add step sections
@@ -793,19 +722,6 @@ namespace Volian.Controls.Library
}
}
}
// B2018-009 Eliminate Working Draft (DocVersions) from the procedure tree for transitions
//else if (fi.FolderDocVersionCount > 0)
//{
// foreach (DocVersionInfo dv in fi.FolderDocVersions)
// {
// if ((VersionTypeEnum)dv.VersionType == VersionTypeEnum.WorkingDraft)
// {
// DropDownNode newnode = new DropDownNode(dv.VersionID, dv.ToString());
// newnode.Tag = dv;
// par.Nodes.Add(newnode);
// }
// }
//}
}
vlnTreeComboSets.Value = par;
vlnTreeComboSets.DropDownControl.SelectedNode = par;
@@ -821,9 +737,9 @@ namespace Volian.Controls.Library
// selected the docversion itself....
bool defines_set = false;
FolderInfo fi = null;
if (obj is FolderInfo)
if (obj is FolderInfo finfo)
{
fi = (FolderInfo)obj;
fi = finfo;
if (fi.ChildFolderCount == 0)
{
// note that the folder may contain more than one docversion, check for
@@ -955,16 +871,6 @@ namespace Volian.Controls.Library
if (_DoingRange) tvTran.SelectedNode = null;
SaveCancelEnabling();
}
//private void btnUp1_Click(object sender, EventArgs e)
//{
// // if StepAllowNone, then use the second node in the tree view.
// int indx = 0;
// if (tvTran.Nodes[0].Tag == null) indx = 1;
// // if at HLS, don't do anything.
// ItemInfo curitm = (ItemInfo)((VETreeNode)tvTran.Nodes[indx]).VEObject;
// if (curitm.IsHigh) return;
// tvTranFillIn(curitm);
//}
private void tvTran_BeforeExpand(object sender, TreeViewCancelEventArgs e)
{
VETreeNode tn = ((VETreeNode)e.Node);
@@ -985,19 +891,15 @@ namespace Volian.Controls.Library
// it & disable.
ItemInfo secitm = (ItemInfo)cbTranSects.SelectedItem;
//if (secitm.IsStepSection)
//{
// cbTranSects.SelectedItem.Sections[0];
//}
if (!secitm.IsStepSection)
if (!secitm.IsStepSection)
{
tvTran.Nodes.Clear();
tvTran.Enabled = false;
cbIncStepNum.Enabled = false; // C2020-028: disable/uncheck 'Include Step Number' if on Word doc
cbIncStepNum.Checked = false;
// Set Save & Cancel enabling, depending on whether section can be an endpoint.
E_TransUI etm = (E_TransUI)_CurItemFrom.ActiveFormat.PlantFormat.FormatData.TransData.TransTypeList[_TranFmtIndx].TransUI;
//Following line is for Debugging
//E_TransUI etm = (E_TransUI)_CurItemFrom.ActiveFormat.PlantFormat.FormatData.TransData.TransTypeList[_TranFmtIndx].TransUI;
SaveCancelEnabling();
}
else
@@ -1065,7 +967,7 @@ namespace Volian.Controls.Library
// 1) Look in ProcedureConfig/SectionStart
ProcedureConfig pc = (ProcedureConfig)prcitm.MyConfig;
int sectstartid = -1;
string ss = pc == null ? null : pc.SectionStart;
string ss = pc?.SectionStart;
SectionInfo si = null;
if (ss != null && ss != "")
{
@@ -1077,7 +979,7 @@ namespace Volian.Controls.Library
if (si.MyProcedure.ItemID == prcitm.ItemID) return sectstartid;
// The following code fixes the sectionstart property for the Copy Procedure function. This code will correct
// any procedures that were copied prior to the implementation of this the copy procedure function fix.
foreach (SectionInfo si1 in prcitm.Sections)
foreach (SectionInfo si1 in prcitm.Sections.OfType<SectionInfo>())
{
if (si.DisplayNumber == si1.DisplayNumber && si.DisplayText == si1.DisplayText)
{
@@ -1096,22 +998,21 @@ namespace Volian.Controls.Library
// 2) Look in SectionConfig/OriginalSteps = 'Y'
if (prcitm.Sections != null)
{
foreach (SectionInfo sio in prcitm.Sections)
foreach (SectionInfo sio in prcitm.Sections.OfType<SectionInfo>())
{
SectionConfig sc = sio.MyConfig as SectionConfig;
if (sc != null && sc.Section_OriginalSteps == "Y")
{
return sio.ItemID;
}
}
if (sio.MyConfig is SectionConfig sc && sc.Section_OriginalSteps == "Y")
{
return sio.ItemID;
}
}
// 3) Find if any of the section titles contain 'PROCEDURES STEPS'
foreach (SectionInfo sit in prcitm.Sections)
foreach (SectionInfo sit in prcitm.Sections.OfType<SectionInfo>())
{
if (sit.DisplayText.ToUpper().Contains("PROCEDURE STEPS"))
return sit.ItemID;
}
foreach (SectionInfo sit in prcitm.Sections)
foreach (SectionInfo sit in prcitm.Sections.OfType<SectionInfo>())
{
if (sit.DisplayText.ToUpper().Equals("PROCEDURE"))// bug fix: B2015-003
return sit.ItemID;
@@ -1120,17 +1021,17 @@ namespace Volian.Controls.Library
// 4) Format has flag that a default section is not required so return 1st section.
if (prcitm.Sections != null)
{
foreach (SectionInfo sid in prcitm.Sections)
foreach (SectionInfo sid in prcitm.Sections.OfType<SectionInfo>())
{
if (sid.IsStepSection && sid.ActiveFormat.PlantFormat.FormatData.TransData.NoDefaultSectReq) return sid.ItemID;
}
// 3) Find if any of the section titles contain 'PROCEDURES STEPS'
foreach (SectionInfo sit in prcitm.Sections)
foreach (SectionInfo sit in prcitm.Sections.OfType<SectionInfo>())
{
if (sit.DisplayText.ToUpper().Contains("PROCEDURE STEPS"))
return sit.ItemID;
}
foreach (SectionInfo sit in prcitm.Sections)
foreach (SectionInfo sit in prcitm.Sections.OfType<SectionInfo>())
{
if (sit.DisplayText.ToUpper().Equals("PROCEDURE"))// bug fix: B2015-003
return sit.ItemID;
@@ -1173,13 +1074,12 @@ namespace Volian.Controls.Library
// check if node is a true end-point, i.e. not a 'part' node. If part node, don't
// allow selection.
VETreeNode vt = tvTran.SelectedNode as VETreeNode;
ItemInfo selii = vt.VEObject as ItemInfo;
if (selii == null)
{
FlexibleMessageBox.Show("Must select a valid step, not a grouping part such as 'RNO', 'Steps', etc");
return;
}
SaveCancelEnabling();
if (!(vt.VEObject is ItemInfo selii))
{
FlexibleMessageBox.Show("Must select a valid step, not a grouping part such as 'RNO', 'Steps', etc");
return;
}
SaveCancelEnabling();
//CSM-C2024-026 Evaluate the transitions panel
//Create a way to keep it from reverting the transition display panel to the currently selected item/transition.
@@ -1197,7 +1097,7 @@ namespace Volian.Controls.Library
if (_RangeNode1 == null || (_RangeNode1 != null && _RangeNode2 != null))
{
if (_RangeNode1 != null) tvTranRangeHilites(false, _RangeNode1, _RangeNode2);
tvTran.SelectedNode.BackColor = _RangeColor;
tvTran.SelectedNode.BackColor = RangeColor;
_RangeNode1 = (VETreeNode)tvTran.SelectedNode;
_RangeNode2 = null;
lblxTranRangeTip.Text = "Select Last Step \r\nfor Range";
@@ -1208,7 +1108,7 @@ namespace Volian.Controls.Library
{
if (_RangeNode2 != null) tvTranRangeHilites(false, _RangeNode1, _RangeNode2);
_RangeNode2 = (VETreeNode)tvTran.SelectedNode;
tvTran.SelectedNode.BackColor = _RangeColor;
tvTran.SelectedNode.BackColor = RangeColor;
tvTranRangeHilites(true, _RangeNode1, _RangeNode2);
lblxTranRangeTip.Text = "Select First Transition\r\nfor Range";
lblxTranRangeTip.BackColor = Color.Yellow;
@@ -1219,8 +1119,6 @@ namespace Volian.Controls.Library
}
private void SaveCancelEnabling()
{
//bool hasChanged = _CurItemFrom != _SavCurItemFrom || _TranFmtIndx != _SavTranFmtIndx
// || ( selii != null && _CurTrans.ToID != selii.ItemID);
bool hasChanged = SettingsChanged;
bool isenh = MyRTB != null && MyRTB.MyItemInfo != null && MyRTB.MyItemInfo.IsEnhancedStep;
// B2018-002 - Invalid Transitions - Set button enabled if it has a default section or it doesn't need a default
@@ -1240,25 +1138,6 @@ namespace Volian.Controls.Library
null, null, DevComponents.DotNetBar.eTooltipColor.Gray));
// B2024-007 color of transition panel was not toggling properly
groupPanelTranFmt.Style.BackColor = !HasDefault && NeedsDefault ? Color.Red : Color.Orange;
//btnTranSave.Enabled = allowSave;
//if (CurTrans != null && selii != null)
//{
// if (CurTrans.ToID == selii.ItemID)
// {
// // if the checkbox for including a page number (UseTransitionModifier flag is true)
// // then need to check if this has been changed, and allow a save/cancel if so.
// if (cbPageNum.Visible && _ModExistingPageNum != cbPageNum.Checked)
// btnTranCancel.Enabled = btnTranSave.Enabled = true;
// else
// btnTranCancel.Enabled = btnTranSave.Enabled = false;
// }
// else
// {
// btnTranCancel.Enabled = true;
// btnTranSave.Enabled = allowSave;
// }
//}
//else btnTranCancel.Enabled = btnTranSave.Enabled = allowSave;
}
private void btnTranCancel_Click(object sender, EventArgs e)
{
@@ -1314,7 +1193,7 @@ namespace Volian.Controls.Library
}
private void btnTranSave_Click(object sender, EventArgs e)
{
string trantxt = "(Resolved Transition Text)";
string trantxt; //Resolved Transition Text
string linktxt = null;
E_TransUI etm = (E_TransUI)_CurItemFrom.ActiveFormat.PlantFormat.FormatData.TransData.TransTypeList[listBoxTranFmt.SelectedIndex].TransUI;
// if must have a step, test for this first.
@@ -1370,16 +1249,13 @@ namespace Volian.Controls.Library
// be sure that the order is right, i.e. to is before range in list.
if (toItem.ItemID != rangeItem.ItemID)
{
Boolean switchIds = false;
// check for order of hls first, then do within sibling list.
switchIds = RangeItemAndToItemNeedsSwitched(toItem, rangeItem); // B2021-115 switchIds was being set to true when it should not have
// check for order of hls first, then do within sibling list.
Boolean switchIds = RangeItemAndToItemNeedsSwitched(toItem, rangeItem); // B2021-115 switchIds was being set to true when it should not have
if (switchIds)
{
ItemInfo switchItem = toItem;
toItem = rangeItem;
rangeItem = switchItem;
}
}
(rangeItem, toItem) = (toItem, rangeItem);
}
}
linktxt = string.Format("#Link:TransitionRange:{0} <NewID> {1} {2}", listBoxTranFmt.SelectedIndex, toItem.ItemID, rangeItem.ItemID);
}
else if ((etm & E_TransUI.StepFirst) == E_TransUI.StepFirst)
@@ -1496,7 +1372,7 @@ namespace Volian.Controls.Library
if (node1==null && node2==null) return;
if (node1 != null && node2 == null)
{
node1.BackColor = on ? _RangeColor : tvTran.BackColor;
node1.BackColor = on ? RangeColor : tvTran.BackColor;
return;
}
// If node2 is below node1 in the tree switch them... get to high level step &
@@ -1520,15 +1396,13 @@ namespace Volian.Controls.Library
}
if (i1 > i2)
{
VETreeNode t = node2;
node2 = node1;
node1 = t;
}
(node1, node2) = (node2, node1);
}
// 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 top1 = node1;
// 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 top1 = node1;
VETreeNode top2 = node2;
// loop, walking up node2's tree checking against node1. If not found, go to node1
// parent, etc.
@@ -1551,8 +1425,8 @@ namespace Volian.Controls.Library
VETreeNode cur = node1;
while (cur != null)
{
cur.BackColor = on ? _RangeColor : tvTran.BackColor;
cur = (VETreeNode)(cur.NextNode == null ? cur.Parent : cur.NextNode);
cur.BackColor = on ? RangeColor : tvTran.BackColor;
cur = (VETreeNode)(cur.NextNode ?? cur.Parent);
// if these nodes were at the same level, then stop after the current node = range2
if (cur == top1) cur = null; // stop at top
if (cur == top2) top1 = cur = null;
@@ -1561,32 +1435,27 @@ namespace Volian.Controls.Library
cur = top1==null?null:(VETreeNode)top1.NextNode;
while (cur != null)
{
cur.BackColor = on ? _RangeColor : tvTran.BackColor;
cur.BackColor = on ? RangeColor : tvTran.BackColor;
cur = (cur == top2) ? null : (VETreeNode)cur.NextNode;
}
// finish subtree of second node in range.
cur = top2==node2?null:node2;
while (cur != null)
{
cur.BackColor = on ? _RangeColor : tvTran.BackColor;
cur = (VETreeNode)(cur.PrevNode == null ? cur.Parent : cur.PrevNode);
cur.BackColor = on ? RangeColor : tvTran.BackColor;
cur = (VETreeNode)(cur.PrevNode ?? cur.Parent);
if (cur == top2) cur = null; // stop at top
}
// hilite last selection..
top2.BackColor = on ? _RangeColor : tvTran.BackColor;
top2.BackColor = on ? RangeColor : tvTran.BackColor;
}
#endregion
public DocVersionInfo Mydvi = null; // this is initialized in vlnTreeComboSetsFillIn()
private static UserInfo _MyUserInfo = null;
public static UserInfo MyUserInfo
{
get { return _MyUserInfo; }
set { _MyUserInfo = value; }
}
public static UserInfo MyUserInfo { get; set; } = null;
private void cbIncStepNum_CheckedChanged(object sender, EventArgs e)
private void cbIncStepNum_CheckedChanged(object sender, EventArgs e)
{
tvTran.Enabled=cbIncStepNum.Checked;
if (!_InitializingTrans) SaveCancelEnabling();
@@ -1610,14 +1479,13 @@ namespace Volian.Controls.Library
if (cbHoldProcSet.Checked)
{
VETreeNode vt = tvTran.SelectedNode as VETreeNode;
ItemInfo selii = vt.VEObject as ItemInfo;
if (selii != null)
{
HeldLinkText = string.Format("#Link:Transition:{0} <NewID> {1}", listBoxTranFmt.SelectedIndex, selii.ItemID);
HeldLink_TranFmtIndx = listBoxTranFmt.SelectedIndex;
HeldLink_CurItemFrom = selii;
}
}
if (vt.VEObject is ItemInfo selii)
{
HeldLinkText = string.Format("#Link:Transition:{0} <NewID> {1}", listBoxTranFmt.SelectedIndex, selii.ItemID);
HeldLink_TranFmtIndx = listBoxTranFmt.SelectedIndex;
HeldLink_CurItemFrom = selii;
}
}
else
{
HeldLinkText = "";
@@ -1628,29 +1496,17 @@ namespace Volian.Controls.Library
}
public class TransItem
{
private string _ItemDescription;
public string ItemDescription { get; set; }
public string ItemDescription
public string Format { get; set; }
public TransItem(string desc, string fmt)
{
get { return _ItemDescription; }
set { _ItemDescription = value; }
}
private string _Format;
public string Format
{
get { return _Format; }
set { _Format = value; }
}
public TransItem(string desc, string fmt)
{
_ItemDescription = desc;
_Format = fmt;
ItemDescription = desc;
Format = fmt;
}
public override string ToString()
{
return _ItemDescription;
return ItemDescription;
}
}
}