CodeMaid clean-up
This commit is contained in:
@@ -12,7 +12,7 @@ namespace VAR.Focus.Web.Code
|
||||
private string _path = null;
|
||||
private List<string> _files = null;
|
||||
|
||||
#endregion
|
||||
#endregion Declarations
|
||||
|
||||
#region Properties
|
||||
|
||||
@@ -29,7 +29,7 @@ namespace VAR.Focus.Web.Code
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
#endregion Properties
|
||||
|
||||
#region Creator
|
||||
|
||||
@@ -38,7 +38,7 @@ namespace VAR.Focus.Web.Code
|
||||
_path = path;
|
||||
}
|
||||
|
||||
#endregion
|
||||
#endregion Creator
|
||||
|
||||
#region Public methods
|
||||
|
||||
@@ -58,6 +58,6 @@ namespace VAR.Focus.Web.Code
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
#endregion Public methods
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -27,7 +27,6 @@ namespace VAR.Focus.Web.Code
|
||||
context.Response.Write(strObject);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#endregion HttpContext
|
||||
}
|
||||
}
|
||||
@@ -40,7 +40,7 @@ namespace VAR.Focus.Web.Code
|
||||
context.Response.Write(sbOutput.ToString());
|
||||
}
|
||||
|
||||
#endregion
|
||||
#endregion Private methods
|
||||
|
||||
#region Public methods
|
||||
|
||||
@@ -59,6 +59,6 @@ namespace VAR.Focus.Web.Code
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
#endregion Public methods
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -15,6 +15,6 @@ namespace VAR.Focus.Web.Code
|
||||
bundler.WriteResponse(context.Response.OutputStream);
|
||||
}
|
||||
|
||||
#endregion
|
||||
#endregion IHttpHandler
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -15,6 +15,6 @@ namespace VAR.Focus.Web.Code
|
||||
bundler.WriteResponse(context.Response.OutputStream);
|
||||
}
|
||||
|
||||
#endregion
|
||||
#endregion IHttpHandler
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,6 +1,4 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Web;
|
||||
using VAR.Focus.BusinessLogic;
|
||||
using VAR.Focus.BusinessLogic.Entities;
|
||||
@@ -16,7 +14,7 @@ namespace VAR.Focus.Web.Code
|
||||
private string _cookieName = "FocusSID";
|
||||
private int _cookieExpirationDays = 30;
|
||||
|
||||
#endregion
|
||||
#endregion Declarations
|
||||
|
||||
#region Properties
|
||||
|
||||
@@ -45,7 +43,7 @@ namespace VAR.Focus.Web.Code
|
||||
set { _cookieExpirationDays = value; }
|
||||
}
|
||||
|
||||
#endregion
|
||||
#endregion Properties
|
||||
|
||||
#region Public methods
|
||||
|
||||
@@ -86,7 +84,6 @@ namespace VAR.Focus.Web.Code
|
||||
return true;
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#endregion Public methods
|
||||
}
|
||||
}
|
||||
@@ -9,7 +9,7 @@ namespace VAR.Focus.Web.Controls
|
||||
|
||||
private string _tagName = "span";
|
||||
|
||||
#endregion
|
||||
#endregion Declarations
|
||||
|
||||
#region Properties
|
||||
|
||||
@@ -19,7 +19,7 @@ namespace VAR.Focus.Web.Controls
|
||||
set { _tagName = value; }
|
||||
}
|
||||
|
||||
#endregion
|
||||
#endregion Properties
|
||||
|
||||
#region Life cycle
|
||||
|
||||
@@ -36,6 +36,6 @@ namespace VAR.Focus.Web.Controls
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
#endregion Life cycle
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -19,7 +19,7 @@ namespace VAR.Focus.Web.Controls
|
||||
|
||||
private Control _nextFocusOnEnter = null;
|
||||
|
||||
#endregion
|
||||
#endregion Declarations
|
||||
|
||||
#region Properties
|
||||
|
||||
@@ -53,7 +53,7 @@ namespace VAR.Focus.Web.Controls
|
||||
set { _nextFocusOnEnter = value; }
|
||||
}
|
||||
|
||||
#endregion
|
||||
#endregion Properties
|
||||
|
||||
#region Control life cycle
|
||||
|
||||
@@ -62,7 +62,7 @@ namespace VAR.Focus.Web.Controls
|
||||
PreRender += CTextbox_PreRender;
|
||||
}
|
||||
|
||||
void CTextbox_PreRender(object sender, EventArgs e)
|
||||
private void CTextbox_PreRender(object sender, EventArgs e)
|
||||
{
|
||||
CssClass = CssClassBase;
|
||||
if (string.IsNullOrEmpty(_cssClassExtra) == false)
|
||||
@@ -80,14 +80,13 @@ namespace VAR.Focus.Web.Controls
|
||||
Attributes.Add("placeholder", _placeHolder);
|
||||
}
|
||||
|
||||
if (_nextFocusOnEnter!=null)
|
||||
if (_nextFocusOnEnter != null)
|
||||
{
|
||||
this.Attributes.Add("onkeydown", String.Format(
|
||||
"if(event.keyCode==13){{document.getElementById('{0}').focus(); return false;}}",
|
||||
_nextFocusOnEnter.ClientID));
|
||||
}
|
||||
|
||||
|
||||
// FIX: The framework deletes textbox values on password mode
|
||||
if (TextMode == TextBoxMode.Password)
|
||||
{
|
||||
@@ -95,7 +94,7 @@ namespace VAR.Focus.Web.Controls
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
#endregion Control life cycle
|
||||
|
||||
#region Public methods
|
||||
|
||||
@@ -109,7 +108,6 @@ namespace VAR.Focus.Web.Controls
|
||||
return _allowEmpty || (string.IsNullOrEmpty(Text) == false);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#endregion Public methods
|
||||
}
|
||||
}
|
||||
@@ -25,7 +25,7 @@ namespace VAR.Focus.Web.Controls
|
||||
|
||||
private int _timeMoveAnimation = 500;
|
||||
|
||||
#endregion
|
||||
#endregion Declarations
|
||||
|
||||
#region Properties
|
||||
|
||||
@@ -71,8 +71,8 @@ namespace VAR.Focus.Web.Controls
|
||||
set { _timeMoveAnimation = value; }
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#endregion Properties
|
||||
|
||||
#region Control Life cycle
|
||||
|
||||
public CardBoardControl()
|
||||
@@ -80,12 +80,12 @@ namespace VAR.Focus.Web.Controls
|
||||
Init += ChatControl_Init;
|
||||
}
|
||||
|
||||
void ChatControl_Init(object sender, EventArgs e)
|
||||
private void ChatControl_Init(object sender, EventArgs e)
|
||||
{
|
||||
InitializeControls();
|
||||
}
|
||||
|
||||
#endregion
|
||||
#endregion Control Life cycle
|
||||
|
||||
#region Private methods
|
||||
|
||||
@@ -124,6 +124,6 @@ namespace VAR.Focus.Web.Controls
|
||||
Controls.Add(liScript);
|
||||
}
|
||||
|
||||
#endregion
|
||||
#endregion Private methods
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -15,7 +15,7 @@ namespace VAR.Focus.Web.Controls
|
||||
private static object _monitor = new object();
|
||||
private static Dictionary<int, CardBoard> _cardBoards = new Dictionary<int, CardBoard>();
|
||||
|
||||
#endregion
|
||||
#endregion Declarations
|
||||
|
||||
#region IHttpHandler
|
||||
|
||||
@@ -50,7 +50,7 @@ namespace VAR.Focus.Web.Controls
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
#endregion IHttpHandler
|
||||
|
||||
#region Private methods
|
||||
|
||||
@@ -195,6 +195,6 @@ namespace VAR.Focus.Web.Controls
|
||||
lock (_monitor) { Monitor.PulseAll(_monitor); }
|
||||
}
|
||||
|
||||
#endregion
|
||||
#endregion Private methods
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -26,7 +26,7 @@ namespace VAR.Focus.Web.Controls
|
||||
private Panel _divChatContainer = null;
|
||||
private Panel _divChatTitleBar = null;
|
||||
|
||||
#endregion
|
||||
#endregion Declarations
|
||||
|
||||
#region Properties
|
||||
|
||||
@@ -80,7 +80,7 @@ namespace VAR.Focus.Web.Controls
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
#endregion Properties
|
||||
|
||||
#region Control Life cycle
|
||||
|
||||
@@ -89,12 +89,12 @@ namespace VAR.Focus.Web.Controls
|
||||
Init += ChatControl_Init;
|
||||
}
|
||||
|
||||
void ChatControl_Init(object sender, EventArgs e)
|
||||
private void ChatControl_Init(object sender, EventArgs e)
|
||||
{
|
||||
InitializeControls();
|
||||
}
|
||||
|
||||
#endregion
|
||||
#endregion Control Life cycle
|
||||
|
||||
#region Private methods
|
||||
|
||||
@@ -131,7 +131,7 @@ namespace VAR.Focus.Web.Controls
|
||||
var btnSend = new Button { ID = "btnSend", Text = "Send", CssClass = "chatButton" };
|
||||
divChatControls.Controls.Add(btnSend);
|
||||
btnSend.Attributes.Add("onclick", string.Format("SendChat({0}); return false;", strCfgName));
|
||||
|
||||
|
||||
Dictionary<string, object> cfg = new Dictionary<string, object>
|
||||
{
|
||||
{"divChatWindow", _divChatWindow.ClientID},
|
||||
@@ -165,6 +165,6 @@ namespace VAR.Focus.Web.Controls
|
||||
Controls.Add(liScript);
|
||||
}
|
||||
|
||||
#endregion
|
||||
#endregion Private methods
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -15,7 +15,7 @@ namespace VAR.Focus.Web.Controls
|
||||
private static object _monitor = new object();
|
||||
private static Dictionary<string, MessageBoard> _chatBoards = new Dictionary<string, MessageBoard>();
|
||||
|
||||
#endregion
|
||||
#endregion Declarations
|
||||
|
||||
#region IHttpHandler
|
||||
|
||||
@@ -43,7 +43,7 @@ namespace VAR.Focus.Web.Controls
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
#endregion IHttpHandler
|
||||
|
||||
#region Private methods
|
||||
|
||||
@@ -120,6 +120,6 @@ namespace VAR.Focus.Web.Controls
|
||||
context.ResponseObject(new OperationStatus { IsOK = true, Message = "Message sent" });
|
||||
}
|
||||
|
||||
#endregion
|
||||
#endregion Private methods
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,8 +1,7 @@
|
||||
|
||||
namespace VAR.Focus.Web.Controls
|
||||
namespace VAR.Focus.Web.Controls
|
||||
{
|
||||
public interface IValidableControl
|
||||
{
|
||||
bool IsValid();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -78,7 +78,7 @@ namespace VAR.Focus.Web
|
||||
return null;
|
||||
}
|
||||
|
||||
#endregion
|
||||
#endregion Handlers
|
||||
|
||||
#region IHttpHandler
|
||||
|
||||
@@ -95,7 +95,7 @@ namespace VAR.Focus.Web
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
if(ex is ThreadAbortException)
|
||||
if (ex is ThreadAbortException)
|
||||
{
|
||||
return;
|
||||
}
|
||||
@@ -103,7 +103,7 @@ namespace VAR.Focus.Web
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
#endregion IHttpHandler
|
||||
|
||||
#region Private methods
|
||||
|
||||
@@ -117,7 +117,7 @@ namespace VAR.Focus.Web
|
||||
|
||||
// Pass allowed extensions requests
|
||||
string extension = Path.GetExtension(context.Request.FilePath).ToLower();
|
||||
if(Globals.AllowedExtensions.Contains(extension))
|
||||
if (Globals.AllowedExtensions.Contains(extension))
|
||||
{
|
||||
string filePath = context.Server.MapPath(string.Format("~/{0}", context.Request.FilePath));
|
||||
if (File.Exists(filePath))
|
||||
@@ -130,7 +130,7 @@ namespace VAR.Focus.Web
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
IHttpHandler handler = GetHandler(file);
|
||||
if (handler == null)
|
||||
{
|
||||
@@ -144,6 +144,6 @@ namespace VAR.Focus.Web
|
||||
handler.ProcessRequest(context);
|
||||
}
|
||||
|
||||
#endregion
|
||||
#endregion Private methods
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,5 +1,4 @@
|
||||
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace VAR.Focus.Web
|
||||
{
|
||||
@@ -8,8 +7,8 @@ namespace VAR.Focus.Web
|
||||
public const string Title = "Focus";
|
||||
public const string TitleSeparator = " :: ";
|
||||
public const string Author = "Valeriano Alfonso Rodriguez";
|
||||
public const string Copyright = "Copyright (c) 2015 by Valeriano Alfonso, All Right Reserved";
|
||||
public const string Copyright = "Copyright (c) 2015-2017 by Valeriano Alfonso, All Right Reserved";
|
||||
public const string DefaultHandler = "FrmBoard";
|
||||
public static List<string> AllowedExtensions = new List<string>{ ".png", ".jpg", ".jpeg", ".gif", ".ico", ".wav", ".mp3", ".ogg", ".mp4", ".webm", ".webp" };
|
||||
public static List<string> AllowedExtensions = new List<string> { ".png", ".jpg", ".jpeg", ".gif", ".ico", ".wav", ".mp3", ".ogg", ".mp4", ".webm", ".webp", ".mkv", ".avi" };
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -62,7 +62,8 @@ namespace VAR.Focus.Web.Pages
|
||||
return true;
|
||||
}
|
||||
|
||||
public static bool Controls_AreValid(ControlCollection controls) {
|
||||
public static bool Controls_AreValid(ControlCollection controls)
|
||||
{
|
||||
bool valid = true;
|
||||
foreach (Control control in controls)
|
||||
{
|
||||
|
||||
@@ -14,10 +14,10 @@ namespace VAR.Focus.Web.Pages
|
||||
|
||||
private int _idBoard = 0;
|
||||
|
||||
private CTextBox _txtTitle = new CTextBox { ID = "txtTitle", CssClassExtra="width100pc", AllowEmpty = false };
|
||||
private CTextBox _txtTitle = new CTextBox { ID = "txtTitle", CssClassExtra = "width100pc", AllowEmpty = false };
|
||||
private CTextBox _txtDescription = new CTextBox { ID = "txtDescription", CssClassExtra = "width100pc", TextMode = TextBoxMode.MultiLine };
|
||||
|
||||
#endregion
|
||||
#endregion Declarations
|
||||
|
||||
#region Life cycle
|
||||
|
||||
@@ -26,7 +26,7 @@ namespace VAR.Focus.Web.Pages
|
||||
Init += FrmBoard_Init;
|
||||
}
|
||||
|
||||
void FrmBoard_Init(object sender, EventArgs e)
|
||||
private void FrmBoard_Init(object sender, EventArgs e)
|
||||
{
|
||||
string strIDBoard = Context.GetRequestParm("idBoard");
|
||||
if (String.IsNullOrEmpty(strIDBoard) == false)
|
||||
@@ -43,19 +43,19 @@ namespace VAR.Focus.Web.Pages
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
#endregion Life cycle
|
||||
|
||||
#region UI Events
|
||||
|
||||
void btnAddBoard_Click(object sender, EventArgs e)
|
||||
private void btnAddBoard_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (FormUtils.Controls_AreValid(Controls) == false) { return; }
|
||||
|
||||
Board board = Boards.Current.Boards_SetBoard(0, _txtTitle.Text, _txtDescription.Text, CurrentUser.Name);
|
||||
_idBoard = board.IDBoard;
|
||||
|
||||
Response.Redirect(string.Format("{0}?idBoard={1}",
|
||||
typeof(FrmBoard).Name,
|
||||
Response.Redirect(string.Format("{0}?idBoard={1}",
|
||||
typeof(FrmBoard).Name,
|
||||
_idBoard));
|
||||
}
|
||||
|
||||
@@ -72,8 +72,8 @@ namespace VAR.Focus.Web.Pages
|
||||
{
|
||||
CButton btnEdit = (CButton)sender;
|
||||
int idBoard = Convert.ToInt32(btnEdit.CommandArgument);
|
||||
Response.Redirect(string.Format("{0}?idBoard={1}&returnUrl={2}",
|
||||
typeof(FrmBoardEdit).Name,
|
||||
Response.Redirect(string.Format("{0}?idBoard={1}&returnUrl={2}",
|
||||
typeof(FrmBoardEdit).Name,
|
||||
idBoard,
|
||||
typeof(FrmBoard).Name));
|
||||
}
|
||||
@@ -90,7 +90,7 @@ namespace VAR.Focus.Web.Pages
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
#endregion UI Events
|
||||
|
||||
#region Private methods
|
||||
|
||||
@@ -169,7 +169,6 @@ namespace VAR.Focus.Web.Pages
|
||||
_txtDescription.PlaceHolder = "Description";
|
||||
pnlBoardAdd.Controls.Add(FormUtils.CreatePanel("formRow", btnAddBoard));
|
||||
Controls.Add(pnlBoardAdd);
|
||||
|
||||
}
|
||||
|
||||
private void FrmBoard_InitBoard()
|
||||
@@ -194,7 +193,7 @@ namespace VAR.Focus.Web.Pages
|
||||
};
|
||||
Controls.Add(chatControl);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#endregion Private methods
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -18,7 +18,7 @@ namespace VAR.Focus.Web.Pages
|
||||
private CButton _btnSave = new CButton { ID = "btnSave" };
|
||||
private CButton _btnExit = new CButton { ID = "btnExit" };
|
||||
|
||||
#endregion
|
||||
#endregion Declarations
|
||||
|
||||
#region Page life cycle
|
||||
|
||||
@@ -36,7 +36,7 @@ namespace VAR.Focus.Web.Pages
|
||||
}
|
||||
}
|
||||
|
||||
void FrmBoardEdit_Init(object sender, EventArgs e)
|
||||
private void FrmBoardEdit_Init(object sender, EventArgs e)
|
||||
{
|
||||
string strIDBoard = Context.GetRequestParm("idBoard");
|
||||
if (String.IsNullOrEmpty(strIDBoard) == false)
|
||||
@@ -50,7 +50,7 @@ namespace VAR.Focus.Web.Pages
|
||||
InitializeComponents();
|
||||
}
|
||||
|
||||
#endregion
|
||||
#endregion Page life cycle
|
||||
|
||||
#region UI Events
|
||||
|
||||
@@ -76,7 +76,7 @@ namespace VAR.Focus.Web.Pages
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
#endregion UI Events
|
||||
|
||||
#region Private methods
|
||||
|
||||
@@ -85,7 +85,7 @@ namespace VAR.Focus.Web.Pages
|
||||
Title = "Register";
|
||||
var lblTitle = new CLabel { Text = "Register", Tag = "h2" };
|
||||
Controls.Add(lblTitle);
|
||||
|
||||
|
||||
Controls.Add(FormUtils.CreateField("Title", _txtTitle));
|
||||
_txtTitle.NextFocusOnEnter = _txtTitle;
|
||||
_txtTitle.PlaceHolder = "Title";
|
||||
@@ -113,7 +113,6 @@ namespace VAR.Focus.Web.Pages
|
||||
_txtDescription.Text = board.Description;
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#endregion Private methods
|
||||
}
|
||||
}
|
||||
@@ -20,6 +20,6 @@ namespace VAR.Focus.Web.Pages
|
||||
context.Response.Write("</code></pre>");
|
||||
}
|
||||
|
||||
#endregion
|
||||
#endregion IHttpHandler
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -10,9 +10,9 @@ namespace VAR.Focus.Web.Pages
|
||||
{
|
||||
#region Declarations
|
||||
|
||||
Exception _ex = null;
|
||||
private Exception _ex = null;
|
||||
|
||||
#endregion
|
||||
#endregion Declarations
|
||||
|
||||
#region Page life cycle
|
||||
|
||||
@@ -22,12 +22,12 @@ namespace VAR.Focus.Web.Pages
|
||||
Init += FrmError_Init;
|
||||
}
|
||||
|
||||
void FrmError_Init(object sender, EventArgs e)
|
||||
private void FrmError_Init(object sender, EventArgs e)
|
||||
{
|
||||
InitializeControls();
|
||||
}
|
||||
|
||||
#endregion
|
||||
#endregion Page life cycle
|
||||
|
||||
#region Private methods
|
||||
|
||||
@@ -60,6 +60,6 @@ namespace VAR.Focus.Web.Pages
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
#endregion Private methods
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -12,9 +12,9 @@ namespace VAR.Focus.Web.Pages
|
||||
|
||||
private CTextBox _txtNameEmail = new CTextBox { ID = "txtNameEmail", CssClassExtra = "width150px", AllowEmpty = false };
|
||||
private CTextBox _txtPassword = new CTextBox { ID = "txtPassword", CssClassExtra = "width150px", AllowEmpty = false, TextMode = TextBoxMode.Password };
|
||||
private CButton _btnLogin = new CButton { ID = "btnLogin"};
|
||||
private CButton _btnLogin = new CButton { ID = "btnLogin" };
|
||||
|
||||
#endregion
|
||||
#endregion Declarations
|
||||
|
||||
#region Page life cycle
|
||||
|
||||
@@ -29,7 +29,7 @@ namespace VAR.Focus.Web.Pages
|
||||
InitializeControls();
|
||||
}
|
||||
|
||||
#endregion
|
||||
#endregion Page life cycle
|
||||
|
||||
#region UI Events
|
||||
|
||||
@@ -47,7 +47,7 @@ namespace VAR.Focus.Web.Pages
|
||||
Response.Redirect(Globals.DefaultHandler);
|
||||
}
|
||||
|
||||
#endregion
|
||||
#endregion UI Events
|
||||
|
||||
#region Private methods
|
||||
|
||||
@@ -72,6 +72,6 @@ namespace VAR.Focus.Web.Pages
|
||||
Controls.Add(FormUtils.CreateField(String.Empty, new HyperLink { Text = "Register user", NavigateUrl = "FrmRegister" }));
|
||||
}
|
||||
|
||||
#endregion
|
||||
#endregion Private methods
|
||||
}
|
||||
}
|
||||
@@ -21,7 +21,7 @@ namespace VAR.Focus.Web.Pages
|
||||
private CLabel _lblSuccess = new CLabel { ID = "lblSuccess" };
|
||||
private CButton _btnExitSuccess = new CButton { ID = "btnExitSuccess" };
|
||||
|
||||
#endregion
|
||||
#endregion Declarations
|
||||
|
||||
#region Page life cycle
|
||||
|
||||
@@ -31,16 +31,16 @@ namespace VAR.Focus.Web.Pages
|
||||
Init += FrmRegister_Init;
|
||||
}
|
||||
|
||||
void FrmRegister_Init(object sender, EventArgs e)
|
||||
private void FrmRegister_Init(object sender, EventArgs e)
|
||||
{
|
||||
InitializeComponents();
|
||||
}
|
||||
|
||||
#endregion
|
||||
#endregion Page life cycle
|
||||
|
||||
#region UI Events
|
||||
|
||||
void btnRegister_Click(object sender, EventArgs e)
|
||||
private void btnRegister_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (FormUtils.Controls_AreValid(Controls) == false) { return; }
|
||||
|
||||
@@ -63,12 +63,12 @@ namespace VAR.Focus.Web.Pages
|
||||
_lblSuccess.Text = String.Format("User {0} created sucessfully", user.Name);
|
||||
}
|
||||
|
||||
void btnExit_Click(object sender, EventArgs e)
|
||||
private void btnExit_Click(object sender, EventArgs e)
|
||||
{
|
||||
Response.Redirect(Globals.DefaultHandler);
|
||||
}
|
||||
|
||||
#endregion
|
||||
#endregion UI Events
|
||||
|
||||
#region Private methods
|
||||
|
||||
@@ -102,11 +102,11 @@ namespace VAR.Focus.Web.Pages
|
||||
_btnExit.Text = "Exit";
|
||||
_btnExit.Click += btnExit_Click;
|
||||
|
||||
Panel pnlButtons=new Panel();
|
||||
Panel pnlButtons = new Panel();
|
||||
pnlButtons.Controls.Add(_btnRegister);
|
||||
pnlButtons.Controls.Add(_btnExit);
|
||||
_pnlRegister.Controls.Add(FormUtils.CreateField(String.Empty, pnlButtons));
|
||||
|
||||
|
||||
Controls.Add(_pnlSuccess);
|
||||
_pnlSuccess.Visible = false;
|
||||
|
||||
@@ -115,10 +115,8 @@ namespace VAR.Focus.Web.Pages
|
||||
_btnExitSuccess.Text = "Exit";
|
||||
_btnExitSuccess.Click += btnExit_Click;
|
||||
_pnlSuccess.Controls.Add(FormUtils.CreateField(String.Empty, _btnExitSuccess));
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#endregion Private methods
|
||||
}
|
||||
}
|
||||
@@ -25,7 +25,7 @@ namespace VAR.Focus.Web.Pages
|
||||
private bool _mustBeAutenticated = true;
|
||||
private User _currentUser = null;
|
||||
|
||||
#endregion
|
||||
#endregion Declarations
|
||||
|
||||
#region Properties
|
||||
|
||||
@@ -45,7 +45,7 @@ namespace VAR.Focus.Web.Pages
|
||||
get { return _currentUser; }
|
||||
}
|
||||
|
||||
#endregion
|
||||
#endregion Properties
|
||||
|
||||
#region Life cycle
|
||||
|
||||
@@ -56,7 +56,7 @@ namespace VAR.Focus.Web.Pages
|
||||
PreRender += PageCommon_PreRender;
|
||||
}
|
||||
|
||||
void PageCommon_PreInit(object sender, EventArgs e)
|
||||
private void PageCommon_PreInit(object sender, EventArgs e)
|
||||
{
|
||||
Session session = WebSessions.Current.Session_GetCurrent(Context);
|
||||
if (session != null)
|
||||
@@ -73,22 +73,22 @@ namespace VAR.Focus.Web.Pages
|
||||
}
|
||||
}
|
||||
|
||||
void PageCommon_Init(object sender, EventArgs e)
|
||||
private void PageCommon_Init(object sender, EventArgs e)
|
||||
{
|
||||
CreateControls();
|
||||
}
|
||||
|
||||
void PageCommon_PreRender(object sender, EventArgs e)
|
||||
private void PageCommon_PreRender(object sender, EventArgs e)
|
||||
{
|
||||
_head.Title = string.IsNullOrEmpty(Title) ? Globals.Title : String.Format("{0}{1}{2}", Title, Globals.TitleSeparator, Globals.Title);
|
||||
_btnLogout.Visible = (_currentUser != null);
|
||||
}
|
||||
|
||||
#endregion
|
||||
#endregion Life cycle
|
||||
|
||||
#region UI Events
|
||||
|
||||
void btnLogout_Click(object sender, EventArgs e)
|
||||
private void btnLogout_Click(object sender, EventArgs e)
|
||||
{
|
||||
WebSessions.Current.Session_FinalizeCurrent(Context);
|
||||
_currentUser = null;
|
||||
@@ -98,7 +98,7 @@ namespace VAR.Focus.Web.Pages
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
#endregion UI Events
|
||||
|
||||
#region Private methods
|
||||
|
||||
@@ -125,7 +125,6 @@ namespace VAR.Focus.Web.Pages
|
||||
_head.Controls.Add(new LiteralControl(String.Format("<script type=\"text/javascript\" src=\"ScriptsBundler?v={0}\"></script>\n", version)));
|
||||
_head.Controls.Add(new LiteralControl(String.Format("<link href=\"StylesBundler?v={0}\" type=\"text/css\" rel=\"stylesheet\"/>\n", version)));
|
||||
|
||||
|
||||
_body = new HtmlGenericControl("body");
|
||||
html.Controls.Add(_body);
|
||||
_form = new HtmlForm { ID = "formMain" };
|
||||
@@ -159,6 +158,6 @@ namespace VAR.Focus.Web.Pages
|
||||
_form.Controls.Add(_pnlContainer);
|
||||
}
|
||||
|
||||
#endregion
|
||||
#endregion Private methods
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,7 +1,7 @@
|
||||
using System.Reflection;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
// General Information about an assembly is controlled through the following
|
||||
// General Information about an assembly is controlled through the following
|
||||
// set of attributes. Change these attribute values to modify the information
|
||||
// associated with an assembly.
|
||||
[assembly: AssemblyTitle("VAR.Focus")]
|
||||
@@ -13,8 +13,8 @@ using System.Runtime.InteropServices;
|
||||
[assembly: AssemblyTrademark("")]
|
||||
[assembly: AssemblyCulture("")]
|
||||
|
||||
// Setting ComVisible to false makes the types in this assembly not visible
|
||||
// to COM components. If you need to access a type in this assembly from
|
||||
// Setting ComVisible to false makes the types in this assembly not visible
|
||||
// to COM components. If you need to access a type in this assembly from
|
||||
// COM, set the ComVisible attribute to true on that type.
|
||||
[assembly: ComVisible(false)]
|
||||
|
||||
@@ -24,10 +24,10 @@ using System.Runtime.InteropServices;
|
||||
// Version information for an assembly consists of the following four values:
|
||||
//
|
||||
// Major Version
|
||||
// Minor Version
|
||||
// Minor Version
|
||||
// Build Number
|
||||
// Revision
|
||||
//
|
||||
// You can specify all the values or you can default the Revision and Build Numbers
|
||||
// You can specify all the values or you can default the Revision and Build Numbers
|
||||
// by using the '*' as shown below:
|
||||
[assembly: AssemblyVersion("1.0.*")]
|
||||
[assembly: AssemblyVersion("1.0.*")]
|
||||
@@ -1,5 +1,4 @@
|
||||
|
||||
////////////////////////
|
||||
////////////////////////
|
||||
// GetElement
|
||||
//
|
||||
function GetElement(element) {
|
||||
@@ -53,7 +52,6 @@ function ElementToggleClass(element, className) {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
function escapeHTML(s) {
|
||||
return s.replace(/&/g, '&')
|
||||
.replace(/"/g, '"')
|
||||
@@ -67,7 +65,6 @@ function fixedEncodeURIComponent(str) {
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
////////////////////////
|
||||
// localStorage polyfill
|
||||
//
|
||||
@@ -94,4 +91,4 @@ if (!window.localStorage) {
|
||||
hasOwnProperty: function (sKey) { return (new RegExp("(?:^|;\\s*)" + escape(sKey).replace(/[\-\.\+\*]/g, "\\$&") + "\\s*\\=")).test(document.cookie); }
|
||||
};
|
||||
window.localStorage.length = (document.cookie.match(/\=/g) || window.localStorage).length;
|
||||
}
|
||||
}
|
||||
@@ -1,5 +1,4 @@
|
||||
|
||||
function SendRequest(url, data, onData, onError) {
|
||||
function SendRequest(url, data, onData, onError) {
|
||||
var xhr = new XMLHttpRequest();
|
||||
if (data) {
|
||||
url += "?" + GetDataQueryString(data);
|
||||
@@ -122,4 +121,4 @@ function SendForm(url, idForm, onData, onError) {
|
||||
xhr.setRequestHeader('Content-Type',
|
||||
'application/x-www-form-urlencoded');
|
||||
xhr.send(GetFormQueryString(idForm));
|
||||
}
|
||||
}
|
||||
@@ -1,5 +1,4 @@
|
||||
|
||||
var CosineInterpolation = function (f) {
|
||||
var CosineInterpolation = function (f) {
|
||||
return 1.0 - (Math.cos(f * Math.PI) + 1.0) / 2.0;
|
||||
};
|
||||
|
||||
@@ -84,7 +83,7 @@ Toolbox.prototype = {
|
||||
this.divToolbox.style.left = x + "px";
|
||||
this.divToolbox.style.top = y + "px";
|
||||
},
|
||||
SavePosition: function(){
|
||||
SavePosition: function () {
|
||||
var pos = { X: this.X, Y: this.Y };
|
||||
window.localStorage.setItem(this.StrKeyPosition, JSON.stringify(pos));
|
||||
},
|
||||
@@ -242,7 +241,7 @@ Card.prototype = {
|
||||
this.container.appendChild(this.divCard);
|
||||
this.cfg.Toolbox.ReInsertOnContainer();
|
||||
},
|
||||
RemoveFromContainer: function(){
|
||||
RemoveFromContainer: function () {
|
||||
this.container.removeChild(this.divCard);
|
||||
},
|
||||
MoveFrame: function () {
|
||||
@@ -537,11 +536,11 @@ Card.prototype = {
|
||||
document.removeEventListener("touchcancel", this.bindedTouchEnd, false);
|
||||
document.removeEventListener("touchmove", this.bindedTouchMove, false);
|
||||
|
||||
this.OnMove();
|
||||
this.OnMove();
|
||||
|
||||
return false;
|
||||
},
|
||||
EnterEditionMode: function(){
|
||||
EnterEditionMode: function () {
|
||||
this.divTitle.innerHTML = "";
|
||||
this.txtTitle.value = this.Title;
|
||||
this.divTitle.appendChild(this.txtTitle);
|
||||
@@ -556,7 +555,7 @@ Card.prototype = {
|
||||
this.divOverlay.style.display = "none";
|
||||
this.Editing = true;
|
||||
},
|
||||
ExitEditionMode: function(){
|
||||
ExitEditionMode: function () {
|
||||
this.divTitle.removeChild(this.txtTitle);
|
||||
this.divBody.removeChild(this.txtBody);
|
||||
this.divBody.removeChild(this.btnAcceptEdit);
|
||||
@@ -601,7 +600,7 @@ Card.prototype = {
|
||||
},
|
||||
btnDelete_Click: function (evt) {
|
||||
evt.preventDefault();
|
||||
if (this.IDCard==0 || confirm(this.cfg.Texts.ConfirmDelete)) {
|
||||
if (this.IDCard == 0 || confirm(this.cfg.Texts.ConfirmDelete)) {
|
||||
this.OnDelete();
|
||||
}
|
||||
return false;
|
||||
@@ -636,7 +635,7 @@ function RunCardBoard(cfg) {
|
||||
return false;
|
||||
}
|
||||
|
||||
var ProcessCardCreateEvent = function(cardEvent){
|
||||
var ProcessCardCreateEvent = function (cardEvent) {
|
||||
var card = new Card(cfg, cardEvent.IDCard, cardEvent.Title, cardEvent.Body, cardEvent.X, cardEvent.Y);
|
||||
};
|
||||
|
||||
@@ -661,7 +660,7 @@ function RunCardBoard(cfg) {
|
||||
var RequestCardEventData = function () {
|
||||
var ReciveCardEventData = function (responseText) {
|
||||
cfg.Connected = true;
|
||||
|
||||
|
||||
var recvData = JSON.parse(responseText);
|
||||
if (recvData && recvData instanceof Array) {
|
||||
for (var i = 0, n = recvData.length; i < n; i++) {
|
||||
@@ -708,4 +707,4 @@ function RunCardBoard(cfg) {
|
||||
SendRequest(cfg.ServiceUrl, data, ReciveCardEventData, ErrorCardEventData);
|
||||
};
|
||||
RequestCardEventData();
|
||||
}
|
||||
}
|
||||
@@ -81,7 +81,6 @@
|
||||
|
||||
var RequestChatData = function () {
|
||||
var ReciveChatData = function (responseText) {
|
||||
|
||||
// Mark as connected
|
||||
if (cfg.Connected == false) {
|
||||
if (cfg.Minimized) {
|
||||
@@ -134,7 +133,6 @@
|
||||
}, 20);
|
||||
};
|
||||
var ErrorChatData = function () {
|
||||
|
||||
// Mark as disconnected
|
||||
cfg.lblTitle.innerHTML = cfg.Texts.Disconnected;
|
||||
cfg.lblTitle.className = "titleChatDisconnected";
|
||||
@@ -180,4 +178,4 @@ function SendChat(cfg) {
|
||||
|
||||
cfg.txtText.value = "";
|
||||
cfg.txtText.focus();
|
||||
}
|
||||
}
|
||||
@@ -1,5 +1,4 @@
|
||||
|
||||
/* Reset */
|
||||
/* Reset */
|
||||
* {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
@@ -13,5 +12,4 @@ input[type="submit"]::-moz-focus-inner,
|
||||
input[type="reset"]::-moz-focus-inner {
|
||||
padding: 0 !important;
|
||||
border: 0 none !important;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,5 +1,4 @@
|
||||
|
||||
html {
|
||||
html {
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
@@ -84,7 +83,6 @@ h3 {
|
||||
box-shadow: 0 0 10px rgb(0,0,0);
|
||||
}
|
||||
|
||||
|
||||
.formColumn {
|
||||
display: inline-block;
|
||||
font-size: 0;
|
||||
@@ -101,6 +99,9 @@ h3 {
|
||||
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
|
||||
font-size: 12px;
|
||||
text-shadow: 0 1px 1px rgba(255,255,255,0.5);
|
||||
text-align: right;
|
||||
padding-right: 20px;
|
||||
vertical-align: top;
|
||||
}
|
||||
|
||||
.formLabel span:last-child::after {
|
||||
@@ -144,7 +145,6 @@ textarea.textbox {
|
||||
border: solid 1px black;
|
||||
}
|
||||
|
||||
|
||||
.button {
|
||||
padding: 5px;
|
||||
box-shadow: 0px 0px 10px rgba(0,0,0,0.5), inset 0 2px 5px rgba(255,255,255,1), inset 0 -2px 5px rgba(128,128,128,1);
|
||||
@@ -212,4 +212,4 @@ textarea.textbox {
|
||||
.width300px {
|
||||
width: 300px !important;
|
||||
max-width: 100% !important;
|
||||
}
|
||||
}
|
||||
@@ -36,4 +36,4 @@
|
||||
|
||||
.boardBanner .formRow:first-child {
|
||||
margin: 0;
|
||||
}
|
||||
}
|
||||
@@ -57,12 +57,11 @@
|
||||
color: rgb(127,127,255);
|
||||
background-color: rgb(0,0,128);
|
||||
}
|
||||
|
||||
|
||||
.divToolbox .btnToolbox:active {
|
||||
box-shadow: 0 2px 4px rgba(0,0,0,0.4) inset, 0 -2px 3px rgba(255,255,255,1) inset;
|
||||
}
|
||||
|
||||
|
||||
.divCard {
|
||||
position: absolute;
|
||||
background-color: rgb(255,255,0);
|
||||
@@ -162,4 +161,4 @@
|
||||
border-radius: 3px;
|
||||
box-shadow: 0 2px 4px rgba(0,0,0,0.4) inset, 0 -2px 3px rgba(255,255,255,1) inset;
|
||||
padding: 2px;
|
||||
}
|
||||
}
|
||||
@@ -141,7 +141,6 @@
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
|
||||
.chatButton {
|
||||
box-sizing: border-box;
|
||||
padding: 5px;
|
||||
@@ -165,4 +164,4 @@
|
||||
.chatButton:active {
|
||||
background-color: rgb(220,220,220);
|
||||
box-shadow: inset 0px 2px 5px rgba(255,255,255,1), inset 0px -2px 5px rgba(128,128,128,1);
|
||||
}
|
||||
}
|
||||
@@ -3,19 +3,19 @@
|
||||
<system.web>
|
||||
<compilation debug="true">
|
||||
<assemblies>
|
||||
<add assembly="System.Core, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
|
||||
<add assembly="System.Core, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089" />
|
||||
</assemblies>
|
||||
</compilation>
|
||||
<httpHandlers>
|
||||
<clear/>
|
||||
<add path="*" verb="*" type="VAR.Focus.Web.GlobalRouter"/>
|
||||
<clear />
|
||||
<add path="*" verb="*" type="VAR.Focus.Web.GlobalRouter" />
|
||||
</httpHandlers>
|
||||
</system.web>
|
||||
<system.webServer>
|
||||
<handlers>
|
||||
<clear/>
|
||||
<add name="GlobalRouter" path="*" verb="*" type="VAR.Focus.Web.GlobalRouter"/>
|
||||
<clear />
|
||||
<add name="GlobalRouter" path="*" verb="*" type="VAR.Focus.Web.GlobalRouter" />
|
||||
</handlers>
|
||||
<validation validateIntegratedModeConfiguration="false"/>
|
||||
<validation validateIntegratedModeConfiguration="false" />
|
||||
</system.webServer>
|
||||
</configuration>
|
||||
Reference in New Issue
Block a user