Merge branch 'Development' into C2025-024

This commit is contained in:
2025-08-08 09:56:33 -04:00
47 changed files with 2406 additions and 1284 deletions

View File

@@ -119,8 +119,8 @@ namespace Volian.Controls.Library
if (CurrentItem.MyDocVersion != null)
if (CurrentItem.MyDocVersion.DocVersionAssociationCount > 0)
_ROPath = CurrentItem.MyDocVersion.DocVersionAssociations[0].MyROFst.MyRODb.FolderPath;
ProcItem = CurrentItem.MyProcedure;
}
}
public AnnotationInfo FirstExeAnnotation(ItemInfo ii)
{
if (ii == null) return null;
@@ -364,7 +364,11 @@ namespace Volian.Controls.Library
cbGridAnnoType.DisplayMember = "Name";
cbGridAnnoType.ValueMember = "TypeId";
cbGridAnnoType.DataSource = AnnotationTypeInfoList.Get().Clone();
//C2025 - 027 Annotation Type Filtering
cbGridAnnoType.WatermarkText = "Select Annotation Type";
cbGridAnnoType.DataSource = VEPROMS.CSLA.Library.AnnotationstypeSelections.Get(MyUserInfo.UserID);
// If there are no annotatons, then selected index is -1 (not defined), otherwise select the first.
// This was done so that it could be saved if there was text entered but user moves to another steprtb without selecting save button
// so that annotation gets saved.

View File

@@ -69,6 +69,7 @@ namespace Volian.Controls.Library
_AnnotationDetails = annotationDetails;
cbAnnoType.DisplayMember = "Name";
cbAnnoType.DataSource = AnnotationTypeInfoList.Get();
lbResults.MouseMove -= new MouseEventHandler(lbResults_MouseMove);
lbResults.MouseMove += new MouseEventHandler(lbResults_MouseMove);
_TabControl = tc;
}

View File

@@ -354,7 +354,10 @@ namespace Volian.Controls.Library
private void WireCheckboxes()
{
foreach (CheckBox cb in MyCheckBoxes.Values)
{
cb.CheckedChanged -= new EventHandler(cb_CheckedChanged);
cb.CheckedChanged += new EventHandler(cb_CheckedChanged);
}
}
private void UnwireCheckboxes(bool reset)
{

View File

@@ -211,7 +211,9 @@ namespace Volian.Controls.Library
}
_myRTB = value;
MyRTB.LinkChanged -= new StepRTBLinkEvent(MyRTB_LinkChanged);
MyRTB.LinkChanged += new StepRTBLinkEvent(MyRTB_LinkChanged);
MyRTB.SelectionChanged -= new EventHandler(MyRTB_SelectionChanged);
MyRTB.SelectionChanged += new EventHandler(MyRTB_SelectionChanged);
if (string.IsNullOrEmpty(MyRTB.MyLinkText))

View File

@@ -161,8 +161,11 @@ namespace Volian.Controls.Library
if (_MyROFSTLookup == null) return;
advTreeRO.BeforeExpand -= new AdvTreeNodeCancelEventHandler(advTreeRO_BeforeExpand);
advTreeRO.BeforeExpand += new AdvTreeNodeCancelEventHandler(advTreeRO_BeforeExpand);
advTreeRO.AfterExpand -= new AdvTreeNodeEventHandler(advTreeRO_AfterExpandorCollapse);
advTreeRO.AfterExpand += new AdvTreeNodeEventHandler(advTreeRO_AfterExpandorCollapse);
advTreeRO.AfterCollapse -= new AdvTreeNodeEventHandler(advTreeRO_AfterExpandorCollapse);
advTreeRO.AfterCollapse += new AdvTreeNodeEventHandler(advTreeRO_AfterExpandorCollapse);
topnode = new DevComponents.AdvTree.Node();
@@ -250,6 +253,7 @@ namespace Volian.Controls.Library
topnode.Tag = fi;
}
advTreeProcSets.BeforeExpand -= new DevComponents.AdvTree.AdvTreeNodeCancelEventHandler(advTreeProcSets_BeforeExpand);
advTreeProcSets.BeforeExpand += new DevComponents.AdvTree.AdvTreeNodeCancelEventHandler(advTreeProcSets_BeforeExpand);
// position to the procedure set in the tree if we have a procedure open

