This commit is contained in:
John Jenko 2010-08-04 15:17:19 +00:00
parent 1d5a43627c
commit 935802a57a
13 changed files with 151 additions and 188 deletions

View File

@ -62,6 +62,7 @@
</logger> </logger>
</log4net> </log4net>
<appSettings> <appSettings>
<add key ="Debug" value ="true"/>
<add key="CslaAuthentication" value="Windows" /> <add key="CslaAuthentication" value="Windows" />
<!-- <!--
<add key="CslaDataPortalProxy" <add key="CslaDataPortalProxy"

View File

@ -8,6 +8,7 @@ using System.Drawing;
using System.Text; using System.Text;
using System.Windows.Forms; using System.Windows.Forms;
using System.IO; using System.IO;
using System.Configuration;
using VEPROMS.CSLA.Library; using VEPROMS.CSLA.Library;
//using Csla; //using Csla;
using DevComponents; using DevComponents;
@ -87,13 +88,16 @@ namespace VEPROMS
#endregion #endregion
public frmVEPROMS() public frmVEPROMS()
{ {
#if (DEBUG) if (vlnStackTrace.DebugMode)
{
//use local data (for development/debug mode) //use local data (for development/debug mode)
if (Environment.MachineName == "RMARK-PC") if (Environment.MachineName == "RMARK-PC")
VEPROMS.CSLA.Library.Database.ConnectionName = "VEPROMS_RMARK_DEBUG"; VEPROMS.CSLA.Library.Database.ConnectionName = "VEPROMS_RMARK_DEBUG";
else else
VEPROMS.CSLA.Library.Database.ConnectionName = "VEPROMS_LOCAL"; VEPROMS.CSLA.Library.Database.ConnectionName = "VEPROMS_LOCAL";
#else }
else
{
// use server data (default) // use server data (default)
// - except for the volian laptop and Rich's Demo version where we need to use local data // - except for the volian laptop and Rich's Demo version where we need to use local data
if (Environment.MachineName == "RMARK-PC") if (Environment.MachineName == "RMARK-PC")
@ -104,15 +108,13 @@ namespace VEPROMS
// VEPROMS.CSLA.Library.Database.ConnectionName = "VEPROMS"; // VEPROMS.CSLA.Library.Database.ConnectionName = "VEPROMS";
else else
VEPROMS.CSLA.Library.Database.ConnectionName = "VEPROMS_LOCAL"; VEPROMS.CSLA.Library.Database.ConnectionName = "VEPROMS_LOCAL";
}
#endif
InitializeComponent(); InitializeComponent();
// When creating an XY Plot, a System.Drawing.Graphics is needed and it requires a form. Use the main // When creating an XY Plot, a System.Drawing.Graphics is needed and it requires a form. Use the main
// form. // form.
#if (DEBUG) if (vlnStackTrace.DebugMode)
MSWordToPDF.OverrideColor = Color.Red; MSWordToPDF.OverrideColor = Color.Red;
#endif
MSWordToPDF.FormForPlotGraphics = this; MSWordToPDF.FormForPlotGraphics = this;
// set the color of the ribbon // set the color of the ribbon
@ -181,6 +183,8 @@ namespace VEPROMS
} }
private void frmVEPROMS_Load(object sender, EventArgs e) private void frmVEPROMS_Load(object sender, EventArgs e)
{ {
string debugMode = ConfigurationManager.AppSettings["Debug"];
vlnStackTrace.DebugMode = bool.Parse(debugMode); // set debug for the Volian.Controls.Library
// get the saved location and size of the VE-PROMS appication for this user // get the saved location and size of the VE-PROMS appication for this user
if (Settings.Default["Location"] != null) this.Location = Settings.Default.Location; if (Settings.Default["Location"] != null) this.Location = Settings.Default.Location;
if (Settings.Default["Size"] != null) this.Size = Settings.Default.Size; if (Settings.Default["Size"] != null) this.Size = Settings.Default.Size;
@ -200,12 +204,12 @@ namespace VEPROMS
} }
private void SetupButtons() private void SetupButtons()
{ {
#if (DEBUG) if (!vlnStackTrace.DebugMode)
#else {
lblItemID.Visible = false; lblItemID.Visible = false;
btnItemInfo.Visible = false; btnItemInfo.Visible = false;
cmbFont.Visible = false; cmbFont.Visible = false;
#endif }
} }
#region MRU #region MRU
private MostRecentItemList _MyMRIList; private MostRecentItemList _MyMRIList;
@ -242,11 +246,6 @@ namespace VEPROMS
//SaveMRU(); //SaveMRU();
SetupMRU(); SetupMRU();
if (mri != null) tc.OpenItem(mri.MyItemInfo); if (mri != null) tc.OpenItem(mri.MyItemInfo);
#if (DEBUG)
// display a property page contianing the Tab Cotrol information
//f = new frmPropGrid(tc);
//f.Show();
#endif
} }
private void SaveMRU() private void SaveMRU()
{ {
@ -560,11 +559,10 @@ namespace VEPROMS
/// <param name="args"></param> /// <param name="args"></param>
void tn_LoadingChildernDone(object sender, VETreeNodeEventArgs args) void tn_LoadingChildernDone(object sender, VETreeNodeEventArgs args)
{ {
#if (DEBUG) if (vlnStackTrace.DebugMode)
ProgBarText = args.Info + " Seconds"; ProgBarText = args.Info + " Seconds";
#else else
ProgBarText = ""; ProgBarText = "";
#endif
} }
public int ProgBarMax public int ProgBarMax

View File

@ -242,10 +242,6 @@ namespace VEPROMS.CSLA.Library
OnLoadingChildrenSQL(tn, new VETreeNodeEventArgs()); OnLoadingChildrenSQL(tn, new VETreeNodeEventArgs());
IList ol; IList ol;
ItemInfo item = veobj as ItemInfo; ItemInfo item = veobj as ItemInfo;
#if DEBUG
if (item != null && item.ItemID == 378)
Console.WriteLine("here");
#endif
if (veobj.GetType() == typeof(StepInfo) || veobj.GetType() == typeof(SectionInfo) || veobj.GetType() == typeof(ItemInfo)) if (veobj.GetType() == typeof(StepInfo) || veobj.GetType() == typeof(SectionInfo) || veobj.GetType() == typeof(ItemInfo))
ol = ((ItemInfo)veobj).GetChildren(true); ol = ((ItemInfo)veobj).GetChildren(true);
else else

View File

@ -2,7 +2,6 @@ using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Text; using System.Text;
using System.Drawing; using System.Drawing;
using C1.C1Pdf;
using iTextSharp.text.pdf; using iTextSharp.text.pdf;
using iTextSharp.text.factories; using iTextSharp.text.factories;
using Microsoft.Win32; using Microsoft.Win32;
@ -22,41 +21,6 @@ namespace VG
void Save(string fileName); void Save(string fileName);
float FontSizeAdjust { get;} float FontSizeAdjust { get;}
} }
public partial class VGOut_C1PDF : IVGOutput
{
private C1PdfDocument _VGOutput;
//public C1PdfDocument VGOutput
//{ get { return _VGOutput; } }
public static VGOut_C1PDF Create()
{
C1PdfDocument pdf = new C1.C1Pdf.C1PdfDocument();
pdf.FontType = C1.C1Pdf.FontTypeEnum.Embedded; // embed fonts
return new VGOut_C1PDF(pdf);
}
public VGOut_C1PDF(C1PdfDocument vgOutput)
{ _VGOutput = vgOutput; }
public float Scale
// { get { return _VGOutput.Transform.Elements[0]; } }
{ get { return 1; } }
public void DrawLine(Pen pn, float startx, float starty, float endx, float endy)
{ _VGOutput.DrawLine(pn, startx, starty, endx, endy); }
public void DrawRectangle(Pen pn, RectangleF rectf)
{ _VGOutput.DrawRectangle(pn, rectf.X, rectf.Y, rectf.Width, rectf.Height); }
public void DrawEllipse(Pen pn, float cx, float cy, float dx, float dy)
{ _VGOutput.DrawEllipse(pn, cx, cy, dx, dy); }
public void DrawImage(Bitmap bm, RectangleF rectf)
{ _VGOutput.DrawImage(bm, rectf, ContentAlignment.MiddleCenter, ImageSizeModeEnum.Scale); }
public void DrawString(string text, Font myFont, Brush brush, RectangleF rectf)
{ _VGOutput.DrawString(text, myFont, brush, rectf, StringFormat.GenericTypographic); }
public void DrawArc(Pen pn, RectangleF rectf, float startAngle, float sweepAngle)
{ _VGOutput.DrawArc(pn, rectf, startAngle, sweepAngle); }
public SizeF MeasureString(string text, Font myFont)
{ return _VGOutput.MeasureString(text, myFont, 500); } //, StringFormat.GenericTypographic
public void Save(string fileName)
{ _VGOutput.Save(fileName); }
public float FontSizeAdjust
{ get { return .95F; } }
}
public partial class VGOut_Graphics: IVGOutput public partial class VGOut_Graphics: IVGOutput
{ {
private Graphics _VGOutput; private Graphics _VGOutput;

View File

@ -371,12 +371,12 @@ namespace VG
lnwid = w; lnwid = w;
pg = ipg; pg = ipg;
} }
#if DEBUG //#if DEBUG
public static int iColor = 0; //public static int iColor = 0;
public Color[] myColors = { Color.Red, Color.Green, Color.OrangeRed, Color.Cyan, Color.Orange, Color.Blue, Color.Yellow, Color.Indigo, Color.YellowGreen, Color.Violet }; //public Color[] myColors = { Color.Red, Color.Green, Color.OrangeRed, Color.Cyan, Color.Orange, Color.Blue, Color.Yellow, Color.Indigo, Color.YellowGreen, Color.Violet };
//public Color[] myColors ={ Color.Red, Color.Orange, Color.Yellow, Color.Green, Color.Blue, Color.BlueViolet, Color.Violet }; ////public Color[] myColors ={ Color.Red, Color.Orange, Color.Yellow, Color.Green, Color.Blue, Color.BlueViolet, Color.Violet };
#endif //#endif
public void Draw(IVGOutput vgOutput) public void Draw(IVGOutput vgOutput)
{ {
//#if DEBUG //#if DEBUG

View File

@ -90,9 +90,9 @@ namespace Volian.Controls.Library
public AnnotationDetails() public AnnotationDetails()
{ {
InitializeComponent(); InitializeComponent();
#if(DEBUG) //#if(DEBUG)
//Resize+=new EventHandler(AnnotationDetails_Resize); // Debug the resize event //Resize+=new EventHandler(AnnotationDetails_Resize); // Debug the resize event
#endif //#endif
} }
#endregion #endregion

View File

@ -10,7 +10,7 @@ using VEPROMS.CSLA.Library;
using XYPlots; using XYPlots;
using DevComponents.DotNetBar; using DevComponents.DotNetBar;
using System.Text.RegularExpressions; using System.Text.RegularExpressions;
using VG; //using VG;
namespace Volian.Controls.Library namespace Volian.Controls.Library
{ {

View File

@ -863,9 +863,7 @@ namespace Volian.Controls.Library
private void btnSearch_Click(object sender, EventArgs e) private void btnSearch_Click(object sender, EventArgs e)
{ {
#if DEBUG
DateTime start = DateTime.Now; DateTime start = DateTime.Now;
#endif
Cursor savcursor = Cursor; Cursor savcursor = Cursor;
try try
{ {
@ -948,9 +946,8 @@ namespace Volian.Controls.Library
{ {
Cursor = savcursor; Cursor = savcursor;
} }
#if DEBUG if (vlnStackTrace.DebugMode)
MessageBox.Show(string.Format("{0} Milliseconds", TimeSpan.FromTicks(DateTime.Now.Ticks - start.Ticks).TotalMilliseconds)); MessageBox.Show(string.Format("{0} Milliseconds", TimeSpan.FromTicks(DateTime.Now.Ticks - start.Ticks).TotalMilliseconds));
#endif
} }
private void cbxTextSearchText_Leave(object sender, EventArgs e) private void cbxTextSearchText_Leave(object sender, EventArgs e)

View File

@ -46,15 +46,9 @@ namespace Volian.Controls.Library
private Font _SectFont = new Font("Arial", 10, FontStyle.Bold); private Font _SectFont = new Font("Arial", 10, FontStyle.Bold);
private Font _StepFont = new Font("Arial", 10); private Font _StepFont = new Font("Arial", 10);
private Color _ActiveColor = Color.SkyBlue; private Color _ActiveColor = Color.SkyBlue;
#if (DEBUG)
private Color _InactiveColor = Color.Linen; private Color _InactiveColor = Color.Linen;
private Color _TabColor = Color.Beige; private Color _TabColor = Color.Beige;
private Color _PanelColor = Color.LightGray; private Color _PanelColor = Color.LightGray;
#else
private Color _InactiveColor = Color.White;
private Color _TabColor = Color.White;
private Color _PanelColor = Color.White;
#endif
// Whether panel is in view or edit mode. Toggled from steprtb // Whether panel is in view or edit mode. Toggled from steprtb
// or set based on approval/multi-user (these two will be done // or set based on approval/multi-user (these two will be done
// later. // later.
@ -232,27 +226,34 @@ namespace Volian.Controls.Library
public StepPanel() public StepPanel()
{ {
InitializeComponent(); InitializeComponent();
SetupStepPanel();
}
private void SetupStepPanel()
{
this.BackColorChanged += new EventHandler(StepPanel_BackColorChanged); this.BackColorChanged += new EventHandler(StepPanel_BackColorChanged);
#if(DEBUG) if (vlnStackTrace.DebugMode)
{
_InactiveColor = Color.Linen;
_TabColor = Color.Beige;
_PanelColor = Color.LightGray;
this.Paint += new PaintEventHandler(StepPanel_Paint); this.Paint += new PaintEventHandler(StepPanel_Paint);
this.DoubleClick += new EventHandler(StepPanel_DoubleClick); // Toggles Vertical lines on and off this.DoubleClick += new EventHandler(StepPanel_DoubleClick); // Toggles Vertical lines on and off
#else }
else
{
_InactiveColor = Color.White;
_TabColor = Color.White;
_PanelColor = Color.White;
this.BackColor = Color.White; this.BackColor = Color.White;
#endif }
this.AutoScroll = true; this.AutoScroll = true;
} }
public StepPanel(IContainer container) public StepPanel(IContainer container)
{ {
container.Add(this); container.Add(this);
InitializeComponent(); InitializeComponent();
this.BackColorChanged += new EventHandler(StepPanel_BackColorChanged); SetupStepPanel();
#if(DEBUG)
this.Paint += new PaintEventHandler(StepPanel_Paint); // Toggles Vertical lines on and off
this.DoubleClick += new EventHandler(StepPanel_DoubleClick);
#else
this.BackColor = Color.White;
#endif
this.AutoScroll = true;
} }
void StepPanel_BackColorChanged(object sender, EventArgs e) void StepPanel_BackColorChanged(object sender, EventArgs e)
{ {

View File

@ -203,28 +203,18 @@ namespace Volian.Controls.Library
// return; // return;
//} //}
_origDisplayText = vlntxt; _origDisplayText = vlntxt;
#if(DEBUG)
// Use Times New Roman for Debugging
//Font = new Font("Times New Roman", 14, FontStyle.Regular);
//Font = _origDisplayText.TextFont.WindowsFont;
Font formatFont = _origDisplayText.TextFont.WindowsFont; Font formatFont = _origDisplayText.TextFont.WindowsFont;
if (_MyItemInfo.IsTable || _MyItemInfo.IsFigure) if (_MyItemInfo.IsTable || _MyItemInfo.IsFigure)
Font = formatFont; Font = formatFont;
else else
{
if (vlnStackTrace.DebugMode)
Font = new Font(_MyFontFamily == null ? formatFont.FontFamily : _MyFontFamily, formatFont.Size, formatFont.Style); Font = new Font(_MyFontFamily == null ? formatFont.FontFamily : _MyFontFamily, formatFont.Size, formatFont.Style);
//Font = new Font("Bookman Old Style", formatFont.Size, formatFont.Style);
#elif(RELEASE)
Font = _origDisplayText.TextFont.WindowsFont; // font defined in plant's format
#else //DEMO
// Comment this out for DEMO to customer
// UN-Comment this for testing
//Font = _origDisplayText.TextFont.WindowsFont; // font defined in plant's format
Font formatFont = _origDisplayText.TextFont.WindowsFont;
if (_MyItemInfo.IsTable || _MyItemInfo.IsFigure)
Font = formatFont;
else else
Font = new Font("Bookman Old Style", formatFont.Size, formatFont.Style); Font = new Font("Bookman Old Style", formatFont.Size, formatFont.Style);
#endif // TODO: Release Mode
//Font = _origDisplayText.TextFont.WindowsFont; // font defined in plant's format
}
Text = ""; // Initialize text before add text Text = ""; // Initialize text before add text
// IMPORTANT: SetLineSpacing must be set before Links, otherwise it // IMPORTANT: SetLineSpacing must be set before Links, otherwise it
// was confusing the 'handle' of the rtf box. // was confusing the 'handle' of the rtf box.

View File

@ -738,47 +738,47 @@ namespace Volian.Controls.Library
} }
#endregion #endregion
#region RHM debug #region RHM debug
#if DEBUG //#if DEBUG
// The following code generates an XML output for the selected item for print testing. // // The following code generates an XML output for the selected item for print testing.
private void btnPageBreak_Click(object sender, EventArgs e) // private void btnPageBreak_Click(object sender, EventArgs e)
{ // {
// This is here temporarily to get a node and all of it's children for print testing. // // This is here temporarily to get a node and all of it's children for print testing.
OutputAllChildren(MyStepItem); // OutputAllChildren(MyStepItem);
} // }
private void OutputAllChildren(StepItem myStepItem) // private void OutputAllChildren(StepItem myStepItem)
{ // {
OutputAllChildren(myStepItem.MyBeforeStepItems); // OutputAllChildren(myStepItem.MyBeforeStepItems);
OutputStepInfo(myStepItem); // OutputStepInfo(myStepItem);
OutputAllChildren(myStepItem.MyAfterStepItems); // OutputAllChildren(myStepItem.MyAfterStepItems);
OutputAllChildren(myStepItem.MyRNOStepItems); // OutputAllChildren(myStepItem.MyRNOStepItems);
} // }
private void OutputStepInfo(StepItem myStepItem) // private void OutputStepInfo(StepItem myStepItem)
{ // {
Label lbl = myStepItem.MyLabel; // Label lbl = myStepItem.MyLabel;
if (lbl.Text.Trim() != "") // if (lbl.Text.Trim() != "")
Console.WriteLine("<text x='{0}In' y='{1}In' font-family='{2}' font-size='{3}Pt'>{4}</text>", // Console.WriteLine("<text x='{0}In' y='{1}In' font-family='{2}' font-size='{3}Pt'>{4}</text>",
ToInches(myStepItem.Left + lbl.Left), ToInches(myStepItem.Top + lbl.Top), // ToInches(myStepItem.Left + lbl.Left), ToInches(myStepItem.Top + lbl.Top),
lbl.Font.FontFamily.Name,lbl.Font.SizeInPoints,lbl.Text); // lbl.Font.FontFamily.Name,lbl.Font.SizeInPoints,lbl.Text);
StepRTB rtb = myStepItem.MyStepRTB; // StepRTB rtb = myStepItem.MyStepRTB;
Console.WriteLine("<foreignObject x='{0}In' y='{1}In' width='{2}In' " + // Console.WriteLine("<foreignObject x='{0}In' y='{1}In' width='{2}In' " +
"requiredExtensions='http://Volian.Com/EmbeddedRTF'>{3}</foreignObject>", // "requiredExtensions='http://Volian.Com/EmbeddedRTF'>{3}</foreignObject>",
ToInches(myStepItem.Left + rtb.Left), ToInches(myStepItem.Top + rtb.Top), ToInches(rtb.Width), myStepItem.MyItemInfo.MyContent.Text); // ToInches(myStepItem.Left + rtb.Left), ToInches(myStepItem.Top + rtb.Top), ToInches(rtb.Width), myStepItem.MyItemInfo.MyContent.Text);
// ToInches(myStepItem.Left + rtb.Left), ToInches(myStepItem.Top + rtb.Top), ToInches(rtb.Width), rtb.Rtf); //// ToInches(myStepItem.Left + rtb.Left), ToInches(myStepItem.Top + rtb.Top), ToInches(rtb.Width), rtb.Rtf);
} // }
private float ToInches(int val) // private float ToInches(int val)
{ // {
return Convert.ToSingle(val)/96F; // return Convert.ToSingle(val)/96F;
} // }
private void OutputAllChildren(List<StepItem> list) // private void OutputAllChildren(List<StepItem> list)
{ // {
if(list != null) // if(list != null)
foreach (StepItem itm in list) // foreach (StepItem itm in list)
OutputAllChildren(itm); // OutputAllChildren(itm);
} // }
#endif //#endif
private void btnToggleEditView_Click(object sender, EventArgs e) private void btnToggleEditView_Click(object sender, EventArgs e)
{ {
MyStepRTB.ToggleEditView(); MyStepRTB.ToggleEditView();

View File

@ -190,6 +190,12 @@ namespace Volian.Controls.Library
} }
#endif #endif
} }
private static bool _DebugMode = true;
public static bool DebugMode
{
get { return vlnStackTrace._DebugMode; }
set { vlnStackTrace._DebugMode = value; }
}
} }
} }

View File

@ -584,9 +584,9 @@ namespace XYPlots
CalculateSlopes(dataPoints); CalculateSlopes(dataPoints);
else else
LineFlag = STRAIGHT; LineFlag = STRAIGHT;
#if DEBUG //#if DEBUG
ShowPoints(dataPoints); //ShowPoints(dataPoints);
#endif //#endif
AddAPlot(dataPoints); AddAPlot(dataPoints);
} }
private double FindSlope(point first, point last) private double FindSlope(point first, point last)
@ -1219,7 +1219,9 @@ namespace XYPlots
delta2 = delta1 * sin_deg(theta1) / sin_deg(theta2); delta2 = delta1 * sin_deg(theta1) / sin_deg(theta2);
r2 = Math.Floor(0.5 + r2 - delta2); r2 = Math.Floor(0.5 + r2 - delta2);
cp2 = FindModifiedCenter(r2, pt2.APoint, t2); cp2 = FindModifiedCenter(r2, pt2.APoint, t2);
DebugOutput("DrawArc1"); VG_Arc.iColor = 1; //#if DEBUG
//DebugOutput("DrawArc1"); VG_Arc.iColor = 1;
//#endif
DrawArc(r1, t1, t1 + theta1, cp1, x, y, pg, vgOutput); DrawArc(r1, t1, t1 + theta1, cp1, x, y, pg, vgOutput);
DebugShowLocation("DrawArc1"); DebugShowLocation("DrawArc1");
MoveTo(pt2.APoint); MoveTo(pt2.APoint);
@ -1232,7 +1234,9 @@ namespace XYPlots
} }
else else
{ {
DebugOutput("DrawArc2"); VG_Arc.iColor = 2; //#if DEBUG
//DebugOutput("DrawArc2"); VG_Arc.iColor = 2;
//#endif
DrawArc(r2, t2, t2 - theta2, cp2, x, y, pg, vgOutput); DrawArc(r2, t2, t2 - theta2, cp2, x, y, pg, vgOutput);
DebugShowLocation("DrawArc2"); DebugShowLocation("DrawArc2");
} }
@ -1254,8 +1258,10 @@ namespace XYPlots
else else
{ {
//Console.WriteLine("{0},{1},{2},{3},{4},{5},{6},{7},{8},{9}", t3, t3a, t4, t4a, thetaa, t1, t2, r1, r2, aryIdx); //Console.WriteLine("{0},{1},{2},{3},{4},{5},{6},{7},{8},{9}", t3, t3a, t4, t4a, thetaa, t1, t2, r1, r2, aryIdx);
DebugOutput("DrawArc3"); VG_Arc.iColor = 3; //#if DEBUG
VG_Arc.iColor = 4; //DebugOutput("DrawArc3"); VG_Arc.iColor = 3;
//VG_Arc.iColor = 4;
//#endif
DrawArc(r1, t1, t1 + theta1, cp1, x, y, pg, vgOutput); DrawArc(r1, t1, t1 + theta1, cp1, x, y, pg, vgOutput);
//Console.WriteLine("'DrawArc3','{0}',{1},{2}", Key, r1, theta1); //Console.WriteLine("'DrawArc3','{0}',{1},{2}", Key, r1, theta1);
DebugShowLocation("DrawArc3"); DebugShowLocation("DrawArc3");
@ -1290,8 +1296,10 @@ namespace XYPlots
} }
else else
{ {
DebugOutput("DrawArc5"); VG_Arc.iColor = 5; //#if DEBUG
VG_Arc.iColor = 6; //DebugOutput("DrawArc5"); VG_Arc.iColor = 5;
//VG_Arc.iColor = 6;
//#endif
DrawArc(r2, t2, t2 - theta2, cp2, x, y, pg, vgOutput); DrawArc(r2, t2, t2 - theta2, cp2, x, y, pg, vgOutput);
DebugShowLocation("DrawArc5"); DebugShowLocation("DrawArc5");
} }
@ -1789,7 +1797,9 @@ namespace XYPlots
{ {
LoadBuffFromString(PlotCommands); LoadBuffFromString(PlotCommands);
Setup(); Setup();
VG.VG_Arc.iColor = 0; //#if DEBUG
//VG.VG_Arc.iColor = 0;
//#endif
} }
public void Setup() public void Setup()
{ {
@ -1865,21 +1875,21 @@ namespace XYPlots
} }
private void ShowPoints(DataPoints dataPoints) private void ShowPoints(DataPoints dataPoints)
{ {
#if DEBUG //#if DEBUG
foreach (DataPoint pl in dataPoints) //foreach (DataPoint pl in dataPoints)
{ //{
DebugOutput("x={0},y={1},slope={2}", pl.APoint.xyValue[0], pl.APoint.xyValue[1], pl.slope); // DebugOutput("x={0},y={1},slope={2}", pl.APoint.xyValue[0], pl.APoint.xyValue[1], pl.slope);
} //}
#endif //#endif
} }
public static string Key = ""; public static string Key = "";
private void DebugOutput(string format, params object[] args) private void DebugOutput(string format, params object[] args)
{ {
#if DEBUG //#if DEBUG
//if (args.Length == 0) //if (args.Length == 0)
// Console.WriteLine("'{0}','{1}'",Key,format); // Console.WriteLine("'{0}','{1}'",Key,format);
//Console.WriteLine(format, args); //Console.WriteLine(format, args);
#endif //#endif
} }
private void DebugShowLocation(string command) private void DebugShowLocation(string command)
{ {