Compare commits

...

63 Commits

Author SHA1 Message Date
4ffd994c5e Merge pull request 'Development' (#450) from Development into master
Merging all development items into master after successful testing.
2024-10-31 09:11:59 -04:00
11904e177b Merge pull request 'B2024-077 When searching Referenced Objects Reports, pick the RO and select a procedure set and the selection panel refreshes and you lose your selection. If the set has to be selected first then it should be at the top of the report panel.' (#449) from B2024-077 into Development
good for testing phase
2024-10-29 16:13:51 -04:00
527e6b5053 B2024-077 When searching Referenced Objects Reports, pick the RO and select a procedure set and the selection panel refreshes and you lose your selection. If the set has to be selected first then it should be at the top of the report panel.
Also fixed a small ancillary typo that I found while finding this.
2024-10-29 15:46:12 -04:00
053ebca267 Merge pull request 'C2024-033 RO Editor – Clarify wording presented to user when utilizing new Move RO feature in RO Editor.' (#447) from C2024-033 into Development
ready for testing phase
2024-10-29 09:54:06 -04:00
5e7fae9d47 Merge pull request 'F2024-082 - Added Dump, Modulate, Observe, Return, Proceed, Direct to the replace words list in all of the Farley formats' (#448) from F2024-082 into Development
format only change
2024-10-29 09:41:02 -04:00
0e4ce99612 F2024-082 - Added Dump, Modulate, Observe, Return, Proceed, Direct to the replace words list in all of the Farley formats 2024-10-29 09:40:00 -04:00
3c75637752 C2024-033 RO Editor – Clarify wording presented to user when utilizing new Move RO feature in RO Editor. 2024-10-29 07:54:50 -04:00
fb890ded1f Merge pull request 'C2024-031 Option to Disable reopen closed tabs on PROMS reentry' (#445) from C2024-031 into Development
good for testing phase
2024-10-28 14:40:05 -04:00
4399f31a83 Merge pull request 'F2024-079 - Set the flag to not uppercase the procedure and section titles in transitions in the background formats to make it consistent with the other Beaver Valley formats.' (#446) from F2024-079 into Development
format only change
2024-10-28 14:24:51 -04:00
ca4b21e593 F2024-079 - Set the flag to not uppercase the procedure and section titles in transitions in the background formats to make it consistent with the other Beaver Valley formats. 2024-10-28 13:59:14 -04:00
23a4edb610 C2024-031 Option to Disable reopen closed tabs on PROMS reentry 2024-10-28 13:28:35 -04:00
accc1c622c Merge pull request 'F2024-077 - Made the spacing between bullet tabs the step text consistent for bulleted sub-steps types and for multiple Cautions, Notes types' (#444) from F2024-077_BVtabs into Development
format only changes
2024-10-25 15:05:17 -04:00
e50ea6a5db F2024-077 - Made the spacing between bullet tabs the step text consistent for bulleted sub-steps types and for multiple Cautions, Notes types 2024-10-25 15:03:41 -04:00
04ce6f55db Merge pull request 'CSM B2024-087 Fix RO Editor Inconsistencies' (#443) from B2024-087 into Development
ready for testing phase
2024-10-25 14:39:24 -04:00
f0493e60d8 CSM B2024-087 Fix RO Editor Inconsistencies
Refresh issue in RO Definitions.  Modify an In Use field item that is not one of the Standard items, choose Continue, choose OK in the Text Definition Field. when prompted if want to Update Local or Generic definitions:

1. Prompt should contain table name (previously was not for Setpoint items)

2. If Select "Yes", Should refresh to new field name when return to previous screen / click ok to go back to RO Definition.
2024-10-25 14:33:20 -04:00
13edc9c9ff Merge pull request 'F2024-080 Add Initial Line/Ability to Disable to UI for South Texas' (#442) from F2024-080 into Development
good for testing phase.
2024-10-25 10:12:10 -04:00
fd0ea4404b F2024-080 Add Initial Line/Ability to Disable to UI for South Texas 2024-10-25 09:19:20 -04:00
df9d0f908a Merge pull request 'C2024-030 RO Editor Enhancement to include table name / explain the scope of changing a field definition Local vs Generic' (#441) from C2024-030 into Development
good for testing phase
2024-10-24 09:08:42 -04:00
779394ffd6 C2024-030 RO Editor Enhancement to include table name / explain the scope of changing a field definition Local vs Generic
When updating a field in a RO Definition, there is a prompt asking if changes should be Local or Generic --- Should change wording to explain that Local is local to that table (and include Table name in that wording)
2024-10-24 07:43:00 -04:00
a230ecef9b Merge pull request 'Just added space to a comment to force a new check-in of these Farely fomrat files' (#440) from General_Debugging into Development
no testing needed.  This is to try to resolve a Git and build issue with Farley format files on developer machines.
2024-10-23 16:42:06 -04:00
061bcfdc0f Just added space to a comment to force a new check-in of these Farely fomrat files 2024-10-23 16:37:04 -04:00
aced10498b Merge pull request 'B2024-084 Fix Refresh Issue in RO Definitions.' (#439) from B2024-084 into Development
good for testing phase
2024-10-23 16:09:42 -04:00
cd963d01e4 B2024-084 Fix Refresh Issue in RO Definitions.
Modify an In Use field item, choose Continue, choose OK in the Text Definition Field.  Hit Cancel in the next two windows, then open the RO Definition back up and the change is still there in the "In Use" column but not the Menu Value.    Close the RO Editor and re-open and the change was now gone as it's supposed to be.
2024-10-23 15:54:20 -04:00
458dd5fff4 Merge pull request 'B2024-085 Fix Object Reference Error when Getting Schema for a RO database in SQL' (#438) from B2024-085 into Development
good for testing phase
2024-10-23 14:56:21 -04:00
0c342fa188 B2024-085 Fix Object Reference Error when Getting Schema for a RO database in SQL
After converting the Robinson ROs to SQL, upon changing an In Use field and clicking Continue, an "Error on Schema" message box displayed with an unhandled error exception.
2024-10-23 14:07:20 -04:00
43b13443ab Merge pull request 'C2024-027 RO Editor – Add additional feature to allow Cut/Paste (Moving) a RO within the same table.' (#437) from CSM-C2024-027 into Development
Good for testing phase
2024-10-23 13:38:10 -04:00
c867d4e4b1 C2024-027 RO Editor – Add additional feature to allow Cut/Paste (Moving) a RO within the same table. 2024-10-23 13:20:20 -04:00
0f541142cc Merge pull request 'F2024-081- Removed the extra blank line after the Alternate High Level Step type. This was mistakenly changed during format cleanup. It is now restored to what it should be.' (#436) from F2024-081_Catawba into Development
Format only changes.
2024-10-23 12:01:19 -04:00
b0c55d09b0 F2024-081- Removed the extra blank line after the Alternate High Level Step type. This was mistakenly changed during format cleanup. It is now restored to what it should be. 2024-10-23 11:59:55 -04:00
ee71431210 Merge pull request 'F2024-076 - Added a line before the continue message in the background formats. Centered the bottom continue message for the step editor sections – all formats' (#435) from F2024-076_BV_ContinueMsg into Development
format only changes
2024-10-23 11:08:00 -04:00
a8196db676 F2024-076 - Added a line before the continue message in the background formats. Centered the bottom continue message for the step editor sections – all formats 2024-10-23 11:06:31 -04:00
8dc78d49eb Merge pull request 'Delete .gitattributes' (#434) from remove_gitattributes into Development
changes are good. This should allow us to compare format files again.
2024-10-17 09:27:10 -04:00
3999d1c49b Merge pull request 'C2020-049-Add-the-ability-for-PROMS-to-remember-open-procedure-tabs-fixed-print' (#433) from C2020-049-Add-the-ability-for-PROMS-to-remember-open-procedure-tabs-fixed-print into Development
good for testing phase
2024-10-17 09:25:22 -04:00
aceb928dba Delete .gitattributes
remove gitattributes file
2024-10-17 09:17:01 -04:00
f17db695d3 C2020-049-Add-the-ability-for-PROMS-to-remember-open-procedure-tabs-fixed-print 2024-10-16 16:23:31 -04:00
214dd8ec08 Merge pull request 'GIT_ATTRIBUTE_FILE - adjusting GIT settings so should be able to see diff of xml files in GIT (and not just Visual Studio history)' (#432) from GIT_ATTRIBUTE_FILE2 into Development
change approved - no testing needed for this.
2024-10-15 09:23:27 -04:00
2f974d7b52 Merge pull request 'C2024-029 RO Editor - Referenced Object Definition Form - Add check if items changed before prompting to possibly save' (#431) from C2024-029 into Development
good for testing phase
2024-10-15 09:22:16 -04:00
9f1dce896f GIT_ATTRIBUTE_FILE - adjusting GIT settings so should be able to see diff of xml files in GIT (and not just Visual Studio history) 2024-10-15 08:58:15 -04:00
a8294bb01a C2024-029 RO Editor - Referenced Object Definition Form - Add check if items changed before prompting to possibly save 2024-10-15 08:40:12 -04:00
28e4bdda29 Merge pull request 'B2024-079 Consistency of adding_editing_removing fields in RO Editor - Referenced Object Definition Form' (#430) from B2024-079 into Development
change are good.  Ready for testing phase.
2024-10-14 16:36:39 -04:00
7d408df904 B2024-079 Consistency of adding_editing_removing fields in RO Editor - Referenced Object Definition Form 2024-10-14 16:17:19 -04:00
caec6adf8d Merge pull request 'F2024-075 (Farley) Action verbs should be bolded no matter if title case or lower case - all formats' (#429) from F2024-075_FarlyRplWrds into Development
Format only change. OK to test.
2024-10-14 14:08:11 -04:00
a38c0dbe33 F2024-075 (Farley) Action verbs should be bolded no matter if title case or lower case - all formats 2024-10-14 14:06:17 -04:00
d779d4ad50 Merge pull request 'GIT_ATTRIBUTE_FILE - adjusting GIT settings so should be able to see diff of xml files in GIT (and not just Visual Studio' (#428) from GIT_ATRIBUTE_FILE into Development
No testing needed.  This is just a Git configuration setting for the developers.
2024-10-10 16:30:22 -04:00
9b71ce0fee GIT_ATTRIBUTE_FILE - adjusting GIT settings so should be able to see diff of xml files in GIT (and not just Visual Studio 2024-10-10 15:51:11 -04:00
8b18005b8e Merge pull request 'B2024-078 Bad Transition preventing editing of a substep. Can enter changed text, but then when move to another textbox, original text returns.' (#427) from B2024-078 into Development
changes good for testing phase.
2024-10-10 08:57:54 -04:00
a550ef1b50 B2024-078 Bad Transition preventing editing of a substep. Can enter changed text, but then when move to another textbox, original text returns. 2024-10-10 08:38:35 -04:00
63a60b32cc Merge pull request 'F2024-074 For Farley, Include the Cover Page in the total page count of the procedures' (#426) from F2024_074_FNP_CountCoverWithProcs into Development
format only change
2024-10-09 16:47:48 -04:00
ca4dc8d330 F2024-074 For Farley, Include the Cover Page in the total page count of the procedures 2024-10-09 16:45:38 -04:00
0a52aa5c53 Merge pull request 'C2024-024 Simple Selection of Fields to add to Return Values and Menu Values' (#423) from C2024-024 into Development
file changes look good - ready for testing phase.
2024-10-09 14:02:53 -04:00
591fc03ca2 C2024-024 Simple Selection of Fields to add to Return Values and Menu Values 2024-10-09 13:12:29 -04:00
ebd7b1249f Merge pull request 'C2024-023 Autocomplete on Group Definition Accessory Page Access Values.' (#422) from C2024-023 into Development
Ok for testing phase
2024-10-08 15:17:31 -04:00
1b6eeaf4ad C2024-023 Autocomplete on Group Definition Accessory Page Access Values. 2024-10-08 15:02:47 -04:00
1d3dac0e51 Merge pull request 'C2020-049-Add-the-ability-for-PROMS-to-remember-the-procedure-tabs-that-were-open-when-you-closed-PROMS-5' (#421) from C2020-049-Add-the-ability-for-PROMS-to-remember-the-procedure-tabs-that-were-open-when-you-closed-PROMS-4 into Development
good for testing phase
2024-10-08 09:29:13 -04:00
48da58b681 C2020-049-Add-the-ability-for-PROMS-to-remember-the-procedure-tabs-that-were-open-when-you-closed-PROMS-5 2024-10-08 08:54:32 -04:00
68639eadf0 Merge pull request 'C2020-049-Add-the-ability-for-PROMS-to-remember-the-procedure-tabs-that-were-open-when-you-closed-PROMS-4' (#420) from C2020-049-Add-the-ability-for-PROMS-to-remember-the-procedure-tabs-that-were-open-when-you-closed-PROMS-4 into Development
Looked Good. Ready for QA Testing.
2024-10-07 11:51:36 -04:00
dc77984c10 C2020-049-Add-the-ability-for-PROMS-to-remember-the-procedure-tabs-that-were-open-when-you-closed-PROMS-4 2024-10-07 11:40:26 -04:00
5b4e1cd694 C2020-049-Add-the-ability-for-PROMS-to-remember-the-procedure-tabs-that-were-open-when-you-closed-PROMS-4 2024-10-04 14:55:04 -04:00
3fbd974fa9 C2020-049-Add-the-ability-for-PROMS-to-remember-the-procedure-tabs-that-were-open-when-you-closed-PROMS-4 2024-10-04 14:38:59 -04:00
b457496297 Merge pull request 'B2024-076 Correct Linking / Numbering when utilizing Paste Replace with Enhanced Steps over unlinked steps' (#419) from B2024-076 into Development
ready for testing phase
2024-10-04 13:20:09 -04:00
dd83491169 B2024-076 Correct Linking / Numbering when utilizing Paste Replace with Enhanced Steps over unlinked steps 2024-10-04 12:46:23 -04:00
a73a8fb993 Merge pull request 'C2020-049-Add-the-ability-for-PROMS-to-remember-the-procedure-tabs-that-were-open-when-you-closed-PROMS-2' (#418) from C2020-049-Add-the-ability-for-PROMS-to-remember-the-procedure-tabs-that-were-open-when-you-closed-PROMS-2 into Development
Code looked good. Ready for QA Testing.
2024-10-04 09:42:55 -04:00
fb7a99653d C2020-049-Add-the-ability-for-PROMS-to-remember-the-procedure-tabs-that-were-open-when-you-closed-PROMS-2 2024-10-03 15:11:15 -04:00
56 changed files with 3961 additions and 2271 deletions

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -23,8 +23,8 @@ using System.Runtime.CompilerServices;
// Build YYMM (two digit year, two digit month) // Build YYMM (two digit year, two digit month)
// Revision DHH (day - no leading zero, two digit hour - military time // Revision DHH (day - no leading zero, two digit hour - military time
// //
[assembly: AssemblyVersion("2.3.2404.1611")] [assembly: AssemblyVersion("2.3.2410.907")]
[assembly: AssemblyFileVersion("2.3.2404.1611")] [assembly: AssemblyFileVersion("2.3.2410.907")]
// //
// In order to sign your assembly you must specify a key to use. Refer to the // In order to sign your assembly you must specify a key to use. Refer to the
@ -91,6 +91,8 @@ using System.Runtime.CompilerServices;

View File

@ -377,6 +377,7 @@ namespace ROEditor
this.btnOK.TabIndex = 3; this.btnOK.TabIndex = 3;
this.btnOK.Text = "OK"; this.btnOK.Text = "OK";
this.btnOK.Click += new System.EventHandler(this.btnOK_Click); this.btnOK.Click += new System.EventHandler(this.btnOK_Click);
this.btnOK.DialogResult = System.Windows.Forms.DialogResult.OK;
// //
// btnCancel // btnCancel
// //
@ -553,6 +554,7 @@ namespace ROEditor
// update the local/internal copy of the schema. // update the local/internal copy of the schema.
if (success != true) if (success != true)
{ {
this.DialogResult = DialogResult.Cancel;
return; // DO YET process an error. return; // DO YET process an error.
} }
else else

View File

@ -266,6 +266,7 @@ namespace ROEditor
if (success != true) if (success != true)
{ {
this.DialogResult = DialogResult.Cancel;
return; // DO YET process an error. return; // DO YET process an error.
} }
else else
@ -367,6 +368,7 @@ namespace ROEditor
// //
// btnOK // btnOK
// //
this.btnOK.DialogResult = System.Windows.Forms.DialogResult.OK;
this.btnOK.Location = new System.Drawing.Point(216, 72); this.btnOK.Location = new System.Drawing.Point(216, 72);
this.btnOK.Name = "btnOK"; this.btnOK.Name = "btnOK";
this.btnOK.Size = new System.Drawing.Size(88, 24); this.btnOK.Size = new System.Drawing.Size(88, 24);

View File

@ -220,6 +220,7 @@ namespace ROEditor
return; return;
} }
string origFieldName = myrof.GetFieldname;
myrof.SetFieldname(this.tbFieldName.Text); myrof.SetFieldname(this.tbFieldName.Text);
uint ftype=0; uint ftype=0;
if (this.rbSingleLine.Checked == true) if (this.rbSingleLine.Checked == true)
@ -247,6 +248,7 @@ namespace ROEditor
if (success != true) if (success != true)
{ {
this.DialogResult = DialogResult.Cancel;
return; // DO YET process an error. return; // DO YET process an error.
} }
return; return;
@ -270,7 +272,9 @@ namespace ROEditor
} }
myrof.SetFieldType(ftype); myrof.SetFieldType(ftype);
FieldTextFrm ftxt = new FieldTextFrm(myrof, myrodb, myelem, original_type, editlevel, origname, avlist, iulist); FieldTextFrm ftxt = new FieldTextFrm(myrof, myrodb, myelem, original_type, editlevel, origname, avlist, iulist);
ftxt.ShowDialog(); if (ftxt.ShowDialog() == DialogResult.Cancel)
myrof.SetFieldname(origFieldName);
this.Close(); this.Close();
} }
#region Windows Form Designer generated code #region Windows Form Designer generated code

View File

@ -100,6 +100,7 @@ using System.Text;
using RODBInterface; using RODBInterface;
using ROFields; using ROFields;
using VlnStatus; using VlnStatus;
using System.Linq;
namespace ROEditor namespace ROEditor
{ {
@ -245,6 +246,37 @@ namespace ROEditor
return CvtFldToUserFld(origGroup); return CvtFldToUserFld(origGroup);
} }
} }
//CSM C2024-023
//Part of 2024 PROMS Upgrades
//When the Overall Form is activated
//if there are any items that are Fields that are in use
//add them as auto-complete options to the
//Accessory Page Access - Value Textbox
//Typing < will bring up the auto-complete options
protected void tbValue_AddAutoComplete(object sender, EventArgs e)
{
string dummy = ""; // need for RODB_GetFIeldsInUse call, won't be used.
ArrayList AvailList, InUseList;
//first see if it is a valid 'InUse' Field.
AvailList = myrodb.RODB_GetFields(elem, (uint)RecordType.Schema);
InUseList = myrodb.RODB_GetFieldsInUse(elem, AvailList, "FieldsInUse", ref dummy, false);
//if any ROField items are in use,
//use LINQ to get a string array of the FieldNames
if (InUseList.Count > 0)
{
string[] InUseListFieldNames = InUseList.OfType<ROField>().Select(x => $"<{x.GetFieldname}>").ToArray();
AutoCompleteStringCollection allowedTypes = new AutoCompleteStringCollection();
allowedTypes.AddRange(InUseListFieldNames);
tbValue.AutoCompleteCustomSource = allowedTypes;
tbValue.AutoCompleteMode = AutoCompleteMode.Suggest;
tbValue.AutoCompleteSource = AutoCompleteSource.CustomSource;
}
}
private void FillInData() private void FillInData()
{ {
this.tbGroup.Text = DetermineGroupName(); this.tbGroup.Text = DetermineGroupName();
@ -401,6 +433,7 @@ namespace ROEditor
// //
// btnOK // btnOK
// //
this.btnOK.DialogResult = System.Windows.Forms.DialogResult.OK;
this.btnOK.Location = new System.Drawing.Point(24, 248); this.btnOK.Location = new System.Drawing.Point(24, 248);
this.btnOK.Name = "btnOK"; this.btnOK.Name = "btnOK";
this.btnOK.Size = new System.Drawing.Size(144, 24); this.btnOK.Size = new System.Drawing.Size(144, 24);
@ -432,6 +465,7 @@ namespace ROEditor
this.Font = new System.Drawing.Font("Tahoma", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0))); this.Font = new System.Drawing.Font("Tahoma", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0)));
this.Name = "GroupDefFrm"; this.Name = "GroupDefFrm";
this.Text = "Group Definition"; this.Text = "Group Definition";
this.Activated += new EventHandler(tbValue_AddAutoComplete);
this.groupBox1.ResumeLayout(false); this.groupBox1.ResumeLayout(false);
this.ResumeLayout(false); this.ResumeLayout(false);

View File

@ -151,7 +151,7 @@ namespace ROEditor
private string origMenuItem; private string origMenuItem;
StringBuilder parseerror; StringBuilder parseerror;
private int hi, lo; private int hi, lo;
private Label lb_chkApplc; private Label lb_chkApplc;
private int dbtype; private int dbtype;
// C2021-026 returns true is Parent/Child info was passed into the RO Editor // C2021-026 returns true is Parent/Child info was passed into the RO Editor
public bool PCApplicabilityEnabled public bool PCApplicabilityEnabled
@ -188,33 +188,33 @@ namespace ROEditor
lboxInUse.Visible = true; lboxInUse.Visible = true;
lb_chkApplc.Visible = false; lb_chkApplc.Visible = false;
} }
if (editlevel==(uint)RecordType.GroupSchema)this.Text = "Subgroup Definition"; if (editlevel == (uint)RecordType.GroupSchema) this.Text = "Subgroup Definition";
FillInData(grptxt); FillInData(grptxt);
} }
/// <summary> /// <summary>
/// Clean up any resources being used. /// Clean up any resources being used.
/// </summary> /// </summary>
protected override void Dispose( bool disposing ) protected override void Dispose(bool disposing)
{ {
if( disposing ) if (disposing)
{ {
if(components != null) if (components != null)
{ {
components.Dispose(); components.Dispose();
} }
} }
base.Dispose( disposing ); base.Dispose(disposing);
} }
private void FillInAvailable() private void FillInAvailable()
{ {
ROField rof; ROField rof;
// put the items in the AvailList box. // put the items in the AvailList box.
for (int i=0; i< AvailList.Count; i++) for (int i = 0; i < AvailList.Count; i++)
{ {
rof = (ROField) AvailList[i]; rof = (ROField)AvailList[i];
if (rof.GetFieldname != null) // DO YET: Why null? if (rof.GetFieldname != null) // DO YET: Why null?
this.lboxAvail.Items.Add(rof.GetFieldname); this.lboxAvail.Items.Add(rof.GetFieldname);
} }
@ -277,7 +277,7 @@ namespace ROEditor
_initializing = false; _initializing = false;
} }
private void DoValueTextBoxes() private void DoValueTextBoxes()
{ {
string menuitm, retval; string menuitm, retval;
@ -297,7 +297,7 @@ namespace ROEditor
else else
parent = null; parent = null;
} }
if (menuitm !="") if (menuitm != "")
this.tbMenuVal.Text = CvtFldToUserFld(menuitm); this.tbMenuVal.Text = CvtFldToUserFld(menuitm);
else else
this.tbMenuVal.Text = ""; this.tbMenuVal.Text = "";
@ -310,21 +310,21 @@ namespace ROEditor
this.lblRetVal.Visible = true; this.lblRetVal.Visible = true;
VlnXmlElement parent; VlnXmlElement parent;
parent = (VlnXmlElement) elem.ParentNode; parent = (VlnXmlElement) elem.ParentNode;
while (parent != null && (menuitm == "" || retval=="")) while (parent != null && (menuitm == "" || retval == ""))
{ {
// walk up tree to get parent and check for data there // walk up tree to get parent and check for data there
if (menuitm == "") menuitm = parent.GetAttribute("MenuItem"); if (menuitm == "") menuitm = parent.GetAttribute("MenuItem");
if (retval == "") retval = parent.GetAttribute("RetVal"); if (retval == "") retval = parent.GetAttribute("RetVal");
if (parent.Name != "RO_Root") if (parent.Name != "RO_Root")
parent = (VlnXmlElement) parent.ParentNode; parent = (VlnXmlElement)parent.ParentNode;
else else
parent = null; parent = null;
} }
if (menuitm!="") if (menuitm != "")
this.tbMenuVal.Text = CvtFldToUserFld(menuitm); this.tbMenuVal.Text = CvtFldToUserFld(menuitm);
else else
this.tbMenuVal.Text = ""; this.tbMenuVal.Text = "";
if (retval!="") if (retval != "")
this.tbRetVal.Text = CvtFldToUserFld(retval); this.tbRetVal.Text = CvtFldToUserFld(retval);
else else
this.tbRetVal.Text = ""; this.tbRetVal.Text = "";
@ -332,7 +332,7 @@ namespace ROEditor
} }
private void FillInData(string grptxt) private void FillInData(string grptxt)
{ {
this.lblGroupText.Text = grptxt; this.lblGroupText.Text = grptxt;
DoValueTextBoxes(); DoValueTextBoxes();
SetUpListBoxes(); SetUpListBoxes();
@ -344,24 +344,27 @@ namespace ROEditor
lboxAvail.GotFocus += new EventHandler(this.lboxAvail_GotFocus); lboxAvail.GotFocus += new EventHandler(this.lboxAvail_GotFocus);
lboxInUse.MouseUp += new System.Windows.Forms.MouseEventHandler(this.lboxInUse_MouseUp);
lboxInUseCB.MouseUp += new System.Windows.Forms.MouseEventHandler(this.lboxInUseCB_MouseUp);
// save copies of local data, so if there is a change, we know we must save them. // save copies of local data, so if there is a change, we know we must save them.
origRetVal=this.tbRetVal.Text; origRetVal = this.tbRetVal.Text;
origMenuItem=this.tbMenuVal.Text; origMenuItem = this.tbMenuVal.Text;
// if this is a database level definition & it's a user defined database, // if this is a database level definition & it's a user defined database,
// the okay button is disabled until a field is used. // the okay button is disabled until a field is used.
if (elem.ParentNode.Name == "RO_Root" && dbtype==3) if (elem.ParentNode.Name == "RO_Root" && dbtype == 3)
{ {
string attr; string attr;
if (editlevel==(uint)RecordType.Schema) if (editlevel == (uint)RecordType.Schema)
attr = elem.GetAttribute("FieldsInUse"); attr = elem.GetAttribute("FieldsInUse");
else else
attr = elem.GetAttribute("GroupFieldsInUse"); attr = elem.GetAttribute("GroupFieldsInUse");
if (attr==null || attr=="") btnOK.Enabled=false; if (attr == null || attr == "") btnOK.Enabled = false;
} }
} }
protected void lboxInUse_GotFocus (object sender, EventArgs e) protected void lboxInUse_GotFocus(object sender, EventArgs e)
{ {
lboxAvail.ClearSelected(); lboxAvail.ClearSelected();
this.btnRemove.Enabled = true; this.btnRemove.Enabled = true;
@ -375,7 +378,7 @@ namespace ROEditor
this.btnAdd.Enabled = false; this.btnAdd.Enabled = false;
this.btnEdit.Enabled = true; this.btnEdit.Enabled = true;
} }
protected void lboxAvail_GotFocus (object sender, EventArgs e) protected void lboxAvail_GotFocus(object sender, EventArgs e)
{ {
if (PCApplicabilityEnabled) if (PCApplicabilityEnabled)
lboxInUseCB.ClearSelected(); lboxInUseCB.ClearSelected();
@ -385,6 +388,103 @@ namespace ROEditor
this.btnRemove.Enabled = false; this.btnRemove.Enabled = false;
this.btnEdit.Enabled = true; this.btnEdit.Enabled = true;
} }
//CSM C2024-024
//Simple Selection of Fields to add to Return Values and Menu Values.
//Part of 2024 PROMS Upgrades
//Add Context Menu for In Use Listbox
//Will allow user to right click Selected Items
//and add then to the Return Value / Menu Value Text Boxes
//without re-typing them
protected void lboxInUse_MouseUp(object sender, MouseEventArgs e)
{
if (e.Button == MouseButtons.Right && lboxInUse.SelectedItems.Count > 0)
{
ContextMenuStrip cn = new ContextMenuStrip();
if (tbRetVal.Visible)
{
var AddToReturnItem = new ToolStripMenuItem("Add to Return Value");
AddToReturnItem.Click += new EventHandler(lboxInUse_Click);
AddToReturnItem.Name = "Add to Return Value";
cn.Items.Add(AddToReturnItem);
}
var AddToMenuItem = new ToolStripMenuItem("Add to Menu Value");
AddToMenuItem.Click += new EventHandler(lboxInUse_Click);
AddToMenuItem.Name = "Add to Menu Value";
cn.Items.Add(AddToMenuItem);
this.lboxInUse.ContextMenuStrip = cn;
cn.Show(Control.MousePosition.X, Control.MousePosition.Y);
}
}
private void lboxInUse_Click(object sender, EventArgs e)
{
switch (((ToolStripMenuItem)sender).Name)
{
case "Add to Return Value":
if (tbRetVal.Text == "")
tbRetVal.Text += $"<{lboxInUse.SelectedItem}>";
else
tbRetVal.Text += $" - <{lboxInUse.SelectedItem}>";
break;
case "Add to Menu Value":
if (tbMenuVal.Text == "")
tbMenuVal.Text += $"<{lboxInUse.SelectedItem}>";
else
tbMenuVal.Text += $" - <{lboxInUse.SelectedItem}>";
break;
}
}
//CSM C2024-024
//Simple Selection of Fields to add to Return Values and Menu Values.
//Part of 2024 PROMS Upgrades
//Add Context Menu for In Use ComboBox
//(Replaces In Use Listbox when Applicability
//to allow for selection of items per Unit)
//Will allow user to right click Selected Items
//and add then to the Return Value / Menu Value Text Boxes
//without re-typing them
protected void lboxInUseCB_MouseUp(object sender, MouseEventArgs e)
{
if (e.Button == MouseButtons.Right && lboxInUseCB.SelectedItems.Count > 0)
{
ContextMenuStrip cn = new ContextMenuStrip();
if (tbRetVal.Visible)
{
var AddToReturnItem = new ToolStripMenuItem("Add to Return Value");
AddToReturnItem.Click += new EventHandler(lboxInUseCB_Click);
AddToReturnItem.Name = "Add to Return Value";
cn.Items.Add(AddToReturnItem);
}
var AddToMenuItem = new ToolStripMenuItem("Add to Menu Value");
AddToMenuItem.Click += new EventHandler(lboxInUseCB_Click);
AddToMenuItem.Name = "Add to Menu Value";
cn.Items.Add(AddToMenuItem);
this.lboxInUseCB.ContextMenuStrip = cn;
cn.Show(Control.MousePosition.X, Control.MousePosition.Y);
}
}
private void lboxInUseCB_Click(object sender, EventArgs e)
{
switch (((ToolStripMenuItem)sender).Name)
{
case "Add to Return Value":
if (tbRetVal.Text == "")
tbRetVal.Text += $"<{lboxInUseCB.SelectedItem}>";
else
tbRetVal.Text += $" - <{lboxInUseCB.SelectedItem}>";
break;
case "Add to Menu Value":
if (tbMenuVal.Text == "")
tbMenuVal.Text += $"<{lboxInUseCB.SelectedItem}>";
else
tbMenuVal.Text += $" - <{lboxInUseCB.SelectedItem}>";
break;
}
}
private void btnRemove_Click(object sender, System.EventArgs e) private void btnRemove_Click(object sender, System.EventArgs e)
{ {
//get item in lboxInUse (in use list) and remove it from there //get item in lboxInUse (in use list) and remove it from there
@ -404,7 +504,7 @@ namespace ROEditor
ROField copyrof = new ROField(rof.GetFieldname, rof.GetRecID, rof.GetMasterRecID, rof.GetFieldType); ROField copyrof = new ROField(rof.GetFieldname, rof.GetRecID, rof.GetMasterRecID, rof.GetFieldType);
AvailList.Add(copyrof); AvailList.Add(copyrof);
lboxAvail.Items.Add(copyrof.GetFieldname); lboxAvail.Items.Add(CvtFldToUserFld(copyrof.GetFieldname));
InUseList.RemoveAt(indx); InUseList.RemoveAt(indx);
if (InUseApplcList.Contains(rof)) // C2021-026 remove from the field applicability list if (InUseApplcList.Contains(rof)) // C2021-026 remove from the field applicability list
InUseApplcList.Remove(rof); InUseApplcList.Remove(rof);
@ -427,7 +527,7 @@ namespace ROEditor
ROField copyrof = new ROField(rof.GetFieldname, rof.GetRecID, rof.GetMasterRecID, rof.GetFieldType); ROField copyrof = new ROField(rof.GetFieldname, rof.GetRecID, rof.GetMasterRecID, rof.GetFieldType);
AvailList.Add(copyrof); AvailList.Add(copyrof);
lboxAvail.Items.Add(copyrof.GetFieldname); lboxAvail.Items.Add(CvtFldToUserFld(copyrof.GetFieldname));
InUseList.RemoveAt(indx); InUseList.RemoveAt(indx);
if (InUseApplcList.Contains(rof)) // C2021-026 remove from the field applicability list if (InUseApplcList.Contains(rof)) // C2021-026 remove from the field applicability list
InUseApplcList.Remove(rof); InUseApplcList.Remove(rof);
@ -455,7 +555,7 @@ namespace ROEditor
ROField copyrof = new ROField(rof.GetFieldname, rof.GetRecID, rof.GetMasterRecID, rof.GetFieldType); ROField copyrof = new ROField(rof.GetFieldname, rof.GetRecID, rof.GetMasterRecID, rof.GetFieldType);
InUseList.Add(copyrof); InUseList.Add(copyrof);
lboxInUseCB.Items.Add(copyrof.GetFieldname); lboxInUseCB.Items.Add(CvtFldToUserFld(copyrof.GetFieldname));
AvailList.RemoveAt(indx); AvailList.RemoveAt(indx);
lboxAvail.Refresh(); lboxAvail.Refresh();
lboxInUseCB.Refresh(); lboxInUseCB.Refresh();
@ -477,7 +577,7 @@ namespace ROEditor
ROField copyrof = new ROField(rof.GetFieldname, rof.GetRecID, rof.GetMasterRecID, rof.GetFieldType); ROField copyrof = new ROField(rof.GetFieldname, rof.GetRecID, rof.GetMasterRecID, rof.GetFieldType);
InUseList.Add(copyrof); InUseList.Add(copyrof);
lboxInUse.Items.Add(copyrof.GetFieldname); lboxInUse.Items.Add(CvtFldToUserFld(copyrof.GetFieldname));
AvailList.RemoveAt(indx); AvailList.RemoveAt(indx);
lboxAvail.Refresh(); lboxAvail.Refresh();
lboxInUse.Refresh(); lboxInUse.Refresh();
@ -640,7 +740,7 @@ namespace ROEditor
{ {
ROField rof = (ROField) InUseList[i]; ROField rof = (ROField) InUseList[i];
rofname = rof.GetFieldname; rofname = rof.GetFieldname;
if (inusename == rofname) if (inusename == rofname || inusename == CvtFldToUserFld(rofname))
{ {
found = true; found = true;
break; break;
@ -745,7 +845,7 @@ namespace ROEditor
{ {
ROField rof = (ROField) InUseList[i]; ROField rof = (ROField) InUseList[i];
rofname = rof.GetFieldname; rofname = rof.GetFieldname;
if (inusename == rofname) if (inusename == rofname || inusename == CvtFldToUserFld(rofname))
{ {
found = true; found = true;
break; break;
@ -1096,7 +1196,8 @@ namespace ROEditor
return; return;
} }
} }
string origname = CvtFldToUserFld(rof.GetFieldname);
uint ftype = rof.GetFieldType; uint ftype = rof.GetFieldType;
if (ftype == (uint)FieldTypes.FrmtSingleTxt || ftype == (uint)FieldTypes.VariableTxt || if (ftype == (uint)FieldTypes.FrmtSingleTxt || ftype == (uint)FieldTypes.VariableTxt ||
ftype == (uint)FieldTypes.SingleTxt || ftype == (uint)FieldTypes.Table || ftype == (uint)FieldTypes.SingleTxt || ftype == (uint)FieldTypes.Table ||
@ -1112,6 +1213,10 @@ namespace ROEditor
nwcomb.ShowDialog(); nwcomb.ShowDialog();
} }
//need to refresh pull from table for fields in use.
_ = myrodb.RODB_GetFields(elem, 0, true);
string newname = CvtFldToUserFld(rof.GetFieldname);
// Update Lists & Text boxes to represent any modified text. // Update Lists & Text boxes to represent any modified text.
if (isInSelList) if (isInSelList)
{ {
@ -1125,20 +1230,28 @@ namespace ROEditor
rof = (ROField) InUseList[i]; rof = (ROField) InUseList[i];
if (rof.GetFieldname != null) if (rof.GetFieldname != null)
{ {
string fieldname = CvtFldToUserFld(rof.GetFieldname);
// C2021-026 if doing Parent/Child enabled RO Editor, put the In Use fields in the Check Box List instead of the normal list // C2021-026 if doing Parent/Child enabled RO Editor, put the In Use fields in the Check Box List instead of the normal list
if (PCApplicabilityEnabled) if (PCApplicabilityEnabled)
{ {
this.lboxInUseCB.Items.Add(rof.GetFieldname); this.lboxInUseCB.Items.Add(fieldname);
if (rof.FieldTypeCanDoApplicability()) if (rof.FieldTypeCanDoApplicability())
{ {
if (ContainedInUseApplicList(rof)) if (ContainedInUseApplicList(rof))
this.lboxInUseCB.SetItemCheckState(lboxInUseCB.Items.IndexOf(rof.GetFieldname), CheckState.Checked); this.lboxInUseCB.SetItemCheckState(lboxInUseCB.Items.IndexOf(fieldname), CheckState.Checked);
} }
} }
else else
this.lboxInUse.Items.Add(rof.GetFieldname); this.lboxInUse.Items.Add(fieldname);
} }
} }
if (origname != newname)
{
tbMenuVal.Text = tbMenuVal.Text.Replace($"<{origname}>", $"<{newname}>");
tbRetVal.Text = tbRetVal.Text.Replace($"<{origname}>", $"<{newname}>");
}
} }
else else
{ {
@ -1148,7 +1261,7 @@ namespace ROEditor
{ {
rof = (ROField) AvailList[i]; rof = (ROField) AvailList[i];
if (rof.GetFieldname != null) if (rof.GetFieldname != null)
this.lboxAvail.Items.Add(rof.GetFieldname); this.lboxAvail.Items.Add(CvtFldToUserFld(rof.GetFieldname));
} }
} }
} }
@ -1162,8 +1275,11 @@ namespace ROEditor
if (rof.GetFieldname != null) if (rof.GetFieldname != null)
{ {
AvailList.Add(rof); AvailList.Add(rof);
lboxAvail.Items.Add(rof.GetFieldname); lboxAvail.Items.Add(CvtFldToUserFld(rof.GetFieldname));
} }
//need to refresh pull from table for fields in use.
_ = myrodb.RODB_GetFields(elem, 0, true);
} }
// C2021-026 Check/un-check field for Parent/Child values // C2021-026 Check/un-check field for Parent/Child values
private void lboxInUseCB_ItemCheck(object sender, ItemCheckEventArgs e) private void lboxInUseCB_ItemCheck(object sender, ItemCheckEventArgs e)
@ -1397,6 +1513,7 @@ namespace ROEditor
this.btnCancel.Size = new System.Drawing.Size(80, 24); this.btnCancel.Size = new System.Drawing.Size(80, 24);
this.btnCancel.TabIndex = 10; this.btnCancel.TabIndex = 10;
this.btnCancel.Text = "Cancel"; this.btnCancel.Text = "Cancel";
// //
// RODefFrm // RODefFrm
// //
@ -1419,6 +1536,71 @@ namespace ROEditor
this.PerformLayout(); this.PerformLayout();
} }
//if User clicked save (DialogResult.OK) close the form
//if use did not click save, ask if they are sure they want to close the form
//only close if they say "Yes, they want to"
protected override void OnFormClosing(FormClosingEventArgs e)
{
if (this.DialogResult != System.Windows.Forms.DialogResult.OK && IsPendingChange() && !CloseCancel())
{
e.Cancel = true;
}
}
public static bool CloseCancel()
{
const string message = "Are you sure that you would like to cancel? Information may not be saved.";
const string caption = "Cancel";
var result = MessageBox.Show(message, caption,
MessageBoxButtons.YesNo,
MessageBoxIcon.Question);
return result == DialogResult.Yes;
}
//return true if a field has been modified
private bool IsPendingChange()
{
if (origRetVal != this.tbRetVal.Text)
return true;
if (origMenuItem != this.tbMenuVal.Text)
return true;
// check if in use records have changed
string inuserecs = null;
ROField rof;
for (int i = 0; i < InUseList.Count; i++)
{
rof = (ROField)InUseList[i];
if (rof.GetFieldname != null) //DO YET: why null?
{
inuserecs = inuserecs + rof.GetRecID;
if (i + 1 < InUseList.Count) inuserecs = inuserecs + " ";
}
}
if (inuserecs != origFieldsInUse)
return true;
//check if applicability fields have changed
string applicfieldrecs = null;
for (int i = 0; i < InUseApplcList.Count; i++)
{
rof = (ROField)InUseApplcList[i];
if (rof.GetFieldname != null)
{
applicfieldrecs = applicfieldrecs + rof.GetRecID;
if (i + 1 < InUseApplcList.Count) applicfieldrecs = applicfieldrecs + " ";
}
}
if (applicfieldrecs != origApplicFields)
return true;
//nothing has changed
return false;
}
#endregion #endregion
} }
} }

File diff suppressed because it is too large Load Diff

View File

@ -125,7 +125,7 @@
AAEAAAD/////AQAAAAAAAAAMAgAAAFdTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj00LjAuMC4w AAEAAAD/////AQAAAAAAAAAMAgAAAFdTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj00LjAuMC4w
LCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAACZTeXN0 LCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAACZTeXN0
ZW0uV2luZG93cy5Gb3Jtcy5JbWFnZUxpc3RTdHJlYW1lcgEAAAAERGF0YQcCAgAAAAkDAAAADwMAAACE ZW0uV2luZG93cy5Gb3Jtcy5JbWFnZUxpc3RTdHJlYW1lcgEAAAAERGF0YQcCAgAAAAkDAAAADwMAAACE
CAAAAk1TRnQBSQFMAgEBAgEAARwBAAEcAQABEAEAARABAAT/AQkBAAj/AUIBTQE2AQQGAAE2AQQCAAEo CAAAAk1TRnQBSQFMAgEBAgEAASwBAAEsAQABEAEAARABAAT/AQkBAAj/AUIBTQE2AQQGAAE2AQQCAAEo
AwABQAMAARADAAEBAQABCAYAAQQYAAGAAgABgAMAAoABAAGAAwABgAEAAYABAAKAAgADwAEAAcAB3AHA AwABQAMAARADAAEBAQABCAYAAQQYAAGAAgABgAMAAoABAAGAAwABgAEAAYABAAKAAgADwAEAAcAB3AHA
AQAB8AHKAaYBAAEzBQABMwEAATMBAAEzAQACMwIAAxYBAAMcAQADIgEAAykBAANVAQADTQEAA0IBAAM5 AQAB8AHKAaYBAAEzBQABMwEAATMBAAEzAQACMwIAAxYBAAMcAQADIgEAAykBAANVAQADTQEAA0IBAAM5
AQABgAF8Af8BAAJQAf8BAAGTAQAB1gEAAf8B7AHMAQABxgHWAe8BAAHWAucBAAGQAakBrQIAAf8BMwMA AQABgAF8Af8BAAJQAf8BAAGTAQAB1gEAAf8B7AHMAQABxgHWAe8BAAHWAucBAAGQAakBrQIAAf8BMwMA
@ -175,7 +175,7 @@
AAEAAAD/////AQAAAAAAAAAMAgAAAFdTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj00LjAuMC4w AAEAAAD/////AQAAAAAAAAAMAgAAAFdTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj00LjAuMC4w
LCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAACZTeXN0 LCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAACZTeXN0
ZW0uV2luZG93cy5Gb3Jtcy5JbWFnZUxpc3RTdHJlYW1lcgEAAAAERGF0YQcCAgAAAAkDAAAADwMAAAAe ZW0uV2luZG93cy5Gb3Jtcy5JbWFnZUxpc3RTdHJlYW1lcgEAAAAERGF0YQcCAgAAAAkDAAAADwMAAAAe
CwAAAk1TRnQBSQFMAgEBBgEAARwBAAEcAQABEAEAARABAAT/AQkBAAj/AUIBTQE2AQQGAAE2AQQCAAEo CwAAAk1TRnQBSQFMAgEBBgEAASwBAAEsAQABEAEAARABAAT/AQkBAAj/AUIBTQE2AQQGAAE2AQQCAAEo
AwABQAMAASADAAEBAQABCAYAAQgYAAGAAgABgAMAAoABAAGAAwABgAEAAYABAAKAAgADwAEAAcAB3AHA AwABQAMAASADAAEBAQABCAYAAQgYAAGAAgABgAMAAoABAAGAAwABgAEAAYABAAKAAgADwAEAAcAB3AHA
AQAB8AHKAaYBAAEzBQABMwEAATMBAAEzAQACMwIAAxYBAAMcAQADIgEAAykBAANVAQADTQEAA0IBAAM5 AQAB8AHKAaYBAAEzBQABMwEAATMBAAEzAQACMwIAAxYBAAMcAQADIgEAAykBAANVAQADTQEAA0IBAAM5
AQABgAF8Af8BAAJQAf8BAAGTAQAB1gEAAf8B7AHMAQABxgHWAe8BAAHWAucBAAGQAakBrQIAAf8BMwMA AQABgAF8Af8BAAJQAf8BAAGTAQAB1gEAAf8B7AHMAQABxgHWAe8BAAHWAucBAAGQAakBrQIAAf8BMwMA

View File

@ -336,10 +336,10 @@ namespace RODBInterface
public abstract bool RODB_GetChildData(VlnXmlElement node, bool CheckChildCount); public abstract bool RODB_GetChildData(VlnXmlElement node, bool CheckChildCount);
public abstract bool IsDuplicateAccPageID(VlnXmlElement ro, string newacc); public abstract bool IsDuplicateAccPageID(VlnXmlElement ro, string newacc);
public abstract VlnXmlElement RODB_ReadRO(string tbl, string recid); public abstract VlnXmlElement RODB_ReadRO(string tbl, string recid);
public abstract bool RODB_WriteRO(VlnXmlElement ro); public abstract bool RODB_WriteRO(VlnXmlElement ro, bool movedRO = false);
public abstract bool RODB_InsertRO(VlnXmlElement ro); public abstract bool RODB_InsertRO(VlnXmlElement ro);
public abstract ushort RODB_GetFieldType(VlnXmlElement elem, string TableName, string Fld); public abstract ushort RODB_GetFieldType(VlnXmlElement elem, string TableName, string Fld);
public abstract ArrayList RODB_GetFields(VlnXmlElement elem, uint rtype); public abstract ArrayList RODB_GetFields(VlnXmlElement elem, uint rtype, bool refresh = false);
public abstract string RODB_GetSchemaPiece(string Recid, string table); public abstract string RODB_GetSchemaPiece(string Recid, string table);
public abstract bool RODB_NewSchemaPiece(string recid, string parentid, string table, string schpiece, uint rtype); public abstract bool RODB_NewSchemaPiece(string recid, string parentid, string table, string schpiece, uint rtype);
public abstract bool RODB_WriteSchemaPiece(string Recid, string table, string schpiece); public abstract bool RODB_WriteSchemaPiece(string Recid, string table, string schpiece);
@ -2120,7 +2120,7 @@ namespace RODBInterface
return retele; return retele;
} }
public override bool RODB_WriteRO(VlnXmlElement ro) public override bool RODB_WriteRO(VlnXmlElement ro, bool movedRO = false)
{ {
bool success; bool success;
if (ro.Name == "vlnGroup") if (ro.Name == "vlnGroup")
@ -2140,6 +2140,13 @@ namespace RODBInterface
string dt = string.Format("{0:yyyyMMddHHmmss}", System.DateTime.Now); string dt = string.Format("{0:yyyyMMddHHmmss}", System.DateTime.Now);
string xmlstr = GenerateXmlString(ro, false); string xmlstr = GenerateXmlString(ro, false);
string strUpdate = "UPDATE " + ro.GetAttribute("Table") + " SET Info = '" + xmlstr + "'"; string strUpdate = "UPDATE " + ro.GetAttribute("Table") + " SET Info = '" + xmlstr + "'";
if (movedRO)
{
VlnXmlElement parent = (VlnXmlElement)ro.ParentNode;
ro.SetAttribute("ParentID", parent.GetAttribute("RecID"));
strUpdate += ", ParentID = '" + ro.GetAttribute("ParentID") + "'";
}
strUpdate = strUpdate + ", ModDateTime = '" + dt + "', AccPageID = '" + wraccid + "' WHERE RecID='" + ro.GetAttribute("RecID") + "'"; strUpdate = strUpdate + ", ModDateTime = '" + dt + "', AccPageID = '" + wraccid + "' WHERE RecID='" + ro.GetAttribute("RecID") + "'";
try try
{ {
@ -2192,6 +2199,8 @@ namespace RODBInterface
ro.SetAttribute("HasChild", "False"); ro.SetAttribute("HasChild", "False");
if (ro.HasAttribute("AccPageID")) if (ro.HasAttribute("AccPageID"))
{ {
// Code is never reached, but this was noticed - this next line should likely be:
// strInsert = "INSERT INTO " + parent.GetAttribute("Table") + "( RecID, RecType, ParentID, AccPageID, ModDateTime, Info ) ";
strInsert = "INSERT INTO " + parent.GetAttribute("Table") + "( RecID, RecType, ParentID, ModDateTime, AccPageID, Info ) "; strInsert = "INSERT INTO " + parent.GetAttribute("Table") + "( RecID, RecType, ParentID, ModDateTime, AccPageID, Info ) ";
strInsert = strInsert + " VALUES ('" + ro.GetAttribute("RecID") + "'," + (uint)RecordType.Group + ",'" + ro.GetAttribute("ParentID"); strInsert = strInsert + " VALUES ('" + ro.GetAttribute("RecID") + "'," + (uint)RecordType.Group + ",'" + ro.GetAttribute("ParentID");
strInsert = strInsert + "','" + wraccid + "','" + dt + "','" + xmlstr + "');"; strInsert = strInsert + "','" + wraccid + "','" + dt + "','" + xmlstr + "');";
@ -2294,11 +2303,16 @@ namespace RODBInterface
} }
// For the given element's table, get all of the RO fields defined in this table. // For the given element's table, get all of the RO fields defined in this table.
public override ArrayList RODB_GetFields(VlnXmlElement elem, uint rtype) public override ArrayList RODB_GetFields(VlnXmlElement elem, uint rtype, bool refresh = false)
{ {
string table = elem.GetAttribute("Table"); string table = elem.GetAttribute("Table");
if (!FieldDefinitions.ContainsKey(table)) if (!FieldDefinitions.ContainsKey(table))
FieldDefinitions.Add(table, RODB_GetFieldsFromDB(elem)); FieldDefinitions.Add(table, RODB_GetFieldsFromDB(elem));
else if (refresh)
{
FieldDefinitions.Remove(table);
FieldDefinitions.Add(table, RODB_GetFieldsFromDB(elem));
}
return FieldDefinitions[table]; return FieldDefinitions[table];
} }
private Dictionary<string, ArrayList> _FieldDefinitions = null; private Dictionary<string, ArrayList> _FieldDefinitions = null;
@ -2391,7 +2405,7 @@ namespace RODBInterface
Info = null; Info = null;
DBE.ReaderClose(); DBE.ReaderClose();
DBE.CommandDispose(); DBE.CommandDispose();
return Info.Replace("&apos;", "\'"); return Info?.Replace("&apos;", "\'");
} }
public override bool RODB_NewSchemaPiece(string recid, string parentid, string table, string schpiece, uint rtype) public override bool RODB_NewSchemaPiece(string recid, string parentid, string table, string schpiece, uint rtype)
@ -2666,8 +2680,8 @@ namespace RODBInterface
// Generic definition, i.e. all Groups, and No updates only Local definition, i.e. just this Group Added a // Generic definition, i.e. all Groups, and No updates only Local definition, i.e. just this Group Added a
// Cancel button to Cancel from this dialog and return to previous dialog. Added more information to the // Cancel button to Cancel from this dialog and return to previous dialog. Added more information to the
// dialog to inform user of this // dialog to inform user of this
string dmsg = "Update Generic definition?\r\n\r\n Yes - updates Generic definitions, \r\n No - updates Local definitions, \r\n Cancel - returns to previous dialog." + string dmsg = $"Update Generic definition?\r\n\r\n Yes - updates Generic definitions, \r\n No - updates Local definitions, \r\n Cancel - returns to previous dialog." +
"\r\n\r\n 'Generic' updates definition in ALL groups that use the name\r\n 'Local' updates definition only in the selected group."; $"\r\n\r\n 'Generic' updates definition in ALL groups that use the name\r\n 'Local' updates definition only in the selected group, and will change the definition for all items in that table ({GetTopParentName(myelem)}).";
System.Windows.Forms.DialogResult result = MessageBox.Show(dmsg, "Referenced Object Definition", MessageBoxButtons.YesNoCancel, MessageBoxIcon.Question); System.Windows.Forms.DialogResult result = MessageBox.Show(dmsg, "Referenced Object Definition", MessageBoxButtons.YesNoCancel, MessageBoxIcon.Question);
if (result == DialogResult.Cancel) return false; if (result == DialogResult.Cancel) return false;
if (result == DialogResult.No) changegeneric = false; if (result == DialogResult.No) changegeneric = false;
@ -2772,6 +2786,19 @@ namespace RODBInterface
return success; return success;
} }
//CSM-C2024-030
//Explain that Local is local to that table (and include Table name in wording displayed to user)
public string GetTopParentName(VlnXmlElement elem)
{
VlnXmlElement nodetocheck = elem;
while (nodetocheck.GetAttribute("ParentID") != "00000000" && nodetocheck.ParentNode != null)
{
nodetocheck = (VlnXmlElement) nodetocheck.ParentNode;
}
return nodetocheck.FirstChild.InnerText;
}
public override XmlSchema RODB_GetGroupSchema(VlnXmlElement elem) public override XmlSchema RODB_GetGroupSchema(VlnXmlElement elem)
{ {
XmlSchema myschema; XmlSchema myschema;

View File

@ -1557,7 +1557,7 @@ namespace RODBInterface
} }
return retele; return retele;
} }
public override bool RODB_WriteRO(VlnXmlElement ro) public override bool RODB_WriteRO(VlnXmlElement ro, bool movedRO = false)
{ {
bool success; bool success;
if (ro.Name == "vlnGroup") if (ro.Name == "vlnGroup")
@ -1589,6 +1589,13 @@ namespace RODBInterface
command.Parameters.AddWithValue("@ModDateTime", dt); command.Parameters.AddWithValue("@ModDateTime", dt);
command.Parameters.AddWithValue("@AccPageID", wraccid); // B2020-003: set accpageid to correct value command.Parameters.AddWithValue("@AccPageID", wraccid); // B2020-003: set accpageid to correct value
command.Parameters.AddWithValue("@RecID", ro.GetAttribute("RecID")); command.Parameters.AddWithValue("@RecID", ro.GetAttribute("RecID"));
if (movedRO)
{
VlnXmlElement parent = (VlnXmlElement)ro.ParentNode;
ro.SetAttribute("ParentID", parent.GetAttribute("RecID"));
command.Parameters.AddWithValue("@ParentID", ro.GetAttribute("ParentID"));
}
using (SqlDataReader reader = command.ExecuteReader()) using (SqlDataReader reader = command.ExecuteReader())
{ {
success = true; success = true;
@ -1744,13 +1751,18 @@ namespace RODBInterface
return ftype; return ftype;
} }
// For the given element's table, get all of the RO fields defined in this table. // For the given element's table, get all of the RO fields defined in this table.
public override ArrayList RODB_GetFields(VlnXmlElement elem, uint rtype) public override ArrayList RODB_GetFields(VlnXmlElement elem, uint rtype, bool refresh = false)
{ {
string table = elem.GetAttribute("Table"); string table = elem.GetAttribute("Table");
if (!FieldDefinitions.ContainsKey(table)) if (!FieldDefinitions.ContainsKey(table))
{ {
FieldDefinitions.Add(table, RODB_GetFieldsFromDB(elem)); FieldDefinitions.Add(table, RODB_GetFieldsFromDB(elem));
} }
else if (refresh)
{
FieldDefinitions.Remove(table);
FieldDefinitions.Add(table, RODB_GetFieldsFromDB(elem));
}
return FieldDefinitions[table]; return FieldDefinitions[table];
} }
private Dictionary<string, ArrayList> _FieldDefinitions = null; private Dictionary<string, ArrayList> _FieldDefinitions = null;
@ -1909,7 +1921,7 @@ namespace RODBInterface
command.Parameters.AddWithValue("@RecID", Recid); command.Parameters.AddWithValue("@RecID", Recid);
using (SqlDataReader reader = command.ExecuteReader()) using (SqlDataReader reader = command.ExecuteReader())
{ {
if (DBE.Read()) if (reader.Read())
Info = reader.GetString(0); Info = reader.GetString(0);
else else
Info = null; Info = null;

View File

@ -85,7 +85,7 @@ namespace VlnStatus
this.lblStatMsg.Name = "lblStatMsg"; this.lblStatMsg.Name = "lblStatMsg";
this.lblStatMsg.Size = new System.Drawing.Size(420, 81); this.lblStatMsg.Size = new System.Drawing.Size(420, 81);
this.lblStatMsg.TabIndex = 0; this.lblStatMsg.TabIndex = 0;
this.lblStatMsg.Text = "Put Satus Message Here"; this.lblStatMsg.Text = "Put Status Message Here";
this.lblStatMsg.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; this.lblStatMsg.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
// //
// StatusMessageFrm // StatusMessageFrm

View File

@ -23798,7 +23798,7 @@ BEGIN TRY -- Try Block
--then remove the link from the copy --then remove the link from the copy
--if original item was not linked, update new items to not be linked --if original item was not linked, update new items to not be linked
DECLARE @xconfig XML = (Select cast(config as xml) xconfig from Contents where ContentID = @ContentID); DECLARE @xconfig XML = (Select cast(config as xml) xconfig from Contents where ContentID = @ContentID);
IF @xconfig.exist('//Enhanced[1]') = 0 IF ISNULL(@xconfig.exist('//Enhanced[1]'),0) = 0
BEGIN BEGIN
UPDATE Contents SET Config = dbo.vefn_RemoveEnhanced(Contents.Config) UPDATE Contents SET Config = dbo.vefn_RemoveEnhanced(Contents.Config)
Where ContentID in (Select ContentID FROM vefn_ChildItems(@NewItemID)) Where ContentID in (Select ContentID FROM vefn_ChildItems(@NewItemID))
@ -23904,12 +23904,201 @@ GO
IF (@@Error = 0) PRINT 'Procedure Creation: [PasteItemReplace] Succeeded' IF (@@Error = 0) PRINT 'Procedure Creation: [PasteItemReplace] Succeeded'
ELSE PRINT 'Procedure Creation: [PasteItemReplace] Error on Creation' ELSE PRINT 'Procedure Creation: [PasteItemReplace] Error on Creation'
GO GO
-- SP: AddDisplayTabState
SET QUOTED_IDENTIFIER ON
GO
IF EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[AddDisplayTabState]') AND OBJECTPROPERTY(id,N'IsProcedure') = 1)
DROP PROCEDURE [AddDisplayTabState];
GO
-- =============================================
-- Author: Paul Larsen
-- Create date: 9/18/2024
-- Description: Save current open tab state in PROMS editor.
-- =============================================
CREATE PROCEDURE [dbo].[AddDisplayTabState]
(
@ItemID int,
@DisplayTabID varchar(30),
@DisplayTabName varchar(100),
@userID varchar(100),
@order int
)
AS
BEGIN
-- SET NOCOUNT ON added to prevent extra result sets from
-- interfering with SELECT statements.
SET NOCOUNT ON;
-- Remove all records
-- DELETE FROM [dbo].[DisplayTabTmp];
-- Record current tab information
INSERT INTO [dbo].[DisplayTabTmp] (itemid,DisplayTabID,DisplayTabName,userid,active, taborder)
VALUES (@ItemID,@DisplayTabID,@DisplayTabName,@userID, 1, @order)
END
GO
-- SP: GetDisplayTabdata
IF EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[GetDisplayTabdata]') AND OBJECTPROPERTY(id,N'IsProcedure') = 1)
DROP PROCEDURE [GetDisplayTabdata];
GO
/****** Object: StoredProcedure [dbo].[GetDisplayTabdata] Script Date: 10/3/2024 11:29:44 AM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
-- =============================================
-- Author: Paul Larsen
-- Create date: 09/18/2024
-- Description: retrieve PROMS edit tab saved state.
-- =============================================
CREATE PROCEDURE [dbo].[GetDisplayTabdata]
(
@UserID varchar(100)
)
AS
BEGIN
-- SET NOCOUNT ON added to prevent extra result sets from
-- interfering with SELECT statements.
SET NOCOUNT ON;
SELECT [ItemID]
,[DisplayTabID]
,[DisplayTabName]
,[UpdateDate]
,[UserID]
,[taborder]
FROM [dbo].[DisplayTabTmp]
WHERE UserID = @UserID AND Active = 1
order by taborder
END
GO
-- SP: DeactivateStateDisplayTabTmp
IF EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[DeactivateStateDisplayTabTmp]') AND OBJECTPROPERTY(id,N'IsProcedure') = 1)
DROP PROCEDURE [DeactivateStateDisplayTabTmp];
GO
/****** Object: StoredProcedure [dbo].[DeactivateStateDisplayTabTmp] Script Date: 10/3/2024 11:30:53 AM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
-- =============================================
-- Author: Paul Larsen
-- Create date: 10/1/2024
-- Description: Set PROMES Edit window tabs state inactive.
-- =============================================
CREATE procedure [dbo].[DeactivateStateDisplayTabTmp]
(
@UserID varchar(100)
)
AS
UPDATE [dbo].[DisplayTabTmp]
SET Active = 0
WHERE UserID = @UserID
GO
-- Table: DisplayTabTmp
-- If DisplayTabTmp table already exists then don't drop and recreate it
IF Not Exists(SELECT * FROM sys.objects Where name = 'DisplayTabTmp' AND type in (N'U'))
Begin
SET ANSI_NULLS ON
SET QUOTED_IDENTIFIER ON
-- =============================================
-- Author: Paul Larsen
-- Create date: 9/30/2024
-- Description: Table to hold tab state in PROMS editor.
-- =============================================
/****** Object: Table [dbo].[DisplayTabTmp] Script Date: 10/3/2024 11:22:00 AM ******/
CREATE TABLE [dbo].[DisplayTabTmp](
[ID] [int] IDENTITY(1,1) NOT NULL,
[ItemID] [int] NOT NULL,
[DisplayTabID] [nvarchar](100) NOT NULL,
[DisplayTabName] [nchar](100) NOT NULL,
[UpdateDate] [datetime] NOT NULL,
[UserID] [nchar](100) NOT NULL,
[Active] [bit] NOT NULL,
[taborder] [int] NOT NULL
) ON [PRIMARY]
ALTER TABLE [dbo].[DisplayTabTmp] ADD CONSTRAINT [DF_DisplayTabTmp_UpdateDate] DEFAULT (getdate()) FOR [UpdateDate]
ALTER TABLE [dbo].[DisplayTabTmp] ADD CONSTRAINT [DF_DisplayTabTmp_Active] DEFAULT ((1)) FOR [Active]
ALTER TABLE [dbo].[DisplayTabTmp] ADD DEFAULT ((0)) FOR [taborder]
End
GO
/* /*
========================================================================================================== ==========================================================================================================
End: C2017-031: SQL to allow copy/replace enhanced step End: C2017-031: SQL to allow copy/replace enhanced step
========================================================================================================== ==========================================================================================================
*/ */
---The following RememberOpenTabs/AlwaysOpenTabs columns were added for Remeber Open Tabs.
--- RememberOpenTabs = Do not prompt User when PROMS opens
--- AutoOpenTabs = OpenTabs when PROMS opens - Default to On
IF NOT EXISTS(SELECT *
FROM INFORMATION_SCHEMA.COLUMNS
WHERE TABLE_NAME = 'Users'
AND COLUMN_NAME = 'RememberOpenTabs')
ALTER TABLE Users ADD RememberOpenTabs bit NOT NULL DEFAULT(0);
go
-- Display the status
IF (@@Error = 0) PRINT 'Altered table [Users] Succeeded for RememberOpenTabs'
ELSE PRINT 'Altered table [Users] Error on Alter for RememberOpenTabs'
go
IF NOT EXISTS(SELECT *
FROM INFORMATION_SCHEMA.COLUMNS
WHERE TABLE_NAME = 'Users'
AND COLUMN_NAME = 'AutoOpenTabs')
ALTER TABLE Users ADD AutoOpenTabs bit NOT NULL DEFAULT(1);
go
-- Display the status
IF (@@Error = 0) PRINT 'Altered table [Users] Succeeded for AutoOpenTabs'
ELSE PRINT 'Altered table [Users] Error on Alter for AutoOpenTabs'
go
/****** Object: StoredProcedure [dbo].[vesp_UpdateUserSettings] Script Date: 10/24/2024 11:29:44 AM ******/
IF EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[vesp_UpdateUserSettings]') AND OBJECTPROPERTY(id,N'IsProcedure') = 1)
DROP PROCEDURE [vesp_UpdateUserSettings];
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
-- =============================================
-- Author: Matthew Schill
-- Create date: 10/24/2024
-- Description: Update User Settings
-- =============================================
CREATE PROCEDURE [dbo].[vesp_UpdateUserSettings]
(
@UID varchar(100),
@Remember bit = null,
@AutoOpen bit = null
)
WITH EXECUTE AS OWNER
AS
UPDATE Users SET
RememberOpenTabs = ISNULL(@Remember,RememberOpenTabs),
AutoOpenTabs = ISNULL(@AutoOpen,AutoOpenTabs)
WHERE UserID =@UID
RETURN
GO
IF (@@Error = 0) PRINT 'Running vesp_UpdateUserSettings Succeeded'
ELSE PRINT 'Running vesp_UpdateUserSettings Failed to Execute'
GO
/* /*
--------------------------------------------------------------------------- ---------------------------------------------------------------------------
| ADD New Code Before this Block | | ADD New Code Before this Block |
@ -23943,8 +24132,8 @@ BEGIN TRY -- Try Block
DECLARE @RevDate varchar(255) DECLARE @RevDate varchar(255)
DECLARE @RevDescription varchar(255) DECLARE @RevDescription varchar(255)
set @RevDate = '09/26/2024 11:24' set @RevDate = '10/28/2024 11:24'
set @RevDescription = 'SQL to allow copy/replace enhanced step.' set @RevDescription = 'Add the ability for PROMS to remember the procedure tabs that were open when you closed PROMS'
Select cast(@RevDate as datetime) RevDate, @RevDescription RevDescription Select cast(@RevDate as datetime) RevDate, @RevDescription RevDescription
PRINT 'SQL Code Revision ' + @RevDate + ' - ' + @RevDescription PRINT 'SQL Code Revision ' + @RevDate + ' - ' + @RevDescription

View File

@ -674,7 +674,8 @@ CREATE PROCEDURE [dbo].[updateInfoAccidByRecid]
@RecID char(8), @RecID char(8),
@AccPageID char(32), @AccPageID char(32),
@Info nvarchar(max), @Info nvarchar(max),
@ModDateTime char(14) @ModDateTime char(14),
@ParentID varchar(8) = NULL
) )
WITH EXECUTE AS OWNER WITH EXECUTE AS OWNER
AS AS
@ -684,7 +685,8 @@ BEGIN TRY -- Try Block
SET SET
[Info]=@Info, [Info]=@Info,
[ModDateTime]=@ModDateTime, [ModDateTime]=@ModDateTime,
[AccPageID]=@AccPageID [AccPageID]=@AccPageID,
[ParentID]=ISNULL(@ParentID, ParentID)
WHERE [ROTable]=@ROTable AND [RecID]=@RecID WHERE [ROTable]=@ROTable AND [RecID]=@RecID
IF @@ROWCOUNT = 0 IF @@ROWCOUNT = 0
BEGIN BEGIN

View File

@ -163,6 +163,12 @@
<Compile Include="dlgCheckedOutProcedure.designer.cs"> <Compile Include="dlgCheckedOutProcedure.designer.cs">
<DependentUpon>dlgCheckedOutProcedure.cs</DependentUpon> <DependentUpon>dlgCheckedOutProcedure.cs</DependentUpon>
</Compile> </Compile>
<Compile Include="dlgCheckOpenTabs.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="dlgCheckOpenTabs.Designer.cs">
<DependentUpon>dlgCheckOpenTabs.cs</DependentUpon>
</Compile>
<Compile Include="DlgCloseTabsOrExit.cs"> <Compile Include="DlgCloseTabsOrExit.cs">
<SubType>Form</SubType> <SubType>Form</SubType>
</Compile> </Compile>
@ -324,6 +330,9 @@
<SubType>Designer</SubType> <SubType>Designer</SubType>
<DependentUpon>AboutVEPROMS.cs</DependentUpon> <DependentUpon>AboutVEPROMS.cs</DependentUpon>
</EmbeddedResource> </EmbeddedResource>
<EmbeddedResource Include="dlgCheckOpenTabs.resx">
<DependentUpon>dlgCheckOpenTabs.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="DlgCloseTabsOrExit.resx"> <EmbeddedResource Include="DlgCloseTabsOrExit.resx">
<DependentUpon>DlgCloseTabsOrExit.cs</DependentUpon> <DependentUpon>DlgCloseTabsOrExit.cs</DependentUpon>
</EmbeddedResource> </EmbeddedResource>
@ -626,4 +635,4 @@
<PropertyGroup> <PropertyGroup>
<PreBuildEvent>cmd /c "$(ProjectDir)FixRev.bat"</PreBuildEvent> <PreBuildEvent>cmd /c "$(ProjectDir)FixRev.bat"</PreBuildEvent>
</PropertyGroup> </PropertyGroup>
</Project> </Project>

View File

@ -0,0 +1,116 @@

namespace VEPROMS
{
partial class dlgCheckOpenTabs
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.labelX1 = new DevComponents.DotNetBar.LabelX();
this.cbRemember = new DevComponents.DotNetBar.Controls.CheckBoxX();
this.btnOpenTabs = new DevComponents.DotNetBar.ButtonX();
this.btnNoTabs = new DevComponents.DotNetBar.ButtonX();
this.SuspendLayout();
//
// labelX1
//
//
//
//
this.labelX1.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square;
this.labelX1.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.labelX1.Location = new System.Drawing.Point(23, 2);
this.labelX1.Name = "labelX1";
this.labelX1.Size = new System.Drawing.Size(363, 78);
this.labelX1.TabIndex = 0;
this.labelX1.Text = "Would you like for PROMS to reopen the tabs that you had open during your last se" +
"ssion?";
this.labelX1.WordWrap = true;
//
// cbRemember
//
//
//
//
this.cbRemember.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square;
this.cbRemember.Location = new System.Drawing.Point(23, 75);
this.cbRemember.Name = "cbRemember";
this.cbRemember.Size = new System.Drawing.Size(376, 47);
this.cbRemember.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
this.cbRemember.TabIndex = 1;
this.cbRemember.Text = "Check this box to not be prompted in the future when opening PROMS. \nNote that th" +
"ese settings can be adjusted at any time from the \nOPTIONS menu for PROMS.";
//
// btnOpenTabs
//
this.btnOpenTabs.AccessibleRole = System.Windows.Forms.AccessibleRole.PushButton;
this.btnOpenTabs.ColorTable = DevComponents.DotNetBar.eButtonColor.OrangeWithBackground;
this.btnOpenTabs.DialogResult = System.Windows.Forms.DialogResult.Yes;
this.btnOpenTabs.Location = new System.Drawing.Point(23, 139);
this.btnOpenTabs.Name = "btnOpenTabs";
this.btnOpenTabs.Size = new System.Drawing.Size(150, 42);
this.btnOpenTabs.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
this.btnOpenTabs.TabIndex = 2;
this.btnOpenTabs.Text = "Yes, Open Tabs from Last Session";
this.btnOpenTabs.Click += new System.EventHandler(this.btnTabs_Click);
//
// btnNoTabs
//
this.btnNoTabs.AccessibleRole = System.Windows.Forms.AccessibleRole.PushButton;
this.btnNoTabs.ColorTable = DevComponents.DotNetBar.eButtonColor.OrangeWithBackground;
this.btnNoTabs.DialogResult = System.Windows.Forms.DialogResult.No;
this.btnNoTabs.Location = new System.Drawing.Point(216, 139);
this.btnNoTabs.Name = "btnNoTabs";
this.btnNoTabs.Size = new System.Drawing.Size(150, 42);
this.btnNoTabs.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
this.btnNoTabs.TabIndex = 3;
this.btnNoTabs.Text = "No, Do Not Open Tabs from Previous Session";
this.btnNoTabs.Click += new System.EventHandler(this.btnTabs_Click);
//
// dlgCheckOpenTabs
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(411, 193);
this.ControlBox = false;
this.Controls.Add(this.btnNoTabs);
this.Controls.Add(this.btnOpenTabs);
this.Controls.Add(this.cbRemember);
this.Controls.Add(this.labelX1);
this.Name = "dlgCheckOpenTabs";
this.Text = "Open Tabs from Previous Session";
this.ResumeLayout(false);
}
#endregion
private DevComponents.DotNetBar.LabelX labelX1;
private DevComponents.DotNetBar.Controls.CheckBoxX cbRemember;
private DevComponents.DotNetBar.ButtonX btnOpenTabs;
private DevComponents.DotNetBar.ButtonX btnNoTabs;
}
}

View File

@ -0,0 +1,28 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace VEPROMS
{
public partial class dlgCheckOpenTabs : Form
{
public dlgCheckOpenTabs()
{
InitializeComponent();
}
public bool Remember { get; set; } = false;
private void btnTabs_Click(object sender, EventArgs e)
{
Remember = this.cbRemember.Checked;
this.Close();
}
}
}

View File

@ -0,0 +1,120 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>

File diff suppressed because it is too large Load Diff

View File

@ -11,6 +11,7 @@ using DevComponents.DotNetBar;
using VEPROMS.Properties; using VEPROMS.Properties;
using Volian.Base.Library; using Volian.Base.Library;
using DescriptiveEnum; using DescriptiveEnum;
using VEPROMS.CSLA.Library;
namespace VEPROMS namespace VEPROMS
{ {
@ -24,6 +25,9 @@ namespace VEPROMS
get { return _CanChangeSeparateWindowsSetting; } get { return _CanChangeSeparateWindowsSetting; }
set { _CanChangeSeparateWindowsSetting = value; } set { _CanChangeSeparateWindowsSetting = value; }
} }
private UserSettings _usersettings;
public frmSysOptions() public frmSysOptions()
{ {
_initializing = true; _initializing = true;
@ -89,6 +93,13 @@ namespace VEPROMS
break; break;
} }
//CSM - C2024-031 - Getting User Settings
//and set checkboxes based on what they are set to
_usersettings = new UserSettings(VlnSettings.UserID);
cbOTRemember.Checked = _usersettings.UserSetting_OpenTabs_Remember;
cbOTAutoOpen.Enabled = cbOTAutoOpen.Visible = cbOTRemember.Checked;
cbOTAutoOpen.Checked = _usersettings.UserSetting_OpenTabs_AutoOpen || !cbOTRemember.Checked;
} }
private void cbEnhancedDocumentSync_CheckedChanged(object sender, System.EventArgs e) private void cbEnhancedDocumentSync_CheckedChanged(object sender, System.EventArgs e)
{ {
@ -151,6 +162,15 @@ namespace VEPROMS
Settings.Default.PropPageStyle = 3; Settings.Default.PropPageStyle = 3;
Settings.Default.Save(); Settings.Default.Save();
//CSM - C2024-031 - Save User Settings
//based on what checkboxes are set to
bool? OTAuto = null;
if (cbOTRemember.Checked)
{
OTAuto = cbOTAutoOpen.Checked;
}
_usersettings.SetUserSettings(cbOTRemember.Checked, OTAuto);
this.DialogResult = DialogResult.OK; this.DialogResult = DialogResult.OK;
this.Close(); this.Close();
} }
@ -324,5 +344,10 @@ namespace VEPROMS
Settings.Default.UCFImportOpt = 4; Settings.Default.UCFImportOpt = 4;
} }
} }
}
private void cbOTRemember_CheckedChanged(object sender, EventArgs e)
{
cbOTAutoOpen.Enabled = cbOTAutoOpen.Visible = cbOTRemember.Checked;
}
}
} }

View File

@ -112,21 +112,20 @@
<value>2.0</value> <value>2.0</value>
</resheader> </resheader>
<resheader name="reader"> <resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader> </resheader>
<resheader name="writer"> <resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader> </resheader>
<metadata name="superTooltip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> <metadata name="superTooltip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value> <value>17, 17</value>
</metadata> </metadata>
<assembly alias="System.Drawing" name="System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" /> <assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<data name="colorPickerButton1.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> <data name="colorPickerButton1.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value> <value>
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8 iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGPC/xhBQAAACBjSFJNAAB6
YQUAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAAAlwSFlzAAAScQAA JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAACXBIWXMAABJxAAAScQHz3HqOAAAAKklE
EnEB89x6jgAAACpJREFUOE9j+P//P0UYQgApcjCKASCaFDxqwKgBIDwcDSAHww0gH/9nAACxLJWH1IMf QVQ4T2P4//8/RRhCAClyMIoBIJoUPGrAqAEgPBwNIAfDDSAf/2cAALEslYfUgx+eAAAAAElFTkSuQmCC
ngAAAABJRU5ErkJggg==
</value> </value>
</data> </data>
<data name="$this.Icon" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> <data name="$this.Icon" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">

View File

@ -1654,6 +1654,10 @@ namespace VEPROMS
// B2017-214 added a null reference check // B2017-214 added a null reference check
// B2010-071 Since we cannot tell if the user click on the X in Word or the X in PROMS, ask if the current tab // B2010-071 Since we cannot tell if the user click on the X in Word or the X in PROMS, ask if the current tab
// should be closed or if we should exit PROMS or just Cancel to continue working // should be closed or if we should exit PROMS or just Cancel to continue working
if (tc._MyDisplayTabItems.Count < 1) // If all thabs are closed in the editor will indicate that in the database.
{
VEPROMS.CSLA.Library.Item.DeactivateStateDisplayTabTmp(MySessionInfo.UserID);
}
if (!_WeAreExitingPROMS && !ClosingWithError && tc.SelectedDisplayTabItem != null && tc._MyDisplayTabItems.Count > 0) if (!_WeAreExitingPROMS && !ClosingWithError && tc.SelectedDisplayTabItem != null && tc._MyDisplayTabItems.Count > 0)
{ {
// B2019-071 dialog to ask user if we are to close one tab or exit // B2019-071 dialog to ask user if we are to close one tab or exit
@ -1670,16 +1674,38 @@ namespace VEPROMS
return; return;
} }
string stk = Volian.Base.Library.vlnStackTrace.StackToString(); string stk = Volian.Base.Library.vlnStackTrace.StackToString();
if (!stk.Contains("Exception")) if (!stk.Contains("Exception"))
{ {
// B2018-091 Allow PROMS to close if only MSWord sections have been opened. // B2018-091 Allow PROMS to close if only MSWord sections have been opened.
// B2019-071 we will now close one or all of the tabs (even step editor ones) // B2019-071 we will now close one or all of the tabs (even step editor ones)
if (_WeAreExitingPROMS)
{
string DisplayTabID = "";
int pos;
int TabItemID;
string DisplayTabName = "";
int cnt = 0;
// Deactivate previous procedure tab state by user
VEPROMS.CSLA.Library.Item.DeactivateStateDisplayTabTmp(MySessionInfo.UserID);
// Save current procedure tab state
foreach (KeyValuePair<string, DisplayTabItem> pgTab in tc._MyDisplayTabItems)
{
cnt++;
DisplayTabID = pgTab.Key;
TabItemID = Int32.Parse(DisplayTabID.Substring(DisplayTabID.IndexOf("Item - ") + 7));
DisplayTabName = pgTab.Value.ToString();
//tc.SelectedDisplayTabItem.MyStepTabPanel.ToString()
VEPROMS.CSLA.Library.Item.AddDisplayTabsState(TabItemID, DisplayTabID, DisplayTabName, MySessionInfo.UserID, cnt);
}
}
int n = tc._MyDisplayTabItems.Count; int n = tc._MyDisplayTabItems.Count;
while (n-- > 0 && tc._MyDisplayTabItems.Count > 0) while (n-- > 0 && tc._MyDisplayTabItems.Count > 0)
{ {
tc.CloseTabItem(tc.SelectedDisplayTabItem); tc.CloseTabItem(tc.SelectedDisplayTabItem);
// B2019-071 close just the current tab and continue working // B2019-071 close just the current tab and continue working
@ -2320,6 +2346,48 @@ namespace VEPROMS
CurrentID = txtSearch.Text; CurrentID = txtSearch.Text;
} }
} }
// Add retrieve displaytabs state here.
openDisplaytabstate();
}
public void openDisplaytabstate()
{
// Retrieve edit tab state from database.
DataTable DisPlayTabState = VEPROMS.CSLA.Library.Item.GetDisplayTabs(VlnSettings.UserID);
//CSM - C2024-031 - Getting User Settings
//and set checkboxes based on what they are set to
UserSettings usersettings = new UserSettings(VlnSettings.UserID);
if (DisPlayTabState.Rows.Count > 0 && (usersettings.UserSetting_OpenTabs_AutoOpen || !usersettings.UserSetting_OpenTabs_Remember))
{
//will open tabs by default / ask by default
DialogResult result = DialogResult.Yes;
if (!usersettings.UserSetting_OpenTabs_Remember)
{
dlgCheckOpenTabs checkOpenTabs = new dlgCheckOpenTabs();
result = checkOpenTabs.ShowDialog();
//if checkbox was checked in form, then update User Settings in database
if (checkOpenTabs.Remember)
usersettings.SetUserSettings(true, result == DialogResult.Yes);
}
if (result == DialogResult.Yes)
{
foreach (DataRow TabState in DisPlayTabState.Rows)
{
int _ItemID = (int)TabState["ItemID"];
ItemInfo _Procedure = ItemInfo.Get(_ItemID);
// Open procedure in the editor.
OpenItem(_Procedure);
// SelectedStepTabPanel needs to be set so the print buttons on the ribbon will work.
SelectedStepTabPanel = tc.MyEditItem.MyStepPanel.MyStepTabPanel;
}
}
}
} }
void tc_RefreshEnhancedDocument(object sender, ItemSelectedChangedEventArgs args) void tc_RefreshEnhancedDocument(object sender, ItemSelectedChangedEventArgs args)

View File

@ -474,6 +474,25 @@ namespace VEPROMS.CSLA.Library
OnPropertyChanged("Step_FixedTblForSrch"); OnPropertyChanged("Step_FixedTblForSrch");
} }
} }
//CSM F2024-080: For South Texas - Ability to toggle off Initial Line
public bool Step_DisableInitialLine
{
get
{
string s = _Xp["Step", "DisableInitialLine"];
if (s == string.Empty) return false;
if (s == "True") return true;
return false;
}
set
{
string s = _Xp["Step", "DisableInitialLine"];
if (value.ToString() == s) return;
_Xp["Step", "DisableInitialLine"] = value.ToString();
OnPropertyChanged("Step_DisableInitialLine");
}
}
#region RO image sizing #region RO image sizing
// if the RO image (figure) is resized, save it in the step config, not in the ROImageConfig. If stored in ROImageConfig // if the RO image (figure) is resized, save it in the step config, not in the ROImageConfig. If stored in ROImageConfig
// the size is set for ALL uses. // the size is set for ALL uses.

View File

@ -1165,13 +1165,17 @@ namespace VEPROMS.CSLA.Library
{ {
int sp = odte.Link.IndexOf(" ") + 1; // get past tran type int sp = odte.Link.IndexOf(" ") + 1; // get past tran type
string srecid = odte.Link.Substring(sp, odte.Link.IndexOf(" ", sp) - sp); string srecid = odte.Link.Substring(sp, odte.Link.IndexOf(" ", sp) - sp);
recid = System.Convert.ToInt32(srecid);
foreach (ContentTransition ct in itm.MyContent.ContentTransitions) //CSM B2024-078 - when a bad transition link / does not contain a number, simply return the text as-is
if (int.TryParse(srecid, out recid))
{ {
if (ct.TransitionID == recid) foreach (ContentTransition ct in itm.MyContent.ContentTransitions)
{ {
itm.MyContent.ContentTransitions.Remove(ct); if (ct.TransitionID == recid)
break; {
itm.MyContent.ContentTransitions.Remove(ct);
break;
}
} }
} }
} }
@ -1656,7 +1660,15 @@ namespace VEPROMS.CSLA.Library
private string FixTransition(string link, string text) private string FixTransition(string link, string text)
{ {
if (link.IndexOf("<NewID>") != -1) return text; if (link.IndexOf("<NewID>") != -1) return text;
int transitionID = Convert.ToInt32(link.Split(" ".ToCharArray())[1]);
//CSM B2024-078 - when a bad transition link / does not contain a number, simply return the text as-is
int transitionID;
string[] splt_link = link.Split(' ');
if (splt_link.Length < 2 || !int.TryParse(splt_link[1], out transitionID))
{
return text;
}
// Find the transition // Find the transition
if (_MyItemInfo.MyContent.ContentTransitionCount <= 0) if (_MyItemInfo.MyContent.ContentTransitionCount <= 0)
{ {

View File

@ -4251,6 +4251,13 @@ namespace VEPROMS.CSLA.Library
if (tbformat.Contains("{!.+?}")) if (tbformat.Contains("{!.+?}"))
tstr = tbformat.Replace("{!.+?}", " "); // Comanche Peak Indented Paragraph tstr = tbformat.Replace("{!.+?}", " "); // Comanche Peak Indented Paragraph
_MyTab.Text = tstr; _MyTab.Text = tstr;
//CSM F2024 - 080: For South Texas - if format contains initial line and it is not disabled, show an initial line
if (!string.IsNullOrEmpty(FormatStepData.TabData.MacroEditTag) && FormatStepData.TabData.MacroList != null && FormatStepData.TabData.MacroList.Count > 0 && !(this.IsRNOPart && FormatStepData.TabData.MacroList[0].NotInRNO) && !IsInitialLineDisabled)
{
if (tstr.StartsWith(" "))
tstr = tstr.Substring(1);
tstr = FormatStepData.TabData.MacroEditTag + tstr;
}
_MyTab.CleanText = tstr; _MyTab.CleanText = tstr;
return; return;
} }
@ -4341,25 +4348,73 @@ namespace VEPROMS.CSLA.Library
incSub = (ord + 1).ToString(); incSub = (ord + 1).ToString();
if (MyParent.MyTab.CleanText.Trim().EndsWith(")")) if (MyParent.MyTab.CleanText.Trim().EndsWith(")"))
{ {
_MyTab.CleanText = MyParent.MyTab.CleanText.Trim() + "." + incSub; //CSM F2024 - 080: For South Texas - if format contains initial line and it is not disabled, show an initial line
string tstr = MyParent.MyTab.CleanText.Trim() + "." + incSub;
if (!string.IsNullOrEmpty(FormatStepData.TabData.MacroEditTag) && FormatStepData.TabData.MacroList != null && FormatStepData.TabData.MacroList.Count > 0 && !(this.IsRNOPart && FormatStepData.TabData.MacroList[0].NotInRNO) && !IsInitialLineDisabled && !tstr.StartsWith("_"))
{
if (tstr.StartsWith(" "))
tstr = tstr.Substring(1);
tstr = FormatStepData.TabData.MacroEditTag + tstr;
}
else if (IsInitialLineDisabled && tstr.StartsWith("_"))
tstr = tstr.Substring(1);
_MyTab.CleanText = tstr;
_MyTab.Text = _MyTab.CleanText; _MyTab.Text = _MyTab.CleanText;
return; return;
} }
if (MyParent.MyTab.CleanText.Contains(ActiveFormat.PlantFormat.FormatData.SectData.StepSectionData.IdentB)) if (MyParent.MyTab.CleanText.Contains(ActiveFormat.PlantFormat.FormatData.SectData.StepSectionData.IdentB))
{ {
_MyTab.CleanText = MyParent.MyTab.CleanText.Trim() + "." + incSub + " "; //CSM F2024 - 080: For South Texas - if format contains initial line and it is not disabled, show an initial line
string tstr = MyParent.MyTab.CleanText.Trim() + "." + incSub + " ";
if (!string.IsNullOrEmpty(FormatStepData.TabData.MacroEditTag) && FormatStepData.TabData.MacroList != null && FormatStepData.TabData.MacroList.Count > 0 && !(this.IsRNOPart && FormatStepData.TabData.MacroList[0].NotInRNO) && !IsInitialLineDisabled && !tstr.StartsWith("_"))
{
if (tstr.StartsWith(" "))
tstr = tstr.Substring(1);
tstr = FormatStepData.TabData.MacroEditTag + tstr;
}
else if(IsInitialLineDisabled && tstr.StartsWith("_"))
tstr = tstr.Substring(1);
_MyTab.CleanText = tstr;
_MyTab.Text = _MyTab.CleanText; _MyTab.Text = _MyTab.CleanText;
return; return;
} }
string tmprnotab = MyParent.MyTab.CleanText.Substring(0, MyParent.MyTab.CleanText.IndexOf(".") + 1) + incSub; string tmprnotab = MyParent.MyTab.CleanText.Substring(0, MyParent.MyTab.CleanText.IndexOf(".") + 1) + incSub;
_MyTab.CleanText = tmprnotab.TrimStart(); //CSM F2024 - 080: For South Texas - if format contains initial line and it is not disabled, show an initial line
_MyTab.Text = tmprnotab.TrimStart(); tmprnotab = tmprnotab.TrimStart();
if (!string.IsNullOrEmpty(FormatStepData.TabData.MacroEditTag) && FormatStepData.TabData.MacroList != null && FormatStepData.TabData.MacroList.Count > 0 && !(this.IsRNOPart && FormatStepData.TabData.MacroList[0].NotInRNO) && !IsInitialLineDisabled && !tmprnotab.StartsWith("_"))
{
if (tmprnotab.StartsWith(" "))
tmprnotab = tmprnotab.Substring(1);
tmprnotab = FormatStepData.TabData.MacroEditTag + tmprnotab;
}
else if (IsInitialLineDisabled && tmprnotab.StartsWith("_"))
tmprnotab = tmprnotab.Substring(1);
_MyTab.CleanText = tmprnotab;
_MyTab.Text = tmprnotab;
return; return;
} }
if ((((ItemInfo)ActiveParent).IsHigh && FormatStepData.NumberHighLevel) || ((!((ItemInfo)ActiveParent).IsHigh) && ((tbformat == null || tbformat == "") && (RNOLevel <= ColumnMode)))) if ((((ItemInfo)ActiveParent).IsHigh && FormatStepData.NumberHighLevel) || ((!((ItemInfo)ActiveParent).IsHigh) && ((tbformat == null || tbformat == "") && (RNOLevel <= ColumnMode))))
{ {
_MyTab.CleanText = ((ItemInfo)ActiveParent).MyTab.CleanText; _MyTab.CleanText = ((ItemInfo)ActiveParent).MyTab.CleanText;
_MyTab.Text = ((ItemInfo)ActiveParent).MyTab.Text; _MyTab.Text = ((ItemInfo)ActiveParent).MyTab.Text;
//CSM F2024 - 080: For South Texas - if format contains initial line and it is not disabled, show an initial line
if (!string.IsNullOrEmpty(FormatStepData.TabData.MacroEditTag) && FormatStepData.TabData.MacroList != null && FormatStepData.TabData.MacroList.Count > 0 && !(this.IsRNOPart && FormatStepData.TabData.MacroList[0].NotInRNO) && !IsInitialLineDisabled && !_MyTab.CleanText.StartsWith("_"))
{
if (_MyTab.CleanText.StartsWith(" "))
_MyTab.CleanText = _MyTab.CleanText.Substring(1);
_MyTab.CleanText = FormatStepData.TabData.MacroEditTag + _MyTab.CleanText;
}
if (IsInitialLineDisabled && _MyTab.CleanText.StartsWith("_"))
{
_MyTab.CleanText = _MyTab.CleanText.Substring(1);
}
if (IsInitialLineDisabled && _MyTab.Text.StartsWith("_"))
{
_MyTab.Text = _MyTab.Text.Substring(1);
}
_MyTab.RNOTabWidthAdjust = ((ItemInfo)ActiveParent).FormatStepData.TabData.RNOAdjustTabSize ?? 0; _MyTab.RNOTabWidthAdjust = ((ItemInfo)ActiveParent).FormatStepData.TabData.RNOAdjustTabSize ?? 0;
if (((ItemInfo)ActiveParent).MyTab.Offset != 0) _MyTab.Offset = ((ItemInfo)ActiveParent).MyTab.Offset; if (((ItemInfo)ActiveParent).MyTab.Offset != 0) _MyTab.Offset = ((ItemInfo)ActiveParent).MyTab.Offset;
if (((ItemInfo)ActiveParent).FormatStepData.TabData.RNOExcludeMacros) if (((ItemInfo)ActiveParent).FormatStepData.TabData.RNOExcludeMacros)
@ -4716,6 +4771,15 @@ namespace VEPROMS.CSLA.Library
cltext = cltext + " "; cltext = cltext + " ";
} }
} }
//CSM F2024 - 080: For South Texas - if format contains initial line and it is not disabled, show an initial line
else if (macroindx == -1 && !string.IsNullOrEmpty(FormatStepData.TabData.MacroEditTag) && FormatStepData.TabData.MacroList != null && FormatStepData.TabData.MacroList.Count > 0 && !(this.IsRNOPart && FormatStepData.TabData.MacroList[0].NotInRNO) && !IsInitialLineDisabled)
{
if (cltext == null)
cltext = tbformat;
if (cltext.StartsWith(" "))
cltext = cltext.Substring(1);
cltext = FormatStepData.TabData.MacroEditTag + cltext;
}
} }
macroindx = tbformat.IndexOf("{!diamond1}"); macroindx = tbformat.IndexOf("{!diamond1}");
if (macroindx > -1) //i found it if (macroindx > -1) //i found it
@ -5520,15 +5584,32 @@ namespace VEPROMS.CSLA.Library
} }
if (count <= macro.Grouping) addToList = false; if (count <= macro.Grouping) addToList = false;
} }
//CSM F2024 - 080: For South Texas - if initial line is disabled for this step, do not add the macro
if (macro.Name.ToUpper() == "CHECKOFF" && ActiveFormat.PlantFormat.FormatData.SectData.StepSectionData.ShowInitialLineDisable && !string.IsNullOrEmpty(FormatStepData.TabData.MacroEditTag) && FormatStepData.TabData.MacroEditTag == "_" && IsInitialLineDisabled)
addToList = false;
if (addToList) tmp.Add(macro); if (addToList) tmp.Add(macro);
} }
if (tmp.Count > 0) _MyMacros = tmp; if (tmp.Count > 0) _MyMacros = tmp;
} }
#endregion
#region UseSmartTemplate
// TemplateIndex is for Calvert only: //CSM F2024 - 080: For South Texas - check if initial line is disabled for this step
private int _TemplateIndex = -2; // -2 not set; -1 not a template public bool IsInitialLineDisabled
{
get
{
if (!IsStep) return false;
StepConfig sc = MyConfig as StepConfig;
return sc.Step_DisableInitialLine;
}
}
#endregion
#region UseSmartTemplate
// TemplateIndex is for Calvert only:
private int _TemplateIndex = -2; // -2 not set; -1 not a template
public int TemplateIndex public int TemplateIndex
{ {
get get
@ -8004,6 +8085,171 @@ namespace VEPROMS.CSLA.Library
MyContent.Config = _ProcedureConfig.ToString(); MyContent.Config = _ProcedureConfig.ToString();
} }
#endregion #endregion
public class DisplayTabs
{
private int _ItemID;
public int ItemID
{
get { return _ItemID; }
set { _ItemID = value; }
}
private string _DisplayTabID;
public string DisplayTabID
{
get { return _DisplayTabID; }
set { _DisplayTabID = value; }
}
private string _DisplayTabName;
public string DisplayTabName
{
get { return _DisplayTabName; }
set { _DisplayTabName = value; }
}
public SafeDataReader Dr { get; }
public DisplayTabs()
{
}
public DisplayTabs(int itemID, String displayTabID, String displayTabName)
{
_ItemID = itemID;
_DisplayTabID = displayTabID;
_DisplayTabName = displayTabName;
}
public DisplayTabs(SafeDataReader dr)
{
Dr = dr;
}
}
public static DataTable GetDisplayTabs(int itemID) //, string displayTabID, string displayTabName)
{
try
{
DataTable tmp = DataPortal.Fetch<DataTable>(new DisplayTabs(itemID, "", "")); //, displayTabID, displayTabName));
//ItemInfo.AddList(tmp);
//tmp.AddEvents();
return tmp;
}
catch (Exception ex)
{
throw new DbCslaException("Error on ItemInfoList.GetChildren", ex);
}
}
private DataTable dt = new DataTable();
private DataTable DataPortal_Fetch(DisplayTabs criteria)
{
using (SqlConnection cn = Database.VEPROMS_SqlConnection)
{
using (SqlCommand cm = cn.CreateCommand())
{
try
{
cm.CommandType = CommandType.StoredProcedure;
cm.CommandText = "GetDisplayTabData";
cm.CommandTimeout = Database.DefaultTimeout;
SqlDataAdapter da = new SqlDataAdapter(cm);
da.Fill(dt);
cn.Close();
da.Dispose();
return dt;
}
catch (Exception ex)
{
//if (_MyLog.IsErrorEnabled) _MyLog.Error("ItemExt.DataPortal_Fetch", ex);
throw new DbCslaException("ItemExt.DataPortal_Fetch", ex);
}
}
}
}
//public static void AddDisplayTabsState(int itemID, string displayTabID, string displayTabName)
//{
// try
// {
// //DisplayTabs tmp =
// DataPortal.Fetch<DisplayTabs>(new DisplayTabs(itemID, displayTabID, displayTabName)); //, displayTabID, displayTabName));
// //ItemInfo.AddList(tmp);
// //tmp.AddEvents();
// //return tmp;
// }
// catch (Exception ex)
// {
// throw new DbCslaException("Error on ItemInfoList.GetChildren", ex);
// }
//}
//private DataTable dt = new DataTable();
//private void DataPortal_Fetch(int itemID, string displayTabID, string displayTabName)
//{
// using (SqlConnection cn = Database.VEPROMS_SqlConnection)
// {
// using (SqlCommand cm = cn.CreateCommand())
// {
// try
// {
// cm.CommandType = CommandType.StoredProcedure;
// cm.CommandText = "AddDisplayTabState";
// cm.CommandTimeout = Database.DefaultTimeout;
// cm.Parameters.AddWithValue("@ItemID", ItemID);
// cm.Parameters.AddWithValue("@displayTabID", displayTabID);
// cm.Parameters.AddWithValue("@displayTabName", displayTabName);
// cm.ExecuteNonQuery();
// //SqlDataAdapter da = new SqlDataAdapter(cm);
// //da.Fill(dt);
// //cn.Close();
// //da.Dispose();
// //return dt; // fix
// }
// catch (Exception ex)
// {
// //if (_MyLog.IsErrorEnabled) _MyLog.Error("ItemExt.DataPortal_Fetch", ex);
// throw new DbCslaException("ItemExt.DataPortal_Fetch", ex);
// }
// }
// }
//}
public static void AddDisplayTabsState(int itemID, string displayTabID, string displayTabName)
//private void DataPortal_Fetch(int itemID, string displayTabID, string displayTabName)
{
using (SqlConnection cn = Database.VEPROMS_SqlConnection)
{
using (SqlCommand cm = cn.CreateCommand())
{
try
{
cm.CommandType = CommandType.StoredProcedure;
cm.CommandText = "AddDisplayTabState";
cm.CommandTimeout = Database.DefaultTimeout;
cm.Parameters.AddWithValue("@ItemID", itemID);
cm.Parameters.AddWithValue("@displayTabID", displayTabID);
cm.Parameters.AddWithValue("@displayTabName", displayTabName);
cm.ExecuteNonQuery();
//SqlDataAdapter da = new SqlDataAdapter(cm);
//da.Fill(dt);
//cn.Close();
//da.Dispose();
//return dt; // fix
}
catch (Exception ex)
{
//if (_MyLog.IsErrorEnabled) _MyLog.Error("ItemExt.AddDisplayTabsState", ex);
throw new DbCslaException("ItemExt.AddDisplayTabsState", ex);
}
}
}
}
} }
#endregion #endregion
#region SectionInfo #region SectionInfo

View File

@ -3175,6 +3175,17 @@ namespace VEPROMS.CSLA.Library
return LazyLoad(ref _ChangeFontUpperCaseIinArial, "@ChangeFontUpperCaseIinArial"); return LazyLoad(ref _ChangeFontUpperCaseIinArial, "@ChangeFontUpperCaseIinArial");
} }
} }
// F2024-080 South Texas
// Used to show if "Initial Line Disable" checkbox should show in the DisplayTab
private LazyLoad<bool> _ShowInitialLineDisable;
public bool ShowInitialLineDisable
{
get
{
return LazyLoad(ref _ShowInitialLineDisable, "@ShowInitialLineDisable");
}
}
} }
#endregion - StepSectionData #endregion - StepSectionData
#region TextTypeValue #region TextTypeValue

View File

@ -1132,6 +1132,91 @@ namespace VEPROMS.CSLA.Library
throw new DbCslaException("Item.Add", ex); throw new DbCslaException("Item.Add", ex);
} }
} }
public static void DeactivateStateDisplayTabTmp(string UserID)
{
using (SqlConnection cn = Database.VEPROMS_SqlConnection)
{
using (SqlCommand cm = cn.CreateCommand())
{
try
{
cm.CommandType = CommandType.StoredProcedure;
cm.CommandText = "DeactivateStateDisplayTabTmp";
cm.CommandTimeout = Database.DefaultTimeout;
cm.Parameters.AddWithValue("@UserID", UserID);
cm.ExecuteNonQuery();
}
catch (Exception ex)
{
//if (_MyLog.IsErrorEnabled) _MyLog.Error("ItemExt.DeactivateStateDisplayTabTmp", ex);
throw new DbCslaException("ItemExt.DeactivateStateDisplayTabTmp", ex);
}
}
}
}
public static void AddDisplayTabsState(int itemID, string displayTabID, string displayTabName, string UserID, int order)
//private void DataPortal_Fetch(int itemID, string displayTabID, string displayTabName)
{
using (SqlConnection cn = Database.VEPROMS_SqlConnection)
{
using (SqlCommand cm = cn.CreateCommand())
{
try
{
cm.CommandType = CommandType.StoredProcedure;
cm.CommandText = "AddDisplayTabState";
cm.CommandTimeout = Database.DefaultTimeout;
cm.Parameters.AddWithValue("@ItemID", itemID);
cm.Parameters.AddWithValue("@displayTabID", displayTabID);
cm.Parameters.AddWithValue("@displayTabName", displayTabName);
cm.Parameters.AddWithValue("@UserID", UserID);
cm.Parameters.AddWithValue("@order", order);
cm.ExecuteNonQuery();
}
catch (Exception ex)
{
//if (_MyLog.IsErrorEnabled) _MyLog.Error("ItemExt.AddDisplayTabsState", ex);
throw new DbCslaException("ItemExt.AddDisplayTabsState", ex);
}
}
}
}
public static DataTable GetDisplayTabs(string UserID) //, string displayTabID, string displayTabName)
//public static void DeactivateStateDisplayTabTmp(string UserID)
{
using (SqlConnection cn = Database.VEPROMS_SqlConnection)
{
using (SqlCommand cm = cn.CreateCommand())
{
try
{
cm.CommandType = CommandType.StoredProcedure;
cm.CommandText = "GetDisplayTabdata";
cm.CommandTimeout = Database.DefaultTimeout;
cm.Parameters.AddWithValue("@UserID", UserID);
//cm.ExecuteNonQuery();
SqlDataAdapter da = new SqlDataAdapter(cm);
//da.Fill(dt);
//cn.Close();
//da.Dispose();
//return dt; // fix
SqlDataReader reader = cm.ExecuteReader();
DataTable dt = new DataTable();
dt.Load(reader);
return dt;
}
catch (Exception ex)
{
//if (_MyLog.IsErrorEnabled) _MyLog.Error("ItemExt.DeactivateStateDisplayTabTmp", ex);
throw new DbCslaException("ItemExt.DeactivateStateDisplayTabTmp", ex);
}
}
}
}
[Transactional(TransactionalTypes.TransactionScope)] [Transactional(TransactionalTypes.TransactionScope)]
protected override void DataPortal_Update() protected override void DataPortal_Update()
{ {

View File

@ -0,0 +1,91 @@
using System;
using Csla.Data;
using System.Data;
using System.Data.SqlClient;
//CSM - C2024-031 - Minimal Class for Saving / Getting User Settings
//For Use with getting / saving if a User wishes to have tabs kept open
namespace VEPROMS.CSLA.Library
{
public class UserSettings
{
#region Private Properties
private readonly string _userid;
#endregion
#region Public Properties
public bool UserSetting_OpenTabs_Remember { get; protected set; } = false;
public bool UserSetting_OpenTabs_AutoOpen { get; protected set; } = true;
#endregion
#region Constructor
public UserSettings(string UserID)
{
_userid = UserID;
try
{
using (SqlConnection cn = Database.VEPROMS_SqlConnection)
{
using (SqlCommand cm = cn.CreateCommand())
{
cm.CommandType = CommandType.Text;
cm.CommandText = "Select RememberOpenTabs, AutoOpenTabs FROM Users where UserID = @UID";
cm.Parameters.AddWithValue("@UID", _userid);
cm.CommandTimeout = Database.DefaultTimeout;
using (SafeDataReader dr = new SafeDataReader(cm.ExecuteReader()))
{
if (dr.Read())
{
UserSetting_OpenTabs_Remember = (bool) dr.GetValue("RememberOpenTabs");
UserSetting_OpenTabs_AutoOpen = (bool) dr.GetValue("AutoOpenTabs");
}
}
}
}
}
catch (Exception ex)
{
Database.LogException("UserSettings_GetData", ex);
throw new DbCslaException("UserSettings_GetData", ex);
}
}
#endregion
#region Save Properties
public void SetUserSettings(bool OpenTabs_Remember, bool? OpenTabs_AutoOpen = null)
{
try
{
using (SqlConnection cn = Database.VEPROMS_SqlConnection)
{
using (SqlCommand cm = cn.CreateCommand())
{
cm.CommandType = CommandType.StoredProcedure;
cm.CommandText = "vesp_UpdateUserSettings";
cm.Parameters.AddWithValue("@UID", _userid);
UserSetting_OpenTabs_Remember = OpenTabs_Remember;
cm.Parameters.AddWithValue("@Remember", OpenTabs_Remember);
if (OpenTabs_AutoOpen != null)
{
UserSetting_OpenTabs_AutoOpen = (bool) OpenTabs_AutoOpen;
cm.Parameters.AddWithValue("@AutoOpen", OpenTabs_AutoOpen);
}
cm.CommandTimeout = Database.DefaultTimeout;
cm.ExecuteNonQuery();
}
}
}
catch (Exception ex)
{
Database.LogException("UserSettings_SetUserSettings", ex);
throw new DbCslaException("UserSettings_SetUserSettings", ex);
}
}
#endregion
}
}

View File

@ -380,6 +380,7 @@
<Compile Include="Generated\ZContentInfo.cs" /> <Compile Include="Generated\ZContentInfo.cs" />
<Compile Include="Generated\ZTransition.cs" /> <Compile Include="Generated\ZTransition.cs" />
<Compile Include="Generated\ZTransitionInfo.cs" /> <Compile Include="Generated\ZTransitionInfo.cs" />
<Compile Include="Minimal\UserSettings.cs" />
<Compile Include="Properties\AssemblyInfo.cs" /> <Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="VEObjects\VEDrillDown.cs" /> <Compile Include="VEObjects\VEDrillDown.cs" />
<Compile Include="VEObjects\VETreeNode.cs" /> <Compile Include="VEObjects\VETreeNode.cs" />

View File

@ -511,8 +511,8 @@ namespace Volian.Controls.Library
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.Controls.Add(this.btnPrintReport); this.Controls.Add(this.btnPrintReport);
this.Controls.Add(this.xpSetToReport);
this.Controls.Add(this.xpSelROs); this.Controls.Add(this.xpSelROs);
this.Controls.Add(this.xpSetToReport);
this.Controls.Add(this.tctrlReports); this.Controls.Add(this.tctrlReports);
this.Margin = new System.Windows.Forms.Padding(2); this.Margin = new System.Windows.Forms.Padding(2);
this.Name = "DisplayReports"; this.Name = "DisplayReports";

View File

@ -658,7 +658,7 @@ namespace Volian.Controls.Library
this.superTooltip1.SetSuperTooltip(this.cmboTreeROs, new DevComponents.DotNetBar.SuperTooltipInfo("Select the RO to Search", "", "Select the Referenced Object to search for.", null, null, DevComponents.DotNetBar.eTooltipColor.Gray)); this.superTooltip1.SetSuperTooltip(this.cmboTreeROs, new DevComponents.DotNetBar.SuperTooltipInfo("Select the RO to Search", "", "Select the Referenced Object to search for.", null, null, DevComponents.DotNetBar.eTooltipColor.Gray));
this.cmboTreeROs.TabIndex = 1; this.cmboTreeROs.TabIndex = 1;
this.cmboTreeROs.ThemeAware = true; this.cmboTreeROs.ThemeAware = true;
this.cmboTreeROs.WatermarkText = "Select an RO to seach"; this.cmboTreeROs.WatermarkText = "Select an RO to search";
this.cmboTreeROs.SelectedIndexChanged += new System.EventHandler(this.cmboTreeROs_SelectedIndexChanged); this.cmboTreeROs.SelectedIndexChanged += new System.EventHandler(this.cmboTreeROs_SelectedIndexChanged);
// //
// tabROSearch // tabROSearch

File diff suppressed because it is too large Load Diff

View File

@ -142,6 +142,8 @@ namespace Volian.Controls.Library
tbChgID.Enabled = false; tbChgID.Enabled = false;
lblChgId.Visible = tbChgID.Visible = false; lblChgId.Visible = tbChgID.Visible = false;
CurItemInfo = null; CurItemInfo = null;
cbInitialLine.Visible = cbInitialLine.Enabled = false;
} }
private bool StepOverRide() private bool StepOverRide()
{ {
@ -553,6 +555,16 @@ namespace Volian.Controls.Library
} }
} }
} }
//CSM F2024 - 080: For South Texas (HLP formats), enable the initial line checkbox if it is in the formats
//Also, they want disable being selected to impact substeps - so do not show toggle if selected on a parent step
cbInitialLine.Visible = cbInitialLine.Enabled = false;
if (CurItemInfo.ActiveFormat.PlantFormat.FormatData.SectData.StepSectionData.ShowInitialLineDisable && !string.IsNullOrEmpty(CurItemInfo.FormatStepData.TabData.MacroEditTag) && CurItemInfo.FormatStepData.TabData.MacroEditTag == "_" && CurItemInfo.FormatStepData.TabData.MacroList != null && CurItemInfo.FormatStepData.TabData.MacroList.Count > 0 && !(CurItemInfo.IsRNOPart && CurItemInfo.FormatStepData.TabData.MacroList[0].NotInRNO))
{
cbInitialLine.Visible = cbInitialLine.Enabled = true;
cbInitialLine.Checked = sc.Step_DisableInitialLine;
}
_Initalizing = false; _Initalizing = false;
} }
public void SetFigure(double wd, double wd2) public void SetFigure(double wd, double wd2)
@ -969,25 +981,42 @@ namespace Volian.Controls.Library
sc.Step_PreferredPagebreak = cbPrefPageBreak.Checked; sc.Step_PreferredPagebreak = cbPrefPageBreak.Checked;
MyEditItem.ChangeBarForConfigItemChange = true; MyEditItem.ChangeBarForConfigItemChange = true;
} }
//private void txbxAltConActSumText_Leave(object sender, EventArgs e)
//{
// // User left Atlernate Continuous Action Text field. If text changed, then prompt
// // to see if save should occur.
// StepConfig sc = CurItemInfo.MyConfig as StepConfig;
// if (sc == null) return;
// bool bothEmpty = (sc.Step_AlternateContActSumText == null || sc.Step_AlternateContActSumText == "") && (txbxAltConActSumText.Text == null || txbxAltConActSumText.Text == "");
// if (!bothEmpty && sc.Step_AlternateContActSumText != txbxAltConActSumText.Text)
// {
// if (MessageBox.Show(this, "Do you want to save the Alternate Continuous Action Text?", "Confirm Save", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes)
// {
// MyEditItem.SaveContents();
// sc.Step_AlternateContActSumText = txbxAltConActSumText.Text; // this actually saves the config
// }
// else
// txbxAltConActSumText.Text = sc.Step_AlternateContActSumText;
// }
//} private void cbInitialLine_CheckedChanged(object sender, EventArgs e)
{
if (_Initalizing) return;
MyEditItem.SaveContents();
StepConfig sc = CurItemInfo.MyConfig as StepConfig;
if (sc == null) return;
MyEditItem.ChangeBarForConfigItemChange = false;
sc.Step_DisableInitialLine = cbInitialLine.Checked;
MyEditItem.ChangeBarForConfigItemChange = true;
} //needed to refresh display changing
MyEditItem.RefreshContent();
MyEditItem.SetAllTabs();
}
//private void txbxAltConActSumText_Leave(object sender, EventArgs e)
//{
// // User left Atlernate Continuous Action Text field. If text changed, then prompt
// // to see if save should occur.
// StepConfig sc = CurItemInfo.MyConfig as StepConfig;
// if (sc == null) return;
// bool bothEmpty = (sc.Step_AlternateContActSumText == null || sc.Step_AlternateContActSumText == "") && (txbxAltConActSumText.Text == null || txbxAltConActSumText.Text == "");
// if (!bothEmpty && sc.Step_AlternateContActSumText != txbxAltConActSumText.Text)
// {
// if (MessageBox.Show(this, "Do you want to save the Alternate Continuous Action Text?", "Confirm Save", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes)
// {
// MyEditItem.SaveContents();
// sc.Step_AlternateContActSumText = txbxAltConActSumText.Text; // this actually saves the config
// }
// else
// txbxAltConActSumText.Text = sc.Step_AlternateContActSumText;
// }
//}
}
} }