Added private property SelectedSlave
Added DocVersionInfo property to ROFSTLookup class Set DocVersionInfo to DocVersionInfo of ROFstInfo object in ROFSTLookup constructor Added Reset method to ROFSTLookup class Changed return values for ROID parameter of GetRoValue method Changes SectionConfig class to implement IItemConfig interface Added MasterSlave_Applicability property to IItemConfig Changes StepConfig class to implement IItemConfig interface Added MasterSlave_Applicability property to IItemConfig Changed GetGroup method to support multi units
This commit is contained in:
parent
201cac2c54
commit
1e2fedc518
@ -89,14 +89,30 @@ namespace VEPROMS.CSLA.Library
|
|||||||
#region Constructors
|
#region Constructors
|
||||||
private ROFst _ROFst;
|
private ROFst _ROFst;
|
||||||
private ROFstInfo _ROFstInfo;
|
private ROFstInfo _ROFstInfo;
|
||||||
private DocVersionInfo _DocVersionInfo;
|
private int _SelectedSlave;
|
||||||
|
|
||||||
|
private DocVersionInfo _DocVersionInfo;
|
||||||
|
|
||||||
|
public DocVersionInfo DocVersionInfo
|
||||||
|
{
|
||||||
|
get { return _DocVersionInfo; }
|
||||||
|
set
|
||||||
|
{
|
||||||
|
_DocVersionInfo = value;
|
||||||
|
if (_DocVersionInfo.DocVersionConfig.SelectedSlave != _SelectedSlave)
|
||||||
|
{
|
||||||
|
_SelectedSlave = _DocVersionInfo.DocVersionConfig.SelectedSlave;
|
||||||
|
Reset();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
public ROFSTLookup(ROFst rofst)
|
public ROFSTLookup(ROFst rofst)
|
||||||
{
|
{
|
||||||
_ROFst = rofst;
|
_ROFst = rofst;
|
||||||
_ROFstInfo = null;
|
_ROFstInfo = null;
|
||||||
using (ROFstInfo rfi = ROFstInfo.GetJustROFst(_ROFst.ROFstID))
|
using (ROFstInfo rfi = ROFstInfo.GetJustROFst(_ROFst.ROFstID))
|
||||||
{
|
{
|
||||||
_DocVersionInfo = rfi.docVer==null?null: DocVersionInfo.Get(rfi.docVer.VersionID);
|
_DocVersionInfo = rfi.docVer;//==null?null: DocVersionInfo.Get(rfi.docVer.VersionID);
|
||||||
}
|
}
|
||||||
ParseIntoDictionary(rofst.ROLookup);
|
ParseIntoDictionary(rofst.ROLookup);
|
||||||
}
|
}
|
||||||
@ -108,7 +124,7 @@ namespace VEPROMS.CSLA.Library
|
|||||||
// to a docversion. One example of this is when updating ro.fst and comparing the original
|
// to a docversion. One example of this is when updating ro.fst and comparing the original
|
||||||
// with the new to find differences. The docversioninfo is only used to get unit/master
|
// with the new to find differences. The docversioninfo is only used to get unit/master
|
||||||
// slave info, thus is not needed to compare the raw values.
|
// slave info, thus is not needed to compare the raw values.
|
||||||
_DocVersionInfo = _ROFstInfo.docVer==null?null: DocVersionInfo.Get(_ROFstInfo.docVer.VersionID);
|
_DocVersionInfo = _ROFstInfo.docVer;//==null?null: DocVersionInfo.Get(_ROFstInfo.docVer.VersionID);
|
||||||
ParseIntoDictionary(rofstinfo.ROLookup);
|
ParseIntoDictionary(rofstinfo.ROLookup);
|
||||||
}
|
}
|
||||||
public ROFSTLookup(string filePath)
|
public ROFSTLookup(string filePath)
|
||||||
@ -129,6 +145,11 @@ namespace VEPROMS.CSLA.Library
|
|||||||
private int TableID;
|
private int TableID;
|
||||||
private Dictionary<string, rochild> dicRos;
|
private Dictionary<string, rochild> dicRos;
|
||||||
private Dictionary<int, rochild> dicRosIntIDs;
|
private Dictionary<int, rochild> dicRosIntIDs;
|
||||||
|
public void Reset()
|
||||||
|
{
|
||||||
|
dicRos = null;
|
||||||
|
dicRosIntIDs = null;
|
||||||
|
}
|
||||||
#endregion
|
#endregion
|
||||||
#region AppSupport
|
#region AppSupport
|
||||||
public void Close()
|
public void Close()
|
||||||
@ -252,14 +273,24 @@ namespace VEPROMS.CSLA.Library
|
|||||||
return rochld.children[0].value;
|
return rochld.children[0].value;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (ROID == "FFFF00000001") return _ROFstInfo.ROFstAssociations[0].MyDocVersion.DocVersionConfig.Unit_Number;
|
//if (ROID == "FFFF00000001") return _ROFstInfo.ROFstAssociations[0].MyDocVersion.DocVersionConfig.Unit_Number;
|
||||||
if (ROID == "FFFF00000002") return _ROFstInfo.ROFstAssociations[0].MyDocVersion.DocVersionConfig.Other_Unit_Number;
|
//if (ROID == "FFFF00000002") return _ROFstInfo.ROFstAssociations[0].MyDocVersion.DocVersionConfig.Other_Unit_Number;
|
||||||
if (ROID == "FFFF00000003") return _ROFstInfo.ROFstAssociations[0].MyDocVersion.DocVersionConfig.Unit_Text;
|
//if (ROID == "FFFF00000003") return _ROFstInfo.ROFstAssociations[0].MyDocVersion.DocVersionConfig.Unit_Text;
|
||||||
if (ROID == "FFFF00000004") return _ROFstInfo.ROFstAssociations[0].MyDocVersion.DocVersionConfig.Other_Unit_Text;
|
//if (ROID == "FFFF00000004") return _ROFstInfo.ROFstAssociations[0].MyDocVersion.DocVersionConfig.Other_Unit_Text;
|
||||||
if (ROID == "FFFF00000005") return _ROFstInfo.ROFstAssociations[0].MyDocVersion.DocVersionConfig.Unit_ID;
|
//if (ROID == "FFFF00000005") return _ROFstInfo.ROFstAssociations[0].MyDocVersion.DocVersionConfig.Unit_ID;
|
||||||
if (ROID == "FFFF00000006") return _ROFstInfo.ROFstAssociations[0].MyDocVersion.DocVersionConfig.Other_Unit_ID;
|
//if (ROID == "FFFF00000006") return _ROFstInfo.ROFstAssociations[0].MyDocVersion.DocVersionConfig.Other_Unit_ID;
|
||||||
if (ROID == "FFFF00000007") return _ROFstInfo.ROFstAssociations[0].MyDocVersion.DocVersionConfig.Unit_Name;
|
//if (ROID == "FFFF00000007") return _ROFstInfo.ROFstAssociations[0].MyDocVersion.DocVersionConfig.Unit_Name;
|
||||||
if (ROID == "FFFF00000008") return _ROFstInfo.ROFstAssociations[0].MyDocVersion.DocVersionConfig.Other_Unit_Name;
|
//if (ROID == "FFFF00000008") return _ROFstInfo.ROFstAssociations[0].MyDocVersion.DocVersionConfig.Other_Unit_Name;
|
||||||
|
//new stuff
|
||||||
|
if (ROID == "FFFF00000001") return _ROFstInfo.docVer.DocVersionConfig.Unit_Number;
|
||||||
|
if (ROID == "FFFF00000002") return _ROFstInfo.docVer.DocVersionConfig.Other_Unit_Number;
|
||||||
|
if (ROID == "FFFF00000003") return _ROFstInfo.docVer.DocVersionConfig.Unit_Text;
|
||||||
|
if (ROID == "FFFF00000004") return _ROFstInfo.docVer.DocVersionConfig.Other_Unit_Text;
|
||||||
|
if (ROID == "FFFF00000005") return _ROFstInfo.docVer.DocVersionConfig.Unit_ID;
|
||||||
|
if (ROID == "FFFF00000006") return _ROFstInfo.docVer.DocVersionConfig.Other_Unit_ID;
|
||||||
|
if (ROID == "FFFF00000007") return _ROFstInfo.docVer.DocVersionConfig.Unit_Name;
|
||||||
|
if (ROID == "FFFF00000008") return _ROFstInfo.docVer.DocVersionConfig.Other_Unit_Name;
|
||||||
|
//end new stuff
|
||||||
if (ROID.StartsWith("FFFF")) return "?"; // string.Format("Invalid Unit RO '{0}'", ROID);
|
if (ROID.StartsWith("FFFF")) return "?"; // string.Format("Invalid Unit RO '{0}'", ROID);
|
||||||
return "?"; // string.Format("Invalid RO '{0}'", ROID);
|
return "?"; // string.Format("Invalid RO '{0}'", ROID);
|
||||||
}
|
}
|
||||||
|
@ -8,7 +8,7 @@ namespace VEPROMS.CSLA.Library
|
|||||||
{
|
{
|
||||||
[Serializable]
|
[Serializable]
|
||||||
[TypeConverter(typeof(ExpandableObjectConverter))]
|
[TypeConverter(typeof(ExpandableObjectConverter))]
|
||||||
public class SectionConfig : ConfigDynamicTypeDescriptor, INotifyPropertyChanged
|
public class SectionConfig : ConfigDynamicTypeDescriptor, INotifyPropertyChanged, IItemConfig
|
||||||
{
|
{
|
||||||
#region DynamicTypeDescriptor
|
#region DynamicTypeDescriptor
|
||||||
internal override bool IsReadOnly
|
internal override bool IsReadOnly
|
||||||
@ -770,5 +770,27 @@ namespace VEPROMS.CSLA.Library
|
|||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
#region IItemConfig Members
|
||||||
|
|
||||||
|
[Category("Master/Slave Settings")]
|
||||||
|
[DisplayName("Applicability")]
|
||||||
|
[RefreshProperties(RefreshProperties.All)]
|
||||||
|
[Description("Scope Applicability")]
|
||||||
|
public Volian.Base.Library.BigNum MasterSlave_Applicability
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
string s = _Xp["MasterSlave", "Applicability"];
|
||||||
|
return new Volian.Base.Library.BigNum(s);
|
||||||
|
}
|
||||||
|
set
|
||||||
|
{
|
||||||
|
_Xp["MasterSlave", "Applicability"] = value.FlagList;
|
||||||
|
OnPropertyChanged("MasterSlave_Applicability");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -8,7 +8,7 @@ namespace VEPROMS.CSLA.Library
|
|||||||
{
|
{
|
||||||
[Serializable]
|
[Serializable]
|
||||||
[TypeConverter(typeof(ExpandableObjectConverter))]
|
[TypeConverter(typeof(ExpandableObjectConverter))]
|
||||||
public class StepConfig : ConfigDynamicTypeDescriptor, INotifyPropertyChanged
|
public class StepConfig : ConfigDynamicTypeDescriptor, INotifyPropertyChanged, IItemConfig
|
||||||
{
|
{
|
||||||
#region DynamicTypeDescriptor
|
#region DynamicTypeDescriptor
|
||||||
internal override bool IsReadOnly
|
internal override bool IsReadOnly
|
||||||
@ -252,5 +252,30 @@ namespace VEPROMS.CSLA.Library
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
#region IItemConfig Members
|
||||||
|
|
||||||
|
[Category("Master/Slave Settings")]
|
||||||
|
[DisplayName("Applicability")]
|
||||||
|
[RefreshProperties(RefreshProperties.All)]
|
||||||
|
[Description("Scope Applicability")]
|
||||||
|
public Volian.Base.Library.BigNum MasterSlave_Applicability
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
string s = _Xp["MasterSlave", "Applicability"];
|
||||||
|
return new Volian.Base.Library.BigNum(s);
|
||||||
|
}
|
||||||
|
set
|
||||||
|
{
|
||||||
|
if (value != null)
|
||||||
|
_Xp["MasterSlave", "Applicability"] = value.FlagList;
|
||||||
|
else
|
||||||
|
_Xp["MasterSlave", "Applicability"] = null;
|
||||||
|
OnPropertyChanged("MasterSlave_Applicability");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -54,9 +54,10 @@ namespace VEPROMS.CSLA.Library
|
|||||||
}
|
}
|
||||||
private XmlNode GetGroup(string group)
|
private XmlNode GetGroup(string group)
|
||||||
{
|
{
|
||||||
//XmlNodeList xl = _XmlContents.DocumentElement.SelectNodes(string.Format("//{0}", group));
|
XmlNodeList xl = _XmlContents.DocumentElement.SelectNodes(string.Format("//{0}", group));
|
||||||
XmlNodeList xl = _XmlContents.DocumentElement.SelectNodes(
|
if(xl.Count == 0)
|
||||||
string.Format("//*[translate(local-name(), 'ABCDEFGHIJKLMNOPQRSTUVWXYZ','abcdefghijklmnopqrstuvwxyz')='{0}']", group.ToLower()));
|
xl = _XmlContents.DocumentElement.SelectNodes(
|
||||||
|
string.Format("//*[translate(local-name(), 'ABCDEFGHIJKLMNOPQRSTUVWXYZ','abcdefghijklmnopqrstuvwxyz')='{0}']", group.ToLower()));
|
||||||
switch (xl.Count)
|
switch (xl.Count)
|
||||||
{
|
{
|
||||||
case 0: // No nodes found
|
case 0: // No nodes found
|
||||||
|
Loading…
x
Reference in New Issue
Block a user