コード例 #1
0
 /// <summary>
 ///
 /// </summary>
 /// <returns></returns>
 public override int GetHashCode()
 {
     unchecked
     {
         return((NumberOfPoints.GetHashCode() * 397) ^ StartAddress.GetHashCode());
     }
 }
コード例 #2
0
        public override int GetHashCode()
        {
            var partsHashCode  = Parts.Aggregate(0, (current, part) => current ^ part.GetHashCode());
            var pointsHashCode = Points.Aggregate(0, (current, point) => current ^ point.GetHashCode());

            return(BoundingBox.GetHashCode() ^ NumberOfParts.GetHashCode() ^ NumberOfPoints.GetHashCode()
                   ^ partsHashCode ^ pointsHashCode);
        }
コード例 #3
0
 public bool Equals(PolyLineM other) => other != null &&
 BoundingBox.Equals(other.BoundingBox) &&
 NumberOfParts.Equals(other.NumberOfParts) &&
 NumberOfPoints.Equals(other.NumberOfPoints) &&
 Parts.SequenceEqual(other.Parts) &&
 Points.SequenceEqual(other.Points) &&
 MeasureRange.Equals(other.MeasureRange) &&
 Measures.SequenceEqual(other.Measures);
コード例 #4
0
 public bool Equals(PolyLineM other, Tolerance tolerance) => other != null &&
 BoundingBox.Equals(other.BoundingBox, tolerance) &&
 NumberOfParts.Equals(other.NumberOfParts) &&
 NumberOfPoints.Equals(other.NumberOfPoints) &&
 Parts.SequenceEqual(other.Parts) &&
 Points.SequenceEqual(other.Points, new TolerantPointEqualityComparer(tolerance)) &&
 MeasureRange.Equals(other.MeasureRange, tolerance) &&
 Measures.SequenceEqual(other.Measures, new TolerantDoubleEqualityComparer(tolerance));
コード例 #5
0
        public void WriteConfigFile(XmlTextWriter xmlWriter)
        {
            xmlWriter.WriteStartElement("CalibrationSettings");

            GTSettings.WriteElement(xmlWriter, "TrackingMonitor", Enum.GetName(typeof(Monitor), trackingMonitor));
            GTSettings.WriteElement(xmlWriter, "AreaWidth", AreaWidth.ToString());
            GTSettings.WriteElement(xmlWriter, "AreaHeight", AreaHeight.ToString());
            GTSettings.WriteElement(xmlWriter, "DistanceFromScreen", DistanceFromScreen.ToString());
            GTSettings.WriteElement(xmlWriter, "NumberOfPoints", NumberOfPoints.ToString());
            GTSettings.WriteElement(xmlWriter, "PointDuration", PointDuration.ToString());
            GTSettings.WriteElement(xmlWriter, "PointTransitionDuration", PointTransitionDuration.ToString());
            GTSettings.WriteElement(xmlWriter, "Acceleration", Acceleration.ToString());
            GTSettings.WriteElement(xmlWriter, "Deacceleration", Deacceleration.ToString());
            GTSettings.WriteElement(xmlWriter, "BackgroundColor", BackgroundColor.Color.R + " " + BackgroundColor.Color.G + " " + BackgroundColor.Color.B);
            GTSettings.WriteElement(xmlWriter, "PointColor", PointColor.Color.R + " " + PointColor.Color.G + " " + PointColor.Color.B);
            GTSettings.WriteElement(xmlWriter, "PointDiamter", PointDiameter.ToString());
            GTSettings.WriteElement(xmlWriter, "UseInfantGraphics", UseInfantGraphics.ToString());
            GTSettings.WriteElement(xmlWriter, "WaitForValidData", WaitForValidData.ToString());
            GTSettings.WriteElement(xmlWriter, "RandomizePointOrder", RandomizePointOrder.ToString());
            GTSettings.WriteElement(xmlWriter, "AutoAcceptPoints", AutoAcceptPoints.ToString());

            xmlWriter.WriteEndElement();
        }
コード例 #6
0
    static void Main3()
    {
        NumberOfPoints s = new NumberOfPoints();

        s.NPoints();
    }
