- rinocp.zip
- fr.c2s.rinocp_0.0.1_all.ipk
- makeWebOS.bat
- RinoAPI
- RinoAzureService
- RinoAzureService.ccproj
- RinoAzureService.ccproj.user
- ServiceConfiguration.cscfg
- ServiceDefinition.csdef
- RinoCP.sln
- RinoTray
- RinoWebOS
- RinoWebRole
|
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Rino;
namespace Rino.iphone
{
/// <summary>
/// Class to display notebooks from an user
/// </summary>
public partial class nbooks : System.Web.UI.Page
{
/// <summary>
/// Page load event
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void Page_Load(object sender, EventArgs e)
{
// Get user id
string userid = Request.QueryString["userid"];
if (userid == null)
{
home.AddItem("No user");
return;
}
// Load user
User user = AzureStorage.LoadUser(userid);
if (user == null)
{
home.AddItem("User don't exist");
return;
}
// For each notebook
foreach (NotebookHeader header in user.Notebooks)
{
// For the unclassified notes notebook: add the first section
if (header.Nickname == Notebook.UnfiledNotebookName)
{
// Load notebook
Notebook notebook = AzureStorage.LoadNotebook(header.ID);
if (notebook == null)
continue;
// Get section
Section section = notebook.Sections[0];
// Compute url
string surl = String.Format("section.aspx?notebookid={0}§ionid={1}", notebook.ID, section.ID);
// Add it to the list
home.AddItem(section.Name, section.Color, surl);
}
// For others notebook: add the notebook name
else
{
// Compute url for the notebook
string url = String.Format("nbook.aspx?notebookid={0}", header.ID);
// Add it to the list
home.AddItem(header.Nickname, header.Color, url);
}
}
}
}
}
|
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.
Lionel is a software architect at
C2S, a software company based in France and subsidiary of the Bouygues group.
Lionel is also the author of
Liogo, an open-source Logo compiler for .NET.
Lionel is a contributor of
DotNetGuru and
Dr.Dobb's Journal.
Lionel is President and co-founder of
OLPC France.