Пример #1
0
        private void _lstSettingType_SelectedIndexChanged(object sender, EventArgs e)
        {
            // Check to see if anything is selected.
            if (_lstSettingType.SelectedItems.Count == 0)
            {
                return;
            }

            SettingsControlPanel panel = _lstSettingType.SelectedItems[0].Tag as SettingsControlPanel;

            if (panel == null)
            {
                return;
            }

            // Check to see if the panel is the same as the last.  If so, do nothing.
            if (panel == current_panel)
            {
                return;
            }

            if (current_panel != null)
            {
                current_panel.Visible = false;
            }

            panel.Visible = true;
            current_panel = panel;
        }
Пример #2
0
        private void _lstSettingType_SelectedIndexChanged(object sender, EventArgs e)
        {
            // Check to see if anything is selected.
            if(_lstSettingType.SelectedItems.Count == 0)
                return;

            SettingsControlPanel panel = _lstSettingType.SelectedItems[0].Tag as SettingsControlPanel;
            if(panel == null)
                return;

            // Check to see if the panel is the same as the last.  If so, do nothing.
            if(panel == current_panel)
                return;

            if(current_panel != null)
                current_panel.Visible = false;

            panel.Visible = true;
            current_panel = panel;
        }