Beispiel #1
0
        //-------------------------------CTOR
        public NetworkExamService(Exam examEmptyCopy, string examKey,
                                  ref Logger logger, UpdateStatusDelegate method, ExaminationStudentsFilter firewall)
        {
            OriginalExamWithNoStdDetails = examEmptyCopy;

            ExamKey = examKey;

            ExamSubmissionZippedStringList = new List <ExamStatusUpdate>();

            aLogger      = logger;
            UpdateMethod = method;

            submittedFiles = new SortedList <string, string>();

            Firewall = firewall;
        }
Beispiel #2
0
        private void startServerBtn_Click(object sender, EventArgs e)
        {
            ExaminationStudentsFilter firewall = new ExaminationStudentsFilter(checkBox1.Checked ? FilterationSecurityLevel.High : FilterationSecurityLevel.Moderate,
                                                                               studentPassTxtBox.Text, instructorPassTxtBox.Text, FirewallRules);

            server   = ScsServiceBuilder.CreateService(new ScsTcpEndPoint(int.Parse(portTxtBox.Text)));
            aService = new NetworkExamService(anExam, studentPassTxtBox.Text, ref aLogger, UpdateDetails, firewall);
            //Add Phone Book Service to service application
            server.AddService <INetworkExamService,
                               NetworkExamService>(aService);

            //Start server
            server.Start();

            //Wait user to stop server by pressing Enter
            aLogger.LogMessage(
                "Server Started Successfully", LogMsgType.Verbose);
            //Console.ReadLine();

            //Stop server
            //server.Stop();
        }