Subversion Repository Public Repository

Nextrek

Diff Revisions 16 vs 27 for /Windows8/Minstrek/Proximity/App1/MainPage.xaml.cs

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