Hey leute ,
ich hatte geplant einen kleinen TCP Chat zu baun aber ich habe echt 0 ahnung davon =/
deswegen hatte ich vor schon mal das GUI zu machen und wollte fragen ob mir jemand mit
dem Inhalt helfen kann.
Hier das Benutzer GUI
C
#include <ButtonConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <GUIListBox.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("Chat Server Normal", 634, 392, 237, 151)
$Edit1 = GUICtrlCreateEdit("", 0, 0, 505, 353, BitOR($ES_AUTOVSCROLL,$ES_AUTOHSCROLL,$ES_READONLY,$ES_WANTRETURN,$WS_VSCROLL,$WS_BORDER))
GUICtrlSetData(-1, "Test connected....")
$List1 = GUICtrlCreateList("", 504, 0, 129, 214)
GUICtrlSetData(-1, " __ User Online __"&"|Test")
$Label2 = GUICtrlCreateLabel("___________________", 512, 232, 118, 17)
$Label1 = GUICtrlCreateLabel("Verbindungs Information", 512, 224, 118, 17)
$Label3 = GUICtrlCreateLabel("___________________", 512, 288, 118, 17)
$Label5 = GUICtrlCreateLabel("USERNAME", 536, 248, 65, 17)
$Label6 = GUICtrlCreateLabel("Server-IP", 544, 264, 48, 17)
$Label7 = GUICtrlCreateLabel("Port", 552, 280, 23, 17)
$Label4 = GUICtrlCreateLabel("___________________", 512, 336, 118, 17)
$Label8 = GUICtrlCreateLabel(@YEAR & "." & @MON & "." & @MDAY, 540, 325, 58, 17)
$l_time = GUICtrlCreateLabel("09:31:00", 544, 309, 46, 17)
$Button1 = GUICtrlCreateButton("Senden", 512, 360, 115, 25, $BS_DEFPUSHBUTTON)
$Input1 = GUICtrlCreateInput("Enter Message", 0, 362, 505, 21)
GUISetState(@SW_SHOW)
$satz = "cennected."
$sprache = ObjCreate("SAPI.SpVoice")
$sprache.Speak($satz)
#EndRegion ### END Koda GUI section ###
Global $UHR
While 1
if $UHR = @HOUR & ":" & @min & ":" & @SEC Then
Else
$UHR = @HOUR & ":" & @min & ":" & @SEC
GUICtrlSetData($l_time,$UHR & "")
EndIf
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
Case $Button1
If guictrlread($Input1) = "" Then
MsgBox(48,"Achtung","Bitte geben schreiben sie einen Nachichtentext")
Else
GUICtrlSetData($Edit1,guictrlread($Edit1)&@CRLF&@HOUR&":"&@MIN&":"&@SEC&"[Test] : "&guictrlread($Input1))
GUICtrlSetData($Input1,"")
EndIf
EndSwitch
WEnd
Alles anzeigen
Hier das Administrator GUI
C
#include <ButtonConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <GUIListBox.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("Chat - Admin", 634, 426, 349, 112)
$Edit1 = GUICtrlCreateEdit("", 0, 0, 505, 353, BitOR($ES_AUTOVSCROLL,$ES_AUTOHSCROLL,$ES_READONLY,$ES_WANTRETURN,$WS_VSCROLL,$WS_BORDER))
GUICtrlSetData(-1, "Test connected....")
$List1 = GUICtrlCreateList("", 504, 0, 129, 214)
GUICtrlSetData(-1, " __ User Online __"&"|Test")
$Label2 = GUICtrlCreateLabel("___________________", 512, 232, 118, 17)
$Label1 = GUICtrlCreateLabel("Verbindungs Information", 512, 224, 118, 17)
$Label3 = GUICtrlCreateLabel("___________________", 512, 288, 118, 17)
$Label5 = GUICtrlCreateLabel("USERNAME", 536, 248, 65, 17)
$Label6 = GUICtrlCreateLabel("Server-IP", 544, 264, 48, 17)
$Label7 = GUICtrlCreateLabel("Port", 552, 280, 23, 17)
$Label4 = GUICtrlCreateLabel("___________________", 512, 336, 118, 17)
$Label8 = GUICtrlCreateLabel(@YEAR & "." & @MON & "." & @MDAY, 540, 325, 58, 17)
$l_time = GUICtrlCreateLabel("09:31:00", 544, 309, 46, 17)
$Button1 = GUICtrlCreateButton("Senden", 512, 360, 115, 25, $BS_DEFPUSHBUTTON)
$Input1 = GUICtrlCreateInput("Enter Message", 0, 362, 505, 21)
$Button2 = GUICtrlCreateButton("Client Kicken", 8, 392, 115, 25)
$Button3 = GUICtrlCreateButton("Admin Nachicht", 128, 392, 115, 25)
$Button4 = GUICtrlCreateButton("Client Bannen falls es einer rein macht :>", 248, 392, 379, 25)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
$satz = "cennected."
$sprache = ObjCreate("SAPI.SpVoice")
$sprache.Speak($satz)
Global $UHR
While 1
if $UHR = @HOUR & ":" & @min & ":" & @SEC Then
Else
$UHR = @HOUR & ":" & @min & ":" & @SEC
GUICtrlSetData($l_time,$UHR & "")
EndIf
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
Case $Button1
If guictrlread($Input1) = "" Then
MsgBox(48,"Achtung","Bitte geben schreiben sie einen Nachichtentext")
Else
GUICtrlSetData($Edit1,guictrlread($Edit1)&@CRLF&@HOUR&":"&@MIN&":"&@SEC&"[Test-Admin] : "&guictrlread($Input1))
GUICtrlSetData($Input1,"")
EndIf
Case $Button3
GUICtrlSetData($Edit1,guictrlread($Edit1)&@CRLF&"___________________________________ADMIN-Warnung_______________________________________"&@CRLF&" "&guictrlread($Input1)&@CRLF&"___________________________________ADMIN-Warnung_______________________________________")
GUICtrlSetData($Input1,"")
EndSwitch
WEnd
Alles anzeigen
Es soll ein normaler chat werden, mit kleinen Funktionen z.B das Administratoren auch kicken können.Falls jemand eine Ban Fraktion
einfügen könnte wäre das echt super.