Beispiel #1
0
        public Main()
        {
            InitializeComponent();

            server = new TheNoiseServer(serverIP, serverPort, audioPath);

            RefreshToolStrip();
        }
Beispiel #2
0
        private void StartServer()
        {
            // Create a new server
            server = new TheNoiseServer(serverIP, serverPort, audioPath);
            server.DatabaseAddress = sqlIP;
            server.DatabasePort = sqlPort;
            server.DatabaseName = databaseName;
            server.DatabaseUseIntegratedSecurity = sqlIntegratedSecurity;
            server.DatabaseUsername = sqlUsername;
            server.DatabasePassword = sqlPassword;

            // Set the events
            server.DataReceived += server_dataReceived;
            server.ClientConnected += server_clientConnected;
            server.ClientDisconnected += server_clientDisconnected;
            server.ClientAuthenticated += new EventHandler<ClientAuthEventArgs>(server_clientAuthenticated);
            server.GeneralEvent += server_GeneralEvent;

            // Set special config options
            server.Debugging = debugToolStripMenuItem.Checked;

            // Start the server
            server.Start();
        }