コード例 #1
0
ファイル: LayerTest.cs プロジェクト: ivkrivanov/datadesign
            public override bool Equals(T lhs, T rhs)
            {
                var res = base.Equals(lhs, rhs);

                if (lhs.CoordinateTransformation == null ^ rhs.CoordinateTransformation == null)
                {
                    DifferAt.Add("CoordinateTransformation (== null)");
                    res = false;
                }

                //ToDo compare transformation settings

                if (lhs.ReverseCoordinateTransformation == null ^ rhs.ReverseCoordinateTransformation == null)
                {
                    DifferAt.Add("ReverseCoordinateTransformation (== null)");
                    res = false;
                }

                //ToDo compare transformation settings

                if (lhs.Style.Equals(rhs.Style))
                {
                    DifferAt.Add("Style");
                    res = false;
                }

                return(res);
            }
コード例 #2
0
            public override bool Equals(NorthArrow x, NorthArrow y)
            {
                var result = base.Equals(x, y);

                if (x.ForeColor != y.ForeColor)
                {
                    DifferAt.Add("ForeColor");
                    result = false;
                }

                if (x.NorthArrowImage == null ^ y.NorthArrowImage == null)
                {
                    DifferAt.Add("NorthArrowImage (== null)");
                    result = false;
                }

                if (x.NorthArrowImage != null && x.GetHashCode() != y.GetHashCode())
                {
                    if (x.GetHashCode() != y.GetHashCode())
                    {
                        DifferAt.Add("NorthArrowImage (GetHashCode)");
                    }
                    result = false;
                }

                if (x.Size != y.Size)
                {
                    DifferAt.Add("Size");
                    result = false;
                }

                return(result);
            }
コード例 #3
0
ファイル: LayerTest.cs プロジェクト: ivkrivanov/datadesign
            public override bool Equals(VectorLayer lhs, VectorLayer rhs)
            {
                var result = base.Equals(lhs, rhs);

                if (lhs.ClippingEnabled != rhs.ClippingEnabled)
                {
                    DifferAt.Add("ClippingEnabled");
                    result = false;
                }

                if (lhs.IsQueryEnabled != rhs.IsQueryEnabled)
                {
                    DifferAt.Add("IsQueryEnabled");
                    result = false;
                }

                if (lhs.DataSource == null ^ rhs.DataSource == null)
                {
                    DifferAt.Add("DataSource");
                    result = false;
                }

                if (lhs.SmoothingMode != rhs.SmoothingMode)
                {
                    DifferAt.Add("SmoothingMode");
                    result = false;
                }

                if (lhs.Theme == null ^ rhs.Theme == null)
                {
                    DifferAt.Add("Theme");
                    result = false;
                }

                //ToDO Compare Theme settings

                if (lhs.Themes == null ^ rhs.Themes == null)
                {
                    DifferAt.Add("Themes");
                    result = false;
                }

                return(result);
            }
コード例 #4
0
            public override bool Equals(Disclaimer lhs, Disclaimer rhs)
            {
                var result = base.Equals(lhs, rhs);

                var feq = new FontEqualityComparer();

                if (!feq.Equals(lhs.Font, rhs.Font))
                {
                    DifferAt.Add("Font");
                    result = false;
                }

                if (lhs.ForeColor != rhs.ForeColor)
                {
                    DifferAt.Add("ForeColor");
                    result = false;
                }
                if (!StringFormatsEqual(lhs.Format, rhs.Format))
                {
                    DifferAt.Add("Format");
                    result = false;
                }

                if (lhs.Halo != rhs.Halo)
                {
                    DifferAt.Add("Halo");
                    result = false;
                }
                if (lhs.HaloColor != rhs.HaloColor)
                {
                    DifferAt.Add("HaloColor");
                    result = false;
                }

                if (!string.Equals(lhs.Text, rhs.Text))
                {
                    DifferAt.Add("Text");
                    result = false;
                }
                return(result);
            }
コード例 #5
0
            public override bool Equals(EyeOfSight lhs, EyeOfSight rhs)
            {
                var result = base.Equals(lhs, rhs);

                if (lhs.NeedleFillColor != rhs.NeedleFillColor)
                {
                    DifferAt.Add("NeedleFillColor");
                    result = false;
                }
                if (lhs.NeedleOutlineColor != rhs.NeedleOutlineColor)
                {
                    DifferAt.Add("NeedleOutlineColor");
                    result = false;
                }
                if (lhs.NeedleOutlineWidth != rhs.NeedleOutlineWidth)
                {
                    DifferAt.Add("NeedleOutlineWidth");
                    result = false;
                }
                return(result);
            }