ajout taille des profils

This commit is contained in:
jopazerty
2025-03-10 13:57:00 +01:00
parent c0db61660d
commit b9b3d70293

View File

@ -102,7 +102,7 @@ GUICtrlCreateLabel("✉️ Compte(s) POP trouvé(s) :", 20, 190, 240, 25)
GUICtrlSetColor(-1, $color)
GUIctrlSetFont(-1,12, 600, Default, "Segoe UI")
;~ $listview = GUICtrlCreateListView("Nom du Compte|Mail|Nom d'utilisateur|Dossier de stockage|Signature", 20, 220, 760, 250)
$listview = GUICtrlCreateListView("Username|Account|ID|ServerID|Dossier de stockage|smtpID", 20, 220, 760, 250)
$listview = GUICtrlCreateListView("Username|Account|ID|ServerID|Dossier de stockage|smtpID|Size", 20, 220, 760, 250)
GUICtrlSetFont(-1, 11, 500, Default, "Segoe UI")
GUICtrlSetBkColor(-1, 0xff0000)
GUICtrlSendMsg($ListView, $LVM_SETCOLUMNWIDTH, 0, -1) ; $LVSCW_AUTOSIZE
@ -111,12 +111,14 @@ GUICtrlSendMsg($ListView, $LVM_SETCOLUMNWIDTH, 2, -1) ; $LVSCW_AUTOSIZE
GUICtrlSendMsg($ListView, $LVM_SETCOLUMNWIDTH, 3, -1) ; $LVSCW_AUTOSIZE
GUICtrlSendMsg($ListView, $LVM_SETCOLUMNWIDTH, 4, -1) ; $LVSCW_AUTOSIZE
GUICtrlSendMsg($ListView, $LVM_SETCOLUMNWIDTH, 5, -1) ; $LVSCW_AUTOSIZE
GUICtrlSendMsg($ListView, $LVM_SETCOLUMNWIDTH, 6, -1) ; $LVSCW_AUTOSIZE
GUICtrlSendMsg($ListView, $LVM_SETCOLUMNWIDTH, 0, -2) ; $LVSCW_AUTOSIZE_USEHEADER
GUICtrlSendMsg($ListView, $LVM_SETCOLUMNWIDTH, 1, -2) ; $LVSCW_AUTOSIZE_USEHEADER
GUICtrlSendMsg($ListView, $LVM_SETCOLUMNWIDTH, 2, -2) ; $LVSCW_AUTOSIZE_USEHEADER
GUICtrlSendMsg($ListView, $LVM_SETCOLUMNWIDTH, 3, -2) ; $LVSCW_AUTOSIZE_USEHEADER
guictrlsendmsg($ListView, $LVM_SETCOLUMNWIDTH, 4, -2) ; $LVSCW_AUTOSIZE_USEHEADER
guictrlsendmsg($ListView, $LVM_SETCOLUMNWIDTH, 5, -2) ; $LVSCW_AUTOSIZE_USEHEADER
guictrlsendmsg($ListView, $LVM_SETCOLUMNWIDTH, 6, -2) ; $LVSCW_AUTOSIZE_USEHEADER
Global $hLV = GUICtrlGetHandle($ListView)
@ -185,6 +187,7 @@ While 1
$localFolderDirectory = _searchValueInPrefsJsArray($prefsToArray, "mail.server."&$serverLocalFolder&".directory-rel")
$localFolderDirectory = StringReplace($localFolderDirectory, "[ProfD]", $profileDirectory&"\")
$localFolderDirectory = StringReplace($localFolderDirectory, "/", "\")
;~ $localFolderDirectory = StringReplace($localFolderDirectory, "\\", "\")
;~ _ArrayDisplay($allServer)
;~ $username
@ -227,7 +230,7 @@ While 1
DirCreate($localFolderDirectory&"\Archives de "&$accountName&".sbd")
$dst = $localFolderDirectory&"\Archives de "&$accountName&".sbd"
FileWrite($localFolderDirectory&"\Archives de "&$accountName, "")
RunWait(@ComSpec & ' /c powershell.exe -Command "Move-Item -Path ''' & $directory & '\*'' -Destination ''' & $dst & '''"', "")
;~ RunWait(@ComSpec & ' /c powershell.exe -Command "Move-Item -Path ''' & $directory & '\*'' -Destination ''' & $dst & '''"', "")
;~ $mail = $allServer[$c][1]
;~ $username = $allServer[$c][2]
;~ $directory = $allServer[$c][3]
@ -272,7 +275,7 @@ WEnd
Func _getAllServer($profileDirectory)
GUICtrlDelete($listview)
$listview = GUICtrlCreateListView("Username|Account|ID|ServerID|Dossier de stockage|smtpID", 20, 220, 760, 250)
$listview = GUICtrlCreateListView("Username|Account|ID|ServerID|Dossier de stockage|smtpID|Size", 20, 220, 760, 250)
GUICtrlSetData($go, "🚀 Exécuter")
GUICtrlSetBkColor($go, $color2)
GUICtrlSetState($go, $GUI_ENABLE)
@ -307,7 +310,7 @@ Func _getAllServer($profileDirectory)
GUICtrlSetData($labProfile, $profileDirectory)
GUICtrlSetData($labSizeProfile, "("&$profileSizef&")")
Global $allServer[1][6]
Global $allServer[1][7]
Local $count = 0
For $i = 1 to $searchForServer[0]
$serverID = StringSplit($searchForServer[$i], ".")
@ -340,16 +343,17 @@ Func _getAllServer($profileDirectory)
$allServer[$count][3] = $serverID
$allServer[$count][4] = $directory
$allServer[$count][5] = $smtpID
$allServer[$count][6] = DirGetSize($directory)
;~ $allServer[$count][2] = $username
;~ $allServer[$count][3] = StringReplace($directory, "\\", "\")
;~ $allServer[$count][4] = StringReplace($signature, "\\", "\")
$count += 1
Redim $allServer[$count + 1][6]
Redim $allServer[$count + 1][7]
EndIf
Next
Next
if $count = 0 then GUICtrlSetState($go, $GUI_DISABLE)
Redim $allServer[$count][6]
Redim $allServer[$count][7]
;~ _ArrayDisplay($allServer)
;~ GUICtrlDelete($listview)
;~ $listview = GUICtrlCreateListView("Username|Account|ID|ServerID|Dossier de stockage|smtpID", 20, 220, 760, 250)
@ -362,12 +366,14 @@ Func _getAllServer($profileDirectory)
GUICtrlSendMsg($ListView, $LVM_SETCOLUMNWIDTH, 3, -1) ; $LVSCW_AUTOSIZE
GUICtrlSendMsg($ListView, $LVM_SETCOLUMNWIDTH, 4, -1) ; $LVSCW_AUTOSIZE
GUICtrlSendMsg($ListView, $LVM_SETCOLUMNWIDTH, 5, -1) ; $LVSCW_AUTOSIZE
GUICtrlSendMsg($ListView, $LVM_SETCOLUMNWIDTH, 6, -1) ; $LVSCW_AUTOSIZE
GUICtrlSendMsg($ListView, $LVM_SETCOLUMNWIDTH, 0, -2) ; $LVSCW_AUTOSIZE_USEHEADER
GUICtrlSendMsg($ListView, $LVM_SETCOLUMNWIDTH, 1, -2) ; $LVSCW_AUTOSIZE_USEHEADER
GUICtrlSendMsg($ListView, $LVM_SETCOLUMNWIDTH, 2, -2) ; $LVSCW_AUTOSIZE_USEHEADER
GUICtrlSendMsg($ListView, $LVM_SETCOLUMNWIDTH, 3, -2) ; $LVSCW_AUTOSIZE_USEHEADER
GUICtrlSendMsg($ListView, $LVM_SETCOLUMNWIDTH, 4, -2) ; $LVSCW_AUTOSIZE_USEHEADER
GUICtrlSendMsg($ListView, $LVM_SETCOLUMNWIDTH, 5, -2) ; $LVSCW_AUTOSIZE_USEHEADER
GUICtrlSendMsg($ListView, $LVM_SETCOLUMNWIDTH, 6, -2) ; $LVSCW_AUTOSIZE_USEHEADER
EndFunc