private async Task HandleStep2 <T>(string str) where T : BaseObjectDateTimeStamps, IEngineeringEntity { var lst = uow.Query <T>(); using (var odw = new OracleDatabaseWorker(tbOracleConnectionStringText)) { int i = 0; foreach (var item in lst) { try { if (!string.IsNullOrWhiteSpace(item.Handle) && long.TryParse(item.Handle, out long gid)) { await odw.SetGUIDFromGIDOracleAsync(gid, item.Oid.ToString().ToUpper(), $"SP_NN_{typeof(T).Name}"); NewNetServices.Module.Core.StaticHelperMethods.WriteOut($"{typeof(T).Name} {++i}"); // await odw.SetGUIDFromGIDOracleAsync(gid, item.Oid.ToString().ToUpper(), $"SP_NN_{typeof(T).Name}"); currentSuccess++; ProgressMade?.Invoke(str, null); } } catch (Exception ex) { currentErrors++; NewNetServices.Module.Core.StaticHelperMethods.WriteOut($" {i}\n{ex}"); } } } }
public bool Equals(Stats other) { if (other == null) { return(false); } return(PeopleKilledByPlayer.Equals(other.PeopleKilledByPlayer) && PeopleKilledByOthers.Equals(other.PeopleKilledByOthers) && CarsExploded.Equals(other.CarsExploded) && RoundsFiredByPlayer.Equals(other.RoundsFiredByPlayer) && PedsKilledOfThisType.SequenceEqual(other.PedsKilledOfThisType) && HelisDestroyed.Equals(other.HelisDestroyed) && ProgressMade.Equals(other.ProgressMade) && TotalProgressInGame.Equals(other.TotalProgressInGame) && KgsOfExplosivesUsed.Equals(other.KgsOfExplosivesUsed) && InstantHitsFiredByPlayer.Equals(other.InstantHitsFiredByPlayer) && InstantHitsHitByPlayer.Equals(other.InstantHitsHitByPlayer) && CarsCrushed.Equals(other.CarsCrushed) && HeadsPopped.Equals(other.HeadsPopped) && TimesArrested.Equals(other.TimesArrested) && TimesDied.Equals(other.TimesDied) && DaysPassed.Equals(other.DaysPassed) && MmRain.Equals(other.MmRain) && MaximumJumpDistance.Equals(other.MaximumJumpDistance) && MaximumJumpHeight.Equals(other.MaximumJumpHeight) && MaximumJumpFlips.Equals(other.MaximumJumpFlips) && MaximumJumpSpins.Equals(other.MaximumJumpSpins) && BestStuntJump.Equals(other.BestStuntJump) && NumberOfUniqueJumpsFound.Equals(other.NumberOfUniqueJumpsFound) && TotalNumberOfUniqueJumps.Equals(other.TotalNumberOfUniqueJumps) && MissionsGiven.Equals(other.MissionsGiven) && MissionsPassed.Equals(other.MissionsPassed) && PassengersDroppedOffWithTaxi.Equals(other.PassengersDroppedOffWithTaxi) && MoneyMadeWithTaxi.Equals(other.MoneyMadeWithTaxi) && IndustrialPassed.Equals(other.IndustrialPassed) && CommercialPassed.Equals(other.CommercialPassed) && SuburbanPassed.Equals(other.SuburbanPassed) && ElBurroTime.Equals(other.ElBurroTime) && DistanceTravelledOnFoot.Equals(other.DistanceTravelledOnFoot) && DistanceTravelledInVehicle.Equals(other.DistanceTravelledInVehicle) && Record4x4One.Equals(other.Record4x4One) && Record4x4Two.Equals(other.Record4x4Two) && Record4x4Three.Equals(other.Record4x4Three) && Record4x4Mayhem.Equals(other.Record4x4Mayhem) && LivesSavedWithAmbulance.Equals(other.LivesSavedWithAmbulance) && CriminalsCaught.Equals(other.CriminalsCaught) && HighestLevelAmbulanceMission.Equals(other.HighestLevelAmbulanceMission) && FiresExtinguished.Equals(other.FiresExtinguished) && LongestFlightInDodo.Equals(other.LongestFlightInDodo) && TimeTakenDefuseMission.Equals(other.TimeTakenDefuseMission) && NumberKillFrenziesPassed.Equals(other.NumberKillFrenziesPassed) && TotalNumberKillFrenzies.Equals(other.TotalNumberKillFrenzies) && TotalNumberMissions.Equals(other.TotalNumberMissions) && FastestTimes.SequenceEqual(other.FastestTimes) && HighestScores.SequenceEqual(other.HighestScores) && KillsSinceLastCheckpoint.Equals(other.KillsSinceLastCheckpoint) && TotalLegitimateKills.Equals(other.TotalLegitimateKills) && LastMissionPassedName.Equals(other.LastMissionPassedName)); }
/// <summary> /// Checks whether enough time has passed to determine a new index or to keep the old one. /// </summary> /// <param name="elapsed">Time in milliseconds that has elapsed since the start of the song.</param> /// <param name="obj">Last SongObject that has been analysed.</param> /// <returns></returns> public static bool IncreaseIndex(double elapsed, SongObject obj) { lock (_locker) { if (DevFlags.LoggingEnabled) { Logger.AnalyzerLog((obj.TimePosition + obj.Duration) + "/" + elapsed); } if ((obj.TimePosition + obj.Duration) <= elapsed) { SongIndex++; } float progress = Convert.ToSingle(elapsed / SongDuration); if (progress > 1) { progress = 1; } ProgressMade?.Invoke(progress, new EventArgs()); if (SongIndex >= IndexedSong.Length) { return(true); } else { return(false); } } }
public void DoProgress(int i, string s, bool playSound = false) { //Progress = i; //NotifyMessage = s; ProgressMade?.Invoke(this, new ProgressEventArgs() { Progress = i, Message = s, PlaySound = playSound }); }
public bool Equals(Stats other) { if (other == null) { return(false); } return(PeopleKilledByPlayer.Equals(other.PeopleKilledByPlayer) && PeopleKilledByOthers.Equals(other.PeopleKilledByOthers) && CarsExploded.Equals(other.CarsExploded) && BoatsExploded.Equals(other.BoatsExploded) && TyresPopped.Equals(other.TyresPopped) && RoundsFiredByPlayer.Equals(other.RoundsFiredByPlayer) && PedsKilledOfThisType.SequenceEqual(other.PedsKilledOfThisType) && HelisDestroyed.Equals(other.HelisDestroyed) && ProgressMade.Equals(other.ProgressMade) && TotalProgressInGame.Equals(other.TotalProgressInGame) && KgsOfExplosivesUsed.Equals(other.KgsOfExplosivesUsed) && BulletsThatHit.Equals(other.BulletsThatHit) && HeadsPopped.Equals(other.HeadsPopped) && WantedStarsAttained.Equals(other.WantedStarsAttained) && WantedStarsEvaded.Equals(other.WantedStarsEvaded) && TimesArrested.Equals(other.TimesArrested) && TimesDied.Equals(other.TimesDied) && DaysPassed.Equals(other.DaysPassed) && SafeHouseVisits.Equals(other.SafeHouseVisits) && Sprayings.Equals(other.Sprayings) && MaximumJumpDistance.Equals(other.MaximumJumpDistance) && MaximumJumpHeight.Equals(other.MaximumJumpHeight) && MaximumJumpFlips.Equals(other.MaximumJumpFlips) && MaximumJumpSpins.Equals(other.MaximumJumpSpins) && BestStuntJump.Equals(other.BestStuntJump) && NumberOfUniqueJumpsFound.Equals(other.NumberOfUniqueJumpsFound) && TotalNumberOfUniqueJumps.Equals(other.TotalNumberOfUniqueJumps) && MissionsGiven.Equals(other.MissionsGiven) && PassengersDroppedOffWithTaxi.Equals(other.PassengersDroppedOffWithTaxi) && MoneyMadeWithTaxi.Equals(other.MoneyMadeWithTaxi) && IndustrialPassed.Equals(other.IndustrialPassed) && CommercialPassed.Equals(other.CommercialPassed) && SuburbanPassed.Equals(other.SuburbanPassed) && PamphletMissionPassed.Equals(other.PamphletMissionPassed) && NoMoreHurricanes.Equals(other.NoMoreHurricanes) && DistanceTravelledOnFoot.Equals(other.DistanceTravelledOnFoot) && DistanceTravelledByCar.Equals(other.DistanceTravelledByCar) && DistanceTravelledByBike.Equals(other.DistanceTravelledByBike) && DistanceTravelledByBoat.Equals(other.DistanceTravelledByBoat) && DistanceTravelledByGolfCart.Equals(other.DistanceTravelledByGolfCart) && DistanceTravelledByHelicopter.Equals(other.DistanceTravelledByHelicopter) && DistanceTravelledByPlane.Equals(other.DistanceTravelledByPlane) && LivesSavedWithAmbulance.Equals(other.LivesSavedWithAmbulance) && CriminalsCaught.Equals(other.CriminalsCaught) && FiresExtinguished.Equals(other.FiresExtinguished) && HighestLevelVigilanteMission.Equals(other.HighestLevelVigilanteMission) && HighestLevelAmbulanceMission.Equals(other.HighestLevelAmbulanceMission) && HighestLevelFireMission.Equals(other.HighestLevelFireMission) && PhotosTaken.Equals(other.PhotosTaken) && NumberKillFrenziesPassed.Equals(other.NumberKillFrenziesPassed) && TotalNumberKillFrenzies.Equals(other.TotalNumberKillFrenzies) && TotalNumberMissions.Equals(other.TotalNumberMissions) && FlightTime.Equals(other.FlightTime) && TimesDrowned.Equals(other.TimesDrowned) && SeagullsKilled.Equals(other.SeagullsKilled) && WeaponBudget.Equals(other.WeaponBudget) && FashionBudget.Equals(other.FashionBudget) && LoanSharks.Equals(other.LoanSharks) && StoresKnockedOff.Equals(other.StoresKnockedOff) && MovieStunts.Equals(other.MovieStunts) && Assassinations.Equals(other.Assassinations) && PizzasDelivered.Equals(other.PizzasDelivered) && GarbagePickups.Equals(other.GarbagePickups) && IceCreamSold.Equals(other.IceCreamSold) && TopShootingRangeScore.Equals(other.TopShootingRangeScore) && ShootingRank.Equals(other.ShootingRank) && LongestWheelie.Equals(other.LongestWheelie) && LongestStoppie.Equals(other.LongestStoppie) && Longest2Wheel.Equals(other.Longest2Wheel) && LongestWheelieDist.Equals(other.LongestWheelieDist) && LongestStoppieDist.Equals(other.LongestStoppieDist) && Longest2WheelDist.Equals(other.Longest2WheelDist) && PropertyBudget.Equals(other.PropertyBudget) && AutoPaintingBudget.Equals(other.AutoPaintingBudget) && PropertyDestroyed.Equals(other.PropertyDestroyed) && NumPropertyOwned.Equals(other.NumPropertyOwned) && BloodRingKills.Equals(other.BloodRingKills) && BloodRingTime.Equals(other.BloodRingTime) && PropertyOwned.SequenceEqual(other.PropertyOwned) && HighestChaseValue.Equals(other.HighestChaseValue) && FastestTimes.SequenceEqual(other.FastestTimes) && HighestScores.SequenceEqual(other.HighestScores) && BestPositions.SequenceEqual(other.BestPositions) && KillsSinceLastCheckpoint.Equals(other.KillsSinceLastCheckpoint) && TotalLegitimateKills.Equals(other.TotalLegitimateKills) && LastMissionPassedName.Equals(other.LastMissionPassedName) && CheatedCount.Equals(other.CheatedCount) && FavoriteRadioStationList.SequenceEqual(other.FavoriteRadioStationList)); }