This project contains a demo client showing integration between Lightstreamer Windows Phone Client and the Windows Phone platform
C#
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
WP7StockListDemo
.gitattributes
.gitignore
LICENSE
README.md
screen_wp.png
screen_wp_large.png

README.md

Lightstreamer - Basic Stock-List Demo - Windows Phone Client

This project contains a demo client showing integration between Lightstreamer .NET PCL Client and the Windows Phone platform.

Live Demo

screenshot

View live demo

Details

This is a Windows Phone version of the Stock-List Demos.
This app uses the .NET PCL API for Lightstreamer, based on Silverlight, to handle the communications with Lightstreamer Server. A simple user interface is implemented to display the real-time data received from Lightstreamer Server.

In particular, this readme file details the steps required to execute the demo together with the Windows Phone emulator contained in Visual Studio.

Dig the Code

  • App.xaml.cs is the main application file, it contains application events handling code (application launching, closed, activated, etc.), Lightstreamer Client streaming controls (start, stop) and part of the auto-reconnection logic required when connection quality is weak.
  • MainPage.xaml.cs is the place where all the application widgets are handled. The application, in fact, consists in a simple table containing real-time (simulated) stock quotes, whose cells are kept up-to-date by implementing the ILightstreamerListener interface. Several lines in this file are dedicated to the animation code used for highlighting cells in case of real-time updates, you can ignore them altogether if you feel more comfortable.
  • LightstreamerClient.cs is a simple wrapper for LSClient public class (see Lightstreamer Silverlight API) and uses two listeners: StocklistConnectionListener.cs and StocklistHandyTableListener.cs, respectively implementing a Connection Status listener and a Real-Time Data Updates listener.

Check out the sources for further explanations.

NOTE: Not all the functionalities of the Lightstreamer Windows Phone Demo are exposed by the classes listed above. You can easily expand those functionalities using the Lightstreamer .NET PCL API as a reference.
If in trouble, check out the specific Lightstreamer forum.

Install

If you want to install a version of this demo pointing to your local Lightstreamer server, follow these steps:

  • Note that, as prerequisite, the Lightstreamer - Stock- List Demo - Java Adapter has to be deployed on your local Lightstreamer Server instance. Please check out that project and follow the installation instructions provided with it.
  • Launch Lightstreamer Server.
  • Download the deploy.zip file, which you can find in the deploy release of this project and extract the WPStockListDemo.xap file.
  • Deploy the WPStockListDemo.xap in your Windows Phone Emulator, please follow the instructions specific for your version.
  • Launch the Lightstreamer Demo app (please note that the demo tries to connect to http://localhost:8080).

Build

To build your own version of WPStockListDemo.xap, instead of using the one provided in the deploy.zip file from the Install section above, follow these steps:

  • To directly import the project as-is, you can use Microsoft Visual Studio 2015. You can download it from the Microsoft website. NOTE: You may also use the sources of the demo with another IDE or without any IDE but such an approach is not covered in this readme.
  • You may run the demo against your local server or using our online server at http://push.lightstreamer.com:80. The server to which the demo will connect to is configured in the App.xaml.cs file.
    • In the former case, note that, as prerequisite, the Lightstreamer - Stock- List Demo - Java Adapter has to be deployed on your local Lightstreamer Server instance. Please check out that project and follow the installation instructions provided with it.
  • You should complete this project with the Lightstreamer .NET PCL Client library, to be used for the build process, trough NuGet. Follow these steps:
    • In the "Solution Explorer" tab, right click on the project and choose Manage NuGet Packages ...
    • In the Search text box enter Lightstreamer
    • Choose Lightstreamer.DotNet.Client then click Install and then Ok
    • Check out that among the References of your project Lightstreamer_DotNet_PCL_Client was added.
  • You're now ready to import the project into Visual Studio, click on New Project->Windows Phone Application and import all the files located in this demo.
  • From Visual Studio, click on the WP7StockListDemo project in the Solution Explorer menu and press the "Run (debug)" button. The Windows Phone Emulator will be started and the application loaded.

See Also

Lightstreamer Adapters Needed by This Demo Client

Related Projects

Lightstreamer Compatibility Notes

  • Compatible with Lightstreamer .NET PCL Client Library version 3.0.0 or newer.
  • For Lightstreamer Allegro (+ Windows Phone Client API support), Presto, Vivace.