[gbrainy] Update web client
- From: Jordi Mas <jmas src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gbrainy] Update web client
- Date: Sat, 29 Jan 2011 13:41:04 +0000 (UTC)
commit 94e0938c95463f47cfb77c0b584191208180156f
Author: Jordi Mas <jmas softcatala org>
Date: Sat Jan 29 14:42:38 2011 +0100
Update web client
gbrainy.sln | 10 ++-
src/Clients/WebForms/Default.aspx | 4 +
src/Clients/WebForms/Default.aspx.cs | 51 +++++++++++-
src/Clients/WebForms/Default.aspx.designer.cs | 24 +++---
src/Clients/WebForms/Download.aspx | 14 +++
.../WebForms/{Finish.aspx.cs => Download.aspx.cs} | 14 +---
....aspx.designer.cs => Download.aspx.designer.cs} | 16 ++--
src/Clients/WebForms/Finish.aspx | 9 --
src/Clients/WebForms/Game.aspx | 57 ++++++++++++--
src/Clients/WebForms/Game.aspx.cs | 85 ++++++++++++++++----
src/Clients/WebForms/Game.aspx.designer.cs | 32 ++++----
src/Clients/WebForms/LanguageSupport.cs | 2 +-
src/Clients/WebForms/MasterPage.master | 5 +-
src/Clients/WebForms/MasterPage.master.cs | 36 +--------
src/Clients/WebForms/MasterPage.master.designer.cs | 12 +--
src/Clients/WebForms/Status.aspx.designer.cs | 22 +++---
src/Clients/WebForms/WebForms.csproj | 41 +++++-----
src/Clients/WebForms/styles.css | 1 -
18 files changed, 273 insertions(+), 162 deletions(-)
---
diff --git a/gbrainy.sln b/gbrainy.sln
index 370966b..76fc3c1 100644
--- a/gbrainy.sln
+++ b/gbrainy.sln
@@ -1,4 +1,4 @@
-
+
Microsoft Visual Studio Solution File, Format Version 9.00
# Visual Studio 2005
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "gbrainy", "gbrainy.csproj", "{A5DF4079-EF3D-43F8-A36E-EB47058631A7}"
@@ -7,12 +7,18 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Core", "src\Core\Core.cspro
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Games", "src\Games\Games.csproj", "{84A80D6F-DB4D-4989-B441-D410D2260775}"
EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WebForms", "src\Clients\WebForms\WebForms.csproj", "{6F788C5C-17C2-47BC-82C8-2D318D91CB76}"
+EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {6F788C5C-17C2-47BC-82C8-2D318D91CB76}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {6F788C5C-17C2-47BC-82C8-2D318D91CB76}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {6F788C5C-17C2-47BC-82C8-2D318D91CB76}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {6F788C5C-17C2-47BC-82C8-2D318D91CB76}.Release|Any CPU.Build.0 = Release|Any CPU
{84A80D6F-DB4D-4989-B441-D410D2260775}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{84A80D6F-DB4D-4989-B441-D410D2260775}.Debug|Any CPU.Build.0 = Debug|Any CPU
{84A80D6F-DB4D-4989-B441-D410D2260775}.Release|Any CPU.ActiveCfg = Release|Any CPU
@@ -27,7 +33,7 @@ Global
{A5DF4079-EF3D-43F8-A36E-EB47058631A7}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(MonoDevelopProperties) = preSolution
- StartupItem = gbrainy.csproj
+ StartupItem = src\Clients\WebForms\WebForms.csproj
Policies = $0
$0.TextStylePolicy = $1
$1.inheritsSet = null
diff --git a/src/Clients/WebForms/Default.aspx b/src/Clients/WebForms/Default.aspx
index 6867ceb..d7953db 100644
--- a/src/Clients/WebForms/Default.aspx
+++ b/src/Clients/WebForms/Default.aspx
@@ -56,5 +56,9 @@
<br/>
<br/>
<asp:Button id="start_button" Text="Start game!" OnClick="OnStartGame" runat="server"/>
+
+ <asp:DropDownList id = "languages_drop" AutoPostBack="True" ViewStateMode="Enabled"
+ onselectedindexchanged="OnSelectedIndexChanged" runat="server">
+ </asp:DropDownList>
</asp:content>
diff --git a/src/Clients/WebForms/Default.aspx.cs b/src/Clients/WebForms/Default.aspx.cs
index 99c3e84..e9e0779 100644
--- a/src/Clients/WebForms/Default.aspx.cs
+++ b/src/Clients/WebForms/Default.aspx.cs
@@ -20,26 +20,67 @@
using System;
using System.Web;
using System.Web.UI;
+using System.Web.UI.WebControls;
namespace WebForms
{
public partial class Default : System.Web.UI.Page
{
WebSession web_session;
+ const string CookieName = "Lang";
void Page_Load (object o, EventArgs e)
{
+ Logger.Debug ("Default.Page_Load. IsPostBack {0}", IsPostBack);
+
+ if (IsPostBack == true)
+ return;
+
web_session = Global.Sessions [Session.SessionID];
- intro_label.Text = LanguageSupport.GetString (web_session, "gbrainy is a brain teaser game and trainer to have fun and to keep your brain trained. It includes:");
- logic_label.Text = LanguageSupport.GetString (web_session, "Logic puzzles. Challenge your reasoning and thinking skills.");
- calculation_label.Text = LanguageSupport.GetString (web_session,"Mental calculation. Arithmetical operations that test your mental calculation abilities.");
- memory_label.Text = LanguageSupport.GetString (web_session, "Memory trainers. To prove your short term memory.");
- verbal_label.Text = LanguageSupport.GetString (web_session, "Verbal analogies. Challenge your verbal aptitude.");
+ intro_label.Text = "gbrainy is a brain teaser game and trainer to have fun and to keep your brain trained. It includes:";
+ logic_label.Text = "Logic puzzles. Challenge your reasoning and thinking skills.";
+ calculation_label.Text = "Mental calculation. Arithmetical operations that test your mental calculation abilities.";
+ memory_label.Text = "Memory trainers. To prove your short term memory.";
+ verbal_label.Text = "Verbal analogies. Challenge your verbal aptitude.";
+
+ for (int i = 0; i <LanguageSupport.Languages.Length; i++)
+ {
+ languages_drop.Items.Add (new ListItem (LanguageSupport.Languages[i].Name,
+ i.ToString ()));
+ }
+
+ if (Request.Cookies [CookieName] != null)
+ languages_drop.SelectedValue = Request.Cookies[CookieName].Value;
+ else // Default language value
+ languages_drop.SelectedValue = "0";
+
+ Global.Sessions [Session.SessionID].LanguageIndex =
+ Int32.Parse (languages_drop.SelectedValue);
}
+
+ protected void OnSelectedIndexChanged (object sender, EventArgs e)
+ {
+ if (Response.Cookies[CookieName].Value == languages_drop.SelectedValue)
+ return;
+
+ Response.Cookies[CookieName].Value = languages_drop.SelectedValue;
+ Response.Cookies[CookieName].Expires = DateTime.Now.AddYears (1);
+ Logger.Debug ("MasterPage.OnSelectedIndexChanged. Set lang cookie to: {0}",
+ languages_drop.SelectedValue);
+
+ Global.Sessions [Session.SessionID].LanguageIndex =
+ Int32.Parse (languages_drop.SelectedValue);
+
+ ///Response.Redirect ("Default.aspx");
+
+ }
+
protected void OnStartGame (Object sender, EventArgs e)
{
+ web_session = Global.Sessions [Session.SessionID];
+ web_session.GameState = null;
Logger.Debug ("Default.OnStartGame. Start game button click");
Response.Redirect ("Game.aspx");
}
diff --git a/src/Clients/WebForms/Default.aspx.designer.cs b/src/Clients/WebForms/Default.aspx.designer.cs
index 8375722..09308ba 100644
--- a/src/Clients/WebForms/Default.aspx.designer.cs
+++ b/src/Clients/WebForms/Default.aspx.designer.cs
@@ -2,29 +2,31 @@
// <autogenerated>
// This code was generated by a tool.
// Mono Runtime Version: 2.0.50727.1433
-//
-// Changes to this file may cause incorrect behavior and will be lost if
+//
+// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </autogenerated>
// ------------------------------------------------------------------------------
namespace WebForms {
-
-
+
+
public partial class Default {
-
+
protected System.Web.UI.WebControls.Content main_content;
-
+
protected System.Web.UI.WebControls.Label intro_label;
-
+
protected System.Web.UI.WebControls.Label logic_label;
-
+
protected System.Web.UI.WebControls.Label calculation_label;
-
+
protected System.Web.UI.WebControls.Label memory_label;
-
+
protected System.Web.UI.WebControls.Label verbal_label;
-
+
protected System.Web.UI.WebControls.Button start_button;
+
+ protected System.Web.UI.WebControls.DropDownList languages_drop;
}
}
diff --git a/src/Clients/WebForms/Download.aspx b/src/Clients/WebForms/Download.aspx
new file mode 100644
index 0000000..bcdf745
--- /dev/null
+++ b/src/Clients/WebForms/Download.aspx
@@ -0,0 +1,14 @@
+<%@ Page Language="C#" Inherits="WebForms.Download" MasterPageFile="~/MasterPage.master" %>
+<%@ MasterType VirtualPath="~/MasterPage.master" %>
+<asp:Content ContentPlaceHolderID="main_placeholder" ID="main_placeholderContent" runat="server">
+
+<p>gbrainy is available as installable program.</p>
+<img src = "http://gent.softcatala.org/jmas/gbrainy/gbrainy_memory.png" width = "400" height = "400"/>
+<p>You can download gbrainy from the following links:</p>
+<ul>
+<li><a href="http://live.gnome.org/gbrainy#Download">Linux</a></li>
+<li><a href="http://live.gnome.org/gbrainy/Windows">Windows</a></li>
+</ul>
+</asp:Content>
+
+
diff --git a/src/Clients/WebForms/Finish.aspx.cs b/src/Clients/WebForms/Download.aspx.cs
similarity index 70%
rename from src/Clients/WebForms/Finish.aspx.cs
rename to src/Clients/WebForms/Download.aspx.cs
index d9e45f6..dd4d2fe 100644
--- a/src/Clients/WebForms/Finish.aspx.cs
+++ b/src/Clients/WebForms/Download.aspx.cs
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2010 Jordi Mas i Hernà ndez <jmas softcatala org>
+ * Copyright (C) 2011 Jordi Mas i Hernà ndez <jmas softcatala org>
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
@@ -18,21 +18,15 @@
*/
using System;
+using System.IO;
using System.Web;
using System.Web.UI;
+using gbrainy.Core.Main;
namespace WebForms
{
- public partial class Finish : System.Web.UI.Page
+ public partial class Download : System.Web.UI.Page
{
- void Page_Load (object o, EventArgs e)
- {
- WebSession web_session;
- gbrainy.Core.Main.GameSession session;
- web_session = Global.Sessions [Session.SessionID];
- image.ImageUrl = Game.CreateImage (web_session);
- }
}
}
-
diff --git a/src/Clients/WebForms/Finish.aspx.designer.cs b/src/Clients/WebForms/Download.aspx.designer.cs
similarity index 85%
rename from src/Clients/WebForms/Finish.aspx.designer.cs
rename to src/Clients/WebForms/Download.aspx.designer.cs
index b6fdd15..d33c35c 100644
--- a/src/Clients/WebForms/Finish.aspx.designer.cs
+++ b/src/Clients/WebForms/Download.aspx.designer.cs
@@ -2,21 +2,19 @@
// <autogenerated>
// This code was generated by a tool.
// Mono Runtime Version: 2.0.50727.1433
-//
-// Changes to this file may cause incorrect behavior and will be lost if
+//
+// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </autogenerated>
// ------------------------------------------------------------------------------
namespace WebForms {
-
-
- public partial class Finish {
-
+
+
+ public partial class Download {
+
protected System.Web.UI.WebControls.Content main_placeholderContent;
-
- protected System.Web.UI.WebControls.Image image;
-
+
public new WebForms.MasterPage Master {
get {
return ((WebForms.MasterPage)(base.Master));
diff --git a/src/Clients/WebForms/Game.aspx b/src/Clients/WebForms/Game.aspx
index ec0fd2d..3771581 100644
--- a/src/Clients/WebForms/Game.aspx
+++ b/src/Clients/WebForms/Game.aspx
@@ -1,10 +1,52 @@
<%@ Page Language="C#" MasterPageFile = "MasterPage.master" Inherits="WebForms.Game" %>
<asp:content id="main_content" ContentPlaceHolderID ="main_placeholder" runat="server">
- <table border="1px" width = "500px" >
- <tr>
- <td colspan="2"><strong>Puzzle</strong></td>
- </tr>
+
+<table border="1px" style ="border-style:solid; border-collapse:collapse;" width = "580px" >
+<td valign = "top">
+ <!-- Toolbar -->
+ <table border="0px" width = "80px">
+ <tr>
+ <td align = "center">
+ <asp:ImageButton ImageUrl = "images/allgames-32.png" OnClick="OnStartAllGames" runat="server"></asp:ImageButton>
+ <div>
+ <asp:Label id="allgames_label" runat="server"/>
+ </div>
+ </td>
+ </tr>
+<!--
+ <tr>
+ <td align = "center">
+ <asp:ImageButton ImageUrl = "images/logic-games-32.png" runat="server"></asp:ImageButton>
+ </td>
+ </tr>
+
+ <tr>
+ <td align = "center">
+ <asp:ImageButton ImageUrl = "images/math-games-32.png" runat="server"></asp:ImageButton>
+ </td>
+ </tr>
+
+ <tr>
+ <td align = "center">
+ <asp:ImageButton ImageUrl = "images/memory-games-32.png" runat="server"></asp:ImageButton>
+ </td>
+ </tr>
+-->
+ <tr>
+ <td align = "center">
+ <asp:ImageButton ImageUrl = "images/endgame-32.png" OnClick="OnClickEndGame" runat="server"></asp:ImageButton>
+ <div>
+ <asp:Label id="endgames_label" runat="server"/>
+ </div>
+ </td>
+ </tr>
+
+ </table>
+ </td>
+<td>
+ <!-- Main game area -->
+ <table border="0px" width = "500px" >
<tr>
<td>
<asp:Label id="question" runat="server"></asp:Label>
@@ -12,7 +54,7 @@
</tr>
<tr>
<td>
- <asp:Image id="image" runat="server" />
+ <asp:Image id="image" runat="server" />
</td>
</tr>
<tr>
@@ -22,8 +64,7 @@
<asp:Label id="result_label" runat="server"></asp:Label>
<asp:Label id="rationale_label" runat="server"></asp:Label>
- <asp:LinkButton id="nextgame_link" OnClick ="OnClickNextGame" runat="server" />
- <asp:LinkButton id="endgame_link" OnClick ="OnClickEndGame" runat="server" />
+ <asp:LinkButton id="nextgame_link" OnClick ="OnClickNextGame" runat="server" />
</td>
</tr>
@@ -33,5 +74,7 @@
</td>
</tr>
</table>
+</td>
+</table>
<br/>
</asp:content>
diff --git a/src/Clients/WebForms/Game.aspx.cs b/src/Clients/WebForms/Game.aspx.cs
index 9a7ffed..c90b9c6 100644
--- a/src/Clients/WebForms/Game.aspx.cs
+++ b/src/Clients/WebForms/Game.aspx.cs
@@ -22,6 +22,7 @@ using System.IO;
using System.Web;
using System.Web.UI;
using gbrainy.Core.Main;
+using gbrainy.Core.Toolkit;
namespace WebForms
{
@@ -36,10 +37,7 @@ namespace WebForms
{
manager = new GameManager ();
manager.LoadAssemblyGames ("bin/gbrainy.Games.dll");
-
manager.LoadVerbalAnalogies (System.IO.Path.Combine ("data/", "verbal_analogies.xml"));
- //manager.LoadGamesFromXml (System.IO.Path.Combine (Defines.DATA_DIR, "games.xml"));
- //manager.LoadPlugins ();
manager.Difficulty = gbrainy.Core.Main.GameDifficulty.Medium;
manager.GameType = gbrainy.Core.Main.GameSession.Types.LogicPuzzles |
@@ -54,9 +52,8 @@ namespace WebForms
Logger.Debug ("Game.Page_Load. Page load starts. Session ID {0}, IsPostBack {1}", Session.SessionID,
IsPostBack);
-
- if (web_session.GameState == null ||
- web_session.GameState.Status == GameSession.SessionStatus.Finished)
+
+ if (web_session.GameState == null)
{
Logger.Debug ("Game.Page_Load creating new session");
session = new gbrainy.Core.Main.GameSession ();
@@ -68,8 +65,13 @@ namespace WebForms
// send the user to the home page
//Logger.Debug ("New Session, redirecting to Default.aspx");
//Response.Redirect ("Default.aspx");
- } else
+ } else if (web_session.GameState != null && web_session.GameState.Status == GameSession.SessionStatus.Finished)
+ {
+ image.ImageUrl = Game.CreateImage (web_session);
+ }
+ else {
session = web_session.GameState;
+ }
if (IsPostBack == true) {
Logger.Debug ("Game.Page_Load. Ignoring postback");
@@ -79,16 +81,61 @@ namespace WebForms
string answer = answer_textbox.Text;
Logger.Debug ("Game.Page_Load. Got answer: {0}", answer);
-
- _game = GetNextGame ();
-
- UpdateGame ();
+
+ if (web_session.GameState.Status != GameSession.SessionStatus.Finished)
+ {
+ _game = GetNextGame ();
+ UpdateGame ();
+ }
+
+ // Toolbar
+ allgames_label.Text = LanguageSupport.GetString (web_session, "All");
+ endgames_label.Text = LanguageSupport.GetString (web_session, "Finish");
nextgame_link.Text = "Next Game";
- endgame_link.Text = "End Game";
Logger.Debug ("Game.Page_Load. Page load completed");
}
+
+#if _IMAGEMAP_
+
+ string ProcessWidget (Widget widget)
+ {
+ string str;
+
+ str = String.Format ("<area shape=\"rect\" coords=\"{0},{1},{2},{3}\" href=http://en.wikipedia.org/ />",
+ widget.X, widget.Y, widget.Width, widget.Height);
+ return str;
+ }
+
+ public string ImageMap
+ {
+ get {
+ string str;
+
+ if (_game == null)
+ return "Nothing";
+
+ str = String.Format ("<img src={0} usemap=\"#mapname\" />",
+ image.ImageUrl);
+
+ foreach (Widget widget in _game.Widgets)
+ {
+ if (widget is Container)
+ {
+ foreach (Widget child in _game.Widgets)
+ {
+ str += ProcessWidget (child);
+ }
+ }
+ else {
+ str += ProcessWidget (widget);
+ }
+ }
+ return str;
+ }
+ }
+#endif
void UpdateGame ()
{
if (_game == null)
@@ -194,13 +241,19 @@ namespace WebForms
answer_button.Enabled = false;
}
- public virtual void OnClickEndGame (Object sender, EventArgs e)
+ protected void OnClickEndGame (Object sender, EventArgs e)
{
Logger.Debug ("Game.OnClickEndGame");
session.End ();
-
- Response.Redirect ("Finish.aspx");
+
+ Response.Redirect ("Game.aspx");
}
-
+
+ protected void OnStartAllGames (Object sender, EventArgs e)
+ {
+ web_session.GameState = null;
+ Response.Redirect ("Game.aspx");
+ }
+
}
}
diff --git a/src/Clients/WebForms/Game.aspx.designer.cs b/src/Clients/WebForms/Game.aspx.designer.cs
index 6e5509b..6ad698e 100644
--- a/src/Clients/WebForms/Game.aspx.designer.cs
+++ b/src/Clients/WebForms/Game.aspx.designer.cs
@@ -2,35 +2,37 @@
// <autogenerated>
// This code was generated by a tool.
// Mono Runtime Version: 2.0.50727.1433
-//
-// Changes to this file may cause incorrect behavior and will be lost if
+//
+// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </autogenerated>
// ------------------------------------------------------------------------------
namespace WebForms {
-
-
+
+
public partial class Game {
-
+
protected System.Web.UI.WebControls.Content main_content;
-
+
+ protected System.Web.UI.WebControls.Label allgames_label;
+
+ protected System.Web.UI.WebControls.Label endgames_label;
+
protected System.Web.UI.WebControls.Label question;
-
+
protected System.Web.UI.WebControls.Image image;
-
+
protected System.Web.UI.WebControls.TextBox answer_textbox;
-
+
protected System.Web.UI.WebControls.Button answer_button;
-
+
protected System.Web.UI.WebControls.Label result_label;
-
+
protected System.Web.UI.WebControls.Label rationale_label;
-
+
protected System.Web.UI.WebControls.LinkButton nextgame_link;
-
- protected System.Web.UI.WebControls.LinkButton endgame_link;
-
+
protected System.Web.UI.WebControls.Label status;
}
}
diff --git a/src/Clients/WebForms/LanguageSupport.cs b/src/Clients/WebForms/LanguageSupport.cs
index 5e48c60..ec7b619 100644
--- a/src/Clients/WebForms/LanguageSupport.cs
+++ b/src/Clients/WebForms/LanguageSupport.cs
@@ -63,7 +63,7 @@ namespace WebForms
Environment.SetEnvironmentVariable ("LANGUAGE",
LanguageSupport.GetFromIndex (session.LanguageIndex).LangCode);
- Catalog.Init ("gbrainy", "locale/");
+ Catalog.Init ("gbrainy", "po/");
s = Catalog.GetString (str);
if (String.IsNullOrEmpty (s) == true)
diff --git a/src/Clients/WebForms/MasterPage.master b/src/Clients/WebForms/MasterPage.master
index 99557c9..09c2253 100644
--- a/src/Clients/WebForms/MasterPage.master
+++ b/src/Clients/WebForms/MasterPage.master
@@ -10,13 +10,10 @@
<div class="Header">
<asp:HyperLink class="HeaderText" text ="Home" NavigateUrl ="Default.aspx" runat="server"/>
<span class="HeaderText">Play</span>
- <span class="HeaderText">Download</span>
+ <asp:HyperLink class="HeaderText" text ="Download" NavigateUrl ="Download.aspx" runat="server"/>
<span class="HeaderText">Help</span>
<span class="HeaderText">About</span>
<span class="HeaderText">
- <asp:DropDownList id = "languages_drop" AutoPostBack="True" ViewStateMode="Enabled"
- onselectedindexchanged="OnSelectedIndexChanged" runat="server">
- </asp:DropDownList>
</span>
</div>
diff --git a/src/Clients/WebForms/MasterPage.master.cs b/src/Clients/WebForms/MasterPage.master.cs
index 1f5d91f..508ea8f 100644
--- a/src/Clients/WebForms/MasterPage.master.cs
+++ b/src/Clients/WebForms/MasterPage.master.cs
@@ -19,14 +19,12 @@
using System;
using System.Web;
-using System.Web.UI;
-using System.Web.UI.WebControls;
+
namespace WebForms
{
public partial class MasterPage : System.Web.UI.MasterPage
{
- const string CookieName = "Lang";
// Instead of Page_Load we do Page_Init (Executed before)
// To make sure that this code is executed before Page_Load the first page load
@@ -37,37 +35,7 @@ namespace WebForms
if (IsPostBack == true)
return;
- for (int i = 0; i <LanguageSupport.Languages.Length; i++)
- {
- languages_drop.Items.Add (new ListItem (LanguageSupport.Languages[i].Name,
- i.ToString ()));
- }
-
- if (Request.Cookies [CookieName] != null)
- languages_drop.SelectedValue = Request.Cookies[CookieName].Value;
- else // Default language value
- languages_drop.SelectedValue = "0";
-
- Global.Sessions [Session.SessionID].LanguageIndex =
- Int32.Parse (languages_drop.SelectedValue);
+
}
-
- protected void OnSelectedIndexChanged (object sender, EventArgs e)
- {
- if (Response.Cookies[CookieName].Value == languages_drop.SelectedValue)
- return;
-
- Response.Cookies[CookieName].Value = languages_drop.SelectedValue;
- Response.Cookies[CookieName].Expires = DateTime.Now.AddYears (1);
-
- Logger.Debug ("MasterPage.OnSelectedIndexChanged. Set lang cookie to: {0}",
- languages_drop.SelectedValue);
-
- Global.Sessions [Session.SessionID].LanguageIndex =
- Int32.Parse (languages_drop.SelectedValue);
-
- Response.Redirect ("Default.aspx");
-
- }
}
}
diff --git a/src/Clients/WebForms/MasterPage.master.designer.cs b/src/Clients/WebForms/MasterPage.master.designer.cs
index daaee5e..507cad5 100644
--- a/src/Clients/WebForms/MasterPage.master.designer.cs
+++ b/src/Clients/WebForms/MasterPage.master.designer.cs
@@ -2,19 +2,17 @@
// <autogenerated>
// This code was generated by a tool.
// Mono Runtime Version: 2.0.50727.1433
-//
-// Changes to this file may cause incorrect behavior and will be lost if
+//
+// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </autogenerated>
// ------------------------------------------------------------------------------
namespace WebForms {
-
-
+
+
public partial class MasterPage {
-
- protected System.Web.UI.WebControls.DropDownList languages_drop;
-
+
protected System.Web.UI.WebControls.ContentPlaceHolder main_placeholder;
}
}
diff --git a/src/Clients/WebForms/Status.aspx.designer.cs b/src/Clients/WebForms/Status.aspx.designer.cs
index 478c421..5a1afa0 100644
--- a/src/Clients/WebForms/Status.aspx.designer.cs
+++ b/src/Clients/WebForms/Status.aspx.designer.cs
@@ -2,29 +2,29 @@
// <autogenerated>
// This code was generated by a tool.
// Mono Runtime Version: 2.0.50727.1433
-//
-// Changes to this file may cause incorrect behavior and will be lost if
+//
+// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </autogenerated>
// ------------------------------------------------------------------------------
namespace WebForms {
-
-
+
+
public partial class Status {
-
+
protected System.Web.UI.HtmlControls.HtmlForm form1;
-
+
protected System.Web.UI.WebControls.Label updated_label;
-
+
protected System.Web.UI.WebControls.Table sessions_table;
-
+
protected System.Web.UI.WebControls.Label total_label;
-
+
protected System.Web.UI.WebControls.Label games_label;
-
+
protected System.Web.UI.WebControls.Table assemblies_table;
-
+
protected System.Web.UI.WebControls.Table counters_table;
}
}
diff --git a/src/Clients/WebForms/WebForms.csproj b/src/Clients/WebForms/WebForms.csproj
index cfd3689..d19834d 100644
--- a/src/Clients/WebForms/WebForms.csproj
+++ b/src/Clients/WebForms/WebForms.csproj
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
-<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="4.0">
+<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
@@ -10,7 +10,6 @@
<OutputType>Library</OutputType>
<RootNamespace>WebForms</RootNamespace>
<AssemblyName>gbrainyWeb</AssemblyName>
- <TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
@@ -30,14 +29,6 @@
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
- <Reference Include="gbrainy.Core, Version=1.51.0.0, Culture=neutral, PublicKeyToken=null">
- <SpecificVersion>False</SpecificVersion>
- <HintPath>..\..\gbrainy.Core.dll</HintPath>
- </Reference>
- <Reference Include="gbrainy.Games, Version=1.51.0.0, Culture=neutral, PublicKeyToken=null">
- <SpecificVersion>False</SpecificVersion>
- <HintPath>..\..\gbrainy.Games.dll</HintPath>
- </Reference>
<Reference Include="System.Web" />
<Reference Include="System.Web.Extensions" />
<Reference Include="Mono.Cairo" />
@@ -46,6 +37,7 @@
<ItemGroup>
<Content Include="web.config" />
<Content Include="Default.aspx" />
+ <Content Include="Download.aspx" />
<Content Include="images\allgames-32.png" />
<Content Include="images\endgame-32.png" />
<Content Include="images\logic-games-32.png" />
@@ -58,7 +50,6 @@
<Content Include="styles.css" />
<Content Include="Status.aspx" />
<Content Include="Global.asax" />
- <Content Include="Finish.aspx" />
<Content Include="Game.aspx" />
<Content Include="..\..\..\po\ca.gmo">
<Link>locale\ca.gmo</Link>
@@ -83,9 +74,15 @@
</Content>
</ItemGroup>
<ItemGroup>
+ <Compile Include="Download.aspx.cs">
+ <DependentUpon>Download.aspx</DependentUpon>
+ </Compile>
<Compile Include="Default.aspx.cs">
<DependentUpon>Default.aspx</DependentUpon>
</Compile>
+ <Compile Include="Download.aspx.designer.cs">
+ <DependentUpon>Download.aspx</DependentUpon>
+ </Compile>
<Compile Include="Default.aspx.designer.cs">
<DependentUpon>Default.aspx</DependentUpon>
</Compile>
@@ -113,22 +110,16 @@
<DependentUpon>Global.asax</DependentUpon>
</Compile>
<Compile Include="WebSession.cs" />
- <Compile Include="Finish.aspx.cs">
- <DependentUpon>Finish.aspx</DependentUpon>
- </Compile>
- <Compile Include="Finish.aspx.designer.cs">
- <DependentUpon>Finish.aspx</DependentUpon>
- </Compile>
</ItemGroup>
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
- <Import Project="$(MSBuildExtensionsPath)\Microsoft\VisualStudio\v9.0\WebApplications\Microsoft.WebApplication.targets" />
+ <Import Project="$(MSBuildExtensionsPath)\Microsoft\VisualStudio\v8.0\WebApplications\Microsoft.WebApplication.targets" />
<ProjectExtensions>
<MonoDevelop>
- <Properties VerifyCodeBehindFields="true" VerifyCodeBehindEvents="true">
+ <Properties InternalTargetFrameworkVersion="3.5" VerifyCodeBehindFields="true" VerifyCodeBehindEvents="true">
<XspParameters Port="8080" Address="127.0.0.1" SslMode="None" SslProtocol="Default" KeyType="None" CertFile="" KeyFile="" PasswordOptions="None" Password="" Verbose="true" />
<WebDeployTargets>
<Target Name="">
- <FileCopier Handler="MonoDevelop.Deployment.LocalFileCopyHandler" TargetDirectory="/home/jordi/dev/gbrainy_web/src/Clients/WebForms/web" ctype="LocalFileCopyConfiguration" />
+ <FileCopier Handler="MonoDevelop.Deployment.LocalFileCopyHandler" TargetDirectory="/home/jordi/dev/gbrainy/src/Clients/WebForms/web" ctype="LocalFileCopyConfiguration" />
</Target>
</WebDeployTargets>
</Properties>
@@ -146,4 +137,14 @@
<Link>data\games.xml</Link>
</None>
</ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="..\..\Games\Games.csproj">
+ <Project>{84A80D6F-DB4D-4989-B441-D410D2260775}</Project>
+ <Name>Games</Name>
+ </ProjectReference>
+ <ProjectReference Include="..\..\Core\Core.csproj">
+ <Project>{9F2F1F0C-DF7E-4054-B6BA-94F3DD9FF3D9}</Project>
+ <Name>Core</Name>
+ </ProjectReference>
+ </ItemGroup>
</Project>
diff --git a/src/Clients/WebForms/styles.css b/src/Clients/WebForms/styles.css
index b103dc9..c4b8082 100644
--- a/src/Clients/WebForms/styles.css
+++ b/src/Clients/WebForms/styles.css
@@ -37,7 +37,6 @@ body
.MainContent
{
-
margin-left: 30px;
width: 80%;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]