Skip to content

Commit

Permalink
issue #50: Add flag to manage calculation of scenario 2
Browse files Browse the repository at this point in the history
  • Loading branch information
lbross committed Aug 17, 2018
1 parent 10f3094 commit f2a7322
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
6 changes: 2 additions & 4 deletions src/Maps_Tables/FrmPsuedoSite.vb
Original file line number Diff line number Diff line change
Expand Up @@ -2014,11 +2014,9 @@ Public Class FrmPsuedoSite
Dim siteScenarioForm As frmSiteScenario = dockWindowAddIn.UI
'1. Check box on frmSiteScenario
siteScenarioForm.SelectPseudoSite(m_siteId)
'2. Set recalculate rep area
siteScenarioForm.CalculateScenario2Flag = False
'3. Disable site scenario maps after calculation for speed
'2. Disable site scenario maps after calculation for speed
siteScenarioForm.DisplayScenarioMapsFlag = False
'4. Click BtnCalculate on Site Scenario form
'3. Click BtnCalculate on Site Scenario form
siteScenarioForm.BtnCalculate.PerformClick()
'Enable/disable buttons
BtnRecalculate.Enabled = False 'We just recalculated; Don't need to do it again
Expand Down
6 changes: 5 additions & 1 deletion src/Maps_Tables/frmSiteScenario.vb
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ Public Class frmSiteScenario
Friend idxUpper As Integer = 5
Friend idxLower As Integer = 6
Friend idxDefaultElevation As Integer = 7
Private m_calculateScenario2 As Boolean = True
Private m_calculateScenario2 As Boolean = False
Private m_displayScenarioMaps As Boolean = True

Public Sub New(ByVal hook As Object)
Expand Down Expand Up @@ -143,6 +143,7 @@ Public Class frmSiteScenario
GrdScenario2.Rows.Add(item)
End If
Next
m_calculateScenario2 = True
Catch ex As Exception
Debug.Print("BtnAddAll_Click Exception: " & ex.Message)
End Try
Expand Down Expand Up @@ -1093,6 +1094,7 @@ Public Class frmSiteScenario
idxList.Add(pCell.RowIndex)
End If
Next
m_calculateScenario2 = True
Catch ex As Exception
Debug.Print("BtnAddSite_Click Exception: " & ex.Message)
End Try
Expand All @@ -1112,13 +1114,15 @@ Public Class frmSiteScenario
For Each dRow As DataGridViewRow In deleteList
GrdScenario2.Rows.Remove(dRow)
Next
m_calculateScenario2 = True
Catch ex As Exception
Debug.Print("BtnRemoveSite Exception: " & ex.Message)
End Try
End Sub

Private Sub BtnRemoveAll_Click(sender As System.Object, e As System.EventArgs) Handles BtnRemoveAll.Click
GrdScenario2.Rows.Clear()
m_calculateScenario2 = True
End Sub

Private Sub BtnToggleSel_Click(sender As System.Object, e As System.EventArgs) Handles BtnToggleSel.Click
Expand Down

0 comments on commit f2a7322

Please sign in to comment.