SourceCode/jiouosdptask/BLL/LotteryOpen.cs
(开头部分) 8KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
using RFrameGenerate.BLL;
using RFrameGenerate.DAL.Enums;
using RFramework;
using RFramework.SQLServer;
using RFramework.SQLQuery;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Timers;
namespace jiouosdptask.BLL
{
/// <summary>
/// 开奖处理
/// </summary>
public class LotteryOpen
{
static Timer timeLottery;
static object lottery = new object();
public static void Start()
{
LPs = new List<LotteryPeriod>();
timeLottery = new Timer();
timeLottery.Elapsed += timeLotter_Elapsed;
timeLottery.Enabled = true;
timeLottery.Interval = 1000 * 60 * 10;
timeLottery.Start();
LotteryOpen.InitPeriod();
}
public static void Stop()
{
timeLottery.Stop();
}
static List<LotteryPeriod> LPs;
static void timeLotter_Elapsed(object sender, ElapsedEventArgs e)
{
lock (lottery)
{
for (int i = LPs.Count - 1; i >= 0; i--)
{
if (LPs[i].IsLotter == true)
{
LPs.RemoveAt(i);
}
}
}
}
public static void AddPeriodLotter(Guid periodGuid)
{
lock (lottery)
{
if (LPs.Exists(b => b.PeriodGuid == periodGuid) != true)
LPs.Add(new LotteryPeriod(periodGuid));
后面还有 142 行代码,解锁后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。