From b39fc89b918a6a46d06fd420a294e46546f017a4 Mon Sep 17 00:00:00 2001 From: Michael Schwarz Date: Thu, 3 Aug 2023 09:39:10 +0200 Subject: [PATCH] removed unused files --- AjaxPro/AjaxPro.csproj.vspscc | 10 -- AjaxPro/AjaxPro.vssscc | 10 -- AjaxPro/JSON/JavaScriptConverter.cs | 47 ------- AjaxPro/Security/Authentication.cs | 195 ---------------------------- AjaxPro/Web/UI/AjaxAutoComplete.cs | 153 ---------------------- 5 files changed, 415 deletions(-) delete mode 100644 AjaxPro/AjaxPro.csproj.vspscc delete mode 100644 AjaxPro/AjaxPro.vssscc delete mode 100644 AjaxPro/JSON/JavaScriptConverter.cs delete mode 100644 AjaxPro/Security/Authentication.cs delete mode 100644 AjaxPro/Web/UI/AjaxAutoComplete.cs diff --git a/AjaxPro/AjaxPro.csproj.vspscc b/AjaxPro/AjaxPro.csproj.vspscc deleted file mode 100644 index feffdec..0000000 --- a/AjaxPro/AjaxPro.csproj.vspscc +++ /dev/null @@ -1,10 +0,0 @@ -"" -{ -"FILE_VERSION" = "9237" -"ENLISTMENT_CHOICE" = "NEVER" -"PROJECT_FILE_RELATIVE_PATH" = "" -"NUMBER_OF_EXCLUDED_FILES" = "0" -"ORIGINAL_PROJECT_FILE_PATH" = "" -"NUMBER_OF_NESTED_PROJECTS" = "0" -"SOURCE_CONTROL_SETTINGS_PROVIDER" = "PROVIDER" -} diff --git a/AjaxPro/AjaxPro.vssscc b/AjaxPro/AjaxPro.vssscc deleted file mode 100644 index 794f014..0000000 --- a/AjaxPro/AjaxPro.vssscc +++ /dev/null @@ -1,10 +0,0 @@ -"" -{ -"FILE_VERSION" = "9237" -"ENLISTMENT_CHOICE" = "NEVER" -"PROJECT_FILE_RELATIVE_PATH" = "" -"NUMBER_OF_EXCLUDED_FILES" = "0" -"ORIGINAL_PROJECT_FILE_PATH" = "" -"NUMBER_OF_NESTED_PROJECTS" = "0" -"SOURCE_CONTROL_SETTINGS_PROVIDER" = "PROJECT" -} diff --git a/AjaxPro/JSON/JavaScriptConverter.cs b/AjaxPro/JSON/JavaScriptConverter.cs deleted file mode 100644 index 49e21ed..0000000 --- a/AjaxPro/JSON/JavaScriptConverter.cs +++ /dev/null @@ -1,47 +0,0 @@ -/* - * MS 06-05-30 removed this code - * - * - * - */ -//using System; -//using System.Text; -//using System.Collections; - -//namespace AjaxPro -//{ -// /// -// /// The two directions AJAX will convert objects. -// /// -// internal enum JavaScriptConverterDirectionType -// { -// Serialize, -// Deserialize -// } - -// /// -// /// Provides methods to get converters for JSON strings or .NET objects. -// /// -// public class JavaScriptConverter -// { -// /// -// /// Get a IJavaScriptConverter that will handle the serialization of the specified data type. -// /// -// /// The type to handle. -// /// Returns an instance of an IJavaScriptConverter. -// public static IJavaScriptConverter GetSerializableConverter(Type t) -// { -// return Utility.Settings.JavaScriptConverters.GetConverter(t, JavaScriptConverterDirectionType.Serialize); -// } - -// /// -// /// Get a IJavaScriptConverter that will handle the deserialization of the specified data type. -// /// -// /// The type to handle. -// /// Returns an instance of an IJavaScriptConverter. -// public static IJavaScriptConverter GetDeserializableConverter(Type t) -// { -// return Utility.Settings.JavaScriptConverters.GetConverter(t, JavaScriptConverterDirectionType.Deserialize); -// } -// } -//} \ No newline at end of file diff --git a/AjaxPro/Security/Authentication.cs b/AjaxPro/Security/Authentication.cs deleted file mode 100644 index d4e19cf..0000000 --- a/AjaxPro/Security/Authentication.cs +++ /dev/null @@ -1,195 +0,0 @@ -/* -using System; -using AjaxPro.Cryptography; - -namespace AjaxPro.Security -{ - /// - /// Represents error if ticket is too old. - /// - public class TicketExpiredException : Exception - { - private DateTime m_ExpireDate = DateTime.MinValue; - - public TicketExpiredException(DateTime expireDate) - { - m_ExpireDate = expireDate; - } - - /// - /// Returns the date the ticket was expired. - /// - public DateTime ExpireDate - { - get - { - return m_ExpireDate; - } - } - - public override string Message - { - get - { - return "Ticket has been expired!"; - } - } - - } - - /// - /// Represents a simple AuthenticationTicket class. - /// - public class Authentication : IAjaxAuthentication - { - private int m_UserID; - private int m_DataSetID; - private string m_DataSet; - - private DateTime m_TicketStartTime; - private TimeSpan ExpireTimespan = new TimeSpan(24, 0, 0); - - /// - /// - /// - public Authentication() - { - - } - - /// - /// - /// - /// The UserID stored in dbo.Accounts. - /// The full dataset as a string. - /// The DataSetID stored in dbo.DataSets. - public Authentication(int UserID, int DataSetID, string DataSet) - { - m_UserID = UserID; - m_DataSetID = DataSetID; - m_DataSet = DataSet; - } - - /// - /// - /// - /// The encrypted ticket. - public Authentication(string AuthenticationTicket) - { - ParseTicket(AuthenticationTicket); - } - - /// - /// - /// - /// The encrypted ticket. - internal void ParseTicket(string AuthenticationTicket) - { - WebDecrypter webDec = new WebDecrypter(); - string plainTicket = webDec.Decrypt(AuthenticationTicket, "password"); - - - if(plainTicket.IndexOf("|") < 0) - throw new Exception("Is not a valid AuthenticationTicket (1)!"); - - string[] TicketItems = plainTicket.Split(new Char[]{'|'}); - - if(TicketItems.Length != 4) - throw new Exception("Is not a valid AuthenticationTicket (2)!"); - - - - m_UserID = Convert.ToInt16(TicketItems[0]); - m_DataSetID = Convert.ToInt16(TicketItems[1]); - m_TicketStartTime = new DateTime(Convert.ToInt64(TicketItems[2])); - m_DataSet = TicketItems[3]; - - if(System.DateTime.Now - m_TicketStartTime > ExpireTimespan) - throw new TicketExpiredException(m_TicketStartTime + ExpireTimespan); - } - - /// - /// Gets the AuthenticationTicket for accessing PC-Topp.NET Webservices. - /// - public string AuthenticationTicket - { - get - { - m_TicketStartTime = System.DateTime.Now; - - string plainTicket = m_UserID.ToString() + "|" + m_DataSetID.ToString() + "|" + m_TicketStartTime.Ticks + "|" + m_DataSet; - - WebEncrypter webEnc = new WebEncrypter(); - return webEnc.Encrypt(plainTicket, "password"); - } - } - - /// - /// Refresh an AuthenticationTicket. - /// - /// The encrypted ticket. - /// The refreshed encrypted ticket. - public string RefreshTicket(string AuthenticationTicket) - { - ParseTicket(AuthenticationTicket); - return this.AuthenticationTicket; - } - - /// - /// Gets the UserID. - /// - public int UserID - { - get - { - return m_UserID; - } - set - { - m_UserID = value; - } - } - - /// - /// Gets the DataSetID for the specified DataSet. - /// - public int DataSetID - { - get - { - return m_DataSetID; - } - set - { - m_DataSetID = value; - } - } - - /// - /// Gets the DataSet for the specified DataSet. - /// - public string DataSet - { - get - { - return m_DataSet; - } - set - { - m_DataSet = value; - } - } - - /// - /// Gets the remaining time for this ticket after the ticket will be invalid. - /// - public TimeSpan RemainingTime - { - get - { - return ExpireTimespan - (System.DateTime.Now - m_TicketStartTime); - } - } - } -} -*/ \ No newline at end of file diff --git a/AjaxPro/Web/UI/AjaxAutoComplete.cs b/AjaxPro/Web/UI/AjaxAutoComplete.cs deleted file mode 100644 index 2c3f7cd..0000000 --- a/AjaxPro/Web/UI/AjaxAutoComplete.cs +++ /dev/null @@ -1,153 +0,0 @@ -//using System; -//using System.Collections.Generic; -//using System.Text; -//using System.Web; -//using System.Web.UI; -//using System.Web.UI.HtmlControls; -//using System.ComponentModel; -//using System.ComponentModel.Design; -//using System.Web.UI.Design; -//using System.Reflection; - -//namespace AjaxPro.Web.UI -//{ -// [ToolboxData("<{0}:AjaxAutoComplete runat=server>")] -// [Designer(typeof(HtmlSelectDesigner))] -// public class AjaxHtmlSelect : System.Web.UI.WebControls.TextBox -// { -// public AjaxHtmlSelect() -// : base() -// { -// } - -// [CategoryAttribute("Misc")] -// [DescriptionAttribute("")] -// public string LoadingMessage -// { -// get -// { -// return m_LoadingMessage; -// } -// set -// { -// m_LoadingMessage = value; -// } -// } - -// } - -// public class HtmlSelectDesigner : ControlDesigner -// { -// private DesignerActionListCollection al = null; - -// public override DesignerActionListCollection ActionLists -// { -// get -// { -// if (al == null) -// { -// al = new DesignerActionListCollection(); -// al.AddRange(base.ActionLists); - -// // Add a custom DesignerActionList -// al.Add(new HtmlSelectDesignerActionList(this)); -// } -// return al; - -// } -// } -// } - -// public class HtmlSelectDesignerActionList : DesignerActionList -// { -// HtmlSelectDesigner m_parent; - -// public HtmlSelectDesignerActionList(HtmlSelectDesigner parent) -// : base(parent.Component) -// { -// m_parent = parent; -// } - -// public override DesignerActionItemCollection GetSortedActionItems() -// { -// // Create list to store designer action items -// DesignerActionItemCollection actionItems = new DesignerActionItemCollection(); - -// // Add Appearance category header text -// //actionItems.Add(new DesignerActionHeaderItem("Misc")); - -// //// Add Appearance category descriptive label -// //actionItems.Add( -// // new DesignerActionTextItem( -// // "Properties that affect how the User looks.", -// // "Misc")); - -// actionItems.Add( -// new DesignerActionPropertyItem( -// "LoadingMessage", -// "Loading", -// GetCategory(this.WebControl, "LoadingMessage"), -// GetDescription(this.WebControl, "LoadingMessage"))); - -// //actionItems.Add( -// // new DesignerActionMethodItem( -// // this, -// // "ClearValues", -// // "Clear Values", -// // true)); - -// return actionItems; -// } - -// #region Control Proxy Properties - -// public string LoadingMessage -// { -// get { return WebControl.LoadingMessage; } -// set { SetProperty("LoadingMessage", value); } -// } - -// public void ClearValues() -// { - -// } - -// #endregion - - -// private AjaxHtmlSelect WebControl -// { -// get -// { -// return (AjaxHtmlSelect)this.Component; -// } -// } - -// private string GetCategory(object source, string propertyName) -// { -// PropertyInfo property = source.GetType().GetProperty(propertyName); -// CategoryAttribute attribute = (CategoryAttribute)property.GetCustomAttributes(typeof(CategoryAttribute), false)[0]; -// if (attribute == null) -// return null; -// return attribute.Category; -// } - -// private string GetDescription(object source, string propertyName) -// { -// PropertyInfo property = source.GetType().GetProperty(propertyName); -// DescriptionAttribute attribute = (DescriptionAttribute)property.GetCustomAttributes(typeof(DescriptionAttribute), false)[0]; -// if (attribute == null) -// return null; -// return attribute.Description; -// } - -// // Helper method to safely set a component’s property -// private void SetProperty(string propertyName, object value) -// { -// // Get property -// PropertyDescriptor property = TypeDescriptor.GetProperties(this.WebControl)[propertyName]; -// // Set property value -// property.SetValue(this.WebControl, value); -// } -// } -//}