View File

@@ -468,7 +468,9 @@ namespace Volian.Controls.Library
lastLastFormatID = fv.FormatID;
}
}
cbxTranVersion.SelectedIndexChanged -= new EventHandler(cbxTranVersion_SelectedIndexChanged);
cbxTranVersion.SelectedIndexChanged += new EventHandler(cbxTranVersion_SelectedIndexChanged);
cbxTranFormat.SelectedIndexChanged -= new EventHandler(cbxTranFormat_SelectedIndexChanged);
cbxTranFormat.SelectedIndexChanged += new EventHandler(cbxTranFormat_SelectedIndexChanged);
}
this.Cursor = Cursors.Default;
@@ -892,6 +894,7 @@ namespace Volian.Controls.Library
topnode.DataKey = fi.FolderID;
}
advTreeProcSets.BeforeExpand -= new DevComponents.AdvTree.AdvTreeNodeCancelEventHandler(advTreeProcSets_BeforeExpand);
advTreeProcSets.BeforeExpand += new DevComponents.AdvTree.AdvTreeNodeCancelEventHandler(advTreeProcSets_BeforeExpand);
// position to the procedure set in the tree if we have a procedure open
@@ -986,6 +989,7 @@ namespace Volian.Controls.Library
annoTypes.Add(new AnnotationTypeSearch(ati.Name, ati.TypeID.ToString()));
cbxAnnoTypes.DisplayMember = "Name";
cbxAnnoTypes.DataSource = annoTypes;
lbSrchResults.MouseMove -= new MouseEventHandler(lbSrchResults_MouseMove);
lbSrchResults.MouseMove += new MouseEventHandler(lbSrchResults_MouseMove);
_TabControl = tc;
}

View File

@@ -378,7 +378,10 @@ namespace Volian.Controls.Library
{
_MyStepRTB = _MyEditItem.MyStepRTB;
if (_MyStepRTB != null)
{
_MyStepRTB.Disposed -= new EventHandler(_MyStepRTB_Disposed);
_MyStepRTB.Disposed += new EventHandler(_MyStepRTB_Disposed);
}
}
else
_MyStepRTB = null;
@@ -469,6 +472,7 @@ namespace Volian.Controls.Library
myBar.DockTabControl.CloseButtonPosition = DevComponents.DotNetBar.eTabCloseButtonPosition.Right;
myBar.DockTabControl.Width = ClientRectangle.Width;
}
myBar.DockTabClosing -= new DockTabClosingEventHandler(myBar_DockTabClosing);
myBar.DockTabClosing += new DockTabClosingEventHandler(myBar_DockTabClosing);
if (!myBar.Visible)
myBar.Visible = true;

View File

@@ -566,6 +566,7 @@ namespace Volian.Controls.Library
startitm = startitm.GetNext();
}
if (!setsel2) tvTran.SelectedNode = tvTran.Nodes[0];
tvTran.BeforeExpand -= new TreeViewCancelEventHandler(tvTran_BeforeExpand);
tvTran.BeforeExpand += new TreeViewCancelEventHandler(tvTran_BeforeExpand);
// bug fix. TreeView needs the next two lines to properly display the bottom node. jsj 01/08/2010
tvTran.ItemHeight++;
@@ -599,6 +600,7 @@ namespace Volian.Controls.Library
startitm = startitm.GetNext();
}
if (!setsel) tvTran.SelectedNode = tvTran.Nodes[0];
tvTran.BeforeExpand -= new TreeViewCancelEventHandler(tvTran_BeforeExpand);
tvTran.BeforeExpand += new TreeViewCancelEventHandler(tvTran_BeforeExpand);
// bug fix. TreeView needs the next two lines to properly display the bottom node. jsj 01/08/2010
tvTran.ItemHeight++;

