private void PraseMetadata() { richTextBox1.ResetText(); richTextBox3.ResetText(); groupBox6.Text = groupBox6.Tag.ToString(); groupBox7.Text = groupBox7.Tag.ToString(); if (versionListBox.SelectedItem != null) { try { UpdateAssistant.Structure.Metadata meta = (versionListBox.SelectedItem as UpdateAssistant.Structure.Metadata); string changelog = meta.Details; string data = Newtonsoft.Json.JsonConvert.SerializeObject(meta, Newtonsoft.Json.Formatting.Indented); groupBox6.Text = groupBox6.Tag.ToString() + " - " + meta.Version; groupBox7.Text = groupBox7.Tag.ToString() + " - " + meta.Version; richTextBox1.Text = data; richTextBox3.Text = changelog; richTextBox1.Text = data; richTextBox3.Text = changelog; } catch (Exception ex) { MessageBox.Show(ex.Message); } } }
private void addVerMetaButton_Click(object sender, EventArgs e) { var newItem = new UpdateAssistant.Structure.Metadata(); newItem.Version = "NULL"; versionBindingSource.Add(newItem); UpdateVerMetaBindings(); }