Added timing logic
Changed menu text Support Procedure and ProcedureInfo Added ChangeBar support Fixed Ancestor Inheritance
This commit is contained in:
parent
f2c571b113
commit
f21a49d75e
@ -367,7 +367,7 @@ namespace VEPROMS.CSLA.Library
|
||||
[TypeConverter(typeof(EnumDescConverter))]
|
||||
public enum PrintChangeBar : int
|
||||
{
|
||||
[Description("Select Before Printing")]
|
||||
[Description("No Default, Select Before Printing")]
|
||||
SelectBeforePrinting = 0,
|
||||
[Description("Without Change Bars")]
|
||||
Without,
|
||||
|
@ -56,7 +56,8 @@ namespace VEPROMS.CSLA.Library
|
||||
if (args.AncestorLookup || ParentLookup)
|
||||
{
|
||||
string retval;
|
||||
ProcedureInfo proc = _Procedure.MyProcedureInfo;
|
||||
//ProcedureInfo proc = _Procedure.MyProcedureInfo;
|
||||
ProcedureInfo proc = _Procedure != null ? _Procedure.MyProcedureInfo : _ProcedureInfo;
|
||||
while (proc.ActiveParent.GetType() == typeof(ProcedureInfo))
|
||||
{
|
||||
retval = proc.ProcedureConfig.GetValue(args.Group, args.Item);
|
||||
@ -96,6 +97,8 @@ namespace VEPROMS.CSLA.Library
|
||||
string xml = procedureInfo.MyContent.Config;
|
||||
if (xml == string.Empty) xml = "<config/>";
|
||||
_Xp = new XMLProperties(xml);
|
||||
_Xp.AncestorLookup = true;
|
||||
if (procedureInfo.ActiveParent != null) _Xp.LookInAncestor += new XMLPropertiesEvent(Xp_LookInAncestorFolder);
|
||||
}
|
||||
public ProcedureConfig(string xml)
|
||||
{
|
||||
|
@ -173,6 +173,25 @@ namespace VEPROMS.CSLA.Library
|
||||
OnPropertyChanged("Step_CBOverride");
|
||||
}
|
||||
}
|
||||
public string Step_MultipleChangeID
|
||||
{
|
||||
get
|
||||
{
|
||||
string s = _Xp["Step", "MultipleChangeID"];
|
||||
|
||||
if (s == string.Empty) return null;
|
||||
return s;
|
||||
}
|
||||
set
|
||||
{
|
||||
string s = _Xp["Step", "MultipleChangeID"];
|
||||
|
||||
if (value != null && value.ToString() == s) return;
|
||||
if (value == null && s != null) _Xp["Step", "MultipleChangeID"] = null;
|
||||
else _Xp["Step", "MultipleChangeID"] = value.ToString();
|
||||
OnPropertyChanged("Step_MultipleChangeID");
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
|
@ -18,6 +18,14 @@ namespace VEPROMS.CSLA.Library
|
||||
return string.Empty;
|
||||
}
|
||||
#endregion
|
||||
private bool _AncestorLookup=false;
|
||||
|
||||
public bool AncestorLookup
|
||||
{
|
||||
get { return _AncestorLookup; }
|
||||
set { _AncestorLookup = value; }
|
||||
}
|
||||
|
||||
#region Constructors
|
||||
public XMLProperties()
|
||||
{
|
||||
@ -83,11 +91,11 @@ namespace VEPROMS.CSLA.Library
|
||||
get
|
||||
{
|
||||
if (_ParentLookup)
|
||||
return OnLookInAncestor(this, new XMLPropertiesArgs(group, item));
|
||||
return OnLookInAncestor(this, new XMLPropertiesArgs(group, item, AncestorLookup));
|
||||
XmlNode xn = GetGroup(group);
|
||||
if (xn == null) return OnLookInAncestor(this,new XMLPropertiesArgs(group,item));
|
||||
if (xn == null) return OnLookInAncestor(this, new XMLPropertiesArgs(group, item, AncestorLookup));
|
||||
XmlNode xa = GetItem(xn, item);
|
||||
if (xa == null) return OnLookInAncestor(this, new XMLPropertiesArgs(group, item));
|
||||
if (xa == null) return OnLookInAncestor(this, new XMLPropertiesArgs(group, item, AncestorLookup));
|
||||
return xa.InnerText;
|
||||
}
|
||||
set
|
||||
|
@ -75,10 +75,12 @@ namespace PrintMSWord
|
||||
_ElapsedTime = new Dictionary<PromsPrinterStatusType, TimeSpan>();
|
||||
DateTime tStart = DateTime.Now;
|
||||
string pdfFile = pp.Print(@"C:\TEMP\32Bit", _MyProms2010Print, null, this);
|
||||
DateTime tEnd = DateTime.Now;
|
||||
_ElapsedTime.Add(PromsPrinterStatusType.Total, DateTime.Now - tStart);
|
||||
MyStatus = pdfFile + " created.";
|
||||
this.Cursor = saveCursor;
|
||||
ShowElapsedTime();
|
||||
MyStatus = string.Format("{0} created in {1:0.} milliseconds",pdfFile,(TimeSpan.FromTicks(tEnd.Ticks - tStart.Ticks).TotalMilliseconds));
|
||||
}
|
||||
private void ShowElapsedTime()
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user