diff --git a/VAR.Focus.Web/Code/Bundler.cs b/VAR.Focus.Web/Code/Bundler.cs index d09dc14..5338232 100644 --- a/VAR.Focus.Web/Code/Bundler.cs +++ b/VAR.Focus.Web/Code/Bundler.cs @@ -12,7 +12,7 @@ namespace VAR.Focus.Web.Code private string _path = null; private List _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 } -} +} \ No newline at end of file diff --git a/VAR.Focus.Web/Code/ExtensionMethods.cs b/VAR.Focus.Web/Code/ExtensionMethods.cs index 551b8b2..8ce7406 100644 --- a/VAR.Focus.Web/Code/ExtensionMethods.cs +++ b/VAR.Focus.Web/Code/ExtensionMethods.cs @@ -27,7 +27,6 @@ namespace VAR.Focus.Web.Code context.Response.Write(strObject); } - #endregion - + #endregion HttpContext } } \ No newline at end of file diff --git a/VAR.Focus.Web/Code/GlobalErrorHandler.cs b/VAR.Focus.Web/Code/GlobalErrorHandler.cs index a951fc8..fcaaa8e 100644 --- a/VAR.Focus.Web/Code/GlobalErrorHandler.cs +++ b/VAR.Focus.Web/Code/GlobalErrorHandler.cs @@ -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 } -} +} \ No newline at end of file diff --git a/VAR.Focus.Web/Code/ScriptsBundler.cs b/VAR.Focus.Web/Code/ScriptsBundler.cs index 4a01248..d76e464 100644 --- a/VAR.Focus.Web/Code/ScriptsBundler.cs +++ b/VAR.Focus.Web/Code/ScriptsBundler.cs @@ -15,6 +15,6 @@ namespace VAR.Focus.Web.Code bundler.WriteResponse(context.Response.OutputStream); } - #endregion + #endregion IHttpHandler } -} +} \ No newline at end of file diff --git a/VAR.Focus.Web/Code/StylesBundler.cs b/VAR.Focus.Web/Code/StylesBundler.cs index deb1a5a..4c78e6d 100644 --- a/VAR.Focus.Web/Code/StylesBundler.cs +++ b/VAR.Focus.Web/Code/StylesBundler.cs @@ -15,6 +15,6 @@ namespace VAR.Focus.Web.Code bundler.WriteResponse(context.Response.OutputStream); } - #endregion + #endregion IHttpHandler } -} +} \ No newline at end of file diff --git a/VAR.Focus.Web/Code/WebSessions.cs b/VAR.Focus.Web/Code/WebSessions.cs index f8c77d0..14cdd1a 100644 --- a/VAR.Focus.Web/Code/WebSessions.cs +++ b/VAR.Focus.Web/Code/WebSessions.cs @@ -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 } } \ No newline at end of file diff --git a/VAR.Focus.Web/Controls/CLabel.cs b/VAR.Focus.Web/Controls/CLabel.cs index 95faf84..7194899 100644 --- a/VAR.Focus.Web/Controls/CLabel.cs +++ b/VAR.Focus.Web/Controls/CLabel.cs @@ -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 } -} +} \ No newline at end of file diff --git a/VAR.Focus.Web/Controls/CTextBox.cs b/VAR.Focus.Web/Controls/CTextBox.cs index 9ea32b0..2c0b78a 100644 --- a/VAR.Focus.Web/Controls/CTextBox.cs +++ b/VAR.Focus.Web/Controls/CTextBox.cs @@ -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 } } \ No newline at end of file diff --git a/VAR.Focus.Web/Controls/CardBoardControl.cs b/VAR.Focus.Web/Controls/CardBoardControl.cs index 4257bfb..c7ba99b 100644 --- a/VAR.Focus.Web/Controls/CardBoardControl.cs +++ b/VAR.Focus.Web/Controls/CardBoardControl.cs @@ -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 } -} +} \ No newline at end of file diff --git a/VAR.Focus.Web/Controls/CardBoardHandler.cs b/VAR.Focus.Web/Controls/CardBoardHandler.cs index 256a0bd..fb3ad84 100644 --- a/VAR.Focus.Web/Controls/CardBoardHandler.cs +++ b/VAR.Focus.Web/Controls/CardBoardHandler.cs @@ -15,7 +15,7 @@ namespace VAR.Focus.Web.Controls private static object _monitor = new object(); private static Dictionary _cardBoards = new Dictionary(); - #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 } -} +} \ No newline at end of file diff --git a/VAR.Focus.Web/Controls/ChatControl.cs b/VAR.Focus.Web/Controls/ChatControl.cs index 6caadb2..85f74a5 100644 --- a/VAR.Focus.Web/Controls/ChatControl.cs +++ b/VAR.Focus.Web/Controls/ChatControl.cs @@ -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 cfg = new Dictionary { {"divChatWindow", _divChatWindow.ClientID}, @@ -165,6 +165,6 @@ namespace VAR.Focus.Web.Controls Controls.Add(liScript); } - #endregion + #endregion Private methods } -} +} \ No newline at end of file diff --git a/VAR.Focus.Web/Controls/ChatHandler.cs b/VAR.Focus.Web/Controls/ChatHandler.cs index f19152f..0a77e6b 100644 --- a/VAR.Focus.Web/Controls/ChatHandler.cs +++ b/VAR.Focus.Web/Controls/ChatHandler.cs @@ -15,7 +15,7 @@ namespace VAR.Focus.Web.Controls private static object _monitor = new object(); private static Dictionary _chatBoards = new Dictionary(); - #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 } -} +} \ No newline at end of file diff --git a/VAR.Focus.Web/Controls/IValidableControl.cs b/VAR.Focus.Web/Controls/IValidableControl.cs index 627c761..e49fc6a 100644 --- a/VAR.Focus.Web/Controls/IValidableControl.cs +++ b/VAR.Focus.Web/Controls/IValidableControl.cs @@ -1,8 +1,7 @@ - -namespace VAR.Focus.Web.Controls +namespace VAR.Focus.Web.Controls { public interface IValidableControl { bool IsValid(); } -} +} \ No newline at end of file diff --git a/VAR.Focus.Web/GlobalRouter.cs b/VAR.Focus.Web/GlobalRouter.cs index 4e19d41..bd34560 100644 --- a/VAR.Focus.Web/GlobalRouter.cs +++ b/VAR.Focus.Web/GlobalRouter.cs @@ -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 } -} +} \ No newline at end of file diff --git a/VAR.Focus.Web/Globals.cs b/VAR.Focus.Web/Globals.cs index 3ef12b1..c8210b4 100644 --- a/VAR.Focus.Web/Globals.cs +++ b/VAR.Focus.Web/Globals.cs @@ -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 AllowedExtensions = new List{ ".png", ".jpg", ".jpeg", ".gif", ".ico", ".wav", ".mp3", ".ogg", ".mp4", ".webm", ".webp" }; + public static List AllowedExtensions = new List { ".png", ".jpg", ".jpeg", ".gif", ".ico", ".wav", ".mp3", ".ogg", ".mp4", ".webm", ".webp", ".mkv", ".avi" }; } -} +} \ No newline at end of file diff --git a/VAR.Focus.Web/Pages/FormUtils.cs b/VAR.Focus.Web/Pages/FormUtils.cs index 878dfbd..60246a3 100644 --- a/VAR.Focus.Web/Pages/FormUtils.cs +++ b/VAR.Focus.Web/Pages/FormUtils.cs @@ -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) { diff --git a/VAR.Focus.Web/Pages/FrmBoard.cs b/VAR.Focus.Web/Pages/FrmBoard.cs index 8f72f65..9bd10bd 100644 --- a/VAR.Focus.Web/Pages/FrmBoard.cs +++ b/VAR.Focus.Web/Pages/FrmBoard.cs @@ -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 } -} +} \ No newline at end of file diff --git a/VAR.Focus.Web/Pages/FrmBoardEdit.cs b/VAR.Focus.Web/Pages/FrmBoardEdit.cs index 8d4ed14..3acadc5 100644 --- a/VAR.Focus.Web/Pages/FrmBoardEdit.cs +++ b/VAR.Focus.Web/Pages/FrmBoardEdit.cs @@ -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 } } \ No newline at end of file diff --git a/VAR.Focus.Web/Pages/FrmEcho.cs b/VAR.Focus.Web/Pages/FrmEcho.cs index bd9c0d2..1f0ff40 100644 --- a/VAR.Focus.Web/Pages/FrmEcho.cs +++ b/VAR.Focus.Web/Pages/FrmEcho.cs @@ -20,6 +20,6 @@ namespace VAR.Focus.Web.Pages context.Response.Write(""); } - #endregion + #endregion IHttpHandler } -} +} \ No newline at end of file diff --git a/VAR.Focus.Web/Pages/FrmError.cs b/VAR.Focus.Web/Pages/FrmError.cs index bfffccd..09eb6dd 100644 --- a/VAR.Focus.Web/Pages/FrmError.cs +++ b/VAR.Focus.Web/Pages/FrmError.cs @@ -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 } -} +} \ No newline at end of file diff --git a/VAR.Focus.Web/Pages/FrmLogin.cs b/VAR.Focus.Web/Pages/FrmLogin.cs index 3f6c18e..0d0f963 100644 --- a/VAR.Focus.Web/Pages/FrmLogin.cs +++ b/VAR.Focus.Web/Pages/FrmLogin.cs @@ -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 } } \ No newline at end of file diff --git a/VAR.Focus.Web/Pages/FrmRegister.cs b/VAR.Focus.Web/Pages/FrmRegister.cs index 4c44ab8..5c70f8c 100644 --- a/VAR.Focus.Web/Pages/FrmRegister.cs +++ b/VAR.Focus.Web/Pages/FrmRegister.cs @@ -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 } } \ No newline at end of file diff --git a/VAR.Focus.Web/Pages/PageCommon.cs b/VAR.Focus.Web/Pages/PageCommon.cs index 5610b31..126ef12 100644 --- a/VAR.Focus.Web/Pages/PageCommon.cs +++ b/VAR.Focus.Web/Pages/PageCommon.cs @@ -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("\n", version))); _head.Controls.Add(new LiteralControl(String.Format("\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 } -} +} \ No newline at end of file diff --git a/VAR.Focus.Web/Properties/AssemblyInfo.cs b/VAR.Focus.Web/Properties/AssemblyInfo.cs index f144640..2c3733a 100644 --- a/VAR.Focus.Web/Properties/AssemblyInfo.cs +++ b/VAR.Focus.Web/Properties/AssemblyInfo.cs @@ -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.*")] \ No newline at end of file diff --git a/VAR.Focus.Web/Scripts/01. Base.js b/VAR.Focus.Web/Scripts/01. Base.js index 8dfdc1e..6f75aa8 100644 --- a/VAR.Focus.Web/Scripts/01. Base.js +++ b/VAR.Focus.Web/Scripts/01. Base.js @@ -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; -} +} \ No newline at end of file diff --git a/VAR.Focus.Web/Scripts/02. Ajax.js b/VAR.Focus.Web/Scripts/02. Ajax.js index 69a089b..4b0d7cb 100644 --- a/VAR.Focus.Web/Scripts/02. Ajax.js +++ b/VAR.Focus.Web/Scripts/02. Ajax.js @@ -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)); -} +} \ No newline at end of file diff --git a/VAR.Focus.Web/Scripts/05. Cards.js b/VAR.Focus.Web/Scripts/05. Cards.js index caebe57..8f7c4ba 100644 --- a/VAR.Focus.Web/Scripts/05. Cards.js +++ b/VAR.Focus.Web/Scripts/05. Cards.js @@ -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(); -} +} \ No newline at end of file diff --git a/VAR.Focus.Web/Scripts/10. Chat.js b/VAR.Focus.Web/Scripts/10. Chat.js index 126f35f..361173c 100644 --- a/VAR.Focus.Web/Scripts/10. Chat.js +++ b/VAR.Focus.Web/Scripts/10. Chat.js @@ -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(); -} +} \ No newline at end of file diff --git a/VAR.Focus.Web/Styles/00. Reset.css b/VAR.Focus.Web/Styles/00. Reset.css index d452c0a..0720322 100644 --- a/VAR.Focus.Web/Styles/00. Reset.css +++ b/VAR.Focus.Web/Styles/00. Reset.css @@ -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; -} - +} \ No newline at end of file diff --git a/VAR.Focus.Web/Styles/01. base.css b/VAR.Focus.Web/Styles/01. base.css index 021f707..f6e2fe6 100644 --- a/VAR.Focus.Web/Styles/01. base.css +++ b/VAR.Focus.Web/Styles/01. base.css @@ -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; -} +} \ No newline at end of file diff --git a/VAR.Focus.Web/Styles/02. Boards.css b/VAR.Focus.Web/Styles/02. Boards.css index 7ed7aa0..aff9f03 100644 --- a/VAR.Focus.Web/Styles/02. Boards.css +++ b/VAR.Focus.Web/Styles/02. Boards.css @@ -36,4 +36,4 @@ .boardBanner .formRow:first-child { margin: 0; - } + } \ No newline at end of file diff --git a/VAR.Focus.Web/Styles/05. Cards.css b/VAR.Focus.Web/Styles/05. Cards.css index b262008..df6f794 100644 --- a/VAR.Focus.Web/Styles/05. Cards.css +++ b/VAR.Focus.Web/Styles/05. Cards.css @@ -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; - } + } \ No newline at end of file diff --git a/VAR.Focus.Web/Styles/10. Chat.css b/VAR.Focus.Web/Styles/10. Chat.css index 2d9eb1a..5d1bbc0 100644 --- a/VAR.Focus.Web/Styles/10. Chat.css +++ b/VAR.Focus.Web/Styles/10. Chat.css @@ -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); - } + } \ No newline at end of file diff --git a/VAR.Focus.Web/web.config b/VAR.Focus.Web/web.config index 764056b..83bd80f 100644 --- a/VAR.Focus.Web/web.config +++ b/VAR.Focus.Web/web.config @@ -3,19 +3,19 @@ - + - - + + - - + + - + \ No newline at end of file