Subversion Repository Public Repository

Nextrek

Diff Revisions 31 vs 32 for /Windows8/Minstrek/Walkinback/App1/MainPage.xaml.cs

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