MainWindow.xaml.cs
(开头部分) 4KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
using System.Text;
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;
namespace 数学口算题
{
/// <summary>
/// Interaction logic for MainWindow.xaml
/// </summary>
public partial class MainWindow : Window
{
public MainWindow()
{
InitializeComponent();
}
private void btn_Make_Click(object sender, RoutedEventArgs e)
{
try
{
txt_Result.Text = "";
int QuestionNumber = 0;
try { QuestionNumber = Convert.ToInt32(txt_QuestionNum.Text); } catch { }
for (int i = 0; i < QuestionNumber; i++)
{
if (!string.IsNullOrEmpty(txt_Result.Text))
txt_Result.Text += System.Environment.NewLine;
txt_Result.Text += MakeQuestion();
}
}
catch (Exception ex)
{
}
}
private Random rnd = new Random();
private string MakeQuestion()
{
string Question = "";
Func<string> GetMethod = () => {
string m = "+";
if (rnd.Next(9) > 5)
m = "-";
return m;
};
string method = GetMethod();
Func<int, int> GetDigit = (max) => {
int number = 0;
int min = 1;
if (chk_lessThan20?.IsChecked ?? false)
{
int mmax = max;
后面还有 82 行代码,解锁后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 积分/个。 规则说明
AI 解读
登录后可用,每次 10 积分,解读结果公开显示在下面。
还没有人解读过这个文件。
