Compare commits
19
Commits
B2026-077
...
Development
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
81e9ceb784 | ||
|
|
1d51080765 | ||
|
|
df2934a654 | ||
|
|
71a4aa313d | ||
|
|
f860ba367d | ||
|
|
382b8d7434 | ||
|
|
44bddbc95d | ||
|
|
eb246b1dbe | ||
|
|
93c6d32110 | ||
|
|
1a81c17ccd | ||
|
|
9078e99741 | ||
|
|
bbaea7ab67 | ||
|
|
dc22ff6e3b | ||
|
|
72359319a4 | ||
|
|
f663e4f956 | ||
|
|
87e163af15 | ||
|
|
cb5bb715cf | ||
|
|
3929c5c36f | ||
|
|
901d2e522b |
No files matched your search
Binary file not shown.
@@ -127,12 +127,13 @@ namespace ROEditor
|
|||||||
private string origPrefix;
|
private string origPrefix;
|
||||||
private string origValue;
|
private string origValue;
|
||||||
private int dbtype;
|
private int dbtype;
|
||||||
|
private bool IsNewGroup = false;
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Required designer variable.
|
/// Required designer variable.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
private System.ComponentModel.Container components = null;
|
private System.ComponentModel.Container components = null;
|
||||||
|
|
||||||
public GroupDefFrm(VlnXmlElement pelem, RODB rodb, string gpname,int idbtype)
|
public GroupDefFrm(VlnXmlElement pelem, RODB rodb, string gpname,int idbtype, bool newgrp = false)
|
||||||
{
|
{
|
||||||
myrodb = rodb;
|
myrodb = rodb;
|
||||||
elem = pelem;
|
elem = pelem;
|
||||||
@@ -143,6 +144,7 @@ namespace ROEditor
|
|||||||
//
|
//
|
||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
FillInData();
|
FillInData();
|
||||||
|
IsNewGroup = newgrp;
|
||||||
}
|
}
|
||||||
|
|
||||||
private string CvtUserFldToFld(string fldname)
|
private string CvtUserFldToFld(string fldname)
|
||||||
@@ -655,10 +657,11 @@ namespace ROEditor
|
|||||||
tmpn.FirstChild.Value = tmpstr2; //tmpn.FirstChild.Value.Replace(CvtUserFldToFld(origGroup), this.tbGroup.Text);
|
tmpn.FirstChild.Value = tmpstr2; //tmpn.FirstChild.Value.Replace(CvtUserFldToFld(origGroup), this.tbGroup.Text);
|
||||||
modified=true;
|
modified=true;
|
||||||
}
|
}
|
||||||
if ((elem.HasAttribute("AccPageIDPrefix")&&this.tbPrefix.Text != origPrefix) || this.tbPrefix.Modified==true)
|
if ((elem.HasAttribute("AccPageIDPrefix")&&(tbPrefix.Text != origPrefix || IsNewGroup)) || tbPrefix.Modified)
|
||||||
{
|
{
|
||||||
elem.SetAttribute("AccPageIDPrefix",this.tbPrefix.Text);
|
elem.SetAttribute("AccPageIDPrefix",this.tbPrefix.Text);
|
||||||
modified=true;
|
modified=true;
|
||||||
|
IsNewGroup = false;
|
||||||
|
|
||||||
if (myrodb.IsDuplicateAccPagePrefix(elem, tbPrefix.Text))
|
if (myrodb.IsDuplicateAccPagePrefix(elem, tbPrefix.Text))
|
||||||
{
|
{
|
||||||
@@ -666,6 +669,7 @@ namespace ROEditor
|
|||||||
elem.SetAttribute("AccPageIDPrefix", origPrefix);
|
elem.SetAttribute("AccPageIDPrefix", origPrefix);
|
||||||
modified = false;
|
modified = false;
|
||||||
MessageBox.Show($"The Prefix field used for the \"Accessory Pages Access\" values should be unique. The fields used in these values can be found under \"Properties\" of an RO Group. If these are not unique, you may have trouble utilizing these ROs within Word Sections in PROMS. Cannot save.", "Problem saving data");
|
MessageBox.Show($"The Prefix field used for the \"Accessory Pages Access\" values should be unique. The fields used in these values can be found under \"Properties\" of an RO Group. If these are not unique, you may have trouble utilizing these ROs within Word Sections in PROMS. Cannot save.", "Problem saving data");
|
||||||
|
DialogResult = DialogResult.Cancel;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -44,9 +44,7 @@
|
|||||||
*********************************************************************************************/
|
*********************************************************************************************/
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
using System.Drawing;
|
|
||||||
using System.Collections;
|
using System.Collections;
|
||||||
using System.ComponentModel;
|
|
||||||
using System.Windows.Forms;
|
using System.Windows.Forms;
|
||||||
using System.Xml;
|
using System.Xml;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
@@ -297,11 +295,11 @@ namespace ROEditor
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
lastSavedGroup = this.tbGroup.Text;
|
lastSavedGroup = this.tbGroup.Text;
|
||||||
int dbtype=-1;
|
int dbtype = -1;
|
||||||
if (this.rbbtnGraphics.Checked == true) dbtype = 1;
|
if (this.rbbtnGraphics.Checked == true) dbtype = 1;
|
||||||
else if (this.rbbtnSetpoint.Checked == true) dbtype = 2;
|
else if (this.rbbtnSetpoint.Checked == true) dbtype = 2;
|
||||||
else if (this.rbbtnUserDef.Checked == true) dbtype = 3;
|
else if (this.rbbtnUserDef.Checked == true) dbtype = 3;
|
||||||
if (dbtype<0)
|
if (dbtype < 0)
|
||||||
{
|
{
|
||||||
MessageBox.Show("Need to define type of group.");
|
MessageBox.Show("Need to define type of group.");
|
||||||
return;
|
return;
|
||||||
@@ -321,55 +319,55 @@ namespace ROEditor
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
// for the given type, copy over the required fields.
|
// for the given type, copy over the required fields.
|
||||||
success = myrodb.RODB_CopyFieldDefs("ROMaster",tbname,dbtype);
|
success = myrodb.RODB_CopyFieldDefs("ROMaster", tbname, dbtype);
|
||||||
if (success == false)
|
if (success == false)
|
||||||
{
|
{
|
||||||
Cursor.Current = Cursors.Default;
|
Cursor.Current = Cursors.Default;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
// create top level group node with input name.
|
// create top level group node with input name.
|
||||||
nelem = (VlnXmlElement) elem.OwnerDocument.CreateElement("vlnGroup");
|
nelem = (VlnXmlElement)elem.OwnerDocument.CreateElement("vlnGroup");
|
||||||
nelem.InnerText = CvtUserFldToFld(this.tbGroup.Text);
|
nelem.InnerText = CvtUserFldToFld(this.tbGroup.Text);
|
||||||
nelem.SetAttribute("Table",tbname);
|
nelem.SetAttribute("Table", tbname);
|
||||||
nelem.SetAttribute("ParentID", "00000000");
|
nelem.SetAttribute("ParentID", "00000000");
|
||||||
string nrecid = myrodb.RODB_GetNextRecId(tbname);
|
string nrecid = myrodb.RODB_GetNextRecId(tbname);
|
||||||
nelem.SetAttribute("RecID", nrecid);
|
nelem.SetAttribute("RecID", nrecid);
|
||||||
elem.AppendChild((XmlNode) nelem);
|
elem.AppendChild((XmlNode)nelem);
|
||||||
success = myrodb.RODB_InsertGroup(nelem);
|
success = myrodb.RODB_InsertGroup(nelem);
|
||||||
Cursor.Current = Cursors.Default;
|
Cursor.Current = Cursors.Default;
|
||||||
if (success == false) return;
|
if (success == false) return;
|
||||||
nelem.SetAttribute("TreeNotData", "True");
|
nelem.SetAttribute("TreeNotData", "True");
|
||||||
nelem.SetAttribute("MenuTitle", this.tbGroup.Text);
|
nelem.SetAttribute("MenuTitle", this.tbGroup.Text);
|
||||||
nelem.SetAttribute("MasterRecID",toprecid);
|
nelem.SetAttribute("MasterRecID", toprecid);
|
||||||
nelem.SetAttribute("HasChild", "False");
|
nelem.SetAttribute("HasChild", "False");
|
||||||
|
|
||||||
// if this is a setpoint db or image db, get fields and find those fields needed
|
// if this is a setpoint db or image db, get fields and find those fields needed
|
||||||
// to define ro & group. This is hardcoded, yuk.
|
// to define ro & group. This is hardcoded, yuk.
|
||||||
if(dbtype == 1 || dbtype == 2)
|
if (dbtype == 1 || dbtype == 2)
|
||||||
{
|
{
|
||||||
ArrayList FieldList = myrodb.RODB_GetFields(nelem, (uint) RecordType.Schema);
|
ArrayList FieldList = myrodb.RODB_GetFields(nelem, (uint)RecordType.Schema);
|
||||||
string[] fldlist=null, grplist=null;
|
string[] fldlist = null, grplist = null;
|
||||||
ROField rof;
|
ROField rof;
|
||||||
string curfld;
|
string curfld;
|
||||||
StringBuilder Inuse = new StringBuilder();
|
StringBuilder Inuse = new StringBuilder();
|
||||||
// Get list of inuse fields for the rro.
|
// Get list of inuse fields for the rro.
|
||||||
if (dbtype == 1)
|
if (dbtype == 1)
|
||||||
fldlist = new string[] {"Name", "Image ID", "Image"};
|
fldlist = new string[] { "Name", "Image ID", "Image" };
|
||||||
else
|
else
|
||||||
fldlist = new string[] {"Setpoint ID", "Setpoint Value", "Associated System Component", "Applicability", "Revision", "Short Description",
|
fldlist = new string[] {"Setpoint ID", "Setpoint Value", "Associated System Component", "Applicability", "Revision", "Short Description",
|
||||||
"Description", "Key Assumptions", "Basis", "References"};
|
"Description", "Key Assumptions", "Basis", "References"};
|
||||||
for (int i=0; i< fldlist.Length; i++)
|
for (int i = 0; i < fldlist.Length; i++)
|
||||||
{
|
{
|
||||||
curfld = fldlist[i];
|
curfld = fldlist[i];
|
||||||
for (int j=0; j<FieldList.Count; j++)
|
for (int j = 0; j < FieldList.Count; j++)
|
||||||
{
|
{
|
||||||
rof = (ROField) FieldList[j];
|
rof = (ROField)FieldList[j];
|
||||||
if (rof.GetFieldname == curfld)
|
if (rof.GetFieldname == curfld)
|
||||||
{
|
{
|
||||||
if (i==fldlist.Length-1) // last one don't add ' '
|
if (i == fldlist.Length - 1) // last one don't add ' '
|
||||||
Inuse.Append(rof.GetRecID);
|
Inuse.Append(rof.GetRecID);
|
||||||
else
|
else
|
||||||
Inuse.Append(rof.GetRecID+" ");
|
Inuse.Append(rof.GetRecID + " ");
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -377,51 +375,79 @@ namespace ROEditor
|
|||||||
nelem.SetAttribute("FieldsInUse", Inuse.ToString());
|
nelem.SetAttribute("FieldsInUse", Inuse.ToString());
|
||||||
|
|
||||||
// Get list of group inuse fields.
|
// Get list of group inuse fields.
|
||||||
Inuse.Remove(0,Inuse.Length);
|
Inuse.Remove(0, Inuse.Length);
|
||||||
if (dbtype == 1)
|
if (dbtype == 1)
|
||||||
grplist = new string[] {"Group"};
|
grplist = new string[] { "Group" };
|
||||||
else
|
else
|
||||||
grplist = new string[] {"Parameter"};
|
grplist = new string[] { "Parameter" };
|
||||||
for (int i=0; i< grplist.Length; i++)
|
for (int i = 0; i < grplist.Length; i++)
|
||||||
{
|
{
|
||||||
curfld = grplist[i];
|
curfld = grplist[i];
|
||||||
for (int j=0; j<FieldList.Count; j++)
|
for (int j = 0; j < FieldList.Count; j++)
|
||||||
{
|
{
|
||||||
rof = (ROField) FieldList[j];
|
rof = (ROField)FieldList[j];
|
||||||
if (rof.GetFieldname == curfld)
|
if (rof.GetFieldname == curfld)
|
||||||
{
|
{
|
||||||
if (i == grplist.Length-1) // last, don't add ' '
|
if (i == grplist.Length - 1) // last, don't add ' '
|
||||||
Inuse.Append(rof.GetRecID);
|
Inuse.Append(rof.GetRecID);
|
||||||
else
|
else
|
||||||
Inuse.Append(rof.GetRecID+" ");
|
Inuse.Append(rof.GetRecID + " ");
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
nelem.SetAttribute("GroupFieldsInUse", Inuse.ToString());
|
nelem.SetAttribute("GroupFieldsInUse", Inuse.ToString());
|
||||||
|
string defaultPfix = "UD";
|
||||||
if (dbtype == 2) // Setpoint
|
if (dbtype == 2) // Setpoint
|
||||||
{
|
{
|
||||||
nelem.SetAttribute("RetVal","<Setpoint__Value>");
|
nelem.SetAttribute("RetVal", "<Setpoint__Value>");
|
||||||
nelem.SetAttribute("MenuItem","<Setpoint__Value,5,17> <Short__Description>");
|
nelem.SetAttribute("MenuItem", "<Setpoint__Value,5,17> <Short__Description>");
|
||||||
nelem.SetAttribute("GroupMenuItem","<Parameter>");
|
nelem.SetAttribute("GroupMenuItem", "<Parameter>");
|
||||||
nelem.SetAttribute("AccPageIDPrefix","SP2");
|
defaultPfix = "SP";
|
||||||
nelem.SetAttribute("AccPageID","<Setpoint__ID>");
|
nelem.SetAttribute("AccPageIDPrefix", "SP2");
|
||||||
|
nelem.SetAttribute("AccPageID", "<Setpoint__ID>");
|
||||||
}
|
}
|
||||||
else if (dbtype == 1) // image
|
else if (dbtype == 1) // image
|
||||||
{
|
{
|
||||||
nelem.SetAttribute("RetVal","<Image>");
|
nelem.SetAttribute("RetVal", "<Image>");
|
||||||
nelem.SetAttribute("MenuItem","<Name>");
|
nelem.SetAttribute("MenuItem", "<Name>");
|
||||||
nelem.SetAttribute("GroupMenuItem","<Group>");
|
nelem.SetAttribute("GroupMenuItem", "<Group>");
|
||||||
nelem.SetAttribute("AccPageIDPrefix","IG2");
|
defaultPfix = "IG";
|
||||||
nelem.SetAttribute("AccPageID","<Image__ID>");
|
nelem.SetAttribute("AccPageIDPrefix", "IG2");
|
||||||
|
nelem.SetAttribute("AccPageID", "<Image__ID>");
|
||||||
|
}
|
||||||
|
|
||||||
|
//B2026-091 RO Editor - Change Default Prefix to take existing prefixes into account for Setpoint/Graphics DBs
|
||||||
|
//if duplicate prefix - then change it so it will be unique
|
||||||
|
int x = 2;
|
||||||
|
while (nelem.HasAttribute("AccPageIDPrefix") && myrodb.IsDuplicateAccPagePrefix(nelem, nelem.GetAttribute("AccPageIDPrefix")))
|
||||||
|
{
|
||||||
|
nelem.SetAttribute("AccPageIDPrefix", $"{defaultPfix}{x}");
|
||||||
|
x++;
|
||||||
}
|
}
|
||||||
success = myrodb.RODB_WriteRO(nelem);
|
success = myrodb.RODB_WriteRO(nelem);
|
||||||
if (success == false) return;
|
if (success == false) return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// now let the user specify the group name, etc to define the group.
|
// now let the user specify the group name, etc to define the group.
|
||||||
GroupDefFrm grdef = new GroupDefFrm(nelem,myrodb,nelem.InnerText,dbtype);
|
DialogResult dlgrslt = DialogResult.OK;
|
||||||
grdef.ShowDialog();
|
using (GroupDefFrm grdef = new GroupDefFrm(nelem, myrodb, nelem.InnerText, dbtype, true))
|
||||||
|
{
|
||||||
|
dlgrslt = grdef.ShowDialog();
|
||||||
|
}
|
||||||
|
|
||||||
|
//If New Group and prefix would not be unique, remove the group
|
||||||
|
//needed because groups get autoadded with defaults
|
||||||
|
//before user has a chance to enter things like Acc Page Prefix
|
||||||
|
if (dlgrslt == DialogResult.Cancel)
|
||||||
|
{
|
||||||
|
XmlNode pn = nelem.ParentNode;
|
||||||
|
XmlNode nd = (XmlNode)nelem;
|
||||||
|
myrodb.RODB_DeleteGroup(nd, null, null);
|
||||||
|
pn.RemoveChild(nelem);
|
||||||
|
DialogResult = DialogResult.Cancel;
|
||||||
|
Close();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
private void txtBox_KeyDown(object sender, KeyEventArgs e)
|
private void txtBox_KeyDown(object sender, KeyEventArgs e)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -2117,6 +2117,8 @@ namespace RODBInterface
|
|||||||
|
|
||||||
if (retele != null && tbl != ro.GetAttribute("Table") && retele.GetAttribute("AccPageIDPrefix").ToLower() == pfix.ToLower())
|
if (retele != null && tbl != ro.GetAttribute("Table") && retele.GetAttribute("AccPageIDPrefix").ToLower() == pfix.ToLower())
|
||||||
{
|
{
|
||||||
|
DBE.CommandDispose();
|
||||||
|
DBE.ReaderClose();
|
||||||
return true; //another table contains the prefix - return true
|
return true; //another table contains the prefix - return true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1220,6 +1220,11 @@ namespace ctlXMLEditLib
|
|||||||
mytextbox.Enter += new System.EventHandler(this.txtBox_Enter);
|
mytextbox.Enter += new System.EventHandler(this.txtBox_Enter);
|
||||||
mytextbox.Leave += new System.EventHandler(this.txtBox_Leave);
|
mytextbox.Leave += new System.EventHandler(this.txtBox_Leave);
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
//B2026-085 Disable Symbols when leave a TextBox
|
||||||
|
mytextbox.Leave += txtBox_Leave_DisableSymbols;
|
||||||
|
}
|
||||||
|
|
||||||
string labelAnnot;
|
string labelAnnot;
|
||||||
bool imgchld = false;
|
bool imgchld = false;
|
||||||
@@ -1311,8 +1316,13 @@ namespace ctlXMLEditLib
|
|||||||
tb.Text = dfTxt;
|
tb.Text = dfTxt;
|
||||||
tb.ForeColor = SystemColors.GrayText;
|
tb.ForeColor = SystemColors.GrayText;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
txtBox_Leave_DisableSymbols(sender, e);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//B2026-085 Disable Symbols when leave a TextBox
|
||||||
|
private void txtBox_Leave_DisableSymbols(object sender, EventArgs e) => OnEnableDisableSymbolsBtn(new ctlXMLEditEventArgs(DisplaySymBolBtn:false));
|
||||||
|
|
||||||
// C2021-026 Event handler for Parent/Child child textbox
|
// C2021-026 Event handler for Parent/Child child textbox
|
||||||
// If the textbox is set to gray, then we are using the parent value
|
// If the textbox is set to gray, then we are using the parent value
|
||||||
// so clear the textbox so that user can enter the value for that child
|
// so clear the textbox so that user can enter the value for that child
|
||||||
|
|||||||
@@ -1499,7 +1499,7 @@ namespace VEPROMS
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (tc.MyEditItem != null && displayRO.MyROFST != null && tc.MyEditItem.MyItemInfo.MyDocVersion.DocVersionAssociations[0].ROFstID != displayRO.MyROFST.ROFstID)
|
else if (displayRO.MyROFST != null && tc?.MyEditItem?.MyItemInfo?.MyDocVersion?.DocVersionAssociations != null && tc.MyEditItem.MyItemInfo.MyDocVersion.DocVersionAssociations.Count > 0 && tc.MyEditItem.MyItemInfo.MyDocVersion.DocVersionAssociations[0].ROFstID != displayRO.MyROFST.ROFstID)
|
||||||
{
|
{
|
||||||
SelectedROFst = tc.MyEditItem.MyItemInfo.MyDocVersion.DocVersionAssociations[0].MyROFst;
|
SelectedROFst = tc.MyEditItem.MyItemInfo.MyDocVersion.DocVersionAssociations[0].MyROFst;
|
||||||
}
|
}
|
||||||
@@ -2426,6 +2426,7 @@ namespace VEPROMS
|
|||||||
// when Word procedure tabs are restored.
|
// when Word procedure tabs are restored.
|
||||||
// C2026-053 leaving this flag in her for now should we decide to trouble-shoot reopening of Word tabs later on.
|
// C2026-053 leaving this flag in her for now should we decide to trouble-shoot reopening of Word tabs later on.
|
||||||
tc.LoadingSavedProcTabs = true; // we check for this flag in DSOTabPanel.cs when opening Word sections
|
tc.LoadingSavedProcTabs = true; // we check for this flag in DSOTabPanel.cs when opening Word sections
|
||||||
|
EditItem LastEditItem = null; //to hold last edit item. Needed in case last tab is a Word Section
|
||||||
foreach (DataRow TabState in DisPlayTabState.Rows)
|
foreach (DataRow TabState in DisPlayTabState.Rows)
|
||||||
{
|
{
|
||||||
int _ItemID = (int)TabState["ItemID"];
|
int _ItemID = (int)TabState["ItemID"];
|
||||||
@@ -2439,17 +2440,28 @@ namespace VEPROMS
|
|||||||
// SelectedStepTabPanel needs to be set so the print buttons on the ribbon will work.
|
// SelectedStepTabPanel needs to be set so the print buttons on the ribbon will work.
|
||||||
SelectedStepTabPanel = tc.MyEditItem.MyStepPanel.MyStepTabPanel;
|
SelectedStepTabPanel = tc.MyEditItem.MyStepPanel.MyStepTabPanel;
|
||||||
|
|
||||||
|
LastEditItem = tc.MyEditItem; //set last tab index
|
||||||
|
if ((DisPlayTabState.Rows.IndexOf(TabState) == DisPlayTabState.Rows.Count - 1))
|
||||||
|
{
|
||||||
|
SelectedStepTabPanel.Select();
|
||||||
|
}
|
||||||
|
}
|
||||||
//CSM B2024-090 - if last displaytab item,
|
//CSM B2024-090 - if last displaytab item,
|
||||||
//select the steptab panel for it
|
//select the steptab panel for it
|
||||||
//and set the EditItem for Find/Replace
|
//and set the EditItem for Find/Replace
|
||||||
//otherwise will cause PROMS to crash if Find clicked before a Tab is given Focus
|
//otherwise will cause PROMS to crash if Find clicked before a Tab is given Focus
|
||||||
if ((DisPlayTabState.Rows.IndexOf(TabState) == DisPlayTabState.Rows.Count - 1))
|
if (LastEditItem != null)
|
||||||
{
|
{
|
||||||
SelectedStepTabPanel.Select();
|
dlgFindReplace.MyEditItem = LastEditItem;
|
||||||
dlgFindReplace.MyEditItem = tc.MyEditItem;
|
SpellChecker.MyEditItem = LastEditItem; //B2025-043 Remember Tabs is not setting the EditItem for the active window causing a PROMS crash when Spell Check
|
||||||
SpellChecker.MyEditItem = tc.MyEditItem; //B2025-043 Remember Tabs is not setting the EditItem for the active window causing a PROMS crash when Spell Check
|
|
||||||
}
|
//B2026-090 Populate Step Properties Panel when PROMS restores saved display tabs
|
||||||
|
LastEditItem.MyStepPanel.BringToFront();
|
||||||
|
LastEditItem.MyStepPanel.Select();
|
||||||
|
Application.DoEvents();
|
||||||
|
tc_ItemSelectedChanged(this, new ItemSelectedChangedEventArgs(tc.MyEditItem));
|
||||||
}
|
}
|
||||||
|
|
||||||
tc.LoadingSavedProcTabs = false;
|
tc.LoadingSavedProcTabs = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2153,6 +2153,27 @@ namespace VEPROMS.CSLA.Library
|
|||||||
return GetNext();
|
return GetNext();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//B2026-088 Refresh Issue with Refreshing Step Numbers After an inserted Step
|
||||||
|
public void ResetOrdinalandPrevious(ItemInfo prevItm)
|
||||||
|
{
|
||||||
|
MyPrevious = prevItm;
|
||||||
|
_Ordinal = null;
|
||||||
|
_TagsSetup = false;
|
||||||
|
ConvertListToDictionary();
|
||||||
|
if (_CacheByPrimaryKey.ContainsKey(ItemID.ToString()))
|
||||||
|
{
|
||||||
|
ItemInfo[] items = _CacheByPrimaryKey[ItemID.ToString()].ToArray();
|
||||||
|
foreach (ItemInfo item in items)
|
||||||
|
{
|
||||||
|
item.MyPrevious = prevItm;
|
||||||
|
item._Ordinal = null;
|
||||||
|
item._TagsSetup = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
OnOrdinalChange(ItemID); // After _Ordinal reset trigger event
|
||||||
|
}
|
||||||
|
|
||||||
private static void ResetOrdinal(int itemID)
|
private static void ResetOrdinal(int itemID)
|
||||||
{
|
{
|
||||||
ConvertListToDictionary();
|
ConvertListToDictionary();
|
||||||
|
|||||||
@@ -3192,7 +3192,7 @@ namespace Volian.Controls.Library
|
|||||||
{
|
{
|
||||||
int itemID = int.Parse(nd.Attributes.GetNamedItem("id").InnerText);
|
int itemID = int.Parse(nd.Attributes.GetNamedItem("id").InnerText);
|
||||||
ItemInfo ii = ItemInfo.Get(itemID);
|
ItemInfo ii = ItemInfo.Get(itemID);
|
||||||
if (ii.SearchAnnotationText == null && ii.ItemAnnotations != null) ii.SearchAnnotationText = AnnotationInfo.Get(ii.ItemAnnotations[0].AnnotationID).SearchText;
|
if (ii.SearchAnnotationText == null && ii.ItemAnnotations != null && ii.ItemAnnotations.Count > 0) ii.SearchAnnotationText = AnnotationInfo.Get(ii.ItemAnnotations[0].AnnotationID).SearchText;
|
||||||
SearchResults.AddItemInfo(ii);
|
SearchResults.AddItemInfo(ii);
|
||||||
}
|
}
|
||||||
lbSrchResults.DataSource = SearchResults;
|
lbSrchResults.DataSource = SearchResults;
|
||||||
@@ -3214,7 +3214,7 @@ namespace Volian.Controls.Library
|
|||||||
int itemID = int.Parse(nd.Attributes.GetNamedItem("id").InnerText);
|
int itemID = int.Parse(nd.Attributes.GetNamedItem("id").InnerText);
|
||||||
ItemInfo ii = ItemInfo.Get(itemID);
|
ItemInfo ii = ItemInfo.Get(itemID);
|
||||||
// B2020-107: The following was needed to set the Step Path result type for annotations
|
// B2020-107: The following was needed to set the Step Path result type for annotations
|
||||||
if (ii.SearchAnnotationText == null && ii.ItemAnnotations != null)
|
if (ii.SearchAnnotationText == null && ii.ItemAnnotations != null && ii.ItemAnnotations.Count > 0)
|
||||||
{
|
{
|
||||||
ii.SearchAnnotationText = AnnotationInfo.Get(ii.ItemAnnotations[0].AnnotationID).SearchText;
|
ii.SearchAnnotationText = AnnotationInfo.Get(ii.ItemAnnotations[0].AnnotationID).SearchText;
|
||||||
ii.SearchAnnotationID = ii.ItemAnnotations[0].AnnotationID;
|
ii.SearchAnnotationID = ii.ItemAnnotations[0].AnnotationID;
|
||||||
@@ -3245,7 +3245,7 @@ namespace Volian.Controls.Library
|
|||||||
{
|
{
|
||||||
int itemID = int.Parse(nd.Attributes.GetNamedItem("id").InnerText);
|
int itemID = int.Parse(nd.Attributes.GetNamedItem("id").InnerText);
|
||||||
ItemInfo ii = ItemInfo.Get(itemID);
|
ItemInfo ii = ItemInfo.Get(itemID);
|
||||||
if (ii.SearchAnnotationText == null && ii.ItemAnnotations != null) ii.SearchAnnotationText = AnnotationInfo.Get(ii.ItemAnnotations[0].AnnotationID).SearchText;
|
if (ii.SearchAnnotationText == null && ii.ItemAnnotations != null && ii.ItemAnnotations.Count > 0) ii.SearchAnnotationText = AnnotationInfo.Get(ii.ItemAnnotations[0].AnnotationID).SearchText;
|
||||||
SearchResults.AddItemInfo(ii);
|
SearchResults.AddItemInfo(ii);
|
||||||
}
|
}
|
||||||
lbSrchResultsIncTrans.DataSource = SearchResults;
|
lbSrchResultsIncTrans.DataSource = SearchResults;
|
||||||
|
|||||||
@@ -1259,6 +1259,19 @@ namespace Volian.Controls.Library
|
|||||||
default: // Need debug
|
default: // Need debug
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//B2026-088 Refresh Issue with Refreshing Step Numbers After an inserted Step
|
||||||
|
EditItem tmp = this;
|
||||||
|
while (tmp.MyNextEditItem != null)
|
||||||
|
{
|
||||||
|
ItemInfo prevIInfo = tmp.MyItemInfo;
|
||||||
|
tmp = tmp.MyNextEditItem;
|
||||||
|
tmp.MyItemInfo.ResetOrdinalandPrevious(prevIInfo);
|
||||||
|
tmp.RefreshOrdinal();
|
||||||
|
}
|
||||||
|
|
||||||
|
Application.DoEvents();
|
||||||
|
|
||||||
if (updateStatus)
|
if (updateStatus)
|
||||||
MyStepPanel.SelectedEditItem = newEditItem;//Update Screen
|
MyStepPanel.SelectedEditItem = newEditItem;//Update Screen
|
||||||
}
|
}
|
||||||
@@ -3663,6 +3676,8 @@ namespace Volian.Controls.Library
|
|||||||
TabLeft = 20;
|
TabLeft = 20;
|
||||||
if (!itemInfo.IsStep) // C2025-036 reduce un-needed processing - this will prevent duplicat calls that generate step tabs when loading a procedure
|
if (!itemInfo.IsStep) // C2025-036 reduce un-needed processing - this will prevent duplicat calls that generate step tabs when loading a procedure
|
||||||
SetupHeader(itemInfo);
|
SetupHeader(itemInfo);
|
||||||
|
//B2026-093 move the setting of MyStepPanel to fix null reference error when the Alarm Point Table is first setup for the editor view
|
||||||
|
MyStepPanel = myStepPanel;
|
||||||
SetupAlarmTableView(itemInfo); // C2021-018 display alarm point table information in the step editor (if the format flag is set)
|
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.Paint += new PaintEventHandler(EditItem_Paint);
|
this.Paint += new PaintEventHandler(EditItem_Paint);
|
||||||
@@ -3707,7 +3722,6 @@ namespace Volian.Controls.Library
|
|||||||
if (myStepPanel.MyFont != null) ContentFont = TabFont = myStepPanel.MyFont;
|
if (myStepPanel.MyFont != null) ContentFont = TabFont = myStepPanel.MyFont;
|
||||||
}
|
}
|
||||||
if (expand) ShowExpanded();
|
if (expand) ShowExpanded();
|
||||||
MyStepPanel = myStepPanel;
|
|
||||||
if (itemInfo != null && !myStepPanel._LookupEditItems.ContainsKey(itemInfo.ItemID)) myStepPanel._LookupEditItems.Add(itemInfo.ItemID, this);
|
if (itemInfo != null && !myStepPanel._LookupEditItems.ContainsKey(itemInfo.ItemID)) myStepPanel._LookupEditItems.Add(itemInfo.ItemID, this);
|
||||||
_MyChildRelation = myChildRelation;
|
_MyChildRelation = myChildRelation;
|
||||||
if (myParentEditItem != null) RNOLevel = myParentEditItem.RNOLevel;
|
if (myParentEditItem != null) RNOLevel = myParentEditItem.RNOLevel;
|
||||||
|
|||||||
@@ -3512,9 +3512,23 @@ namespace Volian.Controls.Library
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case "InsRNO":
|
case "InsRNO":
|
||||||
displayMenu = ((actable & E_AccStep.AddingRNO) > 0) && btnCMInsRNO.Enabled;
|
//B2026-086 Have Shortcut Keys for adding a RNO auto-work instead of having to press a button after shortcut key
|
||||||
|
displayMenu = false;
|
||||||
LetUserKnowIfTheyCannotAdd(actable, E_AccStep.AddingRNO,"RNO"); // B2018-014 Inform user that they cannot add the specified step type
|
LetUserKnowIfTheyCannotAdd(actable, E_AccStep.AddingRNO,"RNO"); // B2018-014 Inform user that they cannot add the specified step type
|
||||||
|
|
||||||
|
if (((actable & E_AccStep.AddingRNO) > 0) && btnCMInsRNO.Enabled)
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
btnCMInsRNO.SubItems["cmbtnRNOType"].RaiseClick();
|
||||||
|
}
|
||||||
|
catch
|
||||||
|
{
|
||||||
_ContextMenuBar.SetContextMenuEx(_MyStepRTB, btnCMInsRNO);
|
_ContextMenuBar.SetContextMenuEx(_MyStepRTB, btnCMInsRNO);
|
||||||
|
displayMenu = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
break;
|
break;
|
||||||
case "InsSubStps":
|
case "InsSubStps":
|
||||||
displayMenu = ((actable & E_AccStep.AddingSub) > 0) && btnCMInsSubStps.Enabled;
|
displayMenu = ((actable & E_AccStep.AddingSub) > 0) && btnCMInsSubStps.Enabled;
|
||||||
|
|||||||
Reference in new issue
Block a user