Subversion Repository Public Repository

Nextrek

Diff Revisions 23 vs 24 for /Windows8/Minstrek/Walkinback/App1/MainPage.xaml.cs

Diff revisions: vs.
  @@ -721,7 +721,7 @@
721 721 {
722 722 credits.Visibility = Visibility.Visible;
723 723 blackCanvas.Visibility = Visibility.Visible;
724 - replay.Visibility = Visibility.Visible;
724 + //replay.Visibility = Visibility.Visible;
725 725 }
726 726
727 727
  @@ -1777,7 +1777,7 @@
1777 1777 }
1778 1778
1779 1779
1780 - replay.Visibility = Visibility.Collapsed;
1780 + //replay.Visibility = Visibility.Collapsed;
1781 1781
1782 1782 }
1783 1783
  @@ -1788,9 +1788,82 @@
1788 1788
1789 1789 private void closeBut_Click(object sender, RoutedEventArgs e)
1790 1790 {
1791 + pulisciBottoni();
1792 +
1793 + String target = "init"; //this.attSchermata.bottoni[0].targetID;
1794 +
1795 + mappaSchermate.TryGetValue(target, out proxSchermata);
1796 +
1797 + //Recuperiamo l'immagine attuale
1798 + String nomeImg = proxSchermata.topImage;
1799 + string uriImg = String.Format("ms-appx:///images/{0}", nomeImg);
1800 +
1801 + try
1802 + {
1803 +
1804 + imgTop.Source = new BitmapImage(new Uri(uriImg, UriKind.Absolute));
1805 + Boolean b = true;
1806 + }
1807 + catch { }
1808 +
1809 +
1810 + //Recuperiamo il testo attuale
1811 + String testo = proxSchermata.text;
1812 + testoTop.Text = testo;
1813 +
1814 + topPanel.DataContext = proxSchermata;
1815 +
1816 + //Recuperiamo i dati relativi ai bottoni
1817 + int numBottoni = proxSchermata.nBottoni;
1818 + switch (numBottoni)
1819 + {
1820 + case 1:
1821 + buttonPanel1.Visibility = Visibility.Visible;
1822 + String testoBottone11 = proxSchermata.bottoni[0].testo;
1823 + textB11.Text = testoBottone11;
1824 + buttonPanel1.DataContext = proxSchermata; // Per il binding
1825 + attSchermata = proxSchermata;
1826 + break;
1827 + case 2:
1828 + buttonPanel2.Visibility = Visibility.Visible;
1829 + String testoBottone21 = proxSchermata.bottoni[0].testo;
1830 + textB21.Text = testoBottone21;
1831 + String testoBottone22 = proxSchermata.bottoni[1].testo;
1832 + textB22.Text = testoBottone22;
1833 + buttonPanel2.DataContext = proxSchermata; // Per il binding
1834 + attSchermata = proxSchermata;
1835 + break;
1836 + case 3:
1837 + buttonPanel3.Visibility = Visibility.Visible;
1838 + String testoBottone31 = proxSchermata.bottoni[0].testo;
1839 + textB31.Text = testoBottone31;
1840 + String testoBottone32 = proxSchermata.bottoni[1].testo;
1841 + textB32.Text = testoBottone32;
1842 + String testoBottone33 = proxSchermata.bottoni[2].testo;
1843 + textB33.Text = testoBottone33;
1844 + buttonPanel3.DataContext = proxSchermata; // Per il binding
1845 + attSchermata = proxSchermata;
1846 + break;
1847 + case 4:
1848 + buttonPanel4.Visibility = Visibility.Visible;
1849 + String testoBottone41 = proxSchermata.bottoni[0].testo;
1850 + textB41.Text = testoBottone41;
1851 + String testoBottone42 = proxSchermata.bottoni[1].testo;
1852 + textB42.Text = testoBottone42;
1853 + String testoBottone43 = proxSchermata.bottoni[2].testo;
1854 + textB43.Text = testoBottone43;
1855 + String testoBottone44 = proxSchermata.bottoni[3].testo;
1856 + textB44.Text = testoBottone44;
1857 + buttonPanel4.DataContext = proxSchermata; // Per il binding
1858 + attSchermata = proxSchermata;
1859 + break;
1860 +
1861 + }
1862 +
1863 +
1791 1864 credits.Visibility = Visibility.Collapsed;
1792 1865 blackCanvas.Visibility = Visibility.Collapsed;
1793 - replay.Visibility = Visibility.Visible;
1866 + //replay.Visibility = Visibility.Visible;
1794 1867 }
1795 1868
1796 1869