Example #1
0
 private void ChartSelectionChLbAxis2_ItemCheck(object sender, ItemCheckEventArgs e)
 {
     if (e.NewValue == CheckState.Checked)
     {
         ChartSelectionChLbAxis1.SetItemChecked(e.Index, false);
     }
 }
Example #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);
     }
 }
Example #3
0
 private void CreateChartBtn_Click(object sender, EventArgs e)
 {
     ChartSelectionList.Clear();
     ChartSelectionList.Add("Timestamp");
     for (int i = 0; i < ChartSelectionChLbAxis1.Items.Count; i++)
     {
         if (ChartSelectionChLbAxis1.GetItemChecked(i))
         {
             ChartSelectionList.Add(ChartSelectionChLbAxis1.Items[i].ToString());
         }
         if (ChartSelectionChLbAxis2.GetItemChecked(i))
         {
             ChartSelectionList.Add("-" + ChartSelectionChLbAxis2.Items[i].ToString());
         }
     }
     Closing_Action = 1;
     Close();
 }
Example #4
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);
                    }
                }
            }
        }