'DEVELOPER: K. A. Victor
'PROGRAM: File Searcher
'CREATED DATE: 23 August 2011
'SCHOOL: INTI IU, NILAI, MALAYSIA
'EMAIL: goldslate.tech@gmail.com#Region "Imports"Imports System.IO
Imports
System.Windows.Forms.Form#End
Public
Region Class frmMainInherits System.Windows.Forms.Form#Region "Windows Form Generated Codes"
InitializeComponent()
Public Sub New()MyBase.New()End Sub'Form overrides dispose to clean up the component list.<System.Diagnostics.DebuggerNonUserCode()> _
Protected Overloads Overrides Sub Dispose(ByVal disposing As Boolean)TryIf disposing AndAlso components IsNot Nothing Thencomponents.Dispose()
End IfFinally
MyBase.Dispose(disposing)End TryEnd Sub
Friend WithEvents panMain As System.Windows.Forms.PanelFriend WithEvents btnLoadDire As System.Windows.Forms.ButtonFriend WithEvents TbCtrlMain As System.Windows.Forms.TabControlFriend WithEvents tbpgResult As System.Windows.Forms.TabPageFriend WithEvents tbpgContains As System.Windows.Forms.TabPageFriend WithEvents GroupBox1 As System.Windows.Forms.GroupBoxFriend WithEvents lblTimer As System.Windows.Forms.LabelFriend WithEvents lblNumItems As System.Windows.Forms.LabelFriend WithEvents lblNumDirectory As System.Windows.Forms.LabelFriend WithEvents lblResult As System.Windows.Forms.LabelFriend WithEvents btnClose As System.Windows.Forms.ButtonFriend WithEvents TimerMonitorDeploy As System.Windows.Forms.TimerFriend WithEvents TimerKeepMyTime As System.Windows.Forms.TimerFriend WithEvents ToolStrip1 As System.Windows.Forms.ToolStripFriend WithEvents TStbxSearch As System.Windows.Forms.ToolStripTextBoxFriend WithEvents Imglt As System.Windows.Forms.ImageListFriend WithEvents lsbMatch As System.Windows.Forms.ListBoxFriend WithEvents lsbContains As System.Windows.Forms.ListBoxFriend WithEvents btnReset As System.Windows.Forms.ButtonFriend WithEvents lblInformer As System.Windows.Forms.Label'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.<System.Diagnostics.DebuggerStepThrough()> _
Private Sub InitializeComponent()Me.components = New System.ComponentModel.ContainerDim resources As System.ComponentModel.ComponentResourceManager = New System.ComponentModel.ComponentResourceManager(GetType(frmMain))Me.panBorder_T = New System.Windows.Forms.PanelMe.lblMainName = New System.Windows.Forms.LabelMe.lblMini = New System.Windows.Forms.LabelMe.panBorder_L = New System.Windows.Forms.PanelMe.panBorder_R = New System.Windows.Forms.PanelMe.panBorder_B = New System.Windows.Forms.PanelMe.btnReset = New System.Windows.Forms.ButtonMe.btnClose = New System.Windows.Forms.ButtonMe.GroupBox1 = New System.Windows.Forms.GroupBoxMe.lblTimer = New System.Windows.Forms.LabelMe.lblNumItems = New System.Windows.Forms.LabelMe.lblNumDirectory = New System.Windows.Forms.LabelMe.lblResult = New System.Windows.Forms.LabelMe.panMain = New System.Windows.Forms.PanelMe.TbCtrlMain = New System.Windows.Forms.TabControlMe.tbpgResult = New System.Windows.Forms.TabPageMe.lsbMatch = New System.Windows.Forms.ListBoxMe.tbpgContains = New System.Windows.Forms.TabPageMe.lsbContains = New System.Windows.Forms.ListBoxMe.ToolStrip1 = New System.Windows.Forms.ToolStripMe.TStbxSearch = New System.Windows.Forms.ToolStripTextBoxMe.btnLoadDire = New System.Windows.Forms.ButtonMe.Imglt = New System.Windows.Forms.ImageList(Me.components)Me.TimerMonitorDeploy = New System.Windows.Forms.Timer(Me.components)Me.TimerKeepMyTime = New System.Windows.Forms.Timer(Me.components)Me.lblInformer = New System.Windows.Forms.LabelMe.panBorder_T.SuspendLayout()Me.panBorder_B.SuspendLayout()Me.GroupBox1.SuspendLayout()Me.panMain.SuspendLayout()Me.TbCtrlMain.SuspendLayout()Me.tbpgResult.SuspendLayout()Me.tbpgContains.SuspendLayout()Me.ToolStrip1.SuspendLayout()Me.SuspendLayout()''panBorder_T'
Me.panBorder_T.BackColor = System.Drawing.Color.SilverMe.panBorder_T.Controls.Add(Me.lblMainName)Me.panBorder_T.Controls.Add(Me.lblMini)Me.panBorder_T.Dock = System.Windows.Forms.DockStyle.TopMe.panBorder_T.Location = New System.Drawing.Point(5, 0)Me.panBorder_T.Name = "panBorder_T"
Me.panBorder_T.Size = New System.Drawing.Size(288, 30)Me.panBorder_T.TabIndex = 0''lblMainName'
Me.lblMainName.Dock = System.Windows.Forms.DockStyle.FillMe.lblMainName.Font = New System.Drawing.Font("Microsoft Sans Serif", 12.0!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))Me.lblMainName.ForeColor = System.Drawing.Color.BlueMe.lblMainName.Location = New System.Drawing.Point(0, 0)Me.lblMainName.Name = "lblMainName"
Me.lblMainName.Size = New System.Drawing.Size(269, 30)Me.lblMainName.TabIndex = 2Me.lblMainName.Text = "K1 - Commando"
Me.lblMainName.TextAlign = System.Drawing.ContentAlignment.MiddleCenter''lblMini'
Me.lblMini.Dock = System.Windows.Forms.DockStyle.RightMe.lblMini.ForeColor = System.Drawing.Color.BlueMe.lblMini.Location = New System.Drawing.Point(269, 0)Me.lblMini.Name = "lblMini"
Me.lblMini.Size = New System.Drawing.Size(19, 30)Me.lblMini.TabIndex = 1Me.lblMini.Text = "_"
Me.lblMini.TextAlign = System.Drawing.ContentAlignment.MiddleCenter''panBorder_L'
Me.panBorder_L.BackColor = System.Drawing.Color.SilverMe.panBorder_L.Dock = System.Windows.Forms.DockStyle.LeftMe.panBorder_L.Location = New System.Drawing.Point(0, 0)Me.panBorder_L.Name = "panBorder_L"
Me.panBorder_L.Size = New System.Drawing.Size(5, 553)Me.panBorder_L.TabIndex = 1''panBorder_R'
Me.panBorder_R.BackColor = System.Drawing.Color.SilverMe.panBorder_R.Dock = System.Windows.Forms.DockStyle.RightMe.panBorder_R.Location = New System.Drawing.Point(293, 0)Me.panBorder_R.Name = "panBorder_R"
Me.panBorder_R.Size = New System.Drawing.Size(5, 553)Me.panBorder_R.TabIndex = 2''panBorder_B'
Me.panBorder_B.BackColor = System.Drawing.Color.SilverMe.panBorder_B.Controls.Add(Me.lblInformer)Me.panBorder_B.Controls.Add(Me.btnReset)Me.panBorder_B.Controls.Add(Me.btnClose)Me.panBorder_B.Controls.Add(Me.GroupBox1)Me.panBorder_B.Dock = System.Windows.Forms.DockStyle.BottomMe.panBorder_B.Location = New System.Drawing.Point(5, 394)Me.panBorder_B.Name = "panBorder_B"
Me.panBorder_B.Size = New System.Drawing.Size(288, 159)Me.panBorder_B.TabIndex = 3''btnReset'
Me.btnReset.Location = New System.Drawing.Point(7, 131)Me.btnReset.Name = "btnReset"
Me.btnReset.Size = New System.Drawing.Size(129, 23)Me.btnReset.TabIndex = 3Me.btnReset.Text = "Clear Search Result"Me.btnReset.UseVisualStyleBackColor = True''btnClose'
Me.btnClose.Location = New System.Drawing.Point(206, 131)Me.btnClose.Name = "btnClose"
Me.btnClose.Size = New System.Drawing.Size(75, 23)Me.btnClose.TabIndex = 1Me.btnClose.Text = "Exit"Me.btnClose.UseVisualStyleBackColor = True''GroupBox1'
Me.GroupBox1.Controls.Add(Me.lblTimer)Me.GroupBox1.Controls.Add(Me.lblNumItems)Me.GroupBox1.Controls.Add(Me.lblNumDirectory)Me.GroupBox1.Controls.Add(Me.lblResult)Me.GroupBox1.Dock = System.Windows.Forms.DockStyle.TopMe.GroupBox1.Location = New System.Drawing.Point(0, 0)Me.GroupBox1.Name = "GroupBox1"
Me.GroupBox1.Size = New System.Drawing.Size(288, 106)Me.GroupBox1.TabIndex = 0Me.GroupBox1.TabStop = FalseMe.GroupBox1.Text = "Result Outline"''lblTimer'
Me.lblTimer.Dock = System.Windows.Forms.DockStyle.TopMe.lblTimer.Location = New System.Drawing.Point(3, 76)Me.lblTimer.Name = "lblTimer"
Me.lblTimer.Size = New System.Drawing.Size(282, 20)Me.lblTimer.TabIndex = 3Me.lblTimer.Text = "Time Elasped:"
Me.lblTimer.TextAlign = System.Drawing.ContentAlignment.MiddleLeft''lblNumItems'
Me.lblNumItems.Dock = System.Windows.Forms.DockStyle.TopMe.lblNumItems.Location = New System.Drawing.Point(3, 56)Me.lblNumItems.Name = "lblNumItems"
Me.lblNumItems.Size = New System.Drawing.Size(282, 20)Me.lblNumItems.TabIndex = 2Me.lblNumItems.Text = "Number Of Assessed Items:"
Me.lblNumItems.TextAlign = System.Drawing.ContentAlignment.MiddleLeft''lblNumDirectory'
Me.lblNumDirectory.Dock = System.Windows.Forms.DockStyle.TopMe.lblNumDirectory.Location = New System.Drawing.Point(3, 36)Me.lblNumDirectory.Name = "lblNumDirectory"
Me.lblNumDirectory.Size = New System.Drawing.Size(282, 20)Me.lblNumDirectory.TabIndex = 1Me.lblNumDirectory.Text = "Number Of Searched Folder:"
Me.lblNumDirectory.TextAlign = System.Drawing.ContentAlignment.MiddleLeft''lblResult'
Me.lblResult.Dock = System.Windows.Forms.DockStyle.TopMe.lblResult.Location = New System.Drawing.Point(3, 16)Me.lblResult.Name = "lblResult"
Me.lblResult.Size = New System.Drawing.Size(282, 20)Me.lblResult.TabIndex = 0Me.lblResult.Text = "Result:"
Me.lblResult.TextAlign = System.Drawing.ContentAlignment.MiddleLeft''panMain'
Me.panMain.BackColor = System.Drawing.Color.WhiteMe.panMain.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingleMe.panMain.Controls.Add(Me.TbCtrlMain)Me.panMain.Controls.Add(Me.ToolStrip1)Me.panMain.Controls.Add(Me.btnLoadDire)Me.panMain.Controls.Add(Me.panBorder_T)Me.panMain.Controls.Add(Me.panBorder_B)Me.panMain.Controls.Add(Me.panBorder_L)Me.panMain.Controls.Add(Me.panBorder_R)Me.panMain.Dock = System.Windows.Forms.DockStyle.FillMe.panMain.Location = New System.Drawing.Point(0, 0)Me.panMain.Name = "panMain"
Me.panMain.Size = New System.Drawing.Size(300, 555)Me.panMain.TabIndex = 4''TbCtrlMain'
Me.TbCtrlMain.Controls.Add(Me.tbpgResult)Me.TbCtrlMain.Controls.Add(Me.tbpgContains)Me.TbCtrlMain.Dock = System.Windows.Forms.DockStyle.FillMe.TbCtrlMain.Location = New System.Drawing.Point(5, 80)Me.TbCtrlMain.Name = "TbCtrlMain"
Me.TbCtrlMain.SelectedIndex = 0Me.TbCtrlMain.Size = New System.Drawing.Size(288, 314)Me.TbCtrlMain.TabIndex = 5''tbpgResult'
Me.tbpgResult.Controls.Add(Me.lsbMatch)Me.tbpgResult.Location = New System.Drawing.Point(4, 22)Me.tbpgResult.Name = "tbpgResult"
Me.tbpgResult.Padding = New System.Windows.Forms.Padding(3)Me.tbpgResult.Size = New System.Drawing.Size(280, 288)Me.tbpgResult.TabIndex = 0Me.tbpgResult.Text = "Actual Search"Me.tbpgResult.UseVisualStyleBackColor = True''lsbMatch'
Me.lsbMatch.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingleMe.lsbMatch.Dock = System.Windows.Forms.DockStyle.FillMe.lsbMatch.FormattingEnabled = TrueMe.lsbMatch.HorizontalScrollbar = True
Me.lsbMatch.Location = New System.Drawing.Point(3, 3)Me.lsbMatch.Name = "lsbMatch"
Me.lsbMatch.Size = New System.Drawing.Size(274, 275)Me.lsbMatch.TabIndex = 1''tbpgContains'
Me.tbpgContains.Controls.Add(Me.lsbContains)Me.tbpgContains.Location = New System.Drawing.Point(4, 22)Me.tbpgContains.Name = "tbpgContains"
Me.tbpgContains.Padding = New System.Windows.Forms.Padding(3)Me.tbpgContains.Size = New System.Drawing.Size(280, 288)Me.tbpgContains.TabIndex = 1Me.tbpgContains.Text = "Similar Search"Me.tbpgContains.UseVisualStyleBackColor = True''lsbContains'
Me.lsbContains.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingleMe.lsbContains.Dock = System.Windows.Forms.DockStyle.FillMe.lsbContains.FormattingEnabled = TrueMe.lsbContains.HorizontalScrollbar = True
Me.lsbContains.Location = New System.Drawing.Point(3, 3)Me.lsbContains.Name = "lsbContains"
Me.lsbContains.Size = New System.Drawing.Size(274, 275)Me.lsbContains.TabIndex = 0''ToolStrip1'
Me.ToolStrip1.Items.AddRange(New System.Windows.Forms.ToolStripItem() {Me.TStbxSearch})Me.ToolStrip1.Location = New System.Drawing.Point(5, 55)Me.ToolStrip1.Name = "ToolStrip1"
Me.ToolStrip1.Size = New System.Drawing.Size(288, 25)Me.ToolStrip1.TabIndex = 6Me.ToolStrip1.Text = "ToolStrip1"''TStbxSearch'
Me.TStbxSearch.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingleMe.TStbxSearch.Name = "TStbxSearch"
Me.TStbxSearch.Size = New System.Drawing.Size(260, 25)''btnLoadDire'
Me.btnLoadDire.Dock = System.Windows.Forms.DockStyle.TopMe.btnLoadDire.Location = New System.Drawing.Point(5, 30)Me.btnLoadDire.Name = "btnLoadDire"
Me.btnLoadDire.Size = New System.Drawing.Size(288, 25)Me.btnLoadDire.TabIndex = 4Me.btnLoadDire.Text = "Load Search Location"Me.btnLoadDire.UseVisualStyleBackColor = True''Imglt'
Me.Imglt.ColorDepth = System.Windows.Forms.ColorDepth.Depth8BitMe.Imglt.ImageSize = New System.Drawing.Size(16, 16)Me.Imglt.TransparentColor = System.Drawing.Color.Transparent''TimerMonitorDeploy'
Me.TimerMonitorDeploy.Interval = 10''TimerKeepMyTime'''lblInformer'
Me.lblInformer.Dock = System.Windows.Forms.DockStyle.TopMe.lblInformer.Location = New System.Drawing.Point(0, 106)Me.lblInformer.Name = "lblInformer"
Me.lblInformer.Size = New System.Drawing.Size(288, 20)Me.lblInformer.TabIndex = 4Me.lblInformer.TextAlign = System.Drawing.ContentAlignment.MiddleCenter''frmMain'
Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.FontMe.ClientSize = New System.Drawing.Size(300, 555)Me.Controls.Add(Me.panMain)Me.Icon = CType(resources.GetObject("$this.Icon"), System.Drawing.Icon)Me.Name = "frmMain"Me.Text = "K 1"
Me.panBorder_T.ResumeLayout(False)Me.panBorder_B.ResumeLayout(False)Me.GroupBox1.ResumeLayout(False)Me.panMain.ResumeLayout(False)Me.panMain.PerformLayout()Me.TbCtrlMain.ResumeLayout(False)Me.tbpgResult.ResumeLayout(False)Me.tbpgContains.ResumeLayout(False)Me.ToolStrip1.ResumeLayout(False)Me.ToolStrip1.PerformLayout()Me.ResumeLayout(False)End Sub
Friend WithEvents panBorder_T As System.Windows.Forms.PanelFriend WithEvents panBorder_L As System.Windows.Forms.PanelFriend WithEvents panBorder_R As System.Windows.Forms.PanelFriend WithEvents panBorder_B As System.Windows.Forms.PanelFriend WithEvents lblMainName As System.Windows.Forms.LabelFriend WithEvents lblMini As System.Windows.Forms.Label#End
#Region Region "Classes"Private NewfMouseAction As fMouseAction#End
#Region Region "Privates"
Private strDire As DirectoryInfoPrivate intItems As IntegerPublic IntTime As IntegerPublic intFolders As IntegerPublic intSearchMatch As Integer
#End
#RegionPublic intSearchSimilar As Integer Region "Form Events"
Private Sub frmMain_FormClosing(ByVal sender As Object, ByVal e As System.Windows.Forms.FormClosingEventArgs) Handles Me.FormClosingTryMe.TimerKeepMyTime.Enabled = FalseMe.TimerMonitorDeploy.Enabled = False
Me.IntTime = 0Me.intSec = 0Me.intMin = 0Me.intItems = 0Me.intHr = 0Me.intFolders = 0Me.intSearchSimilar = 0Me.intSearchMatch = 0Catch ex As ExceptionEnd TryEnd Sub
Private Sub frmMain_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.LoadTry
NewfMouseAction =
Me.FormBorderStyle = Windows.Forms.FormBorderStyle.NoneNew fMouseAction(Me, lblMainName, lblMini)'Protects false searchMe.btnLoadDire.Enabled = False
Catch ex As ExceptionEnd Try
#End
#RegionEnd Sub Region "Other buttons actions"
Private Sub btnClose_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnClose.ClickTryIf Me.lsbContains.Items.Count <> Nothing Or Me.lsbMatch.Items.Count <> Nothing Then
Dim Asking = MessageBox.Show("K1 is has found some search." & vbNewLine & "Do you want to close K1?", _"K1-Commando", MessageBoxButtons.YesNo, MessageBoxIcon.Question)If Asking = Windows.Forms.DialogResult.Yes ThenApplication.Exit()
End IfEnd IfIf intFolders <> 0 Then
Dim Asking = MessageBox.Show("K1 is still on search." & vbNewLine & "Do you want to abort search?", _"K1-Commando", MessageBoxButtons.YesNo, MessageBoxIcon.Question)If Asking = Windows.Forms.DialogResult.Yes ThenApplication.Exit()
End IfElseApplication.Exit()
End If
Catch ex As ExceptionEnd TryEnd Sub
Private Sub TStbxSearch_TextChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles TStbxSearch.TextChangedTryIf Me.TStbxSearch.Text = Nothing ThenMe.btnLoadDire.Enabled = FalseElseMe.btnLoadDire.Enabled = TrueEnd If
Catch ex As ExceptionEnd TryEnd Sub
Private Sub btnReset_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnReset.ClickTry
Me.lsbMatch.Items.Clear()Me.lsbContains.Items.Clear()Me.lblTimer.Text = NothingMe.lblResult.Text = NothingMe.lblNumDirectory.Text = NothingMe.lblNumItems.Text = NothingMe.lblInformer.Text = NothingMe.lblTimer.Text = "Time Elasped:"Me.lblResult.Text = "Result:"Me.lblNumDirectory.Text = "Number Of Searched Folder:"Me.lblNumItems.Text = "Number Of Assessed Items:"
Me.intFolders = 0Catch ex As ExceptionEnd Try
#End
#RegionEnd Sub Region "Search Buttons"
Private Sub btnLoadDire_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnLoadDire.ClickTry
Dim NewFold As New FolderBrowserDialogMe.lblTimer.Text = "Time Elasped:"Me.lblNumItems.Text = "Number Of Assessed Items:"Me.lblNumDirectory.Text = "Number Of Searched Folder:"
Me.lblInformer.Text = Nothing
Select Case (NewFold.ShowDialog)Case Is = Windows.Forms.DialogResult.OKMe.TimerMonitorDeploy.Start() 'Start monitoring activitisstrDire = New DirectoryInfo(NewFold.SelectedPath.ToArray) 'Gets the selected directory to be searched
Me.TimerKeepMyTime.Interval = 10Me.TimerKeepMyTime.Enabled = True'protect interruptionMe.btnReset.Enabled = False
Me.btnClose.Enabled = False'if there are more than one directory' get them and deploy them for KDs to search themIf Directory.GetDirectories(strDire.ToString).Count >= 1 Then'Resets all data
Me.lsbContains.Items.Clear()Me.lsbMatch.Items.Clear()Me.intSearchSimilar = 0Me.intSearchMatch = 0Me.IntTime = 0Me.intSec = 0Me.intMin = 0Me.intHr = 0'Gets each folder in the selected folder
For Each DireLoc As DirectoryInfo In strDire.GetDirectoriesFor Each items As FileInfo In DireLoc.GetFiles()'Registers a match searchIf String.Compare(items.ToString, Me.TStbxSearch.Text) = 0 Then
Me.lsbMatch.Items.Add(strDire.ToString & "\" & DireLoc.ToString & "\" & items.ToString)Me.intSearchMatch += 1'Registers a close matchElseIf items.ToString.Contains(Me.TStbxSearch.Text) Then
Me.lsbContains.Items.Add(strDire.ToString & "\" & DireLoc.ToString & "\" & items.ToString)Me.intSearchSimilar += 1End IfNextintFolders += 1 'Keeping records of searched Items
NextElse 'if there are only one directory'Registers a match search
For Each items As FileInfo In strDire.GetFiles()If String.Compare(items.ToString, Me.TStbxSearch.Text) = 0 Then
Me.lsbMatch.Items.Add(strDire.ToString & "\" & strDire.ToString & "\" & items.ToString)Me.intSearchMatch += 1'Registers a close matchElseIf items.ToString.Contains(Me.TStbxSearch.Text) Then
Me.lsbContains.Items.Add(strDire.ToString & "\" & strDire.ToString & "\" & items.ToString)Me.intSearchSimilar += 1End IfNextintFolders += 1 'Keeping records of searched ItemsEnd If'Registers all the records
Me.lblNumDirectory.Text = "Number Of Searched folders: " & intFoldersMe.lblNumItems.Text = "Number Of Assesed Items: " & (Me.intSearchSimilar + Me.intSearchMatch)Me.lblResult.Text = "Result: " & Me.intSearchMatch & " Match " & Me.intSearchSimilar & " Similar Search"Me.TimerKeepMyTime.Enabled = FalseMe.lblInformer.Text = "DONE!"
Me.lblTimer.Text = "Time Elasped: " & intHr & ":" & intMin & ":" & intSec'release interruption protectionMe.btnReset.Enabled = TrueMe.btnClose.Enabled = TrueEnd Select
Catch ex As ExceptionExit SubEnd Try
#End
#RegionEnd Sub Region "Timer "Dim intMin As IntegerDim intSec As IntegerDim intHr As Integer
Private Sub TimerKeepMyTime_Tick(ByVal sender As Object, ByVal e As System.EventArgs) Handles TimerKeepMyTime.TickTryIf IntTime = 60 ThenintSec += 1 'Registers secondsIf intSec = 60 Then 'Registers minutesintMin += 1
If intMin = 60 Then 'Registers hoursintHr += 1
End IfintSec = 0
End IfIntTime = 0
ElseIf IntTime <= 59 ThenIntTime += 1
End If
Me.lblTimer.Text = "Time Elasped: " & intHr & ":" & intMin & ":" & intSecCatch ex As ExceptionEnd TryEnd Sub
Private Sub TimerMonitorDeploy_Tick(ByVal sender As Object, ByVal e As System.EventArgs) Handles TimerMonitorDeploy.TickTryIf intFolders = 0 ThenMe.lblInformer.Text = "Done!"Me.lblResult.Text = "Result: " & intSearchMatch & " Match(s) And " & intSearchSimilar & "Similar Search"Me.TimerMonitorDeploy.Enabled = FalseEnd If
Catch ex As ExceptionEnd Try
#End
#RegionEnd Sub Region "View Searched Items"
Private Sub lsbIndexof_DoubleClick(ByVal sender As Object, ByVal e As System.EventArgs) Handles lsbContains.DoubleClickTryProcess.Start(
Me.lsbContains.SelectedItem.ToString)Catch ex As ExceptionEnd TryEnd Sub
Private Sub lsbMatch_DoubleClick(ByVal sender As Object, ByVal e As System.EventArgs) Handles lsbMatch.DoubleClickTryProcess.Start(
Me.lsbMatch.SelectedItem.ToString)Catch ex As ExceptionEnd Try
#End
EndEnd Sub Region Class
No comments:
Post a Comment