Compare commits
10 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| caec6adf8d | |||
| a38c0dbe33 | |||
| d779d4ad50 | |||
| 9b71ce0fee | |||
| 8b18005b8e | |||
| a550ef1b50 | |||
| 63a60b32cc | |||
| ca4dc8d330 | |||
| 0a52aa5c53 | |||
| 591fc03ca2 |
@@ -0,0 +1,6 @@
|
||||
# ---> VisualStudio
|
||||
## Show diffs for xml files in GIT
|
||||
##
|
||||
## Get latest from https://github.com/github/gitignore/blob/main/VisualStudio.gitattributes
|
||||
|
||||
*.xml diff
|
||||
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.
@@ -23,8 +23,8 @@ using System.Runtime.CompilerServices;
|
||||
// Build YYMM (two digit year, two digit month)
|
||||
// Revision DHH (day - no leading zero, two digit hour - military time
|
||||
//
|
||||
[assembly: AssemblyVersion("2.3.2410.815")]
|
||||
[assembly: AssemblyFileVersion("2.3.2410.815")]
|
||||
[assembly: AssemblyVersion("2.3.2410.907")]
|
||||
[assembly: AssemblyFileVersion("2.3.2410.907")]
|
||||
|
||||
//
|
||||
// In order to sign your assembly you must specify a key to use. Refer to the
|
||||
@@ -93,5 +93,6 @@ using System.Runtime.CompilerServices;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -151,7 +151,7 @@ namespace ROEditor
|
||||
private string origMenuItem;
|
||||
StringBuilder parseerror;
|
||||
private int hi, lo;
|
||||
private Label lb_chkApplc;
|
||||
private Label lb_chkApplc;
|
||||
private int dbtype;
|
||||
// C2021-026 returns true is Parent/Child info was passed into the RO Editor
|
||||
public bool PCApplicabilityEnabled
|
||||
@@ -188,33 +188,33 @@ namespace ROEditor
|
||||
lboxInUse.Visible = true;
|
||||
lb_chkApplc.Visible = false;
|
||||
}
|
||||
if (editlevel==(uint)RecordType.GroupSchema)this.Text = "Subgroup Definition";
|
||||
if (editlevel == (uint)RecordType.GroupSchema) this.Text = "Subgroup Definition";
|
||||
FillInData(grptxt);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Clean up any resources being used.
|
||||
/// </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();
|
||||
}
|
||||
}
|
||||
base.Dispose( disposing );
|
||||
base.Dispose(disposing);
|
||||
}
|
||||
|
||||
|
||||
private void FillInAvailable()
|
||||
{
|
||||
ROField rof;
|
||||
|
||||
|
||||
// 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?
|
||||
this.lboxAvail.Items.Add(rof.GetFieldname);
|
||||
}
|
||||
@@ -277,7 +277,7 @@ namespace ROEditor
|
||||
_initializing = false;
|
||||
}
|
||||
|
||||
|
||||
|
||||
private void DoValueTextBoxes()
|
||||
{
|
||||
string menuitm, retval;
|
||||
@@ -297,7 +297,7 @@ namespace ROEditor
|
||||
else
|
||||
parent = null;
|
||||
}
|
||||
if (menuitm !="")
|
||||
if (menuitm != "")
|
||||
this.tbMenuVal.Text = CvtFldToUserFld(menuitm);
|
||||
else
|
||||
this.tbMenuVal.Text = "";
|
||||
@@ -310,21 +310,21 @@ namespace ROEditor
|
||||
this.lblRetVal.Visible = true;
|
||||
VlnXmlElement parent;
|
||||
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
|
||||
if (menuitm == "") menuitm = parent.GetAttribute("MenuItem");
|
||||
if (retval == "") retval = parent.GetAttribute("RetVal");
|
||||
if (parent.Name != "RO_Root")
|
||||
parent = (VlnXmlElement) parent.ParentNode;
|
||||
parent = (VlnXmlElement)parent.ParentNode;
|
||||
else
|
||||
parent = null;
|
||||
}
|
||||
if (menuitm!="")
|
||||
if (menuitm != "")
|
||||
this.tbMenuVal.Text = CvtFldToUserFld(menuitm);
|
||||
else
|
||||
this.tbMenuVal.Text = "";
|
||||
if (retval!="")
|
||||
if (retval != "")
|
||||
this.tbRetVal.Text = CvtFldToUserFld(retval);
|
||||
else
|
||||
this.tbRetVal.Text = "";
|
||||
@@ -332,7 +332,7 @@ namespace ROEditor
|
||||
}
|
||||
|
||||
private void FillInData(string grptxt)
|
||||
{
|
||||
{
|
||||
this.lblGroupText.Text = grptxt;
|
||||
DoValueTextBoxes();
|
||||
SetUpListBoxes();
|
||||
@@ -344,24 +344,27 @@ namespace ROEditor
|
||||
|
||||
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.
|
||||
origRetVal=this.tbRetVal.Text;
|
||||
origMenuItem=this.tbMenuVal.Text;
|
||||
|
||||
origRetVal = this.tbRetVal.Text;
|
||||
origMenuItem = this.tbMenuVal.Text;
|
||||
|
||||
// if this is a database level definition & it's a user defined database,
|
||||
// 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;
|
||||
if (editlevel==(uint)RecordType.Schema)
|
||||
if (editlevel == (uint)RecordType.Schema)
|
||||
attr = elem.GetAttribute("FieldsInUse");
|
||||
else
|
||||
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();
|
||||
this.btnRemove.Enabled = true;
|
||||
@@ -375,7 +378,7 @@ namespace ROEditor
|
||||
this.btnAdd.Enabled = false;
|
||||
this.btnEdit.Enabled = true;
|
||||
}
|
||||
protected void lboxAvail_GotFocus (object sender, EventArgs e)
|
||||
protected void lboxAvail_GotFocus(object sender, EventArgs e)
|
||||
{
|
||||
if (PCApplicabilityEnabled)
|
||||
lboxInUseCB.ClearSelected();
|
||||
@@ -385,6 +388,103 @@ namespace ROEditor
|
||||
this.btnRemove.Enabled = false;
|
||||
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)
|
||||
{
|
||||
//get item in lboxInUse (in use list) and remove it from there
|
||||
|
||||
@@ -1165,13 +1165,17 @@ namespace VEPROMS.CSLA.Library
|
||||
{
|
||||
int sp = odte.Link.IndexOf(" ") + 1; // get past tran type
|
||||
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);
|
||||
break;
|
||||
if (ct.TransitionID == recid)
|
||||
{
|
||||
itm.MyContent.ContentTransitions.Remove(ct);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1656,7 +1660,15 @@ namespace VEPROMS.CSLA.Library
|
||||
private string FixTransition(string link, string 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
|
||||
if (_MyItemInfo.MyContent.ContentTransitionCount <= 0)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user