コード例 #1
0
 // create our objects and connect!
 public static bool Init(IController controller)
 {
     timeshiftUrl     = null;
     timeshiftChannel = new Dictionary <String, int>();
     serverIntf       = new TVServerController(controller);
     return(serverIntf.Setup());
 }
コード例 #2
0
        public override void handleCommand(string command, string[] arguments, ref TvControl.User me)
        {
            int           cardID  = -1;
            List <string> results = new List <string>();

            try
            {
                if (arguments != null)
                {
                    cardID = Int32.Parse(arguments[0]);
                }
                else
                {
                    cardID = me.CardId;
                }

                TVServerController server = TVServerConnection.GetServerInterface();
                int level   = server.GetSignalLevel(cardID);
                int quality = server.GetSignalQuality(cardID);

                writer.write(level.ToString() + "|" + quality.ToString());
            }
            catch
            {
                Console.WriteLine(getCommandToHandle() + ": failed");
                writer.write("");
            }
            //getConnection().WriteLine("[ERROR]: Expected format: " + getCommandToHandle() + "[:cardID]");
        }
コード例 #3
0
ファイル: GetCardSettings.cs プロジェクト: whsag/TVServerXBMC
        public override void handleCommand(string command, string[] arguments, ref TvControl.User me)
        {
            int           cardID  = -1;
            List <string> results = new List <string>();

            try
            {
                if (arguments != null)
                {
                    cardID = Int32.Parse(arguments[0]);
                }

                TVServerController server = TVServerConnection.GetServerInterface();
                results = server.GetCardSettings(cardID);

                writer.writeList(results);
            }
            catch
            {
                Console.WriteLine(getCommandToHandle() + ": failed");
                writer.write("");
            }
            //getConnection().WriteLine("[ERROR]: Expected format: " + getCommandToHandle() + "[:cardID]");
        }