I'm just not getting any results part from card/device name/ids, no card status's

Discussion in 'TV-Server Plugins' started by RossMcivor, September 2, 2018.

Tags:
  1. RossMcivor

    RossMcivor New Member

    Joined:
    June 22, 2018
    Messages:
    2
    Likes Received:
    0
    Gender:
    Male
    Occupation:
    Ful time carrer
    Location:
    Wales, UK
    Ratings:
    +0 / 0
    Home Country:
    United Kingdom United Kingdom
    Show System Specs
    Hi, I'm moving from delphiprogramming to develp a application in visual studio c#, and i got this



    just a button and a textbox..


    I'm getting the device name, but no recording staus, while its recording, ive tryed over properies but it returns nothing, can someone help me get over my first hurdle please :)
    Code (Text):
    1. using System;
    2. using System.Collections.Generic;
    3. using System.ComponentModel;
    4. using System.Data;
    5. using System.Drawing;
    6. using System.Linq;
    7. using System.Text;
    8. using System.Threading.Tasks;
    9. using System.Windows.Forms;
    10. using TvControl;          // include the tvserver remote control interfaces
    11. using TvLibrary.Channels; // include tv-channel types
    12. using TvDatabase;
    13.  
    14. namespace WindowsFormsApp1
    15. {
    16.     public partial class Form1 : Form
    17.     {
    18.         public Form1()
    19.         {
    20.             InitializeComponent();
    21.          
    22.         }
    23.          
    24.  
    25.  
    26.          
    27.         private void button1_Click(object sender, EventArgs e)
    28.         {
    29.              RemoteControl.HostName = "mars";
    30.             int cardCount = RemoteControl.Instance.Cards;
    31.             for (int i = 0; i < cardCount; ++i)
    32.             {
    33.                 int cardId = RemoteControl.Instance.CardId(i);
    34.                 User user = new User();
    35.                 user.CardId = cardId;
    36.              
    37.                 VirtualCard card = new VirtualCard(user, RemoteControl.HostName);
    38.            
    39.                 textBox1.AppendText("Type: " + card.Name + " Recording: " + card.IsRecording  + "\r\n");
    40.             }
    41.         }
    42.     }
    43. }
    44.  
     
  2. Google AdSense Guest Advertisement



    to hide all adverts.
  3. Edalex
    • Premium Supporter

    Edalex Community Plugin Dev

    Joined:
    January 3, 2008
    Messages:
    2,877
    Likes Received:
    700
    Gender:
    Male
    Location:
    Saratov
    Ratings:
    +1,203 / 9
    Home Country:
    Russian Federation Russian Federation
    Show System Specs
    Hey.
    When I want to get info from tv server I use TVBusinessLayer methods.
    Also sometimes I need to set cofing with some metthod I don't remember
     
Loading...

Users Viewing Thread (Users: 0, Guests: 0)

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice
  • About The Project

    The vision of the MediaPortal project is to create a free open source media centre application, which supports all advanced media centre functions, and is accessible to all Windows users.

    In reaching this goal we are working every day to make sure our software is one of the best.

             

  • Support MediaPortal!

    The team works very hard to make sure the community is running the best HTPC-software. We give away MediaPortal for free but hosting and software is not for us.

    Care to support our work with a few bucks? We'd really appreciate it!