コード例 #1
0
        private void RadioButton_CheckedChanged(object sender, EventArgs e)
        {
            RadioButton radioButton = (RadioButton)sender;

            if(radioButton.Checked)
            {
                if(radioButton == rbAdicionarEmEstoque)
                {
                    manipularEstoqueInterface = new AdicionarEmEstoque(listSession);
                }
                else
                {
                    manipularEstoqueInterface = new RemoverDeEstoque(listSession);
                }

                manipularEstoqueStrategy = new ManipularEstoqueStrategy(manipularEstoqueInterface);
            }
        }
コード例 #2
0
 public ManipularEstoqueStrategy(ManipularEstoqueInterface manipularEstoqueInterface)
 {
     this.manipularEstoqueInterface = manipularEstoqueInterface;
 }