Exemple #1
0
        public void ConnectProtocol()
        {
            if (stream != null)
            {
                return;
            }

            try
            {
                // On cree un objet en fonction du protocole utilise (parametrable, mais non fait par manque de temps)
                stream = AppDomain.CurrentDomain.CreateInstanceFromAndUnwrap(
                    "../DLL/Video_" + protocol + ".dll", "Stream.Video_" + protocol) as iStream;
                stream.Address = server_address;
                stream.Port    = server_port;
                stream.idVideo = id;
            }
            catch (Exception)
            {
                throw new Exception("Protocole introuvable !");
            }
        }
Exemple #2
0
        public VideoWindow(Video aVideo)
        {
            theVideo = aVideo;
            try
            {
                theStream = theVideo.Stream;


                InitializeComponent();

                this.Name = theVideo.Name;
                this.Text = theVideo.Name;

                InitializeTimer();

                Play();
            }
            catch (Exception e)
            {
                MessageBox.Show(e.Message, "Erreur", MessageBoxButtons.OK, MessageBoxIcon.Error);
                this.Close();
            }
        }