From: <pra...@us...> - 2008-03-17 14:15:20
|
Revision: 1479 http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=1479&view=rev Author: prashantv Date: 2008-03-17 07:14:49 -0700 (Mon, 17 Mar 2008) Log Message: ----------- Add XBMCServer plugin to svn Added Paths: ----------- trunk/plugins/Commands/ trunk/plugins/Commands/CloseConnection.cs trunk/plugins/Commands/CommandHandler.cs trunk/plugins/Commands/ListChannels.cs trunk/plugins/Commands/ListGroups.cs trunk/plugins/Commands/StopTimeshift.cs trunk/plugins/Commands/TimeshiftChannel.cs trunk/plugins/ConnectionHandler.cs trunk/plugins/Listener.cs trunk/plugins/Plugin.cs trunk/plugins/Properties/ trunk/plugins/Properties/AssemblyInfo.cs trunk/plugins/TV/ trunk/plugins/TV/ServerInterface.cs trunk/plugins/TV/Utils.cs trunk/plugins/TV/frmMain.cs trunk/plugins/TV/frmMain.designer.cs trunk/plugins/TV/frmMain.resx trunk/plugins/TVServer Live TV/ trunk/plugins/TVServer Live TV/MpLiveTv/ trunk/plugins/TVServer Live TV/MpLiveTv/.MpTVConnector.py.swp trunk/plugins/TVServer Live TV/MpLiveTv/MpTVConnector.py trunk/plugins/TVServer Live TV/MpLiveTv/MpTVConnector.pyo trunk/plugins/TVServer Live TV/MpLiveTv/__init__.py trunk/plugins/TVServer Live TV/MpLiveTv/__init__.pyo trunk/plugins/TVServer Live TV/MpLiveTv/xbmcplugin_list.py trunk/plugins/TVServer Live TV/MpLiveTv/xbmcplugin_list.pyo trunk/plugins/TVServer Live TV/default.py trunk/plugins/TVServer Live TV/default.tbn trunk/plugins/TVServer Live TV/resources/ trunk/plugins/TVServer Live TV/resources/language/ trunk/plugins/TVServer Live TV/resources/language/english/ trunk/plugins/TVServer Live TV/resources/language/english/strings.xml trunk/plugins/TVServer Live TV/resources/settings.xml trunk/plugins/TVServerConnection.cs trunk/plugins/TVServerXBMC.csproj trunk/plugins/TVServerXBMC.sln trunk/plugins/TVServerXBMC.suo trunk/plugins/bin/ trunk/plugins/bin/Debug/ trunk/plugins/bin/Debug/DirectShowLib.dll trunk/plugins/bin/Debug/DirectShowLib.pdb trunk/plugins/bin/Debug/Gentle.Common.dll trunk/plugins/bin/Debug/Gentle.Framework.dll trunk/plugins/bin/Debug/Gentle.Provider.MySQL.dll trunk/plugins/bin/Debug/Gentle.Provider.SQLServer.dll trunk/plugins/bin/Debug/Gentle.config trunk/plugins/bin/Debug/MySql.Data.dll trunk/plugins/bin/Debug/PluginBase.dll trunk/plugins/bin/Debug/PluginBase.pdb trunk/plugins/bin/Debug/SetupControls.dll trunk/plugins/bin/Debug/SetupControls.pdb trunk/plugins/bin/Debug/TVDatabase.dll trunk/plugins/bin/Debug/TVDatabase.pdb trunk/plugins/bin/Debug/TVLibrary.dll trunk/plugins/bin/Debug/TvControl.dll trunk/plugins/bin/Debug/TvControl.pdb trunk/plugins/bin/Debug/TvControl.xml trunk/plugins/bin/Debug/TvLibrary.Interfaces.dll trunk/plugins/bin/Debug/TvLibrary.Interfaces.pdb trunk/plugins/bin/Debug/TvLibrary.Interfaces.xml trunk/plugins/bin/Debug/log4net.dll trunk/plugins/bin/Release/ trunk/plugins/bin/Release/Gentle.Common.dll trunk/plugins/bin/Release/Gentle.Framework.dll trunk/plugins/bin/Release/Gentle.Provider.MySQL.dll trunk/plugins/bin/Release/Gentle.Provider.SQLServer.dll trunk/plugins/bin/Release/Gentle.config trunk/plugins/bin/Release/MySql.Data.dll trunk/plugins/bin/Release/PluginBase.dll trunk/plugins/bin/Release/PluginBase.pdb trunk/plugins/bin/Release/SetupControls.dll trunk/plugins/bin/Release/TVDatabase.dll trunk/plugins/bin/Release/TVDatabase.pdb trunk/plugins/bin/Release/TVLibrary.dll trunk/plugins/bin/Release/TVServerXBMC.dll trunk/plugins/bin/Release/TVServerXBMC.pdb trunk/plugins/bin/Release/TvControl.dll trunk/plugins/bin/Release/TvLibrary.Interfaces.dll trunk/plugins/bin/Release/log4net.dll Added: trunk/plugins/Commands/CloseConnection.cs =================================================================== --- trunk/plugins/Commands/CloseConnection.cs (rev 0) +++ trunk/plugins/Commands/CloseConnection.cs 2008-03-17 14:14:49 UTC (rev 1479) @@ -0,0 +1,28 @@ +using System; +using System.Collections.Generic; +using System.Text; + +namespace TVServerXBMC.Commands +{ + class CloseConnection : CommandHandler + { + + public CloseConnection(ConnectionHandler connection) : base(connection) + { + + } + + public override void handleCommand(string command, string[] arguments) + { + // does not matter what arguments it has. + + getConnection().Disconnect(); + } + + public override string getCommandToHandle() + { + return "CloseConnection"; + } + + } +} Added: trunk/plugins/Commands/CommandHandler.cs =================================================================== --- trunk/plugins/Commands/CommandHandler.cs (rev 0) +++ trunk/plugins/Commands/CommandHandler.cs 2008-03-17 14:14:49 UTC (rev 1479) @@ -0,0 +1,24 @@ +using System; +using System.Collections.Generic; +using System.Text; + +namespace TVServerXBMC.Commands +{ + abstract class CommandHandler + { + private ConnectionHandler connection; + + public CommandHandler(ConnectionHandler connection) + { + this.connection = connection; + } + + public ConnectionHandler getConnection() + { + return this.connection; + } + + public abstract void handleCommand(String command, String[] arguments); + public abstract String getCommandToHandle(); + } +} Added: trunk/plugins/Commands/ListChannels.cs =================================================================== --- trunk/plugins/Commands/ListChannels.cs (rev 0) +++ trunk/plugins/Commands/ListChannels.cs 2008-03-17 14:14:49 UTC (rev 1479) @@ -0,0 +1,36 @@ +using System; +using System.Collections.Generic; +using System.Text; +using MPTvClient; + +namespace TVServerXBMC.Commands +{ + class ListChannels : CommandHandler + { + public ListChannels(ConnectionHandler connection) : base(connection) + { + + } + + public override void handleCommand(string command, string[] arguments) + { + // we want to list all channels in group arg[0] + String group = arguments[0]; + List<string> results = new List<string>(); + + List<ChannelInfo> channels = TVServerConnection.getChannels(group); + foreach(ChannelInfo c in channels) + { + results.Add(c.channelID + ";" + c.name); + Console.WriteLine("CHANNEL : " + c.channelID + ";" + c.name); + } + + getConnection().writeList(results); + } + + public override string getCommandToHandle() + { + return "ListChannels"; + } + } +} Added: trunk/plugins/Commands/ListGroups.cs =================================================================== --- trunk/plugins/Commands/ListGroups.cs (rev 0) +++ trunk/plugins/Commands/ListGroups.cs 2008-03-17 14:14:49 UTC (rev 1479) @@ -0,0 +1,32 @@ +using System; +using System.Collections.Generic; +using System.Text; + +namespace TVServerXBMC.Commands +{ + class ListGroups : CommandHandler + { + public ListGroups(ConnectionHandler connection) + : base(connection) + { + } + public override void handleCommand(string command, string[] arguments) + { + // this needs no arguments, and will just list all the groups + + List<String> groups = TVServerConnection.getGroups(); + foreach (String group in groups) + { + Console.WriteLine("GROUP : " + group); + } + + getConnection().writeList(groups); + + } + + public override string getCommandToHandle() + { + return "ListGroups"; + } + } +} Added: trunk/plugins/Commands/StopTimeshift.cs =================================================================== --- trunk/plugins/Commands/StopTimeshift.cs (rev 0) +++ trunk/plugins/Commands/StopTimeshift.cs 2008-03-17 14:14:49 UTC (rev 1479) @@ -0,0 +1,29 @@ +using System; +using System.Collections.Generic; +using System.Text; + +namespace TVServerXBMC.Commands +{ + class StopTimeshift : CommandHandler + { + public StopTimeshift(ConnectionHandler connection) + : base(connection) + { + + } + /* + * No arguments needed + */ + public override void handleCommand(string command, string[] arguments) + { + bool result = TVServerConnection.StopTimeshift(); + Console.WriteLine("StopTimeshift result : " + result.ToString()); + getConnection().WriteLine(result.ToString()); + } + + public override string getCommandToHandle() + { + return "StopTimeshift"; + } + } +} Added: trunk/plugins/Commands/TimeshiftChannel.cs =================================================================== --- trunk/plugins/Commands/TimeshiftChannel.cs (rev 0) +++ trunk/plugins/Commands/TimeshiftChannel.cs 2008-03-17 14:14:49 UTC (rev 1479) @@ -0,0 +1,38 @@ +using System; +using System.Collections.Generic; +using System.Text; + +namespace TVServerXBMC.Commands +{ + class TimeshiftChannel : CommandHandler + { + public TimeshiftChannel(ConnectionHandler connection) + : base(connection) + { + + } + + /* + * Expect arguments: ChannelID + */ + public override void handleCommand(string command, string[] arguments) + { + if (arguments.Length < 1) + { + getConnection().WriteLine(getCommandToHandle() + " expects arguments ChannelId"); + return; + } + + int chanId = int.Parse(arguments[0]); + + String result = TVServerConnection.playChannel(chanId); + getConnection().WriteLine(result); + + } + + public override string getCommandToHandle() + { + return "TimeshiftChannel"; + } + } +} Added: trunk/plugins/ConnectionHandler.cs =================================================================== --- trunk/plugins/ConnectionHandler.cs (rev 0) +++ trunk/plugins/ConnectionHandler.cs 2008-03-17 14:14:49 UTC (rev 1479) @@ -0,0 +1,157 @@ +using System; +using System.Collections.Generic; +using System.Text; +using System.Net.Sockets; +using System.Threading; +using System.Net; +using System.IO; + +using TVServerXBMC.Commands; + +namespace TVServerXBMC +{ + class ConnectionHandler + { + private TcpClient client; + private Dictionary<String, CommandHandler> allHandlers; + + public ConnectionHandler(TcpClient client) + { + this.client = client; + addHandlers(); + } + + private void addHandlers() + { + List<CommandHandler> handlers = new List<CommandHandler>(); + allHandlers = new Dictionary<String,CommandHandler>(); + + handlers.Add(new ListChannels(this)); + handlers.Add(new ListGroups(this)); + handlers.Add(new CloseConnection(this)); + handlers.Add(new TimeshiftChannel(this)); + handlers.Add(new StopTimeshift(this)); + + foreach(CommandHandler h in handlers) + { + allHandlers.Add(h.getCommandToHandle().ToLower(), h); + } + + } + + + + public void writeList(List<string> list) + { + // escape every value + List<string> escaped = list.ConvertAll<string>(new Converter<string, string>(Uri.EscapeDataString)); + + // send it as one line + WriteLine(String.Join(",",escaped.ToArray())); + + Console.WriteLine(String.Join(",", escaped.ToArray())); + } + + public void HandleConnection() + { + NetworkStream cStream = this.client.GetStream(); + StreamReader reader = new StreamReader(cStream); + + // first we get what version of the protocol + // we expect "TVServerXBMC0-1" + String versionInfo = reader.ReadLine(); + if (versionInfo == null) return; + + if (versionInfo.Contains("TVServerXBMC:0-1")) + { + WriteLine("Protocol-Accept:1"); + Console.WriteLine("Correct protocol, connection accepted!"); + } + else + { + WriteLine("Unexpected Protocol"); + client.Close(); + Console.WriteLine("Unexpected protocol"); + return; + } + + ProcessConnection(reader); + + } + + public void WriteLine(String line) + { + StreamWriter writer = new StreamWriter(this.client.GetStream ()); + writer.WriteLine(line); + writer.Flush(); + } + + public void Disconnect() + { + client.Close(); + } + + + private void handleCommand(String command, String[] arguments) + { + String handleCommand = command.ToLower(); + if (allHandlers.ContainsKey(handleCommand)) + { + allHandlers[handleCommand].handleCommand(command, arguments); + } + else + { + WriteLine("UnknownCommand:" + command); + Console.WriteLine("Unknown command : " + command); + } + + + } + + private void ProcessConnection(StreamReader reader) + { + try + { + while (client.Connected) + { + String line = reader.ReadLine(); + + // every command is Command:Argument,Argument,Argument + // where the arguments are uri encoded. Commands are not encoded + String[] parts = line.Split(new Char[] { ':' }, 2); + + if (parts.Length < 2) + { + Console.WriteLine("Command format incorrect"); + WriteLine("Command format incorrect"); + return; + } + + + + String command = parts[0]; + String[] arguments = parts[1].Split(new Char[] { ',' }); + + for (int i = 0; i < arguments.Length; i++) + { + arguments[i] = System.Uri.UnescapeDataString(arguments[i]); + } + + Console.WriteLine("Handling command; " + command); + handleCommand(command, arguments); + } + + + } + catch (Exception e) + { + Console.WriteLine("Excpetion while processing connection : " + e.ToString()); + } + Console.WriteLine("Connection closed"); + } + + + + + } +} Added: trunk/plugins/Listener.cs =================================================================== --- trunk/plugins/Listener.cs (rev 0) +++ trunk/plugins/Listener.cs 2008-03-17 14:14:49 UTC (rev 1479) @@ -0,0 +1,52 @@ +using System; +using System.Collections.Generic; +using System.Text; +using System.Net.Sockets; +using System.Threading; +using System.Net; + +namespace TVServerXBMC +{ + class Listener + { + private TcpListener tcpListener; + + public Listener(){ + this.tcpListener = new TcpListener(IPAddress.Any, PORT); + } + + public const int PORT = 9596; + + public void StartListening() + { + tcpListener.Start(); + + ListenForClients(); + // start a thread to listen for clients + // (new Thread(new ThreadStart(ListenForClients)).Start (); + } + + private void ListenForClients() + { + Console.WriteLine("Waiting for clients..."); + + while (true) + { + // blocks until a client has connected to the server + TcpClient client = this.tcpListener.AcceptTcpClient(); + + Console.WriteLine("New Connection! Not listening for any new connections"); + tcpListener.Stop(); + + ConnectionHandler handler = new ConnectionHandler(client); + handler.HandleConnection(); + + tcpListener.Start(); + Console.WriteLine("Connection complete, listening for new connection.."); + } + } + + + + } +} Added: trunk/plugins/Plugin.cs =================================================================== --- trunk/plugins/Plugin.cs (rev 0) +++ trunk/plugins/Plugin.cs 2008-03-17 14:14:49 UTC (rev 1479) @@ -0,0 +1,60 @@ +using System; +using System.Collections.Generic; +using System.Text; +using TvEngine; +using System.Threading; + + +namespace TVServerXBMC +{ + public class XmlTvImporter : ITvServerPlugin + { + Thread listenThread; + + public string Author + { + get { return "Prashant V"; } + } + + public bool MasterOnly + { + get { return true; } + } + + public string Name + { + get { return "XBMC Server"; } + } + + public SetupTv.SectionSettings Setup + { + get { return null; } + } + + public void Start(TvControl.IController controller) + { + // set up our remote control interface + TVServerConnection.Init(controller); + + // start a thread for the listener + Listener l = new Listener(); + listenThread = new Thread(new ThreadStart(l.StartListening)); + listenThread.Start(); + } + + public void Stop() + { + if (listenThread != null) + { + listenThread.Abort(); + listenThread = null; + } + } + + public string Version + { + get { return "0.2.0.0"; } + } + } + +} Added: trunk/plugins/Properties/AssemblyInfo.cs =================================================================== --- trunk/plugins/Properties/AssemblyInfo.cs (rev 0) +++ trunk/plugins/Properties/AssemblyInfo.cs 2008-03-17 14:14:49 UTC (rev 1479) @@ -0,0 +1,33 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("TVServerXBMC")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("Home")] +[assembly: AssemblyProduct("TVServerXBMC")] +[assembly: AssemblyCopyright("Copyright © Home 2008")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(false)] + +// The following GUID is for the ID of the typelib if this project is exposed to COM +[assembly: Guid("bcee752c-84da-4543-bbd7-c1ccfd8bb46d")] + +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] Added: trunk/plugins/TV/ServerInterface.cs =================================================================== --- trunk/plugins/TV/ServerInterface.cs (rev 0) +++ trunk/plugins/TV/ServerInterface.cs 2008-03-17 14:14:49 UTC (rev 1479) @@ -0,0 +1,411 @@ +using System; +using System.Collections; +using System.Collections.Generic; +using System.Text; +using System.Globalization; +using TvControl; +using TvDatabase; +using TvLibrary.Interfaces; +using Gentle.Common; +using Gentle.Framework; + +namespace MPTvClient +{ + public class TVServerController + { + IList groups; + IList channels; + IList mappings; + IList cards; + IController controller; + User me; + bool _isTimeShifting = false; + public Exception lastException = null; + + #region Connection functions + + public TVServerController(IController controller) + { + this.controller = controller; + } + + public bool Setup() + { + try + { + string connStr; + string provider; + controller.GetDatabaseConnectionString(out connStr, out provider); + Gentle.Framework.ProviderFactory.SetDefaultProviderConnectionString(connStr); + me = new User(); + me.IsAdmin = true; + groups = ChannelGroup.ListAll(); + channels = Channel.ListAll(); + mappings = GroupMap.ListAll(); + cards = Card.ListAll(); + } + catch (Exception ex) + { + lastException = ex; + return false; + } + return true; + } + public void ResetConnection() + { + _isTimeShifting = false; + } + #endregion + + #region Controll functions + public TvResult StartTimeShifting(int idChannel, ref string rtspURL) + { + if (_isTimeShifting) + StopTimeShifting(); + VirtualCard vcard; + TvResult result; + me = new User(); + try + { + result = controller.StartTimeShifting(ref me, idChannel, out vcard); + } + catch (Exception ex) + { + lastException = ex; + return TvResult.UnknownError; + } + if (result == TvResult.Succeeded) + { + _isTimeShifting = true; + rtspURL = vcard.RTSPUrl; + } + return result; + } + public bool StopTimeShifting() + { + if (!_isTimeShifting) + return true; + bool result; + try + { + result = controller.StopTimeShifting(ref me); + } + catch (Exception ex) + { + lastException = ex; + return false; + } + _isTimeShifting = false; + return result; + } + public string GetRecordingURL(int idRecording) + { + TvServer server = new TvServer(); + string url = server.GetStreamUrlForFileName(idRecording); + return url; + } + public void DeleteRecording(int idRecording) + { + controller.DeleteRecording(idRecording); + } + public void DeleteSchedule(int idSchedule) + { + Schedule sched = Schedule.Retrieve(idSchedule); + sched.Remove(); + + } + #endregion + + #region Info functions + public ReceptionDetails GetReceptionDetails() + { + VirtualCard vcard; + try + { + vcard = new VirtualCard(me, RemoteControl.HostName); + } + catch (Exception ex) + { + lastException = ex; + return null; + } + ReceptionDetails details = new ReceptionDetails(); + details.signalLevel = vcard.SignalLevel; + details.signalQuality = vcard.SignalQuality; + return details; + } + public List<StreamingStatus> GetStreamingStatus() + { + List<StreamingStatus> states = new List<StreamingStatus>(); + VirtualCard vcard; + try + { + foreach (Card card in cards) + { + User user = new User(); + user.CardId = card.IdCard; + User[] usersForCard = controller.GetUsersForCard(card.IdCard); + if (usersForCard == null) + { + StreamingStatus state = new StreamingStatus(); + vcard = new VirtualCard(user, RemoteControl.HostName); + string tmp = "idle"; + if (vcard.IsScanning) tmp = "Scanning"; + if (vcard.IsGrabbingEpg) tmp = "Grabbing EPG"; + state.cardId = card.IdCard; + state.cardName = vcard.Name; + state.cardType = vcard.Type.ToString(); + state.status = tmp; + state.channelName = ""; + state.userName = ""; + states.Add(state); + continue; + } + if (usersForCard.Length == 0) + { + StreamingStatus state = new StreamingStatus(); + vcard = new VirtualCard(user, RemoteControl.HostName); + string tmp = "idle"; + if (vcard.IsScanning) tmp = "Scanning"; + if (vcard.IsGrabbingEpg) tmp = "Grabbing EPG"; + state.cardId = card.IdCard; + state.cardName = vcard.Name; + state.cardType = vcard.Type.ToString(); + state.status = tmp; + state.channelName = ""; + state.userName = ""; + states.Add(state); + continue; + } + for (int i = 0; i < usersForCard.Length; ++i) + { + StreamingStatus state = new StreamingStatus(); + string tmp = "idle"; + vcard = new VirtualCard(usersForCard[i], RemoteControl.HostName); + if (vcard.IsTimeShifting) + tmp = "Timeshifting"; + else + if (vcard.IsRecording) + tmp = "Recording"; + else + if (vcard.IsScanning) + tmp = "Scanning"; + else + if (vcard.IsGrabbingEpg) + tmp = "Grabbing EPG"; + state.cardId = card.IdCard; + state.cardName = vcard.Name; + state.cardType = vcard.Type.ToString(); + state.status = tmp; + state.channelName = vcard.ChannelName; + state.userName = vcard.User.Name; + states.Add(state); + } + } + } + catch (Exception ex) + { + lastException = ex; + return null; + } + return states; + } + public List<string> GetGroupNames() + { + if (!RemoteControl.IsConnected) + return null; + List<string> lGroups = new List<string>(); + try + { + foreach (ChannelGroup group in groups) + lGroups.Add(group.GroupName); + } + catch (Exception ex) + { + lastException = ex; + return null; + } + return lGroups; + } + public List<ChannelInfo> GetChannelInfosForGroup(string groupName) + { + List<ChannelInfo> refChannelInfos = new List<ChannelInfo>(); + try + { + foreach (ChannelGroup group in groups) + { + if (group.GroupName == groupName) + { + IList maps = group.ReferringGroupMap(); + TvDatabase.Program epg; + foreach (GroupMap map in maps) + { + ChannelInfo channelInfo = new ChannelInfo(); + channelInfo.channelID = map.ReferencedChannel().IdChannel.ToString(); + channelInfo.name = map.ReferencedChannel().DisplayName; + epg = map.ReferencedChannel().CurrentProgram; + channelInfo.epgNow = new ProgrammInfo(); + if (epg != null) + { + channelInfo.epgNow.timeInfo = epg.StartTime.ToShortTimeString() + "-" + epg.EndTime.ToShortTimeString(); + channelInfo.epgNow.description = epg.Title; + } + epg = map.ReferencedChannel().NextProgram; + channelInfo.epgNext = new ProgrammInfo(); + if (epg != null) + { + channelInfo.epgNext.timeInfo = epg.StartTime.ToShortTimeString() + "-" + epg.EndTime.ToShortTimeString(); + channelInfo.epgNext.description = epg.Title; + } + refChannelInfos.Add(channelInfo); + } + break; + } + } + } + catch (Exception ex) + { + lastException = ex; + return null; + } + return refChannelInfos; + } + public List<ChannelInfo> GetRadioChannels() + { + List<ChannelInfo> radioChannels = new List<ChannelInfo>(); + try + { + TvDatabase.Program epg; + foreach (Channel chan in channels) + { + if (!chan.IsRadio) + continue; + ChannelInfo channelInfo = new ChannelInfo(); + channelInfo.channelID = chan.IdChannel.ToString(); + channelInfo.name = chan.DisplayName; + channelInfo.isWebStream = chan.IsWebstream(); + epg = chan.CurrentProgram; + channelInfo.epgNow = new ProgrammInfo(); + if (epg != null) + { + channelInfo.epgNow.timeInfo = epg.StartTime.ToShortTimeString() + "-" + epg.EndTime.ToShortTimeString(); + channelInfo.epgNow.description = epg.Title; + } + epg = chan.NextProgram; + channelInfo.epgNext = new ProgrammInfo(); + if (epg != null) + { + channelInfo.epgNext.timeInfo = epg.StartTime.ToShortTimeString() + "-" + epg.EndTime.ToShortTimeString(); + channelInfo.epgNext.description = epg.Title; + } + radioChannels.Add(channelInfo); + } + } + catch (Exception ex) + { + lastException = ex; + return null; + } + return radioChannels; + } + public string GetWebStreamURL(int idChannel) + { + string url = ""; + Channel chan = Channel.Retrieve(idChannel); + IList details = chan.ReferringTuningDetail(); + foreach (TuningDetail detail in details) + { + if (detail.ChannelType == 5) + { + url = detail.Url; + break; + } + } + return url; + } + public List<RecordingInfo> GetRecordings() + { + List<RecordingInfo> recInfos = new List<RecordingInfo>(); + try + { + IList recordings = Recording.ListAll(); + foreach (Recording rec in recordings) + { + RecordingInfo recInfo = new RecordingInfo(); + recInfo.recordingID = rec.IdRecording.ToString(); + recInfo.title = rec.Title; + recInfo.description = rec.Description; + recInfo.genre = rec.Genre; + recInfo.timeInfo = rec.StartTime.ToString() + "-" + rec.EndTime.ToString(); + recInfos.Add(recInfo); + } + } + catch (Exception ex) + { + lastException = ex; + return null; + } + return recInfos; + } + public List<ScheduleInfo> GetSchedules() + { + List<ScheduleInfo> schedInfos = new List<ScheduleInfo>(); + try + { + IList schedules = Schedule.ListAll(); + foreach (Schedule schedule in schedules) + { + ScheduleInfo sched = new ScheduleInfo(); + sched.scheduleID = schedule.IdSchedule.ToString(); + sched.startTime = schedule.StartTime; + sched.endTime = schedule.EndTime; + sched.channelName = schedule.ReferencedChannel().Name; + sched.description = schedule.ProgramName; + ScheduleRecordingType stype = (ScheduleRecordingType)schedule.ScheduleType; + sched.type = stype.ToString(); + + schedInfos.Add(sched); + } + } + catch (Exception ex) + { + lastException = ex; + return null; + } + return schedInfos; + } + private string GetDateTimeString() + { + string provider = Gentle.Framework.ProviderFactory.GetDefaultProvider().Name.ToLower(); + if (provider == "mysql") return "yyyy-MM-dd HH:mm:ss"; + return "yyyyMMdd HH:mm:ss"; + } + public List<EPGInfo> GetEPGForChannel(string idChannel) + { + IFormatProvider mmddFormat = new CultureInfo(String.Empty, false); + List<EPGInfo> infos = new List<EPGInfo>(); + SqlBuilder sb = new SqlBuilder(Gentle.Framework.StatementType.Select, typeof(Program)); + sb.AddConstraint(Operator.Equals, "idChannel", Int32.Parse(idChannel)); + DateTime thisMorning = new DateTime(DateTime.Now.Year, DateTime.Now.Month, DateTime.Now.Day); + sb.AddConstraint(String.Format("startTime>='{0}'", thisMorning.ToString(GetDateTimeString(), mmddFormat))); + sb.AddOrderByField(true, "startTime"); + SqlStatement stmt = sb.GetStatement(true); + IList programs = ObjectFactory.GetCollection(typeof(Program), stmt.Execute()); + if (programs != null && programs.Count > 0) + { + foreach (Program prog in programs) + { + EPGInfo epg = new EPGInfo(); + epg.startTime = prog.StartTime; + epg.endTime = prog.EndTime; + epg.title = prog.Title; + epg.description = prog.Description; + infos.Add(epg); + } + } + return infos; + } + + #endregion + } +} Added: trunk/plugins/TV/Utils.cs =================================================================== --- trunk/plugins/TV/Utils.cs (rev 0) +++ trunk/plugins/TV/Utils.cs 2008-03-17 14:14:49 UTC (rev 1479) @@ -0,0 +1,59 @@ +using System; +using System.Collections.Generic; +using System.Text; +using Microsoft.Win32; + +namespace MPTvClient +{ + public class ReceptionDetails + { + public int signalLevel; + public int signalQuality; + } + public class StreamingStatus + { + public int cardId; + public string cardName; + public string cardType; + public string status; + public string channelName; + public string userName; + } + public class ProgrammInfo + { + public string timeInfo; + public string description; + } + public class EPGInfo + { + public DateTime startTime; + public DateTime endTime; + public string title; + public string description; + } + public class ChannelInfo + { + public string channelID; + public string name; + public bool isWebStream; + public ProgrammInfo epgNow; + public ProgrammInfo epgNext; + } + public class RecordingInfo + { + public string recordingID; + public string title; + public string genre; + public string description; + public string timeInfo; + } + public class ScheduleInfo + { + public string scheduleID; + public DateTime startTime; + public DateTime endTime; + public string channelName; + public string description; + public string type; + } +} Added: trunk/plugins/TV/frmMain.cs =================================================================== --- trunk/plugins/TV/frmMain.cs (rev 0) +++ trunk/plugins/TV/frmMain.cs 2008-03-17 14:14:49 UTC (rev 1479) @@ -0,0 +1,356 @@ +using System; +using System.Collections; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.Text; +using System.Windows.Forms; +using TvControl; +using TvDatabase; + +namespace MPTvClient +{ + + public partial class frmMain : Form + { + + ServerInterface serverIntf; + ExternalPlayer extPlayer; + + // processed + private void SetDisconected() + { + tmrRefresh.Enabled = false; + extPlayer.Stop(); + serverIntf.ResetConnection(); + StBarLabel.Text = "Not connected."; + StBar.Update(); + MessageBox.Show(serverIntf.lastException.ToString(), "Exception raised", MessageBoxButtons.OK, MessageBoxIcon.Error); + btnConnect.Visible = true; + } + + private void UpdateTVChannels() + { + if (cbGroups.SelectedIndex == -1) + return; + StBarLabel.Text = "Loading referenced channels..."; + StBar.Update(); + List<ChannelInfo> refChannelInfos = serverIntf.GetChannelInfosForGroup(cbGroups.SelectedItem.ToString()); + if (refChannelInfos == null) + SetDisconected(); + gridTVChannels.Rows.Clear(); + foreach (ChannelInfo chanInfo in refChannelInfos) + gridTVChannels.Rows.Add(chanInfo.channelID, chanInfo.name, chanInfo.epgNow.timeInfo + "\n" + chanInfo.epgNext.timeInfo, chanInfo.epgNow.description + "\n" + chanInfo.epgNext.description); + gridTVChannels.AutoResizeColumns(); + StBarLabel.Text = ""; + } + private void UpdateRadioChannels() + { + StBarLabel.Text = "Loading radio channels..."; + StBar.Update(); + List<ChannelInfo> channelInfos = serverIntf.GetRadioChannels(); + if (channelInfos == null) + SetDisconected(); + gridRadioChannels.Rows.Clear(); + foreach (ChannelInfo chanInfo in channelInfos) + { + string type = "DVB"; + if (chanInfo.isWebStream) + type = "WebStream"; + gridRadioChannels.Rows.Add(chanInfo.channelID, chanInfo.name, type, chanInfo.epgNow.timeInfo + "\n" + chanInfo.epgNext.timeInfo, chanInfo.epgNow.description + "\n" + chanInfo.epgNext.description); + } + gridRadioChannels.AutoResizeColumns(); + StBarLabel.Text = ""; + } + private void UpdateRecordings() + { + StBarLabel.Text = "Loading recordings..."; + StBar.Update(); + List<RecordingInfo> recInfos = serverIntf.GetRecordings(); + if (recInfos == null) + SetDisconected(); + gridRecordings.Rows.Clear(); + foreach (RecordingInfo rec in recInfos) + gridRecordings.Rows.Add(rec.recordingID, rec.timeInfo, rec.genre, rec.title, rec.description); + gridRecordings.AutoResizeColumns(); + StBarLabel.Text = ""; + } + private void UpdateSchedules() + { + StBarLabel.Text = "Loading schedules..."; + StBar.Update(); + List<ScheduleInfo> schedInfos = serverIntf.GetSchedules(); + if (schedInfos == null) + SetDisconected(); + gridSchedules.Rows.Clear(); + foreach (ScheduleInfo sched in schedInfos) + gridSchedules.Rows.Add(sched.scheduleID, sched.startTime.ToString(), sched.endTime.ToString(), sched.description, sched.channelName, sched.type); + gridSchedules.AutoResizeColumns(); + StBarLabel.Text = ""; + } + private void cbGroups_SelectedIndexChanged(object sender, EventArgs e) + { + UpdateTVChannels(); + } + private void timer1_Tick(object sender, EventArgs e) + { + if (!extPlayer.IsRunning()) + serverIntf.StopTimeShifting(); + ReceptionDetails recDetails = serverIntf.GetReceptionDetails(); + if (recDetails == null) + { + SetDisconected(); + return; + } + prLevel.Value = recDetails.signalLevel; + prQuality.Value = recDetails.signalQuality; + List<StreamingStatus> statusList = serverIntf.GetStreamingStatus(); + if (statusList == null) + { + SetDisconected(); + return; + } + lvStatus.Items.Clear(); + foreach (StreamingStatus sstate in statusList) + { + ListViewItem item = lvStatus.Items.Add(sstate.cardId.ToString()); + item.SubItems.Add(sstate.cardName); + item.SubItems.Add(sstate.cardType); + item.SubItems.Add(sstate.status); + item.SubItems.Add(sstate.channelName); + item.SubItems.Add(sstate.userName); + } + lvStatus.AutoResizeColumns(ColumnHeaderAutoResizeStyle.HeaderSize); + } + + private void gridChannels_CellDoubleClick(object sender, DataGridViewCellEventArgs e) + { + StBarLabel.Text = "Trying to start timeshifting..."; + StBar.Update(); + serverIntf.StopTimeShifting(); + extPlayer.Stop(); + string rtspURL = ""; + TvResult result = serverIntf.StartTimeShifting(int.Parse(gridTVChannels.SelectedRows[0].Cells[0].Value.ToString()), ref rtspURL); + StBarLabel.Text = ""; + StBar.Update(); + if (result != TvResult.Succeeded) + MessageBox.Show("Could not start timeshifting\nReason: " + result.ToString()); + else + { + string args = string.Format(ClientSettings.playerArgs, rtspURL); + if (!extPlayer.Start(ClientSettings.playerPath, args)) + MessageBox.Show("Failed to start external player.", "ERROR", MessageBoxButtons.OK, MessageBoxIcon.Error); + } + } + + private void frmMain_FormClosing(object sender, FormClosingEventArgs e) + { + if (extPlayer.IsRunning()) + extPlayer.Stop(); + serverIntf.StopTimeShifting(); + serverIntf.ResetConnection(); + ClientSettings.frmLeft = this.Left; + ClientSettings.frmTop = this.Top; + ClientSettings.frmWidth = this.Width; + ClientSettings.frmHeight = this.Height; + ClientSettings.Save(); + } + + + private void menuStrip1_ItemClicked(object sender, ToolStripItemClickedEventArgs e) + { + + } + + private void refreshToolStripMenuItem_Click(object sender, EventArgs e) + { + switch (tabCtrl.SelectedIndex) + { + case 0: + UpdateTVChannels(); + break; + case 1: + UpdateRadioChannels(); + break; + case 2: + UpdateRecordings(); + break; + case 3: + UpdateSchedules(); + break; + } + } + + private void gridTVChannels_CellDoubleClick(object sender, DataGridViewCellEventArgs e) + { + StBarLabel.Text = "Trying to start timeshifting..."; + StBar.Update(); + serverIntf.StopTimeShifting(); + extPlayer.Stop(); + string rtspURL = ""; + TvResult result = serverIntf.StartTimeShifting(int.Parse(gridTVChannels.SelectedRows[0].Cells[0].Value.ToString()), ref rtspURL); + StBarLabel.Text = ""; + StBar.Update(); + if (result != TvResult.Succeeded) + MessageBox.Show("Could not start timeshifting\nReason: " + result.ToString()); + else + { + if (ClientSettings.useOverride) + rtspURL = ClientSettings.overrideURL; + string args = string.Format(ClientSettings.playerArgs, rtspURL); + if (!extPlayer.Start(ClientSettings.playerPath, args)) + MessageBox.Show("Failed to start external player.", "ERROR", MessageBoxButtons.OK, MessageBoxIcon.Error); + } + } + + private void gridRadioChannels_CellDoubleClick(object sender, DataGridViewCellEventArgs e) + { + serverIntf.StopTimeShifting(); + extPlayer.Stop(); + string rtspURL = ""; + if (gridRadioChannels.SelectedRows[0].Cells[2].Value.ToString() == "DVB") + { + StBarLabel.Text = "Trying to start timeshifting..."; + StBar.Update(); + TvResult result = serverIntf.StartTimeShifting(int.Parse(gridRadioChannels.SelectedRows[0].Cells[0].Value.ToString()), ref rtspURL); + StBarLabel.Text = ""; + StBar.Update(); + if (result != TvResult.Succeeded) + MessageBox.Show("Could not start timeshifting\nReason: " + result.ToString()); + } + else + rtspURL = serverIntf.GetWebStreamURL(int.Parse(gridRadioChannels.SelectedRows[0].Cells[0].Value.ToString())); + if (ClientSettings.useOverride) + rtspURL = ClientSettings.overrideURL; + string args = string.Format(ClientSettings.playerArgs, rtspURL); + if (!extPlayer.Start(ClientSettings.playerPath, args)) + MessageBox.Show("Failed to start external player.", "ERROR", MessageBoxButtons.OK, MessageBoxIcon.Error); + } + + private void gridRecordings_CellDoubleClick(object sender, DataGridViewCellEventArgs e) + { + StBarLabel.Text = "Trying to replay recording..."; + StBar.Update(); + serverIntf.StopTimeShifting(); + extPlayer.Stop(); + string rtspURL = serverIntf.GetRecordingURL(int.Parse(gridRecordings.SelectedRows[0].Cells[0].Value.ToString())); + StBarLabel.Text = ""; + StBar.Update(); + if (rtspURL == "") + MessageBox.Show("Could not start recording"); + else + { + string args = string.Format(ClientSettings.playerArgs, rtspURL); + if (!extPlayer.Start(ClientSettings.playerPath, args)) + MessageBox.Show("Failed to start external player.", "ERROR", MessageBoxButtons.OK, MessageBoxIcon.Error); + } + } + + private void contextMenuStrip1_Opening(object sender, CancelEventArgs e) + { + miTimeShift.Visible = false; + miReplay.Visible = false; + miDelete.Visible = false; + switch (tabCtrl.SelectedIndex) + { + case 0: + miTimeShift.Visible = true; + break; + case 1: + miTimeShift.Visible = true; + break; + case 2: + miReplay.Visible = true; + miDelete.Visible = true; + break; + case 3: + miDelete.Visible = true; + break; + } + } + + private void miRefresh_Click(object sender, EventArgs e) + { + refreshToolStripMenuItem_Click(sender, e); + } + + private void miTimeShift_Click(object sender, EventArgs e) + { + if (tabCtrl.SelectedIndex == 0) + gridTVChannels_CellDoubleClick(sender, null); + if (tabCtrl.SelectedIndex == 1) + gridRadioChannels_CellDoubleClick(sender, null); + } + + private void miReplay_Click(object sender, EventArgs e) + { + gridRecordings_CellDoubleClick(sender, null); + } + + private void miDelete_Click(object sender, EventArgs e) + { + if (tabCtrl.SelectedIndex == 2) + { + string idRecording = gridRecordings.SelectedRows[0].Cells[0].Value.ToString(); + if (idRecording == "") + return; + serverIntf.DeleteRecording(int.Parse(idRecording)); + UpdateRecordings(); + } + if (tabCtrl.SelectedIndex == 3) + { + string idSchedule = gridSchedules.SelectedRows[0].Cells[0].Value.ToString(); + if (idSchedule == "") + return; + serverIntf.DeleteSchedule(int.Parse(idSchedule)); + UpdateSchedules(); + } + } + + private void btnShowEPG_Click(object sender, EventArgs e) + { + List<ChannelInfo> infos = new List<ChannelInfo>(); + foreach (DataGridViewRow row in gridTVChannels.Rows) + { + ChannelInfo info = new ChannelInfo(); + info.channelID = row.Cells[0].Value.ToString(); + info.name = row.Cells[1].Value.ToString(); + infos.Add(info); + } + } + + private void frmMain_Shown(object sender, EventArgs e) + { + if (ClientSettings.frmLeft != 0 && ClientSettings.frmTop != 0) + { + this.Left = ClientSettings.frmLeft; + this.Top = ClientSettings.frmTop; + this.Width = ClientSettings.frmWidth; + this.Height = ClientSettings.frmHeight; + } + } + private bool Test() + { + bool yes = false; + try + { + yes = true; + return yes; + } + catch (Exception ex) + { + MessageBox.Show("Exception"); + } + finally + { + MessageBox.Show("finally"); + } + return false; + } + private void button1_Click(object sender, EventArgs e) + { + MessageBox.Show("Returned: " + Test().ToString()); + } + } +} \ No newline at end of file Added: trunk/plugins/TV/frmMain.designer.cs =================================================================== --- trunk/plugins/TV/frmMain.designer.cs (rev 0) +++ trunk/plugins/TV/frmMain.designer.cs 2008-03-17 14:14:49 UTC (rev 1479) @@ -0,0 +1,837 @@ +namespace MPTvClient +{ + partial class frmMain + { + /// <summary> + /// Required designer variable. + /// </summary> + private System.ComponentModel.IContainer components = null; + + /// <summary> + /// Clean up any resources being used. + /// </summary> + /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param> + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// <summary> + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// </summary> + private void InitializeComponent() + { + this.components = new System.ComponentModel.Container(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle2 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle4 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle3 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle6 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle5 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle8 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle7 = new System.Windows.Forms.DataGridViewCellStyle(); + this.btnConnect = new System.Windows.Forms.Button(); + this.StBar = new System.Windows.Forms.StatusStrip(); + this.StBarLabel = new System.Windows.Forms.ToolStripStatusLabel(); + this.panel1 = new System.Windows.Forms.Panel(); + this.prQuality = new System.Windows.Forms.ProgressBar(); + this.label3 = new System.Windows.Forms.Label(); + this.prLevel = new System.Windows.Forms.ProgressBar(); + this.label2 = new System.Windows.Forms.Label(); + this.menuStrip1 = new System.Windows.Forms.MenuStrip(); + this.toolStripMenuItem1 = new System.Windows.Forms.ToolStripMenuItem(); + this.serverConnectionToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.externalPlayerToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.viewToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.refreshToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.tmrRefresh = new System.Windows.Forms.Timer(this.components); + this.splitContainer1 = new System.Windows.Forms.SplitContainer(); + this.tabCtrl = new System.Windows.Forms.TabControl(); + this.contextMenuStrip1 = new System.Windows.Forms.ContextMenuStrip(this.components); + this.miTimeShift = new System.Windows.Forms.ToolStripMenuItem(); + this.miReplay = new System.Windows.Forms.ToolStripMenuItem(); + this.miDelete = new System.Windows.Forms.ToolStripMenuItem(); + this.toolStripMenuItem2 = new System.Windows.Forms.ToolStripSeparator(); + this.miRefresh = new System.Windows.Forms.ToolStripMenuItem(); + this.tpTV = new System.Windows.Forms.TabPage(); + this.splitContainer2 = new System.Windows.Forms.SplitContainer(); + this.btnShowEPG = new System.Windows.Forms.Button(); + this.cbGroups = new System.Windows.Forms.ComboBox(); + this.label1 = new System.Windows.Forms.Label(); + this.gridTVChannels = new System.Windows.Forms.DataGridView(); + this.Column4 = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.Column1 = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.Column2 = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.Column3 = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.tpRadio = new System.Windows.Forms.TabPage(); + this.gridRadioChannels = new System.Windows.Forms.DataGridView(); + this.dataGridViewTextBoxColumn1 = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.dataGridViewTextBoxColumn2 = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.Type = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.dataGridViewTextBoxColumn3 = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.dataGridViewTextBoxColumn4 = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.tpRecordings = new System.Windows.Forms.TabPage(); + this.gridRecordings = new System.Windows.Forms.DataGridView(); + this.dataGridViewTextBoxColumn5 = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.dataGridViewTextBoxColumn7 = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.colGenre = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.dataGridViewTextBoxColumn6 = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.dataGridViewTextBoxColumn8 = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.tpSchedules = new System.Windows.Forms.TabPage(); + this.gridSchedules = new System.Windows.Forms.DataGridView(); + this.dataGridViewTextBoxColumn9 = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.dataGridViewTextBoxColumn10 = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.dataGridViewTextBoxColumn11 = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.dataGridViewTextBoxColumn12 = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.dataGridViewTextBoxColumn13 = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.Column5 = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.lvStatus = new System.Windows.Forms.ListView(); + this.colCardId = new System.Windows.Forms.ColumnHeader(); + this.colCardName = new System.Windows.Forms.ColumnHeader(); + this.colCardType = new System.Windows.Forms.ColumnHeader(); + this.colStatus = new System.Windows.Forms.ColumnHeader(); + this.colChannel = new System.Windows.Forms.ColumnHeader(); + this.colUser = new System.Windows.Forms.ColumnHeader(); + this.button1 = new System.Windows.Forms.Button(); + this.StBar.SuspendLayout(); + this.panel1.SuspendLayout(); + this.menuStrip1.SuspendLayout(); + this.splitContainer1.Panel1.SuspendLayout(); + this.splitContainer1.Panel2.SuspendLayout(); + this.splitContainer1.SuspendLayout(); + this.tabCtrl.SuspendLayout(); + this.contextMenuStrip1.SuspendLayout(); + this.tpTV.SuspendLayout(); + this.splitContainer2.Panel1.SuspendLayout(); + this.splitContainer2.Panel2.SuspendLayout(); + this.splitContainer2.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.gridTVChannels)).BeginInit(); + this.tpRadio.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.gridRadioChannels)).BeginInit(); + this.tpRecordings.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.gridRecordings)).BeginInit(); + this.tpSchedules.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.gridSchedules)).BeginInit(); + this.SuspendLayout(); + // StBar + // + this.StBar.Items.AddRange(new System.Windows.Forms.ToolS... [truncated message content] |