private void buttonSettings_Click(object sender, EventArgs e) { if (listViewFeeds.SelectedIndices.Count == 0) { return; } if (listViewFeeds.SelectedIndices.Count > 1) { MessageBox.Show("Select only one feed to show settings for."); return; } EventSource source = _control.Manager.NewsSourcesUnsafe[listViewFeeds.SelectedIndices[0]]; NewsSourceSettingsControl control = new NewsSourceSettingsControl(source); HostingForm form = new HostingForm("Source Settings", control); form.StartPosition = FormStartPosition.CenterScreen; form.ShowDialog(); _control.UpdateUI(); }
private void buttonSettings_Click(object sender, EventArgs e) { if (listViewFeeds.SelectedIndices.Count == 0) { return; } if (listViewFeeds.SelectedIndices.Count > 1) { MessageBox.Show("Select only one feed to show settings for."); return; } NewsSource source = _control.Manager.NewsSourcesUnsafe[listViewFeeds.SelectedIndices[0]]; NewsSourceSettingsControl control = new NewsSourceSettingsControl(source); HostingForm form = new HostingForm("Source Settings", control); form.StartPosition = FormStartPosition.CenterScreen; form.ShowDialog(); _control.UpdateUI(); }