C2021-026 Parent/Child applicability in RO Editor
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/*********************************************************************************************
|
||||
* Copyright 2002 - Volian Enterprises, Inc. All rights reserved.
|
||||
* Copyright 2021 - Volian Enterprises, Inc. All rights reserved.
|
||||
* Volian Enterprises - Proprietary Information - DO NOT COPY OR DISTRIBUTE
|
||||
* ------------------------------------------------------------------------------
|
||||
* $Workfile: CmpRpt.cs $ $Revision: 3 $
|
||||
@@ -264,7 +264,7 @@ namespace CmpRpt
|
||||
for (int i = cnt - 1; i >= 0; i--)
|
||||
headers.Add(reversehdrs[i]);
|
||||
myrodb.MyDBID = tbl;
|
||||
rptele.Show(myrodb, headers, showStat);
|
||||
rptele.Show(myrodb, headers, showStat, PCChildren); // this will write data to print.tmp file in the RO folder
|
||||
Application.DoEvents();
|
||||
headers.Clear();
|
||||
reversehdrs.Clear();
|
||||
@@ -296,6 +296,7 @@ namespace CmpRpt
|
||||
}
|
||||
}
|
||||
}
|
||||
public static string[] PCChildren; //C2021-026 list of Parent/Child Children
|
||||
private static string BuildROList(string[] args)
|
||||
{
|
||||
// when ro's in sql was added, an /sql parameter was introduced to allow the definition of the connection string. So
|
||||
@@ -317,6 +318,9 @@ namespace CmpRpt
|
||||
{
|
||||
SqlConnectionStr = parm2.Substring(5);
|
||||
}
|
||||
// C2021-026 get the list of P/C Children if it was passed in
|
||||
else if (parm2.ToUpper().StartsWith("/PC="))
|
||||
PCChildren = parm2.Substring(4).Split(','); //C2021-026 list of Parent/Child Children
|
||||
else
|
||||
roIdArg = parm2;
|
||||
}
|
||||
|
@@ -1,5 +1,5 @@
|
||||
/*********************************************************************************************
|
||||
* Copyright 2002 - Volian Enterprises, Inc. All rights reserved.
|
||||
* Copyright 2021- Volian Enterprises, Inc. All rights reserved.
|
||||
* Volian Enterprises - Proprietary Information - DO NOT COPY OR DISTRIBUTE
|
||||
* ------------------------------------------------------------------------------
|
||||
* $Workfile: RODefFrm.cs $ $Revision: 18 $
|
||||
@@ -105,6 +105,7 @@ using System.Text;
|
||||
using ROFields;
|
||||
using RODBInterface;
|
||||
using VlnStatus;
|
||||
using System.Collections.Generic;
|
||||
|
||||
|
||||
namespace ROEditor
|
||||
@@ -125,6 +126,7 @@ namespace ROEditor
|
||||
private System.Windows.Forms.Label lblInUse;
|
||||
private System.Windows.Forms.Label lblAvail;
|
||||
private System.Windows.Forms.ListBox lboxInUse;
|
||||
private System.Windows.Forms.CheckedListBox lboxInUseCB; // C2021-026 added a checked list box for Parent/Child capabilites
|
||||
private System.Windows.Forms.ListBox lboxAvail;
|
||||
private System.Windows.Forms.Button btnAdd;
|
||||
private System.Windows.Forms.Button btnEdit;
|
||||
@@ -139,15 +141,24 @@ namespace ROEditor
|
||||
private System.Windows.Forms.Button btnOK;
|
||||
private System.Windows.Forms.Button btnCancel;
|
||||
ArrayList InUseList;
|
||||
ArrayList InUseApplcList; // C2021-026 hold the list of fields that have child values
|
||||
private VlnXmlElement elem;
|
||||
private uint editlevel; // flag for group definition or ro definition
|
||||
private uint editlevel; // flag for group definition or ro definition
|
||||
private string strFieldsInUse;
|
||||
private string origFieldsInUse;
|
||||
private string origApplicFields;
|
||||
private string origRetVal;
|
||||
private string origMenuItem;
|
||||
StringBuilder parseerror;
|
||||
StringBuilder parseerror;
|
||||
private int hi, lo;
|
||||
private Label lb_chkApplc;
|
||||
private int dbtype;
|
||||
// C2021-026 returns true is Parent/Child info was passed into the RO Editor
|
||||
public bool PCApplicabilityEnabled
|
||||
{
|
||||
get { return ROEditor.Form1.ApplicabilityEnabled(); }
|
||||
}
|
||||
|
||||
// pass in Group Element
|
||||
public RODefFrm(VlnXmlElement pelem, RODB rodb, string fields, string grptxt, int idbtype)
|
||||
{
|
||||
@@ -164,7 +175,20 @@ namespace ROEditor
|
||||
//
|
||||
InitializeComponent();
|
||||
|
||||
if(editlevel==(uint)RecordType.GroupSchema)this.Text = "Subgroup Definition";
|
||||
// C2021-024 toggle which check boxes are visable based on if Parent/Child is available
|
||||
if (PCApplicabilityEnabled)
|
||||
{
|
||||
lboxInUseCB.Visible = true;
|
||||
lboxInUse.Visible = false;
|
||||
lb_chkApplc.Visible = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
lboxInUseCB.Visible = false;
|
||||
lboxInUse.Visible = true;
|
||||
lb_chkApplc.Visible = false;
|
||||
}
|
||||
if (editlevel==(uint)RecordType.GroupSchema)this.Text = "Subgroup Definition";
|
||||
FillInData(grptxt);
|
||||
}
|
||||
|
||||
@@ -195,31 +219,62 @@ namespace ROEditor
|
||||
this.lboxAvail.Items.Add(rof.GetFieldname);
|
||||
}
|
||||
}
|
||||
// C2021-024 see if the give RO field is checked to have child values
|
||||
private bool ContainedInUseApplicList(ROField rof)
|
||||
{
|
||||
bool isInList = false;
|
||||
foreach (ROField arof in InUseApplcList)
|
||||
{
|
||||
if (arof.GetRecID == rof.GetRecID)
|
||||
{
|
||||
isInList = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
return isInList;
|
||||
}
|
||||
private bool _initializing = false;
|
||||
|
||||
|
||||
private void SetUpListBoxes()
|
||||
{
|
||||
_initializing = true;
|
||||
ROField rof;
|
||||
// Get list of available fields (all fields in this type, i.e. rectype = 'Schema'
|
||||
// or 'GroupSchema') and get list of inuse from the schema definition.
|
||||
ArrayList tmp = myrodb.RODB_GetFields(elem, editlevel);
|
||||
// put the items in the AvailList box.
|
||||
if (AvailList == null) AvailList = new ArrayList();
|
||||
for (int i=0; i< tmp.Count; i++) AvailList.Add(tmp[i]); // don't modify the list returned from RODB_GetFields since it is part of dictionary
|
||||
InUseList = myrodb.RODB_GetFieldsInUse(elem, AvailList, strFieldsInUse, ref origFieldsInUse, false);
|
||||
for (int i = 0; i < tmp.Count; i++) AvailList.Add(tmp[i]); // don't modify the list returned from RODB_GetFields since it is part of dictionary
|
||||
InUseList = myrodb.RODB_GetFieldsInUse(elem, AvailList, strFieldsInUse, ref origFieldsInUse, true);
|
||||
// C2021-024 get the list of fields that are have P/C values turned on (fields that are checked)
|
||||
InUseApplcList = myrodb.RODB_GetApplicabilityEnabledFields(elem, InUseList, ref origApplicFields, PCApplicabilityEnabled);
|
||||
FillInAvailable();
|
||||
|
||||
// set up the listbox for inuse items.
|
||||
if (InUseList != null)
|
||||
if (InUseList != null)
|
||||
{
|
||||
// add items to the InUseList box.
|
||||
for (int i=0; i< InUseList.Count; i++)
|
||||
for (int i = 0; i < InUseList.Count; i++)
|
||||
{
|
||||
rof = (ROField) InUseList[i];
|
||||
rof = (ROField)InUseList[i];
|
||||
if (rof.GetFieldname != null) //DO YET: why null?
|
||||
this.lboxInUse.Items.Add(rof.GetFieldname);
|
||||
{
|
||||
// C2021-026 populate the relative In Use list base on if Parent/Child is enabled
|
||||
if (PCApplicabilityEnabled)
|
||||
{
|
||||
this.lboxInUseCB.Items.Add(rof.GetFieldname);
|
||||
if (rof.FieldTypeCanDoApplicability())
|
||||
{
|
||||
if (ContainedInUseApplicList(rof))
|
||||
this.lboxInUseCB.SetItemCheckState(lboxInUseCB.Items.IndexOf(rof.GetFieldname), CheckState.Checked);
|
||||
}
|
||||
}
|
||||
else
|
||||
this.lboxInUse.Items.Add(rof.GetFieldname);
|
||||
}
|
||||
}
|
||||
}
|
||||
_initializing = false;
|
||||
}
|
||||
|
||||
|
||||
@@ -281,8 +336,12 @@ namespace ROEditor
|
||||
this.lblGroupText.Text = grptxt;
|
||||
DoValueTextBoxes();
|
||||
SetUpListBoxes();
|
||||
|
||||
lboxInUse.GotFocus += new EventHandler(this.lboxInUse_GotFocus);
|
||||
|
||||
if (PCApplicabilityEnabled) // C2021-026 Check Box list focus event
|
||||
lboxInUseCB.GotFocus += new EventHandler(this.lboxInUseCB_GotFocus);
|
||||
else
|
||||
lboxInUse.GotFocus += new EventHandler(this.lboxInUse_GotFocus);
|
||||
|
||||
lboxAvail.GotFocus += new EventHandler(this.lboxAvail_GotFocus);
|
||||
|
||||
// save copies of local data, so if there is a change, we know we must save them.
|
||||
@@ -309,9 +368,19 @@ namespace ROEditor
|
||||
this.btnAdd.Enabled = false;
|
||||
this.btnEdit.Enabled = true;
|
||||
}
|
||||
protected void lboxInUseCB_GotFocus(object sender, EventArgs e)
|
||||
{
|
||||
lboxAvail.ClearSelected();
|
||||
this.btnRemove.Enabled = true;
|
||||
this.btnAdd.Enabled = false;
|
||||
this.btnEdit.Enabled = true;
|
||||
}
|
||||
protected void lboxAvail_GotFocus (object sender, EventArgs e)
|
||||
{
|
||||
lboxInUse.ClearSelected();
|
||||
if (PCApplicabilityEnabled)
|
||||
lboxInUseCB.ClearSelected();
|
||||
else
|
||||
lboxInUse.ClearSelected();
|
||||
this.btnAdd.Enabled = true;
|
||||
this.btnRemove.Enabled = false;
|
||||
this.btnEdit.Enabled = true;
|
||||
@@ -320,48 +389,101 @@ namespace ROEditor
|
||||
{
|
||||
//get item in lboxInUse (in use list) and remove it from there
|
||||
// and add it to the lboxAvail list.
|
||||
if (lboxInUse.SelectedIndex >=0 )
|
||||
if (PCApplicabilityEnabled) // C2021-026 use the Check Box list
|
||||
{
|
||||
// get the selected item and its string. Remove it from the listbox,
|
||||
// add it to the available array list & listbox & then remove it from
|
||||
// the inuse array list.
|
||||
int indx = lboxInUse.SelectedIndex;
|
||||
lboxInUse.Items.RemoveAt(indx);
|
||||
if (lboxInUseCB.SelectedIndex >= 0)
|
||||
{
|
||||
// get the selected item and its string. Remove it from the listbox,
|
||||
// add it to the available array list & listbox & then remove it from
|
||||
// the inuse array list.
|
||||
int indx = lboxInUseCB.SelectedIndex;
|
||||
lboxInUseCB.Items.RemoveAt(indx);
|
||||
|
||||
// copy if over to availlist
|
||||
ROField rof = (ROField) InUseList[indx];
|
||||
ROField copyrof = new ROField(rof.GetFieldname,rof.GetRecID,rof.GetMasterRecID, rof.GetFieldType);
|
||||
AvailList.Add(copyrof);
|
||||
// copy if over to availlist
|
||||
ROField rof = (ROField)InUseList[indx];
|
||||
ROField copyrof = new ROField(rof.GetFieldname, rof.GetRecID, rof.GetMasterRecID, rof.GetFieldType);
|
||||
AvailList.Add(copyrof);
|
||||
|
||||
lboxAvail.Items.Add(copyrof.GetFieldname);
|
||||
InUseList.RemoveAt(indx);
|
||||
lboxAvail.Refresh();
|
||||
lboxInUse.Refresh();
|
||||
lboxAvail.Items.Add(copyrof.GetFieldname);
|
||||
InUseList.RemoveAt(indx);
|
||||
if (InUseApplcList.Contains(rof)) // C2021-026 remove from the field applicability list
|
||||
InUseApplcList.Remove(rof);
|
||||
lboxAvail.Refresh();
|
||||
lboxInUseCB.Refresh();
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (lboxInUse.SelectedIndex >= 0)
|
||||
{
|
||||
// get the selected item and its string. Remove it from the listbox,
|
||||
// add it to the available array list & listbox & then remove it from
|
||||
// the inuse array list.
|
||||
int indx = lboxInUse.SelectedIndex;
|
||||
lboxInUse.Items.RemoveAt(indx);
|
||||
|
||||
// copy if over to availlist
|
||||
ROField rof = (ROField)InUseList[indx];
|
||||
ROField copyrof = new ROField(rof.GetFieldname, rof.GetRecID, rof.GetMasterRecID, rof.GetFieldType);
|
||||
AvailList.Add(copyrof);
|
||||
|
||||
lboxAvail.Items.Add(copyrof.GetFieldname);
|
||||
InUseList.RemoveAt(indx);
|
||||
if (InUseApplcList.Contains(rof)) // C2021-026 remove from the field applicability list
|
||||
InUseApplcList.Remove(rof);
|
||||
lboxAvail.Refresh();
|
||||
lboxInUse.Refresh();
|
||||
}
|
||||
}
|
||||
}
|
||||
private void btnAdd_Click(object sender, System.EventArgs e)
|
||||
{
|
||||
//get item in lboxInUse (in use list) and remove it from there
|
||||
// and add it to the lboxAvail list.
|
||||
if (lboxAvail.SelectedIndex >=0 )
|
||||
if (PCApplicabilityEnabled) // C2021-026 using the Check Box List
|
||||
{
|
||||
// get the selected item and its string. Remove it from the listbox,
|
||||
// add it to the inuse array list & listbox & then remove it from
|
||||
// the avail(able) array list.
|
||||
int indx = lboxAvail.SelectedIndex;
|
||||
lboxAvail.Items.RemoveAt(indx);
|
||||
|
||||
// copy if over to availlist
|
||||
ROField rof = (ROField) AvailList[indx];
|
||||
ROField copyrof = new ROField(rof.GetFieldname,rof.GetRecID,rof.GetMasterRecID,rof.GetFieldType);
|
||||
InUseList.Add(copyrof);
|
||||
if (lboxAvail.SelectedIndex >= 0)
|
||||
{
|
||||
// get the selected item and its string. Remove it from the listbox,
|
||||
// add it to the inuse array list & listbox & then remove it from
|
||||
// the avail(able) array list.
|
||||
int indx = lboxAvail.SelectedIndex;
|
||||
lboxAvail.Items.RemoveAt(indx);
|
||||
|
||||
lboxInUse.Items.Add(copyrof.GetFieldname);
|
||||
AvailList.RemoveAt(indx);
|
||||
lboxAvail.Refresh();
|
||||
lboxInUse.Refresh();
|
||||
btnOK.Enabled=true;
|
||||
// copy if over to availlist
|
||||
ROField rof = (ROField)AvailList[indx];
|
||||
ROField copyrof = new ROField(rof.GetFieldname, rof.GetRecID, rof.GetMasterRecID, rof.GetFieldType);
|
||||
InUseList.Add(copyrof);
|
||||
|
||||
lboxInUseCB.Items.Add(copyrof.GetFieldname);
|
||||
AvailList.RemoveAt(indx);
|
||||
lboxAvail.Refresh();
|
||||
lboxInUseCB.Refresh();
|
||||
btnOK.Enabled = true;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (lboxAvail.SelectedIndex >= 0)
|
||||
{
|
||||
// get the selected item and its string. Remove it from the listbox,
|
||||
// add it to the inuse array list & listbox & then remove it from
|
||||
// the avail(able) array list.
|
||||
int indx = lboxAvail.SelectedIndex;
|
||||
lboxAvail.Items.RemoveAt(indx);
|
||||
|
||||
// copy if over to availlist
|
||||
ROField rof = (ROField)AvailList[indx];
|
||||
ROField copyrof = new ROField(rof.GetFieldname, rof.GetRecID, rof.GetMasterRecID, rof.GetFieldType);
|
||||
InUseList.Add(copyrof);
|
||||
|
||||
lboxInUse.Items.Add(copyrof.GetFieldname);
|
||||
AvailList.RemoveAt(indx);
|
||||
lboxAvail.Refresh();
|
||||
lboxInUse.Refresh();
|
||||
btnOK.Enabled = true;
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -849,6 +971,17 @@ namespace ROEditor
|
||||
if (i+1 < InUseList.Count) inuserecs = inuserecs + " ";
|
||||
}
|
||||
}
|
||||
// C2021-026 save the fields with applicability set
|
||||
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 + " ";
|
||||
}
|
||||
}
|
||||
|
||||
// save the database record, saving modified data as appropriate -- if a mod
|
||||
// occurred at this level, add it to the attribute list too.
|
||||
@@ -877,6 +1010,12 @@ namespace ROEditor
|
||||
elem.SetAttribute("FieldsInUse", inuserecs);
|
||||
mod = true;
|
||||
}
|
||||
//C2021-026 save the list of field recids that use applicability
|
||||
if (applicfieldrecs != origApplicFields)
|
||||
{
|
||||
elem.SetAttribute("ApplicabilityEnabled", applicfieldrecs);
|
||||
mod = true;
|
||||
}
|
||||
}
|
||||
|
||||
if (editlevel == (uint) RecordType.GroupSchema)
|
||||
@@ -941,7 +1080,8 @@ namespace ROEditor
|
||||
// Get the field which is active & it's type. Pass the field through to the field
|
||||
// editor.
|
||||
int indx;
|
||||
indx = lboxInUse.SelectedIndex;
|
||||
// C2021-026 get the selected index base on wich InUse list is being used
|
||||
indx = (PCApplicabilityEnabled)? lboxInUseCB.SelectedIndex : lboxInUse.SelectedIndex;
|
||||
if (indx >= 0)
|
||||
rof = (ROField) InUseList[indx];
|
||||
else
|
||||
@@ -975,13 +1115,29 @@ namespace ROEditor
|
||||
// Update Lists & Text boxes to represent any modified text.
|
||||
if (isInSelList)
|
||||
{
|
||||
lboxInUse.Items.Clear();
|
||||
if (PCApplicabilityEnabled)
|
||||
lboxInUseCB.Items.Clear();
|
||||
else
|
||||
lboxInUse.Items.Clear();
|
||||
// add items to the InUseList box.
|
||||
for (int i=0; i< InUseList.Count; i++)
|
||||
{
|
||||
rof = (ROField) InUseList[i];
|
||||
if (rof.GetFieldname != null)
|
||||
this.lboxInUse.Items.Add(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
|
||||
if (PCApplicabilityEnabled)
|
||||
{
|
||||
this.lboxInUseCB.Items.Add(rof.GetFieldname);
|
||||
if (rof.FieldTypeCanDoApplicability())
|
||||
{
|
||||
if (ContainedInUseApplicList(rof))
|
||||
this.lboxInUseCB.SetItemCheckState(lboxInUseCB.Items.IndexOf(rof.GetFieldname), CheckState.Checked);
|
||||
}
|
||||
}
|
||||
else
|
||||
this.lboxInUse.Items.Add(rof.GetFieldname);
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
@@ -1009,6 +1165,32 @@ namespace ROEditor
|
||||
lboxAvail.Items.Add(rof.GetFieldname);
|
||||
}
|
||||
}
|
||||
// C2021-026 Check/un-check field for Parent/Child values
|
||||
private void lboxInUseCB_ItemCheck(object sender, ItemCheckEventArgs e)
|
||||
{
|
||||
if (_initializing) return;
|
||||
ROField rof = (ROField)InUseList[e.Index];
|
||||
bool isInAplicList = ContainedInUseApplicList(rof);
|
||||
if (!rof.FieldTypeCanDoApplicability())
|
||||
{
|
||||
MessageBox.Show("Cannot Enable Applicability on this RO Field type.", "Enable Applicabilty", MessageBoxButtons.OK, MessageBoxIcon.Information);
|
||||
e.NewValue = CheckState.Unchecked;
|
||||
}
|
||||
else if (e.NewValue == CheckState.Checked) //we are going to check it - add tothe applic list
|
||||
{
|
||||
if (!isInAplicList) // make sure it's not already in the list (this should never happen)
|
||||
InUseApplcList.Add(rof);
|
||||
}
|
||||
else if (isInAplicList) // we are un-checking it. Remove it from the applic list
|
||||
{
|
||||
for (int i = 0; i < InUseApplcList.Count; i++)
|
||||
if ((InUseApplcList[i] as ROField).GetRecID == rof.GetRecID)
|
||||
{
|
||||
InUseApplcList.RemoveAt(i);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#region Windows Form Designer generated code
|
||||
/// <summary>
|
||||
@@ -1024,12 +1206,14 @@ namespace ROEditor
|
||||
this.tbMenuVal = new System.Windows.Forms.TextBox();
|
||||
this.lblGroupText = new System.Windows.Forms.Label();
|
||||
this.gbFields = new System.Windows.Forms.GroupBox();
|
||||
this.lb_chkApplc = new System.Windows.Forms.Label();
|
||||
this.btnNew = new System.Windows.Forms.Button();
|
||||
this.btnRemove = new System.Windows.Forms.Button();
|
||||
this.btnEdit = new System.Windows.Forms.Button();
|
||||
this.btnAdd = new System.Windows.Forms.Button();
|
||||
this.lboxAvail = new System.Windows.Forms.ListBox();
|
||||
this.lboxInUse = new System.Windows.Forms.ListBox();
|
||||
this.lboxInUseCB = new System.Windows.Forms.CheckedListBox(); // C2021-026 list with check boxes to enable P/C on field
|
||||
this.lblAvail = new System.Windows.Forms.Label();
|
||||
this.lblInUse = new System.Windows.Forms.Label();
|
||||
this.btnOK = new System.Windows.Forms.Button();
|
||||
@@ -1090,22 +1274,32 @@ namespace ROEditor
|
||||
//
|
||||
// gbFields
|
||||
//
|
||||
this.gbFields.Controls.AddRange(new System.Windows.Forms.Control[] {
|
||||
this.btnNew,
|
||||
this.btnRemove,
|
||||
this.btnEdit,
|
||||
this.btnAdd,
|
||||
this.lboxAvail,
|
||||
this.lboxInUse,
|
||||
this.lblAvail,
|
||||
this.lblInUse});
|
||||
this.gbFields.Controls.Add(this.lb_chkApplc);
|
||||
this.gbFields.Controls.Add(this.btnNew);
|
||||
this.gbFields.Controls.Add(this.btnRemove);
|
||||
this.gbFields.Controls.Add(this.btnEdit);
|
||||
this.gbFields.Controls.Add(this.btnAdd);
|
||||
this.gbFields.Controls.Add(this.lboxAvail);
|
||||
this.gbFields.Controls.Add(this.lboxInUse);
|
||||
this.gbFields.Controls.Add(this.lboxInUseCB);
|
||||
this.gbFields.Controls.Add(this.lblAvail);
|
||||
this.gbFields.Controls.Add(this.lblInUse);
|
||||
this.gbFields.Location = new System.Drawing.Point(8, 112);
|
||||
this.gbFields.Name = "gbFields";
|
||||
this.gbFields.Size = new System.Drawing.Size(704, 224);
|
||||
this.gbFields.Size = new System.Drawing.Size(704, 247);
|
||||
this.gbFields.TabIndex = 8;
|
||||
this.gbFields.TabStop = false;
|
||||
this.gbFields.Text = "Fields";
|
||||
//
|
||||
// lb_chkApplc
|
||||
//
|
||||
this.lb_chkApplc.Font = new System.Drawing.Font("Tahoma", 9F, System.Drawing.FontStyle.Italic, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.lb_chkApplc.Location = new System.Drawing.Point(69, 24);
|
||||
this.lb_chkApplc.Name = "lb_chkApplc";
|
||||
this.lb_chkApplc.Size = new System.Drawing.Size(227, 16);
|
||||
this.lb_chkApplc.TabIndex = 8;
|
||||
this.lb_chkApplc.Text = "(Check Parent/Child Applicability Fields)";
|
||||
//
|
||||
// btnNew
|
||||
//
|
||||
this.btnNew.Location = new System.Drawing.Point(608, 48);
|
||||
@@ -1150,17 +1344,25 @@ namespace ROEditor
|
||||
this.lboxAvail.ItemHeight = 14;
|
||||
this.lboxAvail.Location = new System.Drawing.Point(376, 48);
|
||||
this.lboxAvail.Name = "lboxAvail";
|
||||
this.lboxAvail.Size = new System.Drawing.Size(216, 144);
|
||||
this.lboxAvail.Size = new System.Drawing.Size(216, 172);
|
||||
this.lboxAvail.TabIndex = 3;
|
||||
//
|
||||
// lboxInUse
|
||||
//
|
||||
this.lboxInUse.ItemHeight = 14;
|
||||
this.lboxInUse.Location = new System.Drawing.Point(24, 48);
|
||||
this.lboxInUse.Location = new System.Drawing.Point(27, 48);
|
||||
this.lboxInUse.Name = "lboxInUse";
|
||||
this.lboxInUse.Size = new System.Drawing.Size(216, 144);
|
||||
this.lboxInUse.Size = new System.Drawing.Size(216, 172);
|
||||
this.lboxInUse.TabIndex = 2;
|
||||
//
|
||||
// lboxInUseCB
|
||||
//
|
||||
this.lboxInUseCB.Location = new System.Drawing.Point(27, 48);
|
||||
this.lboxInUseCB.Name = "lboxInUseCB";
|
||||
this.lboxInUseCB.Size = new System.Drawing.Size(216, 174);
|
||||
this.lboxInUseCB.TabIndex = 2;
|
||||
this.lboxInUseCB.ItemCheck += new System.Windows.Forms.ItemCheckEventHandler(this.lboxInUseCB_ItemCheck);
|
||||
//
|
||||
// lblAvail
|
||||
//
|
||||
this.lblAvail.Location = new System.Drawing.Point(384, 24);
|
||||
@@ -1200,21 +1402,21 @@ namespace ROEditor
|
||||
//
|
||||
this.AutoScaleBaseSize = new System.Drawing.Size(6, 15);
|
||||
this.ClientSize = new System.Drawing.Size(792, 437);
|
||||
this.Controls.AddRange(new System.Windows.Forms.Control[] {
|
||||
this.btnCancel,
|
||||
this.btnOK,
|
||||
this.gbFields,
|
||||
this.lblGroupText,
|
||||
this.tbMenuVal,
|
||||
this.tbRetVal,
|
||||
this.lblMenuVal,
|
||||
this.lblRetVal,
|
||||
this.lblGroup});
|
||||
this.Font = new System.Drawing.Font("Tahoma", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0)));
|
||||
this.Controls.Add(this.btnCancel);
|
||||
this.Controls.Add(this.btnOK);
|
||||
this.Controls.Add(this.gbFields);
|
||||
this.Controls.Add(this.lblGroupText);
|
||||
this.Controls.Add(this.tbMenuVal);
|
||||
this.Controls.Add(this.tbRetVal);
|
||||
this.Controls.Add(this.lblMenuVal);
|
||||
this.Controls.Add(this.lblRetVal);
|
||||
this.Controls.Add(this.lblGroup);
|
||||
this.Font = new System.Drawing.Font("Tahoma", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.Name = "RODefFrm";
|
||||
this.Text = "Referenced Object Definition";
|
||||
this.gbFields.ResumeLayout(false);
|
||||
this.ResumeLayout(false);
|
||||
this.PerformLayout();
|
||||
|
||||
}
|
||||
#endregion
|
||||
|
@@ -1,75 +1,96 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 1.3
|
||||
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>
|
||||
|
||||
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">1.3</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1">this is my long string</data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
[base64 mime encoded serialized .NET Framework object]
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
[base64 mime encoded string representing a byte array form of the .NET Framework object]
|
||||
</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.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.
|
||||
-->
|
||||
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" msdata:Ordinal="1" />
|
||||
<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">
|
||||
@@ -88,15 +109,12 @@
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>1.3</value>
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=1.0.3300.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 name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=1.0.3300.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<data name="$this.Name">
|
||||
<value>RODefFrm</value>
|
||||
</data>
|
||||
</root>
|
@@ -1,5 +1,5 @@
|
||||
/*********************************************************************************************
|
||||
* Copyright 2002 - Volian Enterprises, Inc. All rights reserved.
|
||||
* Copyright 2021 - Volian Enterprises, Inc. All rights reserved.
|
||||
* Volian Enterprises - Proprietary Information - DO NOT COPY OR DISTRIBUTE
|
||||
* ------------------------------------------------------------------------------
|
||||
* $Workfile: ROEditor.cs $ $Revision: 54 $
|
||||
@@ -350,6 +350,7 @@ namespace ROEditor
|
||||
private System.Windows.Forms.MenuItem menuEditSelAll;
|
||||
private TreeNode LastSelectedNode;
|
||||
private TextBox _CurrentTextBox; // currently selected TextBox field
|
||||
public static string[] PCChildren; //C2021-026 list of Parent/Child Children
|
||||
|
||||
public TextBox CurrentTextBox
|
||||
{
|
||||
@@ -887,9 +888,9 @@ namespace ROEditor
|
||||
}
|
||||
}
|
||||
|
||||
private void CreateCtlXmlEdit2(VlnXmlElement curelem, XmlSchema myschema, ArrayList reqfields)
|
||||
private void CreateCtlXmlEdit2(VlnXmlElement curelem, XmlSchema myschema, ArrayList reqfields, ArrayList fieldsWithApplic)
|
||||
{
|
||||
ctlXMLEdit2 = new ctlXMLEditLib.ctlXMLEdit(curelem,myschema,reqfields);
|
||||
ctlXMLEdit2 = new ctlXMLEditLib.ctlXMLEdit(curelem,myschema,reqfields,fieldsWithApplic,PCChildren); // C2021-026 pass in P/C enabled information
|
||||
ctlXMLEdit2.AutoScroll = true;
|
||||
ctlXMLEdit2.Font = new System.Drawing.Font("Tahoma", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0)));
|
||||
ctlXMLEdit2.Name = "ctlXMLEdit2";
|
||||
@@ -927,9 +928,29 @@ namespace ROEditor
|
||||
this.panel2.Controls.Add(ctlXMLEdit2);
|
||||
tbtnCancel.Enabled = true;
|
||||
}
|
||||
|
||||
// C2021-026 Get a list of fields that are P/C enabled
|
||||
private ArrayList GetApplcFieldListForElement(VlnXmlElement elem)
|
||||
{
|
||||
ArrayList rtnval = null;
|
||||
ArrayList InUseApplcList = null;
|
||||
ArrayList AvailList = null;
|
||||
ArrayList InUseList = null;
|
||||
string origFieldsInUse = "";
|
||||
string origApplicFields = "";
|
||||
ArrayList tmp = myrodb.RODB_GetFields((VlnXmlElement)elem.ParentNode, (uint)RecordType.Schema);
|
||||
// put the items in the AvailList box.
|
||||
if (AvailList == null) AvailList = new ArrayList();
|
||||
for (int i = 0; i < tmp.Count; i++) AvailList.Add(tmp[i]); // don't modify the list returned from RODB_GetFields since it is part of dictionary
|
||||
InUseList = myrodb.RODB_GetFieldsInUse((VlnXmlElement)elem.ParentNode, AvailList, "FieldsInUse", ref origFieldsInUse, false);
|
||||
InUseApplcList = myrodb.RODB_GetApplicabilityEnabledFields((VlnXmlElement)elem.ParentNode, InUseList, ref origApplicFields, ApplicabilityEnabled());
|
||||
rtnval = new ArrayList();
|
||||
foreach (ROField rof in InUseApplcList)
|
||||
rtnval.Add(rof.GetFieldname);
|
||||
return rtnval;
|
||||
}
|
||||
private void EditRO(VlnXmlElement curelem)
|
||||
{
|
||||
ArrayList fieldsWithApplic = null;
|
||||
newone=null;
|
||||
// can't edit fields for top or top group nodes (top node not editable,
|
||||
// and top group node data change at properties level).
|
||||
@@ -944,6 +965,10 @@ namespace ROEditor
|
||||
// a message. (B2004-017)
|
||||
if (curelem.Name != "vlnGroup")
|
||||
{
|
||||
// C2021-026 Get the list of fields with P/C enabled
|
||||
// use the curelm.parent and calls similar to what is in RODefFrm.cs
|
||||
fieldsWithApplic = GetApplcFieldListForElement(curelem);
|
||||
|
||||
myschema = myrodb.RODB_GetSchema(curelem);
|
||||
if (myschema==null)
|
||||
{
|
||||
@@ -965,7 +990,7 @@ namespace ROEditor
|
||||
}
|
||||
|
||||
ArrayList reqfields = curelem.GetRequiredFields();
|
||||
CreateCtlXmlEdit2(curelem,myschema,reqfields);
|
||||
CreateCtlXmlEdit2(curelem,myschema, reqfields, fieldsWithApplic); // C2021-026 pass in P/C enabled fields
|
||||
this.panel2.Controls.Add(ctlXMLEdit2);
|
||||
tbtnSave.Enabled=false; // set initial states of buttons on edit
|
||||
tbtnRestore.Enabled=false;
|
||||
@@ -1406,7 +1431,7 @@ namespace ROEditor
|
||||
this.panel1.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.panel1.Location = new System.Drawing.Point(228, 28);
|
||||
this.panel1.Name = "panel1";
|
||||
this.panel1.Size = new System.Drawing.Size(588, 591);
|
||||
this.panel1.Size = new System.Drawing.Size(710, 591);
|
||||
this.panel1.TabIndex = 5;
|
||||
//
|
||||
// panel2
|
||||
@@ -1447,7 +1472,7 @@ namespace ROEditor
|
||||
this.tbar.Location = new System.Drawing.Point(0, 0);
|
||||
this.tbar.Name = "tbar";
|
||||
this.tbar.ShowToolTips = true;
|
||||
this.tbar.Size = new System.Drawing.Size(816, 28);
|
||||
this.tbar.Size = new System.Drawing.Size(938, 28);
|
||||
this.tbar.TabIndex = 0;
|
||||
this.tbar.TextAlign = System.Windows.Forms.ToolBarTextAlign.Right;
|
||||
this.tbar.ButtonClick += new System.Windows.Forms.ToolBarButtonClickEventHandler(this.tbar_OnClick);
|
||||
@@ -1519,7 +1544,7 @@ namespace ROEditor
|
||||
// Form1
|
||||
//
|
||||
this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);
|
||||
this.ClientSize = new System.Drawing.Size(816, 619);
|
||||
this.ClientSize = new System.Drawing.Size(980, 619);
|
||||
this.Controls.Add(this.lblDuplicateRO);
|
||||
this.Controls.Add(this.panel1);
|
||||
this.Controls.Add(this.splitter1);
|
||||
@@ -1574,24 +1599,37 @@ namespace ROEditor
|
||||
// the the Access database.
|
||||
if (args.Length > 0)
|
||||
{
|
||||
ConnectionPath = args[0];
|
||||
if (args[0].ToUpper().StartsWith("PC="))
|
||||
PCChildren = args[0].Substring(3).Split(','); //C2021-026 list of Parent/Child Children
|
||||
else
|
||||
ConnectionPath = args[0];
|
||||
// Directory.SetCurrentDirectory(ConnectionPath);
|
||||
}
|
||||
else // find ROPATH
|
||||
if (ConnectionPath == null) // RO Path was not passed in, find ROPATH
|
||||
{
|
||||
ConnectionPath = FindTheRODirectory();
|
||||
}
|
||||
if (args.Length > 1)
|
||||
{
|
||||
if (args[1].ToUpper().Contains("DATA SOURCE")) SqlConnectionStr = args[1];
|
||||
if (args[1].ToUpper().StartsWith("PC="))
|
||||
PCChildren = args[1].Substring(3).Split(','); //C2021-026 list of Parent/Child Children
|
||||
else if (args[1].ToUpper().Contains("DATA SOURCE")) SqlConnectionStr = args[1];
|
||||
else specificro = args[1];
|
||||
}
|
||||
if (args.Length > 2)
|
||||
{
|
||||
if (args[2].ToUpper().Contains("DATA SOURCE")) SqlConnectionStr = args[2];
|
||||
if (args[2].ToUpper().StartsWith("PC="))
|
||||
PCChildren = args[2].Substring(3).Split(','); //C2021-026 list of Parent/Child Children
|
||||
else if (args[2].ToUpper().Contains("DATA SOURCE")) SqlConnectionStr = args[2];
|
||||
else specificro = args[2];
|
||||
}
|
||||
try
|
||||
if (args.Length > 3)
|
||||
if (args[3].ToUpper().StartsWith("PC="))
|
||||
PCChildren = args[3].Substring(3).Split(','); //C2021-026 list of Parent/Child Children
|
||||
else if (args[3].ToUpper().Contains("DATA SOURCE")) SqlConnectionStr = args[3];
|
||||
else specificro = args[3];
|
||||
RODB.PCChildList = PCChildren; //C2021-026 pass the Parent/Child info to the RODB class
|
||||
try
|
||||
{
|
||||
// Convert the RO data if needed
|
||||
if (!CheckForDataConversion(ConnectionPath))
|
||||
@@ -1726,6 +1764,12 @@ namespace ROEditor
|
||||
}
|
||||
}
|
||||
|
||||
// C2021-026 was Parent/Child information passed into the RO Editor?
|
||||
public static bool ApplicabilityEnabled()
|
||||
{
|
||||
return (PCChildren != null && PCChildren.Length > 0);
|
||||
}
|
||||
|
||||
/*
|
||||
* Look for the RO directory via PROC.INI and by
|
||||
* looking for a \RO directory in the current VEplant
|
||||
@@ -2011,7 +2055,7 @@ namespace ROEditor
|
||||
int retval = roTreeView_ClearEditDisplay(false);
|
||||
if (retval == -1) return;
|
||||
roListView_ClearListDisplay();
|
||||
CreateCtlXmlEdit2(nelem,myschema,reqfields);
|
||||
CreateCtlXmlEdit2(nelem,myschema,reqfields, null);
|
||||
tbtnSave.Enabled=false; // initial disable the save button
|
||||
ctlXMLEdit2.Focus();
|
||||
tbtnZoom.Enabled = false;
|
||||
@@ -2024,6 +2068,7 @@ namespace ROEditor
|
||||
private void menuNewRefObj_Click(object sender, System.EventArgs e)
|
||||
{
|
||||
int retval = roTreeView_ClearEditDisplay(false);
|
||||
ArrayList InUseApplcList=null;
|
||||
if (retval == -1) return;
|
||||
roListView_ClearListDisplay();
|
||||
VlnXmlElement curelem = (VlnXmlElement) roTreeView.SelectedNode.Tag;
|
||||
@@ -2051,6 +2096,7 @@ namespace ROEditor
|
||||
{
|
||||
curelem.ParentNode.AppendChild((XmlNode) nelem);
|
||||
TreeNewparent = roTreeView.SelectedNode.Parent;
|
||||
InUseApplcList = GetApplcFieldListForElement(curelem); //C2021-026 get list of fields with P/C enabled
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -2060,7 +2106,7 @@ namespace ROEditor
|
||||
newone = nelem;
|
||||
ArrayList reqfields = nelem.GetRequiredFields();
|
||||
|
||||
CreateCtlXmlEdit2(nelem,myschema,reqfields);
|
||||
CreateCtlXmlEdit2(nelem,myschema,reqfields, InUseApplcList);
|
||||
tbtnSave.Enabled=false; // initial disable the save button
|
||||
ctlXMLEdit2.Focus();
|
||||
tbtnZoom.Enabled = false;
|
||||
@@ -2555,7 +2601,8 @@ namespace ROEditor
|
||||
if (rof.GetFieldname != null)
|
||||
{
|
||||
uint ftype = rof.GetFieldType;
|
||||
if (ftype == 1 || ftype == 2 || ftype==4 || ftype==128)
|
||||
if (ftype == (uint)ROFields.FieldTypes.SingleTxt || ftype == (uint)ROFields.FieldTypes.VariableTxt ||
|
||||
ftype == (uint)ROFields.FieldTypes.FrmtSingleTxt || ftype == (uint)ROFields.FieldTypes.Combination)
|
||||
roListView.Columns.Add(rof.GetFieldname, 100,HorizontalAlignment.Left);
|
||||
}
|
||||
}
|
||||
@@ -2594,7 +2641,8 @@ namespace ROEditor
|
||||
if (rof.GetFieldname != null)
|
||||
{
|
||||
uint ftype = rof.GetFieldType;
|
||||
if (ftype == 1 || ftype == 2 || ftype == 4 || ftype == 128)
|
||||
if (ftype == (uint)ROFields.FieldTypes.SingleTxt || ftype == (uint)ROFields.FieldTypes.VariableTxt ||
|
||||
ftype == (uint)ROFields.FieldTypes.FrmtSingleTxt || ftype == (uint)ROFields.FieldTypes.Combination)
|
||||
{
|
||||
string nm0 = rof.GetFieldname;
|
||||
nm = rof.MakeFieldName(nm0);
|
||||
@@ -2711,9 +2759,9 @@ namespace ROEditor
|
||||
byte xbyte, ybyte;
|
||||
xlen = xbuff.Length;
|
||||
ylen = ybuff.Length;
|
||||
if (xbuff[0] == '<')
|
||||
if (xbuff.Length > 0 && xbuff[0] == '<')
|
||||
rtnval = 0;
|
||||
if (ybuff[0] == '<')
|
||||
if (ybuff.Length > 0 && ybuff[0] == '<')
|
||||
rtnval = 0;
|
||||
while ((rtnval==0) && ((xcnt < xlen) || (ycnt < ylen)))
|
||||
{
|
||||
|
@@ -112,20 +112,20 @@
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<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 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>
|
||||
<metadata name="imageListRoTree.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<metadata name="imageListRoTree.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>124, 17</value>
|
||||
</metadata>
|
||||
<data name="imageListRoTree.ImageStream" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>
|
||||
AAEAAAD/////AQAAAAAAAAAMAgAAAFdTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj0yLjAuMC4w
|
||||
AAEAAAD/////AQAAAAAAAAAMAgAAAFdTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj00LjAuMC4w
|
||||
LCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAACZTeXN0
|
||||
ZW0uV2luZG93cy5Gb3Jtcy5JbWFnZUxpc3RTdHJlYW1lcgEAAAAERGF0YQcCAgAAAAkDAAAADwMAAACE
|
||||
CAAAAk1TRnQBSQFMAgEBAgEAARQBAAEUAQABEAEAARABAAT/AQkBAAj/AUIBTQE2AQQGAAE2AQQCAAEo
|
||||
CAAAAk1TRnQBSQFMAgEBAgEAARwBAAEcAQABEAEAARABAAT/AQkBAAj/AUIBTQE2AQQGAAE2AQQCAAEo
|
||||
AwABQAMAARADAAEBAQABCAYAAQQYAAGAAgABgAMAAoABAAGAAwABgAEAAYABAAKAAgADwAEAAcAB3AHA
|
||||
AQAB8AHKAaYBAAEzBQABMwEAATMBAAEzAQACMwIAAxYBAAMcAQADIgEAAykBAANVAQADTQEAA0IBAAM5
|
||||
AQABgAF8Af8BAAJQAf8BAAGTAQAB1gEAAf8B7AHMAQABxgHWAe8BAAHWAucBAAGQAakBrQIAAf8BMwMA
|
||||
@@ -164,18 +164,18 @@
|
||||
AYAPAAEBBwABAwYAAYABBwYAAcYBHwQACw==
|
||||
</value>
|
||||
</data>
|
||||
<metadata name="mainMenu1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<metadata name="mainMenu1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>17, 17</value>
|
||||
</metadata>
|
||||
<metadata name="imageListToolBar.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<metadata name="imageListToolBar.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>256, 17</value>
|
||||
</metadata>
|
||||
<data name="imageListToolBar.ImageStream" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>
|
||||
AAEAAAD/////AQAAAAAAAAAMAgAAAFdTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj0yLjAuMC4w
|
||||
AAEAAAD/////AQAAAAAAAAAMAgAAAFdTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj00LjAuMC4w
|
||||
LCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAACZTeXN0
|
||||
ZW0uV2luZG93cy5Gb3Jtcy5JbWFnZUxpc3RTdHJlYW1lcgEAAAAERGF0YQcCAgAAAAkDAAAADwMAAAAe
|
||||
CwAAAk1TRnQBSQFMAgEBBgEAARQBAAEUAQABEAEAARABAAT/AQkBAAj/AUIBTQE2AQQGAAE2AQQCAAEo
|
||||
CwAAAk1TRnQBSQFMAgEBBgEAARwBAAEcAQABEAEAARABAAT/AQkBAAj/AUIBTQE2AQQGAAE2AQQCAAEo
|
||||
AwABQAMAASADAAEBAQABCAYAAQgYAAGAAgABgAMAAoABAAGAAwABgAEAAYABAAKAAgADwAEAAcAB3AHA
|
||||
AQAB8AHKAaYBAAEzBQABMwEAATMBAAEzAQACMwIAAxYBAAMcAQADIgEAAykBAANVAQADTQEAA0IBAAM5
|
||||
AQABgAF8Af8BAAJQAf8BAAGTAQAB1gEAAf8B7AHMAQABxgHWAe8BAAHWAucBAAGQAakBrQIAAf8BMwMA
|
||||
@@ -225,10 +225,10 @@
|
||||
ASgDAAFAAwABIAMAAQEBAAEBBgABARYAA///AAIACw==
|
||||
</value>
|
||||
</data>
|
||||
<metadata name="$this.TrayHeight" type="System.Int32, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<metadata name="$this.TrayHeight" type="System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>36</value>
|
||||
</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="$this.Icon" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
AAABAAEAICAQAAAAAADoAgAAFgAAACgAAAAgAAAAQAAAAAEABAAAAAAAAAIAAAAAAAAAAAAAEAAAABAA
|
||||
|
@@ -1,5 +1,5 @@
|
||||
/*********************************************************************************************
|
||||
* Copyright 2002 - Volian Enterprises, Inc. All rights reserved.
|
||||
* Copyright 2021 - Volian Enterprises, Inc. All rights reserved.
|
||||
* Volian Enterprises - Proprietary Information - DO NOT COPY OR DISTRIBUTE
|
||||
* ------------------------------------------------------------------------------
|
||||
* $Workfile: RO_FST.cs $ $Revision: 15 $
|
||||
@@ -823,7 +823,7 @@ namespace ROEditor
|
||||
// i =0;
|
||||
// }
|
||||
string cvttmp= CvtFldToUserFld(RtnValTmplate);
|
||||
string RORtnVal = elem.GetReturnValue(ROdatabase,tablename,cvttmp,InUseList,ref RtnVal);
|
||||
string RORtnVal = elem.GetReturnValue(ROdatabase,tablename,cvttmp,InUseList,ref RtnVal,ROEditor.Form1.PCChildren); // C2021-026 pass in P/C Children
|
||||
|
||||
// Write the field type to the FST
|
||||
fhFST.Write(RtnVal);
|
||||
|
Reference in New Issue
Block a user