示例#1
0
        private void Preview(bool p_TelaCheia)
        {
            string _TextoPreview = _ListaCheckItens.TextoRelatorio(txtTexto.Text, !p_TelaCheia);
            string _NomeArquivo  = this.SalvaArquivoRelatorio(_TextoPreview);

            try
            {
                _ScrollLeft = wbPreview.Document.Body.ScrollLeft;
            }
            catch (Exception)
            {
                _ScrollLeft = 0;
            }
            try
            {
                _ScrollTop = wbPreview.Document.Body.ScrollTop;
            }
            catch (Exception)
            {
                _ScrollTop = 0;
            }
            wbPreview.Navigate(_NomeArquivo);
            if (p_TelaCheia)
            {
                _ListaCheckItens.MostrarRelatorio(_NomeArquivo);
            }
        }
 public frmPreencheChekList(string p_NomeArquivo, string p_NomeRelatorio)
 {
     InitializeComponent();
     this.Visible     = false;
     _ListaCheckItens = new csListaItens();
     if (this.CarregouArquivo(p_NomeArquivo))
     {
         _ListaCheckItens.MostrarRelatorio(p_NomeArquivo);
     }
     this.Close();
 }
        private void mnuRelatorioPersonalizado_Click(object sender, EventArgs e)
        {
            ToolStripItem _Menu = (ToolStripItem)sender;

            foreach (csRelatorio Relatorio in _ListaCheckItens.ListaRelatorios)
            {
                if (_Menu.Text == "Visualizar")
                {
                    if (Relatorio.Nome == _Menu.Tag.ToString())
                    {
                        _ListaCheckItens.MostrarRelatorio(Relatorio.Texto);
                        return;
                    }
                }
                else
                {
                    if (Relatorio.Nome == _Menu.Text)
                    {
                        _ListaCheckItens.MostrarRelatorio(Relatorio.Texto);
                        return;
                    }
                }
            }
        }