Mostrando las entradas con la etiqueta C#. Mostrar todas las entradas
Mostrando las entradas con la etiqueta C#. Mostrar todas las entradas
miércoles, abril 13, 2016
martes, abril 12, 2011
Desarrollar para WPhone 7, Android and iOS es ahora fácil
Ahora con Mono es fácil desarrollar aplicaciones para distintos dispositivos. A continuación un link con una serie de tutoriales:
También otro buen link con varios tutoriales para desarrollar en WPone7:
App Hub - jesse liberty's "windows phone from scratch" tutorials
jueves, agosto 19, 2010
Windows Phone 7 videos
Me encontré en en Channel 9 con una linda lista de videos para aprender a desarrollar aplicación o juegos para Windows phone 7. A continuación la Lista:
Session 1: IntroductionSession 2: Building a Silverlight Application, Part 1
Session 3: Building a Silverlight Application, Part 2
Session 4: Building Games for the Windows Phone 7 PlatformSession 5: Building XNA Games for the Windows Phone 7 Platform, Part 1
Session 6: Building XNA Games for the Windows Phone 7 Platform, Part 2
Session 7: Advanced Application Development, Part 1
Session 8: Advanced Application Development, Part 2
Session 9: Advanced Application Development, Part 3
Session 10: Marketing Your Windows Phone 7 Application
Session 11: Working with Media
Session 12: Final Silverlight Topics and Wrap-Up
Session 1: IntroductionSession 2: Building a Silverlight Application, Part 1
Session 3: Building a Silverlight Application, Part 2
Session 4: Building Games for the Windows Phone 7 PlatformSession 5: Building XNA Games for the Windows Phone 7 Platform, Part 1
Session 6: Building XNA Games for the Windows Phone 7 Platform, Part 2
Session 7: Advanced Application Development, Part 1
Session 8: Advanced Application Development, Part 2
Session 9: Advanced Application Development, Part 3
Session 10: Marketing Your Windows Phone 7 Application
Session 11: Working with Media
Session 12: Final Silverlight Topics and Wrap-Up
miércoles, enero 13, 2010
Microsoft Application Architecture Guide
Esta guía esta muy buena para tener en cuenta a la hora de desarrollar cualquier aplicación grande para empresas, y también cualquier programita.
The guide helps you to:
- Understand the underlying architecture and design principles and patterns for developing successful solutions on the Microsoft platform and the .NET Framework.
- Identify appropriate strategies and design patterns that will help you design your solution's layers, components, and services.
- Identify and address the key engineering decision points for your solution.
- Identify and address the key quality attributes and crosscutting concerns for your solution.
- Create a candidate baseline architecture for your solution.
- Choose the right technologies for your solution.
- Identify patterns & practices solution assets and further guidance that will help you to implement your solution.

