/// <summary> /// Grabs the epg. /// </summary> public void GrabEpg() { _tvController.OnTvServerEvent += _eventHandler; TvBusinessLayer layer = new TvBusinessLayer(); Setting s = layer.GetSetting("timeoutEPG", "10"); if (Int32.TryParse(s.Value, out _epgTimeOut) == false) { _epgTimeOut = 10; } _currentTransponder = TransponderList.Instance.CurrentTransponder; Channel channel = _currentTransponder.CurrentChannel; Log.Epg("EpgCard: grab epg on card: #{0} transponder: #{1} ch:{2} ", _card.IdCard, TransponderList.Instance.CurrentIndex, channel.DisplayName); _state = EpgState.Idle; _isRunning = true; _user = UserFactory.CreateEpgUser(); if (GrabEpgForChannel(channel, _currentTransponder.Tuning, _card)) { Log.Epg("EpgCard: card: {0} starting to grab {1}", _user.CardId, _currentTransponder.Tuning.ToString()); _currentTransponder.InUse = true; //succeeded, then wait for epg to be received _state = EpgState.Grabbing; _grabStartTime = DateTime.Now; _epgTimer.Enabled = true; return; } Log.Epg("EpgCard: unable to grab epg transponder: {0} ch: {1} started on {2}", TransponderList.Instance.CurrentIndex, channel.DisplayName, _user.CardId); Log.Epg("{0}", _currentTransponder.Tuning.ToString()); }
/// <summary> /// Determines whether the specified <see cref="T:System.Object"></see> is equal to the current <see cref="T:System.Object"></see>. /// </summary> /// <param name="obj">The <see cref="T:System.Object"></see> to compare with the current <see cref="T:System.Object"></see>.</param> /// <returns> /// true if the specified <see cref="T:System.Object"></see> is equal to the current <see cref="T:System.Object"></see>; otherwise, false. /// </returns> public override bool Equals(object obj) { Transponder other = (Transponder)obj; if (other.TuningDetail.ChannelType != TuningDetail.ChannelType) { return(false); } if (other.TuningDetail.Frequency != TuningDetail.Frequency) { return(false); } if (other.TuningDetail.Modulation != TuningDetail.Modulation) { return(false); } if (other.TuningDetail.Symbolrate != TuningDetail.Symbolrate) { return(false); } if (other.TuningDetail.Bandwidth != TuningDetail.Bandwidth) { return(false); } if (other.TuningDetail.Polarisation != TuningDetail.Polarisation) { return(false); } return(true); }