mirror of
https://github.com/wabbajack-tools/wabbajack.git
synced 2024-08-30 18:42:17 +00:00
commit
73e56fd62a
@ -72,7 +72,7 @@ namespace Wabbajack
|
||||
slideshowThread.Start();
|
||||
}
|
||||
|
||||
private DateTime _lastSlideShowUpdate = new DateTime();
|
||||
public DateTime lastSlideShowUpdate = new DateTime();
|
||||
|
||||
public ObservableCollection<string> Log { get; } = new ObservableCollection<string>();
|
||||
public ObservableCollection<CPUStatus> Status { get; } = new ObservableCollection<CPUStatus>();
|
||||
@ -308,7 +308,7 @@ namespace Wabbajack
|
||||
|
||||
private string _SplashScreenSummary;
|
||||
public string SplashScreenSummary { get => _SplashScreenSummary; set => this.RaiseAndSetIfChanged(ref _SplashScreenSummary, value); }
|
||||
private bool _splashShowNSFW = true;
|
||||
private bool _splashShowNSFW = false;
|
||||
public bool SplashShowNSFW { get => _splashShowNSFW; set => this.RaiseAndSetIfChanged(ref _splashShowNSFW, value); }
|
||||
private readonly Thread slideshowThread = null;
|
||||
private bool _enableSlideShow = true;
|
||||
@ -387,12 +387,12 @@ namespace Wabbajack
|
||||
|
||||
if (_slideShow.SlidesQueue.Any())
|
||||
{
|
||||
if (DateTime.Now - _lastSlideShowUpdate > TimeSpan.FromSeconds(10))
|
||||
if (DateTime.Now - lastSlideShowUpdate > TimeSpan.FromSeconds(10))
|
||||
{
|
||||
_slideShow.UpdateSlideShowItem();
|
||||
}
|
||||
}
|
||||
Thread.Sleep(10000);
|
||||
Thread.Sleep(1000);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -52,7 +52,7 @@
|
||||
<RowDefinition Height="30"/>
|
||||
</Grid.RowDefinitions>
|
||||
<Image Grid.Row="0" Source="{Binding SplashScreenImage}" Stretch="Fill"/>
|
||||
<Button Grid.Row="1" Height="30" Command="{Binding OpenReadme}" IsEnabled="{Binding HadReadme}">
|
||||
<Button Grid.Row="1" Height="30" Command="{Binding OpenReadme}" IsEnabled="{Binding HasReadme}">
|
||||
<TextBlock Text="Open README" FontSize="15" FontWeight="Bold"/>
|
||||
</Button>
|
||||
</Grid>
|
||||
|
@ -81,15 +81,15 @@ namespace Wabbajack.UI
|
||||
{
|
||||
var idx = _random.Next(0, SlideShowElements.Count);
|
||||
var randomSlide = SlideShowElements[idx];
|
||||
while (CachedSlides.ContainsKey(randomSlide.ModID) || SlidesQueue.Contains(randomSlide))
|
||||
while (!CachedSlides.ContainsKey(randomSlide.ModID) || SlidesQueue.Contains(randomSlide))
|
||||
{
|
||||
idx = _random.Next(0, SlideShowElements.Count);
|
||||
randomSlide = SlideShowElements[idx];
|
||||
}
|
||||
|
||||
if (!CachedSlides.ContainsKey(randomSlide.ModID)) continue;
|
||||
//if (SlidesQueue.Contains(randomSlide)) continue;
|
||||
CachedSlides.Remove(randomSlide.ModID);
|
||||
if(AppState.GcCollect)
|
||||
if (AppState.GcCollect)
|
||||
GC.Collect();
|
||||
}
|
||||
|
||||
@ -111,6 +111,8 @@ namespace Wabbajack.UI
|
||||
_appState._nexusSiteURL = slide.ModURL;
|
||||
}
|
||||
|
||||
_appState.lastSlideShowUpdate = DateTime.Now;
|
||||
|
||||
SlidesQueue.Dequeue();
|
||||
QueueRandomSlide(false, true);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user