CODICE
#cs ----------------------------------------------------------------------------
AutoIt Version: 3.3.0.0
Author: GreyWolf92
#ce ----------------------------------------------------------------------------
#include <EzSkin.au3>
#include <Misc.au3>
#include <GUIConstants.au3>
; EzSkinGUICreate( "title" [, width [, height [, left [, top [, style [, ExStyle [, parent [, gui_icon = True [, drag_window = True ]]]]]]]]] )
; If Left or/and Top = -2 then active Random Position
; If Style += $SS_RIGHT (Right-aligns the Caption), If Style += $SS_CENTER (Center-aligns the Caption)
EzSkinGuiCreate("Calcolatrice", 480, 220, 364, 389)
; EzSkinSetIconTips( ToolTips = "tip1|tip2|tip3" [, cursorStyle = -1 [, winhandle = "" ]] )
;EzSkinSetIconTips("Example 1|Example 2|Example 3")
$Label1 = EzSkin_GUICtrlCreateLabel("Calcolatrice By GreyWolf", 165, 20, 268, 33)
$Input1 = EzSkin_GUICtrlCreateInput("", 24, 48, 49, 21)
$Input2 = EzSkin_GUICtrlCreateInput("", 80, 48, 49, 21)
; EzSkinCreateButton( "text", left, top [, width [, height [, Style [, ExStyle [, Icon = -1 [, File = "shell32.dll" ]]]]]])
; Note: If the parameter ExStyle += $LVS_EX_SNAPTOGRID (0x00080000),
; you can cross the coordinates limit in the top of the window, imposed by the Menu and the ToolBar buttons.
$addizione = EzSkinCreateButton("Addizione", 24, 80, 105, 25, 0)
$sottrazione = EzSkinCreateButton("Sottrazione", 24, 112, 105, 25, 0)
$moltiplicazione = EzSkinCreateButton("Moltiplicazione", 24, 144, 105, 25, 0)
$divisione = EzSkinCreateButton("Divisione", 24, 176, 107, 25, 0)
$Input3 = EzSkin_GUICtrlCreateInput("", 336, 48, 49, 21)
$Coseno = EzSkinCreateButton("Coseno", 272, 80, 73, 25, 0)
$Seno = EzSkinCreateButton("Seno", 368, 80, 75, 25, 0)
$Quadrato = EzSkinCreateButton("Quadrato", 272, 112, 75, 25, 0)
$Cubo= EzSkinCreateButton("Cubo", 368, 112, 75, 25, 0)
$Radice = EzSkinCreateButton("Radice Quadr.", 272, 144, 75, 25, 0)
$logaritmo = EzSkinCreateButton("Logaritmo", 368, 144, 75, 25, 0)
EzSkinGUISetState(@SW_SHOW)
While 1
$Msg = EzSkinGuiGetMsg ()
; EzSkinGUItoTray( "title", "text", timeout [, option]) - same as TrayTip
;If @extended = 2 Then EzSkinGUItoTray("EzSkinGUItoTray", "Thanks to: Valuater, big_daddy and Joscpe, for this great job!", 10, 1)
; EzSkinRollUpDown( [winhandle] )
;If @extended = 3 Then EzSkinRollUpDown()
Switch $msg
Case $addizione
$raddizione = EzSkinCtrlRead($input1) + EzSkinCtrlRead($input2)
; EzSkinMsgBox( flag, "title", "text" [, timeout [, YoursOwnButtons = "button1|button2|button3" [, left [, top [, AllwaysActive = False ]]]]] )
; If Left or/and Top = -2 then active Random Position
EzSkinMsgBox(0,"Addizione","il risultato θ " & $raddizione)
Case $sottrazione
$rsottrazione = EzSkinCtrlRead($input1) - EzSkinCtrlRead($input2)
EzSkinMsgBox(0,"Sottrazione","il risultato θ " & $rsottrazione )
Case $moltiplicazione
$rmoltiplicazione = EzSkinCtrlRead($input1) * EzSkinCtrlRead($input2)
EzSkinMsgBox(0,"Moltiplicazione","il risultato θ " & $rmoltiplicazione)
Case $divisione
$rdivisione = EzSkinCtrlRead($input1) / EzSkinCtrlRead($input2)
EzSkinMsgBox(0,"Divisione","il risultato θ " & $rdivisione)
Case $coseno
$pi = 3.14159265358979
$angolo = $pi / 180
$rcoseno = Cos( EzSkinCtrlRead($input3) * $angolo)
EzSkinMsgBox(0,"coseno", "Il coseno θ " & $rcoseno)
Case $seno
$pi = 3.14159265358979
$angolo = $pi / 180
$rseno = Sin( EzSkinCtrlRead($input3) * $angolo)
EzSkinMsgBox(0,"seno", "Il seno θ " & $rseno)
Case $quadrato
$rquadrato = ( EzSkinCtrlRead($input3))*( EzSkinCtrlRead($input3))
EzSkinMsgBox(0,"quadrato", "Il quadrato θ " & $rquadrato)
Case $cubo
$rcubo = ( EzSkinCtrlRead($input3)) *( EzSkinCtrlRead($input3)) *( EzSkinCtrlRead($input3))
EzSkinMsgBox(0,"cubo", "Il cubo θ " & $rcubo)
Case $radice
$rradice = Sqrt( EzSkinCtrlRead($input3))
EzSkinMsgBox(0,"radice", "La radice Quadrata θ " & $rradice)
Case $logaritmo
$rlogaritmo = Log( EzSkinCtrlRead($input3))
EzSkinMsgBox(0,"logaritmo", "Il logaritmo θ " & $rlogaritmo)
Case $GUI_EVENT_CLOSE
Exit
EndSwitch
Wend