This commit is contained in:
John Jenko 2010-09-24 12:29:58 +00:00
parent 6604321362
commit ddacbd431f
5 changed files with 45 additions and 24 deletions

View File

@ -58,7 +58,8 @@
</logger>
</log4net>
<appSettings>
<add key="CslaAuthentication" value="Windows" />
<add key ="Debug" value ="true"/>
<add key="CslaAuthentication" value="Windows" />
<!-- Active Connection -->
<!-- Inactive Connections
-->

View File

@ -15,6 +15,7 @@ using vlnObjectLibrary;
using vlnServerLibrary;
using VEPROMS.CSLA.Library;
using Config;
using Volian.Base.Library;
namespace DataLoader
{
@ -80,13 +81,19 @@ namespace DataLoader
{
try
{
#if DEBUG
_FmtAllPath = @"c:\development\fmtall";
_GenmacAllPath = @"c:\development\genmacall";
#else
_FmtAllPath = vepromspath + @"\fmtall";
_GenmacAllPath = vepromspath + @"\genmacall";
#endif
//#if DEBUG
if (VlnSettings.DebugMode)
{
_FmtAllPath = @"c:\development\fmtall";
_GenmacAllPath = @"c:\development\genmacall";
}
//#else
else
{
_FmtAllPath = vepromspath + @"\fmtall";
_GenmacAllPath = vepromspath + @"\genmacall";
}
//#endif
frmMain.Status = "Make Connection";
// make the initial database connection record, annotation types & top
// system folder.

View File

@ -12,6 +12,7 @@ using System;
using System.Collections.Generic;
using System.Text;
using System.Text.RegularExpressions;
using Volian.Base.Library;
namespace DataLoader
{
@ -177,10 +178,13 @@ namespace DataLoader
// Convert dash to a non-breaking dash. This is a unicode character.
// This character will be used in veproms rather than a dash.
//if the dash is preceeded byte a token remove the space following the token
#if DEBUG
if (s2.Contains(@"\super "))
Console.WriteLine("RTF Super token");
#endif
//#if DEBUG
if (VlnSettings.DebugMode)
{
if (s2.Contains(@"\super "))
Console.WriteLine("RTF Super token");
}
//#endif
s2 = Regex.Replace(s2, @"(\\[^ \\?]*) \-", @"$1\u8209?");
s2 = s2.Replace("-", @"\u8209?");
//Remove spaces between comment end nad Next token

View File

@ -4,6 +4,7 @@ using System.Text;
using Volian.Controls.Library;
using VEPROMS.CSLA.Library;
using System.Text.RegularExpressions;
using Volian.Base.Library;
namespace DataLoader
{
@ -105,12 +106,12 @@ namespace DataLoader
if (updatedText != afterText)//|| newStripped != afterText)
myProblems.RTBProblems.Add(item.ItemID, item.MyContent.ContentID, originalText, updatedText, MyStepRTB.Rtf, afterText, item.Path);
}
#if DEBUG
else
//#if DEBUG
else if (VlnSettings.DebugMode)
{
Console.WriteLine("here");
}
#endif
//#endif
}
Status = "Saving problems";
ErrorCount = myProblems.RTBProblems.Count;

View File

@ -10,6 +10,7 @@
using System;
using System.Drawing;
using System.Collections;
using System.Configuration;
using System.ComponentModel;
using System.Windows.Forms;
using System.Data;
@ -105,6 +106,8 @@ namespace DataLoader
public frmLoader()
{
string debugMode = ConfigurationManager.AppSettings["Debug"];
VlnSettings.DebugMode = bool.Parse(debugMode); // set debug for the Volian.Controls.Library
ldr = new Loader(_MyLog, this);
InitializeComponent();
MSWordToPDF.FormForPlotGraphics = this;
@ -137,13 +140,15 @@ namespace DataLoader
//tbSource.Text = @"G:\PromsDat\VEHP1B\SAMGS.PRC";// South Texas STPNOC
break;
default:
#if (!DEBUG)
tbSource.Text = "";
break;
#else
throw new Exception("Not configured for " + SystemInformation.ComputerName);
#endif
}
//#if (!DEBUG)
if (!VlnSettings.DebugMode)
tbSource.Text = "";
else
//#else
throw new Exception("Not configured for " + SystemInformation.ComputerName);
//#endif
}
private void btnConvertSelected_Click(object sender, EventArgs e)
{
@ -234,10 +239,13 @@ namespace DataLoader
private void btnConvert_Click(object sender, System.EventArgs e)
{
if (!CheckLogPath()) return;
#if (!DEBUG)
DialogResult dlgrst = MessageBox.Show("The VE-PROMS data currently in SQL Server (Express) will be deleted.\r\n\nProceed with Data Conversion?", "WARNING", MessageBoxButtons.YesNo, MessageBoxIcon.Warning);
if (dlgrst == DialogResult.No) return;
#endif
//#if (!DEBUG)
if (!VlnSettings.DebugMode)
{
DialogResult dlgrst = MessageBox.Show("The VE-PROMS data currently in SQL Server (Express) will be deleted.\r\n\nProceed with Data Conversion?", "WARNING", MessageBoxButtons.YesNo, MessageBoxIcon.Warning);
if (dlgrst == DialogResult.No) return;
}
//#endif
try
{
//TextConvert.ResetSpecialCharacters();