Change to .NET 3.5

This commit is contained in:
2015-05-29 23:26:32 +02:00
parent 453e637504
commit eef5e3dbbf
28 changed files with 2270 additions and 2217 deletions

2
.gitignore vendored
View File

@@ -1,5 +1,7 @@
*.suo *.suo
*.user
*/bin/* */bin/*
*/obj/* */obj/*
Dotfuscated/* Dotfuscated/*
Published/*

View File

@@ -5,6 +5,11 @@ VisualStudioVersion = 12.0.31101.0
MinimumVisualStudioVersion = 10.0.40219.1 MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Scrummer", "Scrummer\Scrummer.csproj", "{7596FD6B-DAF0-4B22-B356-5CF4629F0436}" Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Scrummer", "Scrummer\Scrummer.csproj", "{7596FD6B-DAF0-4B22-B356-5CF4629F0436}"
EndProject EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Notes", "Notes", "{22F69F04-ABC4-44DB-9742-A24012298108}"
ProjectSection(SolutionItems) = preProject
Notes.txt = Notes.txt
EndProjectSection
EndProject
Global Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU Debug|Any CPU = Debug|Any CPU

View File

@@ -1,9 +1,5 @@
using System; using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI; using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls; using System.Web.UI.WebControls;
namespace Scrummer.Code.Controls namespace Scrummer.Code.Controls
@@ -121,7 +117,7 @@ namespace Scrummer.Code.Controls
_serviceUrl, txtText.ClientID, _idBoard, hidUserName.ClientID)); _serviceUrl, txtText.ClientID, _idBoard, hidUserName.ClientID));
LiteralControl litScript = new LiteralControl(); LiteralControl litScript = new LiteralControl();
litScript.Text = String.Format("<script>RunChat('{0}', '{1}', {2}, '{3}', '{4}', '{5}');</script>", litScript.Text = String.Format("<script>RunChat('{0}', '{1}', '{2}', '{3}', '{4}', '{5}');</script>",
_serviceUrl, divChat.ClientID, _idBoard, hidIDMessage.ClientID, hidUserName.ClientID, hidLastUser.ClientID); _serviceUrl, divChat.ClientID, _idBoard, hidIDMessage.ClientID, hidUserName.ClientID, hidLastUser.ClientID);
Controls.Add(litScript); Controls.Add(litScript);
} }

View File

@@ -1,6 +1,5 @@
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Linq;
using System.Threading; using System.Threading;
using System.Web; using System.Web;
using Scrummer.Code.JSON; using Scrummer.Code.JSON;
@@ -12,6 +11,7 @@ namespace Scrummer.Code
public int IDMessage { get; set; } public int IDMessage { get; set; }
public string UserName { get; set; } public string UserName { get; set; }
public string Text { get; set; } public string Text { get; set; }
public DateTime Date { get; set; }
}; };
public class MessageBoard public class MessageBoard
@@ -44,6 +44,7 @@ namespace Scrummer.Code
msg.IDMessage = lastIDMessage; msg.IDMessage = lastIDMessage;
msg.UserName = userName; msg.UserName = userName;
msg.Text = text; msg.Text = text;
msg.Date = DateTime.UtcNow;
_messages.Insert(0, msg); _messages.Insert(0, msg);
} }
} }

View File

@@ -286,7 +286,7 @@ namespace Scrummer.Code.JSON
foreach (PropertyInfo property in properties) foreach (PropertyInfo property in properties)
{ {
object value = null; object value = null;
MethodInfo getMethod = property.GetMethod; MethodInfo getMethod = property.GetGetMethod();
ParameterInfo[] parameters = getMethod.GetParameters(); ParameterInfo[] parameters = getMethod.GetParameters();
if (parameters.Length == 0) if (parameters.Length == 0)
{ {

View File

@@ -0,0 +1,27 @@
using System;
using Scrummer.Code.Controls;
namespace Scrummer.Code.Pages
{
public class FrmBoard : PageCommon
{
private int _idBoard = 0;
public FrmBoard()
{
Init += FrmBoard_Init;
}
void FrmBoard_Init(object sender, EventArgs e)
{
Title = "Board";
var lblTest = new CLabel { Text = "Hello World", Tag = "h2" };
Controls.Add(lblTest);
ChatControl chatControl = new ChatControl();
chatControl.IDBoard = _idBoard;
chatControl.UserName = Convert.ToString(new Random().Next());
Controls.Add(chatControl);
}
}
}

View File

@@ -5,6 +5,8 @@ namespace Scrummer.Code.Pages
{ {
public class FrmEcho : IHttpHandler public class FrmEcho : IHttpHandler
{ {
#region IHttpHandler
public bool IsReusable public bool IsReusable
{ {
get { return false; } get { return false; }
@@ -17,5 +19,7 @@ namespace Scrummer.Code.Pages
context.Response.Write(jsonWritter.Write(context.Request)); context.Response.Write(jsonWritter.Write(context.Request));
context.Response.Write("</code></pre>"); context.Response.Write("</code></pre>");
} }
#endregion
} }
} }

View File

@@ -8,8 +8,14 @@ namespace Scrummer.Code.Pages
{ {
public class FrmError : PageCommon public class FrmError : PageCommon
{ {
#region Declarations
Exception _ex = null; Exception _ex = null;
#endregion
#region Page life cycle
public FrmError(Exception ex) public FrmError(Exception ex)
{ {
_ex = ex; _ex = ex;
@@ -17,6 +23,15 @@ namespace Scrummer.Code.Pages
} }
void FrmError_Init(object sender, EventArgs e) void FrmError_Init(object sender, EventArgs e)
{
InitializeControls();
}
#endregion
#region Private methods
private void InitializeControls()
{ {
Title = "Application Error"; Title = "Application Error";
@@ -44,5 +59,7 @@ namespace Scrummer.Code.Pages
exAux = exAux.InnerException; exAux = exAux.InnerException;
} }
} }
#endregion
} }
} }

View File

@@ -88,6 +88,20 @@ namespace Scrummer
public void ProcessRequest(HttpContext context) public void ProcessRequest(HttpContext context)
{ {
try try
{
RouteRequest(context);
}
catch (Exception ex)
{
GlobalErrorHandler.HandleError(context, ex);
}
}
#endregion
#region Private methods
private void RouteRequest(HttpContext context)
{ {
string file = Path.GetFileName(context.Request.FilePath); string file = Path.GetFileName(context.Request.FilePath);
if (string.IsNullOrEmpty(file)) if (string.IsNullOrEmpty(file))
@@ -106,11 +120,6 @@ namespace Scrummer
context.Handler = handler; context.Handler = handler;
handler.ProcessRequest(context); handler.ProcessRequest(context);
} }
catch (Exception ex)
{
GlobalErrorHandler.HandleError(context, ex);
}
}
#endregion #endregion
} }

View File

@@ -1,5 +1,4 @@
using System.Reflection; using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices; using System.Runtime.InteropServices;
// General Information about an assembly is controlled through the following // General Information about an assembly is controlled through the following

View File

@@ -0,0 +1,21 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
This file is used by the publish/package process of your Web project. You can customize the behavior of this process
by editing this MSBuild file. In order to learn more about this please visit http://go.microsoft.com/fwlink/?LinkID=208121.
-->
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<WebPublishMethod>FileSystem</WebPublishMethod>
<LastUsedBuildConfiguration>Release</LastUsedBuildConfiguration>
<LastUsedPlatform>Any CPU</LastUsedPlatform>
<SiteUrlToLaunchAfterPublish />
<LaunchSiteAfterPublish>True</LaunchSiteAfterPublish>
<PrecompileBeforePublish>True</PrecompileBeforePublish>
<EnableUpdateable>False</EnableUpdateable>
<DebugSymbols>False</DebugSymbols>
<WDPMergeOption>DonotMerge</WDPMergeOption>
<ExcludeApp_Data>True</ExcludeApp_Data>
<publishUrl>C:\Users\VAR\source\Scrummer\Published</publishUrl>
<DeleteExistingFiles>True</DeleteExistingFiles>
</PropertyGroup>
</Project>

View File

@@ -25,7 +25,7 @@ function GetDataQueryString(data) {
var value = data[property]; var value = data[property];
queryString += (queryString.length > 0 ? "&" : "") queryString += (queryString.length > 0 ? "&" : "")
+ fixedEncodeURIComponent(property) + "=" + fixedEncodeURIComponent(property) + "="
+ fixedEncodeURIComponent(value ? value : ""); + fixedEncodeURIComponent(String(value));
} }
} }
return queryString; return queryString;

View File

@@ -13,12 +13,13 @@
<AppDesignerFolder>Properties</AppDesignerFolder> <AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>Scrummer</RootNamespace> <RootNamespace>Scrummer</RootNamespace>
<AssemblyName>Scrummer</AssemblyName> <AssemblyName>Scrummer</AssemblyName>
<TargetFrameworkVersion>v4.5.1</TargetFrameworkVersion> <TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
<UseIISExpress>true</UseIISExpress> <UseIISExpress>true</UseIISExpress>
<IISExpressSSLPort /> <IISExpressSSLPort />
<IISExpressAnonymousAuthentication /> <IISExpressAnonymousAuthentication />
<IISExpressWindowsAuthentication /> <IISExpressWindowsAuthentication />
<IISExpressUseClassicPipelineMode /> <IISExpressUseClassicPipelineMode />
<TargetFrameworkProfile />
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols> <DebugSymbols>true</DebugSymbols>
@@ -38,27 +39,14 @@
<WarningLevel>4</WarningLevel> <WarningLevel>4</WarningLevel>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Net.Http" />
<Reference Include="System.Web.DynamicData" />
<Reference Include="System.Web.Entity" />
<Reference Include="System.Web.ApplicationServices" />
<Reference Include="System.ComponentModel.DataAnnotations" />
<Reference Include="System" /> <Reference Include="System" />
<Reference Include="System.Data" />
<Reference Include="System.Core" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="System.Web.Extensions" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Drawing" /> <Reference Include="System.Drawing" />
<Reference Include="System.Web" /> <Reference Include="System.Web" />
<Reference Include="System.Xml" />
<Reference Include="System.Configuration" /> <Reference Include="System.Configuration" />
<Reference Include="System.Web.Services" />
<Reference Include="System.EnterpriseServices" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<Content Include="Scripts\01. Base.js" /> <Content Include="Scripts\01. Base.js" />
<None Include="Properties\PublishProfiles\Scrummer.pubxml" />
<None Include="Web.Debug.config"> <None Include="Web.Debug.config">
<DependentUpon>Web.config</DependentUpon> <DependentUpon>Web.config</DependentUpon>
<SubType>Designer</SubType> <SubType>Designer</SubType>
@@ -82,6 +70,9 @@
<Compile Include="Code\Controls\CLabel.cs" /> <Compile Include="Code\Controls\CLabel.cs" />
<Compile Include="Code\GlobalErrorHandler.cs" /> <Compile Include="Code\GlobalErrorHandler.cs" />
<Compile Include="Code\JSON\ParserContext.cs" /> <Compile Include="Code\JSON\ParserContext.cs" />
<Compile Include="Code\Pages\FrmBoard.cs">
<SubType>ASPXCodeBehind</SubType>
</Compile>
<Compile Include="Code\Pages\FrmEcho.cs" /> <Compile Include="Code\Pages\FrmEcho.cs" />
<Compile Include="Code\Pages\PageCommon.cs"> <Compile Include="Code\Pages\PageCommon.cs">
<SubType>ASPXCodeBehind</SubType> <SubType>ASPXCodeBehind</SubType>

View File

@@ -1,28 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ProjectExtensions>
<VisualStudio>
<FlavorProperties GUID="{349c5851-65df-11da-9384-00065b846f21}">
<WebProjectProperties>
<StartPageUrl>
</StartPageUrl>
<StartAction>CurrentPage</StartAction>
<AspNetDebugging>True</AspNetDebugging>
<SilverlightDebugging>False</SilverlightDebugging>
<NativeDebugging>False</NativeDebugging>
<SQLDebugging>False</SQLDebugging>
<ExternalProgram>
</ExternalProgram>
<StartExternalURL>
</StartExternalURL>
<StartCmdLineArguments>
</StartCmdLineArguments>
<StartWorkingDirectory>
</StartWorkingDirectory>
<EnableENC>True</EnableENC>
<AlwaysStartWebServerOnDebug>True</AlwaysStartWebServerOnDebug>
</WebProjectProperties>
</FlavorProperties>
</VisualStudio>
</ProjectExtensions>
</Project>

View File

@@ -1,4 +1,8 @@
* { margin: 0; padding: 0; box-sizing: border-box; } * {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body { body {
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
@@ -40,6 +44,7 @@ h3 {
display: block; display: block;
background-color: black; background-color: black;
} }
.divHeader h1 { .divHeader h1 {
font-size: 30px; font-size: 30px;
color: yellow; color: yellow;
@@ -62,4 +67,3 @@ h3 {
padding: 2px; padding: 2px;
box-shadow: 0 0 10px rgb(0,0,0); box-shadow: 0 0 10px rgb(0,0,0);
} }

View File

@@ -23,12 +23,15 @@
vertical-align: top; vertical-align: top;
display: block; display: block;
} }
.messageRow { .messageRow {
text-align: left; text-align: left;
} }
.selfMessageRow { .selfMessageRow {
text-align: right; text-align: right;
} }
.message { .message {
box-sizing: border-box; box-sizing: border-box;
display: inline-block; display: inline-block;
@@ -36,17 +39,16 @@
border: solid 1px rgb(32, 32, 32); border: solid 1px rgb(32, 32, 32);
background-color: rgb(220,220,220); background-color: rgb(220,220,220);
border-radius: 5px; border-radius: 5px;
box-shadow: box-shadow: 0px 0px 10px rgba(0,0,0,0.5), inset 0px 2px 5px rgba(255,255,255,0.5), inset 0px -2px 5px rgba(128,128,128,0.5);
0px 0px 10px rgba(0,0,0,0.5),
inset 0px 2px 5px rgba(255,255,255,0.5),
inset 0px -2px 5px rgba(128,128,128,0.5);
margin: 2px; margin: 2px;
padding: 5px; padding: 5px;
font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif; font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
} }
.messageRow .message { .messageRow .message {
background-color: rgb(220,200,200); background-color: rgb(220,200,200);
} }
.selfMessageRow .message { .selfMessageRow .message {
background-color: rgb(200,220,200); background-color: rgb(200,220,200);
} }
@@ -58,6 +60,7 @@
font-size: 10px; font-size: 10px;
font-weight: bold; font-weight: bold;
} }
.message .text { .message .text {
box-sizing: border-box; box-sizing: border-box;
color: rgb(32,32,32); color: rgb(32,32,32);
@@ -66,7 +69,6 @@
} }
.divChatControls { .divChatControls {
} }
.chatTextBox { .chatTextBox {
@@ -88,10 +90,7 @@
.chatButton { .chatButton {
box-sizing: border-box; box-sizing: border-box;
padding: 5px; padding: 5px;
box-shadow: box-shadow: 0px 0px 10px rgba(0,0,0,0.5), inset 0px 2px 5px rgba(255,255,255,1), inset 0px -2px 5px rgba(128,128,128,1);
0px 0px 10px rgba(0,0,0,0.5),
inset 0px 2px 5px rgba(255,255,255,1),
inset 0px -2px 5px rgba(128,128,128,1);
width: 50px; width: 50px;
vertical-align: top; vertical-align: top;
border-radius: 5px; border-radius: 5px;

View File

@@ -1,8 +1,14 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0"?>
<configuration> <configuration>
<system.web> <system.web>
<compilation debug="true" targetFramework="4.5.1" /> <compilation debug="true">
<httpRuntime targetFramework="4.5.1" /> <assemblies>
<add assembly="System.Core, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
<add assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
<add assembly="System.Xml.Linq, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
<add assembly="System.Data.DataSetExtensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
</assemblies>
</compilation>
</system.web> </system.web>
<system.webServer> <system.webServer>
<handlers> <handlers>