diff --git a/PROMS/DataLoader/Properties/Settings.Designer.cs b/PROMS/DataLoader/Properties/Settings.Designer.cs index e42c9663..2bca847d 100644 --- a/PROMS/DataLoader/Properties/Settings.Designer.cs +++ b/PROMS/DataLoader/Properties/Settings.Designer.cs @@ -49,6 +49,7 @@ namespace DataLoader.Properties { [global::System.Configuration.UserScopedSettingAttribute()] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Configuration.DefaultSettingValueAttribute("Checked")] public global::System.Windows.Forms.CheckState LoadWordDoc { get { return ((global::System.Windows.Forms.CheckState)(this["LoadWordDoc"])); @@ -60,6 +61,7 @@ namespace DataLoader.Properties { [global::System.Configuration.UserScopedSettingAttribute()] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Configuration.DefaultSettingValueAttribute("Unchecked")] public global::System.Windows.Forms.CheckState LoadRTFDoc { get { return ((global::System.Windows.Forms.CheckState)(this["LoadRTFDoc"])); @@ -71,6 +73,7 @@ namespace DataLoader.Properties { [global::System.Configuration.UserScopedSettingAttribute()] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Configuration.DefaultSettingValueAttribute("Checked")] public global::System.Windows.Forms.CheckState PurgeData { get { return ((global::System.Windows.Forms.CheckState)(this["PurgeData"])); diff --git a/PROMS/DataLoader/Properties/Settings.settings b/PROMS/DataLoader/Properties/Settings.settings index 9d40fcfb..95e88d2c 100644 --- a/PROMS/DataLoader/Properties/Settings.settings +++ b/PROMS/DataLoader/Properties/Settings.settings @@ -9,13 +9,13 @@ - + Checked - + Unchecked - + Checked diff --git a/PROMS/VEPROMS.CSLA.Library/Extension/ItemExt.cs b/PROMS/VEPROMS.CSLA.Library/Extension/ItemExt.cs index 985cf30a..240fefd5 100644 --- a/PROMS/VEPROMS.CSLA.Library/Extension/ItemExt.cs +++ b/PROMS/VEPROMS.CSLA.Library/Extension/ItemExt.cs @@ -885,7 +885,7 @@ namespace VEPROMS.CSLA.Library { get { return ConvertToDisplayText(MyContent.Text); } } - private string ConvertToDisplayText(string txt) + public static string ConvertToDisplayText(string txt) { string retval = txt; retval = StripRtfFormatting(retval); @@ -1681,7 +1681,7 @@ namespace VEPROMS.CSLA.Library cm.CommandText = "vesp_SearchAnnotationItemAndChildren"; cm.Parameters.AddWithValue("@DocVersionList", criteria.DocVersionList); cm.Parameters.AddWithValue("@StepTypeList", criteria.StepTypeList); - cm.Parameters.AddWithValue("@AnnotationTypeList", criteria.StepTypeList); + cm.Parameters.AddWithValue("@AnnotationTypeList", criteria.AnnotationTypeList); cm.Parameters.AddWithValue("@SearchString", criteria.SearchString); cm.Parameters.AddWithValue("@CaseSensitive", criteria.CaseSensitive ? 1 : 0); using (SafeDataReader dr = new SafeDataReader(cm.ExecuteReader())) diff --git a/PROMS/VEPROMS.CSLA.Library/Format/PlantFormat.cs b/PROMS/VEPROMS.CSLA.Library/Format/PlantFormat.cs index f97dd613..c698a372 100644 --- a/PROMS/VEPROMS.CSLA.Library/Format/PlantFormat.cs +++ b/PROMS/VEPROMS.CSLA.Library/Format/PlantFormat.cs @@ -72,7 +72,20 @@ namespace VEPROMS.CSLA.Library get { // TODO: eventually want styles - if (_WindowsFont == _WindowsFont) _WindowsFont = new Font(Family, (float)Size); + if (_WindowsFont == null) + { + FontStyle style = FontStyle.Regular; + if (Style != E_Style.None) + { + if ((Style & E_Style.Bold) != 0) + style |= FontStyle.Bold; + if ((Style & E_Style.Italics) != 0) + style |= FontStyle.Italic; + if ((Style & E_Style.Underline) != 0) + style |= FontStyle.Underline; + } + _WindowsFont = new Font(Family, (float)Size, style); + } return _WindowsFont; } } diff --git a/PROMS/VEPROMS.CSLA.Library/Format/vlnFormat.cs b/PROMS/VEPROMS.CSLA.Library/Format/vlnFormat.cs index 28489044..99bf96be 100644 --- a/PROMS/VEPROMS.CSLA.Library/Format/vlnFormat.cs +++ b/PROMS/VEPROMS.CSLA.Library/Format/vlnFormat.cs @@ -37,9 +37,11 @@ namespace VEPROMS.CSLA.Library { XmlNode xn = null; if (xmlNode != null) - { + { xn = xmlNode.SelectSingleNode(path); - if (xn != null) return xn; + // RHM 2008-12-15 - Added logic to keep looking if a blank attribute is found + if (xn != null && xn is XmlAttribute && (xn as XmlAttribute).Value != "") return xn; + //if (xn != null) return xn; } else { @@ -63,7 +65,8 @@ namespace VEPROMS.CSLA.Library if (xmlNode == null) return null; XmlNode tmpNode = xmlNode; XmlNode xn = xmlNode.SelectSingleNode(path); - while (xn == null)//Walk-up the format tree to find a font node + // RHM 2008-12-15 - Added logic to keep looking if a blank attribute is found + while (xn == null || (xn is XmlAttribute && (xn as XmlAttribute).Value == ""))//Walk-up the format tree to find a font node { if (xmlNode.NodeType == XmlNodeType.Document) { @@ -282,7 +285,7 @@ namespace VEPROMS.CSLA.Library if (ll == null) { XmlNode xn = SelectSingleNode(xPath); - ll = new LazyLoad(xn != null ? (int?)int.Parse(xn.InnerText) : null); + ll = new LazyLoad(xn != null ? (int?)int.Parse("0" + xn.InnerText) : null); } return ll.Value; }