View File

@@ -214,10 +214,14 @@ namespace Volian.Controls.Library
UserCheckOffChar = (char)co.UIMark;
}
// Deal with changes in content data
value.MyContent.Changed -= new ContentInfoEvent(MyContent_Changed);
value.MyContent.Changed += new ContentInfoEvent(MyContent_Changed);
value.MyProcedure.MyContent.Changed -= new ContentInfoEvent(MyContent_Changed);
value.MyProcedure.MyContent.Changed += new ContentInfoEvent(MyContent_Changed);
// Deal with change in item data
value.Changed -= new ItemInfoEvent(value_Changed);
value.Changed += new ItemInfoEvent(value_Changed);
value.OrdinalChanged -= new ItemInfoEvent(value_OrdinalChanged);
value.OrdinalChanged += new ItemInfoEvent(value_OrdinalChanged);
// do something like this to draw circle around step numbers - note got NULL reference error on NSP data
//if (value.FormatStepData != null && value.FormatStepData.TabData.IdentPrint.Contains("C0")) Circle = true;
@@ -3997,9 +4001,13 @@ namespace Volian.Controls.Library
if (!itemInfo.IsStep) // C2025-036 reduce un-needed processing - this will prevent duplicat calls that generate step tabs when loading a procedure
SetupHeader(itemInfo);
SetupAlarmTableView(itemInfo); // C2021-018 display alarm point table information in the step editor (if the format flag is set)
this.Paint -= new PaintEventHandler(EditItem_Paint);
this.Paint += new PaintEventHandler(EditItem_Paint);
this.BackColorChanged -= new EventHandler(EditItem_BackColorChanged);
this.BackColorChanged += new EventHandler(EditItem_BackColorChanged);
this.Move -= new EventHandler(EditItem_Move);
this.Move += new EventHandler(EditItem_Move);
this.Resize -= new EventHandler(EditItem_Resize);
this.Resize += new EventHandler(EditItem_Resize);
if (itemInfo != null)
{
@@ -4050,6 +4058,7 @@ namespace Volian.Controls.Library
SeqLevel = myParentEditItem.SeqLevel + ((myChildRelation == ChildRelation.After || myChildRelation == ChildRelation.Before) && itemInfo.IsSequential ? 1 : 0);
//// TIMING: DisplayItem.TimeIt("CSLARTB seqLevel");
MyItemInfo = itemInfo;
MyItemInfo.MyConfig.PropertyChanged -= new PropertyChangedEventHandler(MyConfig_PropertyChanged);
MyItemInfo.MyConfig.PropertyChanged += new PropertyChangedEventHandler(MyConfig_PropertyChanged);
}
//// TIMING: DisplayItem.TimeIt("CSLARTB MyItem");

View File

@@ -1284,7 +1284,7 @@ namespace Volian.Controls.Library
}
selectedRtfSB.Append(@"{\rtf1\ansi\ansicpg1252\deff0\deflang1033{\fonttbl{\f0\fnil\fcharset2 " + myFont.FontFamily.Name + @";}"); //}\f0\fs" + this.Font.SizeInPoints * 2 + @" " + myDisplayTextElement.Text + @"}}";
if (!isFixed)
selectedRtfSB.Append(@"{\f1\fnil\fcharset0 " + Volian.Base.Library.vlnFont.ProportionalSymbolFont + @";}}{\colortbl ;\red255\green0\blue0;}"); // C2017-036 get best available proportional font for symbols
selectedRtfSB.Append(@"{\f1\fnil\fcharset0 " + Volian.Base.Library.vlnFont.ProportionalSymbolFont + @";}}{\colortbl ;\red255\green0\blue0;\red0\green0\blue255;}"); // C2017-036 get best available proportional font for symbols - B2025-039 add Blue for Colored Replace Words
else
selectedRtfSB.Append(@"{\f1\fnil\fcharset0 FreeMono;}}{\colortbl ;\red255\green0\blue0;\red0\green0\blue255;}"); // FreeMono is now used for the edit screen only. VESymbFix and Consolas are used for printing
selectedRtfSB.Append("\r\n");

