예제 #1
0
        public WndEscenari(int nFiles, int nColumnes, int nDones, int nHomes, int nCambrers)
        {
            r                = new Random();
            escenari         = new Escenari(nFiles, nColumnes);
            diccionariStacks = new Dictionary <string, StackPanel>();

            escenari.Moguda += escenari_Moguda;

            EmplenaNomsDones();
            EmplenaNomsHomes();

            GeneraHomes(nHomes);
            GeneraDones(nDones);
            GeneraCambrers(nCambrers);
            InitializeComponent();

            //ugPista.Rows = nFiles;
            // ugPista.Columns = nColumnes;
            GenerarPista(nFiles, nColumnes);
            GenerarSimpaties();
            btnSimpaties.IsEnabled = false;

            gr         = new Graella(escenari);
            gr.Tancar += gr_Tancar;

            gr.Show();
            gr.Focusable = true;

            CrearEscenariGrafic();
        }
예제 #2
0
 private void btnSimpaties_Click(object sender, RoutedEventArgs e)
 {
     gr         = new Graella(escenari);
     gr.Tancar += gr_Tancar;
     btnSimpaties.IsEnabled = false;
     gr.Show();
 }