Skip to content

Commit 8e3194c

Browse files
committed
Fixed save to file checkbox not working (still outputting to file when unchecked)
1 parent 234aad7 commit 8e3194c

File tree

2 files changed

+14
-4
lines changed

2 files changed

+14
-4
lines changed

Virtual_EDW/CustomTabPage.cs

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -71,11 +71,10 @@ class CustomTabPage : TabPage
7171
// Values for the checkboxes from main form
7272
public bool DisplayJsonFlag { get; set; }
7373
public bool GenerateInDatabaseFlag { get; set; }
74-
public bool SaveOutputFileFlag { get; set; }
74+
public bool SaveOutputFileFlag { get; set; } = false;
7575

7676
internal bool StartUpIndicator = true;
77-
78-
77+
7978
/// <summary>
8079
/// Function can be called from the main form as well this wya.
8180
/// </summary>
@@ -114,7 +113,7 @@ public CustomTabPage(string classification, string notes, Dictionary<string, VDW
114113

115114
DisplayJsonFlag = true;
116115
GenerateInDatabaseFlag = true;
117-
SaveOutputFileFlag = true;
116+
SaveOutputFileFlag = false;
118117

119118
#region Main Tab Page
120119

@@ -566,6 +565,9 @@ void DoWork()
566565
/// </summary>
567566
private void GenerateFromTemplate()
568567
{
568+
// Workaround for file output spool
569+
//if (this.SaveOutputFileFlag)
570+
569571
// Establish the current time at the start of generation, to display only messages related to the current generation run.
570572
var currentTime = DateTime.Now;
571573

Virtual_EDW/Form_Main.cs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -159,6 +159,7 @@ public FormMain()
159159
// Start monitoring the configuration directories for file changes
160160
RunFileWatcher();
161161

162+
CheckSaveToFileState();
162163
startUpIndicator = false;
163164
}
164165

@@ -927,6 +928,13 @@ private void checkBoxGenerateJsonSchema_CheckedChanged(object sender, EventArgs
927928

928929
private void checkBoxSaveToFile_CheckedChanged(object sender, EventArgs e)
929930
{
931+
CheckSaveToFileState();
932+
}
933+
934+
private void CheckSaveToFileState()
935+
{
936+
var test = checkBoxSaveToFile.CheckState;
937+
930938
foreach (CustomTabPage localTabPage in localCustomTabPageList)
931939
{
932940
if (checkBoxSaveToFile.Checked)

0 commit comments

Comments
 (0)