diff --git a/OpenBullet2.Core/Models/Jobs/MultiRunJobOptions.cs b/OpenBullet2.Core/Models/Jobs/MultiRunJobOptions.cs index ca91cfbb5..48892fd9e 100644 --- a/OpenBullet2.Core/Models/Jobs/MultiRunJobOptions.cs +++ b/OpenBullet2.Core/Models/Jobs/MultiRunJobOptions.cs @@ -1,4 +1,4 @@ -using OpenBullet2.Core.Models.Data; +using OpenBullet2.Core.Models.Data; using OpenBullet2.Core.Models.Hits; using OpenBullet2.Core.Models.Proxies; using RuriLib.Models.Jobs; @@ -30,6 +30,11 @@ public class MultiRunJobOptions : JobOptions /// /// The proxy mode. /// + public bool Logoff { get; set; } = false; + + /// + /// disable log + /// public JobProxyMode ProxyMode { get; set; } = JobProxyMode.Default; /// diff --git a/OpenBullet2.Core/Services/JobFactoryService.cs b/OpenBullet2.Core/Services/JobFactoryService.cs index f08535c52..88b4e3156 100644 --- a/OpenBullet2.Core/Services/JobFactoryService.cs +++ b/OpenBullet2.Core/Services/JobFactoryService.cs @@ -1,4 +1,4 @@ -using Microsoft.Extensions.Configuration; +using Microsoft.Extensions.Configuration; using Microsoft.Extensions.DependencyInjection; using OpenBullet2.Core.Models.Hits; using OpenBullet2.Core.Models.Jobs; @@ -107,6 +107,7 @@ private MultiRunJob MakeMultiRunJob(MultiRunJobOptions options) BotLimit = BotLimit, CurrentBotDatas = new BotData[BotLimit], Skip = options.Skip, + Logoff = options.Logoff, HitOutputs = options.HitOutputs.Select(o => hitOutputsFactory.FromOptions(o)).ToList(), ProxySources = options.ProxySources.Select(s => proxySourceFactory.FromOptions(s).Result).ToList(), Providers = new(_settingsService) diff --git a/OpenBullet2.Native/Views/Dialogs/MultiRunJobOptionsDialog.xaml b/OpenBullet2.Native/Views/Dialogs/MultiRunJobOptionsDialog.xaml index 2e4982d88..12dafefd5 100644 --- a/OpenBullet2.Native/Views/Dialogs/MultiRunJobOptionsDialog.xaml +++ b/OpenBullet2.Native/Views/Dialogs/MultiRunJobOptionsDialog.xaml @@ -1,4 +1,4 @@ - + Options.Logoff; + set + { + Options.Logoff = value; + OnPropertyChanged(); + } + } + public IEnumerable ProxyModes => Enum.GetValues(typeof(JobProxyMode)).Cast(); public JobProxyMode ProxyMode diff --git a/RuriLib/Models/Jobs/MultiRunJob.cs b/RuriLib/Models/Jobs/MultiRunJob.cs index fc8199a62..3751dd198 100644 --- a/RuriLib/Models/Jobs/MultiRunJob.cs +++ b/RuriLib/Models/Jobs/MultiRunJob.cs @@ -41,6 +41,7 @@ public class MultiRunJob : Job public int Bots { get; set; } = 1; public int BotLimit { get; init; } = 200; public int Skip { get; set; } = 0; + public bool Logoff { get; set; } = false; public Config Config { get; set; } public DataPool DataPool { get; set; } public List ProxySources { get; set; } = new List(); @@ -925,7 +926,7 @@ private void DataProcessed(object sender, ResultDetails