frmValueToColor.cs
(开头部分) 2KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
namespace ResisiorTutorial
{
public partial class frmValueToColor : Form
{
private Form parent;
private int questionCount = 0;
private DateTime startTime;
private DateTime questionStartTime;
private int lastQuestionCostTime = -1;
private long questionValue;
private Color[] questionAnswer;
private bool errorFlag = false;
private int correctCount = 0;
public frmValueToColor(Form parent)
{
InitializeComponent();
this.parent = parent;
}
private void frmValueToColor_Load(object sender, EventArgs e)
{
}
private bool CompareColors(Color[] a, Color[] b)
{
if (a.Length != b.Length)
return false;
for (int i = 0; i < a.Length; i++)
if (a[i] != b[i])
return false;
return true;
}
private void NewQuestion()
{
questionCount++;
questionStartTime = DateTime.Now;
questionValue = ResistorValues.GetRandom();
List<Color> l = new List<Color>();
l.AddRange(ResistorHelper.GetColorFromValue(questionValue, true));
l.Add(Color.Gold);
questionAnswer = l.ToArray();
lblValue.Text = ResistorHelper.ValueToExpress(questionValue);
}
private void frmValueToColor_FormClosing(object sender, FormClosingEventArgs e)
{
parent.Show();
}
后面还有 34 行代码,解锁后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。