Click here to Skip to main content
15,886,731 members
Articles / Mobile Apps / Windows Phone 7

Weekly Thai Recipe! for Windows Phone

Rate me:
Please Sign up or sign in to vote.
4.92/5 (37 votes)
6 Jul 2012CPOL12 min read 78.9K   1.8K   82  
A complete WP7 application with a central management website (ASP.NET MVC4) for recipe management and push notifications
@model WeeklyThaiRecipeManagement.ViewModel.ManagementViewModel
@{
    ViewBag.Title = "Index";
}
@section bottom_scripts
{
    @Content.Script("phone.management.js", Url)
    
    <script type="text/javascript">

        $(document).ready(function () {

            var errorHandler = new generalErrorHandler();
            errorHandler.initialize();

            var toast = new toastInitializer();
            toast.initialize('@Url.Action("Send", "api/Toast")');

            var tile = new tileInitializer();
            tile.initialize('@Url.Action("Send", "api/Tile")');

            var recipe = new recipeSaver();
            recipe.initalize('@Url.Action("Save", "api/Recipe")');

        });

    </script>

}
<header>
        <div class="content-wrapper">       
            <div class="float-left">
                <p class="site-title"><a href="/">Weekly Thai Recipe Management</a></p>
            </div>
        </div>
    </header>
<div id="body">
    <section class="featured">
        <div class="content-wrapper">
            <hgroup class="title">
                <h2>Management of connected Phones</h2>
            </hgroup>
            <p>Send Toast and Tile notification to the subscribed windows phones.
            </p>
            <p>Currently there are @Model.NumberOfPhonesRegistered phones registered to receive toast and tile notifications.</p>
        </div>
    </section>
        <section class="content-wrapper main-content clear-fix">
            <h3>Send a toast to the connected phones</h3>
            <div>
                <div>Toast title:</div>
                <div>@Html.TextBoxFor(m => m.ToastTitle, new { @id="toastTitle"})</div>
                <div>Toast message:</div>
                <div>@Html.TextBoxFor(m => m.ToastMessage, new { @id="toastMessage"})</div>
                <button id="sendToastButton">Send Toast</button>
            </div>
           
            <h3>Send a tile to the connected phones</h3>
            <div>
                <div>Front title:</div>
                <div>@Html.TextBoxFor(m => m.FrontTitle, new { @id="frontTitle"})</div>
                <div>Number to show:</div>
                <div>@Html.TextBoxFor(m => m.NumberToShow, new { @id="numberToShow"})</div>
                <div>Front image:</div>
                <div>@Html.TextBoxFor(m => m.FrontImageLocation, new { @id="frontImageLocation"})</div>
                <div>Back title:</div>
                <div>@Html.TextBoxFor(m => m.BackTitle, new { @id="backTitle"})</div>
                <div>Back image:</div>
                <div>@Html.TextBoxFor(m => m.BackImageLocation, new { @id="backImageLocation"})</div>
                <div>Back content:</div>
                <div>@Html.TextBoxFor(m => m.BackContent, new { @id="backContent"})</div>
                <button id="sendTileButton">Send Tile</button>
            </div>

            <h3>Store a new recipe</h3>
            <div>
                <div>Recipe XML:</div>
                <div>
                    <textarea  id="recipeXml" cols="80" rows="10" ></textarea>
                </div>
                <button id="saveRecipeButton">Store Recipe</button>
            </div>
        </section>    

</div>

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Architect http://www.simpletechture.nl
Netherlands Netherlands
Patrick Kalkman is a senior Software Architect with more than 20 years professional development experience. He works for SimpleTechture where he helps teams develop state of the art web applications.

Patrick enjoys writing his blog. It discusses agile software development. Patrick can be reached at patrick@simpletechture.nl.

Published Windows 8 apps:


Published Windows Phone apps:


Awards:

Best Mobile article of March 2012
Best Mobile article of June 2012

Comments and Discussions