From e43e1b088c544f49a1bf0f9a48483c7839c5c877 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakob=20Aar=C3=B8e=20Dam?= Date: Tue, 28 Apr 2015 07:23:19 +0200 Subject: [PATCH] Remove the unused testservice class --- RDSFactor/RDSFactor.vb | 30 ++------ RDSFactor/RDSFactor.vbproj | 9 --- RDSFactor/TestService.Designer.vb | 73 ------------------ RDSFactor/TestService.resx | 120 ------------------------------ RDSFactor/TestService.vb | 44 ----------- 5 files changed, 7 insertions(+), 269 deletions(-) delete mode 100644 RDSFactor/TestService.Designer.vb delete mode 100644 RDSFactor/TestService.resx delete mode 100644 RDSFactor/TestService.vb diff --git a/RDSFactor/RDSFactor.vb b/RDSFactor/RDSFactor.vb index 52b2e28..de8feb2 100644 --- a/RDSFactor/RDSFactor.vb +++ b/RDSFactor/RDSFactor.vb @@ -53,25 +53,8 @@ Public Class RDSFactor StartUpServer() End Sub - Public Sub OnstartTest() - Log.filePath = ApplicationPath() & "\log.txt" - UserAccessLog.filePath = ApplicationPath() & "\UserAccessLog.txt" - - ServerLog("---------------------------------------------------------------------------------------------------") - ServerLog("Starting Service") - ServerLog("Loading Configuration...") - loadConfiguration() - ServerLog("Starting Radius listner ports...") - StartUpServer() - End Sub - Protected Overrides Sub OnStop() ServerLog("Stopping Radius listner ports...") - - End Sub - - Public Sub OnStopTest() - ServerLog("Stopping Radius listner ports...") End Sub Public Sub StartUpServer() @@ -98,12 +81,13 @@ Public Class RDSFactor Exit Sub End If - Dim handler - If TSGW = "1" Then - handler = New RDSHandler(packet) - Else - 'handler = New CitrixHandler(packet) - End If + Dim handler = New RDSHandler(packet) + + ' If TSGW = "1" Then + ' handler = New RDSHandler(packet) + ' Else + ' handler = New CitrixHandler(packet) + ' End If handler.ProcessRequest() End Sub diff --git a/RDSFactor/RDSFactor.vbproj b/RDSFactor/RDSFactor.vbproj index 6982b83..31b7d9c 100644 --- a/RDSFactor/RDSFactor.vbproj +++ b/RDSFactor/RDSFactor.vbproj @@ -113,12 +113,6 @@ Component - - TestService.vb - - - Form - @@ -133,9 +127,6 @@ ProjectInstaller.vb - - TestService.vb - diff --git a/RDSFactor/TestService.Designer.vb b/RDSFactor/TestService.Designer.vb deleted file mode 100644 index 2a5077b..0000000 --- a/RDSFactor/TestService.Designer.vb +++ /dev/null @@ -1,73 +0,0 @@ - _ -Partial Class TestService - Inherits System.Windows.Forms.Form - - 'Form overrides dispose to clean up the component list. - _ - Protected Overrides Sub Dispose(ByVal disposing As Boolean) - Try - If disposing AndAlso components IsNot Nothing Then - components.Dispose() - End If - Finally - MyBase.Dispose(disposing) - End Try - End Sub - - 'Required by the Windows Form Designer - Private components As System.ComponentModel.IContainer - - 'NOTE: The following procedure is required by the Windows Form Designer - 'It can be modified using the Windows Form Designer. - 'Do not modify it using the code editor. - _ - Private Sub InitializeComponent() - Me.btnStart = New System.Windows.Forms.Button() - Me.btnStop = New System.Windows.Forms.Button() - Me.Button1 = New System.Windows.Forms.Button() - Me.SuspendLayout() - ' - 'btnStart - ' - Me.btnStart.Location = New System.Drawing.Point(38, 41) - Me.btnStart.Name = "btnStart" - Me.btnStart.Size = New System.Drawing.Size(75, 23) - Me.btnStart.TabIndex = 0 - Me.btnStart.Text = "Start" - Me.btnStart.UseVisualStyleBackColor = True - ' - 'btnStop - ' - Me.btnStop.Location = New System.Drawing.Point(38, 95) - Me.btnStop.Name = "btnStop" - Me.btnStop.Size = New System.Drawing.Size(75, 23) - Me.btnStop.TabIndex = 1 - Me.btnStop.Text = "Stop" - Me.btnStop.UseVisualStyleBackColor = True - ' - 'Button1 - ' - Me.Button1.Location = New System.Drawing.Point(175, 40) - Me.Button1.Name = "Button1" - Me.Button1.Size = New System.Drawing.Size(75, 23) - Me.Button1.TabIndex = 2 - Me.Button1.Text = "Button1" - Me.Button1.UseVisualStyleBackColor = True - ' - 'TestService - ' - Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!) - Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font - Me.ClientSize = New System.Drawing.Size(292, 273) - Me.Controls.Add(Me.Button1) - Me.Controls.Add(Me.btnStop) - Me.Controls.Add(Me.btnStart) - Me.Name = "TestService" - Me.Text = "TestService" - Me.ResumeLayout(False) - - End Sub - Friend WithEvents btnStart As System.Windows.Forms.Button - Friend WithEvents btnStop As System.Windows.Forms.Button - Friend WithEvents Button1 As System.Windows.Forms.Button -End Class diff --git a/RDSFactor/TestService.resx b/RDSFactor/TestService.resx deleted file mode 100644 index 29dcb1b..0000000 --- a/RDSFactor/TestService.resx +++ /dev/null @@ -1,120 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - text/microsoft-resx - - - 2.0 - - - System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - \ No newline at end of file diff --git a/RDSFactor/TestService.vb b/RDSFactor/TestService.vb deleted file mode 100644 index 0e8ffb6..0000000 --- a/RDSFactor/TestService.vb +++ /dev/null @@ -1,44 +0,0 @@ -Imports RDSFactor - -Public Class TestService - - Private Radius_Service As New RDSFactor - Private Sub btnStart_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnStart.Click - btnStart.Enabled = False - Call Radius_Service.OnstartTest() - End Sub - - - Private Sub btnStop_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnStop.Click - Call Radius_Service.OnStopTest() - End - End Sub - - Private Sub Button1_Click(sender As System.Object, e As System.EventArgs) Handles Button1.Click - Button1.Enabled = False - Dim SessionTimeOut As Integer = 1 - Dim TSGWSessionIdTimeStampHash As New Hashtable - Dim TSGWSessionIdHash As New Hashtable - TSGWSessionIdTimeStampHash.Add("ged", Now) - Threading.Thread.Sleep(65000) - Dim timeValid As Long = 0 - Dim hashTime As DateTime = DirectCast(TSGWSessionIdTimeStampHash("ged"), DateTime) - timeValid = DateDiff(DateInterval.Second, hashTime, Now) - MsgBox(timeValid) - - - Dim Item As DictionaryEntry - - - For Each Item In TSGWSessionIdTimeStampHash - Dim hTime As DateTime = DirectCast(Item.Value, DateTime) - Dim tValid = DateDiff(DateInterval.Minute, hTime, Now) - If tValid >= SessionTimeOut Then - TSGWSessionIdTimeStampHash.Remove(Item.Key) - If TSGWSessionIdHash.Contains(Item.Key) Then - TSGWSessionIdHash.Remove(Item.Key) - End If - End If - Next - End Sub -End Class \ No newline at end of file