Example #1
0
        //private static List<string> listOfDMs = new List<string>();
        //public void SetListOfDMs(List<string> theList)
        //{
        //    foreach (string dm in theList)
        //    {
        //        if (!listOfDMs.Contains(dm))
        //        {
        //            listOfDMs.Add(dm);
        //        }
        //    }
        //    HandshakeManager.HandshakeManager.AvailableDMs = listOfDMs;
        //}
        //public List<string> GetListOfDMs()
        //{
        //    return listOfDMs;
        //}


        public ViewManager(string simModelPath, ref SimulationEventDistributor distributor, int numberOfSeats)
        {
            simModelName = simModelPath;
            simModelInfo = smr.readModel(simModelName);
            server       = new SimulationEventDistributorClient();
            distributor.RegisterClient(ref server);

            //try
            //{
            //    server.Connect(hostName, Convert.ToInt32(portNumber));
            //}
            //catch
            //{
            //    throw new Exception("View Manager cannot connect to Network Server...");
            //}
            //networkConnectionViewer = new NetworkConnectionViewer();
            //eventStreamViewer = new EventStreamViewer();
            handshakeManager      = new HandshakeManager.HandshakeManager(ref server, ref simModelInfo);
            authenticationManager = new AuthenticationManager.AuthenticationManager(ref server, ref simModelInfo, numberOfSeats);
            textChat  = new TextChatStreamViewer();
            isRunning = true;
            Thread.Sleep(200);
            //HandshakeManager.HandshakeManager.AvailableDMs = listOfDMs;
        }
Example #2
0
        //private static List<string> listOfDMs = new List<string>();
        //public void SetListOfDMs(List<string> theList)
        //{
        //    foreach (string dm in theList)
        //    {
        //        if (!listOfDMs.Contains(dm))
        //        {
        //            listOfDMs.Add(dm);
        //        }
        //    }
        //    HandshakeManager.HandshakeManager.AvailableDMs = listOfDMs;
        //}
        //public List<string> GetListOfDMs()
        //{
        //    return listOfDMs;
        //}


        public ViewManager(string simModelPath, ref SimulationEventDistributor distributor, int numberOfSeats)
        {
            simModelName = simModelPath;
            simModelInfo = smr.readModel(simModelName);
            server = new SimulationEventDistributorClient();
            distributor.RegisterClient(ref server);

            //try
            //{
            //    server.Connect(hostName, Convert.ToInt32(portNumber));
            //}
            //catch
            //{
            //    throw new Exception("View Manager cannot connect to Network Server...");
            //}
            //networkConnectionViewer = new NetworkConnectionViewer();
            //eventStreamViewer = new EventStreamViewer();
            handshakeManager = new HandshakeManager.HandshakeManager(ref server, ref simModelInfo);
            authenticationManager = new AuthenticationManager.AuthenticationManager(ref server, ref simModelInfo, numberOfSeats);
            textChat = new TextChatStreamViewer();
            isRunning = true;
            Thread.Sleep(200);
            //HandshakeManager.HandshakeManager.AvailableDMs = listOfDMs;
        }