public FFTDialog(ChartDataList cds, Form MdiPar) { this.InitializeComponent(); this.Text = "Fast Fourier Transform Dialog"; this.MdiPar = MdiPar; this.cds = cds; }
public ChartDataProperties(ChartDataList cds) { if (cds.Length > 0) { this.cds = cds; primary = cds[0]; title = primary.Title; titlex = primary.TitleX; axislabelx = primary.AxisLabelX; axislabely = primary.AxisLabelY; showZero = primary.ShowZero; showFullNameLegend = primary.ShowFullNameLegend; List <string> titlesy; for (int i = 0; i < cds.Length; i++) { titlesy = new List <string>(); titlesy.AddRange(cds[i].TitlesY); ytitles.Add(titlesy); } } }
public FormPostProcess(ChartDataList cds) { this.cds = cds; InitializeComponent(); Type[] types = this.GetType().Assembly.GetTypes(); foreach (Type t in types) { if (t.IsSubclassOf(typeof(PostProcessBase))) { try { PostProcessBase ppb = (PostProcessBase)Activator.CreateInstance(t, new object[] { cds }); commands.Add(ppb); } catch { } } } foreach (PostProcessBase ppb in commands) { ToolStripItem tsi; //if (this.functionsMenu.Items.ContainsKey(ppb.Category)) // tsi = this.functionsMenu.Items[ppb.Category]; //else // tsi = this.functionsMenu.Items.Add(ppb.Category); this.functionsMenu.Items.Add(ppb.Name, null, delegate { string str; ppb.Execute(out str); this.richTextBox1.AppendText(str); }); } }
/// <summary> /// Do not draw grid /// </summary> //public bool NoGrid{get{return nogrid;}set{nogrid = value;}} #endregion /// <summary> /// Constructor /// </summary> /// <param name="cd">Chart Data</param> public DrawGrid(ChartDataList cds) : base() { //Initialize fields this.X = cds.AxisRangeX; this.Y = cds.AxisRangeY; this.GridColor = Color.LightGray; xAxisType = cds.AxisTypeX; yAxisType = cds.AxisTypeY; //Check if were gonna do autoscale if (cds.AutoScale) { //Scale X values if (this.XAxisType == AxisType.LOG) { this.X = GraphMath.TransformLogX(cds.AxisRangeX.Min, cds.AxisRangeX.Max); } else { this.X = GraphMath.AxisScale(cds.AxisRangeX); } //Scale Y values if (this.YAxisType == AxisType.LOG) { this.Y = GraphMath.TransformLogY(cds.AxisRangeY.Min, cds.AxisRangeY.Max); } else { this.Y = GraphMath.AxisScale(cds.AxisRangeY); } } else { //Scale X values with axisdata for X as limiter if (this.XAxisType == AxisType.LOG) { this.X = GraphMath.TransformLog(X, GraphMath.TransformLogX(cds.AxisRangeX.Min, cds.AxisRangeX.Max)); } else if (((X.Max - X.Min) / X.Step) > 30) { this.X = GraphMath.AxisScale(cds.AxisRangeX); } //Scale Y values with axisdata for Y as limiter if (this.YAxisType == AxisType.LOG) { this.Y = GraphMath.TransformLog(Y, GraphMath.TransformLogY(cds.AxisRangeY.Min, cds.AxisRangeY.Max)); } else if (((Y.Max - Y.Min) / Y.Step) > 30) { this.Y = GraphMath.AxisScale(cds.AxisRangeY); } } if (cds.Length > 0) { showzero = cds[0].ShowZero; } }