Ejemplo n.º 1
0
        public void UpdateChannelList()
        {
            if (graphicBuilder.State == BDAState.Running || graphicBuilder.State == BDAState.RunningNoRenderers)
            {
                try
                {
                    DVBTTuning tuner = new DVBTTuning();

                    tuner.TuneSelect(frequencia, onid, tsid, sid);

                    channels = new List <Channel>();

                    channels = this.graphicBuilder.GetChannelList(tuner.TuningSpace).ToList();

                    if (ChannelListChanged != null)
                    {
                        ChannelListChanged(this, new ChannelEventArgs(channels));
                    }
                }
                catch (Exception ex)
                {
                    NewLogMessage(string.Format("EXCEPTION: {1}{0}Site:{2}", Environment.NewLine, ex.Message, "DigitalTVScreen.UpdateChannelList()"));
                }
            }
        }
Ejemplo n.º 2
0
        public void Tune()
        {
            try
            {
                DVBTTuning tuner = new DVBTTuning();

                tuner.TuneSelect(frequencia, onid, tsid, sid);

                graphicBuilder.SubmitTuneRequest(tuner.TuneRequest);

                try
                {
                    currentChannel = Channels.Single(x => x.SID == Convert.ToInt16(sid));
                }
                catch
                {
                    currentChannel = new Channel()
                    {
                        SID = Convert.ToInt16(sid)
                    };
                }
            }
            catch (Exception ex)
            {
                NewLogMessage(string.Format("EXCEPTION: {1}{0}Site:{2}", Environment.NewLine, ex.Message, "DigitalTVScreen.Tune()"));
            }
        }
Ejemplo n.º 3
0
        public void StartManual()
        {
            DVBTTuning tuner = new DVBTTuning();

            tuner.TuneSelect(this.frequencia, this.onid, this.tsid, this.sid);

            graphicBuilder.StartManual(tuner);
            graphicBuilder.SaveGraph(string.Format("C:\\dvbGraph_manual_{0}.grf", DateTime.Now.ToString("HH-mm-ss")));
        }
Ejemplo n.º 4
0
        public void Tune(Channel channel)
        {
            try
            {
                DVBTTuning tuner = new DVBTTuning();

                tuner.TuneSelect(frequencia, onid, tsid, channel.SID);

                graphicBuilder.SubmitTuneRequest(tuner.TuneRequest);

                currentChannel = channel;
            }
            catch (Exception ex)
            {
                NewLogMessage(string.Format("EXCEPTION: {1}{0}Site:{2}", Environment.NewLine, ex.Message, "DigitalTVScreen.Tune(Channel)"));

                currentChannel = null;
            }
        }
Ejemplo n.º 5
0
        public void Start()
        {
            try
            {
                DVBTTuning tuner = new DVBTTuning();

                tuner.TuneSelect(this.frequencia, this.onid, this.tsid, this.sid);

                graphicBuilder.StartToGetChannels(tuner);
                this.UpdateChannelList();
                graphicBuilder.Stop();

                int timeout = 0;
                while (this.State != BDAState.Stopped && timeout < 100)
                {
                    timeout++;
                }

                graphicBuilder.Start(tuner);

                try
                {
                    currentChannel = Channels.Single(x => x.SID == Convert.ToInt16(sid));
                }
                catch
                {
                    currentChannel = new Channel()
                    {
                        SID = Convert.ToInt16(sid)
                    };
                }
            }
            catch (Exception ex)
            {
                NewLogMessage(string.Format("EXCEPTION: {1}{0}Site:{2}", Environment.NewLine, ex.Message, "DigitalTVScreen.Start()"));
            }
        }