Beispiel #1
0
        /// <summary>
        /// 속성들을 Xml Attribute로 생성합니다.
        /// </summary>
        /// <param name="writer">Attribute를 쓸 Writer</param>
        public override void GenerateXmlAttributes(System.Xml.XmlWriter writer)
        {
            base.GenerateXmlAttributes(writer);

            if (DataStreamUrl.IsNotWhiteSpace())
            {
                writer.WriteAttributeString("dataStreamUrl", DataStreamUrl.UrlEncode());
            }
            if (RefreshInterval.HasValue)
            {
                writer.WriteAttributeString("refreshInterval", RefreshInterval.ToString());
            }
            if (DataStamp.IsNotWhiteSpace())
            {
                writer.WriteAttributeString("dataStamp", DataStamp);
            }
            if (ShowRTMenuItem.HasValue)
            {
                writer.WriteAttributeString("ShowRTMenuItem", ShowRTMenuItem.GetHashCode().ToString());
            }

            if (AnnRenderDelay.HasValue)
            {
                writer.WriteAttributeString("AnnRenderDelay", AnnRenderDelay.Value.ToString());
            }
            if (AutoScale.HasValue)
            {
                writer.WriteAttributeString("AutoScale", AutoScale.GetHashCode().ToString());
            }

            if (IsEditMode.HasValue)
            {
                writer.WriteAttributeString("IsEditMode", IsEditMode.GetHashCode().ToString());
            }

            if (ConnectNullData.HasValue)
            {
                writer.WriteAttributeString("ConnectNullData", ConnectNullData.GetHashCode().ToString());
            }

            if (_tickMarkAttr != null)
            {
                _tickMarkAttr.GenerateXmlAttributes(writer);
            }
            if (_messageLogAttr != null)
            {
                _messageLogAttr.GenerateXmlAttributes(writer);
            }

            if (_fontAttr != null)
            {
                _fontAttr.GenerateXmlAttributes(writer);
            }
        }
 public override int GetHashCode()
 {
     unchecked
     {
         var hashCode = IsChecked.GetHashCode();
         hashCode = (hashCode * 397) ^ Id.GetHashCode();
         hashCode = (hashCode * 397) ^ ProgressPerMinute.GetHashCode();
         hashCode = (hashCode * 397) ^ (Image?.GetHashCode() ?? 0);
         hashCode = (hashCode * 397) ^ (Name?.GetHashCode() ?? 0);
         hashCode = (hashCode * 397) ^ End.GetHashCode();
         hashCode = (hashCode * 397) ^ Amount.GetHashCode();
         hashCode = (hashCode * 397) ^ IsEditMode.GetHashCode();
         return(hashCode);
     }
 }