private void cbReportItems_SelectedIndexChanged(object sender, EventArgs e) { string ri_name = cbReportItems.SelectedItem as string; if (ri_name == GROUP || ri_name == NONAME) { return; } if (ri_name == REPORT) { // handle request for change to report property if (_Draw.SelectedCount == 0) // we're already on report { return; } _DesignCtl.SetSelection(null); return; } // handle request to change selected report item XmlNode ri_node = _Draw.ReportNames.GetRINodeFromName(ri_name); if (ri_node == null) { return; } if (_Draw.SelectedCount == 1 && _Draw.SelectedList[0] == ri_node) { return; // we're already selected! } _DesignCtl.SetSelection(ri_node); }