Advertisement
Guest User

Untitled

a guest
Jun 16th, 2017
76
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
ABAP 7.34 KB | None | 0 0
  1.    1.
  2.       #include <GUIConstantsEx.au3>
  3.    2.
  4.       #include <GuiStatusBar.au3>
  5.    3.
  6.       #include <ListViewConstants.au3>
  7.    4.
  8.       #include <ProgressConstants.au3>
  9.    5.
  10.       #include <StaticConstants.au3>
  11.    6.
  12.       #include <WindowsConstants.au3>
  13.    7.
  14.       #include <File.au3>
  15.    8.
  16.       #include <GuiListView.au3>
  17.    9.
  18.        
  19.   10.
  20.       #Region ### START Koda GUI section ### Form=c:\dokumente und einstellungen\gamer\desktop\form1.kxf
  21.   11.
  22.       $Form1 = GUICreate("AlizameSound : ", 633, 454, 192, 124)
  23.   12.
  24.       GUISetBkColor(0x000000)
  25.   13.
  26.        $listview = GUICtrlCreateListView("Name|Endung|Ort", 40, 24, 529, 241,$LVS_EX_FULLROWSELECT)
  27.   14.
  28.       GUICtrlSendMsg(-1, $LVM_SETCOLUMNWIDTH, 0, 300)
  29.   15.
  30.       GUICtrlSendMsg(-1, $LVM_SETCOLUMNWIDTH, 1, 80)
  31.   16.
  32.       GUICtrlSendMsg(-1, $LVM_SETCOLUMNWIDTH, 2, 145)
  33.   17.
  34.       GUICtrlSetState ($listview, $GUI_DROPACCEPTED)
  35.   18.
  36.        
  37.   19.
  38.       GUICtrlSetBkColor(-1, 0x6A6A6A)
  39.   20.
  40.       $StatusBar1 = _GUICtrlStatusBar_Create($Form1)
  41.   21.
  42.       _GUICtrlStatusBar_SetMinHeight($StatusBar1, 35)
  43.   22.
  44.       $Progress1 = GUICtrlCreateProgress(40, 288, 529, 9)
  45.   23.
  46.       $Label1 = GUICtrlCreateLabel("0", 576, 280, 11, 20)
  47.   24.
  48.       GUICtrlSetFont(-1, 10, 400, 0, "MS Sans Serif")
  49.   25.
  50.       $Label2 = GUICtrlCreateLabel(":", 584, 280, 7, 20)
  51.   26.
  52.       GUICtrlSetFont(-1, 10, 400, 0, "MS Sans Serif")
  53.   27.
  54.       $Label3 = GUICtrlCreateLabel("00", 592, 280, 18, 20)
  55.   28.
  56.       GUICtrlSetFont(-1, 10, 400, 0, "MS Sans Serif")
  57.   29.
  58.       $MenuItem1 = GUICtrlCreateMenu("&Einstellungen")
  59.   30.
  60.       $MenuItem10 = GUICtrlCreateMenuItem("Immer im Vordergrund", $MenuItem1, -1 , 1)
  61.   31.
  62.       $MenuItem11 = GUICtrlCreateMenuItem("Playlist immer wiederholen", $MenuItem1)
  63.   32.
  64.       $MenuItem2 = GUICtrlCreateMenu("Ü&ber")
  65.   33.
  66.       $MenuItem8 = GUICtrlCreateMenuItem("AlizameSound v1.0", $MenuItem2)
  67.   34.
  68.       $MenuItem9 = GUICtrlCreateMenuItem("© by Alizame", $MenuItem2)
  69.   35.
  70.       $MenuItem3 = GUICtrlCreateMenu("&Credits")
  71.   36.
  72.       $MenuItem4 = GUICtrlCreateMenuItem("Danke an:", $MenuItem3)
  73.   37.
  74.       $MenuItem5 = GUICtrlCreateMenuItem("Jonathan Bennet und das AutoIt Team für AutoIt v3", $MenuItem3)
  75.   38.
  76.       $MenuItem6 = GUICtrlCreateMenuItem("Gun-Food und peethebee für das Forum!!!", $MenuItem3)
  77.   39.
  78.       $MenuItem7 = GUICtrlCreateMenuItem("Ach und alle User aus dem Forum xP", $MenuItem3)
  79.   40.
  80.       ;#######
  81.   41.
  82.       $Icon1 = GUICtrlCreateIcon("C:\Dokumente und Einstellungen\Gamer\Desktop\musikplayer\bilder\links.ico", 0, 192, 320, 40, 40, BitOR($SS_NOTIFY,$WS_GROUP))
  83.   42.
  84.       $Icon2 = GUICtrlCreateIcon("C:\Dokumente und Einstellungen\Gamer\Desktop\musikplayer\bilder\wiederholen.ico", 0, 232, 320, 40, 40, BitOR($SS_NOTIFY,$WS_GROUP))
  85.   43.
  86.       $Icon3 = GUICtrlCreateIcon("C:\Dokumente und Einstellungen\Gamer\Desktop\musikplayer\bilder\play.ico", 0, 272, 320, 40, 40, BitOR($SS_NOTIFY,$WS_GROUP))
  87.   44.
  88.       $Icon4 = GUICtrlCreateIcon("C:\Dokumente und Einstellungen\Gamer\Desktop\musikplayer\bilder\pause.ico", 0, 312, 320, 40, 40, BitOR($SS_NOTIFY,$WS_GROUP))
  89.   45.
  90.       $Icon5 = GUICtrlCreateIcon("C:\Dokumente und Einstellungen\Gamer\Desktop\musikplayer\bilder\stopp.ico", 0, 352, 320, 40, 40, BitOR($SS_NOTIFY,$WS_GROUP))
  91.   46.
  92.       $Icon6 = GUICtrlCreateIcon("C:\Dokumente und Einstellungen\Gamer\Desktop\musikplayer\bilder\rechts.ico", 0, 392, 320, 40, 40, BitOR($SS_NOTIFY,$WS_GROUP))
  93.   47.
  94.       $Icon7 = GUICtrlCreateIcon("C:\Dokumente und Einstellungen\Gamer\Desktop\musikplayer\bilder\add.ico", 0, 576, 32, 40, 40, BitOR($SS_NOTIFY,$WS_GROUP))
  95.   48.
  96.       $Icon8 = GUICtrlCreateIcon("C:\Dokumente und Einstellungen\Gamer\Desktop\musikplayer\bilder\delete.ico", 0, 576, 80, 40, 40, BitOR($SS_NOTIFY,$WS_GROUP))
  97.   49.
  98.       $Icon9 = GUICtrlCreateIcon("C:\Dokumente und Einstellungen\Gamer\Desktop\musikplayer\bilder\halblinks.ico", 0, 432, 320, 20, 40, BitOR($SS_NOTIFY,$WS_GROUP))
  99.   50.
  100.       $Icon10 = GUICtrlCreateIcon("C:\Dokumente und Einstellungen\Gamer\Desktop\musikplayer\bilder\halbrechts.ico", 0, 176, 320, 20, 40, BitOR($SS_NOTIFY,$WS_GROUP))
  101.   51.
  102.       GUISetState(@SW_SHOW)
  103.   52.
  104.       #EndRegion ### END Koda GUI section ###
  105.   53.
  106.        
  107.   54.
  108.       GUIRegisterMsg(0x004E, "_DoubleClickOnListView")
  109.   55.
  110.        
  111.   56.
  112.        
  113.   57.
  114.       $aPos = ControlGetPos($Form1, '', $Progress1)
  115.   58.
  116.       While 1
  117.   59.
  118.               Switch GUIGetMsg( )
  119.   60.
  120.               Case $GUI_EVENT_CLOSE
  121.   61.
  122.                   Exit
  123.   62.
  124.               Case $GUI_EVENT_PRIMARYUP
  125.   63.
  126.                   $aInfo = GUIGetCursorInfo($Form1)
  127.   64.
  128.                   If $aInfo[4] = $Progress1 Then
  129.   65.
  130.                       $iPercent = 100 / $aPos[2] * ($aInfo[0] - $aPos[0])
  131.   66.
  132.                       GUICtrlSetData($Progress1, $iPercent)
  133.   67.
  134.                       GUICtrlSetData($Label3, Int($iPercent) & '')
  135.   68.
  136.                   EndIf
  137.   69.
  138.                   Case $GUI_EVENT_DROPPED
  139.   70.
  140.                           Dim $szDrive, $szDir, $szFName, $szExt
  141.   71.
  142.                           $PathSplit = _PathSplit( @GUI_DragFile & "", $szDrive, $szDir, $szFName, $szExt)
  143.   72.
  144.                           GUICtrlCreateListViewItem ($PathSplit[3] & "|" & $PathSplit[4] & "|" & $PathSplit[1] & $PathSplit[2],$listview)
  145.   73.
  146.        
  147.   74.
  148.                   Case $Icon7
  149.   75.
  150.                       $Datei_Input = FileOpenDialog ("Dateien Hinzufügen", @MyDocumentsDir, "Alle Dateien (*.*)", 7)
  151.   76.
  152.                       $Datei = StringSplit($Datei_Input,"|")
  153.   77.
  154.                       Dim $szDrive, $szDir, $szFName, $szExt
  155.   78.
  156.                       For $i = 1 To $Datei[0] Step 1
  157.   79.
  158.                           $PathSplit = _PathSplit($Datei[$i], $szDrive, $szDir, $szFName, $szExt)
  159.   80.
  160.                           GUICtrlCreateListViewItem ($PathSplit[3] & "|" & $PathSplit[4] & "|" & $PathSplit[1] & $PathSplit[2],$listview)
  161.   81.
  162.                       Next
  163.   82.
  164.        
  165.   83.
  166.                   Case $Icon8
  167.   84.
  168.                       GUICtrlDelete (GUICtrlRead ($listview))
  169.   85.
  170.        
  171.   86.
  172.                   Case $listview
  173.   87.
  174.                       _GUICtrlListView_SortItems ($listview, GUICtrlGetState ($listview))
  175.   88.
  176.        
  177.   89.
  178.        
  179.   90.
  180.                       EndSwitch
  181.   91.
  182.                       $vol = GUICtrlRead( $Progress1 )
  183.   92.
  184.                       SoundSetWaveVolume($vol)
  185.   93.
  186.        
  187.   94.
  188.        
  189.   95.
  190.        
  191.   96.
  192.       WEnd
  193.   97.
  194.       Func _DoubleClickOnListView($hWndGUI, $MsgID, $wParam, $lParam);Die Eigentliche Funktion
  195.   98.
  196.           Local $tagNMHDR, $event, $hwndFrom, $code
  197.   99.
  198.           $tagNMHDR = DllStructCreate("int;int;int", $lParam)
  199.  100.
  200.           If @error Then Return
  201.  101.
  202.           $event = DllStructGetData($tagNMHDR, 3); Checkt wie das EVENT aussieht
  203.  102.
  204.           If $wParam = $ListView Then;Wenn der Klick auf das ListView ging..
  205.  103.
  206.               If $event = $NM_DBLCLK Then;.. Wenn es ein DoppelKlick war
  207.  104.
  208.                   ; Hier kommt hin was er machen soll:
  209.  105.
  210.        
  211.  106.
  212.                          $scolor = GUICtrlRead($ListView)
  213.  107.
  214.                          _GUICtrlListView_SetTextBkColor($scolor , 0xFF0000)
  215.  108.
  216.                          $sz = GUICtrlRead(GUICtrlRead($ListView))
  217.  109.
  218.                          ToolTip(""&$sz,0,0)
  219.  110.
  220.                          InputBox(" "," ",""&$sz )
  221.  111.
  222.               EndIf
  223.  112.
  224.           EndIf
  225.  113.
  226.           $tagNMHDR = 0
  227.  114.
  228.           $event = 0
  229.  115.
  230.           $lParam = 0
  231.  116.
  232.       EndFunc   ;==>_DoubleClickOnListView
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement