Ejemplo n.º 1
0
 public static void CargarContenidoListboxs(string rutaBancoPreguntas)
 {
     BloqueCuestionario = new BloqueCuestionario();
     ListaBloqueCuestionario.Clear();
     try
     {
         using (WordprocessingDocument document = WordprocessingDocument.CreateFromTemplate(rutaBancoPreguntas))
         {
             var body              = document.MainDocumentPart.Document.Body;
             var parrafos          = body.Elements <Paragraph>();
             var listaXTipoDeNivel = ObtenerListaXTipoDeNivel(parrafos);
             ListaBloqueCuestionario = ObtenerListaBloqueCuestionario(listaXTipoDeNivel);
         }
     }
     catch (System.IO.FileNotFoundException)
     {
         Mensajes.ArchivoDeWordNoExiste();
     }
 }
Ejemplo n.º 2
0
 private void CargarContenidoListboxs()
 {
     InicializarListBoxs();
     InicializarLists();
     try
     {
         using (WordprocessingDocument document = WordprocessingDocument.CreateFromTemplate(rutaBancoPreguntas))
         {
             var body     = document.MainDocumentPart.Document.Body;
             var parrafos = body.Elements <Paragraph>();
             var listaContenidoGeneralDePreguntas = ContenidoGeneralDePreguntas(parrafos); // Get a List of Question blocks
                                                                                           //bloqueGeneral = blocks.ConvertAll<List<OpenXmlElement>>(g => g.ConvertAll<OpenXmlElement>(p => (OpenXmlElement)p.CloneNode(true))); // Deep Clone
             listaBloqueCuestionario = ClasificacionNivelPreguntas(listaContenidoGeneralDePreguntas);
             OptimizarListaBloqueCuestionario();
             GetListaClasificacion();
         }
     }
     catch (System.IO.FileNotFoundException)
     {
         Mensajes.ArchivoDeWordNoExiste();
     }
 }