1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace FLY.Simulation.Calender.GuRuiShiYe
{
public class Gage:INotifyPropertyChanged
{
public FLY.Simulation.Flyad7.FLYAD7[] FlyAds { get; private set; }
public GageAd[] GageAds { get; private set; }
FLY.Simulation.Flyad7.FLYAD7[] flyads;
GageAd[] gageAds;
public Gage() {
}
public event PropertyChangedEventHandler PropertyChanged;
public void Init(int devCnt) {
gageAds = new GageAd[devCnt];
flyads = new Flyad7.FLYAD7[devCnt];
for (int i = 0; i < devCnt; i++) {
gageAds[i] = new GageAd();
gageAds[i].Init($"{i:D2}", i > 0 ? gageAds[i - 1].GetFilmValue:null);
flyads[i] = new Flyad7.FLYAD7($@"{i:D2}\flyad.json");
flyads[i].Init(gageAds[i]);
}
FlyAds = flyads;
GageAds = gageAds;
}
}
}