public MainWindow() { InitializeComponent(); MainCon = new MainCon(); MyGrid.Children.Add(MainCon); SeriesCollection = new SeriesCollection { new LineSeries { Title = "المعدلات ", Values = new ChartValues <double> { 1, 8, 3, 12, 11, 2, 7, 8, 9, 10, 5, 4 }, PointGeometry = null }, }; Labels = new[] { "كانون الثاني", "شباط", "آذار", "نيسان", "ايار", "حزيران", "تموز", "أب", "أيلول", "تشرين الاول", "تشرين الثاني", "كانون الاول" }; DataContext = this; }
void Start() { for (int i = 0; i < Butts.Length; i++) { int _i = i; Butts [i].Del += () => { MainCon.Open(_i); }; } }
void Start() { NextButt.Del += () => { int r = ((MainCon.NowN + 2) % (Names.AllObj.Length + 1)) - 1; MainCon.Reset(r); }; OutButt.Del += () => { MainCon.Reset(-1); }; drawMask.onStartDraw += (pos) => { StartCoroutine(OpenNextButt()); }; }
public void Open() { if (MainCon.NowN >= 0 && MainCon.NowN < Names.AllObj.Length) { //改變刮漆下的字 if (MainCon.NowN < 3) { Texts.OnOnlyObjs(0); } else { Texts.OnOnlyObjs(1); } Names.OnOnlyObjs(MainCon.NowN); print(MainCon.NowN); } else { print("編號錯誤退回上一頁"); MainCon.Reset(-1); } }
private void BtnHome_OnClick(object sender, RoutedEventArgs e) { MainCon = new MainCon(); MyGrid.Children.Add(MainCon); }
void Awake() { _ = this; }