magbo system

Windows Phone App: LoL Assistant

LoL Assistant Icone
LoL Assistant

After 2 simple apps made to discover the Windows Phone development (Simple Ping & WindChill Calculator), I started a month and a half ago to code a tool for League of Legends in order to assists me during ranked games.

First of all, « What’s League Of Legends? » some of you may ask.

League Of Legends is a very popular game, published by RIOT, gathering more than 10 milions of players. Its ancestor is a game called DotA (actually a mod for WarCraft III)

You usually play it 5 versus 5 (one player handling only one unit: his hero). During a match, you can’t have any information on your mates or your ennemies (there’s no « /stats X » command or those kind of tools).

LoL Assistant allows you to fill your mates & opponents names, and the app will gather every useful stats you need to know (level, ranking, ranked Wins/losses, normal wins/losses, ratios..)  so you are:

  • Ready to own unskilled enemies. Focus them will give you the lead.
  • Careful versus strong enemies. You know you should play safe versus them, and gank them hard together.
  • Helpful with unskilled mates, don’t let them feed!
  • More aware of what good mates could say

Development:

After I coded 85% of the app, a friend of mine (http://www.who-is-ohw.com/) helped me getting a good design. I learnt quite a lot working with him, about how a team project can work out in a « friendly mood » without defining too much who is responsible of what precisely. Definitely not the same as my professional position!

Here you can see some screenshot of the app:

And here is the link to the marketplace page.

Give it a try and increase your rankings!

Windows Phone App: Simple Ping

I recently bought a Windows Phone device (the very well known Lumia 800. Thx Microsoft&Nokia for all the advertisement in the Paris’ metro)

The idea was to build some apps for the windows market before it gets overcrawded like the IOS & the Android one are.

For a start, I decided to build a very simple app, in order to publish and to have info on the process.

I noticed they were no simple app allowing a user to perform a ping on an Url or an IP and get the delay. That’s how Simple Ping was born!

Screen from the Windows Phone Emulator : Simple ping in action!

The logo is from my friend ohw (http://www.who-is-ohw.com)

Number of total downloads + ad related crashes after 3 weeks (yeah, so popular ;))

Ad provided by Microsoft adControl can sometimes bring some crashes (caught though), which make my dashboard looks like my app is not robust! I will work on a solution to avoid getting those useless reports during the next developments.

More Infos:

Link to the app on the Windows Market

Exchange Web Service (EWS) et Powershell : exemple de script

Bonjour,

Aujourd’hui je vous présente un exemple de code Powershell utilisant les types et fonctionnalités de l’Exchange Web Service Managed API (EWS API 1.1)

Le script suivant permet de parcourir un dossier d’email en particulier. Il check si les éléments possèdent un ID personnalisé (qui est une propriété étendue). Dans le cas contraire, il en affecte une (génération d’un GUID)

Voici le code:

$usertoQuery = "EMAILADDRESS"
 
$dllpath = "XXX\Microsoft.Exchange.WebServices.dll"
[void][Reflection.Assembly]::LoadFile($dllpath)
 
$service = New-Object Microsoft.Exchange.WebServices.Data.ExchangeService([Microsoft.Exchange.WebServices.Data.ExchangeVersion]::Exchange2010_SP1)
 
$service.Credentials = new-object Microsoft.Exchange.WebServices.Data.WebCredentials("LOGIN","PWD","DOMAIN")
$service.Url = new-object Uri("http://URL/EWS/Exchange.asmx");
 
$svFldid = new-object Microsoft.Exchange.WebServices.Data.FolderId([Microsoft.Exchange.WebServices.Data.WellKnownFolderName]::SearchFolders,$MailboxName)
$delFldid = [Microsoft.Exchange.WebServices.Data.DeleteMode]::HardDelete
 
$fvFolderView = new-object Microsoft.Exchange.WebServices.Data.FolderView(1000)
 
$folders = $service.findfolders($svFldid,$fvFolderView)
$ExtendedProp = new-object Microsoft.Exchange.WebServices.Data.ExtendedPropertyDefinition([Microsoft.Exchange.WebServices.Data.DefaultExtendedPropertySet]::PublicStrings, "MyCustomID", [Microsoft.Exchange.WebServices.Data.MapiPropertyType]::String)
$ExtendedProp
$Propset = new-object Microsoft.Exchange.WebServices.Data.PropertySet([Microsoft.Exchange.WebServices.Data.BasePropertySet]::FirstClassProperties, $ExtendedProp)
 
foreach ($folder in $folders)
{
    if ($folder.displayName -eq "FOLDERNAME_I_WANT_TO_CHECK")
    {
		"We are in the correct folder"
         $fvItemView = new-object Microsoft.Exchange.WebServices.Data.ItemView(10000)
 
		 $items = $service.FindItems($folder.Id,$fvItemView)	
		 #Don't show any result for the next line
		 $service.LoadPropertiesForItems($items, $Propset)
		 foreach ($item in $items)
		 {
			"**Subject** : " 
			$item.Subject
			"**Number of Extended Properties**: " 
			$item.ExtendedProperties.Count		
 
			$a = 0
 
			foreach ($extendedProperty in $item.ExtendedProperties)
			{
				if ($extendedProperty.PropertyDefinition.Name -eq $ExtendedProp.Name)
				{					
					$a = 1
					"Break (Value = " + $extendedProperty.Value + ")"
					break;						
				}		
			}
 
			if ($a -eq 0)
			{			
				$g1 = [Guid]::NewGuid()
				$item.SetExtendedProperty($ExtendedProp, $g1.ToString())
				"Guid = " + $g1
				"ValueGuid added!"
				$item.Update([Microsoft.Exchange.WebServices.Data.ConflictResolutionMode]::AlwaysOverwrite)
				"Item saved"
			}
		 }	 
    }
}

Et voila une base pour maitriser (un peu) la sémantique Powershell et manipuler l’api EWS d’une autre façon!

Création d’un Add-in Outlook 2010 – VSTO – Visual Studio C#

Bonjour,

Après avoir vu en détail la programmation via l’API Exchange Web Service, je vais introduire la technologie Addin d’Office, particulièrement pour Outlook (autant continuer sur cette voie ;)) avec les VSTO (Visual studio Tools for Office)

