static void Main() { Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); foreach (var d in new Devices(ChannelEditing.object_store)) { Device device = d as Device; Console.WriteLine("Device id: {0}\n\tname: {1}\n\ttype: {2}\n\tuids: {3}", device.Id, device.Name, device.DeviceType, string.Join(",", device.UIds)); } // FindUnencryptedQAMChannels(); SDTokenManager token_manager = LoginForm.LoginAndGetTokenManager(); StatusResponse status = new SDStatusReader(token_manager).GetSchedulesDirectStatus(); JSONClient.DisplayJSON(status); if (!status.IsOnline()) { MessageBox.Show("SchedulesDirect JSON API is currently offline. Try again later."); Application.Exit(); } /* var schedule_responses = SDSchedules.GetStationScheduleResponses(new List<string>{ * "58623", "62420" }); * HashSet<string> programIDs = new HashSet<string>(); * foreach(var schedule_response in schedule_responses) * { * if (schedule_response.programs != null) * foreach(var program in schedule_response.programs) * programIDs.Add(program.programID); * } * List<SDProgram> programs = SDProgramFetcher.FetchPrograms(programIDs); */ // SDAccountManagement.AddLineupToAccount("USA-NY67791-QAM"); ProviderCreator.ListProviders(); Application.Run(new ConfigForm(token_manager, status)); }
private void SelectedLineupsListBox_SelectedValueChanged(object sender, EventArgs e) { RemoveSelectedLineupButton.Enabled = selected_lineup_for_removal != null; if (selected_lineup_for_removal != null) { var channel_list = SDChannelReader.GetChannelListByLineupUri(selected_lineup_for_removal.sdLineup.uri); JSONClient.DisplayJSON(channel_list); string serialized = JSONClient.Serialize(channel_list); System.IO.File.WriteAllBytes("channel_list.json", Encoding.UTF8.GetBytes(serialized)); } }