View File

@@ -618,6 +618,15 @@ namespace Volian.Controls.Library
}
private int _MyLastFormatID = -1;
private StepRTB _MyStepRTB;
private static int _OringFlg;
public static int OringFlg
{
get { return _OringFlg; }
set
{
_OringFlg = value;
}
}
public StepRTB MyStepRTB
{
get { return _MyStepRTB; }
@@ -4143,16 +4152,22 @@ namespace Volian.Controls.Library
private void btnPdfCreate_Click(object sender, EventArgs e)
{
// B2025-036 split screen print issue. if oringFlg == 1 the ctrl-p keys was pressed.
_OringFlg = 0;
DevComponents.DotNetBar.eEventSource oring = ((DevComponents.DotNetBar.Events.EventSourceArgs)e).Source;
if (oring == eEventSource.Keyboard)
_OringFlg = 1;
if (MyItemInfo == null) return; // if creating a pdf before rtb exists, return;
if (MyEditItem != null) MyEditItem.SaveCurrentAndContents();
OnPrintRequest(new StepTabRibbonEventArgs(MyItemInfo.MyProcedure), 0);
OnPrintRequest(new StepTabRibbonEventArgs(MyItemInfo.MyProcedure, _OringFlg), 0);
}
private void btnPdfQuickCreate_Click(object sender, EventArgs e)
{
if (MyItemInfo == null) return; // if creating a pdf before rtb exists, return;
if (MyEditItem != null) MyEditItem.SaveCurrentAndContents();
OnPrintRequest(new StepTabRibbonEventArgs(MyItemInfo.MyProcedure), 1);
OnPrintRequest(new StepTabRibbonEventArgs(MyItemInfo.MyProcedure, _OringFlg), 1);
}
private void btnCASCreate_Click(object sender, EventArgs e)
@@ -4814,9 +4829,10 @@ namespace Volian.Controls.Library
public class StepTabRibbonEventArgs : EventArgs
{
public StepTabRibbonEventArgs() { ; }
public StepTabRibbonEventArgs(ItemInfo proc)
public StepTabRibbonEventArgs(ItemInfo proc, int oringFlg = 0)
{
_Proc = proc;
OringFlg = oringFlg;
}
private ItemInfo _Proc;
@@ -4825,6 +4841,13 @@ namespace Volian.Controls.Library
get { return _Proc; }
set { _Proc = value; }
}
// B2025-036 split screen print issue. if oringFlg == 1 the ctrl-p keys was pressed.
private int _OringFlg;
public int OringFlg
{
get { return _OringFlg; }
set { _OringFlg = value; }
}
}
public delegate void StepTabRibbonEvent(object sender, StepTabRibbonEventArgs args);

View File

@@ -598,11 +598,6 @@ namespace Volian.Controls.Library
{
if (ProcedureCheckedOutTo != null) ProcedureCheckedOutTo(sender, args);
}
public event vlnTreeViewEvent ExportImportProcedureSets;
private void OnExportImportProcedureSets(object sender, vlnTreeEventArgs args)
{
@@ -902,6 +897,7 @@ namespace Volian.Controls.Library
MenuItem miqp = new MenuItem("Quick Print");
//MenuItem mips = new MenuItem("Print Section");
MenuItem mia = new MenuItem("Approve");
int k = 0;
foreach (string s in pri.MyDocVersion.UnitNames)
{