lunes, septiembre 07, 2009
12 Tips To Speed-up Your Windows Forms Applications
Recommendations on how to speed up your Windows Forms applications:
- Reduce modules loaded by your application to increase start-up time. Remove all references from your project that are not used. Click here to read MSDN article on that on other techniques.
- Pre-compile your assemblies using NGEN when appropriate to decrease start-up time. Click here to read my short post with guidelines on when to consider doing this.
- Use native C++ Splash Screen that shows up immediately when your application is started. This will make your application appear to load faster. Click here to read and download C++ project with native splash screen. Native splash screens have such small memory footprint that they appear immediately.
- Don’t set BackColor=Transparent on your controls. Transparent color support in Windows Forms is terribly inefficient since it is not real transparency. Whenever you set BackColor=Transparent you incur additional Paint call on the parent control. As part of child control rendering, child control will first direct parent control to paint itself on it then child control will paint over that so it appears it is transparent. And this is repeated for every single control that has transparent background. Couple that with the next point and you have real slow-down.
- Reduce usage of gradients. Gradients whether linear or radial especially on large surfaces of screen are slow. I know they look good, but use solid colors whenever possible and you will see much better rendering performance. Especially on large panels.
- Reduce code in Form Load event. Use BackgroundWorker to offload work onto the different thread so your UI can load faster and feel snappier while you do other work.
- Delay Control Creation. Creating and populating controls takes lot of time, so if you can, delay it or do it on demand. For example, you can avoid creating controls on all pages of Tab Control right away and do so in either Appllication.Idle event or when that tab is selected from SelectedTabChanged event.
- Set DataSource last. When using data-binding set DataSource property last. If you set it before you set ValueMember or DisplayMemeber properties for bound controls, the data source will be re-queried to populate control each time these properties are set.
- Use SuspendLayout and ResumeLayout on parent controls and form to optimize layout changes. Bounds, Size, Location, Visible, and Text for AutoSize controls causes the layout changes. Note that you should call these methods when performing multiple layout changes and always on parent control of the controls that you are changing layout for.
- Use BeginUpdate and EndUpdate when adding multiple items to trees, grids and other controls that support this.
- Call Dispose() method on your forms once you are done with them. Most of the time developers forget to call Dispose() method on form they’ve shown using ShowDialog(). Make sure you always dispose your forms and controls to free up memory. Use handy using statement.
- Dispose() your graphic resources. If you are performing any custom drawing make sure you explicitly dispose your Pen, Brush, Image and other graphic resources once you are done with them. Using statement is good for this as well
Source: DevComponets
martes, junio 23, 2009
Controles Touch para compact framework y MS Sync Framework
Lindos controles en .Net Compact Framework
Demo:
mirabyte Touch Controls 1.0 for .NETCF - Exclusive Preview
Demo:
mirabyte Touch Controls 1.0 for .NETCF - Exclusive Preview
- SyncComm es un proyecto de puntapié inicial, para aprender a usar Sync Services for ADO.NET 1.0 con WCF.
viernes, febrero 20, 2009
Pros y Contras de Linq
Dejo el link a una muy interesante nota sobre Link. Donde el flaco habla de varios pros y contras de Link. La nota tiene links para muchos tips para Linq, y también para muchas contras de Linq. Finalmente la nota termina recomendando la generación de tus objetos (ORM) con PLINQO (Professional LINQ to Objects). Que es un template para CodeSmith.
Nota: Does LINQ StinQ? Not with PLINQO!
Nota: Does LINQ StinQ? Not with PLINQO!
jueves, agosto 07, 2008
Aprendiendo Silverlight 2
Mike Taulty hizo 44 screencast para aprender facilmente a usar Silverlight 2 con VS 2008. Link: http://channel9.msdn.com/posts/Dan/Mike-Taulty-44-Silverlight-20-Screencasts/
viernes, junio 20, 2008
Navegando el FileSystem desde Desktop a traves de RAPI
A continuación dejo un codigo para poder tomar los directorios y archivos de un dispositivo con WINCE desde una aplicación desktop, por medio de la RAPI.
[Flags]
enum FAF:int
{
FAF_ATTRIBUTES = 0x01,
FAF_CREATION_TIME = 0x02,
FAF_LASTACCESS_TIME = 0x04,
FAF_LASTWRITE_TIME = 0x08,
FAF_SIZE_HIGH = 0x10,
FAF_SIZE_LOW = 0x20,
FAF_OID = 0x40,
FAF_NAME = 0x80,
//FAF_ATTRIB_CHILDREN = 0x80,
//FAF_ATTRIB_NO_HIDDEN = &H2000,
//FAF_FOLDERS_ONLY = &H4000,
//FAF_NO_HIDDEN_SYS_ROMMODULES = &H8000,
//FAF_GETTARGET = &H10000
}
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
class CE_FIND_DATA
{
int dwFileAttributes;
int ftCreationTimeLo, ftCreationTimeHi, ftLastAccessTimeLo, ftLastAccessTimeHi;
int ftLastWriteTimeLo, ftLastWriteTimeHi, nFileSizeLo, nFileSizeHi;
int dwOID;
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 260)]
string cFileName;
public override string ToString()
{
return cFileName;
}
}
public bool FindAllFiles(string szPath)
{
IntPtr pData;
int cData;
bool bresult;
Create a NEW ceFindData Structure
CeFindData[] myCeFindDataS = new CeFindData[1];
bresult = CeFindAllFiles(szPath, (int)FAF.FAF_ATTRIBUTES | (int)FAF.FAF_NAME, out cData, out pData);
if (bresult)
{
IntPtr p = pData;
for (int i=0; i< cData ;i++)
{
CE_FIND_DATA fd;
fd = (CE_FIND_DATA) Marshal.PtrToStructure(p, typeof(CE_FIND_DATA));
p = new IntPtr(p.ToInt32() + Marshal.SizeOf(typeof(CE_FIND_DATA)));
}
}
return bresult;
}
lunes, junio 09, 2008
30 días de .Net Compact Framework
Chris Craft en su blog, todos los días durante un mes, ira agregando una aplicacion escrita en .Net Compact Framework. Para demostrar que es facil escribir aplicaciones en NetCF. Hasta el momento ya creo las siguientes aplicaciones:
![]() | ![]() | ![]() | ![]() |
Minutes to Midnight Countdown | Bluetooth Manager | GPS Compass | Mileage Tracker |
![]() | ![]() | ![]() | ![]() |
Mobile Capture | Pocket PasswordGen | Mobile FX | What will be next? |
miércoles, junio 04, 2008
Generando una dll para Compact Framework con CodeDom
Un integrante de mi equipo de desarrollo ( Javier ), ayer logro descubrir que parametros había que ponerle a CompilerParameters, para que después el CSharpCodeProvider genere una dll de .Net Compact Framework.
A continuación dejo el código:
A continuación dejo el código:
using System;
using System.Text;
using Microsoft.CSharp;
using System.CodeDom.Compiler;
using Microsoft.Win32;
using System.IO;
using System.CodeDom;
public partial class CompactAssembly
{
public static void CreateTestDll()
{
StringBuilder sb = new StringBuilder("");
sb.Append("namespace CSCodeEvaler{ \n");
sb.Append("public class CSCodeEvaler{ \n");
sb.Append("public object EvalCode(){\n");
sb.Append("return 1; \n");
sb.Append("} \n");
sb.Append("} \n");
sb.Append("}\n");
CompactAssembly.CompileCompactAssembly(sb.ToString(), "CodeDomGenerated.dll");
}
public static bool CompileCompactAssembly(string codeToCompile, string outAssemblyName)
{
CodeDomProvider csp = new Microsoft.CSharp.CSharpCodeProvider();
CompilerParameters cp = new CompilerParameters();
cp.OutputAssembly = outAssemblyName;
cp.GenerateExecutable = false;
cp.GenerateInMemory = false;
cp.CompilerOptions = @"/noconfig /nostdlib";
cp.ReferencedAssemblies.Add(Path.Combine(@"C:\Program Files\Microsoft Visual Studio 8\SmartDevices\SDK\CompactFramework\2.0\v2.0\WindowsCE", "mscorlib.dll"));
CompilerResults cr = csp.CompileAssemblyFromSource(cp, codeToCompile);
return cr.Errors.Count == 0;
}
}
martes, abril 15, 2008
GET SQL Compact Version
En este post dejo un codigo que encontre para sacar la version del SQL Compact:
Fuente: http://blog.opennetcf.org/ctacke/PermaLink,guid,d839eeb7-2cb6-4842-a504-93d1bab0b0af.aspx
internal enum SSCEVersion
{
Unknown,
v3_1,
v3_5
}
internal static SSCEVersion GetDatabaseVersion(string path)
{
uint signature = 0;
using (FileStream stream = new FileStream(path, FileMode.Open))
{
using (BinaryReader reader = new BinaryReader(stream))
{
stream.Seek(16, SeekOrigin.Begin);
signature = reader.ReadUInt32();
}
}
switch (signature)
{
case 0x00357b9d: // 3.5
return SSCEVersion.v3_5;
case 0x002dd714: // 3.1
return SSCEVersion.v3_1;
default:
return SSCEVersion.Unknown;
}
}
Fuente: http://blog.opennetcf.org/ctacke/PermaLink,guid,d839eeb7-2cb6-4842-a504-93d1bab0b0af.aspx
Suscribirse a:
Entradas (Atom)