<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>Mvc.Net Patrones de diseño </title>
	<atom:link href="http://mvcnet.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://mvcnet.wordpress.com</link>
	<description>Just another WordPress.com weblog</description>
	<lastBuildDate>Mon, 28 Feb 2011 20:22:43 +0000</lastBuildDate>
	<language>es</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='mvcnet.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://s2.wp.com/i/buttonw-com.png</url>
		<title>Mvc.Net Patrones de diseño </title>
		<link>http://mvcnet.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://mvcnet.wordpress.com/osd.xml" title="Mvc.Net Patrones de diseño " />
	<atom:link rel='hub' href='http://mvcnet.wordpress.com/?pushpress=hub'/>
		<item>
		<title>Patrones de diseño</title>
		<link>http://mvcnet.wordpress.com/2011/02/28/patrones-de-diseno/</link>
		<comments>http://mvcnet.wordpress.com/2011/02/28/patrones-de-diseno/#comments</comments>
		<pubDate>Mon, 28 Feb 2011 20:22:19 +0000</pubDate>
		<dc:creator>mvcnet</dc:creator>
				<category><![CDATA[Clases]]></category>

		<guid isPermaLink="false">http://mvcnet.wordpress.com/?p=246</guid>
		<description><![CDATA[Las herramientas de patrones de diseño ya existian en visual studio 2005, la verdad es que en el 2010 son iguales, no ha cambiado mucho, si quieres algo mas serio te tienes que ir a visio o rational rose, pero para organizar nuestras librerias de clases o la carpeta appCode, la carpeta conontroller en mvc, [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=mvcnet.wordpress.com&amp;blog=10268854&amp;post=246&amp;subd=mvcnet&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Las herramientas de patrones de diseño ya existian en visual studio 2005, la verdad es que en el 2010 son iguales, no ha cambiado mucho, si quieres algo mas serio te tienes que ir a visio o rational rose, pero para organizar nuestras librerias de clases o la carpeta appCode, la carpeta conontroller en mvc, etc puedes agreagar en tu proyecto el<strong> Class Diagram</strong>, propongo un ejemplo de un wpf con una libreria de clases con dos casos diferenciados, la calse usuario y cliente que tienen properties comunes, solo una de ellas necesita sobreeescribir el metodo original de la clase abstracta, hay van los pasos:</p>
<p>Pd: ejemplo de patrones de diseño con Class Diagram ﻿http://www.futurojobs.com/downloads/clases/patrondiseno.rar</p>
<p>Lo primero meter en la libreria de clases (o donde quieras organizar las clases el elemento diagrama de clases)</p>
<p><a href="http://mvcnet.files.wordpress.com/2011/02/paso1.jpg"><img class="alignnone size-full wp-image-248" title="paso1" src="http://mvcnet.files.wordpress.com/2011/02/paso1.jpg?w=480&#038;h=383" alt="" width="480" height="383" /></a></p>
<p>La clase abstracta es la que te va a dar los elementos comunes en este caso y la flexibilidad</p>
<p><a href="http://mvcnet.files.wordpress.com/2011/02/paso2.jpg"><img class="alignnone size-full wp-image-249" title="paso2" src="http://mvcnet.files.wordpress.com/2011/02/paso2.jpg?w=315&#038;h=267" alt="" width="315" height="267" /></a></p>
<p>En la parte de abajo de la clase podemos indicarle las variables internas, properties y metodos</p>
<p><a href="http://mvcnet.files.wordpress.com/2011/02/paso3.jpg"><img class="alignnone size-full wp-image-250" title="paso3" src="http://mvcnet.files.wordpress.com/2011/02/paso3.jpg?w=337&#038;h=519" alt="" width="337" height="519" /></a></p>
<p>A los metodos se les puede indicar el Inherance modifier</p>
<p><a href="http://mvcnet.files.wordpress.com/2011/02/paso4.jpg"><img class="alignnone size-full wp-image-251" title="paso4" src="http://mvcnet.files.wordpress.com/2011/02/paso4.jpg?w=334&#038;h=286" alt="" width="334" height="286" /></a></p>
<p>Añadimos las clases que vamos a consumir finalmente</p>
<p><a href="http://mvcnet.files.wordpress.com/2011/02/paso5.jpg"><img class="alignnone size-full wp-image-252" title="paso5" src="http://mvcnet.files.wordpress.com/2011/02/paso5.jpg?w=307&#038;h=277" alt="" width="307" height="277" /></a></p>
<p>Le indicamos con una Inherance la relacion que las une</p>
<p><a href="http://mvcnet.files.wordpress.com/2011/02/paso6.jpg"><img class="alignnone size-full wp-image-253" title="paso6" src="http://mvcnet.files.wordpress.com/2011/02/paso6.jpg?w=304&#038;h=281" alt="" width="304" height="281" /></a></p>
<p><a href="http://mvcnet.files.wordpress.com/2011/02/paso7.jpg"><img class="alignnone size-full wp-image-254" title="paso7" src="http://mvcnet.files.wordpress.com/2011/02/paso7.jpg?w=389&#038;h=194" alt="" width="389" height="194" /></a></p>
<p>Para poder establecer que quieres sobreescribir un metodo sobre la clase tienes que ir a Intellisense -&gt; Override Members</p>
<p><a href="http://mvcnet.files.wordpress.com/2011/02/paso8.jpg"><img class="alignnone size-full wp-image-255" title="paso8" src="http://mvcnet.files.wordpress.com/2011/02/paso8.jpg?w=480&#038;h=141" alt="" width="480" height="141" /></a></p>
<p>Aqui dentro puedes elegir los metodos con los que cuentas a sobreescribir</p>
<p><a href="http://mvcnet.files.wordpress.com/2011/02/paso9.jpg"><img class="alignnone size-full wp-image-256" title="paso9" src="http://mvcnet.files.wordpress.com/2011/02/paso9.jpg?w=395&#038;h=166" alt="" width="395" height="166" /></a></p>
<p>Finalmente el diagrama va escribiendo las clases</p>
<p><a href="http://mvcnet.files.wordpress.com/2011/02/paso10.jpg"><img class="alignnone size-full wp-image-247" title="paso10" src="http://mvcnet.files.wordpress.com/2011/02/paso10.jpg?w=337&#038;h=265" alt="" width="337" height="265" /></a></p>
<p>Ya esta, aun siendo antigua, es una herramienta muy valida para montar cualquier factoria, documentación previa, etc&#8230;</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/mvcnet.wordpress.com/246/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/mvcnet.wordpress.com/246/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/mvcnet.wordpress.com/246/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/mvcnet.wordpress.com/246/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/mvcnet.wordpress.com/246/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/mvcnet.wordpress.com/246/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/mvcnet.wordpress.com/246/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/mvcnet.wordpress.com/246/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/mvcnet.wordpress.com/246/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/mvcnet.wordpress.com/246/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/mvcnet.wordpress.com/246/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/mvcnet.wordpress.com/246/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/mvcnet.wordpress.com/246/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/mvcnet.wordpress.com/246/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=mvcnet.wordpress.com&amp;blog=10268854&amp;post=246&amp;subd=mvcnet&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://mvcnet.wordpress.com/2011/02/28/patrones-de-diseno/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/8743f83a793244223163f033c1fb5c26?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">mvcnet</media:title>
		</media:content>

		<media:content url="http://mvcnet.files.wordpress.com/2011/02/paso1.jpg" medium="image">
			<media:title type="html">paso1</media:title>
		</media:content>

		<media:content url="http://mvcnet.files.wordpress.com/2011/02/paso2.jpg" medium="image">
			<media:title type="html">paso2</media:title>
		</media:content>

		<media:content url="http://mvcnet.files.wordpress.com/2011/02/paso3.jpg" medium="image">
			<media:title type="html">paso3</media:title>
		</media:content>

		<media:content url="http://mvcnet.files.wordpress.com/2011/02/paso4.jpg" medium="image">
			<media:title type="html">paso4</media:title>
		</media:content>

		<media:content url="http://mvcnet.files.wordpress.com/2011/02/paso5.jpg" medium="image">
			<media:title type="html">paso5</media:title>
		</media:content>

		<media:content url="http://mvcnet.files.wordpress.com/2011/02/paso6.jpg" medium="image">
			<media:title type="html">paso6</media:title>
		</media:content>

		<media:content url="http://mvcnet.files.wordpress.com/2011/02/paso7.jpg" medium="image">
			<media:title type="html">paso7</media:title>
		</media:content>

		<media:content url="http://mvcnet.files.wordpress.com/2011/02/paso8.jpg" medium="image">
			<media:title type="html">paso8</media:title>
		</media:content>

		<media:content url="http://mvcnet.files.wordpress.com/2011/02/paso9.jpg" medium="image">
			<media:title type="html">paso9</media:title>
		</media:content>

		<media:content url="http://mvcnet.files.wordpress.com/2011/02/paso10.jpg" medium="image">
			<media:title type="html">paso10</media:title>
		</media:content>
	</item>
		<item>
		<title>creando un usercontrol para montar un menu en wpf</title>
		<link>http://mvcnet.wordpress.com/2010/12/16/creando-un-usercontrol-para-montar-un-menu-en-wpf/</link>
		<comments>http://mvcnet.wordpress.com/2010/12/16/creando-un-usercontrol-para-montar-un-menu-en-wpf/#comments</comments>
		<pubDate>Thu, 16 Dec 2010 12:48:59 +0000</pubDate>
		<dc:creator>mvcnet</dc:creator>
				<category><![CDATA[WPF]]></category>

		<guid isPermaLink="false">http://mvcnet.wordpress.com/?p=220</guid>
		<description><![CDATA[Codigo: http://www.futurojobs.com/downloads/wpf/wpfmenu.rar Esta vez la idea ha sido crear una barra de menu que segun la instaciemos tendra mas o menos botones o comportamientos diferentes, y por supuesto puede ser invocada en cualquier sitio y las veces que sea necesario, al final reconozco que es un poco lio explicar todo lo desarrollado en un post, [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=mvcnet.wordpress.com&amp;blog=10268854&amp;post=220&amp;subd=mvcnet&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Codigo: <a href="http://www.futurojobs.com/downloads/wpf/wpfmenu.rar">http://www.futurojobs.com/downloads/wpf/wpfmenu.rar</a></p>
<p>Esta vez la idea ha sido crear una barra de menu que segun la instaciemos tendra mas o menos botones o comportamientos diferentes, y por supuesto puede ser invocada en cualquier sitio y las veces que sea necesario, al final reconozco que es un poco lio explicar todo lo desarrollado en un post, nada mejor que abrir el codigo y seguirlo todo.</p>
<p>Empezamos por una aplicacion WPF</p>
<p><a href="http://mvcnet.files.wordpress.com/2010/12/paso1.jpg"><img class="alignnone size-full wp-image-224" title="paso1" src="http://mvcnet.files.wordpress.com/2010/12/paso1.jpg?w=480&#038;h=301" alt="" width="480" height="301" /></a></p>
<p>Luego insertamos a nuestra solucion un user control library</p>
<p><a href="http://mvcnet.files.wordpress.com/2010/12/paso2.jpg"><img class="alignnone size-full wp-image-225" title="paso2" src="http://mvcnet.files.wordpress.com/2010/12/paso2.jpg?w=480&#038;h=278" alt="" width="480" height="278" /></a></p>
<p>Sobre el userControl metemos un WrapPanel dentro del grid, a ambos les damos u alto pero sin ancho, asi logramos anchos redimensionados automaticos.</p>
<p><a href="http://mvcnet.files.wordpress.com/2010/12/paso3.jpg"><img class="alignnone size-full wp-image-226" title="paso3" src="http://mvcnet.files.wordpress.com/2010/12/paso3.jpg?w=480&#038;h=116" alt="" width="480" height="116" /></a></p>
<p>Añadimos un unevo user control para el boton</p>
<p><a href="http://mvcnet.files.wordpress.com/2010/12/paso4.jpg"><img class="alignnone size-full wp-image-227" title="paso4" src="http://mvcnet.files.wordpress.com/2010/12/paso4.jpg?w=480&#038;h=229" alt="" width="480" height="229" /></a></p>
<p>Y luego dejamos el grid en primera posicion, despues metemos un border y dentro un wrappanel para poder tener dos elementos seguidos (label e image) y en posicion relativa con float a left, asi da igual si el texto es muy largo o corto, se redimensiona solo</p>
<p><a href="http://mvcnet.files.wordpress.com/2010/12/paso5.jpg"><img class="alignnone size-full wp-image-228" title="paso5" src="http://mvcnet.files.wordpress.com/2010/12/paso5.jpg?w=480&#038;h=169" alt="" width="480" height="169" /></a></p>
<p>Sobre el grid (el contenedor mas superior del boton) ponemos dos eventos</p>
<p><a href="http://mvcnet.files.wordpress.com/2010/12/paso6.jpg"><img class="alignnone size-full wp-image-229" title="paso6" src="http://mvcnet.files.wordpress.com/2010/12/paso6.jpg?w=379&#038;h=375" alt="" width="379" height="375" /></a></p>
<p>Podemos ver una funcion del evento, en este caso cuando el raton este por encima cambiamos el fondo si no esta clickado y tambin dependiendo de como haya sido instanciado si tiene cruz para cerrarse o no.</p>
<p><a href="http://mvcnet.files.wordpress.com/2010/12/paso7.jpg"><img class="alignnone size-full wp-image-230" title="paso7" src="http://mvcnet.files.wordpress.com/2010/12/paso7.jpg?w=480&#038;h=208" alt="" width="480" height="208" /></a></p>
<p>Ahora volvemos al user control inicial (MenuControl1.xaml.cs), donde esta el wrapPanel, necesitamos un metodo para ir insertando botones donde los instanciamos a medida</p>
<p><a href="http://mvcnet.files.wordpress.com/2010/12/paso8.jpg"><img class="alignnone size-full wp-image-231" title="paso8" src="http://mvcnet.files.wordpress.com/2010/12/paso8.jpg?w=480&#038;h=133" alt="" width="480" height="133" /></a></p>
<p>Tambien necesitariamos quitar botones opcionalmente (MenuControl1.xaml.cs)</p>
<p><a href="http://mvcnet.files.wordpress.com/2010/12/paso9.jpg"><img class="alignnone size-full wp-image-232" title="paso9" src="http://mvcnet.files.wordpress.com/2010/12/paso9.jpg?w=238&#038;h=74" alt="" width="238" height="74" /></a></p>
<p>Y finalmente tenemos un evento sobre el boton completo donde controlamos seleccionar el clickado y deseleccionar el anterior (MenuControl1.xaml.cs)</p>
<p><a href="http://mvcnet.files.wordpress.com/2010/12/paso10.jpg"><img class="alignnone size-full wp-image-233" title="paso10" src="http://mvcnet.files.wordpress.com/2010/12/paso10.jpg?w=463&#038;h=180" alt="" width="463" height="180" /></a></p>
<p>Esta es la vista de diseño, donde se puede ver un componente que se inicializa en un principio para ser cambiado luego dinamicamente en wpfmenu.MainWindow  &lt;my1:compEdit &#8230;</p>
<p><a href="http://mvcnet.files.wordpress.com/2010/12/paso11.jpg"><img class="alignnone size-full wp-image-234" title="paso11" src="http://mvcnet.files.wordpress.com/2010/12/paso11.jpg?w=480&#038;h=448" alt="" width="480" height="448" /></a></p>
<p>Y el xaml:</p>
<p><a href="http://mvcnet.files.wordpress.com/2010/12/paso12.jpg"><img class="alignnone size-full wp-image-235" title="paso12" src="http://mvcnet.files.wordpress.com/2010/12/paso12.jpg?w=480&#038;h=206" alt="" width="480" height="206" /></a></p>
<p>El componente del menu es el userControl1 con id=menuTop, sobre este podremos invocar a la funcion addBtn donde podemos especificar las funciones delegadas cuando se haga click por ejemplo</p>
<p><a href="http://mvcnet.files.wordpress.com/2010/12/paso13.jpg"><img class="alignnone size-full wp-image-236" title="paso13" src="http://mvcnet.files.wordpress.com/2010/12/paso13.jpg?w=480&#038;h=9" alt="" width="480" height="9" /></a></p>
<p>Asi el constructor de nuestro wpf principal se queda asi donde se omntan 4 botones:</p>
<p><a href="http://mvcnet.files.wordpress.com/2010/12/paso14.jpg"><img class="alignnone size-full wp-image-237" title="paso14" src="http://mvcnet.files.wordpress.com/2010/12/paso14.jpg?w=480&#038;h=143" alt="" width="480" height="143" /></a></p>
<p>En la ultima funcion de MainWindow la ultima linea &#8220;compSup.button1.Click&#8221; supone un evento sobre un componente puesto inicialmente en la instancia de compSup, la funcion pestans_Edit monta el segundo menu, las funciones de evento esta montadas de ejemplo</p>
<p><a href="http://mvcnet.files.wordpress.com/2010/12/paso16.jpg"><img class="alignnone size-full wp-image-239" title="paso16" src="http://mvcnet.files.wordpress.com/2010/12/paso16.jpg?w=480&#038;h=105" alt="" width="480" height="105" /></a></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/mvcnet.wordpress.com/220/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/mvcnet.wordpress.com/220/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/mvcnet.wordpress.com/220/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/mvcnet.wordpress.com/220/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/mvcnet.wordpress.com/220/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/mvcnet.wordpress.com/220/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/mvcnet.wordpress.com/220/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/mvcnet.wordpress.com/220/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/mvcnet.wordpress.com/220/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/mvcnet.wordpress.com/220/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/mvcnet.wordpress.com/220/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/mvcnet.wordpress.com/220/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/mvcnet.wordpress.com/220/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/mvcnet.wordpress.com/220/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=mvcnet.wordpress.com&amp;blog=10268854&amp;post=220&amp;subd=mvcnet&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://mvcnet.wordpress.com/2010/12/16/creando-un-usercontrol-para-montar-un-menu-en-wpf/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/8743f83a793244223163f033c1fb5c26?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">mvcnet</media:title>
		</media:content>

		<media:content url="http://mvcnet.files.wordpress.com/2010/12/paso1.jpg" medium="image">
			<media:title type="html">paso1</media:title>
		</media:content>

		<media:content url="http://mvcnet.files.wordpress.com/2010/12/paso2.jpg" medium="image">
			<media:title type="html">paso2</media:title>
		</media:content>

		<media:content url="http://mvcnet.files.wordpress.com/2010/12/paso3.jpg" medium="image">
			<media:title type="html">paso3</media:title>
		</media:content>

		<media:content url="http://mvcnet.files.wordpress.com/2010/12/paso4.jpg" medium="image">
			<media:title type="html">paso4</media:title>
		</media:content>

		<media:content url="http://mvcnet.files.wordpress.com/2010/12/paso5.jpg" medium="image">
			<media:title type="html">paso5</media:title>
		</media:content>

		<media:content url="http://mvcnet.files.wordpress.com/2010/12/paso6.jpg" medium="image">
			<media:title type="html">paso6</media:title>
		</media:content>

		<media:content url="http://mvcnet.files.wordpress.com/2010/12/paso7.jpg" medium="image">
			<media:title type="html">paso7</media:title>
		</media:content>

		<media:content url="http://mvcnet.files.wordpress.com/2010/12/paso8.jpg" medium="image">
			<media:title type="html">paso8</media:title>
		</media:content>

		<media:content url="http://mvcnet.files.wordpress.com/2010/12/paso9.jpg" medium="image">
			<media:title type="html">paso9</media:title>
		</media:content>

		<media:content url="http://mvcnet.files.wordpress.com/2010/12/paso10.jpg" medium="image">
			<media:title type="html">paso10</media:title>
		</media:content>

		<media:content url="http://mvcnet.files.wordpress.com/2010/12/paso11.jpg" medium="image">
			<media:title type="html">paso11</media:title>
		</media:content>

		<media:content url="http://mvcnet.files.wordpress.com/2010/12/paso12.jpg" medium="image">
			<media:title type="html">paso12</media:title>
		</media:content>

		<media:content url="http://mvcnet.files.wordpress.com/2010/12/paso13.jpg" medium="image">
			<media:title type="html">paso13</media:title>
		</media:content>

		<media:content url="http://mvcnet.files.wordpress.com/2010/12/paso14.jpg" medium="image">
			<media:title type="html">paso14</media:title>
		</media:content>

		<media:content url="http://mvcnet.files.wordpress.com/2010/12/paso16.jpg" medium="image">
			<media:title type="html">paso16</media:title>
		</media:content>
	</item>
		<item>
		<title>Linq to dataset toList()</title>
		<link>http://mvcnet.wordpress.com/2010/11/23/linq-to-dataset-tolist/</link>
		<comments>http://mvcnet.wordpress.com/2010/11/23/linq-to-dataset-tolist/#comments</comments>
		<pubDate>Tue, 23 Nov 2010 21:47:32 +0000</pubDate>
		<dc:creator>mvcnet</dc:creator>
				<category><![CDATA[LINQ]]></category>

		<guid isPermaLink="false">http://mvcnet.wordpress.com/?p=197</guid>
		<description><![CDATA[Linq to dataset es una de las mejores opciones a la hora de cachear un tabla que luego vas a tener que consultar y filtrar/ordenar/hacer join con ella, un pelin rollo el hecho de tener que declararte la tabla de nuevo campo a campo pero una vez creado el dataset va fenomenal, hay va el [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=mvcnet.wordpress.com&amp;blog=10268854&amp;post=197&amp;subd=mvcnet&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Linq to dataset es una de las mejores opciones a la hora de cachear un tabla que luego vas a tener que consultar y filtrar/ordenar/hacer join con ella, un pelin rollo el hecho de tener que declararte la tabla de nuevo campo a campo pero una vez creado el dataset va fenomenal, hay va el ejemplo (<a href="http://www.futurojobs.com/downloads/linq/wpfdataset.rar">http://www.futurojobs.com/downloads/linq/wpfdataset.rar</a>)</p>
<p><a href="http://mvcnet.files.wordpress.com/2010/11/dibu0.jpg"><img class="alignnone size-full wp-image-199" title="dibu0" src="http://mvcnet.files.wordpress.com/2010/11/dibu0.jpg?w=480&#038;h=320" alt="" width="480" height="320" /></a></p>
<p>Y el codigo del boton load data:</p>
<p><a href="http://mvcnet.files.wordpress.com/2010/11/dibu12.jpg"><img class="alignnone size-full wp-image-198" title="dibu1" src="http://mvcnet.files.wordpress.com/2010/11/dibu12.jpg?w=480&#038;h=224" alt="" width="480" height="224" /></a></p>
<p>En verde: la declaracion del dataset</p>
<p>En morado:montamos la lista</p>
<p>En Amarillo:creamos el dataset y lo informamos</p>
<p>En azul: finalmente podemos hacer una consulta linq to dataset, en este caso particular hacemos un toList() para poder pasarselo al dataGrid.</p>
<p>Ya esta, aunque en este ejemplo no esta metido en cache si estamos en un entorno web si podriamos hacer que teviese mas potencia aun.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/mvcnet.wordpress.com/197/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/mvcnet.wordpress.com/197/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/mvcnet.wordpress.com/197/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/mvcnet.wordpress.com/197/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/mvcnet.wordpress.com/197/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/mvcnet.wordpress.com/197/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/mvcnet.wordpress.com/197/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/mvcnet.wordpress.com/197/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/mvcnet.wordpress.com/197/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/mvcnet.wordpress.com/197/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/mvcnet.wordpress.com/197/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/mvcnet.wordpress.com/197/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/mvcnet.wordpress.com/197/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/mvcnet.wordpress.com/197/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=mvcnet.wordpress.com&amp;blog=10268854&amp;post=197&amp;subd=mvcnet&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://mvcnet.wordpress.com/2010/11/23/linq-to-dataset-tolist/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/8743f83a793244223163f033c1fb5c26?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">mvcnet</media:title>
		</media:content>

		<media:content url="http://mvcnet.files.wordpress.com/2010/11/dibu0.jpg" medium="image">
			<media:title type="html">dibu0</media:title>
		</media:content>

		<media:content url="http://mvcnet.files.wordpress.com/2010/11/dibu12.jpg" medium="image">
			<media:title type="html">dibu1</media:title>
		</media:content>
	</item>
		<item>
		<title>Serializando en un wpf</title>
		<link>http://mvcnet.wordpress.com/2010/11/23/serializando-en-un-wpf/</link>
		<comments>http://mvcnet.wordpress.com/2010/11/23/serializando-en-un-wpf/#comments</comments>
		<pubDate>Tue, 23 Nov 2010 21:46:41 +0000</pubDate>
		<dc:creator>mvcnet</dc:creator>
				<category><![CDATA[Serializacion]]></category>

		<guid isPermaLink="false">http://mvcnet.wordpress.com/?p=201</guid>
		<description><![CDATA[Que mejor sitio para aplicar una serializacion que un wpf que necesite mantener los registros la siguiente vez que usemos nuestro programa en local, donde no tenemos acceso a BBDD, el ejemplo esta en http://www.futurojobs.com/downloads/serializando/wpfserializar.rar, tenemos un formulario con la posibilidad de añadir coches con precio. Lo primero es hacer una clase serializable donde vamos [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=mvcnet.wordpress.com&amp;blog=10268854&amp;post=201&amp;subd=mvcnet&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Que mejor sitio para aplicar una serializacion que un wpf que necesite mantener los registros la siguiente vez que usemos nuestro programa en local, donde no tenemos acceso a BBDD, el ejemplo esta en <a href="http://www.futurojobs.com/downloads/serializando/wpfserializar.rar">http://www.futurojobs.com/downloads/serializando/wpfserializar.rar</a>, tenemos un formulario con la posibilidad de añadir coches con precio.</p>
<p><a href="http://mvcnet.files.wordpress.com/2010/11/dibu01.jpg"><img class="alignnone size-full wp-image-203" title="dibu0" src="http://mvcnet.files.wordpress.com/2010/11/dibu01.jpg?w=480&#038;h=321" alt="" width="480" height="321" /></a></p>
<p>Lo primero es hacer una clase serializable donde vamos a tener nuestros datos, en este caso un datatable</p>
<p><a href="http://mvcnet.files.wordpress.com/2010/11/dibu13.jpg"><img class="alignnone size-full wp-image-204" title="dibu1" src="http://mvcnet.files.wordpress.com/2010/11/dibu13.jpg?w=307&#038;h=21" alt="" width="307" height="21" /></a></p>
<p>El metodo insertar informa al datatable de la nueva fila, en caso de que sea la primera vez crea las columnas</p>
<p><a href="http://mvcnet.files.wordpress.com/2010/11/dibu22.jpg"><img class="alignnone size-full wp-image-205" title="dibu2" src="http://mvcnet.files.wordpress.com/2010/11/dibu22.jpg?w=480&#038;h=250" alt="" width="480" height="250" /></a></p>
<p>La funcion leer recorrer el datatable para informar el grid del formulario</p>
<p><a href="http://mvcnet.files.wordpress.com/2010/11/dibu3.jpg"><img class="alignnone size-full wp-image-206" title="dibu3" src="http://mvcnet.files.wordpress.com/2010/11/dibu3.jpg?w=480&#038;h=85" alt="" width="480" height="85" /></a></p>
<p>En el formulario de wpf instanciamos despues de la declaración de la clase el objeto de la clase que contiene el datatable</p>
<p><a href="http://mvcnet.files.wordpress.com/2010/11/dibu4.jpg"><img class="alignnone size-full wp-image-207" title="dibu4" src="http://mvcnet.files.wordpress.com/2010/11/dibu4.jpg?w=252&#038;h=24" alt="" width="252" height="24" /></a></p>
<p>Cada vez que pinchen en insertar llamamos a la funcion insertar y leer que informa el datagrid</p>
<p><a href="http://mvcnet.files.wordpress.com/2010/11/dibu5.jpg"><img class="alignnone size-full wp-image-208" title="dibu5" src="http://mvcnet.files.wordpress.com/2010/11/dibu5.jpg?w=480&#038;h=35" alt="" width="480" height="35" /></a></p>
<p>Luegos estan los metodos de serializar y desSerializar, ambos tienen en cuenta si ya existe el archivo</p>
<p><a href="http://mvcnet.files.wordpress.com/2010/11/dibu6.jpg"><img class="alignnone size-full wp-image-209" title="dibu6" src="http://mvcnet.files.wordpress.com/2010/11/dibu6.jpg?w=480&#038;h=139" alt="" width="480" height="139" /></a></p>
<p>Finalmente necesitamos incluir en el XAML los eventos de Loaded y Closed para que serialize y desserialize.</p>
<p><a href="http://mvcnet.files.wordpress.com/2010/11/dibu7.jpg"><img class="alignnone size-full wp-image-202" title="dibu7" src="http://mvcnet.files.wordpress.com/2010/11/dibu7.jpg?w=480&#038;h=59" alt="" width="480" height="59" /></a></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/mvcnet.wordpress.com/201/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/mvcnet.wordpress.com/201/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/mvcnet.wordpress.com/201/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/mvcnet.wordpress.com/201/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/mvcnet.wordpress.com/201/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/mvcnet.wordpress.com/201/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/mvcnet.wordpress.com/201/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/mvcnet.wordpress.com/201/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/mvcnet.wordpress.com/201/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/mvcnet.wordpress.com/201/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/mvcnet.wordpress.com/201/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/mvcnet.wordpress.com/201/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/mvcnet.wordpress.com/201/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/mvcnet.wordpress.com/201/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=mvcnet.wordpress.com&amp;blog=10268854&amp;post=201&amp;subd=mvcnet&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://mvcnet.wordpress.com/2010/11/23/serializando-en-un-wpf/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/8743f83a793244223163f033c1fb5c26?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">mvcnet</media:title>
		</media:content>

		<media:content url="http://mvcnet.files.wordpress.com/2010/11/dibu01.jpg" medium="image">
			<media:title type="html">dibu0</media:title>
		</media:content>

		<media:content url="http://mvcnet.files.wordpress.com/2010/11/dibu13.jpg" medium="image">
			<media:title type="html">dibu1</media:title>
		</media:content>

		<media:content url="http://mvcnet.files.wordpress.com/2010/11/dibu22.jpg" medium="image">
			<media:title type="html">dibu2</media:title>
		</media:content>

		<media:content url="http://mvcnet.files.wordpress.com/2010/11/dibu3.jpg" medium="image">
			<media:title type="html">dibu3</media:title>
		</media:content>

		<media:content url="http://mvcnet.files.wordpress.com/2010/11/dibu4.jpg" medium="image">
			<media:title type="html">dibu4</media:title>
		</media:content>

		<media:content url="http://mvcnet.files.wordpress.com/2010/11/dibu5.jpg" medium="image">
			<media:title type="html">dibu5</media:title>
		</media:content>

		<media:content url="http://mvcnet.files.wordpress.com/2010/11/dibu6.jpg" medium="image">
			<media:title type="html">dibu6</media:title>
		</media:content>

		<media:content url="http://mvcnet.files.wordpress.com/2010/11/dibu7.jpg" medium="image">
			<media:title type="html">dibu7</media:title>
		</media:content>
	</item>
		<item>
		<title>Linq to objects en List(Of</title>
		<link>http://mvcnet.wordpress.com/2010/11/15/linq-to-objects-en-listof/</link>
		<comments>http://mvcnet.wordpress.com/2010/11/15/linq-to-objects-en-listof/#comments</comments>
		<pubDate>Mon, 15 Nov 2010 22:38:53 +0000</pubDate>
		<dc:creator>mvcnet</dc:creator>
				<category><![CDATA[LINQ]]></category>

		<guid isPermaLink="false">http://mvcnet.wordpress.com/?p=190</guid>
		<description><![CDATA[Una maravilla trabajar con linq to objects, se acabo el pelear contra el ordenado de una lista por el icomparable, ahora podemos ordenar una lista, filtrar, hacer joins, etc &#8230; se me ocurren infinidad de situaciones donde necesitar linq to objects, es mas, cuando acabas de ordenar o filtrar no tienes porque recorrerte todo el [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=mvcnet.wordpress.com&amp;blog=10268854&amp;post=190&amp;subd=mvcnet&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Una maravilla trabajar con linq to objects, se acabo el pelear contra el ordenado de una lista por el icomparable, ahora podemos ordenar una lista, filtrar, hacer joins, etc &#8230; se me ocurren infinidad de situaciones donde necesitar linq to objects, es mas, cuando acabas de ordenar o filtrar no tienes porque recorrerte todo el array, puedes hacer un toList y convertirlo de nuevo en una coleccion.</p>
<p>Para este ejemplo (<a href="http://www.futurojobs.com/downloads/linq/wpflinqobjects.rar">http://www.futurojobs.com/downloads/linq/wpflinqobjects.rar</a>)  se propone una aplicacion wpf con una clase csAuto que va a ser el tipo del List(Of</p>
<p><a href="http://mvcnet.files.wordpress.com/2010/11/dibu11.jpg"><img class="alignnone size-full wp-image-192" title="dibu1" src="http://mvcnet.files.wordpress.com/2010/11/dibu11.jpg?w=331&#038;h=63" alt="" width="331" height="63" /></a></p>
<p>Y el codigo de la aplicación quedaria asi:</p>
<p><a href="http://mvcnet.files.wordpress.com/2010/11/dibu21.jpg"><img class="alignnone size-full wp-image-193" title="dibu2" src="http://mvcnet.files.wordpress.com/2010/11/dibu21.jpg?w=480&#038;h=282" alt="" width="480" height="282" /></a></p>
<p>Donde se puede ver que segun clikamos en el btn Sort by name montamos una consulta en LINQ para acabar haciendole un toList.</p>
<p>Mas facil imposible.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/mvcnet.wordpress.com/190/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/mvcnet.wordpress.com/190/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/mvcnet.wordpress.com/190/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/mvcnet.wordpress.com/190/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/mvcnet.wordpress.com/190/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/mvcnet.wordpress.com/190/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/mvcnet.wordpress.com/190/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/mvcnet.wordpress.com/190/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/mvcnet.wordpress.com/190/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/mvcnet.wordpress.com/190/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/mvcnet.wordpress.com/190/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/mvcnet.wordpress.com/190/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/mvcnet.wordpress.com/190/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/mvcnet.wordpress.com/190/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=mvcnet.wordpress.com&amp;blog=10268854&amp;post=190&amp;subd=mvcnet&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://mvcnet.wordpress.com/2010/11/15/linq-to-objects-en-listof/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/8743f83a793244223163f033c1fb5c26?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">mvcnet</media:title>
		</media:content>

		<media:content url="http://mvcnet.files.wordpress.com/2010/11/dibu11.jpg" medium="image">
			<media:title type="html">dibu1</media:title>
		</media:content>

		<media:content url="http://mvcnet.files.wordpress.com/2010/11/dibu21.jpg" medium="image">
			<media:title type="html">dibu2</media:title>
		</media:content>
	</item>
		<item>
		<title>Clases abstractas</title>
		<link>http://mvcnet.wordpress.com/2010/11/11/clases-abstractas/</link>
		<comments>http://mvcnet.wordpress.com/2010/11/11/clases-abstractas/#comments</comments>
		<pubDate>Thu, 11 Nov 2010 08:59:27 +0000</pubDate>
		<dc:creator>mvcnet</dc:creator>
				<category><![CDATA[Clases]]></category>

		<guid isPermaLink="false">http://mvcnet.wordpress.com/?p=178</guid>
		<description><![CDATA[Aunque no son novedad me apetecia recordarlas a ver si realmente le saco todo el potencial Este mi ejemplo: http://www.futurojobs.com/downloads/clases/WpfClasesAbstractas.rar Tener una clase abstracta implica poder establecer una obligación de arquitectura imponiendo unos metodos que hay que declarar en nuestra clase que lo implemnta, pero ademas tiene cualidades como las siguientes: -Podemos inicializar la clase [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=mvcnet.wordpress.com&amp;blog=10268854&amp;post=178&amp;subd=mvcnet&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Aunque no son novedad me apetecia recordarlas a ver si realmente le saco todo el potencial</p>
<p>Este mi ejemplo: <a href="http://www.futurojobs.com/downloads/clases/WpfClasesAbstractas.rar">http://www.futurojobs.com/downloads/clases/WpfClasesAbstractas.rar</a></p>
<p>Tener una clase abstracta implica poder establecer una obligación de arquitectura imponiendo unos metodos que hay que declarar en nuestra clase que lo implemnta, pero ademas tiene cualidades como las siguientes:</p>
<p>-Podemos inicializar la clase abstracta con un constructor obligado (opcional)</p>
<p><a href="http://mvcnet.files.wordpress.com/2010/11/img1.jpg"><img class="alignnone size-full wp-image-181" title="img1" src="http://mvcnet.files.wordpress.com/2010/11/img1.jpg?w=480&#038;h=218" alt="" width="480" height="218" /></a></p>
<p>-Podemos tener funciones para ser usadas normalmente</p>
<p><a href="http://mvcnet.files.wordpress.com/2010/11/img2.jpg"><img class="alignnone size-full wp-image-182" title="img2" src="http://mvcnet.files.wordpress.com/2010/11/img2.jpg?w=215&#038;h=101" alt="" width="215" height="101" /></a></p>
<p>-Podemos tener funciones para ser usadas normalmente pero que se pueden sobreescribir en destino</p>
<p><a href="http://mvcnet.files.wordpress.com/2010/11/img3.jpg"><img class="alignnone size-full wp-image-183" title="img3" src="http://mvcnet.files.wordpress.com/2010/11/img3.jpg?w=480&#038;h=271" alt="" width="480" height="271" /></a></p>
<p>-Podemos tener funciones privadas</p>
<p><a href="http://mvcnet.files.wordpress.com/2010/11/img4.jpg"><img class="alignnone size-full wp-image-184" title="img4" src="http://mvcnet.files.wordpress.com/2010/11/img4.jpg?w=429&#038;h=97" alt="" width="429" height="97" /></a></p>
<p>-Podemos tener properties</p>
<p><a href="http://mvcnet.files.wordpress.com/2010/11/img5.jpg"><img class="alignnone size-full wp-image-185" title="img5" src="http://mvcnet.files.wordpress.com/2010/11/img5.jpg?w=309&#038;h=92" alt="" width="309" height="92" /></a></p>
<p>Luego tenemos la clase que hereda de la clase abstracta, asi que tenemos:</p>
<p>- Lo primero es tener un constructor en nuestra clase que a su vez implemente una llamada al contructor del heredado (subrayado en morado), aunque en este caso el constructor no hace nada, si lo hace el construcor de la clase heredada, asi que tenemos</p>
<p>- Una version de la funcion Desgaste sobreescrita por nosotros pero que ya no queremos que se sobreescriba mas</p>
<p>- Una version de la funcion velocidad sobreescrita por nosotros</p>
<p>- Un metodo propio consumoCiudad</p>
<p><a href="http://mvcnet.files.wordpress.com/2010/11/img6.jpg"><img class="alignnone size-full wp-image-186" title="img6" src="http://mvcnet.files.wordpress.com/2010/11/img6.jpg?w=480&#038;h=276" alt="" width="480" height="276" /></a></p>
<p>Finalmente tenemos la invocacion a la clase inicial desde nuestra aplicacion con las siguientes posibilidades: las funciones Desgaste y Velocidad han sido sobreescritas, pero las funciones Consumo, Velocidades y Prestaciones han sudi heredadas directamente de la clase abstracta.</p>
<p><a href="http://mvcnet.files.wordpress.com/2010/11/img7.jpg"><img class="alignnone size-full wp-image-180" title="img7" src="http://mvcnet.files.wordpress.com/2010/11/img7.jpg?w=480&#038;h=123" alt="" width="480" height="123" /></a></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/mvcnet.wordpress.com/178/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/mvcnet.wordpress.com/178/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/mvcnet.wordpress.com/178/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/mvcnet.wordpress.com/178/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/mvcnet.wordpress.com/178/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/mvcnet.wordpress.com/178/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/mvcnet.wordpress.com/178/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/mvcnet.wordpress.com/178/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/mvcnet.wordpress.com/178/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/mvcnet.wordpress.com/178/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/mvcnet.wordpress.com/178/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/mvcnet.wordpress.com/178/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/mvcnet.wordpress.com/178/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/mvcnet.wordpress.com/178/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=mvcnet.wordpress.com&amp;blog=10268854&amp;post=178&amp;subd=mvcnet&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://mvcnet.wordpress.com/2010/11/11/clases-abstractas/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/8743f83a793244223163f033c1fb5c26?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">mvcnet</media:title>
		</media:content>

		<media:content url="http://mvcnet.files.wordpress.com/2010/11/img1.jpg" medium="image">
			<media:title type="html">img1</media:title>
		</media:content>

		<media:content url="http://mvcnet.files.wordpress.com/2010/11/img2.jpg" medium="image">
			<media:title type="html">img2</media:title>
		</media:content>

		<media:content url="http://mvcnet.files.wordpress.com/2010/11/img3.jpg" medium="image">
			<media:title type="html">img3</media:title>
		</media:content>

		<media:content url="http://mvcnet.files.wordpress.com/2010/11/img4.jpg" medium="image">
			<media:title type="html">img4</media:title>
		</media:content>

		<media:content url="http://mvcnet.files.wordpress.com/2010/11/img5.jpg" medium="image">
			<media:title type="html">img5</media:title>
		</media:content>

		<media:content url="http://mvcnet.files.wordpress.com/2010/11/img6.jpg" medium="image">
			<media:title type="html">img6</media:title>
		</media:content>

		<media:content url="http://mvcnet.files.wordpress.com/2010/11/img7.jpg" medium="image">
			<media:title type="html">img7</media:title>
		</media:content>
	</item>
		<item>
		<title>Tipos anonimos</title>
		<link>http://mvcnet.wordpress.com/2010/11/09/tipos-anonimos/</link>
		<comments>http://mvcnet.wordpress.com/2010/11/09/tipos-anonimos/#comments</comments>
		<pubDate>Tue, 09 Nov 2010 22:28:18 +0000</pubDate>
		<dc:creator>mvcnet</dc:creator>
				<category><![CDATA[Tipos de datos]]></category>

		<guid isPermaLink="false">http://mvcnet.wordpress.com/?p=174</guid>
		<description><![CDATA[La cantidad de codigo extra que solucionan los tipos anonimos, la verdad es que tardo en llegar con el 4.0 pero se me ocurren un monton de situaciones donde acabamos creando un clase con dos properties que no se vuelven a usar mas. Por ejemplo, leemos un listado de marcas de coches y necesitamos guardar [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=mvcnet.wordpress.com&amp;blog=10268854&amp;post=174&amp;subd=mvcnet&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>La cantidad de codigo extra que solucionan los tipos anonimos, la verdad es que tardo en llegar con el 4.0 pero se me ocurren un monton de situaciones donde acabamos creando un clase con dos properties que no se vuelven a usar mas.</p>
<p>Por ejemplo, leemos un listado de marcas de coches y necesitamos guardar los valores en un List para poder llegar a la capa donde se pinta el listado, que mejor que un tipo anonimo?, hay va el ejemplo, es la segunda linea:</p>
<p><a href="http://mvcnet.files.wordpress.com/2010/11/dibu1.jpg"><img class="alignnone size-full wp-image-176" title="dibu1" src="http://mvcnet.files.wordpress.com/2010/11/dibu1.jpg?w=480&#038;h=48" alt="" width="480" height="48" /></a></p>
<p>Y al final, por cada marca insertariamos un objeto anonimo al List, rapido y eficiente.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/mvcnet.wordpress.com/174/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/mvcnet.wordpress.com/174/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/mvcnet.wordpress.com/174/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/mvcnet.wordpress.com/174/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/mvcnet.wordpress.com/174/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/mvcnet.wordpress.com/174/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/mvcnet.wordpress.com/174/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/mvcnet.wordpress.com/174/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/mvcnet.wordpress.com/174/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/mvcnet.wordpress.com/174/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/mvcnet.wordpress.com/174/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/mvcnet.wordpress.com/174/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/mvcnet.wordpress.com/174/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/mvcnet.wordpress.com/174/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=mvcnet.wordpress.com&amp;blog=10268854&amp;post=174&amp;subd=mvcnet&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://mvcnet.wordpress.com/2010/11/09/tipos-anonimos/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/8743f83a793244223163f033c1fb5c26?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">mvcnet</media:title>
		</media:content>

		<media:content url="http://mvcnet.files.wordpress.com/2010/11/dibu1.jpg" medium="image">
			<media:title type="html">dibu1</media:title>
		</media:content>
	</item>
		<item>
		<title>Propiedades autoimplementadas</title>
		<link>http://mvcnet.wordpress.com/2010/11/09/propiedades-autoimplementadas/</link>
		<comments>http://mvcnet.wordpress.com/2010/11/09/propiedades-autoimplementadas/#comments</comments>
		<pubDate>Tue, 09 Nov 2010 22:07:00 +0000</pubDate>
		<dc:creator>mvcnet</dc:creator>
				<category><![CDATA[Clases]]></category>

		<guid isPermaLink="false">http://mvcnet.wordpress.com/?p=171</guid>
		<description><![CDATA[La verdad es son muy faciles, pero imprescindibles a partir de ahora en cualquier desarrollo que se precie aspirar a ser rapido y bien hecho. Que clasico rollo andar repitiendo una y otra vez un listado enorme de properties, pues se acabo, las podemos declarar en una linea y siempre y cuando sepamos que los [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=mvcnet.wordpress.com&amp;blog=10268854&amp;post=171&amp;subd=mvcnet&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>La verdad es son muy faciles, pero imprescindibles a partir de ahora en cualquier desarrollo que se precie aspirar a ser rapido y bien hecho.</p>
<p>Que clasico rollo andar repitiendo una y otra vez un listado enorme de properties, pues se acabo, las podemos declarar en una linea y siempre y cuando sepamos que los que vamos a hacer es un set y get estandar, no hay que ir mas alla, de hecho se pueden inicializar tambien, hay va el ejemplo:</p>
<p><a href="http://mvcnet.files.wordpress.com/2010/11/dibu1.png"><img class="alignnone size-full wp-image-172" title="dibu1" src="http://mvcnet.files.wordpress.com/2010/11/dibu1.png?w=480&#038;h=76" alt="" width="480" height="76" /></a></p>
<p>Pero realmente como funcionan internamente, por ejemplo, en el primer caso se crea la variable interna _velocidad con la cual se trabaja, aunque al final para nosotros la idea es que sea transparente, asi de facil.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/mvcnet.wordpress.com/171/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/mvcnet.wordpress.com/171/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/mvcnet.wordpress.com/171/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/mvcnet.wordpress.com/171/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/mvcnet.wordpress.com/171/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/mvcnet.wordpress.com/171/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/mvcnet.wordpress.com/171/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/mvcnet.wordpress.com/171/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/mvcnet.wordpress.com/171/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/mvcnet.wordpress.com/171/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/mvcnet.wordpress.com/171/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/mvcnet.wordpress.com/171/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/mvcnet.wordpress.com/171/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/mvcnet.wordpress.com/171/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=mvcnet.wordpress.com&amp;blog=10268854&amp;post=171&amp;subd=mvcnet&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://mvcnet.wordpress.com/2010/11/09/propiedades-autoimplementadas/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/8743f83a793244223163f033c1fb5c26?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">mvcnet</media:title>
		</media:content>

		<media:content url="http://mvcnet.files.wordpress.com/2010/11/dibu1.png" medium="image">
			<media:title type="html">dibu1</media:title>
		</media:content>
	</item>
		<item>
		<title>Tipos de colecciones</title>
		<link>http://mvcnet.wordpress.com/2010/11/08/tipos-de-colecciones/</link>
		<comments>http://mvcnet.wordpress.com/2010/11/08/tipos-de-colecciones/#comments</comments>
		<pubDate>Mon, 08 Nov 2010 15:35:26 +0000</pubDate>
		<dc:creator>mvcnet</dc:creator>
				<category><![CDATA[Tipos de datos]]></category>

		<guid isPermaLink="false">http://mvcnet.wordpress.com/?p=151</guid>
		<description><![CDATA[Vamos a las colecciones mas importantes de .Net bajo un proyecto de wpf, se puede dividir en tres: arrays simples (System), colecciones basicas en (System.Collections) y finalmente colecciones genericas (System.Collections.Generic), a mi gusto las mas potentes. Desde un proyecto en WPF proponemos una manera rapida de ver todas las colecciones (http://www.futurojobs.com/downloads/tipos_datos/wpfcolecciones.rar): 1. Comenzamos por un [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=mvcnet.wordpress.com&amp;blog=10268854&amp;post=151&amp;subd=mvcnet&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Vamos a las colecciones mas importantes de .Net bajo un proyecto de wpf, se puede dividir en tres: arrays simples (System), colecciones basicas en (System.Collections) y finalmente colecciones genericas (System.Collections.Generic), a mi gusto las mas potentes.</p>
<p>Desde un proyecto en WPF proponemos una manera rapida de ver todas las colecciones (<a href="http://www.futurojobs.com/downloads/tipos_datos/wpfcolecciones.rar">http://www.futurojobs.com/downloads/tipos_datos/wpfcolecciones.rar</a>):</p>
<p><a href="http://mvcnet.files.wordpress.com/2010/11/dibujo110.jpg"><img class="alignnone size-full wp-image-154" title="Dibujo1" src="http://mvcnet.files.wordpress.com/2010/11/dibujo110.jpg?w=480&#038;h=317" alt="" width="480" height="317" /></a></p>
<p>1. Comenzamos por un array simple:</p>
<p><a href="http://mvcnet.files.wordpress.com/2010/11/08-11-2010-14-51-09.jpg"><img class="alignnone size-full wp-image-153" title="08-11-2010 14-51-09" src="http://mvcnet.files.wordpress.com/2010/11/08-11-2010-14-51-09.jpg?w=341&#038;h=116" alt="" width="341" height="116" /></a></p>
<p><strong>Colecciones basicas</strong></p>
<p>2. ArrayList: de lo mas potente en colecciones, se puede insertar lo que quieras, pero no tiene seguridad, luego tiene que hacerle casting al extraer &#8230; si vas a mezclar tipos de datos en tu coleccioón es el indicado, sino una lista generica es mucho mas optima (Punto 6)</p>
<p><a href="http://mvcnet.files.wordpress.com/2010/11/dibujo23.jpg"><img class="alignnone size-full wp-image-155" title="Dibujo2" src="http://mvcnet.files.wordpress.com/2010/11/dibujo23.jpg?w=304&#038;h=146" alt="" width="304" height="146" /></a></p>
<p>3. Hashtable: le pasa lo mismo que al arrayList, muy potente, inseguro, y solo justficado para mezclar tipos de datos en su interior, si no es asi la opción mas sugerente seria un Dictionary(Of  (Punto 7).</p>
<p><a href="http://mvcnet.files.wordpress.com/2010/11/dibujo32.jpg"><img class="alignnone size-full wp-image-156" title="Dibujo3" src="http://mvcnet.files.wordpress.com/2010/11/dibujo32.jpg?w=342&#038;h=164" alt="" width="342" height="164" /></a></p>
<p>4. Sorted List: en teoria una lista ordenada, bajo mi punto de vista un hashTable ordenado por la key &#8230;. casi nunca vamos a necesitar ordenador una lista por la key &#8230; y mucho menos un hashTable, mejor usar un Sorted Set (Punto 9).</p>
<p><a href="http://mvcnet.files.wordpress.com/2010/11/dibujo42.jpg"><img class="alignnone size-full wp-image-157" title="Dibujo4" src="http://mvcnet.files.wordpress.com/2010/11/dibujo42.jpg?w=346&#038;h=211" alt="" width="346" height="211" /></a></p>
<p>5. Queue: lista de la filosofia &#8216;primero que entra &#8211; primero que sale&#8217;, si vamos a mezclar tipos es correcta, sino mejor un list(Of (punto 10)</p>
<p><a href="http://mvcnet.files.wordpress.com/2010/11/dibujo52.jpg"><img class="alignnone size-full wp-image-158" title="Dibujo5" src="http://mvcnet.files.wordpress.com/2010/11/dibujo52.jpg?w=390&#038;h=272" alt="" width="390" height="272" /></a></p>
<p><strong>Colecciones Genericas</strong></p>
<p>Punto 6. List (Of, la lista de tipo concreto, la coleccion mas usual</p>
<p><a href="http://mvcnet.files.wordpress.com/2010/11/dibujo62.jpg"><img class="alignnone size-full wp-image-159" title="Dibujo6" src="http://mvcnet.files.wordpress.com/2010/11/dibujo62.jpg?w=480&#038;h=143" alt="" width="480" height="143" /></a></p>
<p>Punto 7. Dictionary, es un hashtable pero generico, donde poder especificar los tipos, con seguridad</p>
<p><a href="http://mvcnet.files.wordpress.com/2010/11/dibujo72.jpg"><img class="alignnone size-full wp-image-160" title="Dibujo7" src="http://mvcnet.files.wordpress.com/2010/11/dibujo72.jpg?w=480&#038;h=150" alt="" width="480" height="150" /></a></p>
<p>Punto 8.SortedList Of(, es lo mismo que el sortedList de coleccionesBasicoas pero generica, sigue siendo un hashTable ordenado por la key &#8230;</p>
<p><a href="http://mvcnet.files.wordpress.com/2010/11/dibujo82.jpg"><img class="alignnone size-full wp-image-161" title="Dibujo8" src="http://mvcnet.files.wordpress.com/2010/11/dibujo82.jpg?w=480&#038;h=189" alt="" width="480" height="189" /></a></p>
<p>9. Sorted Set: colección que ordena el tipo especificado</p>
<p><a href="http://mvcnet.files.wordpress.com/2010/11/dibujo92.jpg"><img class="alignnone size-full wp-image-162" title="Dibujo9" src="http://mvcnet.files.wordpress.com/2010/11/dibujo92.jpg?w=480&#038;h=155" alt="" width="480" height="155" /></a></p>
<p>10. Queue de tipo generico,mas optimo que el basico</p>
<p><a href="http://mvcnet.files.wordpress.com/2010/11/dibujo102.jpg"><img class="alignnone size-full wp-image-163" title="Dibujo10" src="http://mvcnet.files.wordpress.com/2010/11/dibujo102.jpg?w=333&#038;h=275" alt="" width="333" height="275" /></a></p>
<p>11.Y para acabar un stack generico, mas recomendable que el basico.</p>
<p><a href="http://mvcnet.files.wordpress.com/2010/11/dibujo112.jpg"><img class="alignnone size-full wp-image-152" title="Dibujo11" src="http://mvcnet.files.wordpress.com/2010/11/dibujo112.jpg?w=325&#038;h=182" alt="" width="325" height="182" /></a></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/mvcnet.wordpress.com/151/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/mvcnet.wordpress.com/151/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/mvcnet.wordpress.com/151/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/mvcnet.wordpress.com/151/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/mvcnet.wordpress.com/151/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/mvcnet.wordpress.com/151/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/mvcnet.wordpress.com/151/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/mvcnet.wordpress.com/151/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/mvcnet.wordpress.com/151/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/mvcnet.wordpress.com/151/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/mvcnet.wordpress.com/151/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/mvcnet.wordpress.com/151/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/mvcnet.wordpress.com/151/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/mvcnet.wordpress.com/151/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=mvcnet.wordpress.com&amp;blog=10268854&amp;post=151&amp;subd=mvcnet&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://mvcnet.wordpress.com/2010/11/08/tipos-de-colecciones/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/8743f83a793244223163f033c1fb5c26?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">mvcnet</media:title>
		</media:content>

		<media:content url="http://mvcnet.files.wordpress.com/2010/11/dibujo110.jpg" medium="image">
			<media:title type="html">Dibujo1</media:title>
		</media:content>

		<media:content url="http://mvcnet.files.wordpress.com/2010/11/08-11-2010-14-51-09.jpg" medium="image">
			<media:title type="html">08-11-2010 14-51-09</media:title>
		</media:content>

		<media:content url="http://mvcnet.files.wordpress.com/2010/11/dibujo23.jpg" medium="image">
			<media:title type="html">Dibujo2</media:title>
		</media:content>

		<media:content url="http://mvcnet.files.wordpress.com/2010/11/dibujo32.jpg" medium="image">
			<media:title type="html">Dibujo3</media:title>
		</media:content>

		<media:content url="http://mvcnet.files.wordpress.com/2010/11/dibujo42.jpg" medium="image">
			<media:title type="html">Dibujo4</media:title>
		</media:content>

		<media:content url="http://mvcnet.files.wordpress.com/2010/11/dibujo52.jpg" medium="image">
			<media:title type="html">Dibujo5</media:title>
		</media:content>

		<media:content url="http://mvcnet.files.wordpress.com/2010/11/dibujo62.jpg" medium="image">
			<media:title type="html">Dibujo6</media:title>
		</media:content>

		<media:content url="http://mvcnet.files.wordpress.com/2010/11/dibujo72.jpg" medium="image">
			<media:title type="html">Dibujo7</media:title>
		</media:content>

		<media:content url="http://mvcnet.files.wordpress.com/2010/11/dibujo82.jpg" medium="image">
			<media:title type="html">Dibujo8</media:title>
		</media:content>

		<media:content url="http://mvcnet.files.wordpress.com/2010/11/dibujo92.jpg" medium="image">
			<media:title type="html">Dibujo9</media:title>
		</media:content>

		<media:content url="http://mvcnet.files.wordpress.com/2010/11/dibujo102.jpg" medium="image">
			<media:title type="html">Dibujo10</media:title>
		</media:content>

		<media:content url="http://mvcnet.files.wordpress.com/2010/11/dibujo112.jpg" medium="image">
			<media:title type="html">Dibujo11</media:title>
		</media:content>
	</item>
		<item>
		<title>Manejando eventos desde cero</title>
		<link>http://mvcnet.wordpress.com/2010/11/03/manejando-eventos-desde-cero/</link>
		<comments>http://mvcnet.wordpress.com/2010/11/03/manejando-eventos-desde-cero/#comments</comments>
		<pubDate>Wed, 03 Nov 2010 11:46:31 +0000</pubDate>
		<dc:creator>mvcnet</dc:creator>
				<category><![CDATA[Eventos]]></category>

		<guid isPermaLink="false">http://mvcnet.wordpress.com/?p=105</guid>
		<description><![CDATA[Ruta del ejemplo (vs2010 vb.net) : http://www.futurojobs.com/downloads/eventos/AppEventosBasico.zip Empezamos con la creacción de un proyecto nuevo: Delenguaje Visual Basic, Tipo Windows Form Aplication y le damos un nombre Ahora nos vamos al toolbox Y desde la pestaña Common Controls Hacemos doble click sobre Button Lo mismo con un control TextBox Nos volvemos a la pantalla del [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=mvcnet.wordpress.com&amp;blog=10268854&amp;post=105&amp;subd=mvcnet&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Ruta del ejemplo (vs2010 vb.net) : <a href="http://www.futurojobs.com/downloads/eventos/AppEventosBasico.zip">http://www.futurojobs.com/downloads/eventos/AppEventosBasico.zip</a></p>
<p>Empezamos con la creacción de un proyecto nuevo:</p>
<p><a href="http://mvcnet.files.wordpress.com/2010/11/dibujo18.jpg"><img class="alignnone size-full wp-image-124" title="Dibujo1" src="http://mvcnet.files.wordpress.com/2010/11/dibujo18.jpg?w=435&#038;h=347" alt="" width="435" height="347" /></a></p>
<p>Delenguaje Visual Basic, Tipo Windows Form Aplication y le damos un nombre</p>
<p><a href="http://mvcnet.files.wordpress.com/2010/11/dibujo21.jpg"><img class="alignnone size-full wp-image-125" title="Dibujo2" src="http://mvcnet.files.wordpress.com/2010/11/dibujo21.jpg?w=480&#038;h=376" alt="" width="480" height="376" /></a></p>
<p>Ahora nos vamos al toolbox</p>
<p><a href="http://mvcnet.files.wordpress.com/2010/11/dibujo31.jpg"><img class="alignnone size-full wp-image-126" title="Dibujo3" src="http://mvcnet.files.wordpress.com/2010/11/dibujo31.jpg?w=322&#038;h=520" alt="" width="322" height="520" /></a></p>
<p>Y desde la pestaña Common Controls</p>
<p><a href="http://mvcnet.files.wordpress.com/2010/11/dibujo41.jpg"><img class="alignnone size-full wp-image-127" title="Dibujo4" src="http://mvcnet.files.wordpress.com/2010/11/dibujo41.jpg?w=322&#038;h=520" alt="" width="322" height="520" /></a></p>
<p>Hacemos doble click sobre Button</p>
<p><a href="http://mvcnet.files.wordpress.com/2010/11/dibujo51.jpg"><img class="alignnone size-full wp-image-128" title="Dibujo5" src="http://mvcnet.files.wordpress.com/2010/11/dibujo51.jpg?w=322&#038;h=520" alt="" width="322" height="520" /></a></p>
<p>Lo mismo con un control TextBox</p>
<p><a href="http://mvcnet.files.wordpress.com/2010/11/dibujo61.jpg"><img class="alignnone size-full wp-image-129" title="Dibujo6" src="http://mvcnet.files.wordpress.com/2010/11/dibujo61.jpg?w=322&#038;h=520" alt="" width="322" height="520" /></a></p>
<p>Nos volvemos a la pantalla del formulario, aqui nos encontramos a los dos controles uno encima de otro</p>
<p><a href="http://mvcnet.files.wordpress.com/2010/11/dibujo71.jpg"><img class="alignnone size-full wp-image-130" title="Dibujo7" src="http://mvcnet.files.wordpress.com/2010/11/dibujo71.jpg?w=334&#038;h=353" alt="" width="334" height="353" /></a></p>
<p>Necesitamos arrastrar la caja de texto hacia la derecha para poder ver el boton</p>
<p><a href="http://mvcnet.files.wordpress.com/2010/11/dibujo81.jpg"><img class="alignnone size-full wp-image-131" title="Dibujo8" src="http://mvcnet.files.wordpress.com/2010/11/dibujo81.jpg?w=334&#038;h=353" alt="" width="334" height="353" /></a></p>
<p><a href="http://mvcnet.files.wordpress.com/2010/11/dibujo91.jpg"><img class="alignnone size-full wp-image-132" title="Dibujo9" src="http://mvcnet.files.wordpress.com/2010/11/dibujo91.jpg?w=321&#038;h=315" alt="" width="321" height="315" /></a></p>
<p>Esto ya tiene mejor pinta, ahora hacemos doble click sobre el Button1</p>
<p><a href="http://mvcnet.files.wordpress.com/2010/11/dibujo101.jpg"><img class="alignnone size-full wp-image-133" title="Dibujo10" src="http://mvcnet.files.wordpress.com/2010/11/dibujo101.jpg?w=324&#038;h=165" alt="" width="324" height="165" /></a></p>
<p>Nos abrira una zona de codigo, la obviamos por ahora, volvemos a la pantalla de diseño del formulario y seleccionamos en Button1</p>
<p><a href="http://mvcnet.files.wordpress.com/2010/11/dibujo111.jpg"><img class="alignnone size-full wp-image-134" title="Dibujo11" src="http://mvcnet.files.wordpress.com/2010/11/dibujo111.jpg?w=320&#038;h=106" alt="" width="320" height="106" /></a></p>
<p>Pinchamos en el boton de la derecha, y luego en Properties</p>
<p><a href="http://mvcnet.files.wordpress.com/2010/11/dibujo121.jpg"><img class="alignnone size-full wp-image-135" title="Dibujo12" src="http://mvcnet.files.wordpress.com/2010/11/dibujo121.jpg?w=316&#038;h=315" alt="" width="316" height="315" /></a></p>
<p>Ahora nos vamos a la pestaña de Properties (Suele estar a la derecha) y pinchamos en el cuarto icono (el del rayo), son los eventos</p>
<p><a href="http://mvcnet.files.wordpress.com/2010/11/dibujo131.jpg"><img class="alignnone size-full wp-image-136" title="Dibujo13" src="http://mvcnet.files.wordpress.com/2010/11/dibujo131.jpg?w=309&#038;h=289" alt="" width="309" height="289" /></a></p>
<p>Podemos ver que Visual Studio ya nos ha metido en el evento click un delegado &#8216;Button1_Click&#8217;</p>
<p><a href="http://mvcnet.files.wordpress.com/2010/11/dibujo141.jpg"><img class="alignnone size-full wp-image-137" title="Dibujo14" src="http://mvcnet.files.wordpress.com/2010/11/dibujo141.jpg?w=310&#038;h=295" alt="" width="310" height="295" /></a>&#8216;</p>
<p>Ahora si podemos ir al codigo que nos propone en el Form1.vb y vemos la funcion delegado que nos ha creado, podemos ver que incluye al final de la funcion <strong>Handles Button1.click</strong>, este es el evento</p>
<p><a href="http://mvcnet.files.wordpress.com/2010/11/dibujo151.jpg"><img class="alignnone size-full wp-image-138" title="Dibujo15" src="http://mvcnet.files.wordpress.com/2010/11/dibujo151.jpg?w=480&#038;h=95" alt="" width="480" height="95" /></a></p>
<p>Y en si la funcion Button1_Click es el delegado</p>
<p><a href="http://mvcnet.files.wordpress.com/2010/11/dibujo161.jpg"><img class="alignnone size-full wp-image-139" title="Dibujo16" src="http://mvcnet.files.wordpress.com/2010/11/dibujo161.jpg?w=480&#038;h=95" alt="" width="480" height="95" /></a></p>
<p>Es en esta funcion donde se hace la acción del boton, p.ej: añadir a una arrayList el valor del TextBox</p>
<p><a href="http://mvcnet.files.wordpress.com/2010/11/dibujo171.jpg"><img class="alignnone size-full wp-image-140" title="Dibujo17" src="http://mvcnet.files.wordpress.com/2010/11/dibujo171.jpg?w=480&#038;h=60" alt="" width="480" height="60" /></a></p>
<p><em><strong>Hasta aqui la primera manera de hacer un evento, ahora viene la segunda manera</strong></em>:</p>
<p>Añadimos un boton nuevo en pestaña Toolbox(izquierda) -&gt; Common Controls -&gt; Doble click en Button:</p>
<p><a href="http://mvcnet.files.wordpress.com/2010/11/dibujo181.jpg"><img class="alignnone size-full wp-image-141" title="Dibujo18" src="http://mvcnet.files.wordpress.com/2010/11/dibujo181.jpg?w=325&#038;h=184" alt="" width="325" height="184" /></a></p>
<p>Arrastramos el nuevo boton hacia abajo un poco para que no este montado encima del anterior</p>
<p><a href="http://mvcnet.files.wordpress.com/2010/11/dibujo19.jpg"><img class="alignnone size-full wp-image-142" title="Dibujo19" src="http://mvcnet.files.wordpress.com/2010/11/dibujo19.jpg?w=315&#038;h=162" alt="" width="315" height="162" /></a></p>
<p>Ahora hacemos doble click sobre el centro del formulario</p>
<p><a href="http://mvcnet.files.wordpress.com/2010/11/dibujo20.jpg"><img class="alignnone size-full wp-image-143" title="Dibujo20" src="http://mvcnet.files.wordpress.com/2010/11/dibujo20.jpg?w=319&#038;h=315" alt="" width="319" height="315" /></a></p>
<p>Nos abrira de nuevo el codigo fuente Form1.vb y nos añade la funcion Form1_load</p>
<p><a href="http://mvcnet.files.wordpress.com/2010/11/dibujo211.jpg"><img class="alignnone size-full wp-image-144" title="Dibujo21" src="http://mvcnet.files.wordpress.com/2010/11/dibujo211.jpg?w=480&#038;h=120" alt="" width="480" height="120" /></a></p>
<p>Aqui ponemos la segunda manera de colocar un evento, con  la linea <strong>AddHandler Button2.Click, AddressOf Delegado_Boton2_Propio</strong></p>
<p>Tambien necesitaremos un metodo delegado nuevo, en este caso <strong>Delegado_Boton2_Propio.</strong></p>
<p><a href="http://mvcnet.files.wordpress.com/2010/11/dibujo22.jpg"><img class="alignnone size-full wp-image-123" title="Dibujo22" src="http://mvcnet.files.wordpress.com/2010/11/dibujo22.jpg?w=480&#038;h=160" alt="" width="480" height="160" /></a></p>
<p>Con la linea del addHandler (de la función AddHandler) y el metodo delegado tenemos otra manera de vincular un evento a un boton, que funciona igual de bien que la primera opción.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/mvcnet.wordpress.com/105/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/mvcnet.wordpress.com/105/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/mvcnet.wordpress.com/105/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/mvcnet.wordpress.com/105/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/mvcnet.wordpress.com/105/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/mvcnet.wordpress.com/105/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/mvcnet.wordpress.com/105/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/mvcnet.wordpress.com/105/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/mvcnet.wordpress.com/105/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/mvcnet.wordpress.com/105/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/mvcnet.wordpress.com/105/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/mvcnet.wordpress.com/105/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/mvcnet.wordpress.com/105/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/mvcnet.wordpress.com/105/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=mvcnet.wordpress.com&amp;blog=10268854&amp;post=105&amp;subd=mvcnet&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://mvcnet.wordpress.com/2010/11/03/manejando-eventos-desde-cero/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/8743f83a793244223163f033c1fb5c26?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">mvcnet</media:title>
		</media:content>

		<media:content url="http://mvcnet.files.wordpress.com/2010/11/dibujo18.jpg" medium="image">
			<media:title type="html">Dibujo1</media:title>
		</media:content>

		<media:content url="http://mvcnet.files.wordpress.com/2010/11/dibujo21.jpg" medium="image">
			<media:title type="html">Dibujo2</media:title>
		</media:content>

		<media:content url="http://mvcnet.files.wordpress.com/2010/11/dibujo31.jpg" medium="image">
			<media:title type="html">Dibujo3</media:title>
		</media:content>

		<media:content url="http://mvcnet.files.wordpress.com/2010/11/dibujo41.jpg" medium="image">
			<media:title type="html">Dibujo4</media:title>
		</media:content>

		<media:content url="http://mvcnet.files.wordpress.com/2010/11/dibujo51.jpg" medium="image">
			<media:title type="html">Dibujo5</media:title>
		</media:content>

		<media:content url="http://mvcnet.files.wordpress.com/2010/11/dibujo61.jpg" medium="image">
			<media:title type="html">Dibujo6</media:title>
		</media:content>

		<media:content url="http://mvcnet.files.wordpress.com/2010/11/dibujo71.jpg" medium="image">
			<media:title type="html">Dibujo7</media:title>
		</media:content>

		<media:content url="http://mvcnet.files.wordpress.com/2010/11/dibujo81.jpg" medium="image">
			<media:title type="html">Dibujo8</media:title>
		</media:content>

		<media:content url="http://mvcnet.files.wordpress.com/2010/11/dibujo91.jpg" medium="image">
			<media:title type="html">Dibujo9</media:title>
		</media:content>

		<media:content url="http://mvcnet.files.wordpress.com/2010/11/dibujo101.jpg" medium="image">
			<media:title type="html">Dibujo10</media:title>
		</media:content>

		<media:content url="http://mvcnet.files.wordpress.com/2010/11/dibujo111.jpg" medium="image">
			<media:title type="html">Dibujo11</media:title>
		</media:content>

		<media:content url="http://mvcnet.files.wordpress.com/2010/11/dibujo121.jpg" medium="image">
			<media:title type="html">Dibujo12</media:title>
		</media:content>

		<media:content url="http://mvcnet.files.wordpress.com/2010/11/dibujo131.jpg" medium="image">
			<media:title type="html">Dibujo13</media:title>
		</media:content>

		<media:content url="http://mvcnet.files.wordpress.com/2010/11/dibujo141.jpg" medium="image">
			<media:title type="html">Dibujo14</media:title>
		</media:content>

		<media:content url="http://mvcnet.files.wordpress.com/2010/11/dibujo151.jpg" medium="image">
			<media:title type="html">Dibujo15</media:title>
		</media:content>

		<media:content url="http://mvcnet.files.wordpress.com/2010/11/dibujo161.jpg" medium="image">
			<media:title type="html">Dibujo16</media:title>
		</media:content>

		<media:content url="http://mvcnet.files.wordpress.com/2010/11/dibujo171.jpg" medium="image">
			<media:title type="html">Dibujo17</media:title>
		</media:content>

		<media:content url="http://mvcnet.files.wordpress.com/2010/11/dibujo181.jpg" medium="image">
			<media:title type="html">Dibujo18</media:title>
		</media:content>

		<media:content url="http://mvcnet.files.wordpress.com/2010/11/dibujo19.jpg" medium="image">
			<media:title type="html">Dibujo19</media:title>
		</media:content>

		<media:content url="http://mvcnet.files.wordpress.com/2010/11/dibujo20.jpg" medium="image">
			<media:title type="html">Dibujo20</media:title>
		</media:content>

		<media:content url="http://mvcnet.files.wordpress.com/2010/11/dibujo211.jpg" medium="image">
			<media:title type="html">Dibujo21</media:title>
		</media:content>

		<media:content url="http://mvcnet.files.wordpress.com/2010/11/dibujo22.jpg" medium="image">
			<media:title type="html">Dibujo22</media:title>
		</media:content>
	</item>
	</channel>
</rss>
