コード例 #1
0
        private void ButtonCriarGuerreiro_Click(object sender, RoutedEventArgs e)
        {
            Command cmd = new CommandCriarGuerreiro(
                this.FactoryExercito, 
                this.Elementos);
            this.CommandManager.Execute(cmd);
            this.NotifyPropertyChanged("Elementos");

        }
コード例 #2
0
        private void ButtonCriarGuerreiro_Click(object sender, RoutedEventArgs e)
        {
            Command cmd = new CommandCriarGuerreiro(this.FactoryExercito, this.Elementos);

            this.ComandManager.Execute(cmd);

            //Guerreiro guerreiro = FactoryExercito.CriarGuerreiro();
            //this.Elementos.Add(guerreiro);
        }