public EvalControlTestForm() { InitializeComponent(); seed = Environment.TickCount; type = EvaluationGraphType.TrigonometricSigmoid; reverse = false; evaldata = new EvaluationGraphData { data_array = new[] { new GameEvaluationData() { values = new List <EvalValue>() }, new GameEvaluationData() { values = new List <EvalValue>() }, }, selectedIndex = -1, maxIndex = 0, type = type, reverse = reverse, }; }
private void UpdateData_Click(object sender, EventArgs e) { Console.WriteLine($"seed: {seed}"); var rand = new Random(seed++); var maxIndex = rand.Next(10, 300); evaldata = new EvaluationGraphData { data_array = new[] { randomEval(rand, 0, maxIndex), randomEval(rand, 1, maxIndex), randomEval(rand, 2, maxIndex), randomEval(rand, 3, maxIndex), randomEval(rand, 4, maxIndex), randomEval(rand, 5, maxIndex), randomEval(rand, 6, maxIndex), }, selectedIndex = rand.Next(-1, maxIndex), maxIndex = maxIndex, type = type, reverse = reverse, }; EvalUpdate(evaldata); }
public EvalGraphControl() { evaldata = new EvaluationGraphData() { data_array = new[] { new GameEvaluationData() { values = new List <EvalValue>() }, new GameEvaluationData() { values = new List <EvalValue>() }, }, selectedIndex = -1, maxIndex = 0, type = EvaluationGraphType.TrigonometricSigmoid, reverse = false, }; playerColor = new[] { DColor.Red, DColor.Blue, DColor.Black, DColor.Green, DColor.Purple, DColor.Orange, DColor.YellowGreen, }; { FontFamily[] ff = FontFamily.Families; fontFamilyName = FontFamily.GenericMonospace.Name; foreach (var n in new[] { "Consolas", "Inconsolata" }) { foreach (var f in ff) { if (f.Name == n) { fontFamilyName = f.Name; goto fontLoopOut; } } } fontLoopOut :; } InitializeComponent(); evalGraphPictureBox.Paint += Render; }
public EvalGraphControl() { evaldata = new EvaluationGraphData() { data_array = new[] { new GameEvaluationData() { values = new List <EvalValue>() }, new GameEvaluationData() { values = new List <EvalValue>() }, }, selectedIndex = -1, maxIndex = 0, type = EvaluationGraphType.TrigonometricSigmoid, reverse = false, }; playerColor = new[] { DColor.Red, DColor.Blue, DColor.Black, DColor.Green, DColor.Purple, DColor.Orange, DColor.YellowGreen, }; InitializeComponent(); evalGraphPictureBox.Paint += Render; }
/// <summary> /// [UI thread] : リストが変更されたときに呼び出されるハンドラ /// </summary> public void OnEvalDataChanged(PropertyChangedEventArgs args) { evaldata = args.value as EvaluationGraphData; scrollCheck = true; evalGraphPictureBox.Invalidate(); }
public void EvalUpdate(EvaluationGraphData evaldata) { evalGraphControl1.OnEvalDataChanged(new PropertyChangedEventArgs("EvalData", evaldata)); }