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) GUICtrlSetColor(-1, $color)
GUIctrlSetFont(-1,12, 600, Default, "Segoe UI") 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("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") GUICtrlSetFont(-1, 11, 500, Default, "Segoe UI")
GUICtrlSetBkColor(-1, 0xff0000) GUICtrlSetBkColor(-1, 0xff0000)
GUICtrlSendMsg($ListView, $LVM_SETCOLUMNWIDTH, 0, -1) ; $LVSCW_AUTOSIZE 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, 3, -1) ; $LVSCW_AUTOSIZE
GUICtrlSendMsg($ListView, $LVM_SETCOLUMNWIDTH, 4, -1) ; $LVSCW_AUTOSIZE GUICtrlSendMsg($ListView, $LVM_SETCOLUMNWIDTH, 4, -1) ; $LVSCW_AUTOSIZE
GUICtrlSendMsg($ListView, $LVM_SETCOLUMNWIDTH, 5, -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, 0, -2) ; $LVSCW_AUTOSIZE_USEHEADER
GUICtrlSendMsg($ListView, $LVM_SETCOLUMNWIDTH, 1, -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, 2, -2) ; $LVSCW_AUTOSIZE_USEHEADER
GUICtrlSendMsg($ListView, $LVM_SETCOLUMNWIDTH, 3, -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, 4, -2) ; $LVSCW_AUTOSIZE_USEHEADER
guictrlsendmsg($ListView, $LVM_SETCOLUMNWIDTH, 5, -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) Global $hLV = GUICtrlGetHandle($ListView)
@ -185,6 +187,7 @@ While 1
$localFolderDirectory = _searchValueInPrefsJsArray($prefsToArray, "mail.server."&$serverLocalFolder&".directory-rel") $localFolderDirectory = _searchValueInPrefsJsArray($prefsToArray, "mail.server."&$serverLocalFolder&".directory-rel")
$localFolderDirectory = StringReplace($localFolderDirectory, "[ProfD]", $profileDirectory&"\") $localFolderDirectory = StringReplace($localFolderDirectory, "[ProfD]", $profileDirectory&"\")
$localFolderDirectory = StringReplace($localFolderDirectory, "/", "\") $localFolderDirectory = StringReplace($localFolderDirectory, "/", "\")
;~ $localFolderDirectory = StringReplace($localFolderDirectory, "\\", "\") ;~ $localFolderDirectory = StringReplace($localFolderDirectory, "\\", "\")
;~ _ArrayDisplay($allServer) ;~ _ArrayDisplay($allServer)
;~ $username ;~ $username
@ -227,7 +230,7 @@ While 1
DirCreate($localFolderDirectory&"\Archives de "&$accountName&".sbd") DirCreate($localFolderDirectory&"\Archives de "&$accountName&".sbd")
$dst = $localFolderDirectory&"\Archives de "&$accountName&".sbd" $dst = $localFolderDirectory&"\Archives de "&$accountName&".sbd"
FileWrite($localFolderDirectory&"\Archives de "&$accountName, "") 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] ;~ $mail = $allServer[$c][1]
;~ $username = $allServer[$c][2] ;~ $username = $allServer[$c][2]
;~ $directory = $allServer[$c][3] ;~ $directory = $allServer[$c][3]
@ -272,7 +275,7 @@ WEnd
Func _getAllServer($profileDirectory) Func _getAllServer($profileDirectory)
GUICtrlDelete($listview) 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") GUICtrlSetData($go, "🚀 Exécuter")
GUICtrlSetBkColor($go, $color2) GUICtrlSetBkColor($go, $color2)
GUICtrlSetState($go, $GUI_ENABLE) GUICtrlSetState($go, $GUI_ENABLE)
@ -307,7 +310,7 @@ Func _getAllServer($profileDirectory)
GUICtrlSetData($labProfile, $profileDirectory) GUICtrlSetData($labProfile, $profileDirectory)
GUICtrlSetData($labSizeProfile, "("&$profileSizef&")") GUICtrlSetData($labSizeProfile, "("&$profileSizef&")")
Global $allServer[1][6] Global $allServer[1][7]
Local $count = 0 Local $count = 0
For $i = 1 to $searchForServer[0] For $i = 1 to $searchForServer[0]
$serverID = StringSplit($searchForServer[$i], ".") $serverID = StringSplit($searchForServer[$i], ".")
@ -340,16 +343,17 @@ Func _getAllServer($profileDirectory)
$allServer[$count][3] = $serverID $allServer[$count][3] = $serverID
$allServer[$count][4] = $directory $allServer[$count][4] = $directory
$allServer[$count][5] = $smtpID $allServer[$count][5] = $smtpID
$allServer[$count][6] = DirGetSize($directory)
;~ $allServer[$count][2] = $username ;~ $allServer[$count][2] = $username
;~ $allServer[$count][3] = StringReplace($directory, "\\", "\") ;~ $allServer[$count][3] = StringReplace($directory, "\\", "\")
;~ $allServer[$count][4] = StringReplace($signature, "\\", "\") ;~ $allServer[$count][4] = StringReplace($signature, "\\", "\")
$count += 1 $count += 1
Redim $allServer[$count + 1][6] Redim $allServer[$count + 1][7]
EndIf EndIf
Next Next
Next Next
if $count = 0 then GUICtrlSetState($go, $GUI_DISABLE) if $count = 0 then GUICtrlSetState($go, $GUI_DISABLE)
Redim $allServer[$count][6] Redim $allServer[$count][7]
;~ _ArrayDisplay($allServer) ;~ _ArrayDisplay($allServer)
;~ GUICtrlDelete($listview) ;~ 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", 20, 220, 760, 250)
@ -362,12 +366,14 @@ Func _getAllServer($profileDirectory)
GUICtrlSendMsg($ListView, $LVM_SETCOLUMNWIDTH, 3, -1) ; $LVSCW_AUTOSIZE GUICtrlSendMsg($ListView, $LVM_SETCOLUMNWIDTH, 3, -1) ; $LVSCW_AUTOSIZE
GUICtrlSendMsg($ListView, $LVM_SETCOLUMNWIDTH, 4, -1) ; $LVSCW_AUTOSIZE GUICtrlSendMsg($ListView, $LVM_SETCOLUMNWIDTH, 4, -1) ; $LVSCW_AUTOSIZE
GUICtrlSendMsg($ListView, $LVM_SETCOLUMNWIDTH, 5, -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, 0, -2) ; $LVSCW_AUTOSIZE_USEHEADER
GUICtrlSendMsg($ListView, $LVM_SETCOLUMNWIDTH, 1, -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, 2, -2) ; $LVSCW_AUTOSIZE_USEHEADER
GUICtrlSendMsg($ListView, $LVM_SETCOLUMNWIDTH, 3, -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, 4, -2) ; $LVSCW_AUTOSIZE_USEHEADER
GUICtrlSendMsg($ListView, $LVM_SETCOLUMNWIDTH, 5, -2) ; $LVSCW_AUTOSIZE_USEHEADER GUICtrlSendMsg($ListView, $LVM_SETCOLUMNWIDTH, 5, -2) ; $LVSCW_AUTOSIZE_USEHEADER
GUICtrlSendMsg($ListView, $LVM_SETCOLUMNWIDTH, 6, -2) ; $LVSCW_AUTOSIZE_USEHEADER
EndFunc EndFunc