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
*.user
*/bin/*
*/obj/*
Dotfuscated/*
Published/*

View File

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

View File

@@ -1,9 +1,5 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
namespace Scrummer.Code.Controls
@@ -121,7 +117,7 @@ namespace Scrummer.Code.Controls
_serviceUrl, txtText.ClientID, _idBoard, hidUserName.ClientID));
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);
Controls.Add(litScript);
}

View File

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

View File

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

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

View File

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

View File

@@ -89,22 +89,7 @@ namespace Scrummer
{
try
{
string file = Path.GetFileName(context.Request.FilePath);
if (string.IsNullOrEmpty(file))
{
file = Globals.DefaultHandler;
}
IHttpHandler handler = GetHandler(file);
if (handler == null)
{
// TODO: FrmNotFound
throw new Exception("NotFound");
}
// Use handler
context.Response.Clear();
context.Handler = handler;
handler.ProcessRequest(context);
RouteRequest(context);
}
catch (Exception ex)
{
@@ -113,5 +98,29 @@ namespace Scrummer
}
#endregion
#region Private methods
private void RouteRequest(HttpContext context)
{
string file = Path.GetFileName(context.Request.FilePath);
if (string.IsNullOrEmpty(file))
{
file = Globals.DefaultHandler;
}
IHttpHandler handler = GetHandler(file);
if (handler == null)
{
// TODO: FrmNotFound
throw new Exception("NotFound");
}
// Use handler
context.Response.Clear();
context.Handler = handler;
handler.ProcessRequest(context);
}
#endregion
}
}

View File

@@ -1,5 +1,4 @@
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// 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];
queryString += (queryString.length > 0 ? "&" : "")
+ fixedEncodeURIComponent(property) + "="
+ fixedEncodeURIComponent(value ? value : "");
+ fixedEncodeURIComponent(String(value));
}
}
return queryString;

View File

@@ -13,12 +13,13 @@
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>Scrummer</RootNamespace>
<AssemblyName>Scrummer</AssemblyName>
<TargetFrameworkVersion>v4.5.1</TargetFrameworkVersion>
<TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
<UseIISExpress>true</UseIISExpress>
<IISExpressSSLPort />
<IISExpressAnonymousAuthentication />
<IISExpressWindowsAuthentication />
<IISExpressUseClassicPipelineMode />
<TargetFrameworkProfile />
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
@@ -38,27 +39,14 @@
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<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.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.Web" />
<Reference Include="System.Xml" />
<Reference Include="System.Configuration" />
<Reference Include="System.Web.Services" />
<Reference Include="System.EnterpriseServices" />
</ItemGroup>
<ItemGroup>
<Content Include="Scripts\01. Base.js" />
<None Include="Properties\PublishProfiles\Scrummer.pubxml" />
<None Include="Web.Debug.config">
<DependentUpon>Web.config</DependentUpon>
<SubType>Designer</SubType>
@@ -82,6 +70,9 @@
<Compile Include="Code\Controls\CLabel.cs" />
<Compile Include="Code\GlobalErrorHandler.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\PageCommon.cs">
<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 {
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
@@ -7,7 +11,7 @@ body {
color: black;
}
p{
p {
margin-bottom: 0.5em;
text-shadow: 0 1px 1px rgba(255,255,255,0.5);
}
@@ -40,26 +44,26 @@ h3 {
display: block;
background-color: black;
}
.divHeader h1{
.divHeader h1 {
font-size: 30px;
color: yellow;
margin: 0;
text-shadow: none;
}
.divContent{
padding-left:10px;
padding-right:10px;
.divContent {
padding-left: 10px;
padding-right: 10px;
}
.divCode{
.divCode {
background-color: black;
color: green;
font-family: Courier New, Courier, monospace;
text-shadow: none;
overflow:auto;
overflow: auto;
margin: 5px;
padding: 2px;
box-shadow: 0 0 10px rgb(0,0,0);
}

View File

@@ -1,4 +1,4 @@
.divChatWindow{
.divChatWindow {
box-sizing: border-box;
overflow: hidden;
border: solid 1px black;
@@ -19,16 +19,19 @@
}
.messageRow,
.selfMessageRow{
vertical-align:top;
display:block;
.selfMessageRow {
vertical-align: top;
display: block;
}
.messageRow {
text-align: left;
}
.selfMessageRow {
text-align: right;
}
.message {
box-sizing: border-box;
display: inline-block;
@@ -36,37 +39,36 @@
border: solid 1px rgb(32, 32, 32);
background-color: rgb(220,220,220);
border-radius: 5px;
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);
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);
margin: 2px;
padding: 5px;
font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
}
.messageRow .message {
background-color: rgb(220,200,200);
}
.selfMessageRow .message {
background-color: rgb(200,220,200);
}
.message .user{
.message .user {
box-sizing: border-box;
color:rgb(64,64,64);
text-shadow: 0 0 1px rgba(0,0,0,0.3);
font-size:10px;
font-weight:bold;
}
.message .text{
box-sizing: border-box;
color:rgb(32,32,32);
text-shadow: 0 0 1px rgba(0,0,0,0.3);
font-size:12px;
color: rgb(64,64,64);
text-shadow: 0 0 1px rgba(0,0,0,0.3);
font-size: 10px;
font-weight: bold;
}
.divChatControls{
.message .text {
box-sizing: border-box;
color: rgb(32,32,32);
text-shadow: 0 0 1px rgba(0,0,0,0.3);
font-size: 12px;
}
.divChatControls {
}
.chatTextBox {
@@ -88,10 +90,7 @@
.chatButton {
box-sizing: border-box;
padding: 5px;
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);
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);
width: 50px;
vertical-align: top;
border-radius: 5px;

View File

@@ -1,8 +1,14 @@
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0"?>
<configuration>
<system.web>
<compilation debug="true" targetFramework="4.5.1" />
<httpRuntime targetFramework="4.5.1" />
<compilation debug="true">
<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.webServer>
<handlers>