public StbSetup(int cardId) { InitializeComponent(); _cardId = cardId; foreach (Card card in Card.ListAll()) { if (card.IdCard == _cardId) { labelCardName.Text = card.Name; if (!card.Enabled) { labelCardName.Text += " (Disabled)"; } break; } } // Setup commands combo box comboBoxCommands.Items.Add(Common.UITextRun); comboBoxCommands.Items.Add(Common.UITextSerial); comboBoxCommands.Items.Add(Common.UITextWindowMsg); comboBoxCommands.Items.Add(Common.UITextTcpMsg); comboBoxCommands.Items.Add(Common.UITextHttpMsg); string[] fileList = TV3BlasterPlugin.GetFileList(true); if (fileList != null) { comboBoxCommands.Items.AddRange(fileList); } comboBoxCommands.SelectedIndex = 0; // Setup command list ListViewItem item; string[] subItems = new string[2]; for (int i = 0; i < 10; i++) { subItems[0] = "Digit " + i; subItems[1] = String.Empty; item = new ListViewItem(subItems); listViewExternalCommands.Items.Add(item); } subItems[0] = "Select"; subItems[1] = String.Empty; item = new ListViewItem(subItems); listViewExternalCommands.Items.Add(item); subItems[0] = "PreChange"; subItems[1] = String.Empty; item = new ListViewItem(subItems); listViewExternalCommands.Items.Add(item); SetToCard(_cardId); }
private void RefreshCommandList() { comboBoxCommands.Items.Clear(); comboBoxCommands.Items.Add(Common.UITextRun); comboBoxCommands.Items.Add(Common.UITextPause); comboBoxCommands.Items.Add(Common.UITextSerial); comboBoxCommands.Items.Add(Common.UITextWindowMsg); comboBoxCommands.Items.Add(Common.UITextTcpMsg); comboBoxCommands.Items.Add(Common.UITextHttpMsg); comboBoxCommands.Items.Add(Common.UITextKeys); comboBoxCommands.Items.Add(Common.UITextEject); comboBoxCommands.Items.Add(Common.UITextStandby); comboBoxCommands.Items.Add(Common.UITextHibernate); comboBoxCommands.Items.Add(Common.UITextReboot); comboBoxCommands.Items.Add(Common.UITextShutdown); string[] fileList = TV3BlasterPlugin.GetFileList(true); if (fileList != null && fileList.Length > 0) { comboBoxCommands.Items.AddRange(fileList); } }