mirror of
https://github.com/the1812/Bilibili-Evolved.git
synced 2025-11-04 21:22:45 +08:00
31 lines
804 B
C#
31 lines
804 B
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Collections.Concurrent;
|
|
using System.IO;
|
|
using System.Security.Cryptography;
|
|
using System.Text;
|
|
using System.Linq;
|
|
using System.Threading.Tasks;
|
|
using System.Diagnostics;
|
|
|
|
namespace BilibiliEvolved.Build.Watcher
|
|
{
|
|
public class DarkStyleWatcher : Watcher
|
|
{
|
|
public DarkStyleWatcher() : base("min")
|
|
{
|
|
GenericFilter = "*.min.css";
|
|
FileFilter = file => {
|
|
return file.Contains("dark-slice");
|
|
};
|
|
}
|
|
|
|
protected override void OnFileChanged(FileSystemEventArgs e)
|
|
{
|
|
var sliceID = Convert.ToInt32(Path.GetFileNameWithoutExtension(e.Name).Replace("dark-slice-", "").Replace(".min", ""));
|
|
builder.WriteInfo($"[Dark Style] Slice {sliceID} changed.");
|
|
builder.BuildDarkStyles();
|
|
}
|
|
}
|
|
}
|