This commit is contained in:
@@ -62,6 +62,7 @@
|
||||
</logger>
|
||||
</log4net>
|
||||
<appSettings>
|
||||
<add key ="Debug" value ="true"/>
|
||||
<add key="CslaAuthentication" value="Windows" />
|
||||
<!--
|
||||
<add key="CslaDataPortalProxy"
|
||||
|
@@ -8,6 +8,7 @@ using System.Drawing;
|
||||
using System.Text;
|
||||
using System.Windows.Forms;
|
||||
using System.IO;
|
||||
using System.Configuration;
|
||||
using VEPROMS.CSLA.Library;
|
||||
//using Csla;
|
||||
using DevComponents;
|
||||
@@ -87,32 +88,33 @@ namespace VEPROMS
|
||||
#endregion
|
||||
public frmVEPROMS()
|
||||
{
|
||||
#if (DEBUG)
|
||||
//use local data (for development/debug mode)
|
||||
if (Environment.MachineName == "RMARK-PC")
|
||||
VEPROMS.CSLA.Library.Database.ConnectionName = "VEPROMS_RMARK_DEBUG";
|
||||
if (vlnStackTrace.DebugMode)
|
||||
{
|
||||
//use local data (for development/debug mode)
|
||||
if (Environment.MachineName == "RMARK-PC")
|
||||
VEPROMS.CSLA.Library.Database.ConnectionName = "VEPROMS_RMARK_DEBUG";
|
||||
else
|
||||
VEPROMS.CSLA.Library.Database.ConnectionName = "VEPROMS_LOCAL";
|
||||
}
|
||||
else
|
||||
VEPROMS.CSLA.Library.Database.ConnectionName = "VEPROMS_LOCAL";
|
||||
#else
|
||||
// use server data (default)
|
||||
// - except for the volian laptop and Rich's Demo version where we need to use local data
|
||||
if (Environment.MachineName == "RMARK-PC")
|
||||
VEPROMS.CSLA.Library.Database.ConnectionName = "VEPROMS_RMARK_DEMO";
|
||||
//else if (Environment.MachineName == "DELL-D430")
|
||||
// VEPROMS.CSLA.Library.Database.ConnectionName = "VEPROMS_LOCAL";
|
||||
//else
|
||||
// VEPROMS.CSLA.Library.Database.ConnectionName = "VEPROMS";
|
||||
else
|
||||
VEPROMS.CSLA.Library.Database.ConnectionName = "VEPROMS_LOCAL";
|
||||
|
||||
#endif
|
||||
{
|
||||
// use server data (default)
|
||||
// - except for the volian laptop and Rich's Demo version where we need to use local data
|
||||
if (Environment.MachineName == "RMARK-PC")
|
||||
VEPROMS.CSLA.Library.Database.ConnectionName = "VEPROMS_RMARK_DEMO";
|
||||
//else if (Environment.MachineName == "DELL-D430")
|
||||
// VEPROMS.CSLA.Library.Database.ConnectionName = "VEPROMS_LOCAL";
|
||||
//else
|
||||
// VEPROMS.CSLA.Library.Database.ConnectionName = "VEPROMS";
|
||||
else
|
||||
VEPROMS.CSLA.Library.Database.ConnectionName = "VEPROMS_LOCAL";
|
||||
}
|
||||
InitializeComponent();
|
||||
|
||||
// When creating an XY Plot, a System.Drawing.Graphics is needed and it requires a form. Use the main
|
||||
// form.
|
||||
#if (DEBUG)
|
||||
MSWordToPDF.OverrideColor = Color.Red;
|
||||
#endif
|
||||
if (vlnStackTrace.DebugMode)
|
||||
MSWordToPDF.OverrideColor = Color.Red;
|
||||
MSWordToPDF.FormForPlotGraphics = this;
|
||||
|
||||
// set the color of the ribbon
|
||||
@@ -181,6 +183,8 @@ namespace VEPROMS
|
||||
}
|
||||
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
|
||||
if (Settings.Default["Location"] != null) this.Location = Settings.Default.Location;
|
||||
if (Settings.Default["Size"] != null) this.Size = Settings.Default.Size;
|
||||
@@ -200,12 +204,12 @@ namespace VEPROMS
|
||||
}
|
||||
private void SetupButtons()
|
||||
{
|
||||
#if (DEBUG)
|
||||
#else
|
||||
lblItemID.Visible = false;
|
||||
btnItemInfo.Visible = false;
|
||||
cmbFont.Visible = false;
|
||||
#endif
|
||||
if (!vlnStackTrace.DebugMode)
|
||||
{
|
||||
lblItemID.Visible = false;
|
||||
btnItemInfo.Visible = false;
|
||||
cmbFont.Visible = false;
|
||||
}
|
||||
}
|
||||
#region MRU
|
||||
private MostRecentItemList _MyMRIList;
|
||||
@@ -242,11 +246,6 @@ namespace VEPROMS
|
||||
//SaveMRU();
|
||||
SetupMRU();
|
||||
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()
|
||||
{
|
||||
@@ -560,11 +559,10 @@ namespace VEPROMS
|
||||
/// <param name="args"></param>
|
||||
void tn_LoadingChildernDone(object sender, VETreeNodeEventArgs args)
|
||||
{
|
||||
#if (DEBUG)
|
||||
ProgBarText = args.Info + " Seconds";
|
||||
#else
|
||||
ProgBarText = "";
|
||||
#endif
|
||||
if (vlnStackTrace.DebugMode)
|
||||
ProgBarText = args.Info + " Seconds";
|
||||
else
|
||||
ProgBarText = "";
|
||||
}
|
||||
|
||||
public int ProgBarMax
|
||||
|
Reference in New Issue
Block a user