예제 #1
0
 private void bt_profile_Click(object sender, EventArgs e)
 {
     panel_selected_window.Height = bt_profile.Height;
     panel_selected_window.Top    = bt_profile.Top;
     if (profile != null)
     {
         profile.Dispose();                  //no overload the memory
     }
     profile      = new Perfil_usuario();
     profile.Dock = DockStyle.Fill;
     //Cerrar todo lo demas
     help.Visible     = false;
     calendar.Visible = false;
     cb.Visible       = false;
     calendar.Dispose();
     //mostrar el usercontrol
     profile.Visible = true;
     panel_principal.Controls.Add(profile);
 }
예제 #2
0
        private void Chatbot_menu_Load(object sender, EventArgs e)
        {
            loadUserdata();
            //Create objects

            _loggedUser = new ModeloUsuario();

            //Create Ayuda
            help = new Ayuda();

            //User control create
            _obj    = this;
            cb      = new Chatbot();
            cb.Dock = DockStyle.Fill;
            panel_principal.Controls.Add(cb);
            //Instanciacion inicial
            profile  = new Perfil_usuario();
            calendar = new Calendario();

            help.Visible     = false;
            profile.Visible  = false;
            calendar.Visible = false;
        }