Пример #1
0
 private void ChartSelectionChLbAxis1_ItemCheck(object sender, ItemCheckEventArgs e)
 {
     if (e.NewValue == CheckState.Checked)
     {
         ChartSelectionChLbAxis2.SetItemChecked(e.Index, false);
     }
 }
Пример #2
0
 private void ClearSelectionBtn_Click(object sender, EventArgs e)
 {
     for (int i = 0; i < ChartSelectionChLbAxis1.Items.Count; i++)
     {
         ChartSelectionChLbAxis1.SetItemChecked(i, false);
         ChartSelectionChLbAxis2.SetItemChecked(i, false);
     }
 }
Пример #3
0
        private void ChartSelectionForm_Load(object sender, EventArgs e)
        {
            switch (ChartType)
            {
            case 0:
                LineRb.Checked = true;
                break;

            case 1:
                BarRb.Checked = true;
                break;

            case 2:
                SplineRb.Checked = true;
                break;
            }
            StackedCb.Checked = ChartStacked;

            foreach (string SelectionItem in SelectionList)
            {
                if (SelectionItem != "Timestamp")
                {
                    ChartSelectionChLbAxis1.Items.Add(SelectionItem);
                    ChartSelectionChLbAxis2.Items.Add(SelectionItem);
                    if (ChartSelectionList.Contains(SelectionItem) | SelectionItem == "Timestamp")
                    {
                        ChartSelectionChLbAxis1.SetItemChecked(ChartSelectionChLbAxis1.Items.Count - 1, true);
                    }
                    else
                    {
                        ChartSelectionChLbAxis1.SetItemChecked(ChartSelectionChLbAxis1.Items.Count - 1, false);
                    }
                    if (ChartSelectionList.Contains("-" + SelectionItem))
                    {
                        ChartSelectionChLbAxis2.SetItemChecked(ChartSelectionChLbAxis2.Items.Count - 1, true);
                    }
                    else
                    {
                        ChartSelectionChLbAxis2.SetItemChecked(ChartSelectionChLbAxis2.Items.Count - 1, false);
                    }
                }
            }
        }