Sudoku/MainWindow.xaml.cs

(开头部分) 33KB

这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。

using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
using System.Windows.Threading;

namespace Sudoku
{
    /// <summary>
    /// MainWindow.xaml 的交互逻辑
    /// </summary>
    public partial class MainWindow : Window
    {
        TextBox tb;                                 //文本框
        Grid g;                                     //布局控件
        MenuItem mi;                                //菜单
        Random ran = new Random();                  //随机数
        int[,] sudoku = new int[9, 9];               //存储所有数字
        bool notLegal = true;                      //所有数字是否合法
        int count;                              //每个宫产生多少个数字
        List<int> index = new List<int>();         //每个宫显示随机数的索引
        int random;                                 //生成的随机数
        List<int> row = new List<int>();        //一行
        List<List<int>> rows = new List<List<int>>();     //所有行
        List<int> col = new List<int>();        //一列
        List<List<int>> cols = new List<List<int>>();     //所有列
        List<int> palace = new List<int>();     //一个宫
        List<List<int>> palaces = new List<List<int>>();    //所有宫
        List<int> temp = new List<int>();       //所在宫与所在行和所在列的交集
        int currentRow;                      //当前行
        int currentCol;                     //当前列
        DispatcherTimer dt = new DispatcherTimer();        //计算时间线程
        bool isStart = true;      //是否开始
        int time;               //用时
        int textChanged = 0;        //输入的傎
        int hard1 = 3;          //难度下限
        int hard2 = 5;          //难度上限
        Thread t;               //计算数值线程
        bool isEnd = false;         //游戏是否结束
        FileStream fs;          //文件流
        StreamWriter sw;        //写入记录
        StreamReader sr;        //读取文件
        string readTag;            //读取的标记
        string readText;            //读取的文本
        string readString;          //读取到的全部字符串
        List<string> record = new List<string>();       //所有记录
        int recordCount;                    //记录条数
后面还有 855 行代码,解锁后查看完整代码

24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明

AI 解读 AI

登录后可用,每次 10 算力,解读结果公开显示在下面。

还没有人解读过这个文件。