MainWindow.xaml.cs
(开头部分) 5KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
using System;
using System.Collections.Generic;
using System.IO;
using System.Windows;
using System.Windows.Input;
using System.Windows.Threading;
namespace Lottery
{
/// <summary>
/// MainWindow.xaml 的交互逻辑
/// </summary>
public partial class MainWindow : Window
{
/// <summary>
/// 抽奖人数
/// </summary>
public int Count = 17;
private int finalValue;
private readonly Random _random = new Random();
private readonly List<int> _selectedNumList = new List<int>();
private readonly DispatcherTimer _timer = new DispatcherTimer();
public MainWindow()
{
InitializeComponent();
_timer.Interval = TimeSpan.FromSeconds(1);
_timer.Tick += timer_Tick;
}
//监视转动是否停止,如果停止,显示价格
private void timer_Tick(object sender, EventArgs e)
{
if (numberGroupMain.IsStoped())
{
//textBoxFinalPrice.Text = "¥" + finalValue.ToString("F2");//显示最终金额
#region 按照一、二、三、四等奖显示
switch (_selectedNumList.Count)
{
case 1: //三等奖3个中的第1个
textBoxThirdPrice1.Text = _selectedNumList[0].ToString();
break;
case 2: //三等奖3个中的第2个
textBoxThirdPrice2.Text = _selectedNumList[1].ToString();
break;
case 3: //三等奖3个中的第3个
textBoxThirdPrice3.Text = _selectedNumList[2].ToString();
break;
case 4: //二等奖2个中的第1个
textBoxSecondPrice1.Text = _selectedNumList[3].ToString();
break;
case 5: //二等奖2个中的第2个
textBoxSecondPrice2.Text = _selectedNumList[4].ToString();
break;
case 6: //一等奖1个
后面还有 115 行代码,解锁后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。