示例#1
0
 public void UpdateSeriesStyle(SeriesStyle sStyle)
 {
     int index = GetIndex(sStyle.Name);
         if (index == -1) listSeriesStyle.Add(sStyle);
         else
         {
             listSeriesStyle[index].Name = sStyle.Name;
             listSeriesStyle[index].useDefaultColor = sStyle.useDefaultColor;
             listSeriesStyle[index].Color = sStyle.Color;
             listSeriesStyle[index].MarkerSize = sStyle.MarkerSize;
             listSeriesStyle[index].SeriesType = sStyle.SeriesType;
             listSeriesStyle[index].MarkerStyle = sStyle.MarkerStyle;
             listSeriesStyle[index].showOnSecondary = sStyle.showOnSecondary;
         }
 }
示例#2
0
        public void LoadSettings()
        {
            string filename = System.Windows.Forms.Application.StartupPath + "/mview.chr";
                if (System.IO.File.Exists(filename))
                {
                    using (TextReader text = new StreamReader(filename))
                    {
                        int count = Int32.Parse(text.ReadLine());

                        for (int iw = 0; iw < count; ++iw)
                        {
                            SeriesStyle sStyle = new SeriesStyle();
                            sStyle.Name = text.ReadLine();
                            sStyle.useDefaultColor = Boolean.Parse(text.ReadLine());
                            sStyle.Color = Color.FromArgb(Int32.Parse(text.ReadLine()));
                            sStyle.MarkerSize = Int32.Parse(text.ReadLine());
                            sStyle.MarkerStyle = (MarkerStyle)Enum.Parse(typeof(MarkerStyle), text.ReadLine(), true);
                            sStyle.SeriesType = (SeriesChartType)Enum.Parse(typeof(SeriesChartType), text.ReadLine(), true);
                            sStyle.showOnSecondary = Boolean.Parse(text.ReadLine());
                            listSeriesStyle.Add(sStyle);
                        }
                        text.Close();
                    }
                }
        }
示例#3
0
 private void buttonApply_Click(object sender, EventArgs e)
 {
     SeriesStyle item = new SeriesStyle();
     item.Name = listKeywords.SelectedItem.ToString();
     item.SeriesType = (SeriesChartType)Enum.Parse(typeof(SeriesChartType), boxSeriesType.Text, true);
     item.MarkerStyle = (MarkerStyle)Enum.Parse(typeof(MarkerStyle), boxMarkerStyle.Text, true);
     item.Color = buttonColor.BackColor;
     item.MarkerSize = Convert.ToInt32(updownMarkerSize.Value);
     item.showOnSecondary = chkShowOnSecondary.Checked;
     item.useDefaultColor = chkUseDefaultColor.Checked;
     m_chartController.UpdateSeriesStyle(item);
     ApplyStyle();
 }