Every CF developer knows and uses the “Copy if newer” option from time to time, when deploying on Compact Framework. This way the deployment is a little bit faster. Since I tried to do some C# OpenGL ES stuff on my HTC Touch Diamon as a private project, I came across a real annoying bug. Visual Studio 2008 shows an error during deployment of the:

libGLES_CM.dll (I placed it as a “Content” file inside the project)

The funny thing is the error varies from one deployment to another, top error messages are:

“An operation was attempted on something that is not a socket.”

“Connection has been closed gracefully”

“Connection forcibly closed by remote host”

No search brought a solution to this bug, till after some “testing” (I used my DPD = drinking/programming/drinking method again ;) ).
If you switch from “Copy if newer” to “Copy always” the errors are gone.

AMUSE provides now the functionallity to use Embedded Devices based on Compact Framework using HTTP communication between the simulation in Enterprise Architect and the state machine on an Embedded Device.

I will describe it based on a Windows Mobile 6 and “Sending a Message” example.

StateMachine

(weiterlesen…)

Introduction
The goal of this entry is to show how a flight booking process with different web services  and a mock-up GUI can  be simulated and verified with AMUSE. The focus is on the orchestration of the web services, which are part of the flight booking process.  In a next step it would be interesting to generate BEPEL out this state machine.

(weiterlesen…)

How to find out, if your app is running in an emulator, or on a real device?

In July’s beta, Microsoft has moved this property from System.Environment to Microsoft.Devices.Environment namespace.

//enum DeviceType contains: Device, Emulator
this.IsEmulator = (Microsoft.Devices.Environment.DeviceType == DeviceType.Emulator);

Today I want to show how we can use “Enterprise Architect” and the LieberLieber “Amuse” Plug-In to integrate “ASP.NET Mvc Web Application” into a flowchart.

Here you can see the final solution.

To download the video click here.

If you haven’t seen my previous posts please check out “LieberLieber AMUSE – Using Statemachines to Build Winforms flows” and “LieberLieber AMUSE – Using Statemachines and ASP.NET WebServices”.

Ok, first of all have a look at the Asp.net Mvc Solution.

clip_image001

As you can see I added an AuthenticationController (provides the controller methods), AuthenticationService (provides the authentication logic) and AuthenticationViewModel (provides the view model for the web form) to the solution.

(weiterlesen…)

Fulltext Search On XML Files using XDocument
Given the following XML-Document:
<Customers>
<Customer>
 <Name>Jerry</Name>
 <Age>26</26>
 <Addresses>
<Address>
<Street>Main Street</Street>
<Address>
<Addresses>
<Customers>
1) How would you implement a fulltext search to return a List of Customer-Names?
public void StartRead(string searchTerm)
{
XDocument xDocument = XDocument.Parse(GetFile());
//get all retval-nodes (allthough it’s just 1)
var customers = from cmd in xDocument.Descendants(“Customer”)
select cmd;
//loop through retval-nodes (still only 1)
foreach (XElement cust in customers)
{
if (RecursiveParser(cust, searchTerm))
{
this.textBox1.Text += cust.Element(“Name”).Value + @” ### “;
}
else
{
this.textBox1.Text += @”empty ### “;
}
}
}
public bool RecursiveParser(XElement element, string searchTerm)
{
if (element.IsEmpty) return false;
if (element.HasElements)
{
foreach (XElement xElement in element.Elements())
{
if (xElement.Value.ToLower().Contains(searchTerm))
return true;
if (RecursiveParser(xElement, searchTerm))
return true;
}
}
return false;
}
2. How would you implement a fulltext search for addresses only?
Just replace “Customer” by “Address”:
//get all retval-nodes (allthough it’s just 1)
var customers = from cmd in xDocument.Descendants(“Address”)
select cmd;

Given the following XML-Document (it’s the output of a serialized List<Customer>):

<ArrayOfCustomer>
<Customer>
<Name>Jerry</Name>
<Age>26</Age>
<Addresses>
<Address>
<Street>Main Street</Street>
</Address>
</Addresses>
</Customer>
</ArrayOfCustomer>

1) How would you implement a fulltext search to return a List of Customer-Names?

(weiterlesen…)

image 

Windows Marketplace for Mobile: Anwendungen anzeigen

Es ist doch immer wieder erfreulich zu sehen, dass unsere gute, alte “Spin-the-Bottle” App immer noch zu den beliebtesten Apps für Windows Phone gehört !

In diesem Sinne …. viel Spass im Urlaub – egal ob beim Flaschendrehen oder Mäxchen spielen!

… und an den nächsten Games für Windows Phone7 und MS Surface arbeiten wir schon ;-)