private void DoConfig()
        {
            frmLineselection linesel = new frmLineselection();

            linesel.TopMost = true;
            //linesel.checkedListBoxControl1.DataSource = _lines;
            linesel.SetDataSource(_lines);
            //DumpLineVisiblity();
            if (linesel.ShowDialog() == DialogResult.OK)
            {
                // save values to file/registry
                foreach (CheckedListBoxItem item in linesel.checkedListBoxControl1.Items)
                {
                    foreach (GraphLine line in _lines)
                    {
                        if (line.ChannelName == (string)item.Description)
                        {
                            if (item.CheckState == CheckState.Unchecked || item.CheckState == CheckState.Indeterminate)
                            {
                                line.LineVisible = false;
                            }
                            else
                            {
                                line.LineVisible = true;
                            }
                            break;
                        }
                    }
                }

                SaveConfig();
                Invalidate();
            }
            //DumpLineVisiblity();
        }
Пример #2
0
        private void DoConfig()
        {
            frmLineselection linesel = new frmLineselection();
            linesel.TopMost = true;
            //linesel.checkedListBoxControl1.DataSource = _lines;
            linesel.SetDataSource(_lines);
            //DumpLineVisiblity();
            if (linesel.ShowDialog() == DialogResult.OK)
            {
                // save values to file/registry
                foreach (CheckedListBoxItem item in linesel.checkedListBoxControl1.Items)
                {
                    foreach (GraphLine line in _lines)
                    {
                        if (line.ChannelName == (string)item.Description)
                        {
                            if (item.CheckState == CheckState.Unchecked || item.CheckState == CheckState.Indeterminate)
                            {
                                line.LineVisible = false;
                            }
                            else
                            {
                                line.LineVisible = true;
                            }
                            break;
                        }
                    }
                }

                SaveConfig();
                Invalidate();
            }
            //DumpLineVisiblity();
        }