From d2ee48a4bc951da2a471ba29331bf18ad025f2b0 Mon Sep 17 00:00:00 2001 From: Vitalis95 Date: Tue, 17 May 2022 15:48:52 +0300 Subject: [PATCH 1/9] reset changes --- instat/dlgClimaticSummary.Designer.vb | 12 +++--- instat/dlgClimaticSummary.vb | 56 +++++++++++++++++++-------- 2 files changed, 45 insertions(+), 23 deletions(-) diff --git a/instat/dlgClimaticSummary.Designer.vb b/instat/dlgClimaticSummary.Designer.vb index 51473a9e87f..323ecef3d49 100644 --- a/instat/dlgClimaticSummary.Designer.vb +++ b/instat/dlgClimaticSummary.Designer.vb @@ -79,7 +79,7 @@ Partial Class dlgClimaticSummary Me.rdoAnnual.FlatAppearance.CheckedBackColor = System.Drawing.SystemColors.ActiveCaption Me.rdoAnnual.FlatStyle = System.Windows.Forms.FlatStyle.Flat Me.rdoAnnual.ImeMode = System.Windows.Forms.ImeMode.NoControl - Me.rdoAnnual.Location = New System.Drawing.Point(71, 14) + Me.rdoAnnual.Location = New System.Drawing.Point(12, 14) Me.rdoAnnual.Name = "rdoAnnual" Me.rdoAnnual.Size = New System.Drawing.Size(67, 27) Me.rdoAnnual.TabIndex = 1 @@ -96,7 +96,7 @@ Partial Class dlgClimaticSummary Me.rdoWithinYear.FlatAppearance.CheckedBackColor = System.Drawing.SystemColors.ActiveCaption Me.rdoWithinYear.FlatStyle = System.Windows.Forms.FlatStyle.Flat Me.rdoWithinYear.ImeMode = System.Windows.Forms.ImeMode.NoControl - Me.rdoWithinYear.Location = New System.Drawing.Point(222, 14) + Me.rdoWithinYear.Location = New System.Drawing.Point(151, 14) Me.rdoWithinYear.Name = "rdoWithinYear" Me.rdoWithinYear.Size = New System.Drawing.Size(88, 27) Me.rdoWithinYear.TabIndex = 3 @@ -113,7 +113,7 @@ Partial Class dlgClimaticSummary Me.rdoAnnualWithinYear.FlatAppearance.CheckedBackColor = System.Drawing.SystemColors.ActiveCaption Me.rdoAnnualWithinYear.FlatStyle = System.Windows.Forms.FlatStyle.Flat Me.rdoAnnualWithinYear.ImeMode = System.Windows.Forms.ImeMode.NoControl - Me.rdoAnnualWithinYear.Location = New System.Drawing.Point(136, 14) + Me.rdoAnnualWithinYear.Location = New System.Drawing.Point(72, 14) Me.rdoAnnualWithinYear.Name = "rdoAnnualWithinYear" Me.rdoAnnualWithinYear.Size = New System.Drawing.Size(88, 27) Me.rdoAnnualWithinYear.TabIndex = 2 @@ -283,7 +283,7 @@ Partial Class dlgClimaticSummary Me.rdoStation.FlatAppearance.CheckedBackColor = System.Drawing.SystemColors.ActiveCaption Me.rdoStation.FlatStyle = System.Windows.Forms.FlatStyle.Flat Me.rdoStation.ImeMode = System.Windows.Forms.ImeMode.NoControl - Me.rdoStation.Location = New System.Drawing.Point(12, 14) + Me.rdoStation.Location = New System.Drawing.Point(308, 14) Me.rdoStation.Name = "rdoStation" Me.rdoStation.Size = New System.Drawing.Size(61, 27) Me.rdoStation.TabIndex = 22 @@ -300,7 +300,7 @@ Partial Class dlgClimaticSummary Me.rdoDaily.FlatAppearance.CheckedBackColor = System.Drawing.SystemColors.ActiveCaption Me.rdoDaily.FlatStyle = System.Windows.Forms.FlatStyle.Flat Me.rdoDaily.ImeMode = System.Windows.Forms.ImeMode.NoControl - Me.rdoDaily.Location = New System.Drawing.Point(308, 14) + Me.rdoDaily.Location = New System.Drawing.Point(224, 14) Me.rdoDaily.Name = "rdoDaily" Me.rdoDaily.Size = New System.Drawing.Size(88, 27) Me.rdoDaily.TabIndex = 23 @@ -416,7 +416,7 @@ Partial Class dlgClimaticSummary Me.ucrBase.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink Me.ucrBase.Location = New System.Drawing.Point(5, 422) Me.ucrBase.Name = "ucrBase" - Me.ucrBase.Size = New System.Drawing.Size(405, 52) + Me.ucrBase.Size = New System.Drawing.Size(408, 52) Me.ucrBase.TabIndex = 21 ' 'ucrPnlAnnualWithin diff --git a/instat/dlgClimaticSummary.vb b/instat/dlgClimaticSummary.vb index 5fc1d2f3675..a48d37ef3a7 100644 --- a/instat/dlgClimaticSummary.vb +++ b/instat/dlgClimaticSummary.vb @@ -22,7 +22,10 @@ Public Class dlgClimaticSummary Private iReceiverMaxY As Integer Private iReceiverLabelMaxY As Integer Private bResetSubdialog As Boolean = False - Private clsDefaultFunction, clsConcFunction, clsSummariesList, clsDefaultFactors, clsDayFilterCalc, clsDayFilterCalcFromConvert, clsDayFilterCalcFromList, clsAddDateFunction As New RFunction + Private clsDefaultFunction, clsConcFunction, clsSummariesList, + clsDefaultFactors, clsDayFilterCalc, clsDayFilterCalcFromConvert, + clsDayFilterCalcFromList, clsAddDateFunction, + clsDummyFunction As New RFunction Private clsFromAndToConditionOperator, clsFromConditionOperator, clsToConditionOperator As New ROperator Private Sub dlgClimaticSummary_Load(sender As Object, e As EventArgs) Handles MyBase.Load @@ -65,21 +68,27 @@ Public Class dlgClimaticSummary ucrPnlAnnualWithin.AddRadioButton(rdoStation) ucrPnlAnnualWithin.AddRadioButton(rdoDaily) - ucrPnlAnnualWithin.AddParameterPresentCondition(rdoAnnual, "year", True) - ucrPnlAnnualWithin.AddParameterPresentCondition(rdoAnnual, "within_variable", False) - ucrPnlAnnualWithin.AddParameterPresentCondition(rdoAnnual, "date", False) - ucrPnlAnnualWithin.AddParameterPresentCondition(rdoAnnualWithinYear, "within_variable", True) - ucrPnlAnnualWithin.AddParameterPresentCondition(rdoAnnualWithinYear, "year", True) - ucrPnlAnnualWithin.AddParameterPresentCondition(rdoAnnualWithinYear, "date", False) - ucrPnlAnnualWithin.AddParameterPresentCondition(rdoWithinYear, "within_variable", True) - ucrPnlAnnualWithin.AddParameterPresentCondition(rdoWithinYear, "year", False) - ucrPnlAnnualWithin.AddParameterPresentCondition(rdoWithinYear, "date", False) - ucrPnlAnnualWithin.AddParameterPresentCondition(rdoStation, "within_variable", False) - ucrPnlAnnualWithin.AddParameterPresentCondition(rdoStation, "year", False) - ucrPnlAnnualWithin.AddParameterPresentCondition(rdoStation, "date", False) - ucrPnlAnnualWithin.AddParameterPresentCondition(rdoDaily, "within_variable", False) - ucrPnlAnnualWithin.AddParameterPresentCondition(rdoDaily, "year", False) - ucrPnlAnnualWithin.AddParameterPresentCondition(rdoDaily, "date", True) + 'ucrPnlAnnualWithin.AddParameterPresentCondition(rdoAnnual, "year", True) + 'ucrPnlAnnualWithin.AddParameterPresentCondition(rdoAnnual, "within_variable", False) + 'ucrPnlAnnualWithin.AddParameterPresentCondition(rdoAnnual, "date", False) + 'ucrPnlAnnualWithin.AddParameterPresentCondition(rdoAnnualWithinYear, "within_variable", True) + 'ucrPnlAnnualWithin.AddParameterPresentCondition(rdoAnnualWithinYear, "year", True) + 'ucrPnlAnnualWithin.AddParameterPresentCondition(rdoAnnualWithinYear, "date", False) + 'ucrPnlAnnualWithin.AddParameterPresentCondition(rdoWithinYear, "within_variable", True) + 'ucrPnlAnnualWithin.AddParameterPresentCondition(rdoWithinYear, "year", False) + 'ucrPnlAnnualWithin.AddParameterPresentCondition(rdoWithinYear, "date", False) + 'ucrPnlAnnualWithin.AddParameterPresentCondition(rdoStation, "within_variable", False) + 'ucrPnlAnnualWithin.AddParameterPresentCondition(rdoStation, "year", False) + 'ucrPnlAnnualWithin.AddParameterPresentCondition(rdoStation, "date", False) + 'ucrPnlAnnualWithin.AddParameterPresentCondition(rdoDaily, "within_variable", False) + 'ucrPnlAnnualWithin.AddParameterPresentCondition(rdoDaily, "year", False) + 'ucrPnlAnnualWithin.AddParameterPresentCondition(rdoDaily, "date", True) + + ucrPnlAnnualWithin.AddParameterValuesCondition(rdoAnnual, "checked", "annual") + ucrPnlAnnualWithin.AddParameterValuesCondition(rdoAnnualWithinYear, "checked", "annual_within_year") + ucrPnlAnnualWithin.AddParameterValuesCondition(rdoWithinYear, "checked", "within_year") + ucrPnlAnnualWithin.AddParameterValuesCondition(rdoStation, "checked", "station") + ucrPnlAnnualWithin.AddParameterValuesCondition(rdoDaily, "checked", "daily") 'receivers: ' by receivers @@ -167,6 +176,7 @@ Public Class dlgClimaticSummary clsDefaultFactors = New RFunction clsConcFunction = New RFunction clsAddDateFunction = New RFunction + clsDummyFunction = New RFunction clsFromAndToConditionOperator = New ROperator clsDayFilterCalc = New RFunction @@ -183,6 +193,8 @@ Public Class dlgClimaticSummary ucrSelectorVariable.Reset() ucrReceiverElements.SetMeAsReceiver() + clsDummyFunction.AddParameter("checked", "annual", iPosition:=0) + 'TODO: this changes to from >= receiver and to <= receiver if annual-variable is checekd. clsFromAndToConditionOperator.bToScriptAsRString = True clsDayFilterCalc.SetRCommand("instat_calculation$new") @@ -239,7 +251,8 @@ Public Class dlgClimaticSummary ucrChkOmitMissing.SetRCode(clsDefaultFunction, bReset) ucrReceiverDate.SetRCode(clsAddDateFunction, bReset) - ucrPnlAnnualWithin.SetRCode(clsDefaultFactors, bReset) + ucrPnlAnnualWithin.SetRCode(clsDummyFunction, bReset) + 'ucrPnlAnnualWithin.SetRCode(clsDefaultFunction, bReset) End Sub 'TODO: run these things at the correct times @@ -333,6 +346,10 @@ Public Class dlgClimaticSummary sdgMissingOptions.ShowDialog() End Sub + Private Sub Receivers_controlValueChanged(ucrChangedControl As ucrCore) Handles ucrReceiverYear.ControlValueChanged, ucrReceiverWithinYear.ControlValueChanged, ucrReceiverStation.ControlValueChanged, ucrReceiverElements.ControlValueChanged + + End Sub + Private Sub ucrReceiverStation_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrReceiverDOY.ControlValueChanged, ucrSelectorVariable.ControlValueChanged, ucrChkAddDateColumn.ControlValueChanged, ucrReceiverDate.ControlValueChanged If Not ucrReceiverDOY.IsEmpty Then clsDayFilterCalcFromList.AddParameter(ucrSelectorVariable.ucrAvailableDataFrames.cboAvailableDataFrames.Text, strParameterValue:=ucrReceiverDOY.GetVariableNames(), iPosition:=0) @@ -385,22 +402,27 @@ Public Class dlgClimaticSummary End If If rdoAnnual.Checked Then + clsDummyFunction.AddParameter("checked", "annual", iPosition:=0) clsDefaultFactors.RemoveParameterByName("within_variable") clsDefaultFactors.RemoveParameterByName("date") clsDefaultFactors.AddParameter(ucrReceiverYear.GetParameter()) ElseIf rdoAnnualWithinYear.Checked Then + clsDummyFunction.AddParameter("checked", "annual_within_year", iPosition:=0) clsDefaultFactors.AddParameter(ucrReceiverWithinYear.GetParameter()) clsDefaultFactors.AddParameter(ucrReceiverYear.GetParameter()) clsDefaultFactors.RemoveParameterByName("date") ElseIf rdoWithinYear.Checked Then + clsDummyFunction.AddParameter("checked", "within_year", iPosition:=0) clsDefaultFactors.RemoveParameterByName("year") clsDefaultFactors.AddParameter(ucrReceiverWithinYear.GetParameter()) clsDefaultFactors.RemoveParameterByName("date") ElseIf rdoStation.Checked Then + clsDummyFunction.AddParameter("checked", "station", iPosition:=0) clsDefaultFactors.RemoveParameterByName("within_variable") clsDefaultFactors.RemoveParameterByName("year") clsDefaultFactors.RemoveParameterByName("date") ElseIf rdoDaily.Checked Then + clsDummyFunction.AddParameter("checked", "daily", iPosition:=0) clsDefaultFactors.RemoveParameterByName("within_variable") clsDefaultFactors.RemoveParameterByName("year") clsDefaultFactors.AddParameter("date", ucrReceiverDate.GetVariableNames(), iPosition:=1, bIncludeArgumentName:=False) From 8c78c14fd5331f6c7a3564ae7dffae9392140592 Mon Sep 17 00:00:00 2001 From: Vitalis95 Date: Tue, 17 May 2022 15:58:59 +0300 Subject: [PATCH 2/9] code cleaning --- instat/dlgClimaticSummary.Designer.vb | 8 ++++---- instat/dlgClimaticSummary.vb | 17 ----------------- 2 files changed, 4 insertions(+), 21 deletions(-) diff --git a/instat/dlgClimaticSummary.Designer.vb b/instat/dlgClimaticSummary.Designer.vb index 323ecef3d49..db0a186ca7a 100644 --- a/instat/dlgClimaticSummary.Designer.vb +++ b/instat/dlgClimaticSummary.Designer.vb @@ -96,7 +96,7 @@ Partial Class dlgClimaticSummary Me.rdoWithinYear.FlatAppearance.CheckedBackColor = System.Drawing.SystemColors.ActiveCaption Me.rdoWithinYear.FlatStyle = System.Windows.Forms.FlatStyle.Flat Me.rdoWithinYear.ImeMode = System.Windows.Forms.ImeMode.NoControl - Me.rdoWithinYear.Location = New System.Drawing.Point(151, 14) + Me.rdoWithinYear.Location = New System.Drawing.Point(163, 14) Me.rdoWithinYear.Name = "rdoWithinYear" Me.rdoWithinYear.Size = New System.Drawing.Size(88, 27) Me.rdoWithinYear.TabIndex = 3 @@ -113,7 +113,7 @@ Partial Class dlgClimaticSummary Me.rdoAnnualWithinYear.FlatAppearance.CheckedBackColor = System.Drawing.SystemColors.ActiveCaption Me.rdoAnnualWithinYear.FlatStyle = System.Windows.Forms.FlatStyle.Flat Me.rdoAnnualWithinYear.ImeMode = System.Windows.Forms.ImeMode.NoControl - Me.rdoAnnualWithinYear.Location = New System.Drawing.Point(72, 14) + Me.rdoAnnualWithinYear.Location = New System.Drawing.Point(77, 14) Me.rdoAnnualWithinYear.Name = "rdoAnnualWithinYear" Me.rdoAnnualWithinYear.Size = New System.Drawing.Size(88, 27) Me.rdoAnnualWithinYear.TabIndex = 2 @@ -300,9 +300,9 @@ Partial Class dlgClimaticSummary Me.rdoDaily.FlatAppearance.CheckedBackColor = System.Drawing.SystemColors.ActiveCaption Me.rdoDaily.FlatStyle = System.Windows.Forms.FlatStyle.Flat Me.rdoDaily.ImeMode = System.Windows.Forms.ImeMode.NoControl - Me.rdoDaily.Location = New System.Drawing.Point(224, 14) + Me.rdoDaily.Location = New System.Drawing.Point(249, 14) Me.rdoDaily.Name = "rdoDaily" - Me.rdoDaily.Size = New System.Drawing.Size(88, 27) + Me.rdoDaily.Size = New System.Drawing.Size(63, 27) Me.rdoDaily.TabIndex = 23 Me.rdoDaily.TabStop = True Me.rdoDaily.Text = "Daily" diff --git a/instat/dlgClimaticSummary.vb b/instat/dlgClimaticSummary.vb index a48d37ef3a7..f19b7eeb135 100644 --- a/instat/dlgClimaticSummary.vb +++ b/instat/dlgClimaticSummary.vb @@ -68,22 +68,6 @@ Public Class dlgClimaticSummary ucrPnlAnnualWithin.AddRadioButton(rdoStation) ucrPnlAnnualWithin.AddRadioButton(rdoDaily) - 'ucrPnlAnnualWithin.AddParameterPresentCondition(rdoAnnual, "year", True) - 'ucrPnlAnnualWithin.AddParameterPresentCondition(rdoAnnual, "within_variable", False) - 'ucrPnlAnnualWithin.AddParameterPresentCondition(rdoAnnual, "date", False) - 'ucrPnlAnnualWithin.AddParameterPresentCondition(rdoAnnualWithinYear, "within_variable", True) - 'ucrPnlAnnualWithin.AddParameterPresentCondition(rdoAnnualWithinYear, "year", True) - 'ucrPnlAnnualWithin.AddParameterPresentCondition(rdoAnnualWithinYear, "date", False) - 'ucrPnlAnnualWithin.AddParameterPresentCondition(rdoWithinYear, "within_variable", True) - 'ucrPnlAnnualWithin.AddParameterPresentCondition(rdoWithinYear, "year", False) - 'ucrPnlAnnualWithin.AddParameterPresentCondition(rdoWithinYear, "date", False) - 'ucrPnlAnnualWithin.AddParameterPresentCondition(rdoStation, "within_variable", False) - 'ucrPnlAnnualWithin.AddParameterPresentCondition(rdoStation, "year", False) - 'ucrPnlAnnualWithin.AddParameterPresentCondition(rdoStation, "date", False) - 'ucrPnlAnnualWithin.AddParameterPresentCondition(rdoDaily, "within_variable", False) - 'ucrPnlAnnualWithin.AddParameterPresentCondition(rdoDaily, "year", False) - 'ucrPnlAnnualWithin.AddParameterPresentCondition(rdoDaily, "date", True) - ucrPnlAnnualWithin.AddParameterValuesCondition(rdoAnnual, "checked", "annual") ucrPnlAnnualWithin.AddParameterValuesCondition(rdoAnnualWithinYear, "checked", "annual_within_year") ucrPnlAnnualWithin.AddParameterValuesCondition(rdoWithinYear, "checked", "within_year") @@ -252,7 +236,6 @@ Public Class dlgClimaticSummary ucrReceiverDate.SetRCode(clsAddDateFunction, bReset) ucrPnlAnnualWithin.SetRCode(clsDummyFunction, bReset) - 'ucrPnlAnnualWithin.SetRCode(clsDefaultFunction, bReset) End Sub 'TODO: run these things at the correct times From 449496f8bd1afdcc778e71af898e79b9eea6c3ef Mon Sep 17 00:00:00 2001 From: Vitalis95 Date: Tue, 17 May 2022 16:07:33 +0300 Subject: [PATCH 3/9] code cleaning --- instat/dlgClimaticSummary.vb | 4 ---- 1 file changed, 4 deletions(-) diff --git a/instat/dlgClimaticSummary.vb b/instat/dlgClimaticSummary.vb index f19b7eeb135..b331e8c4830 100644 --- a/instat/dlgClimaticSummary.vb +++ b/instat/dlgClimaticSummary.vb @@ -329,10 +329,6 @@ Public Class dlgClimaticSummary sdgMissingOptions.ShowDialog() End Sub - Private Sub Receivers_controlValueChanged(ucrChangedControl As ucrCore) Handles ucrReceiverYear.ControlValueChanged, ucrReceiverWithinYear.ControlValueChanged, ucrReceiverStation.ControlValueChanged, ucrReceiverElements.ControlValueChanged - - End Sub - Private Sub ucrReceiverStation_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrReceiverDOY.ControlValueChanged, ucrSelectorVariable.ControlValueChanged, ucrChkAddDateColumn.ControlValueChanged, ucrReceiverDate.ControlValueChanged If Not ucrReceiverDOY.IsEmpty Then clsDayFilterCalcFromList.AddParameter(ucrSelectorVariable.ucrAvailableDataFrames.cboAvailableDataFrames.Text, strParameterValue:=ucrReceiverDOY.GetVariableNames(), iPosition:=0) From 49af9bdb76fd875ca6ceefc6c59c4a6b917cf3cf Mon Sep 17 00:00:00 2001 From: Antoine Ntalumeso Date: Tue, 17 May 2022 17:48:30 +0300 Subject: [PATCH 4/9] Minor code change --- instat/dlgSaveAs.vb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/instat/dlgSaveAs.vb b/instat/dlgSaveAs.vb index c6766389fc2..4c8f57f94a3 100644 --- a/instat/dlgSaveAs.vb +++ b/instat/dlgSaveAs.vb @@ -76,7 +76,7 @@ Public Class dlgSaveAs Private Sub ucrBase_ClickOk(sender As Object, e As EventArgs) Handles ucrBase.ClickOk frmMain.strSaveFilePath = ucrFilePath.FilePath frmMain.clsRecentItems.addToMenu(Replace(ucrFilePath.FilePath, "\", "/")) - frmMain.bDataSaved = True + 'frmMain.bDataSaved = True End Sub Private Sub ucrFilePath_FilePathChanged() Handles ucrFilePath.FilePathChanged From 43ff6db4537037fe8907cec95631e7a0961b2d2c Mon Sep 17 00:00:00 2001 From: Antoine Ntalumeso Date: Wed, 18 May 2022 16:48:35 +0300 Subject: [PATCH 5/9] Minor code change --- instat/dlgSaveAs.vb | 2 +- instat/frmMain.vb | 16 ++++++++-------- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/instat/dlgSaveAs.vb b/instat/dlgSaveAs.vb index 4c8f57f94a3..c6766389fc2 100644 --- a/instat/dlgSaveAs.vb +++ b/instat/dlgSaveAs.vb @@ -76,7 +76,7 @@ Public Class dlgSaveAs Private Sub ucrBase_ClickOk(sender As Object, e As EventArgs) Handles ucrBase.ClickOk frmMain.strSaveFilePath = ucrFilePath.FilePath frmMain.clsRecentItems.addToMenu(Replace(ucrFilePath.FilePath, "\", "/")) - 'frmMain.bDataSaved = True + frmMain.bDataSaved = True End Sub Private Sub ucrFilePath_FilePathChanged() Handles ucrFilePath.FilePathChanged diff --git a/instat/frmMain.vb b/instat/frmMain.vb index bc2553eada4..54add3d91ec 100644 --- a/instat/frmMain.vb +++ b/instat/frmMain.vb @@ -71,7 +71,7 @@ Public Class frmMain ''' it's set to false by ucrDataView control when state of data has been changed ''' it's set to true by dlgSaveAs dialog and save menu when data has been successfully saved ''' - Public Property bDataSaved As Boolean = False + Public Property bDataSaved As Boolean Private strCurrLang As String Public Sub New() @@ -1566,13 +1566,13 @@ Public Class frmMain End Sub Private Sub mnuFileCloseData_Click(sender As Object, e As EventArgs) Handles mnuFileCloseData.Click - If Not bDataSaved Then - If ucrDataViewer.GetWorkSheetCount() = 0 OrElse DialogResult.Yes = MsgBox("Are you sure you want to close your data?" & - Environment.NewLine & "Any unsaved changes will be lost.", - MessageBoxButtons.YesNo, "Close Data") Then - clsRLink.CloseData() - strSaveFilePath = "" - End If + If (Not bDataSaved AndAlso ucrDataViewer.GetWorkSheetCount() > 0 _ + AndAlso DialogResult.Yes = MsgBox("Are you sure you want to close your data?" & + Environment.NewLine & "Any unsaved changes will be lost.", + MessageBoxButtons.YesNo, "Close Data")) _ + OrElse bDataSaved Then + clsRLink.CloseData() + strSaveFilePath = "" End If End Sub From cab517f7c0b9a0ae7ef59d9a9ac85ca9075f3591 Mon Sep 17 00:00:00 2001 From: Antoine Ntalumeso Date: Thu, 19 May 2022 10:03:33 +0300 Subject: [PATCH 6/9] Minor code change --- instat/frmMain.vb | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/instat/frmMain.vb b/instat/frmMain.vb index 54add3d91ec..371fc386366 100644 --- a/instat/frmMain.vb +++ b/instat/frmMain.vb @@ -71,7 +71,7 @@ Public Class frmMain ''' it's set to false by ucrDataView control when state of data has been changed ''' it's set to true by dlgSaveAs dialog and save menu when data has been successfully saved ''' - Public Property bDataSaved As Boolean + Public Property bDataSaved As Boolean = False Private strCurrLang As String Public Sub New() @@ -1566,14 +1566,19 @@ Public Class frmMain End Sub Private Sub mnuFileCloseData_Click(sender As Object, e As EventArgs) Handles mnuFileCloseData.Click - If (Not bDataSaved AndAlso ucrDataViewer.GetWorkSheetCount() > 0 _ - AndAlso DialogResult.Yes = MsgBox("Are you sure you want to close your data?" & + If ucrDataViewer.GetWorkSheetCount() <= 0 Then + Exit Sub + End If + + If Not bDataSaved _ + AndAlso DialogResult.No = MsgBox("Are you sure you want to close your data?" & Environment.NewLine & "Any unsaved changes will be lost.", - MessageBoxButtons.YesNo, "Close Data")) _ - OrElse bDataSaved Then - clsRLink.CloseData() - strSaveFilePath = "" + MessageBoxButtons.YesNo, "Close Data") Then + Exit Sub End If + + clsRLink.CloseData() + strSaveFilePath = "" End Sub Private Sub mnuPrepareCheckDataDuplicates_Click(sender As Object, e As EventArgs) Handles mnuPrepareCheckDataDuplicates.Click From e24c076443e7b548d09c9a45a2b12d0210f83676 Mon Sep 17 00:00:00 2001 From: shadrack kibet Date: Wed, 25 May 2022 15:25:27 +0300 Subject: [PATCH 7/9] "proper" setting default via Rcode and updated Tab order --- instat/dlgClimaticSummary.Designer.vb | 40 +++++++++++++-------------- instat/dlgClimaticSummary.vb | 22 ++++----------- 2 files changed, 26 insertions(+), 36 deletions(-) diff --git a/instat/dlgClimaticSummary.Designer.vb b/instat/dlgClimaticSummary.Designer.vb index db0a186ca7a..05277477bb2 100644 --- a/instat/dlgClimaticSummary.Designer.vb +++ b/instat/dlgClimaticSummary.Designer.vb @@ -129,7 +129,7 @@ Partial Class dlgClimaticSummary Me.lblStation.Location = New System.Drawing.Point(288, 68) Me.lblStation.Name = "lblStation" Me.lblStation.Size = New System.Drawing.Size(43, 13) - Me.lblStation.TabIndex = 5 + Me.lblStation.TabIndex = 7 Me.lblStation.Text = "Station:" ' 'lblDate @@ -139,7 +139,7 @@ Partial Class dlgClimaticSummary Me.lblDate.Location = New System.Drawing.Point(288, 109) Me.lblDate.Name = "lblDate" Me.lblDate.Size = New System.Drawing.Size(33, 13) - Me.lblDate.TabIndex = 7 + Me.lblDate.TabIndex = 9 Me.lblDate.Text = "Date:" ' 'lblDay @@ -149,7 +149,7 @@ Partial Class dlgClimaticSummary Me.lblDay.Location = New System.Drawing.Point(288, 245) Me.lblDay.Name = "lblDay" Me.lblDay.Size = New System.Drawing.Size(66, 13) - Me.lblDay.TabIndex = 11 + Me.lblDay.TabIndex = 13 Me.lblDay.Text = "Day of Year:" ' 'lblElement @@ -159,7 +159,7 @@ Partial Class dlgClimaticSummary Me.lblElement.Location = New System.Drawing.Point(288, 150) Me.lblElement.Name = "lblElement" Me.lblElement.Size = New System.Drawing.Size(48, 13) - Me.lblElement.TabIndex = 9 + Me.lblElement.TabIndex = 11 Me.lblElement.Text = "Element:" ' 'cmdSummary @@ -168,7 +168,7 @@ Partial Class dlgClimaticSummary Me.cmdSummary.Location = New System.Drawing.Point(288, 371) Me.cmdSummary.Name = "cmdSummary" Me.cmdSummary.Size = New System.Drawing.Size(120, 26) - Me.cmdSummary.TabIndex = 17 + Me.cmdSummary.TabIndex = 20 Me.cmdSummary.Tag = "Summaries" Me.cmdSummary.Text = "Summaries" Me.cmdSummary.UseVisualStyleBackColor = True @@ -180,7 +180,7 @@ Partial Class dlgClimaticSummary Me.lblWithinYear.Location = New System.Drawing.Point(288, 327) Me.lblWithinYear.Name = "lblWithinYear" Me.lblWithinYear.Size = New System.Drawing.Size(65, 13) - Me.lblWithinYear.TabIndex = 15 + Me.lblWithinYear.TabIndex = 17 Me.lblWithinYear.Text = "Within Year:" ' 'grpOptions @@ -194,7 +194,7 @@ Partial Class dlgClimaticSummary Me.grpOptions.Location = New System.Drawing.Point(5, 233) Me.grpOptions.Name = "grpOptions" Me.grpOptions.Size = New System.Drawing.Size(280, 136) - Me.grpOptions.TabIndex = 18 + Me.grpOptions.TabIndex = 19 Me.grpOptions.TabStop = False Me.grpOptions.Text = "Options" ' @@ -260,7 +260,7 @@ Partial Class dlgClimaticSummary Me.cmdDoyRange.Location = New System.Drawing.Point(5, 397) Me.cmdDoyRange.Name = "cmdDoyRange" Me.cmdDoyRange.Size = New System.Drawing.Size(105, 26) - Me.cmdDoyRange.TabIndex = 19 + Me.cmdDoyRange.TabIndex = 21 Me.cmdDoyRange.Tag = "" Me.cmdDoyRange.Text = "Day Range" Me.cmdDoyRange.UseVisualStyleBackColor = True @@ -272,7 +272,7 @@ Partial Class dlgClimaticSummary Me.lblYear.Location = New System.Drawing.Point(288, 286) Me.lblYear.Name = "lblYear" Me.lblYear.Size = New System.Drawing.Size(32, 13) - Me.lblYear.TabIndex = 13 + Me.lblYear.TabIndex = 15 Me.lblYear.Text = "Year:" ' 'rdoStation @@ -286,7 +286,7 @@ Partial Class dlgClimaticSummary Me.rdoStation.Location = New System.Drawing.Point(308, 14) Me.rdoStation.Name = "rdoStation" Me.rdoStation.Size = New System.Drawing.Size(61, 27) - Me.rdoStation.TabIndex = 22 + Me.rdoStation.TabIndex = 5 Me.rdoStation.TabStop = True Me.rdoStation.Text = "Station" Me.rdoStation.TextAlign = System.Drawing.ContentAlignment.MiddleCenter @@ -303,7 +303,7 @@ Partial Class dlgClimaticSummary Me.rdoDaily.Location = New System.Drawing.Point(249, 14) Me.rdoDaily.Name = "rdoDaily" Me.rdoDaily.Size = New System.Drawing.Size(63, 27) - Me.rdoDaily.TabIndex = 23 + Me.rdoDaily.TabIndex = 4 Me.rdoDaily.TabStop = True Me.rdoDaily.Text = "Daily" Me.rdoDaily.TextAlign = System.Drawing.ContentAlignment.MiddleCenter @@ -319,7 +319,7 @@ Partial Class dlgClimaticSummary Me.ucrReceiverElements.Selector = Nothing Me.ucrReceiverElements.Size = New System.Drawing.Size(123, 78) Me.ucrReceiverElements.strNcFilePath = "" - Me.ucrReceiverElements.TabIndex = 10 + Me.ucrReceiverElements.TabIndex = 12 Me.ucrReceiverElements.ucrSelector = Nothing ' 'ucrInputFilterPreview @@ -331,7 +331,7 @@ Partial Class dlgClimaticSummary Me.ucrInputFilterPreview.Location = New System.Drawing.Point(115, 400) Me.ucrInputFilterPreview.Name = "ucrInputFilterPreview" Me.ucrInputFilterPreview.Size = New System.Drawing.Size(242, 22) - Me.ucrInputFilterPreview.TabIndex = 20 + Me.ucrInputFilterPreview.TabIndex = 22 ' 'ucrSelectorVariable ' @@ -343,7 +343,7 @@ Partial Class dlgClimaticSummary Me.ucrSelectorVariable.Margin = New System.Windows.Forms.Padding(0) Me.ucrSelectorVariable.Name = "ucrSelectorVariable" Me.ucrSelectorVariable.Size = New System.Drawing.Size(213, 183) - Me.ucrSelectorVariable.TabIndex = 4 + Me.ucrSelectorVariable.TabIndex = 6 ' 'ucrReceiverWithinYear ' @@ -355,7 +355,7 @@ Partial Class dlgClimaticSummary Me.ucrReceiverWithinYear.Selector = Nothing Me.ucrReceiverWithinYear.Size = New System.Drawing.Size(120, 20) Me.ucrReceiverWithinYear.strNcFilePath = "" - Me.ucrReceiverWithinYear.TabIndex = 16 + Me.ucrReceiverWithinYear.TabIndex = 18 Me.ucrReceiverWithinYear.ucrSelector = Nothing ' 'ucrReceiverDOY @@ -368,7 +368,7 @@ Partial Class dlgClimaticSummary Me.ucrReceiverDOY.Selector = Nothing Me.ucrReceiverDOY.Size = New System.Drawing.Size(120, 20) Me.ucrReceiverDOY.strNcFilePath = "" - Me.ucrReceiverDOY.TabIndex = 12 + Me.ucrReceiverDOY.TabIndex = 14 Me.ucrReceiverDOY.ucrSelector = Nothing ' 'ucrReceiverYear @@ -381,7 +381,7 @@ Partial Class dlgClimaticSummary Me.ucrReceiverYear.Selector = Nothing Me.ucrReceiverYear.Size = New System.Drawing.Size(120, 20) Me.ucrReceiverYear.strNcFilePath = "" - Me.ucrReceiverYear.TabIndex = 14 + Me.ucrReceiverYear.TabIndex = 16 Me.ucrReceiverYear.ucrSelector = Nothing ' 'ucrReceiverDate @@ -394,7 +394,7 @@ Partial Class dlgClimaticSummary Me.ucrReceiverDate.Selector = Nothing Me.ucrReceiverDate.Size = New System.Drawing.Size(120, 20) Me.ucrReceiverDate.strNcFilePath = "" - Me.ucrReceiverDate.TabIndex = 8 + Me.ucrReceiverDate.TabIndex = 10 Me.ucrReceiverDate.ucrSelector = Nothing ' 'ucrReceiverStation @@ -407,7 +407,7 @@ Partial Class dlgClimaticSummary Me.ucrReceiverStation.Selector = Nothing Me.ucrReceiverStation.Size = New System.Drawing.Size(120, 20) Me.ucrReceiverStation.strNcFilePath = "" - Me.ucrReceiverStation.TabIndex = 6 + Me.ucrReceiverStation.TabIndex = 8 Me.ucrReceiverStation.ucrSelector = Nothing ' 'ucrBase @@ -417,7 +417,7 @@ Partial Class dlgClimaticSummary Me.ucrBase.Location = New System.Drawing.Point(5, 422) Me.ucrBase.Name = "ucrBase" Me.ucrBase.Size = New System.Drawing.Size(408, 52) - Me.ucrBase.TabIndex = 21 + Me.ucrBase.TabIndex = 23 ' 'ucrPnlAnnualWithin ' diff --git a/instat/dlgClimaticSummary.vb b/instat/dlgClimaticSummary.vb index b331e8c4830..53a67e26187 100644 --- a/instat/dlgClimaticSummary.vb +++ b/instat/dlgClimaticSummary.vb @@ -62,17 +62,12 @@ Public Class dlgClimaticSummary ucrSelectorVariable.SetParameterIsString() 'panel setting - ucrPnlAnnualWithin.AddRadioButton(rdoAnnual) - ucrPnlAnnualWithin.AddRadioButton(rdoAnnualWithinYear) - ucrPnlAnnualWithin.AddRadioButton(rdoWithinYear) - ucrPnlAnnualWithin.AddRadioButton(rdoStation) - ucrPnlAnnualWithin.AddRadioButton(rdoDaily) - - ucrPnlAnnualWithin.AddParameterValuesCondition(rdoAnnual, "checked", "annual") - ucrPnlAnnualWithin.AddParameterValuesCondition(rdoAnnualWithinYear, "checked", "annual_within_year") - ucrPnlAnnualWithin.AddParameterValuesCondition(rdoWithinYear, "checked", "within_year") - ucrPnlAnnualWithin.AddParameterValuesCondition(rdoStation, "checked", "station") - ucrPnlAnnualWithin.AddParameterValuesCondition(rdoDaily, "checked", "daily") + ucrPnlAnnualWithin.SetParameter(New RParameter("checked", 0)) + ucrPnlAnnualWithin.AddRadioButton(rdoAnnual, "annual") + ucrPnlAnnualWithin.AddRadioButton(rdoAnnualWithinYear, "annual_within_year") + ucrPnlAnnualWithin.AddRadioButton(rdoWithinYear, "within_year") + ucrPnlAnnualWithin.AddRadioButton(rdoStation, "station") + ucrPnlAnnualWithin.AddRadioButton(rdoDaily, "daily") 'receivers: ' by receivers @@ -381,27 +376,22 @@ Public Class dlgClimaticSummary End If If rdoAnnual.Checked Then - clsDummyFunction.AddParameter("checked", "annual", iPosition:=0) clsDefaultFactors.RemoveParameterByName("within_variable") clsDefaultFactors.RemoveParameterByName("date") clsDefaultFactors.AddParameter(ucrReceiverYear.GetParameter()) ElseIf rdoAnnualWithinYear.Checked Then - clsDummyFunction.AddParameter("checked", "annual_within_year", iPosition:=0) clsDefaultFactors.AddParameter(ucrReceiverWithinYear.GetParameter()) clsDefaultFactors.AddParameter(ucrReceiverYear.GetParameter()) clsDefaultFactors.RemoveParameterByName("date") ElseIf rdoWithinYear.Checked Then - clsDummyFunction.AddParameter("checked", "within_year", iPosition:=0) clsDefaultFactors.RemoveParameterByName("year") clsDefaultFactors.AddParameter(ucrReceiverWithinYear.GetParameter()) clsDefaultFactors.RemoveParameterByName("date") ElseIf rdoStation.Checked Then - clsDummyFunction.AddParameter("checked", "station", iPosition:=0) clsDefaultFactors.RemoveParameterByName("within_variable") clsDefaultFactors.RemoveParameterByName("year") clsDefaultFactors.RemoveParameterByName("date") ElseIf rdoDaily.Checked Then - clsDummyFunction.AddParameter("checked", "daily", iPosition:=0) clsDefaultFactors.RemoveParameterByName("within_variable") clsDefaultFactors.RemoveParameterByName("year") clsDefaultFactors.AddParameter("date", ucrReceiverDate.GetVariableNames(), iPosition:=1, bIncludeArgumentName:=False) From 0a0f5afe3f786a0d4ecf9fadf46bb63235a561ba Mon Sep 17 00:00:00 2001 From: Vitalis95 Date: Thu, 26 May 2022 14:29:09 +0300 Subject: [PATCH 8/9] Adding graphs --- instat/frmMain.Designer.vb | 50 ++++++++++++++++++++++++-------------- instat/frmMain.vb | 10 +++++--- 2 files changed, 39 insertions(+), 21 deletions(-) diff --git a/instat/frmMain.Designer.vb b/instat/frmMain.Designer.vb index 807c7e5c1ea..c8df5c4eecc 100644 --- a/instat/frmMain.Designer.vb +++ b/instat/frmMain.Designer.vb @@ -277,9 +277,9 @@ Partial Class frmMain Me.mnuClimaticNCMPCountRecords = New System.Windows.Forms.ToolStripMenuItem() Me.mnuClimaticNCMPSummary = New System.Windows.Forms.ToolStripMenuItem() Me.mnuClimaticPICSA = New System.Windows.Forms.ToolStripMenuItem() - Me.mnuClimaticPICSARainfall = New System.Windows.Forms.ToolStripMenuItem() + Me.mnuClimaticPICSARainfallGraph = New System.Windows.Forms.ToolStripMenuItem() Me.mnuClimaticPICSACumExeedenceGraph = New System.Windows.Forms.ToolStripMenuItem() - Me.mnuClimaticPICSATemperature = New System.Windows.Forms.ToolStripMenuItem() + Me.mnuClimaticPICSATemperatureGraph = New System.Windows.Forms.ToolStripMenuItem() Me.mnuClimaticPICSACrops = New System.Windows.Forms.ToolStripMenuItem() Me.mnuCMSAF = New System.Windows.Forms.ToolStripMenuItem() Me.mnuClimaticCMSAFPlotRegion = New System.Windows.Forms.ToolStripMenuItem() @@ -676,6 +676,8 @@ Partial Class frmMain Me.mnuDataFrameMetadata = New System.Windows.Forms.ToolStripMenuItem() Me.mnuScriptFile = New System.Windows.Forms.ToolStripMenuItem() Me.mnuLogFile = New System.Windows.Forms.ToolStripMenuItem() + Me.mnuClimaticPICSAGeneralGraph = New System.Windows.Forms.ToolStripMenuItem() + Me.ToolStripSeparator73 = New System.Windows.Forms.ToolStripSeparator() Me.stsStrip.SuspendLayout() Me.Tool_strip.SuspendLayout() Me.mnuBar.SuspendLayout() @@ -1217,7 +1219,7 @@ Partial Class frmMain 'mnuModelOtherOneVariableExactResults ' Me.mnuModelOtherOneVariableExactResults.Name = "mnuModelOtherOneVariableExactResults" - Me.mnuModelOtherOneVariableExactResults.Size = New System.Drawing.Size(180, 22) + Me.mnuModelOtherOneVariableExactResults.Size = New System.Drawing.Size(166, 22) Me.mnuModelOtherOneVariableExactResults.Tag = "Exact_Results..." Me.mnuModelOtherOneVariableExactResults.Text = "Exact Results..." ' @@ -1225,7 +1227,7 @@ Partial Class frmMain ' Me.mnuModelOtherOneVariableSampleSummaryData.Enabled = False Me.mnuModelOtherOneVariableSampleSummaryData.Name = "mnuModelOtherOneVariableSampleSummaryData" - Me.mnuModelOtherOneVariableSampleSummaryData.Size = New System.Drawing.Size(180, 22) + Me.mnuModelOtherOneVariableSampleSummaryData.Size = New System.Drawing.Size(166, 22) Me.mnuModelOtherOneVariableSampleSummaryData.Tag = "Summary_Data..." Me.mnuModelOtherOneVariableSampleSummaryData.Text = "Summary Data..." ' @@ -1233,7 +1235,7 @@ Partial Class frmMain ' Me.mnuModelOtherOneVariableNonParametric.Enabled = False Me.mnuModelOtherOneVariableNonParametric.Name = "mnuModelOtherOneVariableNonParametric" - Me.mnuModelOtherOneVariableNonParametric.Size = New System.Drawing.Size(180, 22) + Me.mnuModelOtherOneVariableNonParametric.Size = New System.Drawing.Size(166, 22) Me.mnuModelOtherOneVariableNonParametric.Tag = "Non_Parametric..." Me.mnuModelOtherOneVariableNonParametric.Text = "Non Parametric..." ' @@ -1241,7 +1243,7 @@ Partial Class frmMain ' Me.mnuModelOtherOneVariableGoodnessofFit.Enabled = False Me.mnuModelOtherOneVariableGoodnessofFit.Name = "mnuModelOtherOneVariableGoodnessofFit" - Me.mnuModelOtherOneVariableGoodnessofFit.Size = New System.Drawing.Size(180, 22) + Me.mnuModelOtherOneVariableGoodnessofFit.Size = New System.Drawing.Size(166, 22) Me.mnuModelOtherOneVariableGoodnessofFit.Tag = "Goodness_of_Fit" Me.mnuModelOtherOneVariableGoodnessofFit.Text = "Goodness of Fit..." ' @@ -2249,16 +2251,16 @@ Partial Class frmMain ' 'mnuClimaticPICSA ' - Me.mnuClimaticPICSA.DropDownItems.AddRange(New System.Windows.Forms.ToolStripItem() {Me.mnuClimaticPICSARainfall, Me.mnuClimaticPICSACumExeedenceGraph, Me.mnuClimaticPICSATemperature, Me.mnuClimaticPICSACrops}) + Me.mnuClimaticPICSA.DropDownItems.AddRange(New System.Windows.Forms.ToolStripItem() {Me.mnuClimaticPICSARainfallGraph, Me.mnuClimaticPICSATemperatureGraph, Me.mnuClimaticPICSAGeneralGraph, Me.ToolStripSeparator73, Me.mnuClimaticPICSACumExeedenceGraph, Me.mnuClimaticPICSACrops}) Me.mnuClimaticPICSA.Name = "mnuClimaticPICSA" Me.mnuClimaticPICSA.Size = New System.Drawing.Size(212, 22) Me.mnuClimaticPICSA.Text = "PICSA" ' - 'mnuClimaticPICSARainfall + 'mnuClimaticPICSARainfallGraph ' - Me.mnuClimaticPICSARainfall.Name = "mnuClimaticPICSARainfall" - Me.mnuClimaticPICSARainfall.Size = New System.Drawing.Size(246, 22) - Me.mnuClimaticPICSARainfall.Text = "Rainfall Graph..." + Me.mnuClimaticPICSARainfallGraph.Name = "mnuClimaticPICSARainfallGraph" + Me.mnuClimaticPICSARainfallGraph.Size = New System.Drawing.Size(246, 22) + Me.mnuClimaticPICSARainfallGraph.Text = "Rainfall Graph..." ' 'mnuClimaticPICSACumExeedenceGraph ' @@ -2266,12 +2268,11 @@ Partial Class frmMain Me.mnuClimaticPICSACumExeedenceGraph.Size = New System.Drawing.Size(246, 22) Me.mnuClimaticPICSACumExeedenceGraph.Text = "Cumulative/Exceedance Graph..." ' - 'mnuClimaticPICSATemperature + 'mnuClimaticPICSATemperatureGraph ' - Me.mnuClimaticPICSATemperature.Enabled = False - Me.mnuClimaticPICSATemperature.Name = "mnuClimaticPICSATemperature" - Me.mnuClimaticPICSATemperature.Size = New System.Drawing.Size(246, 22) - Me.mnuClimaticPICSATemperature.Text = "Temperature..." + Me.mnuClimaticPICSATemperatureGraph.Name = "mnuClimaticPICSATemperatureGraph" + Me.mnuClimaticPICSATemperatureGraph.Size = New System.Drawing.Size(246, 22) + Me.mnuClimaticPICSATemperatureGraph.Text = "Temperature Graph..." ' 'mnuClimaticPICSACrops ' @@ -5081,6 +5082,17 @@ Partial Class frmMain Me.mnuLogFile.Text = "Log Window..." Me.mnuLogFile.ToolTipText = "Log Window" ' + 'mnuClimaticPICSAGeneralGraph + ' + Me.mnuClimaticPICSAGeneralGraph.Name = "mnuClimaticPICSAGeneralGraph" + Me.mnuClimaticPICSAGeneralGraph.Size = New System.Drawing.Size(246, 22) + Me.mnuClimaticPICSAGeneralGraph.Text = "General Graph..." + ' + 'ToolStripSeparator73 + ' + Me.ToolStripSeparator73.Name = "ToolStripSeparator73" + Me.ToolStripSeparator73.Size = New System.Drawing.Size(243, 6) + ' 'frmMain ' Me.AutoScaleDimensions = New System.Drawing.SizeF(96.0!, 96.0!) @@ -5424,8 +5436,8 @@ Partial Class frmMain Friend WithEvents mnuClimaticDescribeTemperatures As ToolStripMenuItem Friend WithEvents mnuClimaticDescribeWindSpeedDirection As ToolStripMenuItem Friend WithEvents mnuClimaticPICSA As ToolStripMenuItem - Friend WithEvents mnuClimaticPICSARainfall As ToolStripMenuItem - Friend WithEvents mnuClimaticPICSATemperature As ToolStripMenuItem + Friend WithEvents mnuClimaticPICSARainfallGraph As ToolStripMenuItem + Friend WithEvents mnuClimaticPICSATemperatureGraph As ToolStripMenuItem Friend WithEvents mnuClimaticPICSACrops As ToolStripMenuItem Friend WithEvents mnuClimaticSCF As ToolStripMenuItem Friend WithEvents mnuClimaticModel As ToolStripMenuItem @@ -5772,4 +5784,6 @@ Partial Class frmMain Friend WithEvents mnuPrepareDataFrameAddMergeColumns As ToolStripMenuItem Friend WithEvents mnuPrepareCheckDataViewDeleteLabels As ToolStripMenuItem Friend WithEvents mnuPrepareDataReshapeRandomSplit As ToolStripMenuItem + Friend WithEvents mnuClimaticPICSAGeneralGraph As ToolStripMenuItem + Friend WithEvents ToolStripSeparator73 As ToolStripSeparator End Class diff --git a/instat/frmMain.vb b/instat/frmMain.vb index de2fb1634a7..6a04ecc029c 100644 --- a/instat/frmMain.vb +++ b/instat/frmMain.vb @@ -1264,12 +1264,12 @@ Public Class frmMain dlgSunshine.ShowDialog() End Sub - Private Sub mnuClimaticPICSARainfall_Click(sender As Object, e As EventArgs) Handles mnuClimaticPICSARainfall.Click + Private Sub mnuClimaticPICSARainfall_Click(sender As Object, e As EventArgs) Handles mnuClimaticPICSARainfallGraph.Click dlgPICSARainfall.ShowDialog() End Sub - Private Sub mnuClimaticPICSATemperature_Click(sender As Object, e As EventArgs) Handles mnuClimaticPICSATemperature.Click - dlgPICSATemperature.ShowDialog() + Private Sub mnuClimaticPICSATemperature_Click(sender As Object, e As EventArgs) Handles mnuClimaticPICSATemperatureGraph.Click + dlgPICSARainfall.ShowDialog() End Sub Private Sub mnuClimaticPICSACrops_Click(sender As Object, e As EventArgs) Handles mnuClimaticPICSACrops.Click @@ -2440,4 +2440,8 @@ Public Class frmMain Private Sub RandomSplitToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles mnuPrepareDataReshapeRandomSplit.Click dlgRandomSplit.ShowDialog() End Sub + + Private Sub mnuClimaticPICSAGeneralGraph_Click(sender As Object, e As EventArgs) Handles mnuClimaticPICSAGeneralGraph.Click + dlgPICSARainfall.ShowDialog() + End Sub End Class From 50cac7de5e71a5ebd20657f581fa991878140b4e Mon Sep 17 00:00:00 2001 From: Vitalis95 Date: Thu, 26 May 2022 14:48:33 +0300 Subject: [PATCH 9/9] disable --- instat/frmMain.Designer.vb | 42 ++++++++++++++++++++------------------ 1 file changed, 22 insertions(+), 20 deletions(-) diff --git a/instat/frmMain.Designer.vb b/instat/frmMain.Designer.vb index c8df5c4eecc..2f339236499 100644 --- a/instat/frmMain.Designer.vb +++ b/instat/frmMain.Designer.vb @@ -278,8 +278,10 @@ Partial Class frmMain Me.mnuClimaticNCMPSummary = New System.Windows.Forms.ToolStripMenuItem() Me.mnuClimaticPICSA = New System.Windows.Forms.ToolStripMenuItem() Me.mnuClimaticPICSARainfallGraph = New System.Windows.Forms.ToolStripMenuItem() - Me.mnuClimaticPICSACumExeedenceGraph = New System.Windows.Forms.ToolStripMenuItem() Me.mnuClimaticPICSATemperatureGraph = New System.Windows.Forms.ToolStripMenuItem() + Me.mnuClimaticPICSAGeneralGraph = New System.Windows.Forms.ToolStripMenuItem() + Me.ToolStripSeparator73 = New System.Windows.Forms.ToolStripSeparator() + Me.mnuClimaticPICSACumExeedenceGraph = New System.Windows.Forms.ToolStripMenuItem() Me.mnuClimaticPICSACrops = New System.Windows.Forms.ToolStripMenuItem() Me.mnuCMSAF = New System.Windows.Forms.ToolStripMenuItem() Me.mnuClimaticCMSAFPlotRegion = New System.Windows.Forms.ToolStripMenuItem() @@ -676,8 +678,6 @@ Partial Class frmMain Me.mnuDataFrameMetadata = New System.Windows.Forms.ToolStripMenuItem() Me.mnuScriptFile = New System.Windows.Forms.ToolStripMenuItem() Me.mnuLogFile = New System.Windows.Forms.ToolStripMenuItem() - Me.mnuClimaticPICSAGeneralGraph = New System.Windows.Forms.ToolStripMenuItem() - Me.ToolStripSeparator73 = New System.Windows.Forms.ToolStripSeparator() Me.stsStrip.SuspendLayout() Me.Tool_strip.SuspendLayout() Me.mnuBar.SuspendLayout() @@ -2262,18 +2262,31 @@ Partial Class frmMain Me.mnuClimaticPICSARainfallGraph.Size = New System.Drawing.Size(246, 22) Me.mnuClimaticPICSARainfallGraph.Text = "Rainfall Graph..." ' - 'mnuClimaticPICSACumExeedenceGraph - ' - Me.mnuClimaticPICSACumExeedenceGraph.Name = "mnuClimaticPICSACumExeedenceGraph" - Me.mnuClimaticPICSACumExeedenceGraph.Size = New System.Drawing.Size(246, 22) - Me.mnuClimaticPICSACumExeedenceGraph.Text = "Cumulative/Exceedance Graph..." - ' 'mnuClimaticPICSATemperatureGraph ' + Me.mnuClimaticPICSATemperatureGraph.Enabled = False Me.mnuClimaticPICSATemperatureGraph.Name = "mnuClimaticPICSATemperatureGraph" Me.mnuClimaticPICSATemperatureGraph.Size = New System.Drawing.Size(246, 22) Me.mnuClimaticPICSATemperatureGraph.Text = "Temperature Graph..." ' + 'mnuClimaticPICSAGeneralGraph + ' + Me.mnuClimaticPICSAGeneralGraph.Enabled = False + Me.mnuClimaticPICSAGeneralGraph.Name = "mnuClimaticPICSAGeneralGraph" + Me.mnuClimaticPICSAGeneralGraph.Size = New System.Drawing.Size(246, 22) + Me.mnuClimaticPICSAGeneralGraph.Text = "General Graph..." + ' + 'ToolStripSeparator73 + ' + Me.ToolStripSeparator73.Name = "ToolStripSeparator73" + Me.ToolStripSeparator73.Size = New System.Drawing.Size(243, 6) + ' + 'mnuClimaticPICSACumExeedenceGraph + ' + Me.mnuClimaticPICSACumExeedenceGraph.Name = "mnuClimaticPICSACumExeedenceGraph" + Me.mnuClimaticPICSACumExeedenceGraph.Size = New System.Drawing.Size(246, 22) + Me.mnuClimaticPICSACumExeedenceGraph.Text = "Cumulative/Exceedance Graph..." + ' 'mnuClimaticPICSACrops ' Me.mnuClimaticPICSACrops.Name = "mnuClimaticPICSACrops" @@ -5082,17 +5095,6 @@ Partial Class frmMain Me.mnuLogFile.Text = "Log Window..." Me.mnuLogFile.ToolTipText = "Log Window" ' - 'mnuClimaticPICSAGeneralGraph - ' - Me.mnuClimaticPICSAGeneralGraph.Name = "mnuClimaticPICSAGeneralGraph" - Me.mnuClimaticPICSAGeneralGraph.Size = New System.Drawing.Size(246, 22) - Me.mnuClimaticPICSAGeneralGraph.Text = "General Graph..." - ' - 'ToolStripSeparator73 - ' - Me.ToolStripSeparator73.Name = "ToolStripSeparator73" - Me.ToolStripSeparator73.Size = New System.Drawing.Size(243, 6) - ' 'frmMain ' Me.AutoScaleDimensions = New System.Drawing.SizeF(96.0!, 96.0!)