public void ConnectTo(TVInfo info) { iRemote.SetConnectCallback(this.connectOk, this.connectFail, this.disc, this.authentic, this.authenticFail, this.authenticDeny, this.authenticFull); iRemote.SetPacketParser(this.packetCb); this.curTv = info; HttpDownloader.SetTvIp(info.Ip); iRemote.Connect(ref this.curTv, 0xd6d8, new StringBuilder("Mobile Simulator")); }
public override Task <object[]> StartQueryMetadata(string text, out CancellationToken token) { VerifyAccess(); if (this.queryCancellationToken != null) { this.queryCancellationToken.Cancel(); } this.queryCancellationToken = new CancellationTokenSource(); token = this.queryCancellationToken.Token; return(TVInfo.StartQueryMetadata(text, token).ContinueWith(t => (object[])t.Result, token)); }
void _iRemote_addTVEvent(TVInfo info) { ((SamsungTVSetup)GetSetupControl()).TVAdded(ref info); if (info.ToString() == IPAddress) { MAC = Auto3DHelpers.RequestMACAddress(IPAddress); if (iRemote.ToString() != info.ToString()) { _iRemote.ConnectTo(info); } } }
public void TvDeletedCallback(ref TVInfo info) { foreach (TVInfo info2 in this.tvs) { if (info2.Mac == info.Mac) { this.tvs.Remove(info2); break; } } TVInfo localCopy = info; MediaPortal.ProcessPlugins.Auto3D.Devices.Auto3DHelpers.GetMainForm().Invoke((System.Windows.Forms.MethodInvoker) delegate { if (removeTVEvent != null) { removeTVEvent(localCopy); } }); }
public override void SelectMetadata(object metadata) { TVDBSeries series = metadata as TVDBSeries; if (series != null) { if (this.metaCancellationToken != null) { this.metaCancellationToken.Cancel(); } this.metaCancellationToken = new CancellationTokenSource(); CancellationToken token = this.metaCancellationToken.Token; TVInfo.StartQueryMetadataDetails(series.SeriesId, token).ContinueWith( t => Dispatcher.BeginInvoke(UpdateFullMetadata, t, token), token); } else { this.seriesMetadata = null; Backdrop = stockBackdrop; } }
public void TvAddedCallback(ref TVInfo info) { foreach (TVInfo info2 in this.tvs) { if (info2.Mac == info.Mac) { return; // is already in list } } TVInfo localCopy = info; this.tvs.Add(localCopy); MediaPortal.ProcessPlugins.Auto3D.Devices.Auto3DHelpers.GetMainForm().Invoke((System.Windows.Forms.MethodInvoker) delegate { if (addTVEvent != null) { addTVEvent(localCopy); } }); }
void iRemote_removeTVEvent(TVInfo info) { ((SamsungTVSetup)GetSetupControl()).TVRemoved(ref info); }
public static extern void Connect(ref TVInfo info, int port, StringBuilder DeviceName);