Lampiran : Listing Program Imports Imports Imports Imports Imports Imports

System.ComponentModel DevExpress.Skins DevExpress.LookAndFeel DevExpress.UserSkins DevExpress.XtraEditors DevExpress.XtraSplashScreen

Public Class Form1 Dim maxVal = 1000000 Dim maxItem = 1000000 Dim SelectionTime As Integer = 0 Dim SelectionInsertTime As Integer = 0 Dim SelectionNewTime As Integer = 0 Dim MergeTime As Integer = 0 Dim log As New PrintLogResult(AddressOf PrintResult) Dim Imerge As Integer = 1 Dim userData As New ArrayList Sub New() InitSkins() InitializeComponent() Title.Location = New Point((Me.Width / 2) - (Title.Width / 2), Title.Location.Y) ChartExeTime.Location = New Point((Me.Width / 2) (ChartExeTime.Width / 2), ChartExeTime.Location.Y) End Sub Sub InitSkins() DevExpress.Skins.SkinManager.EnableFor mSkins() DevExpress.UserSkins.BonusSkins.Regist er() UserLookAndFeel.Default.SetSkinStyle(" Office 2013") Me.WindowState = FormWindowState.Maximized End Sub Public Sub SelectionSort(ByVal array As ArrayList) Dim sWatch As New Stopwatch Dim result As String = "" SplashScreenManager.Default.SetWaitFor mDescription("Selection sort process")

result += "Value = " & PrintArray(array) & vbNewLine sWatch.Start() 'Prosess Selection Sort For i As Integer = 0 To array.Count - 1 SplashScreenManager.Default.SetWaitFor mDescription("Selection sort step " & i + 1) Dim index = GetIndexMinData(array, i) Dim temp = array(i) array(i) = array(index) array(index) = temp Next sWatch.Stop() SelectionTime = sWatch.Elapsed.TotalMilliseconds SplashScreenManager.Default.SetWaitFor mDescription("Print result") result = "Execution Time : " & sWatch.Elapsed.ToString & vbNewLine & vbNewLine & result result += vbNewLine & vbNewLine & "Sorting Array = " & PrintArray(array) Me.Invoke(log, txtResultSelection, result, 1) End Sub Public Function GetIndexMinData(ByVal array As ArrayList, ByVal start As Integer) As Integer Dim index As Integer Dim check As Integer = array(start) For i As Integer = start To Array.Count - 1 If array(i)