/// <summary> /// Remove um painel /// </summary> /// <param name="painel">Painel a ser removido</param> private void RemoverPainel(PainelAssistente painel) { this.Controls.Remove(painel); painel.Resize -= handlerPainelResize; if (painel.Visible) PainelAtual = 0; }
/// <summary> /// Adiciona novo painel /// </summary> /// <returns>Novo painel</returns> private void AdicionarPainel(PainelAssistente painel) { this.Controls.Add(painel); painel.Visible = false; painel.Location = new Point(0, 0); painel.Dock = DockStyle.None; painel.Anchor = AnchorStyles.Top | AnchorStyles.Left; painel.Size = TamanhoPainel; painel.AutoScroll = true; painel.Resize += handlerPainelResize; }
/// <summary> /// Ocorre ao mudar o painel /// </summary> /// <param name="painel">Painel exibido</param> /// <param name="nPainel">Número do painel exibido</param> private void AssistenteControle_MudançaPainel(PainelAssistente painel, int nPainel) { btnAnterior.Enabled = nPainel > 0; btnPróximo.Enabled = Terminado != null || nPainel < Itens.Length - 1; if (Terminado != null) { if (nPainel < Itens.Length - 1) { btnPróximo.Text = strPróximo; mostrandoTerminar = false; } else { btnPróximo.Text = strTerminar; mostrandoTerminar = true; } } }