public FrmVirtualBidder(VirtualBidder role, ChildMainVirtualBidders father)
 {
     InitializeComponent();
     _father             = father;
     this._virtualBidder = role;
     _edit = true;
 }
Exemplo n.º 2
0
        private void btnAddVirtualPlayer_Click(object sender, EventArgs e)
        {
            var childVirtualPlayers = new ChildMainVirtualBidders();

            if (pnlDashboard.Controls.Count > 0)                                           //Si el panel principal contiene un Formulario hijo
            {
                if (pnlDashboard.Controls[0].GetType() != typeof(ChildMainVirtualBidders)) //Si el tipo de formulario es diferente a ChildMenuProducts
                {
                    OpenChildForm(childVirtualPlayers);                                    //Agrega un nuevo formulario de childMenuProducts
                }
                else
                {
                    childVirtualPlayers = (ChildMainVirtualBidders)pnlDashboard.Controls[0];
                }
            }
            else
            {
                OpenChildForm(childVirtualPlayers);
            }
            var form = new FrmVirtualBidder(childVirtualPlayers);

            form.Show();
        }
 public FrmVirtualBidder(ChildMainVirtualBidders father)
 {
     InitializeComponent();
     _father = father;
     _edit   = false;
 }