コード例 #7
0
 public bool Equals(Polygon other) => other != null &&
 BoundingBox.Equals(other.BoundingBox) &&
 NumberOfParts.Equals(other.NumberOfParts) &&
 NumberOfPoints.Equals(other.NumberOfPoints) &&
 Parts.SequenceEqual(other.Parts) &&
 Points.SequenceEqual(other.Points);
コード例 #8
0
 public bool Equals(Polygon other, Tolerance tolerance) => other != null &&
 BoundingBox.Equals(other.BoundingBox, tolerance) &&
 NumberOfParts.Equals(other.NumberOfParts) &&
 NumberOfPoints.Equals(other.NumberOfPoints) &&
 Parts.SequenceEqual(other.Parts) &&
 Points.SequenceEqual(other.Points, new TolerantPointEqualityComparer(tolerance));
コード例 #9
0
        public object GetListUserAsync(UserMapParams user)
        {
            var response = GetStations(user);

            List <LocationResponseViewModel> model = new List <LocationResponseViewModel>();

            foreach (var item in response)
            {
                LocationResponseViewModel locationResponseView = new LocationResponseViewModel();
                DataProviderViewMdel      dataProvider         = new DataProviderViewMdel();
                UsageTypeViewMdel         usageTypeView        = new UsageTypeViewMdel();
                AddressInfoMdel           AddressInfo          = new AddressInfoMdel();
                ConnectionsMdel           connections          = new ConnectionsMdel();
                LevelMdel          levelMdel      = new LevelMdel();
                CurrentType        currentType    = new CurrentType();
                List <LevelMdel>   levelMdelmodel = new List <LevelMdel>();
                List <CurrentType> currentTypes   = new List <CurrentType>();
                NumberOfPoints     numberOfPoints = new NumberOfPoints();
                dataProvider.Title = item.DataProvider.Title;
                locationResponseView.DataProvider = dataProvider;
                usageTypeView.IsPayAtLocation     = item.UsageType.IsPayAtLocation;
                usageTypeView.Title = item.UsageType.Title;
                locationResponseView.usageTypeView = usageTypeView;
                AddressInfo.Id                   = item.AddressInfo.ID;
                AddressInfo.Title                = item.AddressInfo.Title;
                AddressInfo.AddressLine1         = item.AddressInfo.AddressLine1;
                AddressInfo.Town                 = item.AddressInfo.Town;
                AddressInfo.StateOrProvince      = item.AddressInfo.StateOrProvince;
                AddressInfo.Postcode             = item.AddressInfo.Postcode;
                AddressInfo.Latitude             = item.AddressInfo.Latitude;
                AddressInfo.Longitude            = item.AddressInfo.Longitude;
                AddressInfo.ContactTelephone1    = item.AddressInfo.ContactTelephone1;
                AddressInfo.ContactEmail         = item.AddressInfo.ContactEmail;
                AddressInfo.AccessComments       = item.AddressInfo.AccessComments;
                AddressInfo.RelatedURL           = item.AddressInfo.RelatedURL;
                AddressInfo.Distance             = item.AddressInfo.Distance;
                AddressInfo.DistanceUnit         = item.AddressInfo.DistanceUnit;
                AddressInfo.CountryName          = item.AddressInfo.CountryName;
                locationResponseView.addressInfo = AddressInfo;
                foreach (var conn in item.Connections)
                {
                    levelMdel.PowerKW = conn.PowerKW;
                    if (conn.Level != null)
                    {
                        levelMdel.IsFastChargeCapable = conn.Level.IsFastChargeCapable;
                        levelMdel.Title          = conn.Level.Title;
                        connections.Connenctions = conn.Level.Title;
                        currentType.Title        = conn.Level.Title;
                    }
                }
                locationResponseView.connectionsMdel = connections;
                levelMdelmodel.Add(levelMdel);
                locationResponseView.levelMdel       = levelMdelmodel;
                locationResponseView.connectionsMdel = connections;
                currentTypes.Add(currentType);
                locationResponseView.currentType          = currentTypes;
                numberOfPoints.NumberOfPoint              = item.NumberOfPoints;
                locationResponseView.numberOfPoints       = numberOfPoints;
                locationResponseView.dateLastStatusUpdate = item.DateLastStatusUpdate;

                model.Add(locationResponseView);
            }

            return(model);
        }