Première étape: Création du projet

A la création du projet, vous devriez avoir les 2 méthodes suivantes de créées:

    public partial class ThisAddIn
    {
        private void ThisAddIn_Startup(object sender, System.EventArgs e)
        {
        }
 
        private void ThisAddIn_Shutdown(object sender, System.EventArgs e)
        {
        }
}

qui vous permettront d’avoir un accès à votre code au chargement de l’addin et à sa fermeture.

Pour ajouter une fenêtre, ajouter un nouvel élément à votre projet et sélectionner zone de formulaire Outlook comme ci dessous: (il est possible de customiser le ruban aussi, assez simplement)

Sélectionnez le type de formulaire que vous souhaitez créer et sa position relative à l’existant:

Ici spécifiez pour quel sous élément votre composant s’affichera, ici il s’affichera dans la fenêtre de visualisation des emails:

Voila, vous pouvez désormais customiser (un peu) votre Outlook 2010!

Microsoft Exchange – EWS: Propriétés personnalisées – Création

Bonjour,

Aujourd’hui, cap sur les propriétés personnalisées avec Exchange Web Service API:

Au delà des propriétés « basiques » telles que Subject, Body, From (…) il est possible d’avoir des propriétés personnalisées sur chaque « ServiceObject ».
EmailMessage étant un ServiceObject, à l’instar de Folder ou encore de Contact, voyons comment jouer avec ces propriétés personnalisées (ou « étendues« ):

ExtendedPropertyDefinition extendedPropertyDefinition = new ExtendedPropertyDefinition(DefaultExtendedPropertySet.PublicStrings, "Name Of my property", MapiPropertyType.String);
 
MyMessage.SetExtendedProperty(extendedPropertyDefinition, "ValueOf my property");

La propriété personnalisée peut avoir différents types : string, integer, booleen, date.. (énuméré dans MapiPropertyType)

Pour sauver les modifications apportées (si toutefois c’est un élément récupéré et non une création), utilisez la méthode suivante :

MyMessage.Update(ConflictResolutionMode.AlwaysOverwrite);

Dans le cas d’un Dossier, c’est la même méthode mais sans paramètre qui sera appelée.

Pour récupérer les valeurs des propriétés personnalisées, ou encore plus complexe: récupérer toutes les propriétés d’un email, je vous suggère l’article suivant