Exemple #1
0
 public void stopServerAndResetStates()
 {
     server?.stopServer();
     qRCodeConsolePanel.qRCodeButtonText = "運行點名伺服器";
     qRCodeConsolePanel.qrCodeImage      = Properties.Resources.mcu_logo;
     absentStudentsSpeaker.stopSpeaking();
     studentsConsolePanel.reloadAllStatesAndUpdate();
     qRCodeConsolePanel.setShowQRCodeCountDown(false);
     server = null;
 }
Exemple #2
0
        private void initAndRebootServer()
        {
            qRCodeConsolePanel.addNewLog("正在運行QR Code引擎...");
            if (server == null)
            {
                qRCodeConsolePanel.addNewLog("正在初始化伺服器...");
                server = new RollcallServer(rollcallConsolePanel.getCurrentSession(), mcrFactory.getNetStatesManager(),
                                            mcrFactory.createMcrRepository(), qRCodeConsolePanel.qrCodeTrackBarValue);
                server.setRollcallView(this);
            }
            else
            {
                server.stopServer();
            }

            alertIfUsingPrivateIp();
            qRCodeConsolePanel.addNewLog("伺服器 IP 為: " + server.ip);
            qRCodeConsolePanel.addNewLog("正在載入學生資訊...");
            server.startRollcallServer();
            qRCodeConsolePanel.addNewLog("QR Code引擎已成功運行。");
            qRCodeConsolePanel.setShowQRCodeCountDown(true);
        }