giovedì 19 dicembre 2013

[WP7 - WP8] Er Genius

Vi segnalo che è disponibile l'app Er Genius per la piattaforma Windows Phone.


Scegli una carta dal mazzo ed Er Genius la indovinerà...non ci credi? Prova

mercoledì 18 dicembre 2013

martedì 17 dicembre 2013

[WIN 8] Installare VMWare Player senza disinstallare Hyper-V

Ecco come installare VMWare Player su Win 8 senza dover disinstallare Hyper-V:

  1. Aprire il prompt dei comandi come amministratore: Start - Esegui - cmd (tasto destro Esegui come amministratore)
  2. Eseguire il seguente comando: bcdedit /set hypervisorlaunchtype off
  3. Riavviare il computer
  4. Installare VMWare Player
  5. Per riabilitare Hyper-V: ripetere il punto 1 ed eseguire il seguente comando: bcdedit /set hypervisorlaunchtype auto

sabato 14 dicembre 2013

Clonare un oggetto tramite reflection

Classe utility per clonare un oggetto tramite reflection.

public static object CloneObject(object objSource)
{
    //step : 1 Get the type of source object and create a new instance of that type
    Type typeSource = objSource.GetType();
    object objTarget = Activator.CreateInstance(typeSource);
 
    //Step2 : Get all the properties of source object type
    PropertyInfo[] propertyInfo = typeSource.GetProperties(BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Instance);
 
    //Step : 3 Assign all source property to taget object 's properties
    foreach (PropertyInfo property in propertyInfo)
    {
        //Check whether property can be written to
        if (property.CanWrite)
        {
            //Step : 4 check whether property type is value type, enum or string type
            if (property.PropertyType.IsValueType || property.PropertyType.IsEnum || property.PropertyType.Equals(typeof(System.String)))
            {
                property.SetValue(objTargetproperty.GetValue(objSourcenull), null);
            }
            //else property type is object/complex types, so need to recursively call this method until the end of the tree is reached
            else
            {
                object objPropertyValue = property.GetValue(objSourcenull);
                if (objPropertyValue == null)
                {
                    property.SetValue(objTargetnullnull);
                }
                else
                {
                    property.SetValue(objTargetCloneObject(objPropertyValue), null);
                }
            }
        }
    }
    return objTarget;
}

venerdì 6 dicembre 2013

[WP7 - WP8] Aggiornamento CarGest 1.0.0.4

Disponibile aggiornamento alla versione 1.0.0.4 per CarGest (Windows Phone).

  • Modifica rifornimento
  • Miglioramenti vari

domenica 1 dicembre 2013

[WP7] Programming Windows Phone 7 by Charles Petzold

Ebook gratuito rilasciato da Charles Petzold riguardante lo sviluppo di applicazioni per la piattaforma Windows Phone 7.