Charla Tecnica ISILTECH y Nuevo Canal de Videos
Charla Técnica en ISILTECH
Hoy Martes 03 de Marzo habra una serie de charlas técnicas gratuitas en ISILTECH de San Isidro para promocionar los programas del PECI, entre ellos .NET.
La agenda de exposiciones es la siguiente:
1. Tema: JavaScript en el cliente y en el servidor con Node.js
Hora: 3:30 pm
Expositor: David Chura Olazabal
2. Tema: Desarrollo de Software con enfoque en el valor de negocio y calidad usando métodos ágiles
Hora: 4:30 pm
Expositor: Guino Henostroza Macedo
3. Tema: Desarrollo de Aplicaciones Web en C# con ASP.NET MVC, Razor, jQuery y AJAX
Hora: 5:30 pm
Expositor: Luis Dueñas Huaroto
4. Tema: Cloud Computing con Amazon Web Services (AWS)
Hora: 6:30 pm
Expositor: Carlos Chávez Villafuerte
5. Tema: Desarrollo en Android
Hora: 7:30 pm
Expositor: David Chura Olazabal
Para inscribirse solo hay que registrarse en la siguiente dirección:
Inscripción_Charla_ISILTECH
Canal de YouTube
Quiero anunciar que ya esta disponible mi canal de YouTube con Videos de .NET, con los cursos que dicto en algunas empresas donde capacito y también en ISILTECH.
Por ahora esta disponible algunos videos de la capacitación en MVC a la Empresa CIPSA.
El Miércoles o Jueves estará disponible el Taller de MVC de los Domingos.
Canal YouTube Luis Duenas
Blog de Luis Dueñas dedicado a la difusión del Desarrollo en Microsoft .NET, Visual Studio, WinForms, WebForms, MVC, ASP .NET, jQuery, AJAX, HTML5, JavaScript, Móviles, etc. Encontrarás Libros, Demos, Artículos Técnicos, Entrenamiento.
martes, 3 de marzo de 2015
Entrenamiento - Charla Tecnica ISILTECH y Nuevo Canal de Videos
Etiquetas:
Canal,
Carlos Chavez,
Charlas .NET,
David Chura,
Entrenamiento,
Guino Henostroza,
ISILTECH,
Lduenas,
Luis Dueñas,
MVC,
Seminarios,
Videos,
YouTube
El Libro del Día: Introducing Microsoft SQL Server 2014
El Libro del Día: 2015-03-03
Titulo: Introducing Microsoft SQL Server 2014
Autor: Ross Mistry, Stacia Misner
Editorial: Microsoft Press
Nro Paginas: 144
Capítulos:
PART I DATABASE ADMINISTRATION
CHAPTER 1 SQL Server 2014 editions and engine enhancements
CHAPTER 2 In-Memory OLTP investments
CHAPTER 3 High-availability, hybrid-cloud, and backup enhancements
PART II BUSINESS INTELLIGENCE DEVELOPMENT
CHAPTER 4 Exploring self-service BI in Microsoft Excel 2013
CHAPTER 5 Introducing Power BI for Office 365
CHAPTER 6 Big data solutions
Descarga:
Introducing_Microsoft_SQL_Server_2014
Titulo: Introducing Microsoft SQL Server 2014
Autor: Ross Mistry, Stacia Misner
Editorial: Microsoft Press
Nro Paginas: 144
Capítulos:
PART I DATABASE ADMINISTRATION
CHAPTER 1 SQL Server 2014 editions and engine enhancements
CHAPTER 2 In-Memory OLTP investments
CHAPTER 3 High-availability, hybrid-cloud, and backup enhancements
PART II BUSINESS INTELLIGENCE DEVELOPMENT
CHAPTER 4 Exploring self-service BI in Microsoft Excel 2013
CHAPTER 5 Introducing Power BI for Office 365
CHAPTER 6 Big data solutions
Descarga:
Introducing_Microsoft_SQL_Server_2014
Etiquetas:
Administration,
Backup,
BI,
Big Data,
Cloud,
DataBase,
Editions,
Engine,
Excel 2013,
Libros,
Microsoft,
Microsoft Press,
Office 365,
OLTP,
Power BI,
Ross Mistry,
SQL Server 2014,
Stacia Misner
lunes, 2 de marzo de 2015
El Libro del Día: Creating Mobile Apps with Xamarin.Forms
El Libro del Día: 2015-03-02
Titulo: Creating Mobile Apps with Xamarin.Forms
Autor: Charles Petzold
Editorial: Microsoft Press
Nro Paginas: 275
Capítulos:
Introduction
Chapter 1 How does Xamarin.Forms fit in
Chapter 2 Pages, layouts, and views
Chapter 3 Building an app: Infrastructure
Chapter 4 Building an app: Architecture
Chapter 5 Principles of presentation
Chapter 6 The interactive interface
Descarga:
Creating_Mobile_Apps_with_Xamarin.Forms
Titulo: Creating Mobile Apps with Xamarin.Forms
Autor: Charles Petzold
Editorial: Microsoft Press
Nro Paginas: 275
Capítulos:
Introduction
Chapter 1 How does Xamarin.Forms fit in
Chapter 2 Pages, layouts, and views
Chapter 3 Building an app: Infrastructure
Chapter 4 Building an app: Architecture
Chapter 5 Principles of presentation
Chapter 6 The interactive interface
Descarga:
Creating_Mobile_Apps_with_Xamarin.Forms
Etiquetas:
Apps,
Architecture,
Charles Petzold,
Forms,
Infrastructure,
Interactive,
Interface,
Layouts,
Libros,
Microsoft Press,
Mobile,
Pages,
Presentation,
Views,
Xamarin
viernes, 27 de febrero de 2015
El Demo del Día: Graficar en el ListView de WinForms
Graficar en el ListView de WinForms
En este post veremos como crear graficos dentro de un ListView en Windows Forms, por ejemplo, para listar los empleados con su foto y una imagen con un número de estrellas que muestran su desempeño.
Requerimiento
Se necesita mostrar imágenes en los sub elementos de un elemento de un ListView. Por defecto, este muestra solo textos pero no imagenes.
Solución
- Configurar la Propiedad OwnerDraw en true del ListView
- Programar los eventos DrawColumnHeader, DrawItem y DrawSubItem para dibujar las cabeceras, las filas y pintar los sub elementos (textos e imágenes cargadas de archivos de disco).
Crear una Aplicación Windows Forms en C#
En Visual Studio crear un proyecto Windows Forms en C# con el nombre de "ListView_Grafico", luego cambiar el nombre del formulario a "frmEmpleado".
Crear una carpeta llamada "Imagenes" y agregar 9 archivos jpg con el nombre de 1.jpg, 2jpg, hasta 9.jpg con las fotos de los empleados. También conseguir una imagen "Rating.png" de 334 x 281 conteniendo el rating de desempeño, similar a la siguiente figura:
Nota: Vamos a usar un solo archivo (sprite) para mostrar los desempeños que van del 1 al 4.
Crear la Clase Entidad para el Empleado
Crear la clase "beEmpleado" escribiendo el siguiente código:
En este post veremos como crear graficos dentro de un ListView en Windows Forms, por ejemplo, para listar los empleados con su foto y una imagen con un número de estrellas que muestran su desempeño.
Requerimiento
Se necesita mostrar imágenes en los sub elementos de un elemento de un ListView. Por defecto, este muestra solo textos pero no imagenes.
Solución
- Configurar la Propiedad OwnerDraw en true del ListView
- Programar los eventos DrawColumnHeader, DrawItem y DrawSubItem para dibujar las cabeceras, las filas y pintar los sub elementos (textos e imágenes cargadas de archivos de disco).
Crear una Aplicación Windows Forms en C#
En Visual Studio crear un proyecto Windows Forms en C# con el nombre de "ListView_Grafico", luego cambiar el nombre del formulario a "frmEmpleado".
Crear una carpeta llamada "Imagenes" y agregar 9 archivos jpg con el nombre de 1.jpg, 2jpg, hasta 9.jpg con las fotos de los empleados. También conseguir una imagen "Rating.png" de 334 x 281 conteniendo el rating de desempeño, similar a la siguiente figura:
Nota: Vamos a usar un solo archivo (sprite) para mostrar los desempeños que van del 1 al 4.
Crear la Clase Entidad para el Empleado
Crear la clase "beEmpleado" escribiendo el siguiente código:
namespace ListView_Grafico
{
public class beEmpleado
{
public int IdEmpleado { get; set; }
public string Nombres { get; set; }
public int Desempeño { get; set; }
}
}
Programar el Formulario con el ListView
Regresar al formulario "frmEmpleado" y agregar un ListView llamado "lvwEmpleado" el cual debe estar acoplado a todo el formulario cuyo tamaño es de 600 de ancho x 550 de alto y esta centrado, similar a la siguiente figura:
Escribir el siguiente código en el formulario:
using System;
using System.Collections.Generic;
using System.Drawing;
using System.IO;
using System.Text;
using System.Windows.Forms;
namespace ListView_Grafico
{
public partial class frmEmpleado : Form
{
List<beEmpleado> lbeEmpleado;
Bitmap bmp;
Rectangle rect;
string ruta = @"C:\Data\NET\Practicas\WinForms\ListView_Grafico\Imagenes\";
public frmEmpleado()
{
InitializeComponent();
}
private void crearImagenRating()
{
string archivo = String.Format("{0}Rating.png",ruta);
bmp = new Bitmap(archivo);
}
private void crearColumnasListView()
{
lvwEmpleado.Columns.Add("Id", 50);
lvwEmpleado.Columns.Add("Nombre del Empleado", 220);
lvwEmpleado.Columns.Add("Foto", 100);
lvwEmpleado.Columns.Add("Desempeño", 100);
}
private void configurarListView()
{
//Configurar el Alto de las Filas
ImageList imgList = new ImageList ();
imgList.ImageSize = new Size(1, 50);
lvwEmpleado.SmallImageList = imgList;
//Configurar la Apariencia
lvwEmpleado.View = View.Details;
lvwEmpleado.FullRowSelect = true;
lvwEmpleado.HotTracking = true;
//Configurar el Pintado
lvwEmpleado.OwnerDraw = true;
lvwEmpleado.DrawColumnHeader +=
new DrawListViewColumnHeaderEventHandler(dibujarCabecera);
lvwEmpleado.DrawItem +=
new DrawListViewItemEventHandler(dibujarFila);
lvwEmpleado.DrawSubItem +=
new DrawListViewSubItemEventHandler(dibujarCelda);
}
private void obtenerEmpleados()
{
lbeEmpleado = new List<beEmpleado>();
lbeEmpleado.Add(new beEmpleado { IdEmpleado = 1,
Nombres = "Nadine Heredia", Desempeño = 2 });
lbeEmpleado.Add(new beEmpleado { IdEmpleado = 2,
Nombres = "Ollanta Humala", Desempeño = 2 });
lbeEmpleado.Add(new beEmpleado { IdEmpleado = 3,
Nombres = "Valeria Maza", Desempeño = 4 });
lbeEmpleado.Add(new beEmpleado { IdEmpleado = 4,
Nombres = "Cristina Fernandez", Desempeño = 3 });
lbeEmpleado.Add(new beEmpleado { IdEmpleado = 5,
Nombres = "Alan Garcia", Desempeño = 1 });
lbeEmpleado.Add(new beEmpleado { IdEmpleado = 6,
Nombres = "Alberto Fujimori", Desempeño = 2 });
lbeEmpleado.Add(new beEmpleado { IdEmpleado = 7,
Nombres = "Alejandro Toledo", Desempeño = 3 });
lbeEmpleado.Add(new beEmpleado { IdEmpleado = 8,
Nombres = "Inocencio Perez", Desempeño = 1 });
lbeEmpleado.Add(new beEmpleado { IdEmpleado = 9,
Nombres = "Luis Dueñas", Desempeño = 4 });
}
private void llenarListViewEmpleados()
{
ListViewItem fila;
foreach (beEmpleado obeEmpleado in lbeEmpleado)
{
fila = lvwEmpleado.Items.Add(obeEmpleado.IdEmpleado.ToString());
fila.SubItems.Add(obeEmpleado.Nombres);
fila.SubItems.Add(obeEmpleado.IdEmpleado.ToString());
fila.SubItems.Add(obeEmpleado.Desempeño.ToString());
}
}
private void crearListView(object sender, EventArgs e)
{
crearImagenRating();
crearColumnasListView();
configurarListView();
obtenerEmpleados();
llenarListViewEmpleados();
}
private void dibujarCabecera(object sender, DrawListViewColumnHeaderEventArgs e)
{
e.Graphics.FillRectangle(Brushes.Black, e.Bounds);
StringFormat sf= new StringFormat();
sf.Alignment=StringAlignment.Center;
sf.LineAlignment = StringAlignment.Center;
e.Graphics.DrawString(e.Header.Text, new Font("Arial", 10, FontStyle.Bold),
Brushes.White, e.Bounds, sf);
Brushes.White, e.Bounds, sf);
}
private void dibujarFila(object sender, DrawListViewItemEventArgs e)
{
rect = new Rectangle(e.Bounds.X, e.Bounds.Y, e.Bounds.Width, 50);
if ((e.State & ListViewItemStates.Selected) != 0)
{
e.Graphics.FillRectangle(Brushes.Black, rect);
e.DrawFocusRectangle();
}
}
private void dibujarCelda(object sender, DrawListViewSubItemEventArgs e)
{
if (e.ColumnIndex > -1)
{
rect = new Rectangle(e.Bounds.X, e.Bounds.Y, e.Bounds.Width-20, 50);
if (e.ColumnIndex < 2)
{
Font fuente = new Font("Arial", 8);
Brush brocha = Brushes.Black;
StringFormat sf = new StringFormat();
sf.LineAlignment = StringAlignment.Center;
bool seleccionado = (e.ItemState & ListViewItemStates.Selected) != 0;
if (seleccionado)
{
brocha = Brushes.White;
fuente = new Font("Arial", 10, FontStyle.Bold);
}
e.Graphics.DrawString(e.SubItem.Text, fuente, brocha, rect,sf);
return;
}
else
{
if (e.ColumnIndex == 2)
{
using (MemoryStream ms = new MemoryStream(obtenerFoto(e.SubItem.Text)))
{
Image img = Image.FromStream(ms);
e.Graphics.DrawImage(img, rect);
}
}
else
{
int n=int.Parse(e.SubItem.Text);
int h = 281/4;
int y=h*(n-1);
rect = new Rectangle(0, y, 334, h);
Image img = bmp.Clone(rect, bmp.PixelFormat);
e.Graphics.DrawImage(img, e.Bounds.X, e.Bounds.Y, 100, 40);
}
}
}
}
private byte[] obtenerFoto(string idEmpleado)
{
string archivo = String.Format("{0}{1}.jpg", ruta, idEmpleado);
byte[] foto = File.ReadAllBytes(archivo);
return foto;
}
}
}
Nota: La función principal es "crearListView" y esta asociada al evento "Load" del formulario, la cual llama a casi todos los métodos usados.
Una de los problemas que se presento al momento de desarrollar fue aumentar el alto de cada fila, lo cual se logra asociando un ImageList a la propiedad SmallImageList del ListView, para lo cual se le da un tamaño al ImageList mediante su propiedad "ImageSize", por ejemplo, le damos el alto de 50.
Probar la Aplicación Windows Forms
Grabar la aplicación y ejecutarla con F5. Se mostrará la siguiente ventana:
Observar que la cabecera del ListView tiene fondo negro, texto de color blanco en negrita y centrado horizontal y alineado vertical al centro.
Los elementos del ListView cuando no están seleccionados tienen fondo blanco, texto de color negro y están alineados verticalmente al centro.
Al pasar el mouse por cada elemento este se selecciona (propiedad HotTracking=true) y el fondo es negro y el color del texto es blanco en negrita y con fuente mas grande.
En la tercera columna se muestran las fotos obtenidas de los archivos de acuerdo al código del empleado y finalmente, en la última columna se presenta una sección del archivo de Rating, el cual se dividió lógicamente en 5 filas y de acuerdo al desempeño se obtiene solo una fila.
Comentario Final
En este breve post he compartido como crear gráficos dentro de un ListView para mejorar su apariencia, hay controles de terceros muy buenos como el ObjectListView que permiten mostrar todo tipo de imágenes, y lo que quería era demostrar que también podemos hacer lo mismo configurando la propiedad OwnerDraw y programando en los eventos DrawColumnHeader, DrawItem y DrawSubItem.
Descarga
Etiquetas:
Bitmap,
C#,
Demos,
DrawColumnHeader,
DrawImage,
DrawItem,
DrawString,
DrawSubItem,
Gráficos,
Graphics,
ImageList,
Imágenes,
Lduenas,
ListView,
OwnerDraw,
Rectangle,
Sprite,
StringFormat,
SubItems,
WinForms
jueves, 26 de febrero de 2015
El Libro del Día: .NET Technology Guide for Business Applications
El Libro del Día: 2015-02-26
Titulo: .NET Technology Guide for Business Applications
Autor: Cesar de la Torre, David Carmona
Editorial: Microsoft Press
Nro Paginas: 70
Capítulos:
1. Key takeaways
2. Purpose of this guide
3. Overview
4. Emerging application patterns
5. Established application patterns
6. Conclusions
Appendix A: Silverlight migration paths
Appendix B: Positioning data-access technologies
Descarga:
NET_Technology_Guide_for_Business_Applications
Titulo: .NET Technology Guide for Business Applications
Autor: Cesar de la Torre, David Carmona
Editorial: Microsoft Press
Nro Paginas: 70
Capítulos:
1. Key takeaways
2. Purpose of this guide
3. Overview
4. Emerging application patterns
5. Established application patterns
6. Conclusions
Appendix A: Silverlight migration paths
Appendix B: Positioning data-access technologies
Descarga:
NET_Technology_Guide_for_Business_Applications
Etiquetas:
.NET,
Business Apps,
Cesar de la Torre,
Conclusions,
Data Access,
David Carmona,
Guide,
Keys,
Libros,
Microsoft Press,
Overview,
Patterns,
Silverlight,
Technologies
miércoles, 25 de febrero de 2015
El Libro del Día: C# Multithreaded and Parallel Programming
El Libro del Día: 2015-02-25
Titulo: C# Multithreaded and Parallel Programming
Autor: Rodney Ringler
Editorial: Packt
Nro Paginas: 345
Capítulos:
Chapter 1: Understanding Multiprocessing and Multiple Cores
Chapter 2: Looking at Multithreaded Classes - BackgroundWorker
Chapter 3: Thread Class – Heavyweight Concurrency in C#
Chapter 4: Advanced Thread Processing
Chapter 5: Lightweight Concurrency - Task Parallel Library (TPL)
Chapter 6: Task-based Parallelism
Chapter 7: Data Parallelism
Chapter 8: Debugging Multithreaded Applications with Visual Studio
Chapter 9: Pipeline and Producer-consumer Design Patterns
Chapter 10: Parallel LINQ - PLINQ
Chapter 11: The Asynchronous Programming Model
Descarga:
C#_Multithreaded_and_Parallel_Programming
Titulo: C# Multithreaded and Parallel Programming
Autor: Rodney Ringler
Editorial: Packt
Nro Paginas: 345
Capítulos:
Chapter 1: Understanding Multiprocessing and Multiple Cores
Chapter 2: Looking at Multithreaded Classes - BackgroundWorker
Chapter 3: Thread Class – Heavyweight Concurrency in C#
Chapter 4: Advanced Thread Processing
Chapter 5: Lightweight Concurrency - Task Parallel Library (TPL)
Chapter 6: Task-based Parallelism
Chapter 7: Data Parallelism
Chapter 8: Debugging Multithreaded Applications with Visual Studio
Chapter 9: Pipeline and Producer-consumer Design Patterns
Chapter 10: Parallel LINQ - PLINQ
Chapter 11: The Asynchronous Programming Model
Descarga:
C#_Multithreaded_and_Parallel_Programming
Etiquetas:
Asynchronous,
BackgroundWorker,
C#,
Classes,
Concurrency,
Debugging,
Libros,
Multiple Cores,
Multiprocessing,
Multithreaded,
Packt,
Parallel,
Parallelism,
Patterns,
PLINQ,
Rodney Ringler,
Thread,
TPL
martes, 24 de febrero de 2015
El Libro del Día: Learning AngularJS Animations
El Libro del Día: 2015-02-24
Titulo: Learning AngularJS Animations
Autor: Richard Keller
Editorial: Packt
Nro Paginas: 182
Capítulos:
Chapter 1: Getting Started
Chapter 2: Understanding CSS3 Transitions and Animations
Chapter 3: Creating Our First Animation in AngularJS
Chapter 4: JavaScript Animations in AngularJS
Chapter 5: Custom Directives and the $animate Service
Chapter 6: Animations for Mobile Devices
Chapter 7: Staggering Animations
Chapter 8: Animations' Performance Optimization
Descarga:
Learning_AngularJS_Animations
Titulo: Learning AngularJS Animations
Autor: Richard Keller
Editorial: Packt
Nro Paginas: 182
Capítulos:
Chapter 1: Getting Started
Chapter 2: Understanding CSS3 Transitions and Animations
Chapter 3: Creating Our First Animation in AngularJS
Chapter 4: JavaScript Animations in AngularJS
Chapter 5: Custom Directives and the $animate Service
Chapter 6: Animations for Mobile Devices
Chapter 7: Staggering Animations
Chapter 8: Animations' Performance Optimization
Descarga:
Learning_AngularJS_Animations
Etiquetas:
$animate,
AngularJS,
Animations,
CSS3,
Custom,
Devices,
Directives,
Google,
Javascript,
Libros,
Mobile,
Optimization,
Packt,
Performance,
Richard Keller,
Service,
Staggering,
Transitions
Suscribirse a:
Entradas (Atom)







