Ejemplo n.º 1
0
	def __init__( self ):
		wx.Frame.__init__( self, None, wx.ID_ANY, "MWCam", style=wx.DEFAULT_FRAME_STYLE & ~wx.RESIZE_BORDER )
		
		# Socket Cleint
		self.SocketClient = MWScore.SocketClient( SOCKET_CLIENT_HOST, SOCKET_CLIENT_PORT )
		self.SocketClient.StartThread()
		
		# IP Camera
		#self.Camera = Trendnet( CAMERA_IP, CAMERA_USERNAME, CAMERA_PASSWORD )
		self.Camera = DLink( CAMERA_IP, CAMERA_USERNAME, CAMERA_PASSWORD )
		self.Camera.Connect()
		
		# Camera Panel
		self.CameraPanel = CameraPanel( self, self.Camera, self.SocketClient )
		
		# Frame timer
		self.Timer = wx.Timer( self, self.ID_FRAME_REFRESH )
		self.Timer.Start(10)
		wx.EVT_TIMER( self, self.ID_FRAME_REFRESH, self.Refresh )
		
		# Frame Sizer
		self.Sizer = None
		self.Size()
		
		# Show frame
		self.Show( True )
Ejemplo n.º 2
0
def main(server):
    print("Connecting to host: " + server)
    conn = MWScore.SocketClient(server, 2525, fn)
    # run whatever GUI you want here
    time.sleep(10)
    conn.ThreadKill = True