cec-config-gui: added some basic test commands and device information
[deb_libcec.git] / src / cec-config-gui / DeviceInformation.cs
CommitLineData
96fa7764
LOK
1using System;
2using System.Collections.Generic;
3using System.ComponentModel;
4using System.Data;
5using System.Drawing;
6using System.Text;
7using System.Windows.Forms;
8using CecSharp;
9
10namespace CecConfigGui
11{
12 public partial class DeviceInformation : Form
13 {
14 public DeviceInformation(CecLogicalAddress address, ref LibCecSharp lib,
15 bool devicePresent, CecVendorId vendor, bool isActiveSource, ushort physicalAddress,
16 CecVersion version, CecPowerStatus power, string osdName, string menuLanguage)
17 {
18 InitializeComponent();
19 this.lDevice.Text = lib.ToString(address);
20 this.lLogicalAddress.Text = "#" + (int)address;
21 this.lPhysicalAddress.Text = physicalAddress.ToString();
22 this.lDevicePresent.Text = devicePresent ? "yes" : "no";
23 this.lActiveSource.Text = isActiveSource ? "yes" : "no";
24 this.lVendor.Text = lib.ToString(vendor) + " (" + (UInt64)vendor +")";
25 this.lCecVersion.Text = lib.ToString(version);
26 this.lPowerStatus.Text = lib.ToString(power);
27 this.lOsdName.Text = osdName;
28 this.lMenuLanguage.Text = menuLanguage;
29 }
30 }
31}