From cfb0981a22d2211cd05002ba53abd7823a3ea879 Mon Sep 17 00:00:00 2001 From: Kathy Date: Wed, 22 Jan 2014 12:03:00 +0000 Subject: [PATCH] Page Num Transition Initial version needed for Page Num Transition --- .../DlgPrintProcedure.cs | 4 +- .../Config/TransitionConfig.cs | 62 +++++++++++++++++++ 2 files changed, 64 insertions(+), 2 deletions(-) create mode 100644 PROMS/VEPROMS.CSLA.Library/Config/TransitionConfig.cs diff --git a/PROMS/VEPROMS User Interface/DlgPrintProcedure.cs b/PROMS/VEPROMS User Interface/DlgPrintProcedure.cs index 0f647109..05d76164 100644 --- a/PROMS/VEPROMS User Interface/DlgPrintProcedure.cs +++ b/PROMS/VEPROMS User Interface/DlgPrintProcedure.cs @@ -645,8 +645,8 @@ namespace VEPROMS // Determine change bar settings. First get from config & then see if override from dialog. // Also check that format allows override. ChangeBarDefinition cbd = DetermineChangeBarSettings(); - if (MyProcedure.MyDocVersion.DocVersionConfig.SelectedSlave > 0) - MyProcedure = ProcedureInfo.GetItemAndChildrenByUnit(MyProcedure.ItemID, 0, MyProcedure.MyDocVersion.DocVersionConfig.SelectedSlave); + if (MyProcedure.MyDocVersion.DocVersionConfig.SelectedSlave > 0 || MyProcedure.ActiveFormat.PlantFormat.FormatData.TransData.UseTransitionModifier) + MyProcedure = ProcedureInfo.GetItemAndChildrenByUnit(MyProcedure.ItemID, 0, MyProcedure.MyDocVersion.DocVersionConfig.SelectedSlave); else MyProcedure = ProcedureInfo.GetItemAndChildren(MyProcedure.ItemID); // RHM 20120925 Overlay the bottom of the dialog so that cancel button is covered. diff --git a/PROMS/VEPROMS.CSLA.Library/Config/TransitionConfig.cs b/PROMS/VEPROMS.CSLA.Library/Config/TransitionConfig.cs new file mode 100644 index 00000000..21ca181d --- /dev/null +++ b/PROMS/VEPROMS.CSLA.Library/Config/TransitionConfig.cs @@ -0,0 +1,62 @@ +using System; +using System.Collections.Generic; +using System.Text; +using System.ComponentModel; + +namespace VEPROMS.CSLA.Library +{ + [Serializable] + [TypeConverter(typeof(ExpandableObjectConverter))] + public class TransitionConfig : ConfigDynamicTypeDescriptor, INotifyPropertyChanged + { + private XMLProperties _Xp; + private XMLProperties Xp + { + get { return _Xp; } + } + public TransitionConfig(string xml) + { + if (xml == string.Empty) xml = ""; + _Xp = new XMLProperties(xml); + } + public TransitionConfig(TransitionInfo ti) + { + string xml = ti.Config; + if (xml == string.Empty) xml = ""; + _Xp = new XMLProperties(xml); + } + public TransitionConfig(Transition t) + { + string xml = t.Config; + if (xml == string.Empty) xml = ""; + _Xp = new XMLProperties(xml); + } + public TransitionConfig() + { + _Xp = new XMLProperties(); + } + public override string ToString() + { + string s = _Xp.ToString(); + if (s == "" || s == "") return string.Empty; + return s; + } + #region GeneralTransitionProperties + [Category("Formatted")] // format transition, i.e. include page number + [DisplayName("Formatted")] + [RefreshProperties(RefreshProperties.All)] + [Description("Formatted")] + public string Transition_Formatted + { + get + { + return _Xp["Transition", "Formatted"]; + } + set + { + _Xp["Transition", "Formatted"] = value; + } + } + #endregion + } +}