|
@@ -58,7 +58,7 @@ |
58 |
58 |
|
//ProjectFile(); |
59 |
59 |
|
|
60 |
60 |
|
ObservableCollection<Bottone> listBottoni = new ObservableCollection<Bottone> { new Bottone("0", "Inizia avventura", "", "") }; |
61 |
|
- |
String testoPrimaSchermata = "John Glen"; |
|
61 |
+ |
String testoPrimaSchermata = "Il gran maestro Gabber presenta:\nle avventure o le cronache di Jon Gleen!"; |
62 |
62 |
|
|
63 |
63 |
|
attSchermata = new Schermata(testoPrimaSchermata, "jon_sfondo.jpg", 1, listBottoni); |
64 |
64 |
|
|
|
@@ -375,7 +375,8 @@ |
375 |
375 |
|
buttonPanel3.Visibility = Visibility.Collapsed; |
376 |
376 |
|
if (buttonPanel4.Visibility == Visibility.Visible) |
377 |
377 |
|
buttonPanel4.Visibility = Visibility.Collapsed; |
378 |
|
- |
|
|
378 |
+ |
if (buttonPanel5.Visibility == Visibility.Visible) |
|
379 |
+ |
buttonPanel5.Visibility = Visibility.Collapsed; |
379 |
380 |
|
} |
380 |
381 |
|
|
381 |
382 |
|
|
|
@@ -388,26 +389,11 @@ |
388 |
389 |
|
if (attSchermata.bottoni[0].postCond != "") |
389 |
390 |
|
{ |
390 |
391 |
|
postC = proxSchermata.bottoni[0].postCond; |
391 |
|
- |
//indexAperta = postC.IndexOf('('); |
392 |
|
- |
//indexChiusa = postC.IndexOf(')'); |
393 |
|
- |
//evento = postC.Substring(indexAperta + 1, (indexChiusa - indexAperta) - 1); |
394 |
|
- |
|
395 |
|
- |
//indexVir = evento.IndexOf(','); |
396 |
|
- |
//nomeEvento = evento.Substring(0, indexVir); |
397 |
|
- |
//statoE = evento.Substring(indexVir + 1); |
398 |
|
- |
//if (statoE == "true") |
399 |
|
- |
//{ |
400 |
|
- |
// statoEvento = true; |
401 |
|
- |
//} |
402 |
|
- |
//else |
403 |
|
- |
//{ |
404 |
|
- |
// statoEvento = false; |
405 |
|
- |
//} |
406 |
|
- |
|
|
392 |
+ |
|
407 |
393 |
|
listaEventi.Add(postC); |
408 |
394 |
|
|
409 |
395 |
|
} |
410 |
|
- |
// |
|
396 |
+ |
|
411 |
397 |
|
|
412 |
398 |
|
scroller.ScrollToVerticalOffset(0.0); //riporta lo scroller alla posizione di partenza |
413 |
399 |
|
|
|
@@ -436,35 +422,40 @@ |
436 |
422 |
|
|
437 |
423 |
|
topPanel.DataContext = proxSchermata; |
438 |
424 |
|
|
439 |
|
- |
//Recuperiamo i dati relativi ai bottoni |
440 |
|
- |
int numBottoni = proxSchermata.nBottoni; |
441 |
|
- |
switch (numBottoni) |
|
425 |
+ |
//PRE-CONDIZIONI |
|
426 |
+ |
foreach (Bottone bot in proxSchermata.bottoni) |
442 |
427 |
|
{ |
443 |
|
- |
case 1: |
444 |
|
- |
buttonPanel1.Visibility = Visibility.Visible; |
445 |
|
- |
String testoBottone11 = proxSchermata.bottoni[0].testo; |
446 |
|
- |
textB11.Text = testoBottone11; |
447 |
|
- |
|
448 |
|
- |
//PRE-CONDIZIONI |
449 |
|
- |
if (proxSchermata.bottoni[0].preCond != "") |
|
428 |
+ |
if (bot.preCond != "") |
|
429 |
+ |
{ |
|
430 |
+ |
//Scorre la lista degli eventi (pre-condizioni) |
|
431 |
+ |
foreach (String even in listaEventi) |
450 |
432 |
|
{ |
451 |
|
- |
//Scorre la lista degli eventi |
452 |
|
- |
foreach (String even in listaEventi) |
|
433 |
+ |
if (even == bot.preCond) |
453 |
434 |
|
{ |
454 |
|
- |
if (even == proxSchermata.bottoni[0].preCond) |
455 |
|
- |
{ |
456 |
|
- |
proxSchermata.nBottoni = 1; //setta 1 bottone sulla schermata successiva |
457 |
|
- |
|
458 |
|
- |
Bottone b1 = new Bottone(proxSchermata.bottoni[0].targetID, proxSchermata.bottoni[0].testo, proxSchermata.bottoni[0].preCond, proxSchermata.bottoni[0].postCond); |
459 |
|
- |
proxSchermata.bottoni = null; |
|
435 |
+ |
proxSchermata.nBottoni = 1; //setta 1 bottone sulla schermata successiva |
|
436 |
+ |
proxSchermata.bottoni = new ObservableCollection<Bottone>(); |
460 |
437 |
|
|
461 |
|
- |
proxSchermata.bottoni.Add(b1); |
|
438 |
+ |
try |
|
439 |
+ |
{ |
|
440 |
+ |
proxSchermata.bottoni.Add(bot); |
462 |
441 |
|
} |
463 |
|
- |
|
|
442 |
+ |
catch { } |
464 |
443 |
|
} |
465 |
444 |
|
|
466 |
445 |
|
} |
467 |
446 |
|
|
|
447 |
+ |
} |
|
448 |
+ |
} |
|
449 |
+ |
|
|
450 |
+ |
//Recuperiamo i dati relativi ai bottoni |
|
451 |
+ |
int numBottoni = proxSchermata.nBottoni; |
|
452 |
+ |
switch (numBottoni) |
|
453 |
+ |
{ |
|
454 |
+ |
case 1: |
|
455 |
+ |
buttonPanel1.Visibility = Visibility.Visible; |
|
456 |
+ |
String testoBottone11 = proxSchermata.bottoni[0].testo; |
|
457 |
+ |
textB11.Text = testoBottone11; |
|
458 |
+ |
|
468 |
459 |
|
buttonPanel1.DataContext = proxSchermata; // Per il binding |
469 |
460 |
|
attSchermata = proxSchermata; |
470 |
461 |
|
break; |
|
@@ -473,76 +464,9 @@ |
473 |
464 |
|
String testoBottone21 = proxSchermata.bottoni[0].testo; |
474 |
465 |
|
textB21.Text = testoBottone21; |
475 |
466 |
|
|
476 |
|
- |
//PRE-CONDIZIONI |
477 |
|
- |
if (proxSchermata.bottoni[0].preCond != "") |
478 |
|
- |
{ |
479 |
|
- |
//Scorre la lista degli eventi |
480 |
|
- |
foreach (String even in listaEventi) |
481 |
|
- |
{ |
482 |
|
- |
if (even == proxSchermata.bottoni[0].preCond) |
483 |
|
- |
{ |
484 |
|
- |
pulisciBottoni(); |
485 |
|
- |
|
486 |
|
- |
//Visualizziamo solo il bottone che ci interessa |
487 |
|
- |
buttonPanel1.Visibility = Visibility.Visible; |
488 |
|
- |
textB11.Text = proxSchermata.bottoni[0].testo; |
489 |
|
- |
|
490 |
|
- |
//proxSchermata.nBottoni = 1; //setta 1 bottone sulla schermata successiva |
491 |
|
- |
|
492 |
|
- |
//Bottone b1 = new Bottone(proxSchermata.bottoni[0].targetID, proxSchermata.bottoni[0].testo, proxSchermata.bottoni[0].preCond, proxSchermata.bottoni[0].postCond); |
493 |
|
- |
|
494 |
|
- |
|
495 |
|
- |
//try |
496 |
|
- |
//{ |
497 |
|
- |
// proxSchermata.bottoni.Clear(); |
498 |
|
- |
// proxSchermata.bottoni.Insert(0,b1); |
499 |
|
- |
//} |
500 |
|
- |
//catch { } |
501 |
|
- |
|
502 |
|
- |
} |
503 |
|
- |
|
504 |
|
- |
} |
505 |
|
- |
|
506 |
|
- |
} |
507 |
|
- |
|
508 |
467 |
|
String testoBottone22 = proxSchermata.bottoni[1].testo; |
509 |
468 |
|
textB22.Text = testoBottone22; |
510 |
469 |
|
|
511 |
|
- |
//PRE-CONDIZIONI |
512 |
|
- |
if (proxSchermata.bottoni[1].preCond != "") |
513 |
|
- |
{ |
514 |
|
- |
//Scorre la lista degli eventi |
515 |
|
- |
foreach (String even in listaEventi) |
516 |
|
- |
{ |
517 |
|
- |
if (even == proxSchermata.bottoni[1].preCond) |
518 |
|
- |
{ |
519 |
|
- |
pulisciBottoni(); |
520 |
|
- |
|
521 |
|
- |
//Visualizziamo solo il bottone che ci interessa |
522 |
|
- |
buttonPanel1.Visibility = Visibility.Visible; |
523 |
|
- |
textB11.Text = proxSchermata.bottoni[1].testo; |
524 |
|
- |
|
525 |
|
- |
|
526 |
|
- |
buttonPanel1.DataContext = proxSchermata; |
527 |
|
- |
|
528 |
|
- |
//proxSchermata.nBottoni = 1; //setta 1 bottone sulla schermata successiva |
529 |
|
- |
|
530 |
|
- |
//Bottone b1 = new Bottone(proxSchermata.bottoni[0].targetID, proxSchermata.bottoni[0].testo, proxSchermata.bottoni[0].preCond, proxSchermata.bottoni[0].postCond); |
531 |
|
- |
|
532 |
|
- |
|
533 |
|
- |
//try |
534 |
|
- |
//{ |
535 |
|
- |
// proxSchermata.bottoni.Clear(); |
536 |
|
- |
// proxSchermata.bottoni.Insert(0,b1); |
537 |
|
- |
//} |
538 |
|
- |
//catch { } |
539 |
|
- |
|
540 |
|
- |
} |
541 |
|
- |
|
542 |
|
- |
} |
543 |
|
- |
|
544 |
|
- |
} |
545 |
|
- |
|
546 |
470 |
|
buttonPanel2.DataContext = proxSchermata; // Per il binding |
547 |
471 |
|
attSchermata = proxSchermata; |
548 |
472 |
|
break; |
|
@@ -551,72 +475,12 @@ |
551 |
475 |
|
String testoBottone31 = proxSchermata.bottoni[0].testo; |
552 |
476 |
|
textB31.Text = testoBottone31; |
553 |
477 |
|
|
554 |
|
- |
//PRE-CONDIZIONI |
555 |
|
- |
if (proxSchermata.bottoni[0].preCond != "") |
556 |
|
- |
{ |
557 |
|
- |
//Scorre la lista degli eventi |
558 |
|
- |
foreach (String even in listaEventi) |
559 |
|
- |
{ |
560 |
|
- |
if (even == proxSchermata.bottoni[0].preCond) |
561 |
|
- |
{ |
562 |
|
- |
proxSchermata.nBottoni = 1; //setta 1 bottone sulla schermata successiva |
563 |
|
- |
|
564 |
|
- |
Bottone b1 = new Bottone(proxSchermata.bottoni[0].targetID, proxSchermata.bottoni[0].testo, proxSchermata.bottoni[0].preCond, proxSchermata.bottoni[0].postCond); |
565 |
|
- |
proxSchermata.bottoni = null; |
566 |
|
- |
|
567 |
|
- |
proxSchermata.bottoni.Add(b1); |
568 |
|
- |
} |
569 |
|
- |
|
570 |
|
- |
} |
571 |
|
- |
|
572 |
|
- |
} |
573 |
|
- |
|
574 |
478 |
|
String testoBottone32 = proxSchermata.bottoni[1].testo; |
575 |
479 |
|
textB32.Text = testoBottone32; |
576 |
480 |
|
|
577 |
|
- |
//PRE-CONDIZIONI |
578 |
|
- |
if (proxSchermata.bottoni[1].preCond != "") |
579 |
|
- |
{ |
580 |
|
- |
//Scorre la lista degli eventi |
581 |
|
- |
foreach (String even in listaEventi) |
582 |
|
- |
{ |
583 |
|
- |
if (even == proxSchermata.bottoni[1].preCond) |
584 |
|
- |
{ |
585 |
|
- |
proxSchermata.nBottoni = 1; //setta 1 bottone sulla schermata successiva |
586 |
|
- |
|
587 |
|
- |
Bottone b1 = new Bottone(proxSchermata.bottoni[1].targetID, proxSchermata.bottoni[1].testo, proxSchermata.bottoni[1].preCond, proxSchermata.bottoni[1].postCond); |
588 |
|
- |
proxSchermata.bottoni = null; |
589 |
|
- |
|
590 |
|
- |
proxSchermata.bottoni.Add(b1); |
591 |
|
- |
} |
592 |
|
- |
|
593 |
|
- |
} |
594 |
|
- |
|
595 |
|
- |
} |
596 |
|
- |
|
597 |
481 |
|
String testoBottone33 = proxSchermata.bottoni[2].testo; |
598 |
482 |
|
textB33.Text = testoBottone33; |
599 |
483 |
|
|
600 |
|
- |
//PRE-CONDIZIONI |
601 |
|
- |
if (proxSchermata.bottoni[2].preCond != "") |
602 |
|
- |
{ |
603 |
|
- |
//Scorre la lista degli eventi |
604 |
|
- |
foreach (String even in listaEventi) |
605 |
|
- |
{ |
606 |
|
- |
if (even == proxSchermata.bottoni[2].preCond) |
607 |
|
- |
{ |
608 |
|
- |
proxSchermata.nBottoni = 1; //setta 1 bottone sulla schermata successiva |
609 |
|
- |
|
610 |
|
- |
Bottone b1 = new Bottone(proxSchermata.bottoni[2].targetID, proxSchermata.bottoni[2].testo, proxSchermata.bottoni[2].preCond, proxSchermata.bottoni[2].postCond); |
611 |
|
- |
proxSchermata.bottoni = null; |
612 |
|
- |
|
613 |
|
- |
proxSchermata.bottoni.Add(b1); |
614 |
|
- |
} |
615 |
|
- |
|
616 |
|
- |
} |
617 |
|
- |
|
618 |
|
- |
} |
619 |
|
- |
|
620 |
484 |
|
buttonPanel3.DataContext = proxSchermata; // Per il binding |
621 |
485 |
|
attSchermata = proxSchermata; |
622 |
486 |
|
break; |
|
@@ -625,98 +489,33 @@ |
625 |
489 |
|
String testoBottone41 = proxSchermata.bottoni[0].testo; |
626 |
490 |
|
textB41.Text = testoBottone41; |
627 |
491 |
|
|
628 |
|
- |
//PRE-CONDIZIONI |
629 |
|
- |
if (proxSchermata.bottoni[0].preCond != "") |
630 |
|
- |
{ |
631 |
|
- |
//Scorre la lista degli eventi |
632 |
|
- |
foreach (String even in listaEventi) |
633 |
|
- |
{ |
634 |
|
- |
if (even == proxSchermata.bottoni[0].preCond) |
635 |
|
- |
{ |
636 |
|
- |
proxSchermata.nBottoni = 1; //setta 1 bottone sulla schermata successiva |
637 |
|
- |
|
638 |
|
- |
Bottone b1 = new Bottone(proxSchermata.bottoni[0].targetID, proxSchermata.bottoni[0].testo, proxSchermata.bottoni[0].preCond, proxSchermata.bottoni[0].postCond); |
639 |
|
- |
proxSchermata.bottoni = null; |
640 |
|
- |
|
641 |
|
- |
proxSchermata.bottoni.Add(b1); |
642 |
|
- |
} |
643 |
|
- |
|
644 |
|
- |
} |
645 |
|
- |
|
646 |
|
- |
} |
647 |
|
- |
|
648 |
492 |
|
String testoBottone42 = proxSchermata.bottoni[1].testo; |
649 |
493 |
|
textB42.Text = testoBottone42; |
650 |
494 |
|
|
651 |
|
- |
//PRE-CONDIZIONI |
652 |
|
- |
if (proxSchermata.bottoni[1].preCond != "") |
653 |
|
- |
{ |
654 |
|
- |
//Scorre la lista degli eventi |
655 |
|
- |
foreach (String even in listaEventi) |
656 |
|
- |
{ |
657 |
|
- |
if (even == proxSchermata.bottoni[1].preCond) |
658 |
|
- |
{ |
659 |
|
- |
proxSchermata.nBottoni = 1; //setta 1 bottone sulla schermata successiva |
660 |
|
- |
|
661 |
|
- |
Bottone b1 = new Bottone(proxSchermata.bottoni[1].targetID, proxSchermata.bottoni[1].testo, proxSchermata.bottoni[1].preCond, proxSchermata.bottoni[1].postCond); |
662 |
|
- |
proxSchermata.bottoni = null; |
663 |
|
- |
|
664 |
|
- |
proxSchermata.bottoni.Add(b1); |
665 |
|
- |
} |
666 |
|
- |
|
667 |
|
- |
} |
668 |
|
- |
|
669 |
|
- |
} |
670 |
|
- |
|
671 |
495 |
|
String testoBottone43 = proxSchermata.bottoni[2].testo; |
672 |
496 |
|
textB43.Text = testoBottone43; |
673 |
497 |
|
|
674 |
|
- |
//PRE-CONDIZIONI |
675 |
|
- |
if (proxSchermata.bottoni[2].preCond != "") |
676 |
|
- |
{ |
677 |
|
- |
//Scorre la lista degli eventi |
678 |
|
- |
foreach (String even in listaEventi) |
679 |
|
- |
{ |
680 |
|
- |
if (even == proxSchermata.bottoni[2].preCond) |
681 |
|
- |
{ |
682 |
|
- |
proxSchermata.nBottoni = 1; //setta 1 bottone sulla schermata successiva |
683 |
|
- |
|
684 |
|
- |
Bottone b1 = new Bottone(proxSchermata.bottoni[2].targetID, proxSchermata.bottoni[2].testo, proxSchermata.bottoni[2].preCond, proxSchermata.bottoni[2].postCond); |
685 |
|
- |
proxSchermata.bottoni = null; |
686 |
|
- |
|
687 |
|
- |
proxSchermata.bottoni.Add(b1); |
688 |
|
- |
} |
689 |
|
- |
|
690 |
|
- |
} |
691 |
|
- |
|
692 |
|
- |
} |
693 |
|
- |
|
694 |
498 |
|
String testoBottone44 = proxSchermata.bottoni[3].testo; |
695 |
499 |
|
textB44.Text = testoBottone44; |
696 |
500 |
|
|
697 |
|
- |
//PRE-CONDIZIONI |
698 |
|
- |
if (proxSchermata.bottoni[3].preCond != "") |
699 |
|
- |
{ |
700 |
|
- |
//Scorre la lista degli eventi |
701 |
|
- |
foreach (String even in listaEventi) |
702 |
|
- |
{ |
703 |
|
- |
if (even == proxSchermata.bottoni[3].preCond) |
704 |
|
- |
{ |
705 |
|
- |
proxSchermata.nBottoni = 1; //setta 1 bottone sulla schermata successiva |
706 |
|
- |
|
707 |
|
- |
Bottone b1 = new Bottone(proxSchermata.bottoni[3].targetID, proxSchermata.bottoni[3].testo, proxSchermata.bottoni[3].preCond, proxSchermata.bottoni[3].postCond); |
708 |
|
- |
proxSchermata.bottoni = null; |
709 |
|
- |
|
710 |
|
- |
proxSchermata.bottoni.Add(b1); |
711 |
|
- |
} |
712 |
|
- |
|
713 |
|
- |
} |
714 |
|
- |
|
715 |
|
- |
} |
716 |
|
- |
|
717 |
501 |
|
buttonPanel4.DataContext = proxSchermata; // Per il binding |
718 |
502 |
|
attSchermata = proxSchermata; |
719 |
503 |
|
break; |
|
504 |
+ |
case 5: |
|
505 |
+ |
buttonPanel5.Visibility = Visibility.Visible; |
|
506 |
+ |
String testoBottone51 = proxSchermata.bottoni[0].testo; |
|
507 |
+ |
textB51.Text = testoBottone51; |
|
508 |
+ |
String testoBottone52 = proxSchermata.bottoni[1].testo; |
|
509 |
+ |
textB52.Text = testoBottone52; |
|
510 |
+ |
String testoBottone53 = proxSchermata.bottoni[2].testo; |
|
511 |
+ |
textB53.Text = testoBottone53; |
|
512 |
+ |
String testoBottone54 = proxSchermata.bottoni[3].testo; |
|
513 |
+ |
textB54.Text = testoBottone54; |
|
514 |
+ |
String testoBottone55 = proxSchermata.bottoni[4].testo; |
|
515 |
+ |
textB55.Text = testoBottone55; |
|
516 |
+ |
buttonPanel5.DataContext = proxSchermata; // Per il binding |
|
517 |
+ |
attSchermata = proxSchermata; |
|
518 |
+ |
break; |
720 |
519 |
|
|
721 |
520 |
|
} |
722 |
521 |
|
|
|
@@ -768,35 +567,40 @@ |
768 |
567 |
|
|
769 |
568 |
|
topPanel.DataContext = proxSchermata; |
770 |
569 |
|
|
771 |
|
- |
//Recuperiamo i dati relativi ai bottoni |
772 |
|
- |
int numBottoni = proxSchermata.nBottoni; |
773 |
|
- |
switch (numBottoni) |
|
570 |
+ |
//PRE-CONDIZIONI |
|
571 |
+ |
foreach (Bottone bot in proxSchermata.bottoni) |
774 |
572 |
|
{ |
775 |
|
- |
case 1: |
776 |
|
- |
buttonPanel1.Visibility = Visibility.Visible; |
777 |
|
- |
String testoBottone11 = proxSchermata.bottoni[0].testo; |
778 |
|
- |
textB11.Text = testoBottone11; |
779 |
|
- |
|
780 |
|
- |
//PRE-CONDIZIONI |
781 |
|
- |
if (proxSchermata.bottoni[0].preCond != "") |
|
573 |
+ |
if (bot.preCond != "") |
|
574 |
+ |
{ |
|
575 |
+ |
//Scorre la lista degli eventi (pre-condizioni) |
|
576 |
+ |
foreach (String even in listaEventi) |
782 |
577 |
|
{ |
783 |
|
- |
//Scorre la lista degli eventi |
784 |
|
- |
foreach (String even in listaEventi) |
|
578 |
+ |
if (even == bot.preCond) |
785 |
579 |
|
{ |
786 |
|
- |
if (even == proxSchermata.bottoni[0].preCond) |
787 |
|
- |
{ |
788 |
|
- |
proxSchermata.nBottoni = 1; //setta 1 bottone sulla schermata successiva |
|
580 |
+ |
proxSchermata.nBottoni = 1; //setta 1 bottone sulla schermata successiva |
|
581 |
+ |
proxSchermata.bottoni = new ObservableCollection<Bottone>(); |
789 |
582 |
|
|
790 |
|
- |
Bottone b1 = new Bottone(proxSchermata.bottoni[0].targetID, proxSchermata.bottoni[0].testo, proxSchermata.bottoni[0].preCond, proxSchermata.bottoni[0].postCond); |
791 |
|
- |
proxSchermata.bottoni = null; |
792 |
|
- |
|
793 |
|
- |
proxSchermata.bottoni.Add(b1); |
|
583 |
+ |
try |
|
584 |
+ |
{ |
|
585 |
+ |
proxSchermata.bottoni.Add(bot); |
794 |
586 |
|
} |
795 |
|
- |
|
|
587 |
+ |
catch { } |
796 |
588 |
|
} |
797 |
589 |
|
|
798 |
590 |
|
} |
799 |
591 |
|
|
|
592 |
+ |
} |
|
593 |
+ |
} |
|
594 |
+ |
|
|
595 |
+ |
//Recuperiamo i dati relativi ai bottoni |
|
596 |
+ |
int numBottoni = proxSchermata.nBottoni; |
|
597 |
+ |
switch (numBottoni) |
|
598 |
+ |
{ |
|
599 |
+ |
case 1: |
|
600 |
+ |
buttonPanel1.Visibility = Visibility.Visible; |
|
601 |
+ |
String testoBottone11 = proxSchermata.bottoni[0].testo; |
|
602 |
+ |
textB11.Text = testoBottone11; |
|
603 |
+ |
|
800 |
604 |
|
buttonPanel1.DataContext = proxSchermata; // Per il binding |
801 |
605 |
|
attSchermata = proxSchermata; |
802 |
606 |
|
break; |
|
@@ -805,49 +609,9 @@ |
805 |
609 |
|
String testoBottone21 = proxSchermata.bottoni[0].testo; |
806 |
610 |
|
textB21.Text = testoBottone21; |
807 |
611 |
|
|
808 |
|
- |
//PRE-CONDIZIONI |
809 |
|
- |
if (proxSchermata.bottoni[0].preCond != "") |
810 |
|
- |
{ |
811 |
|
- |
//Scorre la lista di chiavi di mappaEventi |
812 |
|
- |
foreach (String even in listaEventi) |
813 |
|
- |
{ |
814 |
|
- |
if (even == proxSchermata.bottoni[0].preCond) |
815 |
|
- |
{ |
816 |
|
- |
proxSchermata.nBottoni = 1; //setta 1 bottone sulla schermata successiva |
817 |
|
- |
|
818 |
|
- |
Bottone b1 = new Bottone(proxSchermata.bottoni[0].targetID, proxSchermata.bottoni[0].testo, proxSchermata.bottoni[0].preCond, proxSchermata.bottoni[0].postCond); |
819 |
|
- |
proxSchermata.bottoni = null; |
820 |
|
- |
|
821 |
|
- |
proxSchermata.bottoni.Add(b1); |
822 |
|
- |
} |
823 |
|
- |
|
824 |
|
- |
} |
825 |
|
- |
|
826 |
|
- |
} |
827 |
|
- |
|
828 |
612 |
|
String testoBottone22 = proxSchermata.bottoni[1].testo; |
829 |
613 |
|
textB22.Text = testoBottone22; |
830 |
614 |
|
|
831 |
|
- |
//PRE-CONDIZIONI |
832 |
|
- |
if (proxSchermata.bottoni[1].preCond != "") |
833 |
|
- |
{ |
834 |
|
- |
//Scorre la lista di chiavi di mappaEventi |
835 |
|
- |
foreach (String even in listaEventi) |
836 |
|
- |
{ |
837 |
|
- |
if (even == proxSchermata.bottoni[1].preCond) |
838 |
|
- |
{ |
839 |
|
- |
proxSchermata.nBottoni = 1; //setta 1 bottone sulla schermata successiva |
840 |
|
- |
|
841 |
|
- |
Bottone b1 = new Bottone(proxSchermata.bottoni[1].targetID, proxSchermata.bottoni[1].testo, proxSchermata.bottoni[1].preCond, proxSchermata.bottoni[1].postCond); |
842 |
|
- |
proxSchermata.bottoni = null; |
843 |
|
- |
|
844 |
|
- |
proxSchermata.bottoni.Add(b1); |
845 |
|
- |
} |
846 |
|
- |
|
847 |
|
- |
} |
848 |
|
- |
|
849 |
|
- |
} |
850 |
|
- |
|
851 |
615 |
|
buttonPanel2.DataContext = proxSchermata; // Per il binding |
852 |
616 |
|
attSchermata = proxSchermata; |
853 |
617 |
|
break; |
|
@@ -856,72 +620,631 @@ |
856 |
620 |
|
String testoBottone31 = proxSchermata.bottoni[0].testo; |
857 |
621 |
|
textB31.Text = testoBottone31; |
858 |
622 |
|
|
859 |
|
- |
//PRE-CONDIZIONI |
860 |
|
- |
if (proxSchermata.bottoni[0].preCond != "") |
861 |
|
- |
{ |
862 |
|
- |
//Scorre la lista di chiavi di mappaEventi |
863 |
|
- |
foreach (String even in listaEventi) |
864 |
|
- |
{ |
865 |
|
- |
if (even == proxSchermata.bottoni[0].preCond) |
866 |
|
- |
{ |
867 |
|
- |
proxSchermata.nBottoni = 1; //setta 1 bottone sulla schermata successiva |
868 |
|
- |
|
869 |
|
- |
Bottone b1 = new Bottone(proxSchermata.bottoni[0].targetID, proxSchermata.bottoni[0].testo, proxSchermata.bottoni[0].preCond, proxSchermata.bottoni[0].postCond); |
870 |
|
- |
proxSchermata.bottoni = null; |
|
623 |
+ |
String testoBottone32 = proxSchermata.bottoni[1].testo; |
|
624 |
+ |
textB32.Text = testoBottone32; |
871 |
625 |
|
|
872 |
|
- |
proxSchermata.bottoni.Add(b1); |
873 |
|
- |
} |
|
626 |
+ |
String testoBottone33 = proxSchermata.bottoni[2].testo; |
|
627 |
+ |
textB33.Text = testoBottone33; |
874 |
628 |
|
|
875 |
|
- |
} |
|
629 |
+ |
buttonPanel3.DataContext = proxSchermata; // Per il binding |
|
630 |
+ |
attSchermata = proxSchermata; |
|
631 |
+ |
break; |
|
632 |
+ |
case 4: |
|
633 |
+ |
buttonPanel4.Visibility = Visibility.Visible; |
|
634 |
+ |
String testoBottone41 = proxSchermata.bottoni[0].testo; |
|
635 |
+ |
textB41.Text = testoBottone41; |
876 |
636 |
|
|
877 |
|
- |
} |
|
637 |
+ |
String testoBottone42 = proxSchermata.bottoni[1].testo; |
|
638 |
+ |
textB42.Text = testoBottone42; |
878 |
639 |
|
|
879 |
|
- |
String testoBottone32 = proxSchermata.bottoni[1].testo; |
880 |
|
- |
textB32.Text = testoBottone32; |
|
640 |
+ |
String testoBottone43 = proxSchermata.bottoni[2].testo; |
|
641 |
+ |
textB43.Text = testoBottone43; |
881 |
642 |
|
|
882 |
|
- |
//PRE-CONDIZIONI |
883 |
|
- |
if (proxSchermata.bottoni[1].preCond != "") |
884 |
|
- |
{ |
885 |
|
- |
//Scorre la lista di chiavi di mappaEventi |
886 |
|
- |
foreach (String even in listaEventi) |
887 |
|
- |
{ |
888 |
|
- |
if (even == proxSchermata.bottoni[1].preCond) |
889 |
|
- |
{ |
890 |
|
- |
proxSchermata.nBottoni = 1; //setta 1 bottone sulla schermata successiva |
|
643 |
+ |
String testoBottone44 = proxSchermata.bottoni[3].testo; |
|
644 |
+ |
textB44.Text = testoBottone44; |
891 |
645 |
|
|
892 |
|
- |
Bottone b1 = new Bottone(proxSchermata.bottoni[1].targetID, proxSchermata.bottoni[1].testo, proxSchermata.bottoni[1].preCond, proxSchermata.bottoni[1].postCond); |
893 |
|
- |
proxSchermata.bottoni = null; |
|
646 |
+ |
buttonPanel4.DataContext = proxSchermata; // Per il binding |
|
647 |
+ |
attSchermata = proxSchermata; |
|
648 |
+ |
break; |
|
649 |
+ |
case 5: |
|
650 |
+ |
buttonPanel5.Visibility = Visibility.Visible; |
|
651 |
+ |
String testoBottone51 = proxSchermata.bottoni[0].testo; |
|
652 |
+ |
textB51.Text = testoBottone51; |
|
653 |
+ |
String testoBottone52 = proxSchermata.bottoni[1].testo; |
|
654 |
+ |
textB52.Text = testoBottone52; |
|
655 |
+ |
String testoBottone53 = proxSchermata.bottoni[2].testo; |
|
656 |
+ |
textB53.Text = testoBottone53; |
|
657 |
+ |
String testoBottone54 = proxSchermata.bottoni[3].testo; |
|
658 |
+ |
textB54.Text = testoBottone54; |
|
659 |
+ |
String testoBottone55 = proxSchermata.bottoni[4].testo; |
|
660 |
+ |
textB55.Text = testoBottone55; |
|
661 |
+ |
buttonPanel5.DataContext = proxSchermata; // Per il binding |
|
662 |
+ |
attSchermata = proxSchermata; |
|
663 |
+ |
break; |
894 |
664 |
|
|
895 |
|
- |
proxSchermata.bottoni.Add(b1); |
896 |
|
- |
} |
|
665 |
+ |
} |
|
666 |
+ |
} |
897 |
667 |
|
|
898 |
|
- |
} |
|
668 |
+ |
private void button22_Click(object sender, RoutedEventArgs e) |
|
669 |
+ |
{ |
|
670 |
+ |
//POST-CONDIZIONI |
|
671 |
+ |
if (attSchermata.bottoni[1].postCond != "") |
|
672 |
+ |
{ |
|
673 |
+ |
postC = proxSchermata.bottoni[1].postCond; |
|
674 |
+ |
listaEventi.Add(postC); |
|
675 |
+ |
} |
899 |
676 |
|
|
900 |
|
- |
} |
|
677 |
+ |
scroller.ScrollToVerticalOffset(0.0); //riporta lo scroller alla posizione di partenza |
901 |
678 |
|
|
902 |
|
- |
String testoBottone33 = proxSchermata.bottoni[2].testo; |
903 |
|
- |
textB33.Text = testoBottone33; |
|
679 |
+ |
pulisciBottoni(); |
904 |
680 |
|
|
905 |
|
- |
//PRE-CONDIZIONI |
906 |
|
- |
if (proxSchermata.bottoni[2].preCond != "") |
907 |
|
- |
{ |
908 |
|
- |
//Scorre la lista di chiavi di mappaEventi |
909 |
|
- |
foreach (String even in listaEventi) |
910 |
|
- |
{ |
911 |
|
- |
if (even == proxSchermata.bottoni[2].preCond) |
912 |
|
- |
{ |
913 |
|
- |
proxSchermata.nBottoni = 1; //setta 1 bottone sulla schermata successiva |
|
681 |
+ |
String target = this.attSchermata.bottoni[1].targetID; |
914 |
682 |
|
|
915 |
|
- |
Bottone b1 = new Bottone(proxSchermata.bottoni[2].targetID, proxSchermata.bottoni[2].testo, proxSchermata.bottoni[2].preCond, proxSchermata.bottoni[2].postCond); |
916 |
|
- |
proxSchermata.bottoni = null; |
|
683 |
+ |
mappaSchermate.TryGetValue(target, out proxSchermata); |
917 |
684 |
|
|
918 |
|
- |
proxSchermata.bottoni.Add(b1); |
919 |
|
- |
} |
|
685 |
+ |
//Recuperiamo l'immagine attuale |
|
686 |
+ |
String nomeImg = proxSchermata.topImage; |
|
687 |
+ |
string uriImg = String.Format("ms-appx:///images/{0}", nomeImg); |
920 |
688 |
|
|
921 |
|
- |
} |
|
689 |
+ |
try |
|
690 |
+ |
{ |
922 |
691 |
|
|
923 |
|
- |
} |
|
692 |
+ |
imgTop.Source = new BitmapImage(new Uri(uriImg, UriKind.Relative)); |
924 |
693 |
|
|
|
694 |
+ |
} |
|
695 |
+ |
catch { } |
|
696 |
+ |
|
|
697 |
+ |
//Recuperiamo il testo attuale |
|
698 |
+ |
String testo = proxSchermata.text; |
|
699 |
+ |
testoTop.Text = testo; |
|
700 |
+ |
|
|
701 |
+ |
topPanel.DataContext = proxSchermata; |
|
702 |
+ |
|
|
703 |
+ |
//PRE-CONDIZIONI |
|
704 |
+ |
foreach (Bottone bot in proxSchermata.bottoni) |
|
705 |
+ |
{ |
|
706 |
+ |
if (bot.preCond != "") |
|
707 |
+ |
{ |
|
708 |
+ |
//Scorre la lista degli eventi (pre-condizioni) |
|
709 |
+ |
foreach (String even in listaEventi) |
|
710 |
+ |
{ |
|
711 |
+ |
if (even == bot.preCond) |
|
712 |
+ |
{ |
|
713 |
+ |
proxSchermata.nBottoni = 1; //setta 1 bottone sulla schermata successiva |
|
714 |
+ |
proxSchermata.bottoni = new ObservableCollection<Bottone>(); |
|
715 |
+ |
|
|
716 |
+ |
try |
|
717 |
+ |
{ |
|
718 |
+ |
proxSchermata.bottoni.Add(bot); |
|
719 |
+ |
} |
|
720 |
+ |
catch { } |
|
721 |
+ |
} |
|
722 |
+ |
|
|
723 |
+ |
} |
|
724 |
+ |
|
|
725 |
+ |
} |
|
726 |
+ |
} |
|
727 |
+ |
|
|
728 |
+ |
//Recuperiamo i dati relativi ai bottoni |
|
729 |
+ |
int numBottoni = proxSchermata.nBottoni; |
|
730 |
+ |
switch (numBottoni) |
|
731 |
+ |
{ |
|
732 |
+ |
case 1: |
|
733 |
+ |
buttonPanel1.Visibility = Visibility.Visible; |
|
734 |
+ |
String testoBottone11 = proxSchermata.bottoni[0].testo; |
|
735 |
+ |
textB11.Text = testoBottone11; |
|
736 |
+ |
buttonPanel1.DataContext = proxSchermata; // Per il binding |
|
737 |
+ |
attSchermata = proxSchermata; |
|
738 |
+ |
break; |
|
739 |
+ |
case 2: |
|
740 |
+ |
buttonPanel2.Visibility = Visibility.Visible; |
|
741 |
+ |
String testoBottone21 = proxSchermata.bottoni[0].testo; |
|
742 |
+ |
textB21.Text = testoBottone21; |
|
743 |
+ |
String testoBottone22 = proxSchermata.bottoni[1].testo; |
|
744 |
+ |
textB22.Text = testoBottone22; |
|
745 |
+ |
buttonPanel2.DataContext = proxSchermata; // Per il binding |
|
746 |
+ |
attSchermata = proxSchermata; |
|
747 |
+ |
break; |
|
748 |
+ |
case 3: |
|
749 |
+ |
buttonPanel3.Visibility = Visibility.Visible; |
|
750 |
+ |
String testoBottone31 = proxSchermata.bottoni[0].testo; |
|
751 |
+ |
textB31.Text = testoBottone31; |
|
752 |
+ |
String testoBottone32 = proxSchermata.bottoni[1].testo; |
|
753 |
+ |
textB32.Text = testoBottone32; |
|
754 |
+ |
String testoBottone33 = proxSchermata.bottoni[2].testo; |
|
755 |
+ |
textB33.Text = testoBottone33; |
|
756 |
+ |
buttonPanel3.DataContext = proxSchermata; // Per il binding |
|
757 |
+ |
attSchermata = proxSchermata; |
|
758 |
+ |
break; |
|
759 |
+ |
case 4: |
|
760 |
+ |
buttonPanel4.Visibility = Visibility.Visible; |
|
761 |
+ |
String testoBottone41 = proxSchermata.bottoni[0].testo; |
|
762 |
+ |
textB41.Text = testoBottone41; |
|
763 |
+ |
String testoBottone42 = proxSchermata.bottoni[1].testo; |
|
764 |
+ |
textB42.Text = testoBottone42; |
|
765 |
+ |
String testoBottone43 = proxSchermata.bottoni[2].testo; |
|
766 |
+ |
textB43.Text = testoBottone43; |
|
767 |
+ |
String testoBottone44 = proxSchermata.bottoni[3].testo; |
|
768 |
+ |
textB44.Text = testoBottone44; |
|
769 |
+ |
buttonPanel4.DataContext = proxSchermata; // Per il binding |
|
770 |
+ |
attSchermata = proxSchermata; |
|
771 |
+ |
break; |
|
772 |
+ |
case 5: |
|
773 |
+ |
buttonPanel5.Visibility = Visibility.Visible; |
|
774 |
+ |
String testoBottone51 = proxSchermata.bottoni[0].testo; |
|
775 |
+ |
textB51.Text = testoBottone51; |
|
776 |
+ |
String testoBottone52 = proxSchermata.bottoni[1].testo; |
|
777 |
+ |
textB52.Text = testoBottone52; |
|
778 |
+ |
String testoBottone53 = proxSchermata.bottoni[2].testo; |
|
779 |
+ |
textB53.Text = testoBottone53; |
|
780 |
+ |
String testoBottone54 = proxSchermata.bottoni[3].testo; |
|
781 |
+ |
textB54.Text = testoBottone54; |
|
782 |
+ |
String testoBottone55 = proxSchermata.bottoni[4].testo; |
|
783 |
+ |
textB55.Text = testoBottone55; |
|
784 |
+ |
buttonPanel5.DataContext = proxSchermata; // Per il binding |
|
785 |
+ |
attSchermata = proxSchermata; |
|
786 |
+ |
break; |
|
787 |
+ |
|
|
788 |
+ |
} |
|
789 |
+ |
} |
|
790 |
+ |
|
|
791 |
+ |
private void button31_Click(object sender, RoutedEventArgs e) |
|
792 |
+ |
{ |
|
793 |
+ |
//POST-CONDIZIONI |
|
794 |
+ |
if (attSchermata.bottoni[0].postCond != "") |
|
795 |
+ |
{ |
|
796 |
+ |
postC = proxSchermata.bottoni[0].postCond; |
|
797 |
+ |
listaEventi.Add(postC); |
|
798 |
+ |
} |
|
799 |
+ |
|
|
800 |
+ |
scroller.ScrollToVerticalOffset(0.0); //riporta lo scroller alla posizione di partenza |
|
801 |
+ |
|
|
802 |
+ |
pulisciBottoni(); |
|
803 |
+ |
|
|
804 |
+ |
String target = this.attSchermata.bottoni[0].targetID; |
|
805 |
+ |
|
|
806 |
+ |
mappaSchermate.TryGetValue(target, out proxSchermata); |
|
807 |
+ |
|
|
808 |
+ |
//Recuperiamo l'immagine attuale |
|
809 |
+ |
String nomeImg = proxSchermata.topImage; |
|
810 |
+ |
string uriImg = String.Format("ms-appx:///images/{0}", nomeImg); |
|
811 |
+ |
|
|
812 |
+ |
try |
|
813 |
+ |
{ |
|
814 |
+ |
|
|
815 |
+ |
imgTop.Source = new BitmapImage(new Uri(uriImg, UriKind.Relative)); |
|
816 |
+ |
|
|
817 |
+ |
} |
|
818 |
+ |
catch { } |
|
819 |
+ |
|
|
820 |
+ |
//Recuperiamo il testo attuale |
|
821 |
+ |
String testo = proxSchermata.text; |
|
822 |
+ |
testoTop.Text = testo; |
|
823 |
+ |
|
|
824 |
+ |
topPanel.DataContext = proxSchermata; |
|
825 |
+ |
|
|
826 |
+ |
//PRE-CONDIZIONI |
|
827 |
+ |
foreach (Bottone bot in proxSchermata.bottoni) |
|
828 |
+ |
{ |
|
829 |
+ |
if (bot.preCond != "") |
|
830 |
+ |
{ |
|
831 |
+ |
//Scorre la lista degli eventi (pre-condizioni) |
|
832 |
+ |
foreach (String even in listaEventi) |
|
833 |
+ |
{ |
|
834 |
+ |
if (even == bot.preCond) |
|
835 |
+ |
{ |
|
836 |
+ |
proxSchermata.nBottoni = 1; //setta 1 bottone sulla schermata successiva |
|
837 |
+ |
proxSchermata.bottoni = new ObservableCollection<Bottone>(); |
|
838 |
+ |
|
|
839 |
+ |
try |
|
840 |
+ |
{ |
|
841 |
+ |
proxSchermata.bottoni.Add(bot); |
|
842 |
+ |
} |
|
843 |
+ |
catch { } |
|
844 |
+ |
} |
|
845 |
+ |
|
|
846 |
+ |
} |
|
847 |
+ |
|
|
848 |
+ |
} |
|
849 |
+ |
} |
|
850 |
+ |
|
|
851 |
+ |
//Recuperiamo i dati relativi ai bottoni |
|
852 |
+ |
int numBottoni = proxSchermata.nBottoni; |
|
853 |
+ |
switch (numBottoni) |
|
854 |
+ |
{ |
|
855 |
+ |
case 1: |
|
856 |
+ |
buttonPanel1.Visibility = Visibility.Visible; |
|
857 |
+ |
String testoBottone11 = proxSchermata.bottoni[0].testo; |
|
858 |
+ |
textB11.Text = testoBottone11; |
|
859 |
+ |
buttonPanel1.DataContext = proxSchermata; // Per il binding |
|
860 |
+ |
attSchermata = proxSchermata; |
|
861 |
+ |
break; |
|
862 |
+ |
case 2: |
|
863 |
+ |
buttonPanel2.Visibility = Visibility.Visible; |
|
864 |
+ |
String testoBottone21 = proxSchermata.bottoni[0].testo; |
|
865 |
+ |
textB21.Text = testoBottone21; |
|
866 |
+ |
String testoBottone22 = proxSchermata.bottoni[1].testo; |
|
867 |
+ |
textB22.Text = testoBottone22; |
|
868 |
+ |
buttonPanel2.DataContext = proxSchermata; // Per il binding |
|
869 |
+ |
attSchermata = proxSchermata; |
|
870 |
+ |
break; |
|
871 |
+ |
case 3: |
|
872 |
+ |
buttonPanel3.Visibility = Visibility.Visible; |
|
873 |
+ |
String testoBottone31 = proxSchermata.bottoni[0].testo; |
|
874 |
+ |
textB31.Text = testoBottone31; |
|
875 |
+ |
String testoBottone32 = proxSchermata.bottoni[1].testo; |
|
876 |
+ |
textB32.Text = testoBottone32; |
|
877 |
+ |
String testoBottone33 = proxSchermata.bottoni[2].testo; |
|
878 |
+ |
textB33.Text = testoBottone33; |
|
879 |
+ |
buttonPanel3.DataContext = proxSchermata; // Per il binding |
|
880 |
+ |
attSchermata = proxSchermata; |
|
881 |
+ |
break; |
|
882 |
+ |
case 4: |
|
883 |
+ |
buttonPanel4.Visibility = Visibility.Visible; |
|
884 |
+ |
String testoBottone41 = proxSchermata.bottoni[0].testo; |
|
885 |
+ |
textB41.Text = testoBottone41; |
|
886 |
+ |
String testoBottone42 = proxSchermata.bottoni[1].testo; |
|
887 |
+ |
textB42.Text = testoBottone42; |
|
888 |
+ |
String testoBottone43 = proxSchermata.bottoni[2].testo; |
|
889 |
+ |
textB43.Text = testoBottone43; |
|
890 |
+ |
String testoBottone44 = proxSchermata.bottoni[3].testo; |
|
891 |
+ |
textB44.Text = testoBottone44; |
|
892 |
+ |
buttonPanel4.DataContext = proxSchermata; // Per il binding |
|
893 |
+ |
attSchermata = proxSchermata; |
|
894 |
+ |
break; |
|
895 |
+ |
case 5: |
|
896 |
+ |
buttonPanel5.Visibility = Visibility.Visible; |
|
897 |
+ |
String testoBottone51 = proxSchermata.bottoni[0].testo; |
|
898 |
+ |
textB51.Text = testoBottone51; |
|
899 |
+ |
String testoBottone52 = proxSchermata.bottoni[1].testo; |
|
900 |
+ |
textB52.Text = testoBottone52; |
|
901 |
+ |
String testoBottone53 = proxSchermata.bottoni[2].testo; |
|
902 |
+ |
textB53.Text = testoBottone53; |
|
903 |
+ |
String testoBottone54 = proxSchermata.bottoni[3].testo; |
|
904 |
+ |
textB54.Text = testoBottone54; |
|
905 |
+ |
String testoBottone55 = proxSchermata.bottoni[4].testo; |
|
906 |
+ |
textB55.Text = testoBottone55; |
|
907 |
+ |
buttonPanel5.DataContext = proxSchermata; // Per il binding |
|
908 |
+ |
attSchermata = proxSchermata; |
|
909 |
+ |
break; |
|
910 |
+ |
|
|
911 |
+ |
} |
|
912 |
+ |
} |
|
913 |
+ |
|
|
914 |
+ |
private void button32_Click(object sender, RoutedEventArgs e) |
|
915 |
+ |
{ |
|
916 |
+ |
//POST-CONDIZIONI |
|
917 |
+ |
if (attSchermata.bottoni[1].postCond != "") |
|
918 |
+ |
{ |
|
919 |
+ |
postC = proxSchermata.bottoni[1].postCond; |
|
920 |
+ |
listaEventi.Add(postC); |
|
921 |
+ |
} |
|
922 |
+ |
|
|
923 |
+ |
scroller.ScrollToVerticalOffset(0.0); //riporta lo scroller alla posizione di partenza |
|
924 |
+ |
|
|
925 |
+ |
pulisciBottoni(); |
|
926 |
+ |
|
|
927 |
+ |
String target = this.attSchermata.bottoni[1].targetID; |
|
928 |
+ |
|
|
929 |
+ |
mappaSchermate.TryGetValue(target, out proxSchermata); |
|
930 |
+ |
|
|
931 |
+ |
//Recuperiamo l'immagine attuale |
|
932 |
+ |
String nomeImg = proxSchermata.topImage; |
|
933 |
+ |
string uriImg = String.Format("ms-appx:///images/{0}", nomeImg); |
|
934 |
+ |
|
|
935 |
+ |
try |
|
936 |
+ |
{ |
|
937 |
+ |
|
|
938 |
+ |
imgTop.Source = new BitmapImage(new Uri(uriImg, UriKind.Relative)); |
|
939 |
+ |
|
|
940 |
+ |
} |
|
941 |
+ |
catch { } |
|
942 |
+ |
|
|
943 |
+ |
//Recuperiamo il testo attuale |
|
944 |
+ |
String testo = proxSchermata.text; |
|
945 |
+ |
testoTop.Text = testo; |
|
946 |
+ |
|
|
947 |
+ |
topPanel.DataContext = proxSchermata; |
|
948 |
+ |
|
|
949 |
+ |
//PRE-CONDIZIONI |
|
950 |
+ |
foreach (Bottone bot in proxSchermata.bottoni) |
|
951 |
+ |
{ |
|
952 |
+ |
if (bot.preCond != "") |
|
953 |
+ |
{ |
|
954 |
+ |
//Scorre la lista degli eventi (pre-condizioni) |
|
955 |
+ |
foreach (String even in listaEventi) |
|
956 |
+ |
{ |
|
957 |
+ |
if (even == bot.preCond) |
|
958 |
+ |
{ |
|
959 |
+ |
proxSchermata.nBottoni = 1; //setta 1 bottone sulla schermata successiva |
|
960 |
+ |
proxSchermata.bottoni = new ObservableCollection<Bottone>(); |
|
961 |
+ |
|
|
962 |
+ |
try |
|
963 |
+ |
{ |
|
964 |
+ |
proxSchermata.bottoni.Add(bot); |
|
965 |
+ |
} |
|
966 |
+ |
catch { } |
|
967 |
+ |
} |
|
968 |
+ |
|
|
969 |
+ |
} |
|
970 |
+ |
|
|
971 |
+ |
} |
|
972 |
+ |
} |
|
973 |
+ |
|
|
974 |
+ |
//Recuperiamo i dati relativi ai bottoni |
|
975 |
+ |
int numBottoni = proxSchermata.nBottoni; |
|
976 |
+ |
switch (numBottoni) |
|
977 |
+ |
{ |
|
978 |
+ |
case 1: |
|
979 |
+ |
buttonPanel1.Visibility = Visibility.Visible; |
|
980 |
+ |
String testoBottone11 = proxSchermata.bottoni[0].testo; |
|
981 |
+ |
textB11.Text = testoBottone11; |
|
982 |
+ |
buttonPanel1.DataContext = proxSchermata; // Per il binding |
|
983 |
+ |
attSchermata = proxSchermata; |
|
984 |
+ |
break; |
|
985 |
+ |
case 2: |
|
986 |
+ |
buttonPanel2.Visibility = Visibility.Visible; |
|
987 |
+ |
String testoBottone21 = proxSchermata.bottoni[0].testo; |
|
988 |
+ |
textB21.Text = testoBottone21; |
|
989 |
+ |
String testoBottone22 = proxSchermata.bottoni[1].testo; |
|
990 |
+ |
textB22.Text = testoBottone22; |
|
991 |
+ |
buttonPanel2.DataContext = proxSchermata; // Per il binding |
|
992 |
+ |
attSchermata = proxSchermata; |
|
993 |
+ |
break; |
|
994 |
+ |
case 3: |
|
995 |
+ |
buttonPanel3.Visibility = Visibility.Visible; |
|
996 |
+ |
String testoBottone31 = proxSchermata.bottoni[0].testo; |
|
997 |
+ |
textB31.Text = testoBottone31; |
|
998 |
+ |
String testoBottone32 = proxSchermata.bottoni[1].testo; |
|
999 |
+ |
textB32.Text = testoBottone32; |
|
1000 |
+ |
String testoBottone33 = proxSchermata.bottoni[2].testo; |
|
1001 |
+ |
textB33.Text = testoBottone33; |
|
1002 |
+ |
buttonPanel3.DataContext = proxSchermata; // Per il binding |
|
1003 |
+ |
attSchermata = proxSchermata; |
|
1004 |
+ |
break; |
|
1005 |
+ |
case 4: |
|
1006 |
+ |
buttonPanel4.Visibility = Visibility.Visible; |
|
1007 |
+ |
String testoBottone41 = proxSchermata.bottoni[0].testo; |
|
1008 |
+ |
textB41.Text = testoBottone41; |
|
1009 |
+ |
String testoBottone42 = proxSchermata.bottoni[1].testo; |
|
1010 |
+ |
textB42.Text = testoBottone42; |
|
1011 |
+ |
String testoBottone43 = proxSchermata.bottoni[2].testo; |
|
1012 |
+ |
textB43.Text = testoBottone43; |
|
1013 |
+ |
String testoBottone44 = proxSchermata.bottoni[3].testo; |
|
1014 |
+ |
textB44.Text = testoBottone44; |
|
1015 |
+ |
buttonPanel4.DataContext = proxSchermata; // Per il binding |
|
1016 |
+ |
attSchermata = proxSchermata; |
|
1017 |
+ |
break; |
|
1018 |
+ |
case 5: |
|
1019 |
+ |
buttonPanel5.Visibility = Visibility.Visible; |
|
1020 |
+ |
String testoBottone51 = proxSchermata.bottoni[0].testo; |
|
1021 |
+ |
textB51.Text = testoBottone51; |
|
1022 |
+ |
String testoBottone52 = proxSchermata.bottoni[1].testo; |
|
1023 |
+ |
textB52.Text = testoBottone52; |
|
1024 |
+ |
String testoBottone53 = proxSchermata.bottoni[2].testo; |
|
1025 |
+ |
textB53.Text = testoBottone53; |
|
1026 |
+ |
String testoBottone54 = proxSchermata.bottoni[3].testo; |
|
1027 |
+ |
textB54.Text = testoBottone54; |
|
1028 |
+ |
String testoBottone55 = proxSchermata.bottoni[4].testo; |
|
1029 |
+ |
textB55.Text = testoBottone55; |
|
1030 |
+ |
buttonPanel5.DataContext = proxSchermata; // Per il binding |
|
1031 |
+ |
attSchermata = proxSchermata; |
|
1032 |
+ |
break; |
|
1033 |
+ |
|
|
1034 |
+ |
} |
|
1035 |
+ |
} |
|
1036 |
+ |
|
|
1037 |
+ |
private void button33_Click(object sender, RoutedEventArgs e) |
|
1038 |
+ |
{ |
|
1039 |
+ |
//POST-CONDIZIONI |
|
1040 |
+ |
if (attSchermata.bottoni[2].postCond != "") |
|
1041 |
+ |
{ |
|
1042 |
+ |
postC = proxSchermata.bottoni[2].postCond; |
|
1043 |
+ |
listaEventi.Add(postC); |
|
1044 |
+ |
} |
|
1045 |
+ |
|
|
1046 |
+ |
scroller.ScrollToVerticalOffset(0.0); //riporta lo scroller alla posizione di partenza |
|
1047 |
+ |
|
|
1048 |
+ |
pulisciBottoni(); |
|
1049 |
+ |
|
|
1050 |
+ |
String target = this.attSchermata.bottoni[2].targetID; |
|
1051 |
+ |
|
|
1052 |
+ |
mappaSchermate.TryGetValue(target, out proxSchermata); |
|
1053 |
+ |
|
|
1054 |
+ |
//Recuperiamo l'immagine attuale |
|
1055 |
+ |
String nomeImg = proxSchermata.topImage; |
|
1056 |
+ |
string uriImg = String.Format("ms-appx:///images/{0}", nomeImg); |
|
1057 |
+ |
|
|
1058 |
+ |
try |
|
1059 |
+ |
{ |
|
1060 |
+ |
|
|
1061 |
+ |
imgTop.Source = new BitmapImage(new Uri(uriImg, UriKind.Relative)); |
|
1062 |
+ |
|
|
1063 |
+ |
} |
|
1064 |
+ |
catch { } |
|
1065 |
+ |
|
|
1066 |
+ |
//Recuperiamo il testo attuale |
|
1067 |
+ |
String testo = proxSchermata.text; |
|
1068 |
+ |
testoTop.Text = testo; |
|
1069 |
+ |
|
|
1070 |
+ |
topPanel.DataContext = proxSchermata; |
|
1071 |
+ |
|
|
1072 |
+ |
//PRE-CONDIZIONI |
|
1073 |
+ |
foreach (Bottone bot in proxSchermata.bottoni) |
|
1074 |
+ |
{ |
|
1075 |
+ |
if (bot.preCond != "") |
|
1076 |
+ |
{ |
|
1077 |
+ |
//Scorre la lista degli eventi (pre-condizioni) |
|
1078 |
+ |
foreach (String even in listaEventi) |
|
1079 |
+ |
{ |
|
1080 |
+ |
if (even == bot.preCond) |
|
1081 |
+ |
{ |
|
1082 |
+ |
proxSchermata.nBottoni = 1; //setta 1 bottone sulla schermata successiva |
|
1083 |
+ |
proxSchermata.bottoni = new ObservableCollection<Bottone>(); |
|
1084 |
+ |
|
|
1085 |
+ |
try |
|
1086 |
+ |
{ |
|
1087 |
+ |
proxSchermata.bottoni.Add(bot); |
|
1088 |
+ |
} |
|
1089 |
+ |
catch { } |
|
1090 |
+ |
} |
|
1091 |
+ |
|
|
1092 |
+ |
} |
|
1093 |
+ |
|
|
1094 |
+ |
} |
|
1095 |
+ |
} |
|
1096 |
+ |
|
|
1097 |
+ |
//Recuperiamo i dati relativi ai bottoni |
|
1098 |
+ |
int numBottoni = proxSchermata.nBottoni; |
|
1099 |
+ |
switch (numBottoni) |
|
1100 |
+ |
{ |
|
1101 |
+ |
case 1: |
|
1102 |
+ |
buttonPanel1.Visibility = Visibility.Visible; |
|
1103 |
+ |
String testoBottone11 = proxSchermata.bottoni[0].testo; |
|
1104 |
+ |
textB11.Text = testoBottone11; |
|
1105 |
+ |
buttonPanel1.DataContext = proxSchermata; // Per il binding |
|
1106 |
+ |
attSchermata = proxSchermata; |
|
1107 |
+ |
break; |
|
1108 |
+ |
case 2: |
|
1109 |
+ |
buttonPanel2.Visibility = Visibility.Visible; |
|
1110 |
+ |
String testoBottone21 = proxSchermata.bottoni[0].testo; |
|
1111 |
+ |
textB21.Text = testoBottone21; |
|
1112 |
+ |
String testoBottone22 = proxSchermata.bottoni[1].testo; |
|
1113 |
+ |
textB22.Text = testoBottone22; |
|
1114 |
+ |
buttonPanel2.DataContext = proxSchermata; // Per il binding |
|
1115 |
+ |
attSchermata = proxSchermata; |
|
1116 |
+ |
break; |
|
1117 |
+ |
case 3: |
|
1118 |
+ |
buttonPanel3.Visibility = Visibility.Visible; |
|
1119 |
+ |
String testoBottone31 = proxSchermata.bottoni[0].testo; |
|
1120 |
+ |
textB31.Text = testoBottone31; |
|
1121 |
+ |
String testoBottone32 = proxSchermata.bottoni[1].testo; |
|
1122 |
+ |
textB32.Text = testoBottone32; |
|
1123 |
+ |
String testoBottone33 = proxSchermata.bottoni[2].testo; |
|
1124 |
+ |
textB33.Text = testoBottone33; |
|
1125 |
+ |
buttonPanel3.DataContext = proxSchermata; // Per il binding |
|
1126 |
+ |
attSchermata = proxSchermata; |
|
1127 |
+ |
break; |
|
1128 |
+ |
case 4: |
|
1129 |
+ |
buttonPanel4.Visibility = Visibility.Visible; |
|
1130 |
+ |
String testoBottone41 = proxSchermata.bottoni[0].testo; |
|
1131 |
+ |
textB41.Text = testoBottone41; |
|
1132 |
+ |
String testoBottone42 = proxSchermata.bottoni[1].testo; |
|
1133 |
+ |
textB42.Text = testoBottone42; |
|
1134 |
+ |
String testoBottone43 = proxSchermata.bottoni[2].testo; |
|
1135 |
+ |
textB43.Text = testoBottone43; |
|
1136 |
+ |
String testoBottone44 = proxSchermata.bottoni[3].testo; |
|
1137 |
+ |
textB44.Text = testoBottone44; |
|
1138 |
+ |
buttonPanel4.DataContext = proxSchermata; // Per il binding |
|
1139 |
+ |
attSchermata = proxSchermata; |
|
1140 |
+ |
break; |
|
1141 |
+ |
case 5: |
|
1142 |
+ |
buttonPanel5.Visibility = Visibility.Visible; |
|
1143 |
+ |
String testoBottone51 = proxSchermata.bottoni[0].testo; |
|
1144 |
+ |
textB51.Text = testoBottone51; |
|
1145 |
+ |
String testoBottone52 = proxSchermata.bottoni[1].testo; |
|
1146 |
+ |
textB52.Text = testoBottone52; |
|
1147 |
+ |
String testoBottone53 = proxSchermata.bottoni[2].testo; |
|
1148 |
+ |
textB53.Text = testoBottone53; |
|
1149 |
+ |
String testoBottone54 = proxSchermata.bottoni[3].testo; |
|
1150 |
+ |
textB54.Text = testoBottone54; |
|
1151 |
+ |
String testoBottone55 = proxSchermata.bottoni[4].testo; |
|
1152 |
+ |
textB55.Text = testoBottone55; |
|
1153 |
+ |
buttonPanel5.DataContext = proxSchermata; // Per il binding |
|
1154 |
+ |
attSchermata = proxSchermata; |
|
1155 |
+ |
break; |
|
1156 |
+ |
|
|
1157 |
+ |
} |
|
1158 |
+ |
} |
|
1159 |
+ |
|
|
1160 |
+ |
private void button41_Click(object sender, RoutedEventArgs e) |
|
1161 |
+ |
{ |
|
1162 |
+ |
//POST-CONDIZIONI |
|
1163 |
+ |
if (attSchermata.bottoni[0].postCond != "") |
|
1164 |
+ |
{ |
|
1165 |
+ |
postC = proxSchermata.bottoni[0].postCond; |
|
1166 |
+ |
listaEventi.Add(postC); |
|
1167 |
+ |
} |
|
1168 |
+ |
|
|
1169 |
+ |
scroller.ScrollToVerticalOffset(0.0); //riporta lo scroller alla posizione di partenza |
|
1170 |
+ |
|
|
1171 |
+ |
pulisciBottoni(); |
|
1172 |
+ |
|
|
1173 |
+ |
String target = this.attSchermata.bottoni[0].targetID; |
|
1174 |
+ |
|
|
1175 |
+ |
mappaSchermate.TryGetValue(target, out proxSchermata); |
|
1176 |
+ |
|
|
1177 |
+ |
//Recuperiamo l'immagine attuale |
|
1178 |
+ |
String nomeImg = proxSchermata.topImage; |
|
1179 |
+ |
string uriImg = String.Format("ms-appx:///images/{0}", nomeImg); |
|
1180 |
+ |
|
|
1181 |
+ |
try |
|
1182 |
+ |
{ |
|
1183 |
+ |
|
|
1184 |
+ |
imgTop.Source = new BitmapImage(new Uri(uriImg, UriKind.Relative)); |
|
1185 |
+ |
|
|
1186 |
+ |
} |
|
1187 |
+ |
catch { } |
|
1188 |
+ |
|
|
1189 |
+ |
//Recuperiamo il testo attuale |
|
1190 |
+ |
String testo = proxSchermata.text; |
|
1191 |
+ |
testoTop.Text = testo; |
|
1192 |
+ |
|
|
1193 |
+ |
topPanel.DataContext = proxSchermata; |
|
1194 |
+ |
|
|
1195 |
+ |
//PRE-CONDIZIONI |
|
1196 |
+ |
foreach (Bottone bot in proxSchermata.bottoni) |
|
1197 |
+ |
{ |
|
1198 |
+ |
if (bot.preCond != "") |
|
1199 |
+ |
{ |
|
1200 |
+ |
//Scorre la lista degli eventi (pre-condizioni) |
|
1201 |
+ |
foreach (String even in listaEventi) |
|
1202 |
+ |
{ |
|
1203 |
+ |
if (even == bot.preCond) |
|
1204 |
+ |
{ |
|
1205 |
+ |
proxSchermata.nBottoni = 1; //setta 1 bottone sulla schermata successiva |
|
1206 |
+ |
proxSchermata.bottoni = new ObservableCollection<Bottone>(); |
|
1207 |
+ |
|
|
1208 |
+ |
try |
|
1209 |
+ |
{ |
|
1210 |
+ |
proxSchermata.bottoni.Add(bot); |
|
1211 |
+ |
} |
|
1212 |
+ |
catch { } |
|
1213 |
+ |
} |
|
1214 |
+ |
|
|
1215 |
+ |
} |
|
1216 |
+ |
|
|
1217 |
+ |
} |
|
1218 |
+ |
} |
|
1219 |
+ |
|
|
1220 |
+ |
//Recuperiamo i dati relativi ai bottoni |
|
1221 |
+ |
int numBottoni = proxSchermata.nBottoni; |
|
1222 |
+ |
switch (numBottoni) |
|
1223 |
+ |
{ |
|
1224 |
+ |
case 1: |
|
1225 |
+ |
buttonPanel1.Visibility = Visibility.Visible; |
|
1226 |
+ |
String testoBottone11 = proxSchermata.bottoni[0].testo; |
|
1227 |
+ |
textB11.Text = testoBottone11; |
|
1228 |
+ |
buttonPanel1.DataContext = proxSchermata; // Per il binding |
|
1229 |
+ |
attSchermata = proxSchermata; |
|
1230 |
+ |
break; |
|
1231 |
+ |
case 2: |
|
1232 |
+ |
buttonPanel2.Visibility = Visibility.Visible; |
|
1233 |
+ |
String testoBottone21 = proxSchermata.bottoni[0].testo; |
|
1234 |
+ |
textB22.Text = testoBottone21; |
|
1235 |
+ |
String testoBottone22 = proxSchermata.bottoni[1].testo; |
|
1236 |
+ |
textB21.Text = testoBottone22; |
|
1237 |
+ |
buttonPanel2.DataContext = proxSchermata; // Per il binding |
|
1238 |
+ |
attSchermata = proxSchermata; |
|
1239 |
+ |
break; |
|
1240 |
+ |
case 3: |
|
1241 |
+ |
buttonPanel3.Visibility = Visibility.Visible; |
|
1242 |
+ |
String testoBottone31 = proxSchermata.bottoni[0].testo; |
|
1243 |
+ |
textB31.Text = testoBottone31; |
|
1244 |
+ |
String testoBottone32 = proxSchermata.bottoni[1].testo; |
|
1245 |
+ |
textB32.Text = testoBottone32; |
|
1246 |
+ |
String testoBottone33 = proxSchermata.bottoni[2].testo; |
|
1247 |
+ |
textB33.Text = testoBottone33; |
925 |
1248 |
|
buttonPanel3.DataContext = proxSchermata; // Per il binding |
926 |
1249 |
|
attSchermata = proxSchermata; |
927 |
1250 |
|
break; |
|
@@ -929,104 +1252,35 @@ |
929 |
1252 |
|
buttonPanel4.Visibility = Visibility.Visible; |
930 |
1253 |
|
String testoBottone41 = proxSchermata.bottoni[0].testo; |
931 |
1254 |
|
textB41.Text = testoBottone41; |
932 |
|
- |
|
933 |
|
- |
//PRE-CONDIZIONI |
934 |
|
- |
if (proxSchermata.bottoni[0].preCond != "") |
935 |
|
- |
{ |
936 |
|
- |
//Scorre la lista di chiavi di mappaEventi |
937 |
|
- |
foreach (String even in listaEventi) |
938 |
|
- |
{ |
939 |
|
- |
if (even == proxSchermata.bottoni[0].preCond) |
940 |
|
- |
{ |
941 |
|
- |
proxSchermata.nBottoni = 1; //setta 1 bottone sulla schermata successiva |
942 |
|
- |
|
943 |
|
- |
Bottone b1 = new Bottone(proxSchermata.bottoni[0].targetID, proxSchermata.bottoni[0].testo, proxSchermata.bottoni[0].preCond, proxSchermata.bottoni[0].postCond); |
944 |
|
- |
proxSchermata.bottoni = null; |
945 |
|
- |
|
946 |
|
- |
proxSchermata.bottoni.Add(b1); |
947 |
|
- |
} |
948 |
|
- |
|
949 |
|
- |
} |
950 |
|
- |
|
951 |
|
- |
} |
952 |
|
- |
|
953 |
1255 |
|
String testoBottone42 = proxSchermata.bottoni[1].testo; |
954 |
1256 |
|
textB42.Text = testoBottone42; |
955 |
|
- |
|
956 |
|
- |
//PRE-CONDIZIONI |
957 |
|
- |
if (proxSchermata.bottoni[1].preCond != "") |
958 |
|
- |
{ |
959 |
|
- |
//Scorre la lista di chiavi di mappaEventi |
960 |
|
- |
foreach (String even in listaEventi) |
961 |
|
- |
{ |
962 |
|
- |
if (even == proxSchermata.bottoni[1].preCond) |
963 |
|
- |
{ |
964 |
|
- |
proxSchermata.nBottoni = 1; //setta 1 bottone sulla schermata successiva |
965 |
|
- |
|
966 |
|
- |
Bottone b1 = new Bottone(proxSchermata.bottoni[1].targetID, proxSchermata.bottoni[1].testo, proxSchermata.bottoni[1].preCond, proxSchermata.bottoni[1].postCond); |
967 |
|
- |
proxSchermata.bottoni = null; |
968 |
|
- |
|
969 |
|
- |
proxSchermata.bottoni.Add(b1); |
970 |
|
- |
} |
971 |
|
- |
|
972 |
|
- |
} |
973 |
|
- |
|
974 |
|
- |
} |
975 |
|
- |
|
976 |
1257 |
|
String testoBottone43 = proxSchermata.bottoni[2].testo; |
977 |
1258 |
|
textB43.Text = testoBottone43; |
978 |
|
- |
|
979 |
|
- |
//PRE-CONDIZIONI |
980 |
|
- |
if (proxSchermata.bottoni[2].preCond != "") |
981 |
|
- |
{ |
982 |
|
- |
//Scorre la lista di chiavi di mappaEventi |
983 |
|
- |
foreach (String even in listaEventi) |
984 |
|
- |
{ |
985 |
|
- |
if (even == proxSchermata.bottoni[2].preCond) |
986 |
|
- |
{ |
987 |
|
- |
proxSchermata.nBottoni = 1; //setta 1 bottone sulla schermata successiva |
988 |
|
- |
|
989 |
|
- |
Bottone b1 = new Bottone(proxSchermata.bottoni[2].targetID, proxSchermata.bottoni[2].testo, proxSchermata.bottoni[2].preCond, proxSchermata.bottoni[2].postCond); |
990 |
|
- |
proxSchermata.bottoni = null; |
991 |
|
- |
|
992 |
|
- |
proxSchermata.bottoni.Add(b1); |
993 |
|
- |
} |
994 |
|
- |
|
995 |
|
- |
} |
996 |
|
- |
|
997 |
|
- |
} |
998 |
|
- |
|
999 |
1259 |
|
String testoBottone44 = proxSchermata.bottoni[3].testo; |
1000 |
1260 |
|
textB44.Text = testoBottone44; |
1001 |
|
- |
|
1002 |
|
- |
//PRE-CONDIZIONI |
1003 |
|
- |
if (proxSchermata.bottoni[3].preCond != "") |
1004 |
|
- |
{ |
1005 |
|
- |
//Scorre la lista di chiavi di mappaEventi |
1006 |
|
- |
foreach (String even in listaEventi) |
1007 |
|
- |
{ |
1008 |
|
- |
if (even == proxSchermata.bottoni[3].preCond) |
1009 |
|
- |
{ |
1010 |
|
- |
proxSchermata.nBottoni = 1; //setta 1 bottone sulla schermata successiva |
1011 |
|
- |
|
1012 |
|
- |
Bottone b1 = new Bottone(proxSchermata.bottoni[3].targetID, proxSchermata.bottoni[3].testo, proxSchermata.bottoni[3].preCond, proxSchermata.bottoni[3].postCond); |
1013 |
|
- |
proxSchermata.bottoni = null; |
1014 |
|
- |
|
1015 |
|
- |
proxSchermata.bottoni.Add(b1); |
1016 |
|
- |
} |
1017 |
|
- |
|
1018 |
|
- |
} |
1019 |
|
- |
|
1020 |
|
- |
} |
1021 |
|
- |
|
1022 |
1261 |
|
buttonPanel4.DataContext = proxSchermata; // Per il binding |
1023 |
1262 |
|
attSchermata = proxSchermata; |
1024 |
1263 |
|
break; |
|
1264 |
+ |
case 5: |
|
1265 |
+ |
buttonPanel5.Visibility = Visibility.Visible; |
|
1266 |
+ |
String testoBottone51 = proxSchermata.bottoni[0].testo; |
|
1267 |
+ |
textB51.Text = testoBottone51; |
|
1268 |
+ |
String testoBottone52 = proxSchermata.bottoni[1].testo; |
|
1269 |
+ |
textB52.Text = testoBottone52; |
|
1270 |
+ |
String testoBottone53 = proxSchermata.bottoni[2].testo; |
|
1271 |
+ |
textB53.Text = testoBottone53; |
|
1272 |
+ |
String testoBottone54 = proxSchermata.bottoni[3].testo; |
|
1273 |
+ |
textB54.Text = testoBottone54; |
|
1274 |
+ |
String testoBottone55 = proxSchermata.bottoni[4].testo; |
|
1275 |
+ |
textB55.Text = testoBottone55; |
|
1276 |
+ |
buttonPanel5.DataContext = proxSchermata; // Per il binding |
|
1277 |
+ |
attSchermata = proxSchermata; |
|
1278 |
+ |
break; |
1025 |
1279 |
|
|
1026 |
1280 |
|
} |
1027 |
1281 |
|
} |
1028 |
1282 |
|
|
1029 |
|
- |
private void button22_Click(object sender, RoutedEventArgs e) |
|
1283 |
+ |
private void button42_Click(object sender, RoutedEventArgs e) |
1030 |
1284 |
|
{ |
1031 |
1285 |
|
//POST-CONDIZIONI |
1032 |
1286 |
|
if (attSchermata.bottoni[1].postCond != "") |
|
@@ -1061,6 +1315,31 @@ |
1061 |
1315 |
|
|
1062 |
1316 |
|
topPanel.DataContext = proxSchermata; |
1063 |
1317 |
|
|
|
1318 |
+ |
//PRE-CONDIZIONI |
|
1319 |
+ |
foreach (Bottone bot in proxSchermata.bottoni) |
|
1320 |
+ |
{ |
|
1321 |
+ |
if (bot.preCond != "") |
|
1322 |
+ |
{ |
|
1323 |
+ |
//Scorre la lista degli eventi (pre-condizioni) |
|
1324 |
+ |
foreach (String even in listaEventi) |
|
1325 |
+ |
{ |
|
1326 |
+ |
if (even == bot.preCond) |
|
1327 |
+ |
{ |
|
1328 |
+ |
proxSchermata.nBottoni = 1; //setta 1 bottone sulla schermata successiva |
|
1329 |
+ |
proxSchermata.bottoni = new ObservableCollection<Bottone>(); |
|
1330 |
+ |
|
|
1331 |
+ |
try |
|
1332 |
+ |
{ |
|
1333 |
+ |
proxSchermata.bottoni.Add(bot); |
|
1334 |
+ |
} |
|
1335 |
+ |
catch { } |
|
1336 |
+ |
} |
|
1337 |
+ |
|
|
1338 |
+ |
} |
|
1339 |
+ |
|
|
1340 |
+ |
} |
|
1341 |
+ |
} |
|
1342 |
+ |
|
1064 |
1343 |
|
//Recuperiamo i dati relativi ai bottoni |
1065 |
1344 |
|
int numBottoni = proxSchermata.nBottoni; |
1066 |
1345 |
|
switch (numBottoni) |
|
@@ -1105,24 +1384,40 @@ |
1105 |
1384 |
|
buttonPanel4.DataContext = proxSchermata; // Per il binding |
1106 |
1385 |
|
attSchermata = proxSchermata; |
1107 |
1386 |
|
break; |
|
1387 |
+ |
case 5: |
|
1388 |
+ |
buttonPanel5.Visibility = Visibility.Visible; |
|
1389 |
+ |
String testoBottone51 = proxSchermata.bottoni[0].testo; |
|
1390 |
+ |
textB51.Text = testoBottone51; |
|
1391 |
+ |
String testoBottone52 = proxSchermata.bottoni[1].testo; |
|
1392 |
+ |
textB52.Text = testoBottone52; |
|
1393 |
+ |
String testoBottone53 = proxSchermata.bottoni[2].testo; |
|
1394 |
+ |
textB53.Text = testoBottone53; |
|
1395 |
+ |
String testoBottone54 = proxSchermata.bottoni[3].testo; |
|
1396 |
+ |
textB54.Text = testoBottone54; |
|
1397 |
+ |
String testoBottone55 = proxSchermata.bottoni[4].testo; |
|
1398 |
+ |
textB55.Text = testoBottone55; |
|
1399 |
+ |
buttonPanel5.DataContext = proxSchermata; // Per il binding |
|
1400 |
+ |
attSchermata = proxSchermata; |
|
1401 |
+ |
break; |
1108 |
1402 |
|
|
1109 |
1403 |
|
} |
1110 |
1404 |
|
} |
1111 |
1405 |
|
|
1112 |
|
- |
private void button31_Click(object sender, RoutedEventArgs e) |
|
1406 |
+ |
private void button43_Click(object sender, RoutedEventArgs e) |
1113 |
1407 |
|
{ |
1114 |
1408 |
|
//POST-CONDIZIONI |
1115 |
|
- |
if (attSchermata.bottoni[0].postCond != "") |
|
1409 |
+ |
if (attSchermata.bottoni[2].postCond != "") |
1116 |
1410 |
|
{ |
1117 |
|
- |
postC = proxSchermata.bottoni[0].postCond; |
|
1411 |
+ |
postC = proxSchermata.bottoni[2].postCond; |
1118 |
1412 |
|
listaEventi.Add(postC); |
1119 |
1413 |
|
} |
1120 |
1414 |
|
|
1121 |
1415 |
|
scroller.ScrollToVerticalOffset(0.0); //riporta lo scroller alla posizione di partenza |
1122 |
1416 |
|
|
|
1417 |
+ |
|
1123 |
1418 |
|
pulisciBottoni(); |
1124 |
1419 |
|
|
1125 |
|
- |
String target = this.attSchermata.bottoni[0].targetID; |
|
1420 |
+ |
String target = this.attSchermata.bottoni[2].targetID; |
1126 |
1421 |
|
|
1127 |
1422 |
|
mappaSchermate.TryGetValue(target, out proxSchermata); |
1128 |
1423 |
|
|
|
@@ -1144,6 +1439,31 @@ |
1144 |
1439 |
|
|
1145 |
1440 |
|
topPanel.DataContext = proxSchermata; |
1146 |
1441 |
|
|
|
1442 |
+ |
//PRE-CONDIZIONI |
|
1443 |
+ |
foreach (Bottone bot in proxSchermata.bottoni) |
|
1444 |
+ |
{ |
|
1445 |
+ |
if (bot.preCond != "") |
|
1446 |
+ |
{ |
|
1447 |
+ |
//Scorre la lista degli eventi (pre-condizioni) |
|
1448 |
+ |
foreach (String even in listaEventi) |
|
1449 |
+ |
{ |
|
1450 |
+ |
if (even == bot.preCond) |
|
1451 |
+ |
{ |
|
1452 |
+ |
proxSchermata.nBottoni = 1; //setta 1 bottone sulla schermata successiva |
|
1453 |
+ |
proxSchermata.bottoni = new ObservableCollection<Bottone>(); |
|
1454 |
+ |
|
|
1455 |
+ |
try |
|
1456 |
+ |
{ |
|
1457 |
+ |
proxSchermata.bottoni.Add(bot); |
|
1458 |
+ |
} |
|
1459 |
+ |
catch { } |
|
1460 |
+ |
} |
|
1461 |
+ |
|
|
1462 |
+ |
} |
|
1463 |
+ |
|
|
1464 |
+ |
} |
|
1465 |
+ |
} |
|
1466 |
+ |
|
1147 |
1467 |
|
//Recuperiamo i dati relativi ai bottoni |
1148 |
1468 |
|
int numBottoni = proxSchermata.nBottoni; |
1149 |
1469 |
|
switch (numBottoni) |
|
@@ -1188,16 +1508,31 @@ |
1188 |
1508 |
|
buttonPanel4.DataContext = proxSchermata; // Per il binding |
1189 |
1509 |
|
attSchermata = proxSchermata; |
1190 |
1510 |
|
break; |
|
1511 |
+ |
case 5: |
|
1512 |
+ |
buttonPanel5.Visibility = Visibility.Visible; |
|
1513 |
+ |
String testoBottone51 = proxSchermata.bottoni[0].testo; |
|
1514 |
+ |
textB51.Text = testoBottone51; |
|
1515 |
+ |
String testoBottone52 = proxSchermata.bottoni[1].testo; |
|
1516 |
+ |
textB52.Text = testoBottone52; |
|
1517 |
+ |
String testoBottone53 = proxSchermata.bottoni[2].testo; |
|
1518 |
+ |
textB53.Text = testoBottone53; |
|
1519 |
+ |
String testoBottone54 = proxSchermata.bottoni[3].testo; |
|
1520 |
+ |
textB54.Text = testoBottone54; |
|
1521 |
+ |
String testoBottone55 = proxSchermata.bottoni[4].testo; |
|
1522 |
+ |
textB55.Text = testoBottone55; |
|
1523 |
+ |
buttonPanel5.DataContext = proxSchermata; // Per il binding |
|
1524 |
+ |
attSchermata = proxSchermata; |
|
1525 |
+ |
break; |
1191 |
1526 |
|
|
1192 |
1527 |
|
} |
1193 |
1528 |
|
} |
1194 |
1529 |
|
|
1195 |
|
- |
private void button32_Click(object sender, RoutedEventArgs e) |
|
1530 |
+ |
private void button44_Click(object sender, RoutedEventArgs e) |
1196 |
1531 |
|
{ |
1197 |
1532 |
|
//POST-CONDIZIONI |
1198 |
|
- |
if (attSchermata.bottoni[1].postCond != "") |
|
1533 |
+ |
if (attSchermata.bottoni[3].postCond != "") |
1199 |
1534 |
|
{ |
1200 |
|
- |
postC = proxSchermata.bottoni[1].postCond; |
|
1535 |
+ |
postC = proxSchermata.bottoni[3].postCond; |
1201 |
1536 |
|
listaEventi.Add(postC); |
1202 |
1537 |
|
} |
1203 |
1538 |
|
|
|
@@ -1205,7 +1540,7 @@ |
1205 |
1540 |
|
|
1206 |
1541 |
|
pulisciBottoni(); |
1207 |
1542 |
|
|
1208 |
|
- |
String target = this.attSchermata.bottoni[1].targetID; |
|
1543 |
+ |
String target = this.attSchermata.bottoni[3].targetID; |
1209 |
1544 |
|
|
1210 |
1545 |
|
mappaSchermate.TryGetValue(target, out proxSchermata); |
1211 |
1546 |
|
|
|
@@ -1227,6 +1562,31 @@ |
1227 |
1562 |
|
|
1228 |
1563 |
|
topPanel.DataContext = proxSchermata; |
1229 |
1564 |
|
|
|
1565 |
+ |
//PRE-CONDIZIONI |
|
1566 |
+ |
foreach (Bottone bot in proxSchermata.bottoni) |
|
1567 |
+ |
{ |
|
1568 |
+ |
if (bot.preCond != "") |
|
1569 |
+ |
{ |
|
1570 |
+ |
//Scorre la lista degli eventi (pre-condizioni) |
|
1571 |
+ |
foreach (String even in listaEventi) |
|
1572 |
+ |
{ |
|
1573 |
+ |
if (even == bot.preCond) |
|
1574 |
+ |
{ |
|
1575 |
+ |
proxSchermata.nBottoni = 1; //setta 1 bottone sulla schermata successiva |
|
1576 |
+ |
proxSchermata.bottoni = new ObservableCollection<Bottone>(); |
|
1577 |
+ |
|
|
1578 |
+ |
try |
|
1579 |
+ |
{ |
|
1580 |
+ |
proxSchermata.bottoni.Add(bot); |
|
1581 |
+ |
} |
|
1582 |
+ |
catch { } |
|
1583 |
+ |
} |
|
1584 |
+ |
|
|
1585 |
+ |
} |
|
1586 |
+ |
|
|
1587 |
+ |
} |
|
1588 |
+ |
} |
|
1589 |
+ |
|
1230 |
1590 |
|
//Recuperiamo i dati relativi ai bottoni |
1231 |
1591 |
|
int numBottoni = proxSchermata.nBottoni; |
1232 |
1592 |
|
switch (numBottoni) |
|
@@ -1271,16 +1631,31 @@ |
1271 |
1631 |
|
buttonPanel4.DataContext = proxSchermata; // Per il binding |
1272 |
1632 |
|
attSchermata = proxSchermata; |
1273 |
1633 |
|
break; |
|
1634 |
+ |
case 5: |
|
1635 |
+ |
buttonPanel5.Visibility = Visibility.Visible; |
|
1636 |
+ |
String testoBottone51 = proxSchermata.bottoni[0].testo; |
|
1637 |
+ |
textB51.Text = testoBottone51; |
|
1638 |
+ |
String testoBottone52 = proxSchermata.bottoni[1].testo; |
|
1639 |
+ |
textB52.Text = testoBottone52; |
|
1640 |
+ |
String testoBottone53 = proxSchermata.bottoni[2].testo; |
|
1641 |
+ |
textB53.Text = testoBottone53; |
|
1642 |
+ |
String testoBottone54 = proxSchermata.bottoni[3].testo; |
|
1643 |
+ |
textB54.Text = testoBottone54; |
|
1644 |
+ |
String testoBottone55 = proxSchermata.bottoni[4].testo; |
|
1645 |
+ |
textB55.Text = testoBottone55; |
|
1646 |
+ |
buttonPanel5.DataContext = proxSchermata; // Per il binding |
|
1647 |
+ |
attSchermata = proxSchermata; |
|
1648 |
+ |
break; |
1274 |
1649 |
|
|
1275 |
1650 |
|
} |
1276 |
1651 |
|
} |
1277 |
1652 |
|
|
1278 |
|
- |
private void button33_Click(object sender, RoutedEventArgs e) |
|
1653 |
+ |
private void button51_Click(object sender, RoutedEventArgs e) |
1279 |
1654 |
|
{ |
1280 |
1655 |
|
//POST-CONDIZIONI |
1281 |
|
- |
if (attSchermata.bottoni[2].postCond != "") |
|
1656 |
+ |
if (attSchermata.bottoni[0].postCond != "") |
1282 |
1657 |
|
{ |
1283 |
|
- |
postC = proxSchermata.bottoni[2].postCond; |
|
1658 |
+ |
postC = proxSchermata.bottoni[0].postCond; |
1284 |
1659 |
|
listaEventi.Add(postC); |
1285 |
1660 |
|
} |
1286 |
1661 |
|
|
|
@@ -1288,7 +1663,7 @@ |
1288 |
1663 |
|
|
1289 |
1664 |
|
pulisciBottoni(); |
1290 |
1665 |
|
|
1291 |
|
- |
String target = this.attSchermata.bottoni[2].targetID; |
|
1666 |
+ |
String target = this.attSchermata.bottoni[0].targetID; |
1292 |
1667 |
|
|
1293 |
1668 |
|
mappaSchermate.TryGetValue(target, out proxSchermata); |
1294 |
1669 |
|
|
|
@@ -1310,6 +1685,31 @@ |
1310 |
1685 |
|
|
1311 |
1686 |
|
topPanel.DataContext = proxSchermata; |
1312 |
1687 |
|
|
|
1688 |
+ |
//PRE-CONDIZIONI |
|
1689 |
+ |
foreach (Bottone bot in proxSchermata.bottoni) |
|
1690 |
+ |
{ |
|
1691 |
+ |
if (bot.preCond != "") |
|
1692 |
+ |
{ |
|
1693 |
+ |
//Scorre la lista degli eventi (pre-condizioni) |
|
1694 |
+ |
foreach (String even in listaEventi) |
|
1695 |
+ |
{ |
|
1696 |
+ |
if (even == bot.preCond) |
|
1697 |
+ |
{ |
|
1698 |
+ |
proxSchermata.nBottoni = 1; //setta 1 bottone sulla schermata successiva |
|
1699 |
+ |
proxSchermata.bottoni = new ObservableCollection<Bottone>(); |
|
1700 |
+ |
|
|
1701 |
+ |
try |
|
1702 |
+ |
{ |
|
1703 |
+ |
proxSchermata.bottoni.Add(bot); |
|
1704 |
+ |
} |
|
1705 |
+ |
catch { } |
|
1706 |
+ |
} |
|
1707 |
+ |
|
|
1708 |
+ |
} |
|
1709 |
+ |
|
|
1710 |
+ |
} |
|
1711 |
+ |
} |
|
1712 |
+ |
|
1313 |
1713 |
|
//Recuperiamo i dati relativi ai bottoni |
1314 |
1714 |
|
int numBottoni = proxSchermata.nBottoni; |
1315 |
1715 |
|
switch (numBottoni) |
|
@@ -1324,9 +1724,9 @@ |
1324 |
1724 |
|
case 2: |
1325 |
1725 |
|
buttonPanel2.Visibility = Visibility.Visible; |
1326 |
1726 |
|
String testoBottone21 = proxSchermata.bottoni[0].testo; |
1327 |
|
- |
textB21.Text = testoBottone21; |
|
1727 |
+ |
textB22.Text = testoBottone21; |
1328 |
1728 |
|
String testoBottone22 = proxSchermata.bottoni[1].testo; |
1329 |
|
- |
textB22.Text = testoBottone22; |
|
1729 |
+ |
textB21.Text = testoBottone22; |
1330 |
1730 |
|
buttonPanel2.DataContext = proxSchermata; // Per il binding |
1331 |
1731 |
|
attSchermata = proxSchermata; |
1332 |
1732 |
|
break; |
|
@@ -1354,16 +1754,31 @@ |
1354 |
1754 |
|
buttonPanel4.DataContext = proxSchermata; // Per il binding |
1355 |
1755 |
|
attSchermata = proxSchermata; |
1356 |
1756 |
|
break; |
|
1757 |
+ |
case 5: |
|
1758 |
+ |
buttonPanel5.Visibility = Visibility.Visible; |
|
1759 |
+ |
String testoBottone51 = proxSchermata.bottoni[0].testo; |
|
1760 |
+ |
textB51.Text = testoBottone51; |
|
1761 |
+ |
String testoBottone52 = proxSchermata.bottoni[1].testo; |
|
1762 |
+ |
textB52.Text = testoBottone52; |
|
1763 |
+ |
String testoBottone53 = proxSchermata.bottoni[2].testo; |
|
1764 |
+ |
textB53.Text = testoBottone53; |
|
1765 |
+ |
String testoBottone54 = proxSchermata.bottoni[3].testo; |
|
1766 |
+ |
textB54.Text = testoBottone54; |
|
1767 |
+ |
String testoBottone55 = proxSchermata.bottoni[4].testo; |
|
1768 |
+ |
textB55.Text = testoBottone55; |
|
1769 |
+ |
buttonPanel5.DataContext = proxSchermata; // Per il binding |
|
1770 |
+ |
attSchermata = proxSchermata; |
|
1771 |
+ |
break; |
1357 |
1772 |
|
|
1358 |
1773 |
|
} |
1359 |
1774 |
|
} |
1360 |
1775 |
|
|
1361 |
|
- |
private void button41_Click(object sender, RoutedEventArgs e) |
|
1776 |
+ |
private void button52_Click(object sender, RoutedEventArgs e) |
1362 |
1777 |
|
{ |
1363 |
1778 |
|
//POST-CONDIZIONI |
1364 |
|
- |
if (attSchermata.bottoni[0].postCond != "") |
|
1779 |
+ |
if (attSchermata.bottoni[1].postCond != "") |
1365 |
1780 |
|
{ |
1366 |
|
- |
postC = proxSchermata.bottoni[0].postCond; |
|
1781 |
+ |
postC = proxSchermata.bottoni[1].postCond; |
1367 |
1782 |
|
listaEventi.Add(postC); |
1368 |
1783 |
|
} |
1369 |
1784 |
|
|
|
@@ -1371,7 +1786,7 @@ |
1371 |
1786 |
|
|
1372 |
1787 |
|
pulisciBottoni(); |
1373 |
1788 |
|
|
1374 |
|
- |
String target = this.attSchermata.bottoni[0].targetID; |
|
1789 |
+ |
String target = this.attSchermata.bottoni[1].targetID; |
1375 |
1790 |
|
|
1376 |
1791 |
|
mappaSchermate.TryGetValue(target, out proxSchermata); |
1377 |
1792 |
|
|
|
@@ -1393,6 +1808,31 @@ |
1393 |
1808 |
|
|
1394 |
1809 |
|
topPanel.DataContext = proxSchermata; |
1395 |
1810 |
|
|
|
1811 |
+ |
//PRE-CONDIZIONI |
|
1812 |
+ |
foreach (Bottone bot in proxSchermata.bottoni) |
|
1813 |
+ |
{ |
|
1814 |
+ |
if (bot.preCond != "") |
|
1815 |
+ |
{ |
|
1816 |
+ |
//Scorre la lista degli eventi (pre-condizioni) |
|
1817 |
+ |
foreach (String even in listaEventi) |
|
1818 |
+ |
{ |
|
1819 |
+ |
if (even == bot.preCond) |
|
1820 |
+ |
{ |
|
1821 |
+ |
proxSchermata.nBottoni = 1; //setta 1 bottone sulla schermata successiva |
|
1822 |
+ |
proxSchermata.bottoni = new ObservableCollection<Bottone>(); |
|
1823 |
+ |
|
|
1824 |
+ |
try |
|
1825 |
+ |
{ |
|
1826 |
+ |
proxSchermata.bottoni.Add(bot); |
|
1827 |
+ |
} |
|
1828 |
+ |
catch { } |
|
1829 |
+ |
} |
|
1830 |
+ |
|
|
1831 |
+ |
} |
|
1832 |
+ |
|
|
1833 |
+ |
} |
|
1834 |
+ |
} |
|
1835 |
+ |
|
1396 |
1836 |
|
//Recuperiamo i dati relativi ai bottoni |
1397 |
1837 |
|
int numBottoni = proxSchermata.nBottoni; |
1398 |
1838 |
|
switch (numBottoni) |
|
@@ -1407,9 +1847,9 @@ |
1407 |
1847 |
|
case 2: |
1408 |
1848 |
|
buttonPanel2.Visibility = Visibility.Visible; |
1409 |
1849 |
|
String testoBottone21 = proxSchermata.bottoni[0].testo; |
1410 |
|
- |
textB22.Text = testoBottone21; |
|
1850 |
+ |
textB21.Text = testoBottone21; |
1411 |
1851 |
|
String testoBottone22 = proxSchermata.bottoni[1].testo; |
1412 |
|
- |
textB21.Text = testoBottone22; |
|
1852 |
+ |
textB22.Text = testoBottone22; |
1413 |
1853 |
|
buttonPanel2.DataContext = proxSchermata; // Per il binding |
1414 |
1854 |
|
attSchermata = proxSchermata; |
1415 |
1855 |
|
break; |
|
@@ -1437,24 +1877,40 @@ |
1437 |
1877 |
|
buttonPanel4.DataContext = proxSchermata; // Per il binding |
1438 |
1878 |
|
attSchermata = proxSchermata; |
1439 |
1879 |
|
break; |
|
1880 |
+ |
case 5: |
|
1881 |
+ |
buttonPanel5.Visibility = Visibility.Visible; |
|
1882 |
+ |
String testoBottone51 = proxSchermata.bottoni[0].testo; |
|
1883 |
+ |
textB51.Text = testoBottone51; |
|
1884 |
+ |
String testoBottone52 = proxSchermata.bottoni[1].testo; |
|
1885 |
+ |
textB52.Text = testoBottone52; |
|
1886 |
+ |
String testoBottone53 = proxSchermata.bottoni[2].testo; |
|
1887 |
+ |
textB53.Text = testoBottone53; |
|
1888 |
+ |
String testoBottone54 = proxSchermata.bottoni[3].testo; |
|
1889 |
+ |
textB54.Text = testoBottone54; |
|
1890 |
+ |
String testoBottone55 = proxSchermata.bottoni[4].testo; |
|
1891 |
+ |
textB55.Text = testoBottone55; |
|
1892 |
+ |
buttonPanel5.DataContext = proxSchermata; // Per il binding |
|
1893 |
+ |
attSchermata = proxSchermata; |
|
1894 |
+ |
break; |
1440 |
1895 |
|
|
1441 |
1896 |
|
} |
1442 |
1897 |
|
} |
1443 |
1898 |
|
|
1444 |
|
- |
private void button42_Click(object sender, RoutedEventArgs e) |
|
1899 |
+ |
private void button53_Click(object sender, RoutedEventArgs e) |
1445 |
1900 |
|
{ |
1446 |
1901 |
|
//POST-CONDIZIONI |
1447 |
|
- |
if (attSchermata.bottoni[1].postCond != "") |
|
1902 |
+ |
if (attSchermata.bottoni[2].postCond != "") |
1448 |
1903 |
|
{ |
1449 |
|
- |
postC = proxSchermata.bottoni[1].postCond; |
|
1904 |
+ |
postC = proxSchermata.bottoni[2].postCond; |
1450 |
1905 |
|
listaEventi.Add(postC); |
1451 |
1906 |
|
} |
1452 |
1907 |
|
|
1453 |
1908 |
|
scroller.ScrollToVerticalOffset(0.0); //riporta lo scroller alla posizione di partenza |
1454 |
1909 |
|
|
|
1910 |
+ |
|
1455 |
1911 |
|
pulisciBottoni(); |
1456 |
1912 |
|
|
1457 |
|
- |
String target = this.attSchermata.bottoni[1].targetID; |
|
1913 |
+ |
String target = this.attSchermata.bottoni[2].targetID; |
1458 |
1914 |
|
|
1459 |
1915 |
|
mappaSchermate.TryGetValue(target, out proxSchermata); |
1460 |
1916 |
|
|
|
@@ -1476,6 +1932,31 @@ |
1476 |
1932 |
|
|
1477 |
1933 |
|
topPanel.DataContext = proxSchermata; |
1478 |
1934 |
|
|
|
1935 |
+ |
//PRE-CONDIZIONI |
|
1936 |
+ |
foreach (Bottone bot in proxSchermata.bottoni) |
|
1937 |
+ |
{ |
|
1938 |
+ |
if (bot.preCond != "") |
|
1939 |
+ |
{ |
|
1940 |
+ |
//Scorre la lista degli eventi (pre-condizioni) |
|
1941 |
+ |
foreach (String even in listaEventi) |
|
1942 |
+ |
{ |
|
1943 |
+ |
if (even == bot.preCond) |
|
1944 |
+ |
{ |
|
1945 |
+ |
proxSchermata.nBottoni = 1; //setta 1 bottone sulla schermata successiva |
|
1946 |
+ |
proxSchermata.bottoni = new ObservableCollection<Bottone>(); |
|
1947 |
+ |
|
|
1948 |
+ |
try |
|
1949 |
+ |
{ |
|
1950 |
+ |
proxSchermata.bottoni.Add(bot); |
|
1951 |
+ |
} |
|
1952 |
+ |
catch { } |
|
1953 |
+ |
} |
|
1954 |
+ |
|
|
1955 |
+ |
} |
|
1956 |
+ |
|
|
1957 |
+ |
} |
|
1958 |
+ |
} |
|
1959 |
+ |
|
1479 |
1960 |
|
//Recuperiamo i dati relativi ai bottoni |
1480 |
1961 |
|
int numBottoni = proxSchermata.nBottoni; |
1481 |
1962 |
|
switch (numBottoni) |
|
@@ -1520,25 +2001,39 @@ |
1520 |
2001 |
|
buttonPanel4.DataContext = proxSchermata; // Per il binding |
1521 |
2002 |
|
attSchermata = proxSchermata; |
1522 |
2003 |
|
break; |
|
2004 |
+ |
case 5: |
|
2005 |
+ |
buttonPanel5.Visibility = Visibility.Visible; |
|
2006 |
+ |
String testoBottone51 = proxSchermata.bottoni[0].testo; |
|
2007 |
+ |
textB51.Text = testoBottone51; |
|
2008 |
+ |
String testoBottone52 = proxSchermata.bottoni[1].testo; |
|
2009 |
+ |
textB52.Text = testoBottone52; |
|
2010 |
+ |
String testoBottone53 = proxSchermata.bottoni[2].testo; |
|
2011 |
+ |
textB53.Text = testoBottone53; |
|
2012 |
+ |
String testoBottone54 = proxSchermata.bottoni[3].testo; |
|
2013 |
+ |
textB54.Text = testoBottone54; |
|
2014 |
+ |
String testoBottone55 = proxSchermata.bottoni[4].testo; |
|
2015 |
+ |
textB55.Text = testoBottone55; |
|
2016 |
+ |
buttonPanel5.DataContext = proxSchermata; // Per il binding |
|
2017 |
+ |
attSchermata = proxSchermata; |
|
2018 |
+ |
break; |
1523 |
2019 |
|
|
1524 |
2020 |
|
} |
1525 |
2021 |
|
} |
1526 |
2022 |
|
|
1527 |
|
- |
private void button43_Click(object sender, RoutedEventArgs e) |
|
2023 |
+ |
private void button54_Click(object sender, RoutedEventArgs e) |
1528 |
2024 |
|
{ |
1529 |
2025 |
|
//POST-CONDIZIONI |
1530 |
|
- |
if (attSchermata.bottoni[2].postCond != "") |
|
2026 |
+ |
if (attSchermata.bottoni[3].postCond != "") |
1531 |
2027 |
|
{ |
1532 |
|
- |
postC = proxSchermata.bottoni[2].postCond; |
|
2028 |
+ |
postC = proxSchermata.bottoni[3].postCond; |
1533 |
2029 |
|
listaEventi.Add(postC); |
1534 |
2030 |
|
} |
1535 |
2031 |
|
|
1536 |
2032 |
|
scroller.ScrollToVerticalOffset(0.0); //riporta lo scroller alla posizione di partenza |
1537 |
2033 |
|
|
1538 |
|
- |
|
1539 |
2034 |
|
pulisciBottoni(); |
1540 |
2035 |
|
|
1541 |
|
- |
String target = this.attSchermata.bottoni[2].targetID; |
|
2036 |
+ |
String target = this.attSchermata.bottoni[3].targetID; |
1542 |
2037 |
|
|
1543 |
2038 |
|
mappaSchermate.TryGetValue(target, out proxSchermata); |
1544 |
2039 |
|
|
|
@@ -1560,6 +2055,31 @@ |
1560 |
2055 |
|
|
1561 |
2056 |
|
topPanel.DataContext = proxSchermata; |
1562 |
2057 |
|
|
|
2058 |
+ |
//PRE-CONDIZIONI |
|
2059 |
+ |
foreach (Bottone bot in proxSchermata.bottoni) |
|
2060 |
+ |
{ |
|
2061 |
+ |
if (bot.preCond != "") |
|
2062 |
+ |
{ |
|
2063 |
+ |
//Scorre la lista degli eventi (pre-condizioni) |
|
2064 |
+ |
foreach (String even in listaEventi) |
|
2065 |
+ |
{ |
|
2066 |
+ |
if (even == bot.preCond) |
|
2067 |
+ |
{ |
|
2068 |
+ |
proxSchermata.nBottoni = 1; //setta 1 bottone sulla schermata successiva |
|
2069 |
+ |
proxSchermata.bottoni = new ObservableCollection<Bottone>(); |
|
2070 |
+ |
|
|
2071 |
+ |
try |
|
2072 |
+ |
{ |
|
2073 |
+ |
proxSchermata.bottoni.Add(bot); |
|
2074 |
+ |
} |
|
2075 |
+ |
catch { } |
|
2076 |
+ |
} |
|
2077 |
+ |
|
|
2078 |
+ |
} |
|
2079 |
+ |
|
|
2080 |
+ |
} |
|
2081 |
+ |
} |
|
2082 |
+ |
|
1563 |
2083 |
|
//Recuperiamo i dati relativi ai bottoni |
1564 |
2084 |
|
int numBottoni = proxSchermata.nBottoni; |
1565 |
2085 |
|
switch (numBottoni) |
|
@@ -1604,16 +2124,31 @@ |
1604 |
2124 |
|
buttonPanel4.DataContext = proxSchermata; // Per il binding |
1605 |
2125 |
|
attSchermata = proxSchermata; |
1606 |
2126 |
|
break; |
|
2127 |
+ |
case 5: |
|
2128 |
+ |
buttonPanel5.Visibility = Visibility.Visible; |
|
2129 |
+ |
String testoBottone51 = proxSchermata.bottoni[0].testo; |
|
2130 |
+ |
textB51.Text = testoBottone51; |
|
2131 |
+ |
String testoBottone52 = proxSchermata.bottoni[1].testo; |
|
2132 |
+ |
textB52.Text = testoBottone52; |
|
2133 |
+ |
String testoBottone53 = proxSchermata.bottoni[2].testo; |
|
2134 |
+ |
textB53.Text = testoBottone53; |
|
2135 |
+ |
String testoBottone54 = proxSchermata.bottoni[3].testo; |
|
2136 |
+ |
textB54.Text = testoBottone54; |
|
2137 |
+ |
String testoBottone55 = proxSchermata.bottoni[4].testo; |
|
2138 |
+ |
textB55.Text = testoBottone55; |
|
2139 |
+ |
buttonPanel5.DataContext = proxSchermata; // Per il binding |
|
2140 |
+ |
attSchermata = proxSchermata; |
|
2141 |
+ |
break; |
1607 |
2142 |
|
|
1608 |
2143 |
|
} |
1609 |
2144 |
|
} |
1610 |
2145 |
|
|
1611 |
|
- |
private void button44_Click(object sender, RoutedEventArgs e) |
|
2146 |
+ |
private void button55_Click(object sender, RoutedEventArgs e) |
1612 |
2147 |
|
{ |
1613 |
2148 |
|
//POST-CONDIZIONI |
1614 |
|
- |
if (attSchermata.bottoni[3].postCond != "") |
|
2149 |
+ |
if (attSchermata.bottoni[4].postCond != "") |
1615 |
2150 |
|
{ |
1616 |
|
- |
postC = proxSchermata.bottoni[3].postCond; |
|
2151 |
+ |
postC = proxSchermata.bottoni[4].postCond; |
1617 |
2152 |
|
listaEventi.Add(postC); |
1618 |
2153 |
|
} |
1619 |
2154 |
|
|
|
@@ -1621,7 +2156,7 @@ |
1621 |
2156 |
|
|
1622 |
2157 |
|
pulisciBottoni(); |
1623 |
2158 |
|
|
1624 |
|
- |
String target = this.attSchermata.bottoni[3].targetID; |
|
2159 |
+ |
String target = this.attSchermata.bottoni[4].targetID; |
1625 |
2160 |
|
|
1626 |
2161 |
|
mappaSchermate.TryGetValue(target, out proxSchermata); |
1627 |
2162 |
|
|
|
@@ -1643,6 +2178,31 @@ |
1643 |
2178 |
|
|
1644 |
2179 |
|
topPanel.DataContext = proxSchermata; |
1645 |
2180 |
|
|
|
2181 |
+ |
//PRE-CONDIZIONI |
|
2182 |
+ |
foreach (Bottone bot in proxSchermata.bottoni) |
|
2183 |
+ |
{ |
|
2184 |
+ |
if (bot.preCond != "") |
|
2185 |
+ |
{ |
|
2186 |
+ |
//Scorre la lista degli eventi (pre-condizioni) |
|
2187 |
+ |
foreach (String even in listaEventi) |
|
2188 |
+ |
{ |
|
2189 |
+ |
if (even == bot.preCond) |
|
2190 |
+ |
{ |
|
2191 |
+ |
proxSchermata.nBottoni = 1; //setta 1 bottone sulla schermata successiva |
|
2192 |
+ |
proxSchermata.bottoni = new ObservableCollection<Bottone>(); |
|
2193 |
+ |
|
|
2194 |
+ |
try |
|
2195 |
+ |
{ |
|
2196 |
+ |
proxSchermata.bottoni.Add(bot); |
|
2197 |
+ |
} |
|
2198 |
+ |
catch { } |
|
2199 |
+ |
} |
|
2200 |
+ |
|
|
2201 |
+ |
} |
|
2202 |
+ |
|
|
2203 |
+ |
} |
|
2204 |
+ |
} |
|
2205 |
+ |
|
1646 |
2206 |
|
//Recuperiamo i dati relativi ai bottoni |
1647 |
2207 |
|
int numBottoni = proxSchermata.nBottoni; |
1648 |
2208 |
|
switch (numBottoni) |
|
@@ -1687,6 +2247,21 @@ |
1687 |
2247 |
|
buttonPanel4.DataContext = proxSchermata; // Per il binding |
1688 |
2248 |
|
attSchermata = proxSchermata; |
1689 |
2249 |
|
break; |
|
2250 |
+ |
case 5: |
|
2251 |
+ |
buttonPanel5.Visibility = Visibility.Visible; |
|
2252 |
+ |
String testoBottone51 = proxSchermata.bottoni[0].testo; |
|
2253 |
+ |
textB51.Text = testoBottone51; |
|
2254 |
+ |
String testoBottone52 = proxSchermata.bottoni[1].testo; |
|
2255 |
+ |
textB52.Text = testoBottone52; |
|
2256 |
+ |
String testoBottone53 = proxSchermata.bottoni[2].testo; |
|
2257 |
+ |
textB53.Text = testoBottone53; |
|
2258 |
+ |
String testoBottone54 = proxSchermata.bottoni[3].testo; |
|
2259 |
+ |
textB54.Text = testoBottone54; |
|
2260 |
+ |
String testoBottone55 = proxSchermata.bottoni[4].testo; |
|
2261 |
+ |
textB55.Text = testoBottone55; |
|
2262 |
+ |
buttonPanel5.DataContext = proxSchermata; // Per il binding |
|
2263 |
+ |
attSchermata = proxSchermata; |
|
2264 |
+ |
break; |
1690 |
2265 |
|
|
1691 |
2266 |
|
} |
1692 |
2267 |
|
} |