private void UpdateFormatOption()
{
if (this.listViewFormats.SelectedItems.Count == 1)
{
this.toolStripButtonFormatSchema.Enabled = true;
this.toolStripButtonFormatExamples.Enabled = true;
this.toolStripButtonFormatMarkup.Enabled = true;
ListViewItem lvi = (ListViewItem)this.listViewFormats.SelectedItems[0];
DocFormat docFormat = (DocFormat)lvi.Tag;
this.toolStripButtonFormatNone.Checked = (docFormat.FormatOptions == DocFormatOptionEnum.None);
this.toolStripButtonFormatSchema.Checked = (docFormat.FormatOptions == DocFormatOptionEnum.Schema);
this.toolStripButtonFormatExamples.Checked = (docFormat.FormatOptions == DocFormatOptionEnum.Examples);
this.toolStripButtonFormatMarkup.Checked = (docFormat.FormatOptions == DocFormatOptionEnum.Markup);
lvi.SubItems[1].Text = docFormat.FormatOptions.ToString();
}
else
{
this.toolStripButtonFormatSchema.Enabled = false;
this.toolStripButtonFormatExamples.Enabled = false;
this.toolStripButtonFormatMarkup.Enabled = false;
}
}