Beispiel #1
0
 /// <summary>
 /// Write data associated with the plot as text.
 /// </summary>
 /// <param name="sb">the string builder to write to.</param>
 /// <param name="region">Only write out data in this region if onlyInRegion is true.</param>
 /// <param name="onlyInRegion">If true, only data in region is written, else all data is written.</param>
 /// <remarks>TODO: not implemented.</remarks>
 public void WriteData(System.Text.StringBuilder sb, RectangleD region, bool onlyInRegion)
 {
 }
        /// <summary>
        /// Writes text data describing the vertical line object to the supplied string builder. It is 
        /// possible to specify that the data will be written only if the line is in the specified 
        /// region.
        /// </summary>
        /// <param name="sb">the StringBuilder object to write to.</param>
        /// <param name="region">a region used if onlyInRegion is true.</param>
        /// <param name="onlyInRegion">If true, data will be written only if the line is in the specified region.</param>
        public void WriteData(System.Text.StringBuilder sb, RectangleD region, bool onlyInRegion)
        {
            // return if line is not in plot region and
            if (value_ > region.X+region.Width || value_ < region.X)
            {
                if (onlyInRegion)
                {
                    return;
                }
            }

            sb.Append( "Label: " );
            sb.Append( this.Label );
            sb.Append( "\r\n" );
            sb.Append( value_.ToString() );
            sb.Append( "\r\n" );
        }
Beispiel #3
0
 /// <summary>
 /// Write data associated with the plot as text.
 /// </summary>
 /// <param name="sb">the string builder to write to.</param>
 /// <param name="region">Only write out data in this region if onlyInRegion is true.</param>
 /// <param name="onlyInRegion">If true, only data in region is written, else all data is written.</param>
 /// <remarks>TODO: not implemented.</remarks>
 public void WriteData( System.Text.StringBuilder sb, RectangleD region, bool onlyInRegion )
 {
     sb.Append( "Write data not implemented yet for BarPlot\r\n" );
 }
Beispiel #4
0
 /// <summary>
 /// Write data associated with the plot as text.
 /// </summary>
 /// <param name="sb">the string builder to write to.</param>
 /// <param name="region">Only write out data in this region if onlyInRegion is true.</param>
 /// <param name="onlyInRegion">If true, only data in region is written, else all data is written.</param>
 /// <remarks>TODO: not implemented.</remarks>
 public void WriteData(System.Text.StringBuilder sb, RectangleD region, bool onlyInRegion)
 {
     sb.Append("Write data not implemented yet for BarPlot\r\n");
 }
 /// <summary>
 /// Write data associated with the plot as text.
 /// </summary>
 /// <param name="sb">the string builder to write to.</param>
 /// <param name="region">Only write out data in this region if onlyInRegion is true.</param>
 /// <param name="onlyInRegion">If true, only data in region is written, else all data is written.</param>
 /// <remarks>TODO: not implemented.</remarks>
 public void WriteData( System.Text.StringBuilder sb, RectangleD region, bool onlyInRegion )
 {
 }
        /// <summary>
        /// Coppies data in the current plot surface view window to the clipboard
        /// as text.
        /// </summary>
        public void CopyDataToClipboard()
        {
            System.Text.StringBuilder sb = new System.Text.StringBuilder();

            for (int i=0; i<this.InteractivePlotSurface2D.Drawables.Count; ++i)
            {
                IPlot plot = this.InteractivePlotSurface2D.Drawables[i] as IPlot;
                if (plot != null)
                {
                    Axis xAxis = this.InteractivePlotSurface2D.WhichXAxis( plot );
                    Axis yAxis = this.InteractivePlotSurface2D.WhichYAxis( plot );

                    RectangleD region = new RectangleD(
                        xAxis.WorldMin,
                        yAxis.WorldMin,
                        xAxis.WorldMax - xAxis.WorldMin,
                        yAxis.WorldMax - yAxis.WorldMin );

                    plot.WriteData( sb, region, true );
                }
            }

            Clipboard.SetDataObject( sb.ToString(), true );
        }
        /// <summary>
        /// Writes data out as text. 
        /// </summary>
        /// <param name="sb">StringBuilder to write to.</param>
        /// <param name="region">Only write out data in this region if onlyInRegion is true.</param>
        /// <param name="onlyInRegion">If true, only data in region is written, else all data is written.</param>
        public void WriteData( System.Text.StringBuilder sb, RectangleD region, bool onlyInRegion )
        {
            for (int i=0; i<this.Count;	++i)
            {
                if (!(onlyInRegion &&
                       (this[i].X >= region.X && this[i].X <= region.X + region.Width) &&
                       (this[i].Y >= region.Y && this[i].Y <= region.Y + region.Height)))
                {
                    continue;
                }

                sb.Append( this[i].ToString() );
                sb.Append( "\r\n" );
            }
        }
        /// <summary>
        /// Writes text data of the plot object to the supplied string builder. It is 
        /// possible to specify that only data in the specified range be written.
        /// </summary>
        /// <param name="sb">the StringBuilder object to write to.</param>
        /// <param name="region">a region used if onlyInRegion is true.</param>
        /// <param name="onlyInRegion">If true, only data enclosed in the provided region will be written.</param>
        public void WriteData( System.Text.StringBuilder sb, RectangleD region, bool onlyInRegion )
        {
            SequenceAdapter data_ =
                new SequenceAdapter( this.DataSource, this.DataMember, this.OrdinateData, this.AbscissaData );

            sb.Append( "Label: " );
            sb.Append( this.Label );
            sb.Append( "\r\n" );
            data_.WriteData( sb, region, onlyInRegion );
        }
Beispiel #9
0
 /// <summary>
 /// Writes text data describing the line object to the supplied string builder.
 /// </summary>
 /// <param name="sb">the StringBuilder object to write to.</param>
 /// <param name="region">a region used if onlyInRegion is true</param>
 /// <param name="onlyInRegion">If ture, data will be written on ly if the line is in the specified region.</param>
 public void WriteData(StringBuilder sb, RectangleD region, bool onlyInRegion)
 {
     sb.Append("Label: ");
     sb.Append(this.Label);
     sb.Append("\r\n");
     sb.Append("Intercept: ");
     sb.Append(this.Intercept.ToString());
     sb.Append(", Slope: ");
     sb.Append(this.Slope.ToString());
     sb.Append("\r\n");
 }