示例#1
0
 public SlideHostFacade(SpaceRepository repo, string identifier, ISlideShow slideShower)
 {
     _repo           = repo;
     SlideShower     = slideShower;
     _identifier     = identifier;
     _exposedSpace   = new SequentialSpace();
     _concealedSpace = new SequentialSpace();
     _repo.AddSpace("hub", _exposedSpace);
     Hub.Running        = true;
     SlideShower.IsHost = true;
 }
示例#2
0
        public SlideClientFacade(ISlideShow slideShow, string conn, string username)
        {
            var regex = new Regex(@"\/(\?.*)?$");

            UriFormat   = regex.Replace(conn, "/{0}$1");
            Username    = username;
            SlideShower = slideShow;

            Space            = new RemoteSpace(string.Format(UriFormat, "hub"));
            Session          = new ClientSession(Space, Username);
            _frameConsumer   = new FrameConsumer(Session);
            _controlConsumer = new ClientControlUnit(Session, SlideShower);
        }
示例#3
0
 public FrameTransformer(ISpace space, ISpace concealedSpace, ISlideShow slideShower) : base(space)
 {
     ConcealedSpace = concealedSpace;
     SlideShower    = slideShower;
 }
 public ClientControlUnit(ClientSession session, ISlideShow slideShow) : base(session.Space)
 {
     Session     = session;
     SlideShower = slideShow;
 }
示例#5
0
 public ControlProducer(ISpace concealedSpace, ISlideShow slideShower, string identifier)
 {
     SlideShower    = slideShower;
     ConcealedSpace = concealedSpace;
     Identifier     = identifier;
 }
        public ConferenceInitializer(string username, string conferenceName, string ip, ObservableCollection <string> dataSource, ISlideShow slideShower) //For the client
        {                                                                                                                                                 //for client
            _name = username;
            var uri = "tcp://" + ip + ":5002";

            Chat           = new Chat(username, uri, conferenceName, dataSource);
            _tokenSource   = new CancellationTokenSource();
            Client         = new SlideClientFacade(slideShower, uri + "/?CONN", username);
            Client.Running = true;

            Task.Factory.StartNew(InitChat);
        }
        public ConferenceInitializer(string username, string conferenceName, ObservableCollection <string> dataSource, SpaceRepository spaceRepo, ISlideShow slideShower) //For the host
        {                                                                                                                                                                 //for host
            _name = username;

            var hostentry = ProjectUtilities.IpFetcher.GetLocalIpAdress();
            var uri       = $"tcp://{hostentry}:5002";

            spaceRepo.AddGate(uri + "?CONN");
            Chat = new Chat(username, uri, conferenceName, spaceRepo, dataSource);
            Host = new SlideHostFacade(spaceRepo, username, slideShower);
            Host.Control.Controlling = true;
            _tokenSource             = new CancellationTokenSource();

            Task.Factory.StartNew(InitChat);
        }