private void ProgramInformation_Load(object sender, EventArgs e) { if (!MultipleSelection) { labelProgramName.Text += MyProgram.Name; DGChannel.ColumnCount = 2; // Program info DGChannel.Columns[0].DefaultCellStyle.BackColor = Color.Gainsboro; DGChannel.Rows.Add("Name", MyProgram.Name); DGChannel.Rows.Add("Id", MyProgram.Id); DGChannel.Rows.Add("State", (ChannelState)MyProgram.State); DGChannel.Rows.Add("Created", ((DateTime)MyProgram.Created).ToLocalTime().ToString("G")); DGChannel.Rows.Add("Last Modified", ((DateTime)MyProgram.LastModified).ToLocalTime().ToString("G")); DGChannel.Rows.Add("Description", MyProgram.Description); DGChannel.Rows.Add("Archive Window Length", MyProgram.ArchiveWindowLength); DGChannel.Rows.Add("Manifest Name", MyProgram.ManifestName); DGChannel.Rows.Add("Channel Name", MyProgram.Channel.Name); DGChannel.Rows.Add("Channel Id", MyProgram.ChannelId); DGChannel.Rows.Add("Asset Name", MyProgram.Asset.Name); DGChannel.Rows.Add("Asset Id", MyProgram.AssetId); ProgramInfo PI = new ProgramInfo(MyProgram, MyContext); ValidURIs = PI.GetValidURIs(); NotValidURIs = PI.GetNotValidURIs(); foreach (var t in ValidURIs) { DGChannel.Rows.Add("Url", t.AbsoluteUri); } foreach (var t in NotValidURIs) { int i = DGChannel.Rows.Add("Url", t.AbsoluteUri); DGChannel.Rows[i].Cells[1].Style.ForeColor = Color.Red; } } else { labelProgramName.Text = "(multiple programs have been selected)"; tabControl1.TabPages.Remove(tabPageInfo); // no info as multiple buttonDisplayRelatedAsset.Visible = false; } textBoxDescription.Text = MyProgram.Description; numericUpDownArchiveHours.Value = Convert.ToInt16(MyProgram.ArchiveWindowLength.TotalHours); numericUpDownArchiveMinutes.Value = MyProgram.ArchiveWindowLength.Minutes; // let's track when user edit a setting Modifications = new ExplorerProgramModifications { Description = false, ArchiveWindow = false }; }
private void ProgramInformation_Load_1(object sender, EventArgs e) { labelProgramName.Text += MyProgram.Name; DGChannel.ColumnCount = 2; // asset info DGChannel.Columns[0].DefaultCellStyle.BackColor = Color.Gainsboro; DGChannel.Rows.Add("Name", MyProgram.Name); DGChannel.Rows.Add("Id", MyProgram.Id); DGChannel.Rows.Add("State", (ChannelState)MyProgram.State); DGChannel.Rows.Add("Created", ((DateTime)MyProgram.Created).ToLocalTime()); DGChannel.Rows.Add("Last Modified", ((DateTime)MyProgram.LastModified).ToLocalTime()); DGChannel.Rows.Add("Description", MyProgram.Description); DGChannel.Rows.Add("Asset Id", MyProgram.AssetId); DGChannel.Rows.Add("Channel Name", MyProgram.Channel.Name); DGChannel.Rows.Add("Channel Id", MyProgram.ChannelId); DGChannel.Rows.Add("Archive Window Length", MyProgram.ArchiveWindowLength); DGChannel.Rows.Add("Manifest Name", MyProgram.ManifestName); ProgramInfo PI = new ProgramInfo(MyProgram, MyContext); ValidURIs = PI.GetValidURIs(); NotValidURIs = PI.GetNotValidURIs(); foreach (var t in ValidURIs) { DGChannel.Rows.Add("Url", t.AbsoluteUri); } foreach (var t in NotValidURIs) { int i = DGChannel.Rows.Add("Url", t.AbsoluteUri); DGChannel.Rows[i].Cells[1].Style.ForeColor = Color.Red; } textBoxDescription.Text = MyProgram.Description; numericUpDownArchiveDays.Value = MyProgram.ArchiveWindowLength.Days; numericUpDownArchiveHours.Value = MyProgram.ArchiveWindowLength.Hours; numericUpDownArchiveMinutes.Value = MyProgram.ArchiveWindowLength.Minutes; BuildLocatorsTree(); }
private void ProgramInformation_Load_1(object sender, EventArgs e) { labelProgramName.Text += MyProgram.Name; DGChannel.ColumnCount = 2; // Program info DGChannel.Columns[0].DefaultCellStyle.BackColor = Color.Gainsboro; DGChannel.Rows.Add("Name", MyProgram.Name); DGChannel.Rows.Add("Id", MyProgram.Id); DGChannel.Rows.Add("State", (ChannelState)MyProgram.State); DGChannel.Rows.Add("Created", ((DateTime)MyProgram.Created).ToLocalTime()); DGChannel.Rows.Add("Last Modified", ((DateTime)MyProgram.LastModified).ToLocalTime()); DGChannel.Rows.Add("Description", MyProgram.Description); DGChannel.Rows.Add("Archive Window Length", MyProgram.ArchiveWindowLength); DGChannel.Rows.Add("Manifest Name", MyProgram.ManifestName); DGChannel.Rows.Add("Channel Name", MyProgram.Channel.Name); DGChannel.Rows.Add("Channel Id", MyProgram.ChannelId); DGChannel.Rows.Add("Asset Name", MyProgram.Asset.Name); DGChannel.Rows.Add("Asset Id", MyProgram.AssetId); ProgramInfo PI = new ProgramInfo(MyProgram, MyContext); ValidURIs = PI.GetValidURIs(); NotValidURIs = PI.GetNotValidURIs(); foreach (var t in ValidURIs) { DGChannel.Rows.Add("Url", t.AbsoluteUri); } foreach (var t in NotValidURIs) { int i = DGChannel.Rows.Add("Url", t.AbsoluteUri); DGChannel.Rows[i].Cells[1].Style.ForeColor = Color.Red; } textBoxDescription.Text = MyProgram.Description; numericUpDownArchiveDays.Value = MyProgram.ArchiveWindowLength.Days; numericUpDownArchiveHours.Value = MyProgram.ArchiveWindowLength.Hours; numericUpDownArchiveMinutes.Value = MyProgram.ArchiveWindowLength.Minutes; }